Interpreter.PrologInterpreter.Sexp.Infix
Class ClauseSexp
java.lang.Object
|
+--Interpreter.Sexp.Sexp
|
+--Interpreter.Sexp.ConsSexp
|
+--Interpreter.PrologInterpreter.Sexp.TermSexp
|
+--Interpreter.PrologInterpreter.Sexp.Infix.InfixSexp
|
+--Interpreter.PrologInterpreter.Sexp.Infix.ClauseSexp
- public class ClauseSexp
- extends InfixSexp
Un oggetto ClauseSexp è una clausola Prolog.
Il funtore è ":-", mentre gli argomenti sono la testa ed il body.
Fields inherited from class Interpreter.PrologInterpreter.Sexp.Infix.InfixSexp |
dx,
sx |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
ClauseSexp
public ClauseSexp(Sexp h,
Sexp body)
throws InterpreterException
- Costruisce una nuova ClauseSexp.
- Parameters:
h
- primo elemento costituente la ClauseSexp;body
- secondo elemento costituente la ClauseSexp;
unify
public Sexp unify(Sexp term,
SexpUnifier unifier)
throws InterpreterException
- Unifica questa clausola con term tramite l'unificatore unifier.
- Parameters:
term
- il termine con cui deve unificare.unifier
- l'unificatore.- Returns:
- lista delle sostituzioni effettuate.
- Overrides:
- unify in class TermSexp
accept
public void accept(SexpVisitor e)
throws InterpreterException
- Accetta un SexpVisitor 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