edu.cs.ai.kreator.logic
Class Term

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

public abstract class Term
extends java.lang.Object
implements java.lang.Comparable<Term>, Latexable

This interfaces summarizes the common functionalities of terms in first-order logic.

Author:
Matthias Thimm

Constructor Summary
Term()
           
 
Method Summary
abstract  boolean equals(java.lang.Object other)
          If the other object is a Term, then equals returns true if both objects have the same class, same name and sort.
static
<T extends Term>
java.util.Set<java.util.List<T>>
getAllSequences(java.util.List<? extends Sort> sorts, java.util.Collection<? extends T> terms)
          This method computes all sequences [X1,...
abstract  java.lang.String getName()
          returns the name (identifier) of this Term
abstract  Sort getSort()
          Returns the sort of this term.
abstract  boolean isGround()
          Specifies if this term is ground, i.e., if there occurs any variable in this term
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface edu.cs.ai.kreator.logic.Latexable
toLatex
 

Constructor Detail

Term

public Term()
Method Detail

isGround

public abstract boolean isGround()
Specifies if this term is ground, i.e., if there occurs any variable in this term

Returns:
a boolean; "true" if there is no variable in this term

getName

public abstract java.lang.String getName()
returns the name (identifier) of this Term

Returns:

getSort

public abstract Sort getSort()
Returns the sort of this term.

Returns:

equals

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

Overrides:
equals in class java.lang.Object
Parameters:
other -
Returns:
true, if both objects have the same class, name and sort.

getAllSequences

public static <T extends Term> java.util.Set<java.util.List<T>> getAllSequences(java.util.List<? extends Sort> sorts,
                                                                                java.util.Collection<? extends T> terms)
This method computes all sequences [X1,...,XN] of terms from "terms". Terms may appear multiple times.

Parameters:
sorts - the sorts of the term at each position.
terms - a collection of terms used in constructing the sequences
Returns:
a set of lists of terms.