edu.cs.ai.kreator.logic
Class FunctionTerm

java.lang.Object
  extended by edu.cs.ai.kreator.logic.Term
      extended by edu.cs.ai.kreator.logic.FunctionTerm
All Implemented Interfaces:
Latexable, java.lang.Comparable<Term>

public class FunctionTerm
extends Term

This class models a function term in first-order logic, i.e., it encapsulates a functor together with a list of parameters. At the current state, this class models only the syntactic representation of a function term and does not actually determines or computes its value.

Author:
Matthias Thimm

Constructor Summary
FunctionTerm(Functor functor, java.util.List<Term> parameters)
          Constructs a function term with the given functor and list of parameters
 
Method Summary
 int compareTo(Term other)
           
 boolean equals(java.lang.Object obj)
          If the other object is a Term, then equals returns true if both objects have the same class, same name and sort.
 java.lang.String getName()
          returns the name (identifier) of this Term
 Sort getSort()
          MT: Add some semantics!
 int hashCode()
           
 boolean isGround()
          Specifies if this term is ground, i.e., if there occurs any variable in this term
 java.lang.String toLatex()
          Returns a Latex grammar conform string to generate variables, rules (conditionals) etc.
 java.lang.String toString()
           
 
Methods inherited from class edu.cs.ai.kreator.logic.Term
getAllSequences
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FunctionTerm

public FunctionTerm(Functor functor,
                    java.util.List<Term> parameters)
Constructs a function term with the given functor and list of parameters

Parameters:
functor - a functor
parameters - a list of terms
Method Detail

getName

public java.lang.String getName()
Description copied from class: Term
returns the name (identifier) of this Term

Specified by:
getName in class Term
Returns:

isGround

public boolean isGround()
Description copied from class: Term
Specifies if this term is ground, i.e., if there occurs any variable in this term

Specified by:
isGround in class Term
Returns:
a boolean; "true" if there is no variable in this term

getSort

public Sort getSort()
MT: Add some semantics!

Specified by:
getSort in class Term
Returns:

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toLatex

public java.lang.String toLatex()
Description copied from interface: Latexable
Returns a Latex grammar conform string to generate variables, rules (conditionals) etc.

Returns:
a Latex grammar conform string.

compareTo

public int compareTo(Term other)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Description copied from class: Term
If the other object is a Term, then equals returns true if both objects have the same class, same name and sort.

Specified by:
equals in class Term
Returns:
true, if both objects have the same class, name and sort.