Skip to content

Commit

Permalink
Progress
Browse files Browse the repository at this point in the history
  • Loading branch information
mondokm committed Sep 13, 2022
1 parent 01efc6f commit d0409f3
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,18 +87,19 @@ public XSTS instantiate(){
if(varDeclContext.CTRL()!=null) ctrlVars.add(var);
if(varDeclContext.initValue!=null){
initExprs.add(Eq(var.getRef(),new XstsExpression(this,typeTable,varDeclContext.initValue).instantiate(env)));
} else {
initExprs.add(varToType.get(var).createBoundExpr(var));
}
env.define(symbol,var);
}

final Expr<BoolType> initFormula = ExprUtils.simplify(And(initExprs));

final NonDetStmt tranSet = new XstsTransitionSet(this,typeTable,context.tran.transitionSet(), varToType).instantiate(env);
final NonDetStmt initSet = new XstsTransitionSet(this,typeTable,context.init.transitionSet(), varToType).instantiate(env);
final NonDetStmt envSet = new XstsTransitionSet(this,typeTable,context.env.transitionSet(), varToType).instantiate(env);

for(VarDecl varDecl: varToType.keySet()){
initExprs.add(varToType.get(varDecl).createBoundExpr(varDecl));
}
final Expr<BoolType> initFormula = ExprUtils.simplify(And(initExprs));

final Expr<BoolType> prop = cast(new XstsExpression(this,typeTable,context.prop).instantiate(env),Bool());

return new XSTS(varToType,ctrlVars,initSet,tranSet,envSet,initFormula,prop);
Expand Down

0 comments on commit d0409f3

Please sign in to comment.