Interpreter.PrologInterpreter.Sexp.Terms
Class FunctorTerm
java.lang.Object
|
+--Interpreter.Sexp.Sexp
|
+--Interpreter.Sexp.ConsSexp
|
+--Interpreter.PrologInterpreter.Sexp.TermSexp
|
+--Interpreter.PrologInterpreter.Sexp.Terms.FunctorTerm
- public class FunctorTerm
- extends TermSexp
Un oggetto FunctorTerm è il termine functor, predefinito in prolog.
Il termine functor è a 3 argomenti.
functor(Term,Functor,Argnum).
Unifica la testa di Term con Functor ed il numero di argomenti di
Term con Argnum.
Esempio:
functor(X,a,3). -> X = a(_X1,_X2,_X3).
Constructor Summary |
FunctorTerm(Sexp args)
Costruisce una nuova FunctorTerm. |
Method Summary |
void |
accept(SexpVisitor e)
Accetta un PrologSexpVisitor per la valutazione. |
Methods inherited from class Interpreter.PrologInterpreter.Sexp.TermSexp |
argList,
argNum,
first,
functor,
getPriority,
getVarList,
second,
toString,
toString,
toStringInList,
unify |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
FunctorTerm
public FunctorTerm(Sexp args)
- Costruisce una nuova FunctorTerm.
- Parameters:
args
- lista degli argomenti del termine.
accept
public void accept(SexpVisitor e)
throws InterpreterException
- Accetta un PrologSexpVisitor per la valutazione.
- Parameters:
e
- oggetto che realizza un Pattern Visitor per le Sexp.- Overrides:
- accept in class TermSexp
Codice realizzato da Francesco Geri & Marco Tamanti