use of org.sireum.hamr.ir.BTSAction in project osate-plugin by sireum.
the class BAVisitor method caseBehaviorActionBlock.
@Override
public Boolean caseBehaviorActionBlock(BehaviorActionBlock object) {
BehaviorTime bt = object.getTimeout();
assert bt == null : "Need to handle " + bt;
visit(object.getContent());
Object r = pop();
if (r instanceof BTSBehaviorActions) {
push(r);
} else {
BTSAction baa = (BTSAction) r;
Option<BTSAssertion> pre = toNone();
Option<BTSAssertion> post = toNone();
BTSAssertedAction baa2 = BTSAssertedAction$.MODULE$.apply(pre, baa, post);
push(BTSBehaviorActions$.MODULE$.apply(Sequential, VisitorUtil.toISZ(baa2)));
}
return false;
}
use of org.sireum.hamr.ir.BTSAction in project osate-plugin by sireum.
the class BAVisitor method caseBehaviorActionCollection.
@Override
public Boolean caseBehaviorActionCollection(BehaviorActionCollection object) {
List<BTSAssertedAction> actions = new ArrayList<>();
for (BehaviorAction ba : object.getActions()) {
visit(ba);
BTSAction action = pop();
// NA for BA
Option<BTSAssertion> pre = toNone();
// NA for BA
Option<BTSAssertion> post = toNone();
actions.add(BTSAssertedAction$.MODULE$.apply(pre, action, post));
}
// TODO: how to determine execution order
push(BTSBehaviorActions$.MODULE$.apply(Sequential, VisitorUtil.toISZ(actions)));
return false;
}
Aggregations