Amzi! Prolog User's Guide & Reference
Index Contents
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
- Numbers and Math: - X Numbers and Math: X - Y !/0 #define % & & gt & lt > Numbers and Math: Mathematical Comparisons Numbers and Math: X > Y >> >= Numbers and Math: Mathematical Comparisons Numbers and Math: X >= Y < Numbers and Math: Mathematical Comparisons Numbers and Math: X < Y << * ** ,/2 / /**/ // /\ : :- :-dynamic/1 :-indexed/1 :-sorted/1 ;/2 ?/1 @>/2 @>=/2 @</2 @=</2 [] \ \/ \+/1 \= \==/2 _ | ~= + = Numbers and Math: Mathematical Comparisons Manipulating Terms: X = Y =& =& lt =< Numbers and Math: Mathematical Comparisons Numbers and Math: X =< Y =../2 =/ =/= =: =:= Numbers and Math: Mathematical Comparisons Numbers and Math: X =:= Y =\= ==/2 A
abolish abs acmp Compiler Quick Overview: Compiler Compiler: Running from the Command-Line Compiler: Running from the IDE acos add Quick Tutorial: Using the Listener Listener Addition alias Input and Output: open(FILE, MODE, ID, OPTIONS) Input and Output: Stream Properties Input and Output: Streams alis Quick Tutorial: Consulting a Source File Listener Quick Overview: Listener/Debugger Quick Tutorial: Starting the Listener Quick Tutorial: Using the Listener almost equal alnk Linker: Libraries Quick Overview: Linker Linker: Running from the Command-Line Linker: Running from the IDE Linker Amzi! Runtime and And Anonymous Variables aolsutil.lsx apitrace Amzi! Runtime: Configuration Parameters Debugging Your Programs: Tracing LSAPI Calls append arg/3 Argument Getting Argument Setting arguments, command line Arithmetic Comparisons Arity arun Amzi! Runtime Distributing Your Programs O.S. Extended Predicates Quick Overview: Stand-Alone Runtime Amzi! Runtime: Running arun from the Command-Line asin assert assert/1 asserta/1 assertz/1 Associativity at_end_of_stream/1 atan atom Atom Generation atom/1 atom_chars/2 atom_codes/2 atom_concat/3 atom_length/2 atom_uplow/2 atomic/1 atomlist_concat/2 Atoms Prolog Terms Numbers and Math: Built-in Atoms avoiding unification B
backtracking in I/O Backtracking Search Prolog Execution Prolog Execution: Flow-of-Control bagof bagof/3 Bill of Materials, DCG binary binary I/O binary input binary output Binding Bit Arithmetic body Body Prolog Execution: Clauses Prolog Logicbase: clause(HEAD, BODY) bounded Box Model Debugger Debugger break Breakpoints bug/1 bugclose/0 buginit/0 buginit/1 Built Built- Built-In Built-In Atoms built_in C
C ++ call Debugger: Box Model Debugger: Box Model Call Debugger: Display Debugger: Display call/1 catch catch/3 ceiling cfg Files Quick Overview Amzi! Runtime: Configuration Parameters Amzi! Runtime: Configuration Files Amzi! Runtime: Default.cfg Values char char/1 char_code/2 char_conversion Character Lists character lists character sets chdir O.S. Extended Predicates: chdir(DirL) O.S. Extended Predicates: chdir(DirL, Err) CJK characters clause clause/2 Clauses Listener: Adding and Removing Clauses Prolog Execution Compiler: Complex Clauses Debugger: Display Debugger: Display Prolog Directives: Discontiguous Directive Prolog Directives: Dynamic Clauses in Compiled Code Listener: Listing Clauses Prolog Directives: Multifile Directive Listener: Removing Clauses Prolog Logicbase: abolish(M:F/A) Prolog Logicbase: asserta(TERM) Prolog Logicbase: assert(TERM) Prolog Logicbase: assertz(TERM) Prolog Logicbase: clause(HEAD, BODY) Listener: replace Prolog Logicbase: retractall(TERM) Prolog Logicbase: retract(TERM) close close/1 closelog Debugger: Logging Debugging Your Programs: Logging closelog/0 cntr_dec/2 cntr_get/2 cntr_inc/2 cntr_set/2 Command-Line Amzi! Runtime: Running arun from the Command-Line Compiler: Running from the Command-Line Linker: Running from the Command-Line Command Language, DCG command line arguments command_line/1 Comments Compare Terms compare/3 compareq/3 Compiler Compiler Quick Overview Compiler: Running from the Command-Line Compiler: Running from the IDE Compiling Compiler: Advantages Compiler: Errors Compiler: Messages Quick Tutorial Compiler: Complex Clauses Compiler: Complex Predicates Compiler: Disadvantages Prolog Directives: Discontiguous Directive Prolog Directives: Dynamic Clauses in Compiled Code Quick Overview: Intermixing Interpreted and Compiled Code Prolog Directives: Latent Expressions Prolog Directives: Multifile Directive Compiler: Requirements Complement Complex Goals Components Quick Overview Quick Overview: Relationship of Files and Components compound/1 concatenation Atoms, Lists and Strings: atomlist_concat(AtomList, Atom) Atoms, Lists and Strings: stringlist_concat(StringList, String), stringlist_concat(StringList, Separator, String) Configuration Files Configuration Flags console Constants Constructing Terms consult Listener: Consulting Prolog Source Files Quick Tutorial: Modules Quick Tutorial: Running a Modular Application consult/1 Consulting User continued fractions Numbers and Math: Continued Fractions Numbers and Math: Mathematical Games control Control System Predicates: pro_control(Top, Pos) System Predicates: stack_sizes(Heap, Control, Local, Trail) copy_term/2 copying terms cos Counters cputime Numbers and Math: Built-in Atoms System Predicates: timer(Ticks) Creating Terms Creep Debugger: Box Model Debugger: Box Model Debugger: Example Debugger: Example Debugger: Debug Port Options curdir current_input/1 current_module/1 current_op/3 current_output/1 current_predicate/1 current_prolog_flag current_prolog_flag/2 Cut D
data types date/3 DCG DCG Applications DCG Syntax DCG Terminals debug Amzi! Runtime: Flags Listener Debugger Quick Overview Quick Overview: Listener/Debugger Debugger: Source Code Debugger Debugger: Command-Line Debugger Listener: debug Debugging Debugger: Example Debugger: Example Quick Tutorial Debugging Your Programs: Tracking LSAPI Errors Debugging Your Programs Debugging Your Programs: Logging Debugging Your Programs: catch and throw debugging predicates decimal numbers decimal_places Decomposing Terms default streams define defined_in Definite Clause Grammar degtorad delfile Delphi delta delta (flag) Depth destbuf Difference Lists Difference Lists, Applications Difference Lists, Generating Difference Lists, Parsing Directives Compiler Preprocessor Directories Disconnect discontiguous Compiler: Directives Prolog Directives: Discontiguous Directive display/1 Dissecting Terms Distributing Quick Tutorial: Distributing an Application Distributing Your Programs Distributing Your Programs: Redistributable Files Division Numbers and Math: X // Y Numbers and Math: X divs Y Numbers and Math: X divu Y Numbers and Math: X / Y divs divu dll Files double precision double_float double_float/1 double_quote_strings Amzi! Runtime: Flags Prolog Terms: Strings Duck World Quick Tutorial: Compiling Quick Tutorial: Consulting a Source File Quick Tutorial: Creating a Source File Quick Tutorial: Debugging Quick Tutorial: Distributing an Application Quick Tutorial Quick Tutorial: Linking and Running Quick Tutorial: Modules Quick Tutorial: Running a Modular Application Quick Tutorial: Using Projects in the IDE Quick Tutorial: Using the Listener dynamic Compiler: Directives Prolog Directives: Dynamic Clauses in Compiled Code Quick Tutorial: Modules Prolog Logicbase: predicate_property(M:F/A, PROPERTY) Dynamic Database Dynamic Predicates Prolog Logicbase Prolog Logicbase: Dynamic Predicate Storage Options dynamic storage dynamic/1 directive E
e Editor Embedded Applications empty list encoding end_body end_module end_of_file end_of_stream ensure_loaded environment variables eof eof_action epsilon Numbers and Math: Continued Fractions Amzi! Runtime: Flags epsilon (flag) Equality of Terms err Files Error Files Error Handling Prolog Execution: catch(GOAL, ERROR, HANDLER) Prolog Execution: throw(TERM) error/2 Errors Debugging Your Programs: Checking LSAPI Error Codes Compiler Debugging Your Programs: Tracking Prolog Errors Escape Characters Prolog Terms: Enabling and Disabling Escape Processing Prolog Terms Prolog Terms: Escape Codes Prolog Terms: Using Escape Codes Escape Codes Prolog Terms Prolog Terms: Using Escape Codes evaluable mathematical expressions EXE Files exit Debugger: Box Model Debugger: Box Model Exit Debugger: Display Debugger: Display exp expand_term Exponent export Compiler: Directives Modules: Exports Modules Prolog Logicbase: predicate_property(M:F/A, PROPERTY) expressions, mathematical extended Extended Predicates Linker: Libraries O.S. Extended Predicates F
fail Debugger: Box Model Debugger: Box Model Fail Debugger: Display Debugger: Display fail/0 file close file I/O file open File Types filename Files findall findall/3 findfiles fixed_real/1 Flags float Float(double) Float(single) float/1 float_real floating point numbers floor Flow-of-Control flow/1 flow/3 flush_output/0 flush_output/1 for/4 formatting fraction fractions function streams Functor functor/3 Functor/Arity G
garbage collection gc/0 gcthingfreq gensym/2 get/1 get/2 get_env_var/2 get0/1 get0/2 getdrive Goals Prolog Execution: Backtracking Search Listener: Querying the Logic Base goto Quick Tutorial: Modules Quick Tutorial: Using the Listener H
halt Head Prolog Execution: Clauses Prolog Logicbase: clause(HEAD, BODY) heap Heap System Predicates: pro_heap(Top, Pos) System Predicates: stack_sizes(Heap, Control, Local, Trail) heapbumper highwater/4 I
I I/ I/O I/O Streams I/O, General Principles IDE Quick Tutorial: Consulting a Source File IDE: Eclipse IDE Quick Overview: Interactive Development Environment (IDE) Compiler: Running from the IDE Linker: Running from the IDE Quick Tutorial: Starting the Listener Quick Tutorial: Using Projects in the IDE IDE Quick Start: Beginning Users Identical Terms Identity Identity Negated if-then-else import Compiler: Directives Modules: Imports Modules Prolog Logicbase: predicate_property(M:F/A, PROPERTY) include indexed clauses indexed directive indexed/1 inf Numbers and Math: Built-in Atoms Prolog Terms: Decimal Numbers Infix input Input integer Input and Output: Binary I/O Numbers and Math: Notes on Reals and Gigadigits Numbers and Math: integer(X) Integer integer Input and Output: Binary I/O Numbers and Math: Notes on Reals and Gigadigits Numbers and Math: integer(X) integer/1 integer_real integer_rounding_function Integers Interactive Development Environment Intermixing dynamic and static(compiled) Code Internationalization is/2 Numbers and Math: Evaluating Mathematical Expressions Numbers and Math: X is Y is_atom/1 is_fraction/1 is_integer is_integer/1 is_list/1 is_member/2 is_number/1 is_odd is_odd/1 is_string/1 is_string_term is_string_term/ is_string_term/2 isPrime/1 K
Language Translation, DCG Large Predicates Latent Expressions Launch Configuration Leap Debugger: Box Model Debugger: Box Model Debugger: Example Debugger: Example Debugger: Debug Port Options leash Debugger: Box Model Debugger: Box Model Debugger: Example Debugger: Example Debugger: Leashing Debug Ports Leashing lib Files Libraries Licensing Linker Linker: Libraries Quick Overview Linker: Running from the Command-Line Linker: Running from the IDE Linker Linking list list processing list/1 Listener Listener Listener: Listener Commands Quick Overview: Listener/Debugger Listener: Querying the Logic Base Quick Tutorial: Starting the Listener listing Compiler: Disadvantages Listener: Listing Clauses Quick Tutorial: Using the Listener Input and Output: listing, listing(PRED), listing(ID, PRED) listing/1 listing/2 lists Lists Lists to Structures ln, log load load from memory load/1 load/4 loadlsx/1 loc local Local System Predicates: pro_local(Top, Pos) System Predicates: stack_sizes(Heap, Control, Local, Trail) locale Log Files log10 logfile Amzi! Runtime: Configuration Parameters Debugging Your Programs: Tracing LSAPI Calls logging Logging Debugger Debugging Your Programs Logic Server API Logicbase Quick Overview: Intermixing Interpreted and Compiled Code Prolog Logicbase long_real/1 LSAPI Debugging Your Programs: Checking LSAPI Error Codes Debugging Your Programs: Tracking LSAPI Errors Debugging Your Programs: Tracing LSAPI Calls lsGetExceptMsg lsGetExceptReadBuffer lsTermToStr LSX lsxload M
macroheapsz main Compiler: Main Predicate Quick Tutorial: Modules Quick Tutorial: Running a Modular Application main/0 makeprimes/1 Manipulating Terms Mathematical Comparisons mathematical expressions Mathematical Functions Mathematical Games mathematical operators Mathematical Operators max max_arity max_integer maxclauses Amzi! Runtime: Configuration Parameters Compiler: Errors maximum maxmemory maxvars member Messages metapredicates min min_integer minimum Mixed Mode Math mkdir mod mode Input and Output: open(FILE, MODE, ID, OPTIONS) Prolog Terms: Strings mode(stream) mods modu module module:functor Modules Quick Tutorial Prolog Logicbase Modules Quick Tutorial: Running a Modular Application modulo modulo arithmetic Modulus Numbers and Math: X mods Y Numbers and Math: X modu Y Numbers and Math: X mod Y move Multibyte characters multifile Compiler: Directives Prolog Directives: Multifile Directive Multiple Logic Servers Multiplication N
name/2 Atoms, Lists and Strings: atom_codes(Atom, CharList) Atoms, Lists and Strings: name(Atom, CharList) National languages Natural Language Neck Negative Negative Numbers newline nl/0 nl/1 nllog Debugger: Logging Debugging Your Programs: Logging nllog/0 Non-Terminals nonblank_string/1 nonvar/1 nospy nospyall not/1 notnot Prolog Execution: not(Goal) Manipulating Terms: not(not(X = Y)) nth number Number Types number/1 number_chars/2 numbers Numbers numbers, default numbers, floating point numbers, real numbervars/3 numeric_type/2 O
once/1 op Prolog Directives: Latent Expressions Prolog Directives: Op Directive Prolog Terms: Predefined Prolog Operators op/3 open open/3 open/4 openlog Debugger: Logging Debugging Your Programs: Logging openlog/1 Operators Prolog Terms: Associativity Prolog Terms Prolog Terms: Precedence Prolog Terms: Predefined Prolog Operators operators, mathematical or Or Outliner Editor and Outliner Editor and Outliner output Output P
Packaging Parsing Atoms, Lists and Strings: string_split(String, DelimitersS, List) Atoms, Lists and Strings: string_tokens(String, TokenList), string_tokens(String, TokenList, DelimitersS) Atoms, Lists and Strings: string_trim(String, TrimmedString) Parsing Files performance pi pi calculations plm Files Quick Overview Linker: Libraries Prolog Logicbase: load(FileA), load([F1, F2,...]) Prolog Logicbase: unload(FileA), unload([F1, F2,...]) portray Ports Debugger: Debug Commands Debugger: Display Debugger: Display Debugger: Debug Port Options Debugger: Leashing Debug Ports Debugger: Breaking at Debug Ports Debugger: Logging position Input and Output: Repositioning Streams Input and Output: Special Purpose I/O Predicates Postfix Power pp Listener: Listener Commands Listener: Listing Clauses Listener: pp(Term), user_pp(Term) pp/1 ppj Files Precedence precision, double precision, infinite precision, single predicate_property/2 predicates Predicates Compiler: Complex Predicates Linker: Libraries O.S. Extended Predicates Compiler: Main Predicate Prolog Logicbase Prolog Logicbase: abolish(M:F/A) Listener: add Preferences Prefix preprocessor Preprocessor pretty print prime numbers Numbers and Math: Mathematical Games Numbers and Math: Prime Numbers prime/2 primeFactors/2 primes/2 pro Files Quick Overview Quick Tutorial: Consulting a Source File Quick Tutorial: Creating a Source File pro_control/2 pro_heap/2 pro_local/2 pro_trail/2 Procedure Flow Debugger: Box Model Debugger: Box Model prodq/3 prolog_copyright prolog_date prolog_name prolog_version put/1 put/2 Q
quit R
radtodeg random Random Numbers rational arithmetic read Input and Output: open(FILE, MODE, ID, OPTIONS) Prolog Terms: Using Escape Codes Read read/1 read/2 read_binary/3 read_string read_string/1 read_string/2 readbuffer readdepth reading characters reading keyboard reading strings readwrite real Numbers and Math: Notes on Reals and Gigadigits Numbers and Math: real(X) real numbers Real(fixed) Real(long) real/1 reconsult Listener: Consulting Prolog Source Files Listener: replace reconsult/1 Redirecting streams Redistributable Files redo Debugger: Box Model Debugger: Box Model Redo Debugger: Display Debugger: Display Remainder Numbers and Math: X mods Y Numbers and Math: X modu Y Numbers and Math: X mod Y rename repeat/0 replace Listener: add Listener reposition Repositioning repositioning streams respkey/1 restore Resume retract retractall rmdir round Rules Run Runtime S
save scope of variable names see/1 seed_random seeing/1 seen/0 series calculations set_input/1 set_output/1 set_prolog_flag Amzi! Runtime: Flags Numbers and Math: Notes on Reals and Gigadigits set_prolog_flag/2 Prolog Directives: Set Prolog Flag Amzi! Runtime: set_prolog_flag(FLAG, VALUE) set_stream_position/2 Input and Output: Repositioning Streams Input and Output: set_stream_position(ID, POSITION) setdrive setof setof/3 Shift Numbers and Math: X >> Y Numbers and Math: X << Y Numbers and Math: X xor Y short_integer sign sin single precision Single Quotes single_float single_float/1 Skip skip/1 skip/2 Sort Order sort/2 sorted clauses sorted directive sorted/1 Source Files Quick Tutorial: Consulting a Source File Quick Tutorial: Creating a Source File spy Spypoints sqrt srcbuf stack sizes stack_sizes/4 Stacks System Predicates: pro_control(Top, Pos) System Predicates: pro_heap(Top, Pos) System Predicates: pro_local(Top, Pos) System Predicates: pro_trail(Top, Pos) System Predicates: stack_sizes(Heap, Control, Local, Trail) Stand-Alone Runtime standard input/output Standard Order stat/9 static Static Predicates steam_property Step Step Into Step Over strcat/3 stream close stream end Stream IDs stream open stream redirection stream_property/2 Input and Output: Stream Properties Input and Output: stream_property(STREAM, PROPERTY) Input and Output: stream_property(ID, position(Position)) Streams string string I/O string processing string streams string/1 string_atom/2 string_esc Amzi! Runtime: Configuration Parameters Prolog Terms: Enabling and Disabling Escape Processing Amzi! Runtime: Flags string_float/2 string_icomp/2 string_integer/2 string_length/2 string_list/2 string_number/2 string_query/2 string_split/3 string_term/2 string_termq string_termq/ string_termq/2 string_tokens/2 string_tokens/3 string_trim/2 stringlist_concat/2 stringlist_concat/3 strings Strings structure Structure Analysis Structure Creation Manipulating Terms: Term =.. List (univ) Manipulating Terms: functor(TERM, FUNCTOR, ARITY) structure/1 Structures Structures to Lists sub_atom/4 sub_string/4 Subtraction sumq/3 Suspend system (module) System Errors System Predicates system/1 T
tab tab/1 tab/2 tan tell/1 telling/1 Term Ordering term typing Manipulating Terms: Term Typing Manipulating Terms: term_type(TERM, TYPE) term_type/2 Terminals Terminate Terms Debugger: Display Debugger: Display Debugging Your Programs: Examining Prolog Terms Manipulating Terms Manipulating Terms: Standard Order of Terms Prolog Terms: Variables Input and Output: display(Term) Prolog Logicbase: retractall(TERM) Prolog Logicbase: retract(TERM) text throw throw/1 tilt_slashes/2 time time/3 timer/1 told/0 Tools Quick Overview: Components Quick Overview: Relationship of Files and Components Tracing trail Trail System Predicates: pro_trail(Top, Pos) System Predicates: stack_sizes(Heap, Control, Local, Trail) Translation, DCG Trigonometry Functions true/0 truncate truncate/2 tutorial Tutorial Quick Tutorial: Compiling Quick Tutorial: Creating a Source File Quick Tutorial: Debugging Quick Tutorial: Duck World Quick Tutorial: Linking and Running Quick Tutorial: Modules Quick Tutorial: Running a Modular Application Quick Tutorial: Using Projects in the IDE Quick Tutorial: Using the Listener type type of terms type(stream) U
undefined_predicate Unicode Prolog Terms: Atoms Prolog Terms: Character Constants Editor and Outliner: Editor Functions Prolog Terms: Internationalization Unification Manipulating Terms: Equality of Terms Prolog Execution Unification Avoidance Manipulating Terms: Equality of Terms Manipulating Terms: not(not(X = Y)) unification avoidance Manipulating Terms: copy_term(T1, T2) Prolog Execution: not(Goal) Unification Avoidance Manipulating Terms: Equality of Terms Manipulating Terms: not(not(X = Y)) Unification of Terms Unification Operator Unification Operator Negated unify_with_occurs_check/2 univ unload/1 upper_case_atoms Prolog Terms: Atoms Amzi! Runtime: Flags Prolog Terms: Variables user (module) user streams user_bugwrite/1 user_error user_function user_input user_output user_pp Listener: Listener Commands Listener: pp(Term), user_pp(Term) Input and Output: pp(TERM), pp(ID, TERM) V
var var/1 Variable Names Variable Names/Bindings Manipulating Terms: string_query(QUERYSTRING, RESULTSTRING) Manipulating Terms: varlist_query(QUERYSTRING, LENGTH, RESULTLIST) Variable Numbering Variables Prolog Terms Manipulating Terms: varlist(List) Manipulating Terms: varsof(Term, List) varlist/1 varlist_query/3 vars_sort_equal Amzi! Runtime: Configuration Parameters Amzi! Runtime: Flags varsof/2 version/1 W
w_getfiler w_msgbox w_tfmsgbox wide_char wide_text wideA wideW write Write write quoted write/1 write/2 write_binary/3 writelog Debugger: Logging Debugging Your Programs: Logging writelog/1 writeq/1 writeq/2 writing characters writing strings X