By February 8, 2011 13 Comments Read More →

The Access/CPN Source Released

This post has 343 words. Reading it will take approximately 2 minutes.

GD Star Rating
loading...

10 days ago, I mentioned that CPN Tools is being open-sourced.  I then promised that within 1-2 weeks, I’d also release the simulator and Access/CPN.  The simulator will have to wait another couple days (weeks), but I have now finished cleaning up the Access/CPN source for release.  Well, actually it has been available from the origin at the ASCoVeCo project under which it was developed, but now it has been moved under the CPN Tools project.

The source is available from the repository at

https://svn.win.tue.nl/repos/cpntools/AccessCPN/trunk/

(You get a security error as the server uses a self-signed certificate for encryption; it’s out of my control, sorry.)

Changes to the previous version include removal of dependence on Service Data Objects (SDO), which makes sense as the functionality was never really used and the Eclipse Modeling Framework (EMF)/SDO bridge has been discontinued.  Furthermore, the code has been moved from the old namespace (dk.au.daimi.ascoveco) to a new one (org.cpntools.accesscpn).  Finally, I have added some of my tests to the tests plug-in as well as some cool demonstration programs (one which is featured here and another which is mentioned here, here, and here).

Access/CPN also has a neat new page at http://cpntools.org/accesscpn/, which gives some information about the different plug-ins comprising Access/CPN, their dependencies, download instructions as well as links to videos showcasing some of the Access/CPN 2.0 features that will be released in the near future (as soon as I get it cleaned up).

Access/CPN consists of  more than 50’000 lines of Java code, is licensed under the LGPL, and runs on Mac OS X, Windows and Linux.

As a bonus, I can mention that not only will we open-source the CPN simulator, we’ll also add the complete source code to the ASCoVeCo State-space Analysis Platform (ASAP) (the SML part) under a very liberal license (dual-licensed under GPL and 4-clause BSD).

The Access/CPN Source Released, 5.0 out of 5 based on 1 rating
Posted in: Uncategorized

13 Comments on "The Access/CPN Source Released"

Trackback | Comments RSS Feed

  1. Hoa says:
    GD Star Rating
    loading...

    it sounds very interesting to me. Thank you for publishing these information about Access/CPN.
    I would also like to use the monitor, Access/CPN do not support the monitor?.
    And I would be appreciated if you could publish some documents that give indications about the usage of Access/CPN (e.g, how to make it done, information in detail about the plug-ins of Access/CPN, …).

    Best regards,
    Hoa

    • Michael says:
      GD Star Rating
      loading...

      Hi Hoa,

      Access/CPN does not currently support monitoring. I am planning on adding this functionality, hopefully this month.

      The Access/CPN web-site (http://cpntools.org/accesscpn/) contains a bit more information, including which of the plug-ins you need and some example code.

      My paper “The Access/CPN Framework: A Tool for Interacting With the CPN Tools Simulator” gives a bit more detail about the ideas behind Access/CPN, and the successor paper “Access/CPN 2.0: A High-level Interface to Coloured Petri Net Models” describes the new features in Access/CPN 2.0. The first is available from my publications page (https://westergaard.eu/cv/publications/). The other has yet to be published.

      Regards,
      Michael

  2. Hoa says:
    GD Star Rating
    loading...

    Hi Michael,
    Could you please tell me about situation of adding support monitoring?. Thank you so much.

    Best Regards,
    Hoa

    • Michael says:
      GD Star Rating
      loading...

      Hi Hoa,

      There is currently no support. I plan on adding support before the end of the year, but have no clear plan just yet. The biggest hurdle is that I need to think of a data-structure to represent monitors nicely in Java.

  3. Hoa says:
    GD Star Rating
    loading...

    Hi Michael,
    I hope your work is going well. I’m waitting for your result with impatience :), because this work is very important for me. By the way, could you answer one question pls? :
    Access/CPN does not currently support monitoring, but if we can get the performance report after executing simulations of a CPNet with some predefined monitors using the commands in Access/CPN (simulator.execute(50) for example) ?. If no, could you give me advice for obtaining performance report after executing simulations in Access/CPN?.

    And i tried a small example (as showed below) but there is something wrong, there is no data returned in the file to save report to after executing the command : s.saveSimulationReport(report);

    Thank you so much for your help.

    Best Regards,

    Hoa

    File report = new File(“C:/test/report.txt”);
    try {
    // Create file if it does not exist
    boolean success = report.createNewFile();
    if (success) {
    System.out.print(“File were created successfully”);
    } else {
    System.out.print(“File already exist”);
    }
    } catch (IOException e) {

    System.out.print(e.toString());
    }
    final String fileName = “C:/erdp.cpn”;// args[0];
    final PetriNet petriNet = DOMParser.parse(new URL(“file:/” + fileName));
    final HighLevelSimulator s = HighLevelSimulator.getHighLevelSimulator();

    try {
    Checker checker = new Checker(petriNet, null, s);
    checker.checkEntireModel();

    s.setModelNameModelDirOutputDir(“erdp”, “/cygdrive/c/test”,”/cygdrive/c/test/output”);
    s.setInitializationSimulationOptions(true, true, 0);
    s.setSimulationReportOptions(true, true, “”);
    s.saveSimulationReport(report);
    s.initialState();
    System.out.println(“Executing steps…”);
    System.out.println(s.execute(1000));

    } finally {
    s.destroy();
    }

    • Michael says:
      GD Star Rating
      loading...

      Hi Hoa,

      It’s not the end of the year yet 😉 Unfortunately, I have not yet had the time to implement monitoring.

      There are three reasons your example does not work. First, as monitors are not loaded from the model, they are not sent to the simulator and results will never be available. This can be circumvented by loading a model using the ProxySimulator instead (you start the ProxySimulator, launch CPN Tools, and load the model in CPN Tools); see, e.g., the SillyTime example for an example of how to do that.

      The second reason is that the saveSimulationReport method saves the simulation report as it is now. If you execute it at the beginning of the simulation, is is empty. Execute it instead at the end.

      Finally, the simulation report and the monitoring facilities are two different things. The simulation report is fully supported. To save monitoring results, you have to execute

      simulator.evaluate(“CPN’Sim.call_stop_funs()”);

      (there is no current support for doing this in a nicer way). This also saves the reports as they look “now”, i.e., it has to be executed after simulation. It can also be saved during simulation to get intermediate results, but this is very inefficient.

      Combining these three things, you can get monitoring output (it is in fact implemented this way in the cosimulation plug-in in ProM; source of implementation here).

    • Michael says:
      GD Star Rating
      loading...

      Hi Hoa,

      I’ve just released Access/CPN 2.1.0, which has support for monitoring. The code has not been tested much, but it should get you started. It’s available from the usual download page at http://cpntools.org/download

  4. Hoa says:
    GD Star Rating
    loading...

    Hi Michael,
    Thank you so much for your help and for your very clearly explanation. But i have one more question pls. I want to execute the simulation in a “perfect time”, however, the syntax check step takes many of time, Do we have any ways to lack/pass this step?.

    waitting for ur response,

    Thanks so much,
    Hoa

    • Michael says:
      GD Star Rating
      loading...

      That is unfortunately not possible – the syntax check is actually two phases: syntax check and code generation, the latter taking most of the time and the former being unskilled without major changes to the simulator.

      What you can do is reduce the amount of code that needs to be generated by folding similar structure and making sure you don’t copy pages but instead use multiple instances of the same page.

      It IS possible to make a dump of the simulator and reload that, but Access/CPN does not support that and most likely never will, so you have to call functions directly in the simulator. Check the support mailing list archive for the details.

  5. Pritha Mahata says:
    GD Star Rating
    loading...

    Hi Michael,

    Does CPN allow real-valued, colored tokens and time intervals on input, output arc? Do you have coverability analysis implemented in that case?

    Regards,
    Pritha

    • Michael says:
      GD Star Rating
      loading...

      Hi Pritha,

      CPN Tools does not allow real-valued tokens, only real-valued time stamps. The problem is that in SML (the language used for the simulator), does not allow equality comparison of reals. I have a partially working work-around but have not had time to implement it. See http://cpntools.org/faq/are_real_colour_sets_supported for some workarounds.

      CPN Tools does not do coverability analysis at all. The problem is that for coloured nets, the coverability graph is not guaranteed to be finite, removing the advantage over simple state-space analysis. The problem is basically that it is not possible to define a magnitude-preserving total order on the data types (for example, is 1`1 < 1`2? How about 2`1 < 1`2? Or 1`1 < 2`1).

  6. Pritha Mahata says:
    GD Star Rating
    loading...

    If you only allow integer valued token, which can also have real-valued ”age”, that is essentially a timed Petri net (since number of colors is finite), for which coverability is decidable through the backward reachability analysis (though, extremely expensive). IS that why you don’t allow coverability analysis in CPN Tools?

    Which properties can one check in CPN Tools? Is it mainly for simulation?

Post a Comment