Menu

#6 Cannot use same TA model for two components

v0.0
open
1
2008-04-15
2007-11-06
No

I created two dummy components and a dummy TA model. I want to share the TA model between the two components.

This is not possible in the attached project; when selecting "export to Uppaal" only the first component gets the TA model.

Extract from .save file (before export to Uppaal port)

<COMPONENTDESC id="Comp01#3">
<INPORT mode="trig" type="void" id="trig#4"/>
<OUTPORT mode="trig" type="void" id="trig#5"/>
<BEHAVIOUR>
<MODEL filename="dummy" type="TA">
</MODEL>
</BEHAVIOUR>
</COMPONENTDESC>

<COMPONENTDESC id="Comp02#6">
<INPORT mode="trig" type="void" id="trig#7"/>
<BEHAVIOUR>
<MODEL filename="dummy" type="TA">
</MODEL>
</BEHAVIOUR>
</COMPONENTDESC>

Extract from .save file for Uppaal port:

<COMPONENTDESC id="Comp01#3">
<INPORT id="trig#4" mode="trig" type="void"/>
<OUTPORT id="trig#5" mode="trig" type="void"/>
<BEHAVIOUR>
<MODEL type="uppaal:declarations">
clock c;
</MODEL><MODEL type="uppaal:behaviour">
state idle, start, final;
init idle;
trans idle->start { guard false; },
start->final { guard true; },
final->idle { guard false ; };
</MODEL>
</BEHAVIOUR>
</COMPONENTDESC>

<COMPONENTDESC id="Comp02#6">
<INPORT id="trig#7" mode="trig" type="void"/>
<BEHAVIOUR>
<MODEL filename="dummy" type="TA">
</MODEL>
</BEHAVIOUR>
</COMPONENTDESC>

...

Notice that only Comp01#3 got the TA model merged into <BEHAVIOR>. The component description for Comp02#6 remains unchanged.

Discussion

  • Davor Slutej

    Davor Slutej - 2007-11-06

    Project with a problem

     
  • Davor Slutej

    Davor Slutej - 2007-11-06
    • priority: 5 --> 7
     
  • Davor Slutej

    Davor Slutej - 2007-12-22
    • priority: 7 --> 2
     
  • Davor Slutej

    Davor Slutej - 2007-12-22
    • priority: 2 --> 1
     
  • Anders Pettersson

    • milestone: --> v0.0
     
  • Mehrdad Saadatmand

    Logged In: YES
    user_id=1904984
    Originator: NO

    It seems that the issue is caused due the fact that the <model> element in .save file ( <behavior> in .saveccm ) does not get any unique ID and is only distinguished by 'filename' and 'type' attributes for the model and the component to which it belongs (it can be seen in the savexmlgenerator.mt file) . Also it seems that UPPAAL PORT only tries to find the first occurence matching a specific model by 'type' and 'filename' and generates the code for it and does not continue to the end of the file to find any other occurences of that specific model. So this issue appears to be mainly related to how UPPAAL PORT behaves and generates code.

     
  • Anders Pettersson

    Logged In: YES
    user_id=225711
    Originator: NO

    The place to start hunting this bug down should be the SaveReader class in the file saveccm\custom\generation\uppaalExport\SaveReader.java. More specific in the 'replaceModel()' method.

     
  • Davor Slutej

    Davor Slutej - 2008-04-15
    • assigned_to: nobody --> mehrdad_s
     

Log in to post a comment.

MongoDB Logo MongoDB