View Javadoc

1   package net.kwfgrid.gworkflowdl.analysis;
2   
3   import net.kwfgrid.gworkflowdl.structure.Place;
4   import net.kwfgrid.gworkflowdl.structure.Transition;
5   import net.kwfgrid.gworkflowdl.structure.Workflow;
6   
7   /***
8    * Created by IntelliJ IDEA.
9    * User: hans
10   * Date: 01.11.2005
11   * Time: 10:17:08
12   * To change this template use File | Settings | File Templates.
13   */
14  public class KarpMillerAnalyzer extends Analyzer {
15      public KarpMillerAnalyzer(Workflow wf) {
16          super(wf, Net.KARP_MILLER_TREE);
17      }
18  
19      public boolean hasInfiniteRun() {
20          return ((KarpMillerTree) net).infiniteRun;
21      }
22  
23      public boolean isUnbounded() {
24          return ((KarpMillerTree) net).unbounded;
25      }
26  
27      public boolean mustFire(Transition t) {
28          int it = workflow.getTransitionIndex(t.getID());
29          return ((KarpMillerTree) net).mustFire(it);
30      }
31  
32      public String karpMillerTree2String() {
33          return ((KarpMillerTree) net).toString();
34      }
35  
36      public boolean isUnbounded(Place p) {
37          int i = workflow.getPlaceIndex(p.getID());
38          return ((KarpMillerTree) net).isUnbounded(i);
39      }
40  
41      public boolean isComplete() {
42          return net.isComplete();
43      }
44  }