|
|
Keywords:
Functor,
Parenthesis,
Argument,
Comma,
Notation
a predicate with zero or more arguments, written in functional notation
Term consisting of a functor and a sequence of arguments. The number of arguments is the arity of the term. A structure is written in functor notation as follows: functor, followed without intervening space by an opening left parenthesis, followed by comma-separated arguments, and a closing right parenthesis. If the arity is zero, the term is also referred to as an atom and is written without parentheses. For structures with an arity of one or two an alternative notation may be used if the functor has been defined as a prefix, infix or postfix operator.
Context A term in Prolog. Definition structure conforms to the following syntax: A structure is: Either: A functor, Or: functor followed by an open-parenthesis ('(') followed by a comma-separated list of arguments followed by a close-parenthesis (')') Examples For example, the following are all structures: student(name(Nick), semester(9)) ancestor(A,D) student(course(MA301), prof(Alfred), semester(9), name(Nick)) Abraham The last is a structure because it consists of a functor. Such structures are also called atomic constants (or atoms).
See argument structure.
In mathematics, progress often consists of recognising the same structure in different contexts - so that one method exploiting it has multiple applications. In fact this is a normal way of proceeding; in the absence of recognisable structure (which might be hidden) problems tend to fall into the combinatorics classification of matters requiring special arguments.
|