The BinProlog API: Prolog built-ins and their descriptions

    Total number of documented built-ins: 817

  1. !/0 : succeeds like true/0, but removes pending choices in calls at its LEFT and makes things look as if this were the LAST clause of the predicate
  2. # /3 : bitwise XOR
    EXAMPLE(S): 
    ?-#(1,2,_A).
    _A = 3;
    
    no
    
  3. (##)/1 : executes arg 1 at compile time - make sure the executed code terminates
  4. (#*)/3 : (X): adds intuitionisic assumption *(X) to be used indefinitely by #- operation
  5. (#+)/3 : (X): adds linear assumption +(X) to be consumed at most once, by a #- operation
  6. (#-)/3 : (X): consumes +(X) linear assumption or matches *(X) intuitionistic assumption
  7. (#:)/3 : (X): matches X against current dcg token
  8. (#<)/3 : (Xs): sets the dcg token list to be Xs
  9. (#=)/3 : (X): unifies X with any matching existing or future +(X) linear assumptions
  10. (#>)/3 : (Xs): unifies current dcg token list with Xs
  11. (#?)/3 : (X): matches +(X) or *(X) assumptions without any binding
  12. $catch_looking_for_throw/1 : (CatchThrowData): continuation marker used by catch/throw
  13. $hx/3 : hidden compiled hashed database predicate
  14. $process_catch/3 : processes data sent by catch for throw
  15. * /3 : multiply
    EXAMPLE(S): 
    ?-*(10,3,_A).
    _A = 30;
    
    no
    
  16. ** /3 : returns arg 1 at power arg 2, a float
    EXAMPLE(S): 
    ?-**(2,3,_A).
    _A = 8;
    
    no
    
  17. (+)/2 : returns 0 + arg 1
  18. (+)/3 : add
    EXAMPLE(S): 
    ?-+(10,3,_A).
    _A = 13;
    
    no
    
  19. (++)/3 : concatenates N lists, usable in is/2
  20. (,)/2 : A,B succeeds if A suceeds and B, called after A, succeeds
  21. (-)/2 : returns 0 - arg 1
  22. (-)/3 : subtract
    EXAMPLE(S): 
    ?--(10,3,_A).
    _A = 7;
    
    no
    
  23. (->)/2 : Cond->Then executes Cond once; if it succeeds it also executes Then
  24. (.)/3 : (Head,Tail,List) builds List=[Head|Tail]
  25. / /3 : division
    EXAMPLE(S): 
    ?-/(10,3,_A).
    _A = 3.33333333;
    
    no
    
  26. // /3 : integer division
    EXAMPLE(S): 
    ?-//(10,3,_A).
    _A = 3;
    
    no
    
  27. /\ /3 : bitwise AND
    EXAMPLE(S): 
    ?-/\(1,2,_A).
    _A = 0;
    
    no
    
  28. : /2 : M:P calls predicate P hidden in module M
  29. (::-)/2 : variant of :- for hand transformed binary clauses - use with care
  30. (;)/2 : A;B succeeds if A succeeds or B, called after A, succeeds
  31. (<)/2 : numeric comparison
  32. << /3 : left shifts arg 1 by arg 2 bits
    EXAMPLE(S): 
    ?-<<(1,5,_A).
    _A = 32;
    
    no
    
  33. (=)/2 : (X,Y) true if (possibly cyclic) terms X and Y unify - cyclic terms can result from =/2, as occur check is not performed
    EXAMPLE(S): 
    ?-f(_A,s(a)) = f(_B,_B).
    _A = s(a);
    _B = s(a);
    
    no
    
  34. (=..)/2 : called univ -this is bidirectional- it converts between a term and its view as a alist of components
    EXAMPLE(S): 
    ?-f(a,b) =.. _A.
    _A = [f,a,b];
    
    no
    ?-_A =.. [f,a,b].
    _A = f(a,b);
    
    no
    
  35. (=:=)/2 : numeric comparison
  36. (=<)/2 : numeric comparison
  37. (==)/2 : true if args are identical terms
  38. (=\=)/2 : numeric comparison
  39. (>)/2 : numeric comparison
  40. (>=)/2 : numeric comparison
  41. >> /3 : right shifts arg 1 by arg 2 bits
    EXAMPLE(S): 
    ?->>(16,2,_A).
    _A = 4;
    
    no
    
  42. @ /3 : alternative form for C/3 DCG connect relation
  43. (@<)/2 : instance of compare/3 with arg 1: <
  44. (@=<)/2 : instance of compare/3 with arg 1: = or <
  45. (@>)/2 : instance of compare/3 with arg 1: >
  46. (@>=)/2 : instance of compare/3 with arg 1: > or =
  47. C/3 : DCG connect predicate
  48. \ /2 : complement
  49. \ /3 : bitwise or of first arg with bitwise complement of second
    EXAMPLE(S): 
    ?-\(0,2,_A).
    _A = -3;
    
    no
    
  50. (\+)/1 : succeeds if its argument is executed and fails
  51. \/ /3 : bitwise OR
    EXAMPLE(S): 
    ?-\/(1,2,_A).
    _A = 3;
    
    no
    
  52. (\=)/2 : true if args fail to unify
  53. (\==)/2 : true if arg 1 is not identical to arg 2
  54. ^ /2 : calls arg 2 and binds arg 1
    EXAMPLE(S): 
    ?-_A^eq(_A,1).
    _A = 1;
    
    no
    
  55. abolish/1 : abolish(F/N) deletes predicate F/N
  56. abort/0 : returns to toplevel
  57. abs/2 : int function
  58. abstime/1 : gets time in secs since arbitrary origin
    EXAMPLE(S): 
    ?-abstime(_A).
    _A = 343416141;
    
    no
    
  59. acos/2 : float function
  60. addq/3 : adds to end of persistent queeue
    EXAMPLE(S): 
    ?-addq(key1,key2,33).
    
    yes
    
  61. all/2 : gets the list of terms matching arg 1 from Linda blackboard
  62. all/3 : gets a selection arg 1 of terms matching arg 2 from Linda blackboard
  63. all_answers/3 : (X,G,Xs): like findall/3, but such that if V is not common to X and G then V cannot be bound by execution of G
    EXAMPLE(S): 
    ?-all_answers(_A,member(s(_A),[_B,_C,_C,_D]),_E).
    _A = _x61091;
    _B = s(_x62212);
    _C = s(_x62239);
    _D = s(_x62293);
    _E = [_x62212,_x62239,_x62239,_x62293];
    
    no
    
  64. all_but_at_least/4 : (N,X,G,Xs) findall variant, computing all but the first N answers X of G
  65. all_for/2 : all_for(X,Xs) collects all constrained terms X on the blackboard to list Xs
  66. and/2 : conjunction, like comma
  67. answer_of/2 : (X,G): X is an answer for G, after finding all, sorting and removing duplicates
  68. answer_one_query/2 : handles a Jinni service S with password P
  69. append/3 : concatenates/decomposes lists
    EXAMPLE(S): 
    ?-append([1,2],[3,4],_A).
    _A = [1,2,3,4];
    
    no
    ?-append(_A,_B,[1,2]).
    _A = [];
    _B = [1,2];
    
    _A = [1];
    _B = [2];
    
    _A = [1,2];
    _B = [];
    
    no
    
  70. appendN/2 : concatenates N lists
    EXAMPLE(S): 
    ?-appendN([[a,b],[],[c]],_A).
    _A = [a,b,c];
    
    no
    
  71. append_conj/3 : concatenates 2 conjunctions
  72. append_disj/3 : concatenates 2 disjunctions
  73. apropos/1 : prints names of predicates defined in the system
    EXAMPLE(S): 
    ?-apropos(garbage).
    use info/1 to get a description of a predicate
    garbage_collect/0-[built_in,performs heap gc now]
    
    yes
    
  74. apropos/2 : returns names of predicates defined in the system
    EXAMPLE(S): 
    ?-apropos(retract,_A).
    _A = retract/1-[built_in,backtracks over deleting matching clauses];
    
    _A = retract1/1-[built_in,deletes first matching clause in the current database];
    
    _A = retractall/1-[built_in,deletes all matching clauses];
    
    _A = x_retract/1-[built_in,db hook, backtracks over deleting matching clauses];
    
    _A = x_retractall/1-[built_in,db hook, deletes all matching clauses];
    
    _A = db_retract/2-[built_in,does retract/1 arg 2 from database given as arg 1];
    
    _A = db_retract/3-[built_in,db_retract(Db,H,B) retracts clause with head H and body B from database Db];
    
    _A = db_retract1/2-[built_in,deletes from database given as arg 1 a matching clause];
    
    _A = db_retractall/2-[built_in,removes from database given as arg 1, all matching clauses];
    
    _A = db_retractall/3-[built_in,removes from database given as arg 1, all matching clauses seen as head + body];
    
    _A = prolog:x_retract_each/1-[compiled];
    
    _A = prolog:db_retractall0/3-[compiled];
    
    _A = prolog:x_retract/2-[compiled];
    
    _A = prolog:x_retract_args/5-[compiled];
    
    no
    
  75. arg/3 : arg(I,T,X) extracts arg I of term T to be unified with X
    EXAMPLE(S): 
    ?-arg(2,f(a,b),_A).
    _A = b;
    
    no
    
  76. argn/3 : generates all n args of term
    EXAMPLE(S): 
    ?-argn(_A,f(a,b),_B).
    _A = 1;
    _B = a;
    
    _A = 2;
    _B = b;
    
    no
    
  77. arith_dif/2 : arithemetic comparison
  78. arith_eq/2 : arithemetic comparison
  79. array_get/3 : gets and dereferences array element
  80. array_get0/3 : gets array element
  81. array_set/3 : sets array element
  82. asin/2 : float function
  83. ask/5 : ask(ClientSocket,X,G,W,R): calls rpc server on on ClientSocket with query X goal G password W and gets result R back - supports socket reuse
  84. ask_engine/2 : ask_engine(E,X) retrieves from engine E (a copy of) answer X
  85. ask_thread/2 : (E,R): asks an answer of engine E on a new thread R
  86. asm/0 : shows transformations and readable BinWAM assembler for Prolog code entered at terminal
  87. asm/1 : generates readable binarized form and BinWAM assembler to a file
  88. assert/1 : adds a clause
  89. assert_from_chars/1 : asserts a program from clauses in list of chars
  90. assert_from_chars/2 : (Db,Cs) asserts to database Db, a set of clauses parsed from list of char codes Cs
  91. asserta/1 : adds a clause to be first in a predicate definition
  92. asserted/1 : runs a predicated if asserted
  93. assertz/1 : adds a clause to be last in a predicate definition
  94. atan/2 : float function
  95. atan2/3 : float function
  96. atom/1 : true if symbol (functor of arity 0)
    EXAMPLE(S): 
    ?-atom(a).
    
    yes
    
  97. atom_chars/2 : (Atom,CharAtoms): converts between an atom and its list of char atoms representation
    EXAMPLE(S): 
    ?-atom_chars(hello,_A).
    _A = [h,e,l,l,o];
    
    no
    ?-atom_chars(_A,[104,101,108,108,111]).
    no
    
  98. atom_codes/2 : (Atom,CharCodes): converts between an atom and its list of char code representation
    EXAMPLE(S): 
    ?-atom_codes(hello,_A).
    _A = [104,101,108,108,111];
    
    no
    ?-atom_codes(_A,[104,101,108,108,111]).
    _A = hello;
    
    no
    
  99. atomic/1 : true if an integer or symbolic constant
  100. bagof/3 : all solutions predicate generating unsorted bags of possibly dupplicated answers
    EXAMPLE(S): 
    ?-bagof(_A,member(_A,[3,2,2,1]),_B).
    _A = _x61091;
    _B = [3,2,2,1];
    
    no
    
  101. bb/0 : lists (long!) content of the blackboard
  102. bb_def/3 : bb_def(K1,K2,T) associates to K1 and K2 (a copy of) T on the blackboard
  103. bb_gc/0 : performs blackboard gc now, if enabled
  104. bb_gc0/0 : performs blackboard gc now, in this engine
  105. bb_get/3 : bb_get(K1,K2,T) consumes the term T associated with K1 and K2
  106. bb_let/3 : bb_let(K1,K2,T) updates or defines the term associated with K1 and K2 to be T
  107. bb_reset/1 : cleans up and resizes to at least arg 1 bytes compound term area of the blackboard
  108. bb_rm/2 : removes the term associated with K1 and K2 from the blackboard
  109. bb_set/3 : bb_set(K1,K2,T) updates the term associated with K1 and K2 to be a copy of T
  110. bb_val/3 : bb_val(K1,K2,T) T is (a copy of) the term associated with keys K1 and K2
  111. bbgc/0 : enables blackboard gc
  112. bbgc_status/1 : shows if blackboard gc is enabled or not
  113. begin_critical/0 : begin serialized execution - enters critical region
  114. bg/1 : runs Goal in background thread - you can set engine size like in heap(500)=>bg(...)
  115. bg/2 : runs Goal in new background thread, which is returned in second arg
  116. bg/3 : bg(Goal,Thread,EngineAddr): runs goal in background if threads are available
  117. bg/4 : bg(Goal,Thread,EngineAddr,EngineID): runs goal in background on new engine - with unique EngineID
  118. bg/7 : bg(Goal,H,S,T,-Thread,-EngineAddr,-EngineID): runs goal in background on engine with given heap,stack,trail
  119. bincall/2 : call binary predicate with given continuation
  120. boot/0 : regenerates file wam.bp in BinProlog src directory
  121. bp_info/2 : keeps basic help info on BinProlog builtins
  122. bp_only/1 : runs goal only if is_prolog(binprolog) is true
  123. bp_only/2 : (Goal,Alternative): runs goal only if is_prolog(binprolog) is true otherwise runs Alternative
  124. bp_val/3 : unifies with 2 key indexed global logical variable
  125. call/1 : executes (atomic!) arg 1
  126. call/2 : efficient call/N variant
  127. call/3 : efficient call/N variant
  128. call/4 : efficient call/N variant
  129. call/5 : efficient call/N variant
  130. call/6 : efficient call/N variant
  131. call/7 : efficient call/N variant
  132. call_cont/1 : calls arg 1 as current continuation
  133. call_external/3 : args: StringToStringFunctionAddress,InputChars,OuputChars - calls a C function
  134. call_ifdef/2 : calls if predicate head is defined, calls arg 2 if not
  135. call_jinni/1 : call_jinni(G) calls Jinni in Twin Prolog with first answer binding G and fails if no answers are found
  136. call_jinni/2 : call_jinni(G,R) calls Jinni in Twin Prolog with first answer R=the(G) or R=no, without binding G
  137. call_jinni/3 : call_jinni(X,G,R) calls Jinni in Twin Prolog with first answer R=the(X) or R=no, without binding G
  138. callable/1 : checks if predicate head is defined (callable)
  139. catch/3 : ISO Prolog exception operator: executes arg 1 and if it catches arg 2, it executes arg 3
  140. cd/0 : changes local dir to HOME directory or / if no such env var
  141. cd/1 : changes local dir to arg 1
  142. cdelq/4 : deletes first matching element from a queue
    EXAMPLE(S): 
    ?-cdelq(key1,key2,_A,_B).
    _A = _x61095;
    _B = 33;
    
    no
    
  143. cdelq_any/3 : deletes any matching element from a queue
    EXAMPLE(S): 
    ?-cdelq_any(key1,key2,_A).
    no
    
  144. ceiling/2 : float to int function
    EXAMPLE(S): 
    ?-ceiling(1.3,_A).
    _A = 2;
    
    no
    
  145. change_arg/3 : destructive: change_arg(I,T,X) replaces arg I of T with X
    EXAMPLE(S): 
    ?-change_arg(2,f(a,b),c).
    
    yes
    
  146. char_of/2 : reads a Prolog file to a set of ascii codes - on backtracking
  147. check_password/1 : checks that password matches default password
  148. cin/1 : tries to get and remove a term from Linda blackboard
  149. clause/2 : clause(H,B) generates a clause with head matching H and body B
  150. clause_of/2 : reads a Prolog file to a set of clauses - on backtracking
  151. clean_up_dead_engines/0 : frees resources used by dead engines
  152. clean_up_engines/0 : frees resources used by all engines except main
  153. clean_up_engines/1 : internal predicate
  154. clear_bp_error/0 : clears errors set by various conditions
  155. clone_term/3 : clone_term(Vs,T,CT) does copy_term(T,C) while keeping unchanged variables Vs - useful if doing things like setarg/3 on the new copy
    EXAMPLE(S): 
    ?-clone_term([_A,_C],f(_A,_B,_B,_C),_D).
    _A = _x61783;
    _B = _x61101;
    _C = _x61786;
    _D = f(_x61783,_x61784,_x61784,_x61786);
    
    no
    
  156. close/1 : closes a stream opened by open/3
  157. close_iterator/1 : (Iterator) closes an iterator
  158. close_socket/1 : closes a server, service or client
  159. close_stream/2 : (Type,StreamID) closes various streams
  160. cmake/0 : compiles BinProlog's Prolog components to compact C code - for packaging as standalone executable
  161. cmake/1 : compiles a Project to compact C code - for packaging as standalone executable
  162. cmake/2 : (Project,Module): compiles to C a project with all clauses belonging to Module
  163. cmembq/3 : generates (copies of) members of a queue
    EXAMPLE(S): 
    ?-cmembq(key1,key2,_A).
    no
    
  164. cnl/0 : writes a new line
  165. co/0 : reconsults/recompiles last file
  166. co/1 : reconsults using fast reader
  167. codes_words/2 : converts a list of character codes to a list of words and back
  168. compare/3 : returns <,=,> in arg 1 after comparing arg 2 with arg 3
    EXAMPLE(S): 
    ?-compare(_A,1,2).
    _A = (<);
    
    no
    ?-compare(_A,f(b),f(a)).
    _A = (>);
    
    no
    ?-compare(_A,s(_B),s(_B)).
    _A = (=);
    _B = _x61101;
    
    no
    
  169. compile/1 : applies current compilation method to the file arg 1
  170. compound/1 : true if it has arity > 0
    EXAMPLE(S): 
    ?-compound(f(a)).
    
    yes
    
  171. compute/4 : applies Op to arg 2 and arg 3 giving a result
  172. consult/1 : consults with possible duplication of clauses, allows later dynamic recompilation depending on db_ratio/1
  173. consult/2 : consult(File,DB) consults File into DB)
  174. copy_term/2 : returns a copy of arg 1 with fresh variables
    EXAMPLE(S): 
    ?-copy_term(f(_A,_A,_B,_B),_C).
    _A = _x61092;
    _B = _x61094;
    _C = f(_x61580,_x61580,_x61582,_x61582);
    
    no
    
  175. cos/2 : float function
  176. count_terms/2 : returns the number of terms attached to a key
  177. cout/1 : adds a term to the blackboard, unless already a matching one is there
  178. cpopq/3 : pops (copy of) first element of persistent queue
    EXAMPLE(S): 
    ?-cpopq(key1,key2,_A).
    no
    
  179. create_engine/1 : makes a new engine or reuses a dead one
  180. create_engine/4 : create_engine(Heap,Stack,Trail,IntHandle) creates an engine IntHandle
  181. create_new_engine/1 : creates an engine as big as the current one
  182. ctime/1 : gets elapsed cpu time in ms
    EXAMPLE(S): 
    ?-ctime(_A).
    _A = 265;
    
    no
    
  183. current_db/1 : gets the name of currently active database
  184. current_engine/1 : gets the unique id of the current engine
  185. current_engine_addr/1 : returns current engine handle
  186. current_engine_id/1 : returns a unique id associated to an engine at creation time
  187. current_engine_thread/1 : gets from the current Engine the thread it is running on
  188. current_input/1 : gets current input stream
  189. current_module/1 : gets name of current module
  190. current_op/3 : generates/check current op/3 operator definition(s)
  191. current_output/1 : gets current output stream
  192. current_predicate/1 : generates/checks the head of an existing predicate
  193. current_predicate/2 : generates/checks name and head of a currently defined predicate
  194. current_thread/1 : gets thread id number of current thread
  195. cut_to/1 : cuts to an int in arg 1, a choicepoint address
  196. cwrite/1 : basic but quick C-version of write/1
  197. db_abolish/2 : db_abolish(DB,F/N) removes predicate F/N from DB
  198. db_assert/2 : does assert/1 arg 2 into database given as arg 1
  199. db_asserta/2 : does asserta/1 arg 2 into database given as arg 1
  200. db_asserted/2 : runs predicate arg 2 if asserted in database arg 1
  201. db_assertz/2 : does assertz/1 arg 2 into database given as arg 1
  202. db_clause/3 : clause(DB,H,B) generates a clause found in database DB with head matching H and body B
  203. db_clean/0 : abolishes all predicates in currently active database
  204. db_clean/1 : db_clean(DB) abolishes all predicates in DB
  205. db_consult/2 : db_consult(File,Db) consults a file to a database Db
  206. db_head/2 : generates/checks a predicate head in database (arg 1)
  207. db_is_dynamic/2 : checks if dynamic in a given database
  208. db_listing/1 : lists caluses given database
  209. db_listing/2 : lists predicate F/N in given database
  210. db_move/2 : db_move(FromDB,ToDB) moves the content of database FromDB over database ToDB while replacing similar predicates
  211. db_ratio/1 : sets/gets call/assert ratio which triggers dynamic recompilation
  212. db_retract/2 : does retract/1 arg 2 from database given as arg 1
  213. db_retract/3 : db_retract(Db,H,B) retracts clause with head H and body B from database Db
  214. db_retract1/2 : deletes from database given as arg 1 a matching clause
  215. db_retractall/2 : removes from database given as arg 1, all matching clauses
  216. db_retractall/3 : removes from database given as arg 1, all matching clauses seen as head + body
  217. db_save/1 : db_save(File) saves all the clauses of the current database to File
  218. db_save/2 : db_save(Db,File) saves using qprint/1 all the clauses of Db to File
  219. dcg_call/4 : (F,X,I,O): DCG metacall for star,plus,one
  220. dcg_call/5 : (F,X,Y,I,O): DCG metacall for star,plus,one
  221. dcg_connect/1 : handles a terminal symbol in HAGs, as [a] in DCGs
  222. dcg_def/1 : backtrackable: sets current Assumption Grammar stream - usually a hidden DCG list
  223. dcg_tell/1 : switches to hidden DCG-stream number K (form 0 to MAXDCG=255)
  224. dcg_telling/1 : retrieves which hidden DCG-stream we a re processing
    EXAMPLE(S): 
    ?-dcg_telling(_A).
    _A = 1;
    
    no
    
  225. dcg_val/1 : backtrackable: retrieves current Assumption Grammar stream - usually a hidden DCG list
  226. dconsult/1 : reconsult/1 variant: cleans up data areas, consults/compiles based on db_ratio/1
  227. debugmes/1 : writes message in debug mode (low quietness)
  228. deep_hash/4 : (Key,Depth,Mod) computes hashvalue of Key modulo Mod, up to max recursion Depth
    EXAMPLE(S): 
    ?-deep_hash(f(a),5,0,_A).
    _A = 23114257;
    
    no
    ?-deep_hash(f(b),1,32,_A).
    _A = 18;
    
    no
    
  229. default/2 : default that can be overriden if asserted
    EXAMPLE(S): 
    ?-default(host(_A),_A = localhost).
    _A = localhost;
    
    no
    
  230. default_host/1 : returns default host for remote Linda server
  231. default_login/1 : returns default (nick)name for user
  232. default_password/1 : returns default password for user
  233. default_port/1 : returns default port for remote Linda server
  234. default_this_host/1 : returns default IP address or hostname this machine
  235. default_this_port/1 : returns default port to work as a server on
  236. default_timeout/1 : returns default timeout
  237. delete_all_terms/1 : (GroundKey) removes all terms attached to a key
  238. destroy_array/1 : frees an array
  239. destroy_engine/1 : destroy_engine(E) frees memory of engine E (an integer)
  240. det_call/1 : calls a Goal and warns if it was not deterministic
  241. detect_ip_addr/1 : the ip address of current host, if detected, that of localhost if not
  242. detect_user/1 : guesses the user from environment information
  243. dir/0 : lists files under DOS
  244. dir2dirs/2 : (Dir,Dirs): converts dir cmd output to list of sub directories of Dir
  245. dir2files/2 : (Dir,Files): converts dir cmd output to list of files (which are not dirs) contained in Dir
  246. dir2list/3 : (DirListerCmd,DirName,Files): converts OS specific DirLister output to list of files and/or directories
  247. (discontiguous)/1 : states that clauses of a predicate can be in different places
  248. display/1 : writes to terminal while ignoring operator definitions
  249. drop_at_least/2 : (N,Goal) drops at least N answers of Goal G
  250. dyn2stat/1 : dyn2stat(H): compiles at runtime a predicate with head H
  251. dyn2stat/2 : dyn2stat(Db,H): compiles at a predicate from database Db with head H
  252. (dynamic)/1 : states that a predicate can be updated
  253. dynbbgc/0 : makes blackboard dynamic with gc on
  254. dynco/1 : yes/no: activates/desactivates dynamic recompilation
  255. ed/0 : edits last compiled/consulted file with default editor and refreshes it in memory
  256. edit/0 : calls DOS editor edit on last compiled file
  257. edit/2 : edit(E,F) edits with editor E, file F
  258. element_of/2 : (Engine,Answer: backtracks over the answers of a fluent (usually an engine)
  259. emacs/0 : calls emacs editor on last compiled file
  260. end_critical/0 : ends serialized execution - exits critical region
  261. end_module/0 : ends current module
  262. end_module/1 : ends module if current, signals erro if not
  263. end_of_file/0 : Prolog atom returned by read when at the end of a file
  264. eq/2 : unifies arg 1 and arg 2, like =
  265. errmes/2 : writes error message and fails
  266. exists_file/1 : true if file exists
  267. exit/0 : same as halt
  268. exp/2 : float function
  269. expand_term/2 : expands a term according to DCG expansion rules
  270. fail/0 : always fails
  271. false/0 : always fails
  272. fatal_error/2 : writes error message and aborts
  273. fcall/3 : calls a list to list function: to be implemented
  274. fclose/1 : closes the C-stream specifiend as an integer handle
  275. fcompile/1 : compiles a *.pl file to a *.wam bytecode file
  276. fflush/1 : fflush(IntegerStreamNo) flushes a C-stream
  277. fgetc/2 : fgetc(IntegerStreamNo,CharCode) inputs a char code from a C stream
  278. file2chars/2 : reads a file to a list of ascii codes
  279. file2sock/2 : writes to a socket, from a file
  280. file_cmd_hook/2 : file_cmd_hook(Cmd,Db): allows defining user actions on commands read from files
  281. file_extension_list/1 : defines default file extensions for find_file
  282. file_search_path/1 : defines search path relative to BP_PATH (home of BinProlog) and PROLOG_PATH (home of user files)
  283. file_size/2 : returns the size of a file, in bytes
  284. find_at_most/4 : (N,X,G,Xs) findall variant, computing at most N answers X of G
  285. find_file/2 : finds a file name on search path
  286. find_while/4 : findall variant
  287. findall/3 : findall(X,G,Xs) collects copies of all answers X of G to Xs. If less then half of the heap is free, it allocates new engine for running G
    EXAMPLE(S): 
    ?-findall(s(_A),(member(_A,[1,2,3]),_A > 1),_B).
    _A = _x61095;
    _B = [s(2),s(3)];
    
    no
    
  288. findall/4 : findall(X,G,Xs,Ys) appends the list of answers X of G to Ys to obtain Xs
    EXAMPLE(S): 
    ?-findall(s(_A),(_A = 1 ; _A = 2),_B,[3,4]).
    _A = _x61102;
    _B = [s(1),s(2),3,4];
    
    no
    
  289. float/1 : true if represented as a 64 bit float number (C-double)
    EXAMPLE(S): 
    ?-float(3.14).
    
    yes
    
  290. float/2 : float function
  291. floor/2 : float to int function
    EXAMPLE(S): 
    ?-floor(1.3,_A).
    _A = 1;
    
    no
    
  292. flush_output/0 : flushes current output stream
  293. flush_output/1 : flushes a stream
  294. foldl/4 : (Op,InitialValue,List,?Result) accumulates values interating over List with binary Op
    EXAMPLE(S): 
    ?-foldl(+,0,[10,20,30],_A).
    _A = 60;
    
    no
    
  295. foldr/4 : (Op,InitialValue,List,?Result) accumulates values interating over List with binary Op
    EXAMPLE(S): 
    ?-foldr(+,0,[10,20,30],_A).
    _A = 60;
    
    no
    
  296. fopen/3 : Prolog equivalent of C-function: opens a stream in a given mode and returns an integer handle to it
  297. for/3 : generates an integer in a range
    EXAMPLE(S): 
    ?-for(_A,1,3).
    _A = 1;
    
    _A = 2;
    
    _A = 3;
    
    no
    
  298. for_all/2 : foreach(A,B) fails for all cases when A succeeds and B fails
  299. forall/1 : forall(G) backtracks over all answers to G and succeeds
  300. forall/2 : forall(G,D) executes D once for each answer of generator G
  301. foreach/1 : foreach(G) backtracks over all answers to G and succeeds
  302. foreach/2 : foreach(G,D) executes D once for each answer of generator G
  303. fputc/2 : fputc(IntegerStreamNo,CharCode) outputs a char code to a C stream
  304. free_term/1 : (Handle): frees external term given as a Handle
  305. free_thread_guard/1 : gives back to pool thread guard in arg 1
  306. from_engine/1 : (T) tries to take a term T from the message box of this engine and sets the message box empty
  307. fsize/2 : returns the size of the file associated to a C stream, in bytes
  308. functor/3 : builds or decomposes a coumpound term
    EXAMPLE(S): 
    ?-functor(f(a,b),_A,_B).
    _A = f;
    _B = 2;
    
    no
    ?-functor(_A,f,3).
    _A = f(_x61710,_x61711,_x61712);
    
    no
    ?-functor(f(a),f,1).
    
    yes
    
  309. garbage_collect/0 : performs heap gc now
  310. gc/0 : enables heap gc
  311. gc_call/1 : G: executes G and ensures that no more space is consumed than the total size of the terms bound to its variables
  312. gc_status/1 : shows if heap gc is enabled or not
  313. generic_write/1 : overridable write/1, style (writeq, write, display) given with write_style/1 assumption
  314. gensym/2 : generates a new name based on arg 1
  315. gensym_no/2 : generates a new number based on arg 1
  316. get/1 : inputs the next char code after skiping over white space
  317. get/2 : get(E,A) returns a new answer A=the(...) from engine E or returns no if no (more) answers exist
  318. get0/1 : reads a char as an ascii code
  319. get_all_terms/2 : (GroundKey,Ts) collects to alist all terms attached to a key
  320. get_bp_error/4 : (Id,Mes,Arg1,Arg2): gets error sate from emulator
  321. get_char/2 : (Stream,CharAsOneLetterConstant): inputs a char from a stream -ISO Prolog
  322. get_code/1 : ISO char code reader
  323. get_code/2 : inputs a char code from a stream - ISO
  324. get_cont/1 : captures current continuation, usually an cyclic term
  325. get_critical/2 : (Guard,Data): accesses mutex Guard protected Data on blackboard
  326. get_deep_cut/2 : gets a choice point address, used with 1 arg only
  327. get_engine_id/2 : (+Engine,-Id) gets the unique id associated to an engine at creation time
  328. get_engine_prop/3 : args: Engine,PropertyNo,Val
  329. get_engine_thread/2 : gets from an Engine the thread it is running on
  330. get_lineno/1 : gets line number counter in current file
  331. get_load_method/1 : gets the current load method by name
  332. get_neck_cut/1 : gets the choice point as an integer
  333. get_next_term/2 : (Iterator,Term) returns the next term attached to an iterator, fails if no more left
  334. get_password/1 : gets default password for user
  335. get_term/2 : (Iterator,Term): backtracks over terms associated to a key
  336. global_get/3 : (A,B,X): retrieves X associated to ground keys A,B
  337. global_rm/2 : (A,B): removes value associated to ground keys A,B
  338. global_set/3 : (A,B,X): associates X to ground keys A,B
  339. greater/2 : arithemetic comparison
  340. greater_eq/2 : arithemetic comparison
  341. ground/1 : true if arg has no free variables
    EXAMPLE(S): 
    ?-ground(f(a,b)).
    
    yes
    
  342. halt/0 : stops BinProlog
  343. halt/1 : stops Prolog with given return code when used in main thread- or halts current thread
  344. handle_service/2 : handles a Jinni service S with password P - always succedes
  345. has_info/1 : checks/generates predicates Pred/Arity for which info is available
  346. has_terms/1 : (GroundKey) succeds if at least on term is attached to GroundKey
  347. has_threads/0 : succeeds if threads available on this platform
  348. hash_clear/0 : removes all terms from all hash keys
  349. hash_clear/1 : (GroundKey) removes all terms attached to a key
  350. hash_clear/2 : (GroundKey,Term) removes all matching terms attached to a key
  351. hash_compile/0 : compiles the hashed map to a predicate benefiting from 1-arg indexing
  352. hash_find_unique/3 : like findall(X,G,Xs) but uses hashing on ground term X to collect unique answers
  353. hash_gc/0 : frees space used by hash keys and values
  354. hash_get/2 : (GroundKey,Term) retrieves in constant time a term attached to a ground key
  355. hash_key/1 : (IntKey) backtrack over hash keys
  356. hash_load/1 : (File) loads the hashed map to a database
  357. hash_push/2 : (GroundKey,Term): attaches a term to a ground key in constant time as a the first element
  358. hash_put/2 : (GroundKey,Term): attaches a term to a ground key in constant time as the last element
  359. hash_rm/2 : (GroundKey) removes a term attached to a key and returns it - backtracks
  360. hash_rm_one/2 : (GroundKey) removes a term attached to a key and returns it
  361. hash_save/1 : (File) saves the hashed map to a database ready for 1-arg indexing if compiled
  362. hash_save/2 : (File,PredNMame) saves the hashed map to a database in predicate PredName ready for 1-arg indexing if compiled
  363. hash_trace/2 : tracer for hash maps
  364. help/0 : generates file help.txt with info and examples
  365. help/1 : same as apropos/1
    EXAMPLE(S): 
    ?-help(assert).
    use info/1 to get a description of a predicate
    assert/1-[built_in,adds a clause]
    assert_from_chars/1-[built_in,asserts a program from clauses in list of chars]
    assert_from_chars/2-[built_in,(Db,Cs) asserts to database Db, a set of clauses parsed from list of char codes Cs]
    asserta/1-[built_in,adds a clause to be first in a predicate definition]
    asserted/1-[built_in,runs a predicated if asserted]
    assertz/1-[built_in,adds a clause to be last in a predicate definition]
    db_assert/2-[built_in,does assert/1 arg 2 into database given as arg 1]
    db_asserta/2-[built_in,does asserta/1 arg 2 into database given as arg 1]
    db_asserted/2-[built_in,runs predicate arg 2 if asserted in database arg 1]
    db_assertz/2-[built_in,does assertz/1 arg 2 into database given as arg 1]
    get_asserted/2-[built_in]
    is_asserted/1-[built_in,checks if currently asserted]
    prolog:assert_it/2-[compiled]
    prolog:db_is_asserted/2-[compiled]
    prolog:is_asserted_clause/1-[compiled]
    prolog:x_assert/2-[compiled]
    prolog:x_assert_op/3-[compiled]
    x_asserta/1-[built_in,db hook, adds a clause to be first in a predicate definition]
    x_assertz/1-[built_in,db hook, adds a clause to be last in a predicate definition]
    
    yes
    
  366. hide_default/1 : makes unavailable a default value
  367. hkey/2 : computes hash code on atomic argument; fails on variables and compound terms
    EXAMPLE(S): 
    ?-hkey(t(a,b),_A).
    _A = 236945626;
    
    no
    ?-hkey(t(a,c),_A).
    _A = 236945625;
    
    no
    
  368. host/1 : assumes default host for Linda server
  369. host2ip/2 : converts a host name to an IP address
  370. hostname/1 : the name of current host, if detected, localhost if not
  371. hypot/3 : float function
  372. if_any/3 : (Cond,Then,Else): executes Cond; each time when Cond succeeds it also executes Then; if Cond never succeds it executes Else
  373. in/1 : waits to remove a term from Linda blackboard
  374. include/1 : includes/loads a file with current load method, unless it has already been included by the same method
  375. info/0 : generates info on predicates with examples
  376. info/1 : generates info and examples of use for predicate Pred/Arity
  377. init_gensym/1 : resets gensym for names based on arg 1
  378. init_io/0 : intialises fast C-based IO routines
  379. instance_of/2 : (Handle,Term): creates an internal instance of an external term given as a Handle
  380. integer/1 : true if an integer
  381. integer/2 : float to int cast
  382. interactive/1 : toggles interactive query answering/tracing with arg 1 = yes or no
  383. (is)/2 : calls the function evaluator, mostly for arithmetics
    EXAMPLE(S): 
    ?-_A is 3+4*2.
    _A = 11;
    
    no
    
  384. is_an/1 : true if an alphanumerical char code
  385. is_asserted/1 : checks if currently asserted
  386. is_builtin/1 : recognizes a predicate head as a builtin
    EXAMPLE(S): 
    ?-is_builtin(var(_A)).
    _A = _x61088;
    
    no
    
  387. is_compiled/1 : true if head of a compiled predicate
  388. is_discontiguous/1 : checks if a predicate has been declared as discontiguous
  389. is_dynamic/1 : checks if dynamic
  390. is_engine/1 : recognizes and integer as an engine handle
  391. is_interactive/0 : checks if toplevel is interactive - use interactive/1 with yes/no to set it the way you want it
  392. is_maj/1 : true if is an upper case char code
  393. is_min/1 : true if a lower case char code
  394. is_module/1 : recognizes/generates a module name
  395. is_num/1 : true if a digit char code
  396. is_prolog/1 : recognizes binprolog - useful for portability
  397. is_public/1 : checks predicate head if globally visible
  398. is_spec/1 : true if a spacial character code
  399. is_terminator/1 : true if a terminator character code
  400. keygroup/3 : sorts while grouping similar keys
    EXAMPLE(S): 
    ?-keygroup([3-a,1-a,2-b,1-c,2-d],_A,_B).
    _A = 1;
    _B = [a,c];
    
    _A = 2;
    _B = [b,d];
    
    _A = 3;
    _B = [a];
    
    no
    
  401. keysort/2 : sorts while putting similar keys one after the other in a list
    EXAMPLE(S): 
    ?-keysort([3-a,1-a,2-b,1-c,2-d],_A).
    _A = [1-a,1-c,2-b,2-d,3-a];
    
    no
    
  402. length/2 : generates/mesures length of a list
  403. less/2 : arithemetic comparison
  404. less_eq/2 : arithemetic comparison
  405. line_of/2 : (File,Line) reads a file to lines ending with eol - on backtracking
  406. list_engines/0 : prints out the list of active engines
  407. list_engines/1 : lists available engine handles
  408. listify/2 : (T,Cs): transforms T, unless it is already such, to list of chars
  409. listing/0 : lists current database
  410. listing/1 : lists given predicate if in current database
  411. listing/2 : lists predicate F of arity N if in current database
  412. load/1 : clean loads from a bytecode *.wam file
  413. load_engine/3 : load_engine(E,Goal,Answer) prepares engine E to execute Goal/Answer
  414. load_method/2 : args: Number, Name
    EXAMPLE(S): 
    ?-load_method(_A,_B).
    _A = 1;
    _B = mcompile;
    
    _A = 2;
    _B = scompile;
    
    _A = 3;
    _B = oconsult;
    
    _A = 4;
    _B = dconsult;
    
    _A = 5;
    _B = sconsult;
    
    _A = 6;
    _B = load;
    
    no
    
  415. local_all/2 : local_all(X,Xs) collects all facts matching X on the blackboard
  416. local_all/3 : local_all(X,G,Xs) collects facts X such that G on the blackboard
  417. local_cin/1 : removes a term if available on the local blackboard
  418. local_cout/1 : puts a term on local blackbord unless already there
  419. local_in/1 : waits for a term produced by a matching local_out/1
  420. local_out/1 : produces a term and possibly wakes up the thread at a matching local_in/1
  421. local_rd/1 : tests if a term is available on the local blackboard
  422. local_when/1 : waits until a term is available on the local blackboard
  423. lock_thread_guard/1 : locks thread guard created with new_thread_guard
  424. log/2 : float function
  425. log/3 : returns log in base arg 1 of arg 2, a float
    EXAMPLE(S): 
    ?-log(2,8,_A).
    _A = 3;
    
    no
    
  426. login/1 : assumes default (nick)name for user
  427. ls/0 : list files under Unix
  428. ls2list/2 : (Dir,Files): converts ls cmd output to list of files and dirs
  429. lval/3 : backtrackable: lval(K1,K2,V) associates V to keys K1 and K2
    EXAMPLE(S): 
    ?-lval(a,b,f(_A)).
    _A = _x61110;
    
    no
    
  430. main/0 : user defined optional startup predicate
  431. main/1 : default entry predicate, does both prolog_init/1 and prolog_run/1
  432. make_array/2 : creates an array
  433. make_cmd/2 : concatenates a list of strings and atomic elements into an atom
  434. make_cmd0/2 : concatenates a list of strings and atomic elements into a string
  435. make_compileable/2 : make_compilable(Files,File) rewrites Files as a canonical File with all predicates contiguous and no operators
  436. make_spaced_cmd/2 : concatenates a list of elements with inserted space separtors into an atom
  437. map/2 : maps a predicate with 1 arg to a list
    EXAMPLE(S): 
    ?-map(println,[10,20,30]).
    10
    20
    30
    
    yes
    
  438. map/3 : maps a predicate with 2 args to a list
    EXAMPLE(S): 
    ?-map(+1,[10,20],_A).
    _A = [11,21];
    
    no
    
  439. map_clear/1 : (D): empties and cleans up D
  440. map_gc/1 : (D): frees unused memory in D
  441. map_get/3 : (D,K,V): gets V, given K in map D, backtracks over K if K unbound
  442. map_key/2 : (D,K): succeds if K is known, otherwise finds V backtracks over each key K in D
  443. map_new/1 : (D): returns a new map handle D
  444. map_put/3 : (D,K,V): adds K,V to map D
  445. map_rm/2 : (D,K): removes key K from map D
  446. map_show/1 : (D): lists the content of a map
  447. maps_clean/0 : empties and cleans up all maps created with mmap_new
  448. maps_gc/0 : frees memory for all maps created with mmap_new
  449. maps_iterate/1 : (D): backtracks over map handles created with mmap_new D
  450. maps_show/0 : lists the content of all maps created with mmap_new
  451. match_before/4 : match_before(+Stop,-Word,I,O): matches a word with DCGs until a given delimiter is hit
  452. match_before/5 : match_before(+Stops,-Word,-Stop,I,O): matches a word with DCGs until a given delimiter set is hit, one of which is also returned
  453. match_word/3 : match_word(+Word,I,O): matches/consumes a word, in the conext of DCGs
  454. max/3 : (X,Y,Max): Max is the max of 2 numbers X, Y
  455. mcompile/1 : compile/1 variant: cleans up data areas and compiles to memory
  456. member/2 : (X,Xs): checks if an element X unifies with an element on a list Xs or generates sucessively longer lists if Xs is unbound or open ended
    EXAMPLE(S): 
    ?-member(2,[1,2]).
    
    yes
    ?-member(_A,[1,2]).
    _A = 1;
    
    _A = 2;
    
    no
    
  457. member_conj/2 : like member/2, for a comma separated conjunction, ending with true
    EXAMPLE(S): 
    ?-member_conj(_A,(a,b,true)).
    _A = a;
    
    _A = b;
    
    no
    
  458. member_scan/3 : finds first element without unifying to it
    EXAMPLE(S): 
    ?-member_scan(s(_A),[1,s(s(_B)),2],_C).
    _A = _x61111;
    _B = _x61121;
    _C = [s(s(_x61121)),2];
    
    no
    
  459. memberchk/2 : (X,Xs) checks if an X is a the list Xs
  460. merge_sort/3 : (Order,List,Sorted)
    EXAMPLE(S): 
    ?-merge_sort(>,[1,3,2,2,4],_A).
    _A = [4,3,2,2,1];
    
    no
    
  461. metacall/1 : calls the interpreter
  462. metatrue/0 : calls the interpreter on current continuation
  463. min/3 : (X,Y,Min): Min is the min of 2 numbers X, Y
  464. mmap_clear/1 : (D): empties and cleans up D
  465. mmap_gc/1 : (D): frees unused memory in D
  466. mmap_get/3 : (D,K,V): gets V, given K in mmap D, backtracks over K if K unbound
  467. mmap_key/2 : (D,K): succeds if K is known, otherwise finds V backtracks over each key K in D
  468. mmap_new/1 : (D): returns a new mmap handle D - a mmap holds multiple elements for each key
  469. mmap_push/3 : (D,K,V): adds K,V as the first element of mmap D
  470. mmap_put/3 : (D,K,V): adds K,V as the last element of mmap D
  471. mmap_rm/3 : (D,K,X): removes a term X attached to key K from mmap D and backtracks on each such term
  472. mmap_rm_all/2 : (D,K): removes all terms X attached to key K from mmap D
  473. mmap_rm_one/3 : (D,K,X): removes first term X attached to key K from mmap D
  474. mmap_show/1 : (D): lists the content of a mmap
  475. mmaps_clean/0 : empties and cleans up all mmaps created with mmap_new
  476. mmaps_gc/0 : frees memory for all mmaps created with mmap_new
  477. mmaps_iterate/1 : (D): backtracks over mmap handles created with mmap_new D
  478. mmaps_show/0 : lists the content of all mmaps created with mmap_new
  479. mod/3 : modulo
    EXAMPLE(S): 
    ?-mod(10,3,_A).
    _A = 1;
    
    no
    
  480. (mode)/1 : accepts mode declarations although we are not using them currently
  481. (module)/1 : starts a module
  482. (module)/2 : starts a module specifying a list of visible predicates
  483. modules/1 : returns a list of existing modules
  484. msort/2 : sorts and keeps duplicates
    EXAMPLE(S): 
    ?-msort([2,1,3,1,4,4,2],_A).
    _A = [1,1,2,2,3,4,4];
    
    no
    
  485. (multifile)/1 : states that clauses of a predicate can be in different files
  486. name/2 : bidirectional: converts atomic to/from list of chars
    EXAMPLE(S): 
    ?-name(hello,_A).
    _A = [104,101,108,108,111];
    
    no
    ?-name(_A,[98,121,101]).
    _A = bye;
    
    no
    
  487. namecat/4 : concatenates 3 names
    EXAMPLE(S): 
    ?-namecat(a,:,b,_A).
    _A = a:b;
    
    no
    
  488. near_match/2 : matches 2 lists of chars
  489. new_builtin/3 : sample 3 arg user added builtin - used for the C interface
  490. new_client/3 : from a (host,port) to a client
  491. new_engine/3 : new_engine(X,G,E) creates an engine E ready to execute goal G with answer X
  492. new_iterator/2 : (GroundKey,Iterator) gets an iterator to terms attached to ground key
  493. new_key_iterator/1 : (Iterator): returns an iterator over the set of external keys
  494. new_name/2 : returns a new name based on arg 1
  495. new_server/2 : opens on a port a new server
  496. new_service/3 : from (server,timeout) to a service
  497. new_term/2 : (Term,Handle): creates a new external Term and returns an integer Handle to it
  498. new_thread_guard/1 : returns a new free thread guard from pool
  499. nl/0 : writes a new line character
  500. nobbgc/0 : disables blackboard gc
  501. nogc/0 : disables heap gc
  502. nonvar/1 : true if currently instantiated
  503. (nospy)/1 : do not spy on Pred/Arity anymore
  504. (not)/1 : sound negation
  505. notepad/0 : calls notepad editor on last compiled file
  506. notify_about/1 : notifies a suspended matching wait_for(Term,Contraint), if Constraint holds, that Term is available
  507. notrace/0 : do not trace predicates when interpreted
  508. nth_answer/2 : (N,Goal) returns only the nth answer of Goal, if such an anser exists
  509. nth_member/3 : retrieves N-th element of a list
    EXAMPLE(S): 
    ?-nth_member(_A,[a,b,c],_B).
    _A = a;
    _B = 1;
    
    _A = b;
    _B = 2;
    
    _A = c;
    _B = 3;
    
    no
    
  510. number/1 : true if integer or float
  511. number_chars/2 : (Number,CharAtoms): converts between a number and its list of char atoms representation
    EXAMPLE(S): 
    ?-number_chars(1999,_A).
    _A = [1,9,9,9];
    
    no
    
  512. number_codes/2 : (Number,CharCodes): converts between a number and its list of char code representation
    EXAMPLE(S): 
    ?-number_codes(1999,_A).
    _A = [49,57,57,57];
    
    no
    ?-number_codes(_A,[50,48,48,49]).
    _A = 2001;
    
    no
    
  513. numbervars/3 : binds to $VAR(I) with I over distinct integers variables in a term
  514. oconsult/1 : reconsult/1 variant: consults/compiles based on db_ratio and overwrites old clauses
  515. older_file/2 : true if arg 1 is a file older than arg 2
  516. on_undefined/1 : (Goal): defines handler for undefined predicates matching Goal
  517. once/1 : executes once, with no backtracking
  518. one/4 : one(Recognizer,Result): DCG based regexp processor for exactly one Recognizer
  519. op/3 : op(Pri,A,Op) defines an operator Op of priority Pri and associativity A
  520. open/3 : returns a stream (arg 3) on a file (arg 1) in read/write/append mode (arg 2)
  521. open_engine/3 : open_engine(G,X,E) creates an engine E ready to execute goal G with answer X
  522. open_stream/4 : (Type,FileOrCmd,ReadWriteAppend,?StreamID) opens various streams
  523. otherwise/0 : always succeeds
  524. otime/1 : gets time in secs from arbitrary origin to start
    EXAMPLE(S): 
    ?-otime(_A).
    _A = 343416141;
    
    no
    
  525. out/1 : puts a term on Linda server or trigers resumption of a matching in/1 waiting for this data
  526. override/3 : overrides a compiled predicate - to be used with care
  527. password/1 : assumes default password for user
  528. pc/0 : pushes code compiled into the workspace to the persistent kernel
  529. pclose/1 : closes a pipe generated stream
  530. pcollect/2 : collects output from a command to a list of char codes
  531. peer_addr/2 : gets address of peer connected to socket
  532. peer_port/2 : gets port of peer connected to socket
  533. phrase/2 : (Axiom, ?InputChars): DCG evaluator, starting from Axiom, consuming/producing InputChars
  534. phrase/3 : (Axiom, ?InputChars, ?OutputChars): DCG evaluator, staring from Axiom
    EXAMPLE(S): 
    ?-phrase(([a],[b]),[a,b|_A],_A).
    _A = _x61093;
    
    no
    
  535. pico/0 : calls pico editor on last compiled file
  536. plus/4 : plus(Recognizer,Result): DCG based plus regexp processor for (Recognizer)+
  537. popen/3 : popen(Cmd,read/write,Stream) opens Stream using a pipe from/to process executing Cmd
  538. port/1 : assumes default port for Linda server
  539. portray_clause/1 : pretty prints a clause
  540. pow/3 : (Base,Expo,Val) computes power function
    EXAMPLE(S): 
    ?-pow(2,3,_A).
    _A = 8;
    
    no
    
  541. pp_clause/1 : prints out a clause with some care on how it looks
  542. pp_term/1 : pretty prints a term
  543. predicate_property/2 : returns a property of a predicate
    EXAMPLE(S): 
    ?-predicate_property(write(_A),_B).
    _A = _x61092;
    _B = built_in;
    
    no
    
  544. print/1 : variant of write/1
  545. println/1 : synchronized printing of a term on a line
  546. process_term/3 : (OpCode,Input,Output): applies various user defined C functions to external terms
  547. prod/2 : (List, ?Result): product of a list
    EXAMPLE(S): 
    ?-prod([10,20],_A).
    _A = 200;
    
    no
    
  548. profile/0 : in specialy compiled profiler mode prints out info accumulated so far
  549. prolog_flag/2 : (Flag,Value): retrieves the value of a Prolog flag
  550. prolog_init/1 : runs more command line args representing prolog goals
  551. prolog_load/1 : loads code and/or executes first command line arg
  552. prolog_run/1 : starts main/0 if defined, otherwise toplevel/0
  553. (public)/1 : declares globally visible predicate Name/Arity
  554. push_code/1 : moves code compiled in workspace to kernel and returns top of code area - used by pc/0
  555. push_term/2 : (GroundKey,Term): attaches a term to a ground key in constant time as a the first element
  556. pushq/3 : adds to beginning of persistent queeue
    EXAMPLE(S): 
    ?-pushq(key1,key2,f(_A,_A)).
    _A = _x61094;
    
    no
    
  557. put/1 : writes and ascii code as a char
    EXAMPLE(S): 
    ?-put(99).
    c
    yes
    
  558. put_char/2 : (Stream,CharAsOneLetterConstant): outputs a char to a stream -ISO Prolog
  559. put_code/1 : ISO char code writer
    EXAMPLE(S): 
    ?-put_code(99).
    c
    yes
    
  560. put_code/2 : outputs a char code to a stream - ISO
  561. put_critical/2 : (Guard,Data): updates mutex Guard-protected Data on blackboard
  562. put_term/2 : (GroundKey,Term): attaches a term to a ground key in constant time as the last element
  563. pwd/0 : shows current dir
  564. pwd/1 : returns current dir as a list of chars
  565. qcompile/1 : compile/1 variant: compiles a file to memory after pushing current user code to kernel - where it becomes read only
  566. qmake/1 : compiles Project to fast C code - for packaging as standalone executable
  567. qmake/2 : (Project,Module): compiles to fast C code a project in Module: uses set_threshhold(12,60) before dooing cmake/2, for a good speed/code size ratio
  568. qprint/1 : prints out a clause such that a variant of it can be always read back
  569. quiet/1 : gets/sets level of "quietness"
  570. quietmes/1 : writes message if in low quietness mode
  571. quietmes/2 : writes message if quietness is lower than arg 1)
  572. quit/0 : same as halt
  573. random/1 : returns a random integer
    EXAMPLE(S): 
    ?-random(_A).
    _A = 1457;
    
    no
    
  574. random_seed/1 : initializes random/1 with an integer, uses clock if 0
  575. rd/1 : reads a term matching arg 1 from Linda blackboard
  576. read/1 : reads a term
  577. read_chars/1 : reads to a list of ascii codes
  578. read_line/1 : reads a line into a constant
  579. read_term/2 : reads a term and also a list of variable-name associations
  580. read_term_from_chars/2 : reads a term from a list of char codes
    EXAMPLE(S): 
    ?-read_term_from_chars([102,40,88,44,88,44,89,44,89,41],_A).
    _A = f(_x62944,_x62944,_x62995,_x62995);
    
    no
    
  581. read_term_from_chars/3 : reads a term with variable names from a list of char codes
    EXAMPLE(S): 
    ?-read_term_from_chars([102,40,88,44,88,44,89,44,89,41],_A,_B).
    _A = f(_x63012,_x63012,_x63063,_x63063);
    _B = [X = _x63012,Y = _x63063];
    
    no
    
  582. read_terms_from_chars/2 : (Chars,Clause): backtracks over Clause(s) parsed from a list of char codes
  583. read_terms_from_chars/3 : (Chars,Clause,VarsInClause): backtracks over Clause(s) parsed from a list of char codes
    EXAMPLE(S): 
    ?-read_terms_from_chars([98,40,88,44,89,41,58,45,97,40,89,44,88,41,46,32,97,40,49,44,49,41,46,32,97,40,95,44,50,41,46,32],_A,_B).
    _A = (b(_x64809,_x64837) :- a(_x64837,_x64809));
    _B = [X = _x64809,Y = _x64837];
    
    _A = a(1,1);
    _B = [];
    
    _A = a(_x64408,2);
    _B = [_ = _x64408];
    
    no
    
  584. read_words/1 : reads a line into a list of words
  585. reboot/0 : regenerates BinProlog from its sources
  586. reconsult/1 : applies current consult method to file given as arg 1, set db_ratio/1 for specifying dynamic recompilation of heavily used interpreted code
  587. remote_run/1 : runs Goal on remote server using default password
  588. remote_run/3 : (Host,Port,Goal): runs Goal on rmote server at Host, Port with default password
  589. remote_run/6 : (Host,Port,Answer,Goal,Password,Reply): runs Goal on server at Host, Port with given Password and returns Reply. However, if you do let(where,here) before calling it, a local goal is called instead.
  590. remove_current_term/1 : (Iterator) removes current term attached to an iterator
  591. repeat/0 : backtracks until its continuation succeeds; defined as repeat. repeat:-repeat.
  592. restart/0 : cleans up data areas and reinitializes symbol tables
  593. retract/1 : backtracks over deleting matching clauses
  594. retract1/1 : deletes first matching clause in the current database
  595. retractall/1 : deletes all matching clauses
  596. return/1 : returns data from an engine as if it were an answer - such that the engine can be resumed with get/2 to execute the next goal
  597. return0/1 : returns a term from an engine left in a state ready to resume
  598. reverse/2 : reverses a list
    EXAMPLE(S): 
    ?-reverse([a,b,c],_A).
    _A = [c,b,a];
    
    no
    
  599. round/2 : float to int function
    EXAMPLE(S): 
    ?-round(1.51,_A).
    _A = 2;
    
    no
    
  600. rpc/1 : (Query): calls server on current local reusable socket
  601. rpc/3 : (Answer,Goal,Result): calls server on local reusable socket and gets back Result as the(Answer) or no
  602. rpc_handler/1 : (Goal): user-defined rpc handler - filters/calls Goal received on server
  603. rpc_server/0 : runs Jinni compatible server with socket reuse on default port
  604. rpc_server/2 : Port,Password: runs Jinni compatible server with socket reuse
  605. rpc_server/3 : Port,Password,Timout: runs Jinni compatible server with socket reuse
  606. rpc_test/0 : tests rpc server and client with socket reuse
  607. rpc_test/1 : tests rpc client with socket reuse for a given number of operations
  608. rtime/1 : gets elapsed real time in secs
    EXAMPLE(S): 
    ?-rtime(_A).
    _A = 0;
    
    no
    
  609. run_server/0 : runs foreground server on localhost (default port) for Jinni clients
  610. run_server/1 : runs foreground server on Port to provide services to Jinni clients
  611. run_server/2 : (Port,Password): runs server on Port, Password required from clients
  612. run_server/6 : (Port,Password,Heap,Stack,Trail,Timeout): runs server with specified service parameters
  613. scompile/1 : smart compile/1 variant: if the *.wam file is newer reloads, otherwise fcompiles first
  614. sconsult/1 : reconsult/1 variant: cleans up data areas consults, makes all static
  615. sdebug/1 : emits mt-safe synchronized debug message
  616. see/1 : focuses input on a file
  617. see_at/1 : seeks a seekable file at a give offset (in bytes)
  618. see_or_fail/1 : opens a file if it exists, otherwise fails
  619. seeing/1 : gets file name opened and set by see/1
  620. seeing_at/1 : retrieves position in current file opened by see/1
  621. seen/0 : close file opened by see/1
  622. sentence_of/2 : reads a natural language file to a sentence built as a list of words - on backtracking
  623. sentence_of/3 : (File,Ends,Sent) reads a file to a sentence separated by Ends - on backtracking
  624. service_loop/2 : ServiceSocket,Password:starts service loop on reusable ServiceSocket - works on server side with server/2
  625. set_bp_error/4 : (Id,Mes,Arg1,Arg2): notifies emulator about error condition
  626. set_c_threshold/1 : related to C generator: sets length K of WAM instruction block such that block larger than K will get compiled to C code
  627. set_c_threshold/2 : (Min,Max): related to C generator: sets Min,Max length of WAM instruction block such that blocks between Min and Max size will get compiled to C code
  628. set_db/1 : sets the name of active database for dynamic code
  629. set_default/1 : asserts arg 1 as default state for use by default/2
  630. set_hash_max/1 : Set the range of values from -1 to -Max, that should be a prime number, defaults to 1999
  631. set_host/1 : asserts IP adress or name of server host we want to talk to
  632. set_input/1 : sets current input stream
  633. set_lineno/1 : sets line number counter in current file - use with care
  634. set_load_method/1 : sets the current load method by name
  635. set_login/1 : asserts default (nick)name for user
  636. set_output/1 : sets current output stream
  637. set_password/1 : sets default password for user
  638. set_port/1 : asserts port number of the server we want to talk to
  639. set_prolog_flag/2 : (Flag,Value): sets the value of a Prolog flag
  640. set_this_host/1 : asserts IP adress or name of this machine
  641. set_this_port/1 : asserts default port for to work as a server on
  642. set_timeout/1 : asserts default timeout
  643. setarg/3 : backtrackable: setarg(I,T,X) replaces arg I of T with X
    EXAMPLE(S): 
    ?-setarg(2,f(a,b),c).
    
    yes
    
  644. setof/3 : all solutions predicate generating sorted sets of unduplicated answers
    EXAMPLE(S): 
    ?-setof(_A,member(_A,[3,2,2,1]),_B).
    _A = _x61091;
    _B = [1,2,3];
    
    no
    
  645. shell/1 : passes a command to the OS
  646. show_default/1 : makes available a default value
  647. show_defaults/0 : show default values of some system variables
  648. show_engine/0 : if debugmes/1 is on (as with quiet(1)), shows params of current engine
  649. show_info/2 : generates components of info/1 output
  650. sign/2 : int function
  651. sin/2 : float function
  652. skip_until/2 : findall variant
  653. skip_when/2 : findall variant
  654. sleep/1 : waits arg 1 seconds
  655. sock2file/2 : reads from a socket, to a file
  656. sock_read/2 : reads from a socket when size of the data is described by int before chars to be read
  657. sock_read/3 : reads from a socket, a string
  658. sock_readln/2 : reads from a socket until an end of line LF (ascii 10) or char 0 is found and discards possible previous CR (ascii13)
  659. sock_readln/3 : reads from a socket, a line
  660. sock_write/2 : writes a string to a socket prefixed by its lenght
  661. sock_write/3 : writes to a socket, a string
  662. sock_writeln/2 : writes a string to a socket and adds an ascii 10 to the end
  663. sock_writeln/3 : writes to a socket, a line
  664. solutions/2 : (GX,Xs): adds (last) output arg X to closure G then works like findall(X,GX,Xs)
    EXAMPLE(S): 
    ?-solutions(argn(_A,f(a,b,c)),_B).
    _A = _x61092;
    _B = [a,b,c];
    
    no
    
  665. sort/2 : sorts and removes duplicates
    EXAMPLE(S): 
    ?-sort([2,1,3,1,4,4,2],_A).
    _A = [1,2,3,4];
    
    no
    
  666. spawn/1 : spawns Goal in a new bp window on W95/NT PC and Unix/X
  667. spawn/3 : spawns(Goal,Includes,TempFile): spawns a new bp window
  668. (spy)/1 : set spy point on goal, triggering trace when interpreted
  669. spying/1 : checks what we are spying
  670. sqrt/2 : returns square root of arg 1, a float
    EXAMPLE(S): 
    ?-sqrt(2,_A).
    _A = 1.41421356;
    
    no
    
  671. sread/2 : reads a term from a string (atom)
  672. sread/3 : reads a term and a list of vars from a string (atom)
    EXAMPLE(S): 
    ?-sread(f(X,Y),_A,_B).
    _A = f(_x62165,_x62193);
    _B = [X = _x62165,Y = _x62193];
    
    no
    
  673. star/4 : star(Recognizer,Result): DCG based star regexp processor for (Recognizer)*
  674. start_rpc/0 : starts rpc client on default local reusable socket and port
  675. start_rpc/3 : (Host,Port,Password): starts rpc client on local reusable socket
  676. stat/0 : short hand for statistics
  677. stat2dyn/1 : stat2dyn(H): reverts to uncompiled representation for a predicate with head H
  678. stat2dyn/2 : stat2dyn(Db,H): reverts to uncompiled representation for a predicate in database Db with head H
  679. static_prolog_flag/2 : contains read-only Prolog flag values
  680. statistics/0 : shows info about data areas
    EXAMPLE(S): 
    ?-statistics.
    runtime=[421,156]
    global_stack=[245064,1819260]
    local_stack=[244,260864]
    trail=[33684,227432]
    code=[260404,788156]
    strings=[246,1048330]
    symbols=[13028,249116]
    htable=[113988,672444]
    bboard=[24988,497248]
    gctime=[0,0]
    realtime=[0,343416141]
    
    yes
    
  681. statistics/2 : returns info about data areas
    EXAMPLE(S): 
    ?-statistics(_A,_B).
    _A = runtime;
    _B = [421,0];
    
    _A = global_stack;
    _B = [245600,1818724];
    
    _A = local_stack;
    _B = [228,260880];
    
    _A = trail;
    _B = [33704,227412];
    
    _A = code;
    _B = [260404,788156];
    
    _A = strings;
    _B = [246,1048330];
    
    _A = symbols;
    _B = [13028,249116];
    
    _A = htable;
    _B = [113988,672444];
    
    _A = bboard;
    _B = [24988,497248];
    
    _A = gctime;
    _B = [0,0];
    
    _A = realtime;
    _B = [0,343416141];
    
    no
    
  682. stop/0 : exits thread or process
  683. stop/1 : stops and frees resources held by an engine (may happen automaticaly if an engine fails)
  684. stop_rpc/0 : stops rpc client on local reusable socket
  685. stop_service/0 : stops server with socket reuse - acts on the server side
  686. subsumes_chk/2 : checks if arg 1 is subsumed by arg 2, after renaming vars
  687. sum/2 : (List,?Result): sum of a list
    EXAMPLE(S): 
    ?-sum([10,20],_A).
    _A = 30;
    
    no
    
  688. swap_cont/2 : calls arg 1 as cc and returns cc in arg 2
  689. swrite/2 : writes a term to a string (atom)
  690. swrite/3 : writes a term with a liste of vars to a string (atom)
  691. symcat/3 : makes new identifier from arg 1 and arg 2
    EXAMPLE(S): 
    ?-symcat(a,b,_A).
    _A = a_b;
    
    no
    ?-symcat(a,1,_A).
    _A = a_1;
    
    no
    
  692. synchronize/1 : wraps Goal in arg 1 for serialized execution
  693. synchronize/2 : wraps Goal for serialized execution and returns true or fail
  694. synchronize_on/2 : wraps Goal for sync on given mutex for serialized execution
  695. synchronize_on/3 : wraps Goal for sync on given mutex for serialized execution and returns true or fail
  696. system/1 : passes a command to the OS
  697. system/2 : passes a command to the OS and gets back return code
  698. tab/1 : outputs N blanks
  699. take_at_most/2 : (N,Goal) computes at most N answers of Goal
  700. tan/2 : float function
  701. tell/1 : focuses output on a file
  702. tell_at/1 : moves output file pointer to a given offset (in bytes)
  703. tell_at_end/1 : focuses output on file opened in append mode
  704. telling/1 : gets file name opened and set by tell/1
  705. telling_at/1 : retrieves output file position (in bytes)
  706. term_append/3 : efficiently concatenates 2 terms
    EXAMPLE(S): 
    ?-term_append(f(a,b),g(c,d),_A).
    _A = f(a,b,c,d);
    
    no
    
  707. term_chars/2 : (Term,Chars): converts between a term and its list of char code representation
    EXAMPLE(S): 
    ?-term_chars(f(a,b),_A).
    _A = [102,40,97,44,98,41];
    
    no
    ?-term_chars(_A,[102,40,97,44,98,41]).
    _A = f(a,b);
    
    no
    
  708. term_codes/2 : (Term,Chars): converts between a term and its list of char code representation
    EXAMPLE(S): 
    ?-term_codes(f(a,b),_A).
    _A = [102,40,97,44,98,41];
    
    no
    ?-term_codes(_A,[102,40,97,44,98,41]).
    _A = f(a,b);
    
    no
    
  709. term_decoder/2 : (Encrypted,Plain): user provided encoder for secure communications - works on lists of ascii codes
  710. term_encoder/2 : (Plain,Encrypted): user provided decoder for secure communications - works on list of ascii codes
  711. term_expansion/2 : can be used to define a hook into the default DCG expansion mechanism
  712. term_hash/2 : computes hash code on terms ground up to depth 64; fails if something is unbound or the limit is reached
    EXAMPLE(S): 
    ?-term_hash(t(a,b),_A).
    _A = 236945626;
    
    no
    ?-term_hash(t(a,c),_A).
    _A = 236945625;
    
    no
    
  713. term_of/2 : reads a Prolog file to a set of terms - on backtracking
  714. term_store_op/4 : API for external term storage
  715. textedit/0 : calls texedit editor on last compiled file
  716. the/1 : defined as the(G):-the(G,G)
  717. the/2 : defined as the(X,G):-the(X,G,the(X))
  718. the/3 : the(X,G,R) first answer R=the(X) or R=no, without binding G
  719. this_db/1 : same as current_db, returns the current database
  720. this_engine/1 : gets a handle to the current engine
  721. this_host/1 : assumes default IP adress or name this machiner
  722. this_port/1 : assumes default port for to work as a server on
  723. thread_cancel/1 : terminates (cancels) thread given in arg 1
  724. thread_exit/0 : exits a thread
  725. thread_exit/1 : exits a thread
  726. thread_join/1 : joins thread
  727. thread_notify/1 : notifies a thread waiting on guard with thread_wait
  728. thread_notify_all/1 : notifies all threads waiting on guard with thread_wait
  729. thread_resume/1 : resumes execution of suspended thread
  730. thread_suspend/1 : suspends execution of thread
  731. thread_timed_wait/2 : waits on first arg Guard second arg msec or until notified
  732. thread_wait/1 : waits on guard until notified by thread_notify
  733. throw/1 : ISO Prolog exception operator: throws a term to be caught by a matching catch
  734. throw_with_cont/2 : works for throw/1: used to rethrow with new continuation
  735. timed_call/4 : (Answer,Goal,Timeout,Result) - calls and possibly stops Goal after Timout secs
  736. timeout/1 : assumes default timeout
  737. to_engine/2 : (E,T) sends to engine E a term T, and fails if E has an empty message box
  738. to_lower_char/2 : (Upper,Lower): converts a char to lower case
  739. to_lower_chars/2 : converts a list of chars to lower case
  740. to_string/2 : converts a term to a string constant (in paricular, converts numbers to strings)
    EXAMPLE(S): 
    ?-to_string(13,_A).
    _A = 13;
    
    no
    ?-to_string(3.14,_A).
    _A = 3.14;
    
    no
    ?-to_string(f(_A,_A),_B).
    _A = _x61099;
    _B = f(_x61099,_x61099);
    
    no
    
  741. to_tokens/2 : to_tokens(Codes,PrologTokens)
  742. to_upper_char/2 : (Lower,Upper): converts a char to upper case
  743. to_upper_chars/2 : converts a list of chars to upper case
  744. to_word_codes/2 : to_word_codes(Codes,ListOfWordCodes)
  745. to_words/2 : to_words(Codes,NaturalLanguageWords
  746. token_of/2 : reads a Prolog file to a set of tokens - on backtracking
  747. tokens_of/2 : reads a Prolog file to a slist of tokens
  748. told/0 : closes file opened by tell/1
  749. topcall/1 : calls arg 1 as if it were entered by the user at Prolog prompt
  750. toplevel/0 : interactive toplevel Prolog loop
  751. topstep/1 : interactive toplevel Prolog step
  752. trace/0 : trace all predicates when interpreted
  753. trace/1 : traces execution of a goal
  754. trim_term/4 : trim_term(D,Filler,T,NewT) replaces subterms of T deeper than D with Filler
  755. true/0 : always succeeds
  756. truncate/2 : float to int function
    EXAMPLE(S): 
    ?-truncate(1.51,_A).
    _A = 1;
    
    no
    
  757. try_unlock_thread_guard/1 : try to unlock a thread guard
  758. try_unlock_thread_guard/2 : try to unlock a thread guard for a specified timeout
  759. tstest/3 : (K,V,R): performs various tests with external terms
  760. tsync_op/3 : same as thread_operation(Op, MutexOrParam, ActionOrValue) various thread synchronization operations
  761. ttyprin/1 : writes to terminal
  762. ttyprint/1 : writes to terminal with a new line
  763. unix/1 : executes various Unix commands
  764. unix_access/2 : checks if arg1 (a path+file) is accessible in arg 2 (integer) mode
  765. unix_argc/1 : gets cmd line arg counter
    EXAMPLE(S): 
    ?-unix_argc(_A).
    _A = 2;
    
    no
    
  766. unix_argv/1 : gets the list of cmd line args from 1 to argc
    EXAMPLE(S): 
    ?-unix_argv(_A).
    _A = [helpgen.pro];
    
    no
    
  767. unix_argv/2 : gets a cmd line arg from 0 to argc
    EXAMPLE(S): 
    ?-unix_argv(0,_A).
    _A = bp;
    
    no
    
  768. unix_cat/1 : prints a file to user terminal
  769. unix_cd/1 : changes local dir to arg 1
  770. unix_fork/1 : starts child process with Unix fork
  771. unix_getenv/2 : gets an environment variable
  772. unix_kill/2 : sends signal arg 1 to process with pid arg 2
  773. unix_pid/1 : returns process id of current process
  774. unlock_thread_guard/1 : unlocks thread guard
  775. untrail_to/1 : unwinds the trail up to a choice point
  776. update_current_term/2 : (Iterator,NewTerm): replaces current term of an iterator
  777. user_error/2 : writes basic error message and fail
  778. var/1 : true if currently an unbound variable
  779. variant_of/2 : checks if args are the same up to a renaming of vars
  780. vars_of/2 : (Term,Vars): lists free vars of a term
    EXAMPLE(S): 
    ?-vars_of(f(_A,t(_A,_B,_C),_C),_D).
    _A = _x61092;
    _B = _x61097;
    _C = _x61094;
    _D = [_x61092,_x61097,_x61094];
    
    no
    
  781. vget/2 : gets a VSHARE declared C data object in a term like int(N),F/N or var(V)
  782. vget0/2 : gets the type and value of a C word
  783. vget_int/2 : gets a VSHARE defined int C variable to a 28 bit int
  784. vget_int0/2 : gets from arg 1 - an int* C variable - to a 28 bit int
  785. vi/0 : calls vi editor on last compiled file
  786. vread/2 : reads HDEFI or HDEFS defined C constant into a Prolog integer or atom
  787. vset/2 : sets a VSHARE declared C data object in a term like int(N),F/N or var(V)
  788. vset_int/2 : sets a VSHARE defined int C variable to a 28 bit int
  789. vset_int0/2 : sets arg 1 - an int* C variable - to a 28 bit int
  790. wait_for/2 : wait_for(Term,Constraint) waits for a term on the blackboard, such that Constraint holds
  791. while/2 : (Cond,Goal): findall variant which explores alternative answers for Goal, while Cond holds,
  792. words_code/2 : generates a code ready to print, one a t a time with put/1 from a list of words
  793. write/1 : writes to current output stream set with tell/1, defaults to - Prolog's stdio
  794. write_chars/1 : writes a list of ascii codes
    EXAMPLE(S): 
    ?-write_chars([104,101,108,108,111]).
    hello
    yes
    
  795. write_term_to_chars/2 : writes a term to a list of char codes
    EXAMPLE(S): 
    ?-write_term_to_chars(f(_A,_A,_B,_B),_C).
    _A = _x61095;
    _B = _x61097;
    _C = [102,40,95,120,54,49,48,57,53,44,95,120,54,49,48,57,53,44,95,120,54,49,48,57,55,44,95,120,54,49,48,57,55,41];
    
    no
    
  796. write_term_to_chars/3 : writes a term with variables names to a list of char codes
    EXAMPLE(S): 
    ?-write_term_to_chars(f(_A,_B),[X = _A,Y = _B],_C).
    _A = _x61098;
    _B = _x61099;
    _C = [102,40,39,88,39,44,39,89,39,41];
    
    no
    
  797. write_words/1 : write list of words to a space separated line
  798. writeq/1 : variant of write which quotes if needed, so that term is read back correctly/1
  799. x_abolish/1 : db hook, deletes all matching clauses and unmarks the clause as dynamic
  800. x_asserta/1 : db hook, adds a clause to be first in a predicate definition
  801. x_assertz/1 : db hook, adds a clause to be last in a predicate definition
  802. x_clause/2 : db hook, clause(H,B) generates a clause with head matching H and body B
  803. x_consult/1 : db hook, consults with possible duplication of clauses
  804. x_dynamic/1 : db hook, states that a predicate can be updated
  805. x_gc/0 : db hook, recovers memory used by the database
  806. x_is_dynamic/1 : db hook, checks if dynamic
  807. x_listing/0 : db hook, lists given predicate if in current database
  808. x_listing/1 : lists predicate F of arity N if in current database
  809. x_profile/0 : db hook, shows the result of profiling compiled predicates
  810. x_retract/1 : db hook, backtracks over deleting matching clauses
  811. x_retractall/1 : db hook, deletes all matching clauses
  812. x_trace/1 : traces and profiles predicates, in combination with x_profile
  813. x_trace/2 : db hook, internal
  814. x_traced_call/1 : traces calls if compile-time x_trace triggers it
  815. xload/1 : xload(File) loads clauses to the current database, from a binary File
  816. xsave/1 : xsave(File) saves all the clauses of the current database to a binary File
  817. ~ /1 : short hand for reconsult