zeus.concepts.fn
Class ArithmeticFn

java.lang.Object
  extended byzeus.concepts.fn.ValueFunction
      extended byzeus.concepts.fn.ArithmeticFn
All Implemented Interfaces:
NumericFn

public class ArithmeticFn
extends ValueFunction
implements NumericFn

ArithmeticFn is used to store arthimetic over some condition - made some alterations for 1.2.1 so that the precondition unification bugs could be properly sorted (well, for the time being at least!) Si.


Field Summary
protected  ValueFunction[] args
           
static int DIVIDE
           
static java.lang.String[] legal_operands
           
static java.lang.String[] legal_unifiers
           
static int MINUS
           
protected  int op
           
static java.lang.String[] operators
           
static int PLUS
           
static int REM
           
static int TIMES
           
 
Fields inherited from class zeus.concepts.fn.ValueFunction
AND, ARITH, BOOL, COMP, CONS, CONSB, DATE, ELSE, FACT, FIELD, FUNC, ID, ID_MAX, ID_MIN, IMPLY, INT, IS_DETERMINATE, LAND, LNOT, LOR, LVAR, METH, METHOD_LIST, OR, PD_MAX, PD_MIN, precedence, REAL, TIME, TO_STRING, type, TYPE, VECT
 
Constructor Summary
ArithmeticFn(ValueFunction lhs, ValueFunction rhs, java.lang.String op)
           
 
Method Summary
 void debug(java.lang.String str)
           
 ValueFunction duplicate(DuplicationTable table)
           
 boolean equals(java.lang.Object any)
           
 ValueFunction evaluationFn()
           
(package private)  java.lang.Object getArg(int position)
           
 ValueFunction getLHS()
           
 int getOperator()
           
 ValueFunction getRHS()
           
 boolean isDeterminate()
           
 ValueFunction mirror()
           
(package private)  ValueFunction normalize()
           
 boolean references(ValueFunction var)
           
 ValueFunction resolve(ResolutionContext c, Bindings b)
           
 void resolve(java.lang.String attrName, ValueFunction val)
          resolve is here to handle unification for the postcondition to precondition maps - this will allow proper use of expressions when defining tasks.
(package private)  ValueFunction simplify()
           
 java.lang.String toString()
           
(package private)  ValueFunction unify(ValueFunction fn, Bindings b)
           
 java.util.Vector variables()
           
 
Methods inherited from class zeus.concepts.fn.ValueFunction
baseID, duplicate, getArg, getID, getPD, invokeMethod, resolve, unifiesWith
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PLUS

public static final int PLUS
See Also:
Constant Field Values

MINUS

public static final int MINUS
See Also:
Constant Field Values

TIMES

public static final int TIMES
See Also:
Constant Field Values

DIVIDE

public static final int DIVIDE
See Also:
Constant Field Values

REM

public static final int REM
See Also:
Constant Field Values

operators

public static final java.lang.String[] operators

legal_operands

public static final java.lang.String[] legal_operands

legal_unifiers

public static final java.lang.String[] legal_unifiers

args

protected ValueFunction[] args

op

protected int op
Constructor Detail

ArithmeticFn

public ArithmeticFn(ValueFunction lhs,
                    ValueFunction rhs,
                    java.lang.String op)
Method Detail

resolve

public void resolve(java.lang.String attrName,
                    ValueFunction val)
resolve is here to handle unification for the postcondition to precondition maps - this will allow proper use of expressions when defining tasks.

Since:
1.2.1

getLHS

public ValueFunction getLHS()

getRHS

public ValueFunction getRHS()

mirror

public ValueFunction mirror()
Specified by:
mirror in class ValueFunction

toString

public java.lang.String toString()

getOperator

public int getOperator()

simplify

ValueFunction simplify()
Overrides:
simplify in class ValueFunction

getArg

java.lang.Object getArg(int position)
Specified by:
getArg in class ValueFunction

references

public boolean references(ValueFunction var)
Specified by:
references in class ValueFunction

variables

public java.util.Vector variables()
Overrides:
variables in class ValueFunction

isDeterminate

public boolean isDeterminate()
Specified by:
isDeterminate in class ValueFunction

normalize

ValueFunction normalize()
Overrides:
normalize in class ValueFunction

resolve

public ValueFunction resolve(ResolutionContext c,
                             Bindings b)
Overrides:
resolve in class ValueFunction

evaluationFn

public ValueFunction evaluationFn()
Overrides:
evaluationFn in class ValueFunction

duplicate

public ValueFunction duplicate(DuplicationTable table)
Overrides:
duplicate in class ValueFunction

equals

public boolean equals(java.lang.Object any)

unify

ValueFunction unify(ValueFunction fn,
                    Bindings b)
Specified by:
unify in class ValueFunction

debug

public void debug(java.lang.String str)


Copyright © 2000-2003 BT Exact Technologies. All Rights Reserved.