edu.udo.cs.ie.cowbots.logic
Class ArithmeticPredicate

Package class diagram package ArithmeticPredicate
java.lang.Object
  extended by edu.udo.cs.ie.cowbots.logic.ELPAtom
      extended by edu.udo.cs.ie.cowbots.logic.ArithmeticPredicate
All Implemented Interfaces:
ELPLiteral

 class ArithmeticPredicate
extends ELPAtom

private class to model arithmetic expressions like "A = B + C".


Field Summary
 
Fields inherited from class edu.udo.cs.ie.cowbots.logic.ELPAtom
pred, terms
 
Constructor Summary
ArithmeticPredicate(java.lang.String pred, java.lang.String... terms)
           
 
Method Summary
 boolean isArithmetic()
          deprecated, use isPredicate instead !
 boolean isPredicate()
          this method indicates if the literal appearing in a program is a build-in or external dlv predicate
 java.lang.String toString()
          translates the atom into a human readable string.
 
Methods inherited from class edu.udo.cs.ie.cowbots.logic.ELPAtom
Aggregate, Aggregate, Equal, equals, getArity, getAtom, getLiteral, getPredicate, getTerm, getTermAsInt, getTerms, getType, Gtr, GtrEq, hashCode, instantiate, Int, isAtom, isDefaultNegated, isStrictNegated, Less, LessEq, Mul, Plus, setTerm, setTerms, UnEq
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ArithmeticPredicate

public ArithmeticPredicate(java.lang.String pred,
                           java.lang.String... terms)
Method Detail

toString

public java.lang.String toString()
Description copied from class: ELPAtom
translates the atom into a human readable string. the output conforms datalog syntax (dlv or lparse compatible).

Overrides:
toString in class ELPAtom

isArithmetic

public boolean isArithmetic()
Description copied from interface: ELPLiteral
deprecated, use isPredicate instead !

Specified by:
isArithmetic in interface ELPLiteral
Overrides:
isArithmetic in class ELPAtom
Returns:
true if this objects models an arithmetic expression

isPredicate

public boolean isPredicate()
Description copied from interface: ELPLiteral
this method indicates if the literal appearing in a program is a build-in or external dlv predicate

Specified by:
isPredicate in interface ELPLiteral
Overrides:
isPredicate in class ELPAtom
Returns:
true if this object models a dlv predicate