Search in sources :

Example 1 with RecursiveDefinitionCase

use of de.prob.model.eventb.theory.RecursiveDefinitionCase in project prob2 by bendisposto.

the class TheoryExtractor method finishOperator.

private void finishOperator() {
    operator = operator.setDefinition(definition);
    operator = operator.addArguments(opArgs);
    typeEnv.add(operator.getFormulaExtension());
    operators = operators.addElement(operator);
    // extension for the operator is already defined
    if (recursiveDefinitions != null) {
        for (RecursiveDefinitionCase def : recursiveDefinitions) {
            def.parseCase(typeEnv);
        }
        recursiveDefinitions = null;
    }
}
Also used : RecursiveDefinitionCase(de.prob.model.eventb.theory.RecursiveDefinitionCase)

Example 2 with RecursiveDefinitionCase

use of de.prob.model.eventb.theory.RecursiveDefinitionCase 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();
}
Also used : RecursiveDefinitionCase(de.prob.model.eventb.theory.RecursiveDefinitionCase) EventB(de.prob.animator.domainobjects.EventB)

Aggregations

RecursiveDefinitionCase (de.prob.model.eventb.theory.RecursiveDefinitionCase)2 EventB (de.prob.animator.domainobjects.EventB)1