use of de.prob.prolog.term.PrologTerm in project probparsers by bendisposto.
the class PrologGeneratorTest method testOnce.
@Test
public void testOnce() throws Exception {
final PrologTerm expected = new CompoundPrologTerm("once", TERM_TRUE);
check("O true ", expected);
}
use of de.prob.prolog.term.PrologTerm in project probparsers by bendisposto.
the class PrologGeneratorTest method testWeakStrongFairAll.
@Test
public void testWeakStrongFairAll() throws Exception {
final PrologTerm ap = new CompoundPrologTerm("all");
final PrologTerm weak_assumption = new CompoundPrologTerm("weakassumptions", ap);
final PrologTerm strong_assumption = new CompoundPrologTerm("strongassumptions", ap);
final PrologTerm and = new CompoundPrologTerm("and", strong_assumption, weak_assumption);
final PrologTerm expected = new CompoundPrologTerm("fairnessimplication", and, TERM_TRUE);
check("SEF & WEF => true", expected);
}
use of de.prob.prolog.term.PrologTerm in project probparsers by bendisposto.
the class PrologGeneratorTest method testForAllImplication.
@Test
public void testForAllImplication() throws Exception {
final PrologTerm id = new CompoundPrologTerm("xyz");
// 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("forall", id, ap, glob);
check("!xyz. ( {blubb} => G [x])", expected);
}
use of de.prob.prolog.term.PrologTerm in project probparsers by bendisposto.
the class PrologGeneratorTest method testHistorically.
@Test
public void testHistorically() throws Exception {
final PrologTerm expected = new CompoundPrologTerm("historically", TERM_TRUE);
check("H true ", expected);
}
use of de.prob.prolog.term.PrologTerm in project probparsers by bendisposto.
the class PrologGeneratorTest method testComplex2.
@Test
public void testComplex2() throws Exception {
final PrologTerm pred1 = new CompoundPrologTerm("xxx");
final PrologTerm wrapped1 = new CompoundPrologTerm("dpred", pred1);
final PrologTerm ap1 = new CompoundPrologTerm("ap", wrapped1);
final PrologTerm pred2 = new CompoundPrologTerm("blubb");
final PrologTerm wrapped2 = new CompoundPrologTerm("dpred", pred2);
final PrologTerm ap2 = new CompoundPrologTerm("ap", wrapped2);
final PrologTerm fin = new CompoundPrologTerm("finally", ap2);
final PrologTerm glob = new CompoundPrologTerm("globally", fin);
final PrologTerm imp = new CompoundPrologTerm("implies", ap1, glob);
final PrologTerm expected = new CompoundPrologTerm("not", imp);
check("not({xxx} => GF {blubb})", expected);
}
Aggregations