use of de.prob.animator.domainobjects.EventB in project prob2 by bendisposto.
the class BeforeAfterPredicateCommand method processResult.
@Override
public void processResult(final ISimplifiedROMap<String, PrologTerm> bindings) {
CompoundPrologTerm compoundTerm = BindingGenerator.getCompoundTerm(bindings.get(BA_PRED_VARIABLE), 0);
String code = compoundTerm.getFunctor();
result = new EventB(code, FormulaExpand.EXPAND);
}
use of de.prob.animator.domainobjects.EventB in project prob2 by bendisposto.
the class TheoryExtractor method addGiven.
private void addGiven(final Attributes attributes) {
String predicate = attributes.getValue("org.eventb.core.predicate");
given.add(new EventB(predicate, typeEnv, FormulaExpand.EXPAND));
}
use of de.prob.animator.domainobjects.EventB in project prob2 by bendisposto.
the class TheoryTranslator method printRecursiveDefinition.
private void printRecursiveDefinition(final RecursiveOperatorDefinition definition, final IPrologTermOutput pto) {
EventB inductiveArgument = definition.getInductiveArgument();
pto.openList();
ModelElementList<RecursiveDefinitionCase> cases = definition.getCases();
for (RecursiveDefinitionCase c : cases) {
printRecursiveCase(inductiveArgument, c, pto);
}
pto.closeList();
}
use of de.prob.animator.domainobjects.EventB in project prob2 by bendisposto.
the class RecursiveDefinitionCase method parseCase.
public void parseCase(final Set<IFormulaExtension> typeEnv) {
expression = new EventB(expressionString, typeEnv, FormulaExpand.EXPAND);
formula = new EventB(formulaString, typeEnv, FormulaExpand.EXPAND);
}
use of de.prob.animator.domainobjects.EventB in project prob2 by bendisposto.
the class ContextTranslator method processConstants.
private List<PContextClause> processConstants() {
List<PContextClause> constants = new ArrayList<>();
List<PExpression> concrete = new ArrayList<>();
List<PExpression> abstractC = new ArrayList<>();
for (EventBConstant eventBConstant : context.getConstants()) {
if (eventBConstant.isAbstract()) {
abstractC.add((PExpression) ((EventB) eventBConstant.getExpression()).getAst());
} else {
concrete.add((PExpression) ((EventB) eventBConstant.getExpression()).getAst());
}
}
constants.add(new AConstantsContextClause(concrete));
constants.add(new AAbstractConstantsContextClause(abstractC));
return constants;
}
Aggregations