Search in sources :

Example 1 with CompoundPrologTerm

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

the class PrologGeneratorTest method testGlobally.

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

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

the class PrologGeneratorTest method testSince.

@Test
public void testSince() throws Exception {
    final PrologTerm expected = new CompoundPrologTerm("since", TERM_FALSE, TERM_TRUE);
    check("false S 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 3 with CompoundPrologTerm

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

the class PrologGeneratorTest method testYesterday.

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

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

the class PrologGeneratorTest method testExistsImplication.

@Test
public void testExistsImplication() throws Exception {
    final PrologTerm id = new CompoundPrologTerm("x");
    // ap(dpred(blubb))
    final PrologTerm pred = new CompoundPrologTerm("blubb");
    final PrologTerm dpred = new CompoundPrologTerm("dpred", pred);
    final PrologTerm ap = new CompoundPrologTerm("ap", dpred);
    // G [x]
    final PrologTerm transPred = new CompoundPrologTerm("x");
    final PrologTerm wrapped2 = new CompoundPrologTerm("dtrans", transPred);
    final PrologTerm action = new CompoundPrologTerm("action", wrapped2);
    final PrologTerm glob = new CompoundPrologTerm("globally", action);
    final PrologTerm expected = new CompoundPrologTerm("exists", id, ap, glob);
    check("#x. ( {blubb} & G [x])", 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 5 with CompoundPrologTerm

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

the class PrologGeneratorTest method testCurrent.

@Test
public void testCurrent() throws Exception {
    final PrologTerm root = new CompoundPrologTerm("root");
    final PrologTerm stateid = new CompoundPrologTerm("stateid", root);
    final PrologTerm expected = new CompoundPrologTerm("ap", stateid);
    check("current", 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

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