Search in sources :

Example 71 with PrologTerm

use of de.prob.prolog.term.PrologTerm in project probparsers by bendisposto.

the class PrologGeneratorTest method testStrongFairAll.

@Test
public void testStrongFairAll() throws Exception {
    final PrologTerm ap = new CompoundPrologTerm("all");
    final PrologTerm strong_assumption = new CompoundPrologTerm("strongassumptions", ap);
    final PrologTerm expected = new CompoundPrologTerm("fairnessimplication", strong_assumption, TERM_TRUE);
    check("SEF => true", expected);
}
Also used : CompoundPrologTerm(de.prob.prolog.term.CompoundPrologTerm) CompoundPrologTerm(de.prob.prolog.term.CompoundPrologTerm) ListPrologTerm(de.prob.prolog.term.ListPrologTerm) PrologTerm(de.prob.prolog.term.PrologTerm) Test(org.junit.Test)

Example 72 with PrologTerm

use of de.prob.prolog.term.PrologTerm in project probparsers by bendisposto.

the class PrologGeneratorTest method testWeakStrongFairAll1.

@Test
public void testWeakStrongFairAll1() throws Exception {
    final PrologTerm transPred1 = new CompoundPrologTerm("bla");
    final PrologTerm wrapped1 = new CompoundPrologTerm("dtrans", transPred1);
    final PrologTerm sf1 = new CompoundPrologTerm("strong_fair", wrapped1);
    final PrologTerm ap1 = new CompoundPrologTerm("ap", sf1);
    final PrologTerm ap = new CompoundPrologTerm("all");
    final PrologTerm weak_assumption = new CompoundPrologTerm("weakassumptions", ap);
    final PrologTerm strong_assumption = new CompoundPrologTerm("strongassumptions", ap1);
    final PrologTerm and = new CompoundPrologTerm("and", strong_assumption, weak_assumption);
    final PrologTerm expected = new CompoundPrologTerm("fairnessimplication", and, TERM_TRUE);
    check("sf(bla) & WEF => true", expected);
}
Also used : CompoundPrologTerm(de.prob.prolog.term.CompoundPrologTerm) CompoundPrologTerm(de.prob.prolog.term.CompoundPrologTerm) ListPrologTerm(de.prob.prolog.term.ListPrologTerm) PrologTerm(de.prob.prolog.term.PrologTerm) Test(org.junit.Test)

Example 73 with PrologTerm

use of de.prob.prolog.term.PrologTerm in project probparsers by bendisposto.

the class PrologGeneratorTest method testSink.

@Test
public void testSink() throws Exception {
    PrologTerm sink = new CompoundPrologTerm("sink");
    final PrologTerm expected = new CompoundPrologTerm("ap", sink);
    check("sink", expected);
}
Also used : CompoundPrologTerm(de.prob.prolog.term.CompoundPrologTerm) CompoundPrologTerm(de.prob.prolog.term.CompoundPrologTerm) ListPrologTerm(de.prob.prolog.term.ListPrologTerm) PrologTerm(de.prob.prolog.term.PrologTerm) Test(org.junit.Test)

Example 74 with PrologTerm

use of de.prob.prolog.term.PrologTerm in project probparsers by bendisposto.

the class PrologGeneratorTest method testDeadlock.

@Test
public void testDeadlock() throws Exception {
    PrologTerm deadlock = new CompoundPrologTerm("deadlock");
    check("deadlock", new CompoundPrologTerm("ap", deadlock));
}
Also used : CompoundPrologTerm(de.prob.prolog.term.CompoundPrologTerm) CompoundPrologTerm(de.prob.prolog.term.CompoundPrologTerm) ListPrologTerm(de.prob.prolog.term.ListPrologTerm) PrologTerm(de.prob.prolog.term.PrologTerm) Test(org.junit.Test)

Example 75 with PrologTerm

use of de.prob.prolog.term.PrologTerm in project probparsers by bendisposto.

the class PrologGeneratorTest method testWeakUntil.

@Test
public void testWeakUntil() throws Exception {
    final PrologTerm expected = new CompoundPrologTerm("weakuntil", TERM_FALSE, TERM_TRUE);
    check("false W      true ", expected);
}
Also used : CompoundPrologTerm(de.prob.prolog.term.CompoundPrologTerm) CompoundPrologTerm(de.prob.prolog.term.CompoundPrologTerm) ListPrologTerm(de.prob.prolog.term.ListPrologTerm) PrologTerm(de.prob.prolog.term.PrologTerm) Test(org.junit.Test)

Aggregations

PrologTerm (de.prob.prolog.term.PrologTerm)103 ListPrologTerm (de.prob.prolog.term.ListPrologTerm)86 CompoundPrologTerm (de.prob.prolog.term.CompoundPrologTerm)85 Test (org.junit.Test)64 IntegerPrologTerm (de.prob.prolog.term.IntegerPrologTerm)11 StructuredPrologOutput (de.prob.prolog.output.StructuredPrologOutput)10 VariablePrologTerm (de.prob.prolog.term.VariablePrologTerm)8 Transition (de.prob.statespace.Transition)5 IEvalElement (de.prob.animator.domainobjects.IEvalElement)4 ArrayList (java.util.ArrayList)4 CheckBooleanPropertyCommand (de.prob.animator.command.CheckBooleanPropertyCommand)3 AbstractEvalResult (de.prob.animator.domainobjects.AbstractEvalResult)3 EvalResult (de.prob.animator.domainobjects.EvalResult)3 ISimplifiedROMap (de.prob.parser.ISimplifiedROMap)3 IPrologTermOutput (de.prob.prolog.output.IPrologTermOutput)3 RecursiveMachineLoader (de.be4.classicalb.core.parser.analysis.prolog.RecursiveMachineLoader)2 LtlParseException (de.be4.ltl.core.parser.LtlParseException)2 ClassicalB (de.prob.animator.domainobjects.ClassicalB)2 ComputationNotCompletedResult (de.prob.animator.domainobjects.ComputationNotCompletedResult)2 StateError (de.prob.animator.domainobjects.StateError)2