Package statechum.analysis.learning.smt.SmtLabelRepresentation

Examples of statechum.analysis.learning.smt.SmtLabelRepresentation.TraceWithData


    Set<List<Label>> positives = new LinkedHashSet<List<Label>>();positives.addAll(lbls.getSPlus());
    Assert.assertEquals(TestFSMAlgo.buildSet(new String[][]{new String[]{"callA","callB"}},config,converter),positives);
    Set<List<Label>> negatives = new LinkedHashSet<List<Label>>();negatives.addAll(lbls.getSMinus());
    Assert.assertEquals(TestFSMAlgo.buildSet(new String[][]{},config,converter),negatives);
   
    TraceWithData trace = lbls.traces.iterator().next();
    for(CompositionOfFunctions func:trace.arguments)
      Assert.assertEquals("",func.text);
  }
View Full Code Here


  @Test
  public final void testTraceParser5a()
  {
    parseDataTrace("+ callA((= input 7) (< output 8)) callB callC((and (= 5 input) (> input output)))");
    Assert.assertEquals(1,lbls.traces.size());
    TraceWithData trace = lbls.traces.iterator().next();
    Assert.assertArrayEquals(asArray(new String[]{"callA","callB","callC"}), trace.traceDetails.toArray());
    Iterator<CompositionOfFunctions> compIterator = trace.arguments.iterator();
    Assert.assertEquals("(= input 7) (< output 8)",compIterator.next().text);
    Assert.assertEquals("",compIterator.next().text);
    Assert.assertEquals("(and (= 5 input) (> input output))",compIterator.next().text);
View Full Code Here

        QSMTool.cmdLowLevelFunction+" fn DECL (define "+SmtLabelRepresentation.functionArg+SmtLabelRepresentation.delimiterString+"1::int)",
        QSMTool.cmdLowLevelFunction+" fn DECL (define "+SmtLabelRepresentation.functionArg+SmtLabelRepresentation.delimiterString+"2::int)",
        QSMTool.cmdLowLevelFunction+" fn CONSTRAINARGS true",
    }));
    Assert.assertEquals(1,lbls.traces.size());
    TraceWithData trace = lbls.traces.iterator().next();
    Assert.assertArrayEquals(asArray(new String[]{"callA","callB","callC"}), trace.traceDetails.toArray());
    Iterator<CompositionOfFunctions> compIterator = trace.arguments.iterator();
    final String expectedCompDeclarations = SmtLabelRepresentation.encloseInBeginEndIfNotEmpty(
        "(define "+SmtLabelRepresentation.generateFreshVariable("fn", VARIABLEUSE.IO, 0, 0)+"::int)"+SmtLabelRepresentation.ENDL+
        "(define "+SmtLabelRepresentation.generateFreshVariable("fn", VARIABLEUSE.IO, 0, 1)+"::int)"+SmtLabelRepresentation.ENDL+
View Full Code Here

  @Test
  public final void testTraceParser6a()
  {
    parseDataTrace("+ callA((= input 7) (< output 8)) callB callC((and (= 5 input) (> (func output input) output)))");
    Assert.assertEquals(1,lbls.traces.size());
    TraceWithData trace = lbls.traces.iterator().next();
    Assert.assertArrayEquals(asArray(new String[]{"callA","callB","callC"}), trace.traceDetails.toArray());
    Iterator<CompositionOfFunctions> compIterator = trace.arguments.iterator();
    Assert.assertEquals("(= input 7) (< output 8)",compIterator.next().text);
    Assert.assertEquals("",compIterator.next().text);
    Assert.assertEquals("(and (= 5 input) (> (func output input) output))",compIterator.next().text);
View Full Code Here

  @Test
  public final void testTraceParser6b()
  {
    parseDataTrace("+ callA((= input 7) (< output 8)) callB callC((and (= 5 input) (> (func output input) output)))");
    Assert.assertEquals(1,lbls.traces.size());
    TraceWithData trace = lbls.traces.iterator().next();
    Assert.assertArrayEquals(asArray(new String[]{"callA","callB","callC"}), trace.traceDetails.toArray());
    Iterator<CompositionOfFunctions> compIterator = trace.arguments.iterator();
    Assert.assertEquals("(= input 7) (< output 8)",compIterator.next().text);
    Assert.assertEquals("",compIterator.next().text);
    Assert.assertEquals("(and (= 5 input) (> (func output input) output))",compIterator.next().text);
View Full Code Here

    Set<List<Label>> positives = new LinkedHashSet<List<Label>>();positives.addAll(lbls.getSPlus());
    Assert.assertEquals(TestFSMAlgo.buildSet(new String[][]{new String[]{"callA","callB"}},config),positives);
    Set<List<Label>> negatives = new LinkedHashSet<List<Label>>();negatives.addAll(lbls.getSMinus());
    Assert.assertEquals(TestFSMAlgo.buildSet(new String[][]{},config),negatives);
   
    TraceWithData trace = lbls.traces.iterator().next();
    for(CompositionOfFunctions func:trace.arguments)
      Assert.assertEquals("",func.text);
  }
View Full Code Here

  @Test
  public final void testTraceParser5a()
  {
    parseDataTrace("+ callA((= input 7) (< output 8)) callB callC((and (= 5 input) (> input output)))");
    Assert.assertEquals(1,lbls.traces.size());
    TraceWithData trace = lbls.traces.iterator().next();
    Assert.assertArrayEquals(asArray(new String[]{"callA","callB","callC"}), trace.traceDetails.toArray());
    Iterator<CompositionOfFunctions> compIterator = trace.arguments.iterator();
    Assert.assertEquals("(= input 7) (< output 8)",compIterator.next().text);
    Assert.assertEquals("",compIterator.next().text);
    Assert.assertEquals("(and (= 5 input) (> input output))",compIterator.next().text);
View Full Code Here

        QSMTool.cmdLowLevelFunction+" fn DECL (define "+SmtLabelRepresentation.functionArg+SmtLabelRepresentation.delimiterString+"1::int)",
        QSMTool.cmdLowLevelFunction+" fn DECL (define "+SmtLabelRepresentation.functionArg+SmtLabelRepresentation.delimiterString+"2::int)",
        QSMTool.cmdLowLevelFunction+" fn CONSTRAINARGS true",
    }));
    Assert.assertEquals(1,lbls.traces.size());
    TraceWithData trace = lbls.traces.iterator().next();
    Assert.assertArrayEquals(asArray(new String[]{"callA","callB","callC"}), trace.traceDetails.toArray());
    Iterator<CompositionOfFunctions> compIterator = trace.arguments.iterator();
    final String expectedCompDeclarations = SmtLabelRepresentation.encloseInBeginEndIfNotEmpty(
        "(define "+SmtLabelRepresentation.generateFreshVariable("fn", VARIABLEUSE.IO, 0, 0)+"::int)"+SmtLabelRepresentation.ENDL+
        "(define "+SmtLabelRepresentation.generateFreshVariable("fn", VARIABLEUSE.IO, 0, 1)+"::int)"+SmtLabelRepresentation.ENDL+
View Full Code Here

  @Test
  public final void testTraceParser6a()
  {
    parseDataTrace("+ callA((= input 7) (< output 8)) callB callC((and (= 5 input) (> (func output input) output)))");
    Assert.assertEquals(1,lbls.traces.size());
    TraceWithData trace = lbls.traces.iterator().next();
    Assert.assertArrayEquals(asArray(new String[]{"callA","callB","callC"}), trace.traceDetails.toArray());
    Iterator<CompositionOfFunctions> compIterator = trace.arguments.iterator();
    Assert.assertEquals("(= input 7) (< output 8)",compIterator.next().text);
    Assert.assertEquals("",compIterator.next().text);
    Assert.assertEquals("(and (= 5 input) (> (func output input) output))",compIterator.next().text);
View Full Code Here

  @Test
  public final void testTraceParser6b()
  {
    parseDataTrace("+ callA((= input 7) (< output 8)) callB callC((and (= 5 input) (> (func output input) output)))");
    Assert.assertEquals(1,lbls.traces.size());
    TraceWithData trace = lbls.traces.iterator().next();
    Assert.assertArrayEquals(asArray(new String[]{"callA","callB","callC"}), trace.traceDetails.toArray());
    Iterator<CompositionOfFunctions> compIterator = trace.arguments.iterator();
    Assert.assertEquals("(= input 7) (< output 8)",compIterator.next().text);
    Assert.assertEquals("",compIterator.next().text);
    Assert.assertEquals("(and (= 5 input) (> (func output input) output))",compIterator.next().text);
View Full Code Here

TOP

Related Classes of statechum.analysis.learning.smt.SmtLabelRepresentation.TraceWithData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.