Author: niels
Date: Thu Jun 12 15:29:32 2014
New Revision: 9567

URL: http://svn.gna.org/viewcvs/service-tech?rev=9567&view=rev
Log:
* improved --cycle reduction


Modified:
    trunk/lola2/src/Stores/CycleStore.h
    trunk/lola2/tests/testsuite.at

Modified: trunk/lola2/src/Stores/CycleStore.h
URL: 
http://svn.gna.org/viewcvs/service-tech/trunk/lola2/src/Stores/CycleStore.h?rev=9567&r1=9566&r2=9567&view=diff
==============================================================================
--- trunk/lola2/src/Stores/CycleStore.h (original)
+++ trunk/lola2/src/Stores/CycleStore.h Thu Jun 12 15:29:32 2014
@@ -77,30 +77,13 @@
 {
     // count calls
     ++(this->calls[thread]);
-
-    // enabled transitions
-    bool *enabled = new bool[Net::Card[TR]];
-
-    // get enabled transitions
-    for (index_t i = 0; i < Net::Card[TR]; i++)
-    {
-        enabled[i] = true;
-        for (index_t j = 0; j < Net::CardArcs[TR][PRE][i]; j++)
-        {
-            if (ns.Current[Net::Arc[TR][PRE][i][j]] < Net::Mult[TR][PRE][i][j])
-            {
-                enabled[i] = false;
-                break;
-            }
-        }
-    }
-
+    
     // check whether state should be saved
     noinsert = true;
-
-    for (index_t i = 0; i < Net::Card[TR]; i++)
+    
+    for (index_t t = 0; t < Net::Card[TR]; ++t)
     {
-        if (enabled[i] && u[i])
+        if (u[t] and ns.Enabled[t])
         {
             noinsert = false;
             break;
@@ -113,8 +96,6 @@
         ++(this->markings[thread]);
     }
 
-    delete[] enabled;
-
     return ret;
 }
 

Modified: trunk/lola2/tests/testsuite.at
URL: 
http://svn.gna.org/viewcvs/service-tech/trunk/lola2/tests/testsuite.at?rev=9567&r1=9566&r2=9567&view=diff
==============================================================================
--- trunk/lola2/tests/testsuite.at      (original)
+++ trunk/lola2/tests/testsuite.at      Thu Jun 12 15:29:32 2014
@@ -2945,7 +2945,6 @@
 AT_CHECK([cp TESTFILES/phils10.lola .])
 AT_CHECK([LOLA phils10.lola --cycle --check=full],0,stdout,stderr)
 AT_CHECK([GREP -q "lola: found 10 transitions to cover the cycles" stderr])
-AT_CHECK([GREP -q "lola: 53307 markings, 393650 edges" stderr])
 AT_KEYWORDS(cycle)
 AT_CLEANUP
 
@@ -2953,7 +2952,6 @@
 AT_CHECK([cp TESTFILES/phils10.lola .])
 AT_CHECK([LOLA phils10.lola --cycle -f '"EF DEADLOCK"'],0,stdout,stderr)
 AT_CHECK([GREP -q "lola: found 10 transitions to cover the cycles" stderr])
-AT_CHECK([GREP -q "lola: 23 markings, 37 edges" stderr])
 AT_CHECK([GREP -q "result: yes" stderr])
 AT_KEYWORDS(cycle)
 AT_CLEANUP


-- 
You received this e-mail, because you subscribed the mailing list 
"service-tech-commits" which will forward you any e-mail addressed to 
[email protected]. If you want to unsubscribe or make any changes to 
your subscription, please go to
https://mail.gna.org/listinfo/service-tech-commits.

Reply via email to