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
 
Fields inherited from class Interpreter.PrologInterpreter.Sexp.TermSexp
priority, Prolog, PrologTerm, Spaces
 
Fields inherited from class Interpreter.Sexp.ConsSexp
head, tail
 
Fields inherited from class Interpreter.Sexp.Sexp
BEGIN_S, COUPLE_S, END_S, isAList, Lisp, nil, NIL_S, SEP_S, Separators
 
Constructor Summary
ClauseSexp(Sexp h, Sexp body)
          Costruisce una nuova ClauseSexp.
 
Method Summary
 void accept(SexpVisitor e)
          Accetta un SexpVisitor per la valutazione.
 Sexp unify(Sexp term, SexpUnifier unifier)
          Unifica questa clausola con term tramite l'unificatore unifier.
 
Methods inherited from class Interpreter.PrologInterpreter.Sexp.Infix.InfixSexp
choose, toString, toString
 
Methods inherited from class Interpreter.PrologInterpreter.Sexp.TermSexp
argList, argNum, first, functor, getPriority, getVarList, second, toStringInList
 
Methods inherited from class Interpreter.Sexp.ConsSexp
append, car, cdr, count, equals, isEq, reverse, setIsAList
 
Methods inherited from class Interpreter.Sexp.Sexp
isAList, reverse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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;
Method Detail

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