use of de.prob.prolog.term.PrologTerm 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);
}
use of de.prob.prolog.term.PrologTerm 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);
}
use of de.prob.prolog.term.PrologTerm in project probparsers by bendisposto.
the class PrologGeneratorTest method testPredicate.
@Test
public void testPredicate() throws Exception {
final PrologTerm pred = new CompoundPrologTerm("blubb");
final PrologTerm wrapped = new CompoundPrologTerm("dpred", pred);
final PrologTerm expected = new CompoundPrologTerm("ap", wrapped);
check("{blubb}", expected);
}
use of de.prob.prolog.term.PrologTerm in project probparsers by bendisposto.
the class PrologGeneratorTest method testRelease.
@Test
public void testRelease() throws Exception {
final PrologTerm expected = new CompoundPrologTerm("release", TERM_FALSE, TERM_TRUE);
check("false R true ", expected);
}
use of de.prob.prolog.term.PrologTerm in project probparsers by bendisposto.
the class PrologGeneratorTest method testWeakFairCapital.
@Test
public void testWeakFairCapital() throws Exception {
final PrologTerm transPred = new CompoundPrologTerm("bla");
final PrologTerm wrapped = new CompoundPrologTerm("dtrans", transPred);
final PrologTerm wf = new CompoundPrologTerm("weak_fair", wrapped);
final PrologTerm ap = new CompoundPrologTerm("ap", wf);
final PrologTerm weak_assumption = new CompoundPrologTerm("weakassumptions", ap);
final PrologTerm expected = new CompoundPrologTerm("fairnessimplication", weak_assumption, TERM_TRUE);
check("WF(bla) => true", expected);
}
Aggregations