Search in sources :

Example 61 with CompoundPrologTerm

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

the class PrologGeneratorTest method testNext.

@Test
public void testNext() throws Exception {
    final PrologTerm expected = new CompoundPrologTerm("next", TERM_TRUE);
    check("X 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 62 with CompoundPrologTerm

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

the class PrologGeneratorTest method testAvailable.

@Test
public void testAvailable() throws Exception {
    final PrologTerm transPred = new CompoundPrologTerm("bla");
    final PrologTerm wrapped = new CompoundPrologTerm("dtrans", transPred);
    final PrologTerm available = new CompoundPrologTerm("available", wrapped);
    final PrologTerm expected = new CompoundPrologTerm("ap", available);
    check("Av(bla)", 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 63 with CompoundPrologTerm

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

the class PrologGeneratorTest method testAnd.

@Test
public void testAnd() throws Exception {
    final PrologTerm expected = new CompoundPrologTerm("and", TERM_TRUE, TERM_FALSE);
    check("true &  false", 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 64 with CompoundPrologTerm

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

the class PrologGeneratorTest method testNot.

@Test
public void testNot() throws Exception {
    final PrologTerm expected = new CompoundPrologTerm("not", TERM_TRUE);
    check("not 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 65 with CompoundPrologTerm

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

the class PrologGeneratorTest method testDLK.

@Test
public void testDLK() throws Exception {
    final PrologTerm transPred = new CompoundPrologTerm("bla");
    final PrologTerm wrapped = new CompoundPrologTerm("dtrans", transPred);
    final PrologTerm args = new ListPrologTerm(wrapped);
    final PrologTerm dlk = new CompoundPrologTerm("dlk", args);
    final PrologTerm expected = new CompoundPrologTerm("ap", dlk);
    check("deadlock( bla)", expected);
}
Also used : ListPrologTerm(de.prob.prolog.term.ListPrologTerm) 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

CompoundPrologTerm (de.prob.prolog.term.CompoundPrologTerm)90 PrologTerm (de.prob.prolog.term.PrologTerm)79 ListPrologTerm (de.prob.prolog.term.ListPrologTerm)74 Test (org.junit.Test)62 IntegerPrologTerm (de.prob.prolog.term.IntegerPrologTerm)8 StructuredPrologOutput (de.prob.prolog.output.StructuredPrologOutput)7 ClassicalB (de.prob.animator.domainobjects.ClassicalB)6 VariablePrologTerm (de.prob.prolog.term.VariablePrologTerm)6 EventB (de.prob.animator.domainobjects.EventB)5 Transition (de.prob.statespace.Transition)5 ArrayList (java.util.ArrayList)4 AbstractEvalResult (de.prob.animator.domainobjects.AbstractEvalResult)3 EvalResult (de.prob.animator.domainobjects.EvalResult)3 IEvalElement (de.prob.animator.domainobjects.IEvalElement)3 ISimplifiedROMap (de.prob.parser.ISimplifiedROMap)3 ComputationNotCompletedResult (de.prob.animator.domainobjects.ComputationNotCompletedResult)2 IPrologTermOutput (de.prob.prolog.output.IPrologTermOutput)2 BigInteger (java.math.BigInteger)2 Collections (java.util.Collections)2 BParser (de.be4.classicalb.core.parser.BParser)1