Skip to content
Snippets Groups Projects

added ref-place and ref-transition execution support

Merged Sebastian Ebert requested to merge feature/ref-execution into master
5 unresolved threads

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
57 90 Arc contributes this
58 91 to PetriNet.allArcs()
59 92 for petriNet();
93
94 coll java.util.Set<Page> PetriNet.allPages() [new java.util.HashSet()] root PetriNet;
95 Page contributes this
96 to PetriNet.allPages()
97 for petriNet();
98
99 coll java.util.Set<TransitionNode> PetriNet.allTransitionNodes() [new java.util.HashSet()] root PetriNet;
  • I don't see a reason why these collection attributes should exist. It is dangerous to keep them, because when the contents are resolved (with place() or transition()), the result is no longer a set.

    The example below does something with the same transition multiple times.

    for (TransitionNode n: pn.allTransitionNodes()) {
      n.transition().doSomething();
    }

    So I would remove allTransitionNodes() allRefTransitions() allRefPlaces()

  • changed this line in version 3 of the diff

  • Please register or sign in to reply
  • 1 1 package de.tudresden.inf.st.pnml;
    2 2
    3 import de.tudresden.inf.st.pnml.jastadd.model.Marking;
    4 import de.tudresden.inf.st.pnml.jastadd.model.PetriNet;
    3 import de.tudresden.inf.st.pnml.jastadd.model.*;
  • 27 26
    28 27 // String fileName = "src/main/resources/minimal.pnml";
    29 28 // String fileName = "src/main/resources/philo.pnml";
    30 String fileName = "src/main/resources/haddadin_automaton_flat.pnml";
    29 String fileName = "src/main/resources/placeRefNet.pnml";
  • 20 <position x="30" y="50"/>
    21 </graphics>
    22 </place>
    23 <transition id="tRefIn">
    24 <name>
    25 <text>tRefIn</text>
    26 <graphics>
    27 <offset x="0" y="0" />
    28 </graphics>
    29 </name>
    30 <graphics>
    31 <position x="285" y="205"/>
    32 </graphics>
    33 </transition>
    34 <referencePlace id="rp1" ref="p-E2D0-BCF6F-2">
    35 <toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
  • 9 <place id="pRefSrc">
    10 <name>
    11 <text>pRefSrc</text>
    12 <graphics>
    13 <offset x="0" y="-10" />
    14 </graphics>
    15 </name>
    16 <initialMarking>
    17 <text>1</text>
    18 </initialMarking>
    19 <graphics>
    20 <position x="30" y="50"/>
    21 </graphics>
    22 </place>
    23 <referenceTransition id="rt1" ref="t-E2D0-BCFAC-4">
    24 <toolspecific tool="de.tudresden.inf.st.pnml.distributedPN" version="0.1">
  • added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • Johannes Mey mentioned in commit 1cc0c255

    mentioned in commit 1cc0c255

  • merged

  • Please register or sign in to reply
    Loading