Package ai.test.comment

Examples of ai.test.comment.TestCommentData$GraphComparator


    }
    return result;
  }
 
  protected void testBooleansAndIntervals(MethodControlFlowGraph cfg) {
    TestCommentData commentData = TestCommentData.parseComments(cfg);

    BoolIntvSemantics as = new BoolIntvSemantics();
    NonRelationalDomain<Bool> initialBools = commentData.getInitialBools();
    NonRelationalDomain<Interval> initialIntervals = commentData.getInitialIntervals();
    ProductDomain<NonRelationalDomain<Bool>, NonRelationalDomain<Interval>> initialValue = as.getInitialValue();
    if (initialBools!=null)
      initialValue = initialValue.setLeft(initialBools);
    if (initialIntervals!=null)
      initialValue = initialValue.setRight(initialIntervals);
    Map<CFGVertice, ProductDomain<NonRelationalDomain<Bool>, NonRelationalDomain<Interval>>> result = Interpreter
        .analyse(cfg, as, initialValue, new StopCondition.NoStopCondition());

    NonRelationalDomain<Bool> boolsBottom = NonRelationalDomain.getStaticBottom();
    NonRelationalDomain<Interval> intvBottom = NonRelationalDomain.getStaticBottom();
    commentData.matchBools(cfg, makeMap1(result, boolsBottom));
    commentData.matchIntervals(cfg, makeMap2(result, intvBottom));
  }
View Full Code Here


    commentData.matchBools(cfg, makeMap1(result, boolsBottom));
    commentData.matchIntervals(cfg, makeMap2(result, intvBottom));
  }
 
  protected void testBooleansAndBoxes(MethodControlFlowGraph cfg) {
    TestCommentData commentData = TestCommentData.parseComments(cfg);
    IntegerBoxesSemantics as = new IntegerBoxesSemantics("");

    NonRelationalDomain<Bool> initialBools = commentData.getInitialBools();
    IntegerBoxes initialBoxes = commentData.getInitialBoxes();

    ProductDomain<NonRelationalDomain<Bool>, IntegerBoxes> initialValue = as.getInitialValue();

    if (initialBools != null)
      initialValue = initialValue.setLeft(initialBools);
    if (initialBoxes != null)
      initialValue = initialValue.setRight(initialBoxes);

    Map<CFGVertice, ProductDomain<NonRelationalDomain<Bool>, IntegerBoxes>> result = Interpreter
        .analyse(cfg, as, initialValue, new StopCondition.NoStopCondition());

    NonRelationalDomain<Bool> boolsBottom = NonRelationalDomain.getStaticBottom();
    IntegerBoxes boxesBottom = IntegerBoxes.BOTTOM;
    commentData.matchBools(cfg, makeMap1(result, boolsBottom));
    commentData.matchBoxes(cfg, makeMap2(result, boxesBottom));
  }
View Full Code Here

    commentData.matchBools(cfg, makeMap1(result, boolsBottom));
    commentData.matchBoxes(cfg, makeMap2(result, boxesBottom));
  }
 
  protected void testBooleans(MethodControlFlowGraph cfg) {
    TestCommentData commentData = TestCommentData.parseComments(cfg);
//    Pair<BiMap<CFGVertice, String>, Map<String, Variable>> matchResult = commentData.matchMethodGraph(cfg);
   
    AbstractSemanticsIntf<NonRelationalDomain<Bool>> as = new BoolsSemantics();
    NonRelationalDomain<Bool> initialValue = as.getInitialValue();
    NonRelationalDomain<Bool> initialBools = commentData.getInitialBools();   
    if (initialBools!=null)
      initialValue = initialBools;
   
    Map<CFGVertice, NonRelationalDomain<Bool>> result = Interpreter.analyse(cfg, as, initialValue, new StopCondition.NoStopCondition());
   
    commentData.matchBools(cfg, result);
  }
View Full Code Here

   
    commentData.matchBools(cfg, result);
  }

  protected void testIntervals(MethodControlFlowGraph cfg) {
    TestCommentData commentData = TestCommentData.parseComments(cfg);
//    Pair<BiMap<CFGVertice, String>, Map<String, Variable>> matchResult = commentData.matchMethodGraph(cfg);
   
    AbstractSemanticsIntf<NonRelationalDomain<Interval>> as = new IntervalsSemantics();
    NonRelationalDomain<Interval> initialValue = as.getInitialValue();
    NonRelationalDomain<Interval> initialBools = commentData.getInitialIntervals();   
    if (initialBools!=null)
      initialValue = initialBools;
   
    Map<CFGVertice, NonRelationalDomain<Interval>> result = Interpreter.analyse(cfg, as, initialValue, new StopCondition.NoStopCondition());
   
    commentData.matchIntervals(cfg, result);
  }
View Full Code Here

TOP

Related Classes of ai.test.comment.TestCommentData$GraphComparator

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.