Id of the formula: IntId 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: FormulaGuard to be added to the already existing guard
Applicability Conditions
Head node should be a formula node
Guard should be a valid program expression
Init4
Tactic used to specify the program to be derived
Input Parameters
Derivation Name: StringName 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: FormulaPrecondition of the program
Postcondition: FormulaPostcondition 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: VarA new variable to be introduced.
Initial value: TermInitial 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.
IntroIf
Introduces an IF program construct
Input Parameters
guards: List[Formula]List of guards in the IF program
Applicability Conditions
Head node should be an Unknown Program node
Notes
If the given guards do not cover all the cases, then additional guarded commands can be derived
using the StepIntoIFBA tactic.
IntroSwap
Introduce an Array swap statement
Input Parameters
Array Variable: ArrayArray whose elements are to be swapped.
index1: IntFirst index
index2: IntSecond index
Applicability Conditions
The head node should be an UnknownProg.
The proof obligation for the array swap statement should be valid.
OnePoint
OnePoint
Input Parameters
Id of the formula: IntId of the quantified formula
Applicability Conditions
Head node should be a formula node
QDistributivity
QDistributivity
Input Parameters
Id of the formula: IntId of the quantified formula
Applicability Conditions
Head node should be a formula node
RangeSplit
RangeSplit
Input Parameters
Id of the formula: IntId of the quantified formula
Applicability Conditions
Head node should be a formula node
ReplaceFormula
Replace a formula with equivalent formula.
Input Parameters
New formula: FormulaNew 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: IntId of the subformula to be replaced
newSubF: Formulanew 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: TermTerm to be replaced by a fresh variable.
New Variable: VarA new variable which will replace the term.
Initial value: TermInitial value for the variable.
Bounds: FormulaBounds on the new variable.
Applicability Conditions
Head node should be a program node
RTVInPost2
Replaces a specific occurrence of a term in the postcondition by a new variable.
Input Parameters
DisplayId of a term in postcondition: IntDisplayId of the term to be replaced by a fresh variable
New Variable: VarA new variable which will replace the term.
Initial value: TermInitial value for the variable.
Bounds: FormulaBounds 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
StepIntoBA
Steps into Before-After predicate for the program
Input Parameters
lhsVars: List[Var]List of lvariables in the desired program
Applicability Conditions
Head node should be an UnknownProgram node
Notes
In the formula mode, use GuessGuard tactic to guess the guards of the "If". If no guards are guessed
then assignment program is constructed on Stepout.
Use InstantiateMeta tactic to instantiate the meta variables
You can stepout even when you have not instantiated all the metavariables. In this case, an unknown program
is created before the synthesized program to establish the remaining metavariables
StepIntoIFBA
Steps into Before-After predicate of the IF program. Used to derive additional guarded commands.
Input Parameters
lhsVars: List[Var]List of lvariables in the desired guarded commands
Applicability Conditions
Head node should be If Program node
Notes
This tactic is useful when the guards of a If program do not cover all the cases and you want
to derive additional guarded commands.
Derived guarded commands are added to the if construct on stepout.
Use InstantiateMeta tactic to instantiate the meta variables
You can stepout even when you have not instantiated all the metavariables. In this case, an unknown program
is created before the synthesized program to establish the remaining metavariables
StepIntoSubFormula
StepIntoSubFormula
Input Parameters
subId: IntId of the subformula
Applicability Conditions
Head node should be a formula node
StepIntoSubProg
Step into the subprogram with given display id.
Input Parameters
DisplayId: IntDisplayId 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: IntDisplayId 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: IntIdx 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: IntId of the quantified formula
Id of the formula to be moved: IntId of the subformula that needs to be moved from Range to the Term