AssumePre
Assumes a precondition in a formula mode. An UnknownProg is created on stepout to establish the precondition.
Input Parameters
Fresh Variables:
List[Var]
Fresh variables to be introduced.
Assumed Precondition:
Formula
A precondition to be assumed.
Applicability Conditions
Head node should be a formula node
Head node should be part of "If" program derivation
DeleteConjunct
Introduces a while loop by applying the "Delete Conjuct" heuristics
Input Parameters
Conjuct:
Formula
Conjuct to be deleted to get the invariant. Negation of this conjuct becomes the guard of the while loop
Variant:
Integer Term
Variant of the while loop.
Transformation Details
DeleteConjunct
Conjuct
C
:
PSBool
Variant
V
:
PSInt
doc
ooo
1
-1
None
A
:
PSBool
UnknownProg(1)
None
B
:
PSBool
∧
C
:
PSBool
ooo
5
-1
None
A
:
PSBool
ooo
2
-1
None
A
:
PSBool
UnknownProg(2)
None
B
:
PSBool
ooo
4
-1
None
B
:
PSBool
while
B
:
PSBool
¬
C
:
PSBool
——→
ooo
3
-1
None
B
:
PSBool
∧
¬
C
:
PSBool
UnknownProg(3)
None
B
:
PSBool
None
B
:
PSBool
∧
C
:
PSBool
None
B
:
PSBool
∧
C
:
PSBool
Applicability Conditions
Head node should be a program node
Distributivity
Distributivity
Input Parameters
Id of the formula:
Int
Id of the formula to which the tactic is to be applied.
Applicability Conditions
Head node should be a formula node
EmptyRange
EmptyRange
Input Parameters
Id of the formula:
Int
Applicability Conditions
Head node should be a formula node
GuessGuard
Guess a guard in the formula mode. Strengthens the already existing guard with the new guard.
Input Parameters
Guard:
Formula
Guard to be added to the already existing guard
Applicability Conditions
Head node should be a formula node
Head node should be part of a "If" program derivation
Guard should be a valid program expression
Init4
Tactic used to specify the program to be derived
Input Parameters
Derivation Name:
String
Name of the derivation
Constants:
List[String]
List of the constants
Variables:
List[String]
List of the variables
Global Invariants:
List[Formula]
Invariants that should hold through out the program. Typically the assertions involving constants.
Precondition:
Formula
Precondition of the program
Postcondition:
Formula
Postcondition of the program
Applicability Conditions
Head node should be the root node
InsertVariable
Introduce a variable declaration before the active program.
Input Parameters
New variable:
Var
A new variable to be introduced.
Initial value:
Term
Initial value to be assigned to the new variable
Applicability Conditions
Head node should be a program node
Variable name should be fresh
The initial value should be of same type as that of the variable type
InstantiateMeta
Instantiate the meta variables
Input Parameters
Meta variables and term pairs:
List[(Var, Term)]
Meta variables and corresponding instantiation terms
Applicability Conditions
Head node should be a formula node.
The metavariable should be present in the context variables.
the context assumptions should be metavariable free
IntroAssignment
Introduce an assignment program
Input Parameters
Variable and term pairs:
List[(Var, Program Term)]
Variables and the correpsonding program expressions that should be assigned to the variables.
Applicability Conditions
The head node should be an UnknownProg.
The variables should be already defined.
The term should be valid program expressions.
The proof obligation for the assignment statement should be valid.
OnePoint
OnePoint
Input Parameters
Id of the formula:
Int
Id of the quantified formula
Applicability Conditions
Head node should be a formula node
QDistributivity
QDistributivity
Input Parameters
Id of the formula:
Int
Id of the quantified formula
Applicability Conditions
Head node should be a formula node
RangeSplit
RangeSplit
Input Parameters
Id of the formula:
Int
Id of the quantified formula
Applicability Conditions
Head node should be a formula node
ReplaceFormula
Replace a formula with equivalent formula.
Input Parameters
New formula:
Formula
New equivalent formula.
Applicability Conditions
Head node should be a formula node.
The head formula and the new formula should be equivalent.
ReplaceSubFormula
Replaces a subformula with an equivalent formula
Input Parameters
oldSubFId:
Int
Id of the subformula to be replaced
newSubF:
Formula
new formula
Applicability Conditions
Head node should be a formula node
oldSubF should be equivalent to the newSubF under the given context
Notes
The context of the subformula is not used for checking the equivalence.
RTVInPost
Replaces a term in the postcondition by a new variable.
Input Parameters
Term to be replaced:
Term
Term to be replaced by a fresh variable.
New Variable:
Var
A new variable which will replace the term.
Initial value:
Term
Initial value for the variable.
Bounds:
Formula
Bounds on the new variable.
Applicability Conditions
Head node should be a program node
SimplifyAutoTactic
Applicability Conditions
Head node should be a formula node
Simplify
Simplifies the formula by eliminating "True" and "False" subformulas
Applicability Conditions
Head node should be a formula node
StartAsgnDerivation
Starts derivation of assignment program construct
Input Parameters
lhsVars:
List[Var]
List of variables for which you want to derive an assignment program
Applicability Conditions
Head node should be an UnknownProgram node
StartGCmdDerivation
Starts assignment of a guarded command in the derivation of an "If" construct
Applicability Conditions
Should follow the StartIfDerivation tactic application
StartIfDerivation
Starts derivation for a "If" program construct
Input Parameters
lhsVars:
List[Var]
List of lvariables in the "If" program
Applicability Conditions
Head node should be an UnknownProgram node
StepIntoPO
StepIntoPO
Applicability Conditions
Head node should be the StartAsgnDerivation node
StepIntoSubFormula
StepIntoSubFormula
Input Parameters
subId:
Int
Id of the subformula
Applicability Conditions
Head node should be a formula node
StepIntoSubProg
Step into the subprogram with given display id.
Input Parameters
DisplayId:
Int
DisplayId of the subprogram
Applicability Conditions
Head node should be a program node
DisplayId should a valid program display id.
StepIntoSubProg
Step into the subprogram with given display id.
Input Parameters
DisplayId:
Int
DisplayId of the subprogram
Applicability Conditions
Head node should be a program node
DisplayId should a valid program display id.
StepIntoUnknownProgIdx
Steps into the "Idx"th UnknwonProgram
Input Parameters
Idx of the formula:
Int
Idx of the formula
Applicability Conditions
Head node should be a program node
StepOut
StepOut
Applicability Conditions
There should be some ancestor StepIn node that is not yet stepped out.
StrengthenInvariant
Strengthens invariant of a while loop
Input Parameters
Additional Loop Invariants:
List[Formula]
Additional loop invariants for the while loop.
Applicability Conditions
Head node should be a While program node
TradingMoveToTerm
TradingMoveToTerm
Input Parameters
Id of the formula:
Int
Id of the quantified formula
Id of the formula to be moved:
Int
Id of the subformula that needs to be moved from Range to the Term
Applicability Conditions
Head node should be a formula node