public StateInvariantObligation(AAtomicStm atom, IPOContextStack ctxt,
IPogAssistantFactory af) throws AnalysisException
{
super(atom, POType.STATE_INV, ctxt, atom.getLocation(), af);
assistantFactory = af;
PExp invApplyExp = makeInvApplyExp(atom);
PExp invApplyExpForSub = invApplyExp.clone();
List<Substitution> subs = new LinkedList<Substitution>();
for (AAssignmentStm asgn : atom.getAssignments())
{
String hash = asgn.getTarget().apply(af.getStateDesignatorNameGetter());
subs.add(new Substitution(hash, asgn.getExp().clone()));
}
IVariableSubVisitor varSubVisitor = af.getVarSubVisitor();
for (Substitution sub : subs)
{
invApplyExpForSub = invApplyExpForSub.apply(varSubVisitor, sub);
}
stitch = AstExpressionFactory.newAImpliesBooleanBinaryExp(invApplyExp, invApplyExpForSub);
valuetree.setPredicate(stitch);
}