public final class Satisfies
extends java.lang.Object
Constructor and Description |
---|
Satisfies(ParamSymbol method,
StateType stype,
TaskFolder invariants,
java.util.Vector<TheorySymbol> theories,
Declaration[][] decls,
ErrorStream out)
Create a judgement processor.
|
Modifier and Type | Method and Description |
---|---|
static Formula |
andFormula(Formula formula1,
Formula formula2)
Combine formulas by conjunction.
|
static Formula |
andFormula(java.util.Vector<Formula> formulas)
Combine formulas by conjunction.
|
StatJudgement |
derive(Statement C)
Apply the judgement "se, Is, Vs |- C: F"
to compute the specification F of command C and
to generate proving tasks as a side effect
(see Section 4.12 of "A Program Calculus", se, Is, Vs are not needed
because identifiers have already been resolved to symbols).
|
static Formula |
existsFormula(TypedIdentifier[] vars,
Formula formula)
Bind variables in formula by existential quantification.
|
StatJudgement |
extendFrame(StatJudgement S,
java.util.Set<VariableSymbol> vars)
Extend judgement to the denoted set of modifiable variables.
|
static Formula |
forallFormula(TypedIdentifier[] vars,
Formula formula)
Bind variables in formula by universal quantification.
|
ExpressionLogic |
getExpressionLogic()
Get expression translator of this judgement processor
|
StateType |
getStateType()
Get the state type of this judgement processor
|
Type |
getStringType()
Get the string type of this judgement processor
|
static Formula |
ifThenElseFormula(Formula formula0,
Formula formula1,
Formula formula2)
Combine formulas by conditional selection.
|
static Formula |
impliesFormula(Formula formula1,
Formula formula2)
Combine formulas by implication.
|
static Formula |
notFormula(Formula formula)
Negate formula.
|
static Formula |
orFormula(Formula formula1,
Formula formula2)
Combine formulas by disjunction.
|
static PostVariable |
postVariable(Name name)
Construct a post-variable.
|
static PreVariable |
preVariable(Name name)
Construct a pre-variable.
|
static Reference |
reference(Identifier ident)
Construct a reference from an identifier setting also its type.
|
StateLiteral |
stateLiteral(boolean old)
Construct a state literal giving it the current state type.
|
StateMessage |
stateMessage(Term state)
Construct a state message term.
|
StateValue |
stateValue(Term state)
Construct a state value term.
|
public Satisfies(ParamSymbol method, StateType stype, TaskFolder invariants, java.util.Vector<TheorySymbol> theories, Declaration[][] decls, ErrorStream out)
method
- the method in which the judged commands arise.stype
- the type of the state for the context of a command.invariants
- the folder to which to add invariant tasks.theories
- the referenced theories (first is base theory)decls
- a sequence of declaration lists.out
- the stream to which to write error messages.public StateType getStateType()
public Type getStringType()
public ExpressionLogic getExpressionLogic()
public StatJudgement extendFrame(StatJudgement S, java.util.Set<VariableSymbol> vars)
S
- the judgement.vars
- the set of modifiable variablespublic StatJudgement derive(Statement C)
C
- the command Cpublic static Reference reference(Identifier ident)
ident
- an identifier denoting a value.public StateLiteral stateLiteral(boolean old)
old
- true if it is the old state (the new state, otherwise)public StateValue stateValue(Term state)
state
- the state.public StateMessage stateMessage(Term state)
state
- the state.public static PreVariable preVariable(Name name)
name
- the name of the variable.public static PostVariable postVariable(Name name)
name
- the name of the variable.public static Formula forallFormula(TypedIdentifier[] vars, Formula formula)
vars
- the variables.formula
- the formula.public static Formula existsFormula(TypedIdentifier[] vars, Formula formula)
vars
- the variables.formula
- the formula.public static Formula andFormula(Formula formula1, Formula formula2)
formula1
- the first formula (may be null, representing TRUE).formula2
- the second formula (may be null, representing TRUE).public static Formula andFormula(java.util.Vector<Formula> formulas)
formulas
- the formulas (each may be null, representing TRUE).public static Formula impliesFormula(Formula formula1, Formula formula2)
formula1
- the first formula (may be null, representing TRUE).formula2
- the second formula (may be null, representing TRUE).public static Formula orFormula(Formula formula1, Formula formula2)
formula1
- the first formula (may be null, representing FALSE).formula2
- the second formula (may be null, representing FALSE).public static Formula notFormula(Formula formula)
formula
- the first formula (may be null, representing TRUE).public static Formula ifThenElseFormula(Formula formula0, Formula formula1, Formula formula2)
formula0
- the selection formula (may be null, representing TRUE).formula1
- the first formula (may be null, representing TRUE).formula2
- the second formula (may be null, representing TRUE).