@@ -222,7 +222,7 @@ public static List<Integer> applyReductions(MccTranslator reader, DoneProperties
222222 sz += parikh .valueAt (i );
223223 }
224224 if (sz != 0 ) {
225- if (Application . DEBUG >= 1 ) {
225+ if (DEBUG >= 1 ) {
226226 System .out .println ("SMT solver thinks a reachable witness state is likely to occur in " +sz +" steps." );
227227 SparseIntArray init = new SparseIntArray ();
228228 for (int i =0 ; i < parikh .size () ; i ++) {
@@ -416,14 +416,20 @@ public static List<Integer> applyReductions(MccTranslator reader, DoneProperties
416416
417417 reader .setSpn (spn ,false );
418418
419- if (! spn .getProperties ().isEmpty ())
420- testWithReachability (reader ,maxSeen ,maxStruct ,doneProps );
419+ if (! spn .getProperties ().isEmpty ()) {
420+ if (testWithReachability (reader ,maxSeen ,maxStruct ,doneProps )>0 ) {
421+ checkStatus (spn , tocheck , maxStruct , maxSeen , doneProps , "REACHABILITY" );
422+ printBounds ("after reachability check" , maxSeen , maxStruct );
423+ }
424+ }
425+
426+
421427
422428 return maxStruct ;
423429 }
424430
425431
426- private static void testWithReachability (MccTranslator ori , List <Integer > maxSeen , List <Integer > maxStruct ,
432+ private static int testWithReachability (MccTranslator ori , List <Integer > maxSeen , List <Integer > maxStruct ,
427433 DoneProperties doneProps ) {
428434
429435 SparsePetriNet spnori = ori .getSPN ();
@@ -432,7 +438,7 @@ private static void testWithReachability(MccTranslator ori, List<Integer> maxSee
432438 spn .getProperties ().clear ();
433439
434440
435- IntMatrixCol tflowTP = subproblem .getSPN ().getFlowTP ().transpose ();
441+ // IntMatrixCol tflowTP = subproblem.getSPN().getFlowTP().transpose();
436442 Map <Integer ,String > propId = new HashMap <>();
437443 for (int id =0 ; id < spnori .getProperties ().size () ; id ++) {
438444 Property prop = spnori .getProperties ().get (id );
@@ -478,7 +484,7 @@ private static void testWithReachability(MccTranslator ori, List<Integer> maxSee
478484 seen ++;
479485 }
480486 }
481- printBounds ( "After reachability solving " + seen + " queries." , maxSeen , maxStruct ) ;
487+ return seen ;
482488 }
483489
484490 private static void printBounds (String rule , List <Integer > maxSeen , List <Integer > maxStruct ) {
@@ -573,7 +579,7 @@ public static void approximateStructuralBoundsUsingInvariants(ISparsePetriNet sr
573579
574580 }
575581
576- if (Application . DEBUG >= 2 ) {
582+ if (DEBUG >= 2 ) {
577583 System .out .println ("(Positive flows) Managed to find structural bounds :" + Arrays .toString (limits ));
578584 System .out .println ("Current structural bounds on expressions : " + maxStruct );
579585 }
@@ -633,7 +639,7 @@ public static void approximateStructuralBoundsUsingInvariants(ISparsePetriNet sr
633639 }
634640 }
635641 }
636- if (Application . DEBUG >= 2 ) {
642+ if (DEBUG >= 2 ) {
637643 System .out .println ("Repeat=" +repeat +" : Managed to find structural bounds :" + Arrays .toString (limits ));
638644 System .out .println ("Current structural bounds on expressions : " + maxStruct );
639645 }
@@ -670,7 +676,7 @@ public static void approximateStructuralBoundsUsingInvariants(ISparsePetriNet sr
670676 }
671677 }
672678 }
673- if (Application . DEBUG >= 1 ) {
679+ if (DEBUG >= 1 ) {
674680 System .out .println ("Current structural bounds on expressions : " + maxStruct );
675681 }
676682 }
0 commit comments