HELP HELPFILES Andrew Law, April, 1987 Rewritten Simon Nichols, September 1993 An overview of the contents of the Poplog Prolog HELP files. CONTENTS - (Use g to access required sections) 1 General 2 Syntax 3 Errors and error handling 4 Declaring predicates 5 Compiling files 6 Input/Output 7 Control facilities 8 Arithmetic 9 All-solutions predicates 10 Term comparison and sorting 11 Meta-logical operations 12 Modification of the running program 13 Information about the state of the program 14 Term pre-processing 15 Environmental 16 Debugging Prolog programs 17 Mixed-language programming 18 Efficiency 19 Compatibility with other Prolog implementations 20 Implementation of Poplog Prolog 21 Related Documentation ----------------------------------------------------------------------- 1 General ----------------------------------------------------------------------- * PROLOG An introduction to the Poplog Prolog subsystem * PREDICATES Lists built-in predicates and their associated HELP files * SYMBOLS Lists built-in predicates with symbolic names, and the names of their associated HELP files * COMPILE Overview of compiling files in Prolog * DYNAMIC Describes dynamic predicates, those whose definition can change in the course of a program * DATABASE Overview of Prolog database operations * I_O Overview of input/output operations in Prolog * DIRECTIVES Giving directives and queries to the Prolog compiler * GLOSSARY Definitions of some terms used in describing Prolog programs ----------------------------------------------------------------------- 2 Syntax ----------------------------------------------------------------------- * SYNTAX Description of Poplog Prolog syntax * OP Operators and how to declare them * OPERATORS Default operator precedences * DEFAULT_OPS Library which restores default operator precedences ----------------------------------------------------------------------- 3 Errors and error handling ----------------------------------------------------------------------- * ERROR Describes the kinds of errors which may arise while using Prolog * PROLOG_ERROR The run-time error handler * UNKNOWN Predicate which alters the action taken when an undefined predicate is called ----------------------------------------------------------------------- 4 Declaring predicates ----------------------------------------------------------------------- * DYNAMIC, * STATIC For declaring a predicate as dynamic or static, i.e. whether its definition will change in the course of a program * SYSTEM_PREDICATE, * USER_PREDICATE For declaring a predicate as constant or non-constant * NO_CLAUSES, * CLAUSES For declaring whether a textual record of a predicate is kept * PREDICATE_INFO For determining the status of a predicate (how it has been declared) ----------------------------------------------------------------------- 5 Compiling files ----------------------------------------------------------------------- * COMPILE Detailed overview of compiling files in Prolog * CONSULT, * RECONSULT Reading Prolog procedure definitions from a file ----------------------------------------------------------------------- 6 Input/Output ----------------------------------------------------------------------- * I_O Summary of I/O facilities * SEE, * SEEING, * SEEN Predicates for manipulating the current input stream * TELL, * TELLING, * TOLD Predicates for manipulating the current output stream * READ Predicates which read terms from the current input stream * WRITE, * WRITEQ, * DISPLAY, * PRINT Predicates which write terms to the current output stream * FORMAT Predicate which displays formatted output on the current output stream * GET, * GET0, * SKIP Predicates for character input from the current input stream * NL, * PUT, * TAB Predicates for character output to the current output stream * TTYGET, * TTYGET0, * TTYSKIP Predicates for character input from the terminal * TTYFLUSH, * TTYNL, * TTYPUT, * TTYTAB Predicates for character output to the terminal * PORTRAY User-redefinable printing predicate * PROMPT Predicate which changes the prompt used by read/N and get0/1 * CURRENT_DISK Library defining predicates for examining the filing system ----------------------------------------------------------------------- 7 Control facilities ----------------------------------------------------------------------- * AND, * COMMA Conjunction operator * OR, * SEMICOLON Disjunction operator * NOT Negation (as failure) predicate * TRUE Predicate which always succeeds as a goal * CUT Discards choice points created since the parent goal started execution * FAIL Predicate which always fails when called as a goal * CONDITIONAL Operator which attempts goals conditionally * REPEAT Generates and infinite sequence of backtracking choices ----------------------------------------------------------------------- 8 Arithmetic ----------------------------------------------------------------------- * ARITHMETIC Overview of HELP files dealing with operations on numbers ----------------------------------------------------------------------- 9 All-solutions predicates ----------------------------------------------------------------------- * FINDALL Predicate which finds all solutions of a goal * BAGOF Predicate which finds all solutions of a goal, with a more logical interpretation of free variables in the goal than findall/3 * SETOF Predicate which finds all solutions of a goal as a set (without duplicates), with a similar logical interpretation to bagof/3 ----------------------------------------------------------------------- 10 Term comparison and sorting ----------------------------------------------------------------------- * COMPARE Operators which perform meta-logical comparisons on Prolog terms * SORT Predicate which sorts lists * KEYSORT Predicate which sorts a list of terms with an arity of two ----------------------------------------------------------------------- 11 Meta-logical operations ----------------------------------------------------------------------- * VAR Predicate which succeeds if its argument is a variable * NONVAR Predicate which succeeds if its argument is not a variable * ATOM Predicate which succeeds if its argument is an atom * INTEGER Predicate which succeeds if its argument is an integer * FLOAT Predicate which succeeds if its argument is a floating point number * ATOMIC Predicate which succeeds if its argument is an atom or a number * FUNCTOR Predicate whose arguments are unified with a term and the name and arity of that term * ARG Predicate whose arguments are unified with a term and a given argument of that term * UNIV Operator which constructs a term from a list and vice-versa * NAME Predicate which converts between atomic terms and character strings * COMPARE Operators which perform meta-logical comparisons on Prolog terms * CALL A family of predicates for calling terms as goals ----------------------------------------------------------------------- 12 Modification of the running program ----------------------------------------------------------------------- * DATABASE Overview of Prolog database operations * ASSERT Predicate which adds a clause to the database * ASSERTA Predicate which adds a clause to the database, before all other clauses for the predicate concerned * ASSERTZ Predicate which adds a clause to the database, after all other clauses for the predicate concerned * CLAUSE Predicate which succeeds if a clause with a given head and body exists in the database * RETRACT Predicate which removes clauses matching a given pattern from the database * RETRACTALL Predicate which removes all clauses with a given head from the database * ABOLISH Predicate which removes all traces of the definition of a predicate ----------------------------------------------------------------------- 13 Information about the state of the program ----------------------------------------------------------------------- * LISTING Predicate which displays procedure definitions * NUMBERVARS Predicate which systematically instantiates the variables in a term in order to make it ground * CURRENT_ATOM Predicate which succeeds when its argument unifies with a known atom * CURRENT_FUNCTOR Predicate which succeeds when its arguments unify with the name and most general term for a known functor * CURRENT_PREDICATE Predicate which succeeds when its arguments unify with the name and most general term for a known predicate with clauses * CURRENT_OP Predicate which succeeds when its arguments unify with the precedence, fixity, and name of a known operator ----------------------------------------------------------------------- 14 Term pre-processing ----------------------------------------------------------------------- * EXPAND_TERM Predicate which rewrites terms using system- and user-defined transformations * GRAMMAR_RULE Prolog facilities for expressing definite clause grammars * PHRASE Predicate which succeeds when a given grammer rule generates a given list of words representing a phrase or sentence ----------------------------------------------------------------------- 15 Environmental ----------------------------------------------------------------------- * BREAK Predicate which starts a new, nested invocation of the Prolog top-level * ABORT Predicate which aborts all current executions * HALT Predicate which causes an exit from Poplog * SAVE Predicate which saves the state of the Prolog system * RESTORE Predicate which restores a saved image * REINITIALISE Predicate which forces Prolog startup behaviour * VERSION Predicate which displays version information about the Prolog system * DATE Library which gets the date and time * STATISTICS Predicate which prints information about the current invocation of the Prolog system * SYSTEM Predicates which affect the way the Prolog system operates * RENAME Predicate which renames files * VED Prolog-specific Ved commands ----------------------------------------------------------------------- 16 Debugging Prolog programs ----------------------------------------------------------------------- * DEBUG Overview of the debugging facilities provided by Poplog Prolog * SPY How to set spy-points on predicates in order to debug them and the options available at spy-ports * NOSPY Predicate which removes spy-points * QUIETSPY Predicate which prevents spy/1 from printing out messages when spy-points are placed or removed * LEASH Predicate which enables user interaction at spy-ports * UNLEASH Predicate which disbles user interaction at spy-ports * NODEBUG Predicate which removes all current spy-points * CHATTY Library which provides a simple trace facility ----------------------------------------------------------------------- 17 Mixed-language programming ----------------------------------------------------------------------- * PROLOG_LANGUAGE Predicates and library package for switching from Prolog to Pop-11 * MIXED_LANGUAGES Overview of mixed-language programming using Prolog, Pop-11 and Lisp * PLOGTOPOP How to call Pop-11 from Prolog * POPTOPLOG How to call Prolog from Pop-11 * PROLOG_EVAL, * IS Predicates which evaluate Pop-11 expressions in Prolog * ARE Library for evaluating Pop-11 expressions which return multiple results * PROLOG_VAL, * PROLOG_SETQ Accessing and updating Pop-11 variables from Prolog * TERMSINPOP Pop-11 procedures for manipulating Prolog terms and variables * PROLOG_VARS Pop-11 * macro providing a syntax for declaring dynamically scoped (see HELP * VARS) Prolog variables in Pop-11 * PROLOG_LVARS Pop-11 macro providing a syntax for declaring lexically scoped (see HELP * LVARS) Prolog variables in Pop-11 * POPSTRING Library for embedding Pop-11 strings in Prolog programs * PROCESSES How to create Pop-11 processes which use Prolog procedures * PROLOG_BARRIER_APPLY Pop-11 procedure which applies a procedure inside a Prolog barrier ----------------------------------------------------------------------- 18 Efficiency ----------------------------------------------------------------------- * EFFICIENCY Hints about how to make Prolog programs more efficient ----------------------------------------------------------------------- 19 Compatibility with other Prolog implementations ----------------------------------------------------------------------- * POPLOG Features specific to Poplog Prolog * COMPATIBILITY Describes DEC-10 predicates not implemented in Poplog Prolog * DEC10 Library providing additional DEC-10 Prolog compatibility * RECORD Library providing the indexed database facilities of DEC-10 Prolog ----------------------------------------------------------------------- 20 Implementation of Poplog Prolog ----------------------------------------------------------------------- REF * PROLOG, DOC * CONTINUATION Aspects of the implementation of the Poplog Prolog subsystem ----------------------------------------------------------------------- 21 Related Documentation ----------------------------------------------------------------------- * PLOGNEWS A chronological summary of changes to the Prolog system * PLOGINDEX A list of all of the HELP files currently in the Prolog system * LIBRARIES An overview of Prolog library packages * DOCUMENTATION An introduction to Poplog documentation and how to access it --- C.all/plog/help/helpfiles --- Copyright University of Sussex 1993. All rights reserved.