3APL Agent Programming

ics.TripleApl
Class Wff

java.lang.Object
  |
  +--ics.TripleApl.Wff
Direct Known Subclasses:
LiteralWff, OperatorWff

public abstract class Wff
extends java.lang.Object

The class for Well Formed Formulae. This class contains two static values WFF_AND and WFF_OR for use in OperatorWff and other classes in this package.
There is no constructor for this class.

Version:
1.0, August 2002.
Author:
Meindert Kroese

Field Summary
protected  boolean isNotDenied
          isNotDenied is the boolean used to indicated a negation.
static int WFF_AND
           
static int WFF_OR
           
 
Constructor Summary
Wff()
           
 
Method Summary
(package private) abstract  Wff copy()
          Method to make a copy of a wff.
(package private) abstract  void doSubst(SubstList sl)
          Method to replace the variables in this wff with their values.
(package private) abstract  boolean equals(Wff w)
          Method to test on equality between two wff's.
(package private)  boolean getDenial()
          Method to get the negation variable.
(package private) abstract  void getVars(java.util.Vector vars)
          Method to fill a Vector with the variables used in this wff.
(package private) abstract  boolean isEmpty()
          Method to test whether the wff is empty.
(package private)  void setDenial(boolean b)
          Method to set the negation variable.
(package private) abstract  void simplify()
          Method to simplify a wff as far as possible (making calculations in parameters, or boolean calculations in OperatorWffs).
(package private) abstract  void simplify(BeliefBase bb)
          Method to simplify a wff as far as possible (making calculations in parameters, or boolean calculations in OperatorWffs), using the beliefbase, if necessary.
(package private) abstract  java.lang.String toPrologString()
          Method to get the wff in a `Prolog friendly' form.
(package private) abstract  java.lang.String toPrologString(java.util.Vector vars)
          Method to get the wff in a `Prolog friendly' form.
abstract  java.lang.String toString()
          Method to get the wff in a printable form.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

isNotDenied

protected boolean isNotDenied
isNotDenied is the boolean used to indicated a negation. If isNotDenied==false this represents a NOT.

WFF_AND

public static final int WFF_AND

WFF_OR

public static final int WFF_OR
Constructor Detail

Wff

public Wff()
Method Detail

getDenial

boolean getDenial()
Method to get the negation variable.
Returns:
false means NOT.

setDenial

void setDenial(boolean b)
Method to set the negation variable.
Parameters:
b - the new value of the negation variable.

copy

abstract Wff copy()
Method to make a copy of a wff.
Returns:
Wff, a copy of the wff.

doSubst

abstract void doSubst(SubstList sl)
Method to replace the variables in this wff with their values.
Parameters:
sl - the list of variables and their values.

equals

abstract boolean equals(Wff w)
Method to test on equality between two wff's. Equality is tested on type and content.
Returns:
true if the wff's are equal.

getVars

abstract void getVars(java.util.Vector vars)
Method to fill a Vector with the variables used in this wff.
Parameters:
vars - the Vector to be filled.

isEmpty

abstract boolean isEmpty()
Method to test whether the wff is empty. This usually means it has been created with an empty String.
Returns:
true if the wff is empty.

simplify

abstract void simplify()
Method to simplify a wff as far as possible (making calculations in parameters, or boolean calculations in OperatorWffs).

simplify

abstract void simplify(BeliefBase bb)
Method to simplify a wff as far as possible (making calculations in parameters, or boolean calculations in OperatorWffs), using the beliefbase, if necessary.
Parameters:
bb - the beliefbase.

toString

public abstract java.lang.String toString()
Method to get the wff in a printable form.
Overrides:
toString in class java.lang.Object
Returns:
String, the wff in a printable form.

toPrologString

abstract java.lang.String toPrologString()
Method to get the wff in a `Prolog friendly' form.
Returns:
String, the wff in a `Prolog friendly' form.

toPrologString

abstract java.lang.String toPrologString(java.util.Vector vars)
Method to get the wff in a `Prolog friendly' form.
Parameters:
vars - Vector of parameters to be subsituted by the Prolog engine.
Returns:
String, the wff in a `Prolog friendly' form.

3APL Agent Programming