Search in sources :

Example 1 with ARefinesModelClause

use of de.be4.classicalb.core.parser.node.ARefinesModelClause in project prob2 by bendisposto.

the class EventBMachineTranslator method translateMachine.

public Node translateMachine() {
    AEventBModelParseUnit ast = new AEventBModelParseUnit();
    ast.setName(new TIdentifierLiteral(machine.getName()));
    List<PModelClause> clauses = new ArrayList<>();
    clauses.add(processContexts());
    ARefinesModelClause refines = processRefines();
    if (refines != null) {
        clauses.add(refines);
    }
    clauses.add(processVariables());
    clauses.addAll(processInvariantsAndTheorems());
    AVariantModelClause variant = processVariant();
    if (variant != null) {
        clauses.add(variant);
    }
    clauses.add(processEvents());
    ast.setModelClauses(clauses);
    return ast;
}
Also used : ARefinesModelClause(de.be4.classicalb.core.parser.node.ARefinesModelClause) AEventBModelParseUnit(de.be4.classicalb.core.parser.node.AEventBModelParseUnit) PModelClause(de.be4.classicalb.core.parser.node.PModelClause) AVariantModelClause(de.be4.classicalb.core.parser.node.AVariantModelClause) ArrayList(java.util.ArrayList) TIdentifierLiteral(de.be4.classicalb.core.parser.node.TIdentifierLiteral)

Aggregations

AEventBModelParseUnit (de.be4.classicalb.core.parser.node.AEventBModelParseUnit)1 ARefinesModelClause (de.be4.classicalb.core.parser.node.ARefinesModelClause)1 AVariantModelClause (de.be4.classicalb.core.parser.node.AVariantModelClause)1 PModelClause (de.be4.classicalb.core.parser.node.PModelClause)1 TIdentifierLiteral (de.be4.classicalb.core.parser.node.TIdentifierLiteral)1 ArrayList (java.util.ArrayList)1