Quintus Prolog Manual
The mode annotations are useful to tell whether an argument is input or output or both. They also describe formally the instantiation pattern to the call which makes the call to the built-ins determinate. The mode annotations in the above example are '+' and '-'. Following is a complete description of the mode annotations you will find in the reference pages:
If the synopsis of a predicate has more than one mode declaration, the first (the topmost) that satisfies both modes and types (of a goal instance), is the one to be applied (to that goal instance). All built-in predicates of arity zero are determinate (with the exception of repeat/0). For input arguments, an exception will be raised if the argument isn't of the specified type. For output arguments, an exception might be raised if the argument is nonvar, and not of the specified type. The generated value of the argument will be of the specified type.
This section describes the categories of predicates and how they are indicated in the reference pages for predicates of each given category. The names of categories hookable, hook, extendible, declaration, and meta-logical appear to the right of the title of the reference page.
Meta-predicates and operators are recognizable by the implicit conventions described below.
assert(mod:a(1), Ref)
If no module prefix is supplied, it will implicitly be set to the calling module. If the module prefix is a variable, an instantiation error will be raised. If it is not an atom a type error will be raised. So in any meta-predicate reference page the following exceptions are implicit: Exceptions:
:- initialization +Goal (A)
+Term@-[1] @> +Term@-[2] (B)
It is thus always possible to see if a name is an operator or not. The predicate can, of course, be written using the canonical representation, even when the name is an operator. Thus (A) and (B) can be written as (C) and (D), respectively:
:- initialization(+Goal) (C)
@>(+Term@-[1], +Term@-[2]) (D)
The argument section describes the type/domain of each argument. If it is a '+' argument, then the built-in always tests if the argument is the right type/domain. In some cases, types/domains mentioned in the Arguments section need not be the smallest set of all acceptable arguments.
The simple argument types are those for which type tests are provided. They are summarized in {manual(l-2-23)}. In addition there is stream_object, a special type of term described in {manual(g-7-6-1)}. If an output argument is given the type var, it means that that argument is not used by the predicate in the given instantiation pattern.
Following is a list of argument types which are defined in terms of the simple argument types. This is a formal description of the types/domains used in the Arguments sections of the reference pages for the built-ins. The rules are given in BNF (Backus-Naur form). term ::- (any Prolog term) list ::- list of Type ::- arity ::- (X <= 255)} char ::- pair ::- simple_pred_spec ::- pred_spec ::- pred_spec_tree ::- pred_spec_forest ::- gen_pred_spec ::- gen_pred_spec_tree ::- gen_pred_spec_tree_var ::- atoms also can be variables} extern_spec ::- extern_arg} extern_arg ::- foreign_spec ::- foreign_arg} foreign_arg ::- interf_arg_type ::- term | string | address file_spec ::- file_spec} expr ::- is/2; see the description of arithmetic expressions in {manual(g-8-3)}.} 2]: Exceptions:
For input arguments, an exception will be raised if the argument isn't of the specified type. For output arguments, an exception might be raised if the argument is nonvar, and not of the specified type. The generated value of the argument will be of the specified type. ", ELSE "" }
contact: product
support sales information