Package eu.simuline.relana.expressions
Class Formula
- java.lang.Object
-
- eu.simuline.relana.expressions.Formula
-
- Direct Known Subclasses:
Formula.Comp
,Formula.Const
,Formula.Var
public abstract class Formula extends Object
Represents a formula which is either a constant, a variable or composed via an operator. In contrast to a formula declaration represented byFormulaDecl
, a formula is within the context of anSInstance
. Created: Fri Apr 29 10:56:37 2005- Version:
- 1.0
- Author:
- Ernst Reissner
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Formula.Comp
Represents a compound formula, i.e. one defined via an operation.static class
Formula.Const
Represents a constant interpreted as atomic formula.static class
Formula.Var
Represents a variable interpreted as atomic formula.
-
Field Summary
Fields Modifier and Type Field Description static Formula
EMPTY_EXPRESSION
-
Constructor Summary
Constructors Modifier Constructor Description private
Formula()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Formula
add(SInstance serv, Deficiency def)
boolean
equals(Object obj)
abstract Set<Deficiency>
getConst()
Returns the constant represented by this formula, if any.static Formula
getFormula(Operation.Eval oper, Set<Formula> args)
abstract Set<Deficiency>
getMax()
abstract Set<Deficiency>
getMin()
abstract Set<SInstance>
getVars()
int
hashCode()
static void
main(String[] args)
abstract Formula
remove(SInstance serv, Deficiency def)
abstract Formula
substitute(SInstance serv, Formula form)
-
-
-
Field Detail
-
EMPTY_EXPRESSION
public static final Formula EMPTY_EXPRESSION
-
-
Method Detail
-
getFormula
public static Formula getFormula(Operation.Eval oper, Set<Formula> args)
-
remove
public abstract Formula remove(SInstance serv, Deficiency def)
-
add
public abstract Formula add(SInstance serv, Deficiency def)
-
getConst
public abstract Set<Deficiency> getConst()
Returns the constant represented by this formula, if any. If this is not a constant formula, i.e. an instance ofFormula.Const
, thennull
is returned.- Returns:
-
The constant represented by this formula
if this is an instance of
Formula.Const
. -
null
otherwise.
-
The constant represented by this formula
if this is an instance of
-
getMin
public abstract Set<Deficiency> getMin()
-
getMax
public abstract Set<Deficiency> getMax()
-
main
public static final void main(String[] args)
-
-