Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: deductive databases

Re: deductive databases

From: VC <boston103_at_hotmail.com>
Date: Sun, 15 May 2005 20:11:19 -0400
Message-ID: <UfidnT08ltmDeBrfRVn-ow@comcast.com>


Please see in-line:

"Christopher Browne" <cbbrowne_at_acm.org> wrote in message news:cpyhe.49787$B82.1717445_at_news20.bellglobal.com... [...snipped ...]

[VC]
>> It actually depends on what <alex goldman> means by
>>
>> a. 'Functor', the word that has different meaning in different
>> PLs/contexts
>>
>> b. car(cons(X,Y), X). If it's Lisp, the expression does not make sense.
>> If it's a Prolog 'functor', it does not make any sense either.
>

[CB]
> I expect he's talking about the ML notion of functor, which is the
> type signature of a 'module.'

Well, it appears he is trying to talk about Prolog's functor. An excerpt from Prolog's BNF:

...

<predicate>::=<atom>|<structure>
<structure>::=<atom>(<term list>)
<term list>::=<term>|<term list>,<term>
<term>::=<numeral>|<atom>|<variable>|<structure>

A 'functor' is just the atom from Line 2 (in the structure definition). E.g.

likes(john, mary).

... is a predicate of 'arity' 2 (two arguments); at the time, it's a structure whose functor is 'likes'.

Sometimes, in Prolog, people use the 'functor' and 'predicate' interchangeably. Also, in some books, an 'atom' is called a 'functor' with 'arity' zero. I am not sure what the point of using multiple labels for essentially the same thing is. Probably, 'functor' makes trivial stuff sound real important... Received on Sun May 15 2005 - 19:11:19 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US