use of de.be4.classicalb.core.parser.node.ATheoremsModelClause in project prob2 by bendisposto.
the class EventBMachineTranslator method processInvariantsAndTheorems.
private List<PModelClause> processInvariantsAndTheorems() {
List<PModelClause> invsAndTheorems = new ArrayList<>();
List<PPredicate> invs = new ArrayList<>();
List<PPredicate> thms = new ArrayList<>();
List<EventBInvariant> allInvs = machine.getInvariants();
for (EventBInvariant ebInv : allInvs) {
PPredicate ppred = (PPredicate) ((EventB) ebInv.getPredicate()).getAst();
nodeInfos.put(ppred, new Tuple2<>(machine.getName(), ebInv.getName()));
if (ebInv.isTheorem()) {
thms.add(ppred);
} else {
invs.add(ppred);
}
}
invsAndTheorems.add(new AInvariantModelClause(invs));
invsAndTheorems.add(new ATheoremsModelClause(thms));
return invsAndTheorems;
}
Aggregations