Package statechum.analysis.learning.experiments

Examples of statechum.analysis.learning.experiments.ExperimentGraphMLHandler


  public static void main(String[] args){
    File graphDir = new File(args[0]);//new File(System.getProperty("user.dir")+System.getProperty("file.separator")+"resources"+
    //System.getProperty("file.separator")+"TestGraphs"+System.getProperty("file.separator") +args[0]);
    String wholePath = graphDir.getAbsolutePath()+System.getProperty("file.separator");
    GraphMLFile graphmlFile = new GraphMLFile();
    graphmlFile.setGraphMLFileHandler(new ExperimentGraphMLHandler());
    DirectedSparseGraph dg = new DirectedSparseGraph();
    dg.getEdgeConstraints().clear();
    dg = (DirectedSparseGraph)graphmlFile.load(wholePath+args[1]);
    GraphMLVisualiser gmlVis = new GraphMLVisualiser();
    gmlVis.construct(dg);
View Full Code Here


    LearnerGraph gr = new LearnerGraph(TestFSMAlgo.buildGraph(TestRpniLearner.largeGraph1_invalid5, "testMerge_fail1"),Configuration.getDefaultConfiguration());
    StringWriter writer = new StringWriter();gr.transform322.writeGraphML(writer);
    synchronized (LearnerGraph.syncObj)
    {// ensure that the calls to Jung's vertex-creation routines do not occur on different threads.
        GraphMLFile graphmlFile = new GraphMLFile();
        graphmlFile.setGraphMLFileHandler(new ExperimentGraphMLHandler());
        try
        {
          new LearnerGraph(graphmlFile.load(new StringReader(writer.toString().replace("ACCEPTED=\"false\"", "ACCEPTED=\"aa\""))),Configuration.getDefaultConfiguration());
        }
        catch(FatalException ex)
View Full Code Here

    LearnerGraph gr = new LearnerGraph(TestFSMAlgo.buildGraph(TestRpniLearner.largeGraph1_invalid5, "testMerge_fail1"),Configuration.getDefaultConfiguration());
    StringWriter writer = new StringWriter();gr.transform322.writeGraphML(writer);
    synchronized (LearnerGraph.syncObj)
    {// ensure that the calls to Jung's vertex-creation routines do not occur on different threads.
        GraphMLFile graphmlFile = new GraphMLFile();
        graphmlFile.setGraphMLFileHandler(new ExperimentGraphMLHandler());
       
        try
        {
          new LearnerGraph(graphmlFile.load(new StringReader(writer.toString().replace("COLOUR=\"red\"", "COLOUR=\"aa\""))),Configuration.getDefaultConfiguration());
        }
View Full Code Here

    LearnerGraph gr = new LearnerGraph(TestFSMAlgo.buildGraph(TestRpniLearner.largeGraph1_invalid5, "testMerge_fail1"),Configuration.getDefaultConfiguration());
    StringWriter writer = new StringWriter();gr.transform322.writeGraphML(writer);
    synchronized (LearnerGraph.syncObj)
    {// ensure that the calls to Jung's vertex-creation routines do not occur on different threads.
        GraphMLFile graphmlFile = new GraphMLFile();
        graphmlFile.setGraphMLFileHandler(new ExperimentGraphMLHandler());
        Graph brokenGraph=graphmlFile.load(new StringReader(writer.toString().replace("VERTEX=\"BB1\"", "VERTEX=\""+Transform322.Initial+" BB1\"")));
        try
        {
          new LearnerGraph(brokenGraph,Configuration.getDefaultConfiguration());
        }
View Full Code Here

    System.out.println("started.");
    File graphDir = new File(args[0]);//new File(System.getProperty("user.dir")+System.getProperty("file.separator")+"resources"+
        //System.getProperty("file.separator")+"TestGraphs"+System.getProperty("file.separator") +args[0]);
      String wholePath = graphDir.getAbsolutePath()+System.getProperty("file.separator");
      GraphMLFile graphmlFile = new GraphMLFile();
      graphmlFile.setGraphMLFileHandler(new ExperimentGraphMLHandler());
      DirectedSparseGraph dg = new DirectedSparseGraph();
      dg.getEdgeConstraints().clear();
      dg = (DirectedSparseGraph)graphmlFile.load(wholePath+args[1]);
      int size = dg.getEdges().size()*4;
    RandomPathGenerator rpg = new RandomPathGenerator(dg, new Random(1),size, 5);
View Full Code Here

  {
    LearnerGraph graph = null;
    synchronized (LearnerGraph.syncObj)
    {// ensure that the calls to Jung's vertex-creation routines do not occur on different threads.
        GraphMLFile graphmlFile = new GraphMLFile();
        graphmlFile.setGraphMLFileHandler(new ExperimentGraphMLHandler());
        graph = new LearnerGraph(graphmlFile.load(from),cnf);
      from.close();
    }
    return graph;
  }
View Full Code Here

  public static LearnerGraph loadGraph(String fileName,Configuration config)
  {
    synchronized (LearnerGraph.syncObj)
    {// ensure that the calls to Jung's vertex-creation routines do not occur on different threads.
        GraphMLFile graphmlFile = new GraphMLFile();
        graphmlFile.setGraphMLFileHandler(new ExperimentGraphMLHandler());
        LearnerGraph graph = new LearnerGraph(graphmlFile.load(fileName+".xml"),config);
        int acceptNumber = graph.getAcceptStateNumber();
        int rejectNumber = graph.getStateNumber()-acceptNumber;
        graph.vertPositiveID=acceptNumber;
        graph.vertNegativeID=1+rejectNumber;
View Full Code Here

    FSMStructure gr = new FSMStructure(TestFSMAlgo.buildGraph(TestRpniLearner.largeGraph1_invalid5, "testMerge_fail1"),Configuration.getDefaultConfiguration());
    StringWriter writer = new StringWriter();gr.transform322.writeGraphML(writer);
    synchronized (computeStateScores.syncObj)
    {// ensure that the calls to Jung's vertex-creation routines do not occur on different threads.
        GraphMLFile graphmlFile = new GraphMLFile();
        graphmlFile.setGraphMLFileHandler(new ExperimentGraphMLHandler());
        Graph brokenGraph=graphmlFile.load(new StringReader(writer.toString().replace("VERTEX=\"BB1\"", "VERTEX=\""+Transform322.Initial+" BB1\"")));
        try
        {
          new FSMStructure(brokenGraph,Configuration.getDefaultConfiguration());
        }
View Full Code Here

  public static void main(String[] args){
    File graphDir = new File(args[0]);//new File(System.getProperty("user.dir")+System.getProperty("file.separator")+"resources"+
    //System.getProperty("file.separator")+"TestGraphs"+System.getProperty("file.separator") +args[0]);
    String wholePath = graphDir.getAbsolutePath()+System.getProperty("file.separator");
    GraphMLFile graphmlFile = new GraphMLFile();
    graphmlFile.setGraphMLFileHandler(new ExperimentGraphMLHandler());
    DirectedSparseGraph dg = new DirectedSparseGraph();
    dg.getEdgeConstraints().clear();
    dg = (DirectedSparseGraph)graphmlFile.load(wholePath+args[1]);
    GraphMLVisualiser gmlVis = new GraphMLVisualiser();
    gmlVis.construct(dg);
View Full Code Here

  {
    DirectedSparseGraph graph = null;
    synchronized (computeStateScores.syncObj)
    {// ensure that the calls to Jung's vertex-creation routines do not occur on different threads.
        GraphMLFile graphmlFile = new GraphMLFile();
        graphmlFile.setGraphMLFileHandler(new ExperimentGraphMLHandler());
        graph = new DirectedSparseGraph();
        graph.getEdgeConstraints().clear();
        graph = (DirectedSparseGraph)graphmlFile.load(fileName);
    }
    return graph;
View Full Code Here

TOP

Related Classes of statechum.analysis.learning.experiments.ExperimentGraphMLHandler

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.