|
From: <ma...@us...> - 2012-01-06 19:02:28
|
Revision: 1260
http://scstudio.svn.sourceforge.net/scstudio/?rev=1260&view=rev
Author: madzin
Date: 2012-01-06 19:02:21 +0000 (Fri, 06 Jan 2012)
Log Message:
-----------
Remove redundant test coregion_minimal_pat8. Remove test which brake prerequisites from automatic tests. Fix bug in time constraints checking (time intervals between reference nodes)
Modified Paths:
--------------
trunk/src/membership/membership_time.cpp
trunk/tests/membership/CMakeLists.txt
trunk/tests/membership/TODO
Added Paths:
-----------
trunk/tests/membership/coregion_minimal_pat5.mpr.result
trunk/tests/membership/coregion_minimal_pat6.mpr.result
Removed Paths:
-------------
trunk/tests/membership/coregion_minimal_pat8.mpr
trunk/tests/membership/coregion_minimal_pat8.vsd
Modified: trunk/src/membership/membership_time.cpp
===================================================================
--- trunk/src/membership/membership_time.cpp 2012-01-05 23:53:25 UTC (rev 1259)
+++ trunk/src/membership/membership_time.cpp 2012-01-06 19:02:21 UTC (rev 1260)
@@ -287,6 +287,8 @@
BMscIntervalSetComponentMatrix matrix(bmsc_f);
+ /*Due to the matrix computation optimization, it is necessary to add all later asked intervals to matrix. It means that because we will need to check all time constraints from specification, it is necessary to add all intervals to the matrix now. Then probably we would neet to ask which event is the maximal/minimal one, we need to add to matrix these intervals too. At so on ... */
+
//add reference node time constraints
std::set<MembershipTimeRelationPtr>::iterator ref_it;
for(ref_it = ref_node_time.begin(); ref_it != ref_node_time.end(); ref_it++)
@@ -296,6 +298,7 @@
std::set<Event*>::iterator first, second;
+ //add intervals for being able get minimal event
for(first = start.begin(); first != start.end(); first++)
{
for(second = first, second++; second != start.end(); second++)
@@ -307,6 +310,7 @@
}
}
+ //add intervals for being able get maximal event
for(first = end.begin(); first != end.end(); first++)
{
for(second = first, second++; second != end.end(); second++)
@@ -317,6 +321,18 @@
matrix.fill_intersection(*first, *second, interval_set);
}
}
+
+ //add possible intervals itselfs (all possible pairs)
+ for(first = start.begin(); first != start.end(); first++)
+ {
+ for(second = end.begin(); second != end.end(); second++)
+ {
+ MscTimeIntervalSetD interval_set;
+ MscTimeIntervalD interval (-D::infinity(), D::infinity());
+ interval_set.insert(interval);
+ matrix.fill_intersection(*first, *second, interval_set);
+ }
+ }
}
std::set<Event*> bmsc_minimal_events;
@@ -506,6 +522,12 @@
return true;
}
+/*
+ time constraints from specification which has to be satisfied
+ relative_time;
+ absolute_time;
+ ref_node_time;
+*/
bool check_time(MembershipContext* c, std::set<MembershipTimeRelationPtr>& relative_time,
std::map<Event*, MembershipAbsoluteTimePtrList>& absolute_time,
std::set<MembershipTimeRelationPtr> ref_node_time)
@@ -680,13 +702,7 @@
/*
for(std::set<Event*>::iterator it = events.begin(); it != events.end(); it++)
{
- std::cerr << "ee " << *it;
-if((*it)->get_instance()->get_label() == L"A")
-std::cerr << " A" << std::endl;
-if((*it)->get_instance()->get_label() == L"B")
-std::cerr << " B" << std::endl;
-if((*it)->get_instance()->get_label() == L"C")
-std::cerr << " C" << std::endl;
+std::wcerr << "maximal e inst " << (*it)->get_instance()->get_label() << " message " << (*it)->get_message()->get_label() << " send " << (*it)->is_send() << std::endl;
}
*/
Modified: trunk/tests/membership/CMakeLists.txt
===================================================================
--- trunk/tests/membership/CMakeLists.txt 2012-01-05 23:53:25 UTC (rev 1259)
+++ trunk/tests/membership/CMakeLists.txt 2012-01-06 19:02:21 UTC (rev 1260)
@@ -183,11 +183,12 @@
#broken preconditions
#ADD_MEMBER_TEST(coregion_minimal.mpr coregion_minimal_pat3.mpr 0)
-ADD_MEMBER_TEST(coregion_minimal.mpr coregion_minimal_pat4.mpr 0)
+#broken preconditions
+#ADD_MEMBER_TEST(coregion_minimal.mpr coregion_minimal_pat4.mpr 0)
+
ADD_MEMBER_TEST(coregion_minimal.mpr coregion_minimal_pat5.mpr 1)
ADD_MEMBER_TEST(coregion_minimal.mpr coregion_minimal_pat6.mpr 1)
ADD_MEMBER_TEST(coregion_minimal.mpr coregion_minimal_pat7.mpr 1)
-ADD_MEMBER_TEST(coregion_minimal.mpr coregion_minimal_pat8.mpr 1)
ADD_MEMBER_TEST(complete.mpr complete_pat1.mpr 0)
ADD_MEMBER_TEST(complete.mpr complete_pat2.mpr 0)
Modified: trunk/tests/membership/TODO
===================================================================
--- trunk/tests/membership/TODO 2012-01-05 23:53:25 UTC (rev 1259)
+++ trunk/tests/membership/TODO 2012-01-06 19:02:21 UTC (rev 1260)
@@ -1,3 +1,5 @@
+CRITICAL!!!!!!!!
+
Sometimes the following message is showen when a problem is decideable (e.g. send event has to be before receive event of the same message). Proper tests were removed from the automated tests.
Error: not decidable which event is the minimalone of the B node.
@@ -2,2 +4,4 @@
Flow "Page_1" not found.
+
+check also coregion_minimal_pat6.mpr
----------------------------------------------------------------
@@ -8,3 +12,23 @@
Error: not decidable which event is the maximalone of the NAME node.
Flow "NAME" not found.
+
+
+
+-----------------------------------------------------------------
+
+minimalone -> minimal one
+maximalone -> maximal one
+
+-----------------------------------------------------------------
+
+Get minimal event of BMSC
+Get maximal event of BMSC
+
+Lubos said that there already exist functions like that
+
+----------------------------------------------------------------
+
+For printing cover information, the find flow algorithm are processed twice for all MSC which are supposed to be counted into cover.
+
+--------------------------------------------------------------
Added: trunk/tests/membership/coregion_minimal_pat5.mpr.result
===================================================================
--- trunk/tests/membership/coregion_minimal_pat5.mpr.result (rev 0)
+++ trunk/tests/membership/coregion_minimal_pat5.mpr.result 2012-01-06 19:02:21 UTC (rev 1260)
@@ -0,0 +1,36 @@
+Flow "Page_1" found.
+Diagram with found flow highlighted.
+mscdocument coregion_minimal;
+msc Page_1;
+/* PATH */
+initial connect/* PATH */
+ L0;
+/* PATH */
+/* ATTRIBUTES: [membership_counter 1] */
+L0: reference NAME time [0,10);
+/* PATH */
+ connect/* PATH */
+ L1;
+/* PATH */
+L1: final/* PATH */
+;
+endmsc;
+msc NAME;
+inst A;
+inst B;
+inst C;
+A: instance;
+in request,0 from B;
+out answer,1 to B;
+endinstance;
+B: instance;
+concurrent;
+out request,0 to A;
+in answer,1 from A;
+out Ping_pong,2 to C;
+endconcurrent;
+endinstance;
+C: instance;
+in Ping_pong,2 from B;
+endinstance;
+endmsc;
Added: trunk/tests/membership/coregion_minimal_pat6.mpr.result
===================================================================
--- trunk/tests/membership/coregion_minimal_pat6.mpr.result (rev 0)
+++ trunk/tests/membership/coregion_minimal_pat6.mpr.result 2012-01-06 19:02:21 UTC (rev 1260)
@@ -0,0 +1,36 @@
+Flow "Page_1" found.
+Diagram with found flow highlighted.
+mscdocument coregion_minimal;
+msc Page_1;
+/* PATH */
+initial connect/* PATH */
+ L0;
+/* PATH */
+/* ATTRIBUTES: [membership_counter 1] */
+L0: reference NAME time [0,10);
+/* PATH */
+ connect/* PATH */
+ L1;
+/* PATH */
+L1: final/* PATH */
+;
+endmsc;
+msc NAME;
+inst A;
+inst B;
+inst C;
+A: instance;
+in request,0 from B;
+out answer,1 to B;
+endinstance;
+B: instance;
+concurrent;
+out request,0 to A;
+in answer,1 from A;
+out Ping_pong,2 to C;
+endconcurrent;
+endinstance;
+C: instance;
+in Ping_pong,2 from B;
+endinstance;
+endmsc;
Deleted: trunk/tests/membership/coregion_minimal_pat8.mpr
===================================================================
--- trunk/tests/membership/coregion_minimal_pat8.mpr 2012-01-05 23:53:25 UTC (rev 1259)
+++ trunk/tests/membership/coregion_minimal_pat8.mpr 2012-01-06 19:02:21 UTC (rev 1260)
@@ -1,28 +0,0 @@
-mscdocument coregion_minimal_pat8.vsd;
-msc Page_1;
-inst A;
-inst B;
-inst C;
-A: instance;
-label e0;
-in request,0 from B;
-time e1 [1];
-label e1;
-out answer,1 to B;
-time e2 [1,3);
-endinstance;
-B: instance;
-label e3;
-out Ping_pong,2 to C;
-time e4 [2,3), e5 [0,5);
-label e4;
-out request,0 to A;
-time e0 [1,2);
-label e2;
-in answer,1 from A;
-endinstance;
-C: instance;
-label e5;
-in Ping_pong,2 from B;
-endinstance;
-endmsc;
Deleted: trunk/tests/membership/coregion_minimal_pat8.vsd
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|