use of de.prob.prolog.term.CompoundPrologTerm 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.CompoundPrologTerm 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.CompoundPrologTerm 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);
}
use of de.prob.prolog.term.CompoundPrologTerm in project probparsers by bendisposto.
the class PrologGeneratorTest method testWeakFairAll.
@Test
public void testWeakFairAll() throws Exception {
final PrologTerm ap = new CompoundPrologTerm("all");
final PrologTerm weak_assumption = new CompoundPrologTerm("weakassumptions", ap);
final PrologTerm expected = new CompoundPrologTerm("fairnessimplication", weak_assumption, TERM_TRUE);
check("WEF => true", expected);
}
use of de.prob.prolog.term.CompoundPrologTerm in project probparsers by bendisposto.
the class PrologGeneratorTest method testStrongFairCapital.
@Test
public void testStrongFairCapital() throws Exception {
final PrologTerm transPred1 = new CompoundPrologTerm("bla");
final PrologTerm wrapped1 = new CompoundPrologTerm("dtrans", transPred1);
final PrologTerm sf1 = new CompoundPrologTerm("strong_fair", wrapped1);
final PrologTerm ap1 = new CompoundPrologTerm("ap", sf1);
final PrologTerm strong_assumptions = new CompoundPrologTerm("strongassumptions", ap1);
final PrologTerm transPred2 = new CompoundPrologTerm("blubb");
final PrologTerm wrapped2 = new CompoundPrologTerm("dtrans", transPred2);
final PrologTerm sf2 = new CompoundPrologTerm("weak_fair", wrapped2);
final PrologTerm ap2 = new CompoundPrologTerm("ap", sf2);
final PrologTerm weak_assumptions = new CompoundPrologTerm("weakassumptions", ap2);
final PrologTerm andPred = new CompoundPrologTerm("and", strong_assumptions, weak_assumptions);
final PrologTerm expected = new CompoundPrologTerm("fairnessimplication", andPred, TERM_TRUE);
check("(SF(bla)) & (wf(blubb)) => true", expected);
}
Aggregations