To prevent spam users, you can only post on this forum after registration, which is by invitation. If you want to post on the forum, please send me a mail (h DOT m DOT w DOT verbeek AT tue DOT nl) and I'll send you an invitation in return for an account.

SCXML import

Hello,
I'm trying to import a simple state machine (scxml format) to ProM 6.8, but it seems there no plugin that supports this file. The only plugins that accept this format are "import as simple log file" and "import as simple resource log files" but even with filtering, I'm not getting the correct model. 
The structure of my file looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<scxml xmlns="http://www.w3.org/2005/07/scxml" version="null" initial="A">
 <state id="A">
  <onentry>
   <send sendid="1" target="A" targetType="Opaque Behavior" event="ONENTRY">
   </send>
  </onentry>
  <transition event="B" target="B">
  </transition>
 </state>
 <state id="B">
  <onentry>
   <send sendid="2" target="B" targetType="Opaque Behavior" event="ONENTRY">
   </send>
  </onentry>
  <transition event="C" target="C">
  </transition>
  <transition event="A" target="A">
  </transition>
 </state>
 <state id="C">
  <onentry>
   <send sendid="3" target="C" targetType="Opaque Behavior" event="ONENTRY">
   </send>
  </onentry>
  <transition event="D" target="D">
  </transition>
  <transition event="B" target="B">
  </transition>
 </state>
</scxml>

I tried mapping the xml schema of this with the ones accepted by ProM but no success. I tried also to convert it to a petri net but I got a wrong model in ProM. 
"
<?xml version="1.0" encoding="UTF-8"?>
<pnml xsi:noNamespaceSchemaLocation="..November18/tools/PythonJubitar/examples/conformanceChecking/M4_perfectNet.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<net>
<place id="1">
<name>
<text>A</text>
</name>
</place>
<place id="2">
<name>
<text>B</text>
</name>
</place>
<place id="3">
<name>
<text>C</text>
</name>
</place>
<transition>
<name>
<text>B</text>
</name>
</transition>
<transition>
<name>
<text>C</text>
</name>
</transition>
<transition>
<name>
<text>A</text>
</name>
</transition>
<transition>
<name>
<text>D</text>
</name>
</transition>
<transition>
<name>
<text>B</text>
</name>
</transition>
<arc source="A" target="B"/>
<arc source="B" target="C"/>
<arc source="B" target="A"/>
<arc source="C" target="D"/>
<arc source="C" target="B"/>
</net>
</pnml>

Is there any way I could import this mode (scxml) to ProM? Thanks very much!

Comments

  • hverbeek
    edited December 2018
    Hello,

    There is no importer in ProM for this file format. Apparently, so far, nobody has used this file format in combination with ProM. Most likely, the plugins that accept the import file trigger on an ".xml" extension.

    Converting to a Petri net is not a bad idea at all, but you need to distinguish place names from transition names. As an example, you declare an arc from "A" to "B", but is this from place "A" to transition "B", or from transition "A" to place"B"? Perhaps an idea to prefix place names with "p_" and transition names with "t_"?

    ProM can read state machines from a file that uses the (proprietary) TSML (Transition System ML) file format, which borrows a lot from the PNML (Petri Net ML) file format. I've enclosed a (zipped) example TSML file here. Perhaps it is even easier to convert your SCXML file to a TSML file.

    Kind regards,

    Eric.



  • Thank you very much for your suggestions, Eric! I will give it a try and see what it yields.  
Sign In or Register to comment.