Search in sources :

Example 66 with PrologTerm

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

the class PrologGeneratorTest method testAvailable.

@Test
public void testAvailable() throws Exception {
    final PrologTerm transPred = new CompoundPrologTerm("bla");
    final PrologTerm wrapped = new CompoundPrologTerm("dtrans", transPred);
    final PrologTerm available = new CompoundPrologTerm("available", wrapped);
    final PrologTerm expected = new CompoundPrologTerm("ap", available);
    check("Av(bla)", 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 67 with PrologTerm

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

the class PrologGeneratorTest method testAnd.

@Test
public void testAnd() throws Exception {
    final PrologTerm expected = new CompoundPrologTerm("and", TERM_TRUE, TERM_FALSE);
    check("true &  false", 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 68 with PrologTerm

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

the class PrologGeneratorTest method check.

private void check(final String input, final PrologTerm expectedTerm) throws LtlParseException {
    final PrologTerm term = parse(input);
    Assert.assertEquals(expectedTerm, term);
}
Also used : CompoundPrologTerm(de.prob.prolog.term.CompoundPrologTerm) ListPrologTerm(de.prob.prolog.term.ListPrologTerm) PrologTerm(de.prob.prolog.term.PrologTerm)

Example 69 with PrologTerm

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

the class PrologGeneratorTest method testNot.

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

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

the class PrologGeneratorTest method testDLK.

@Test
public void testDLK() throws Exception {
    final PrologTerm transPred = new CompoundPrologTerm("bla");
    final PrologTerm wrapped = new CompoundPrologTerm("dtrans", transPred);
    final PrologTerm args = new ListPrologTerm(wrapped);
    final PrologTerm dlk = new CompoundPrologTerm("dlk", args);
    final PrologTerm expected = new CompoundPrologTerm("ap", dlk);
    check("deadlock( bla)", expected);
}
Also used : ListPrologTerm(de.prob.prolog.term.ListPrologTerm) 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

PrologTerm (de.prob.prolog.term.PrologTerm)103 ListPrologTerm (de.prob.prolog.term.ListPrologTerm)86 CompoundPrologTerm (de.prob.prolog.term.CompoundPrologTerm)85 Test (org.junit.Test)64 IntegerPrologTerm (de.prob.prolog.term.IntegerPrologTerm)11 StructuredPrologOutput (de.prob.prolog.output.StructuredPrologOutput)10 VariablePrologTerm (de.prob.prolog.term.VariablePrologTerm)8 Transition (de.prob.statespace.Transition)5 IEvalElement (de.prob.animator.domainobjects.IEvalElement)4 ArrayList (java.util.ArrayList)4 CheckBooleanPropertyCommand (de.prob.animator.command.CheckBooleanPropertyCommand)3 AbstractEvalResult (de.prob.animator.domainobjects.AbstractEvalResult)3 EvalResult (de.prob.animator.domainobjects.EvalResult)3 ISimplifiedROMap (de.prob.parser.ISimplifiedROMap)3 IPrologTermOutput (de.prob.prolog.output.IPrologTermOutput)3 RecursiveMachineLoader (de.be4.classicalb.core.parser.analysis.prolog.RecursiveMachineLoader)2 LtlParseException (de.be4.ltl.core.parser.LtlParseException)2 ClassicalB (de.prob.animator.domainobjects.ClassicalB)2 ComputationNotCompletedResult (de.prob.animator.domainobjects.ComputationNotCompletedResult)2 StateError (de.prob.animator.domainobjects.StateError)2