public final class Formula
extends java.lang.Object
Constructor and Description |
---|
Formula(ProofState state,
Expression formula,
boolean isGoal)
construct a formula from an expression
|
Formula(ProofState state,
Formula formula)
construct a copy of the given formula in the denoted state
|
Modifier and Type | Method and Description |
---|---|
Expression |
getExpression()
Get formula expression.
|
java.lang.String |
getLabel()
get formula label
|
ProofState |
getState()
Get proof state of formula.
|
boolean |
isGoal()
get formula isGoal
|
void |
print(java.io.PrintWriter out)
print formula on output stream as "[label] formula"
|
void |
setExpression(Expression formula)
Set formula expression.
|
static Formula[] |
toArray(java.util.Vector<Formula> v)
converts vector v of Formula objects to array
|
public Formula(ProofState state, Expression formula, boolean isGoal)
state
- the proof state in which the formula occursformula
- the expression representing the formulaisGoal
- true if formula is a goal, false, if it is an assumption.public Formula(ProofState state, Formula formula)
state
- the proof state in which the new formula occursformula
- a given formulapublic ProofState getState()
public Expression getExpression()
public void setExpression(Expression formula)
formula
- the formula expressionpublic java.lang.String getLabel()
public boolean isGoal()
public void print(java.io.PrintWriter out)
out
- the stream on which to print the formula