Search in sources :

Example 6 with EventB

use of de.prob.animator.domainobjects.EventB in project prob2 by bendisposto.

the class UnsatMinimalCoreCommand method processResult.

@Override
public void processResult(ISimplifiedROMap<String, PrologTerm> bindings) {
    CompoundPrologTerm compoundTerm = BindingGenerator.getCompoundTerm(bindings.get(RESULT_VARIABLE), 0);
    String code = compoundTerm.getFunctor();
    if (pred instanceof EventB) {
        core = new EventB(code, FormulaExpand.EXPAND);
    } else {
        core = new ClassicalB(code, FormulaExpand.EXPAND);
    }
}
Also used : EventB(de.prob.animator.domainobjects.EventB) CompoundPrologTerm(de.prob.prolog.term.CompoundPrologTerm) ClassicalB(de.prob.animator.domainobjects.ClassicalB)

Example 7 with EventB

use of de.prob.animator.domainobjects.EventB in project prob2 by bendisposto.

the class PrimePredicateCommand method processResult.

@Override
public void processResult(final ISimplifiedROMap<String, PrologTerm> bindings) {
    CompoundPrologTerm compoundTerm = BindingGenerator.getCompoundTerm(bindings.get(PRIMED_PREDICATE_VARIABLE), 0);
    String code = compoundTerm.getFunctor();
    if (evalElement instanceof EventB) {
        result = new EventB(code, FormulaExpand.EXPAND);
    } else {
        result = new ClassicalB(code, FormulaExpand.EXPAND);
    }
}
Also used : EventB(de.prob.animator.domainobjects.EventB) CompoundPrologTerm(de.prob.prolog.term.CompoundPrologTerm) ClassicalB(de.prob.animator.domainobjects.ClassicalB)

Example 8 with EventB

use of de.prob.animator.domainobjects.EventB in project prob2 by bendisposto.

the class UnsatRegularCoreCommand method processResult.

@Override
public void processResult(ISimplifiedROMap<String, PrologTerm> bindings) {
    CompoundPrologTerm compoundTerm = BindingGenerator.getCompoundTerm(bindings.get(RESULT_VARIABLE), 0);
    String code = compoundTerm.getFunctor();
    if (pred instanceof EventB) {
        core = new EventB(code, FormulaExpand.EXPAND);
    } else {
        core = new ClassicalB(code, FormulaExpand.EXPAND);
    }
}
Also used : EventB(de.prob.animator.domainobjects.EventB) CompoundPrologTerm(de.prob.prolog.term.CompoundPrologTerm) ClassicalB(de.prob.animator.domainobjects.ClassicalB)

Example 9 with EventB

use of de.prob.animator.domainobjects.EventB in project prob2 by bendisposto.

the class WeakestPreconditionCommand method processResult.

@Override
public void processResult(final ISimplifiedROMap<String, PrologTerm> bindings) {
    CompoundPrologTerm compoundTerm = BindingGenerator.getCompoundTerm(bindings.get(WEAKEST_PRECONDITION_VARIABLE), 0);
    String code = compoundTerm.getFunctor();
    if (predicate instanceof EventB) {
        result = new EventB(code, FormulaExpand.EXPAND);
    } else {
        result = new ClassicalB(code, FormulaExpand.EXPAND);
    }
}
Also used : EventB(de.prob.animator.domainobjects.EventB) CompoundPrologTerm(de.prob.prolog.term.CompoundPrologTerm) ClassicalB(de.prob.animator.domainobjects.ClassicalB)

Example 10 with EventB

use of de.prob.animator.domainobjects.EventB in project prob2 by bendisposto.

the class ContextXmlHandler method addSet.

private void addSet(final Attributes attributes) {
    String name = attributes.getValue("name");
    de.prob.model.representation.Set bSet = new de.prob.model.representation.Set(new EventB(name, FormulaExpand.EXPAND));
    if (inInternalContext) {
        internalSets.add(bSet);
    } else {
        sets.add(bSet);
    }
}
Also used : Set(java.util.Set) EventB(de.prob.animator.domainobjects.EventB)

Aggregations

EventB (de.prob.animator.domainobjects.EventB)12 CompoundPrologTerm (de.prob.prolog.term.CompoundPrologTerm)5 ClassicalB (de.prob.animator.domainobjects.ClassicalB)4 AAbstractConstantsContextClause (de.be4.classicalb.core.parser.node.AAbstractConstantsContextClause)1 AConstantsContextClause (de.be4.classicalb.core.parser.node.AConstantsContextClause)1 PContextClause (de.be4.classicalb.core.parser.node.PContextClause)1 PExpression (de.be4.classicalb.core.parser.node.PExpression)1 EventBConstant (de.prob.model.eventb.EventBConstant)1 RecursiveDefinitionCase (de.prob.model.eventb.theory.RecursiveDefinitionCase)1 ArrayList (java.util.ArrayList)1 Set (java.util.Set)1