[comp.lang.prolog] A question of terminology

cdsm@doc.ic.ac.uk (10/12/87)

Earlier I posted to the net the draft version of the Prolog Glossary
prepared for the BSI standardization project but it generated only general
murmurs of discontent. I would therefore like to try to clarify the
discontent felt at Imperial College and other centres which approach
Prolog from a background of logic.

The biggest problem is with the word "atom".  

	atom	One of a set of unstructured objects whose only property
		is that equality of two elements can be determined.

Apart from minor quibbles about this definition (does it apply to
numbers?), the word 'atom' or 'atomic formula' have traditionally been
used to describe what is here termed a literal:

	literal 	A predicate  of arity N  and a sequence of N  
			arguments.

This definition is almost, but not quite, right. In resolution
terminology, a literal is either a predicate with arguments or its
negation (and thus postive or negative literals). But it shows that a term
is needed for this object. In most Edinburgh systems (and I take the
current Quintus manual as the current example) the only terminology used
is compound term:

	compound term 	A functor of arity N together with a sequence of N
			arguments. 

The word term is used universally in this sense but there is a strong
distinction with formulas built up using logical connectives (and, or
etc), which Edinburgh systems do not recognize as being distinct.

Question: Where does the Edinburgh usage of 'atom' arise from, since there
is a long history of 'atom' meaning a term consisting of a predicate?
(from Lisp?)

We can certainly derive a long list of precedents on both sides:

Logic:  Robinson(1965), Kowalski (1979), Hogger(1984), LLoyd (1984),
Charniak, McDermott(1985), Gallier(1986)

Edinburgh: DEC-10 Prolog Manual (1978), Clocksin, Mellish(1981), Sterling,
Shapiro (1986), Bratko (1986) etc.

Note: If anyone can invoke O'Keefe's "Don't kick the craftsman in the
teeth" rule, it is the logicians.

Proposal: The only way to resolve this conflict is to avoid the term
'atom' as far as possible. A possible lead is given by Giannesini, Kanoui,
Pasero, van Caneghem (1986) who call the basic objects "identifiers"- a
well-known and unambiguous computing term. The  logical terms are
"constant" or "individual constant", but these can equally apply to
identifiers or numbers, as is universally recognized (and "constant"
should certainly be used in place of "atomic" as the predicate for this).
It is slightly complicated by the fact that an identifier can be an
arbitrary sequence of characters within single quotes, but this needn't be
fatal. Also a variable may be denoted by an identifier; but in this case
its identifier is precisely the individual constant we are talking about.

We also need a term for "atomic formula", as it is has been agreed to
distinguish these clearly from other terms in the standard. Here it would
seem possible to use the word "predication" (following Robinson, 1979).
This distinguishes it from "predicate", which by itself means the set
denoted by the predicate symbol. It's not reasonable to use predicate to
denote symbol+arity in contradistinction to predicate symbol, as is
proposed and we certainly shouldn't follow Sterling, Shapiro and call them
"goals" as this thoroughly confuses the thing with the usage.

I therefore propose the following (please feel free to improve the wording):

identifier	A basic unstructured object which can be used to identify an 
		individual or name of a function or predicate.
predicate symbol An identifier and an arity,  associated with a predication. 
predicate	(deleted)
predication	A term consisting of a predicate symbol 
		and a list (possibly empty) of arguments
function symbol	An identifier and an arity associated with a function
functor		(deleted)
functor symbol	(deleted)
constant	An identifier, number or string
goal  		A predicate which appears in the body of a clause or a query.
literal		(deleted)
connective	A logical operator used to combine predications into rules
		and queries.
query		One or more goals and connectives given as interactive input
		to the top level.  Variable substitutions found while 
		executing the query may be output.


Comments please! 
Chris Moss, Imperial College, London.