use of de.prob.prolog.term.CompoundPrologTerm in project probparsers by bendisposto.
the class PrologGeneratorTest method testDLK2.
@Test
public void testDLK2() throws Exception {
final PrologTerm transPred1 = new CompoundPrologTerm("bla");
final PrologTerm wrapped1 = new CompoundPrologTerm("dtrans", transPred1);
final PrologTerm transPred2 = new CompoundPrologTerm("argg");
final PrologTerm wrapped2 = new CompoundPrologTerm("dtrans", transPred2);
final PrologTerm args = new ListPrologTerm(wrapped1, wrapped2);
final PrologTerm dlk = new CompoundPrologTerm("dlk", args);
final PrologTerm expected = new CompoundPrologTerm("ap", dlk);
check("deadlock(bla,argg)", expected);
}
use of de.prob.prolog.term.CompoundPrologTerm in project probparsers by bendisposto.
the class PrologGeneratorTest method testCtrl.
@Test
public void testCtrl() throws Exception {
final PrologTerm transPred1 = new CompoundPrologTerm("bla");
final PrologTerm wrapped1 = new CompoundPrologTerm("dtrans", transPred1);
final PrologTerm transPred2 = new CompoundPrologTerm("argg");
final PrologTerm wrapped2 = new CompoundPrologTerm("dtrans", transPred2);
final PrologTerm args = new ListPrologTerm(wrapped1, wrapped2);
final PrologTerm det = new CompoundPrologTerm("ctrl", args);
final PrologTerm expected = new CompoundPrologTerm("ap", det);
check("controller(bla,argg)", expected);
}
use of de.prob.prolog.term.CompoundPrologTerm in project probparsers by bendisposto.
the class PrologGeneratorTest method testEnabled.
@Test
public void testEnabled() throws Exception {
final PrologTerm transPred = new CompoundPrologTerm("bla");
final PrologTerm wrapped = new CompoundPrologTerm("dtrans", transPred);
final PrologTerm enabled = new CompoundPrologTerm("enabled", wrapped);
final PrologTerm expected = new CompoundPrologTerm("ap", enabled);
check("e(bla)", expected);
}
use of de.prob.prolog.term.CompoundPrologTerm in project probparsers by bendisposto.
the class PrologGeneratorTest method testWeakFair_multiple.
@Test
public void testWeakFair_multiple() throws Exception {
final PrologTerm transPred1 = new CompoundPrologTerm("bla");
final PrologTerm wrapped1 = new CompoundPrologTerm("dtrans", transPred1);
final PrologTerm wf1 = new CompoundPrologTerm("weak_fair", wrapped1);
final PrologTerm ap1 = new CompoundPrologTerm("ap", wf1);
final PrologTerm transPred2 = new CompoundPrologTerm("blubb");
final PrologTerm wrapped2 = new CompoundPrologTerm("dtrans", transPred2);
final PrologTerm wf2 = new CompoundPrologTerm("weak_fair", wrapped2);
final PrologTerm ap2 = new CompoundPrologTerm("ap", wf2);
final PrologTerm orPred = new CompoundPrologTerm("or", ap1, ap2);
final PrologTerm weak_assumption = new CompoundPrologTerm("weakassumptions", orPred);
final PrologTerm expected = new CompoundPrologTerm("fairnessimplication", weak_assumption, TERM_TRUE);
check("wf(bla) or wf(blubb) => true", expected);
}
use of de.prob.prolog.term.CompoundPrologTerm in project probparsers by bendisposto.
the class PrologGeneratorTest method testWeakFair.
@Test
public void testWeakFair() 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