Skip to content
Snippets Groups Projects
Commit 5c5cd1c8 authored by Sebastian Ebert's avatar Sebastian Ebert
Browse files

cleaned main

parent dc6e6a34
No related branches found
No related tags found
No related merge requests found
......@@ -22,14 +22,13 @@ import java.util.UUID;
public class Main {
private static final boolean FLAG_INHIBITOR = true;
public static void main(String[] args) throws InvalidIDException, InterruptedException, IOException {
String configPath = null; //((args.length > 1) ? args[1] : null;
String pnmlPath = "/home/sebastian/git/dineros-public/dineros/pnml-relast-apps/robotic-sorting/test-models/pubsub.pnml";
String configPath = (args.length > 1) ? args[1] : null;
String pnmlPath = (args.length > 0) ? args[0] : null;
//"/home/sebastian/git/dineros-public/dineros/pnml-relast-apps/robotic-sorting/test-models/pubsub.pnml";
// "/home/sebastian/git/dineros-public/dineros/pnml-relast-apps/robotic-sorting/rpn-models/full-models/sorting-wf-synced-safe-sensor-grpn-sig.pnml";
// (args.length > 0) ? args[0] : null;
boolean flagInhibitor = args.length > 2 && Boolean.parseBoolean(args[2]);
if (pnmlPath == null) {
System.out.println("[ERROR] No model found on given input path.");
......@@ -54,7 +53,7 @@ public class Main {
// [STAGE 2] Transform topic transitions
for(DinerosTransition dt : petriNet.allDinerosTransitions()){
if(dt.canTransformTopicTransition()){
Page topicTransformedPage = dt.transformTopicElement(FLAG_INHIBITOR);
Page topicTransformedPage = dt.transformTopicElement(flagInhibitor);
for ( int i = 0; i < dt.ContainingPage().getNumObject(); i++ ){
if(dt.ContainingPage().getObject(i).getId().equals(dt.getId())){
dt.ContainingPage().setObject(topicTransformedPage, i);
......@@ -106,7 +105,7 @@ public class Main {
}
}
printNet(petriNet, true, false);
// printNet(petriNet, true, false);
// [STAGE 6] remove references / pages
System.out.println("[FLATTENER] Breaking references and pages.");
......@@ -137,7 +136,7 @@ public class Main {
// [STAGE 8] Analyze
// read config for analyzer from file
if(configPath != null && !configPath.equals("")) {
if(configPath != null && !configPath.equals("") && !configPath.equals("-nc")) {
ConfigReader cr = new ConfigReader(configPath);
String[] tinaConfig = cr.getTinaConfigParams();
String[] siftConfig = cr.getSiftConfigParams();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment