|
From: <ma...@us...> - 2011-02-27 16:01:25
|
Revision: 1051
http://scstudio.svn.sourceforge.net/scstudio/?rev=1051&view=rev
Author: madzin
Date: 2011-02-27 16:01:18 +0000 (Sun, 27 Feb 2011)
Log Message:
-----------
Add attribute checking to the diff algorithm
Modified Paths:
--------------
trunk/src/membership/diff_impl.cpp
trunk/src/membership/diff_impl.h
trunk/src/membership/membership_additional.cpp
trunk/src/membership/membership_additional.h
trunk/src/membership/membership_base.h
trunk/tests/diff/CMakeLists.txt
Added Paths:
-----------
trunk/tests/diff/flow05_1.mpr
trunk/tests/diff/flow05_1.mpr.result
trunk/tests/diff/flow05_2.mpr
trunk/tests/diff/flow05_2.mpr.result
trunk/tests/diff/flow06_1.mpr
trunk/tests/diff/flow06_1.mpr.result
trunk/tests/diff/spec05.mpr
trunk/tests/diff/spec06.mpr
trunk/tests/diff/spec07.mpr
Modified: trunk/src/membership/diff_impl.cpp
===================================================================
--- trunk/src/membership/diff_impl.cpp 2011-02-23 19:26:36 UTC (rev 1050)
+++ trunk/src/membership/diff_impl.cpp 2011-02-27 16:01:18 UTC (rev 1051)
@@ -17,7 +17,8 @@
#include "membership/diff_impl.h"
-void process_diffrences(BMscPtr dup_flow, const std::map<std::wstring, Difference*>& diff_map);
+void process_diffrences(MembershipContext* c, BMscPtr dup_flow, const std::map<std::wstring, Difference*>& diff_map);
+bool check_attributes(MembershipContext* c, BMscPtr specification, BMscPtr dup_flow);
void print_result(Difference* diff)
{
@@ -41,17 +42,41 @@
std::cerr << "===============================" << std::endl;
}
+void print_result(BMscPtr msc)
+{
+ InstancePtrList insts = msc->get_instances();
+ InstancePtrList::iterator it;
+ bool setting;
+
+ for(it = insts.begin(); it != insts.end(); it++)
+ {
+ std::wcerr << L"Instance " << (*it)->get_label() << std::endl;
+
+ StrictOrderAreaPtr area = boost::dynamic_pointer_cast<StrictOrderArea> ((*it)->get_first());
+ StrictEventPtr st = area->get_first();
+
+ while(st != NULL)
+ {
+ std::wcerr << st->get_message()->get_label() << L" id: " << st->get_attribute("identification", -3, setting) << L" ";
+ std::wcerr << L" removed: " << (st->get_marked()==REMOVED) << std::endl;
+ st = st->get_successor();
+ }
+ }
+}
+
/**
* Find diffrences on instance between flow and specification
*
* parameters: a - flow
* b - specification
*/
-Difference* instance_diff(InstancePtr a, InstancePtr b);
+Difference* instance_diff(MembershipContext* c, InstancePtr a, InstancePtr b);
-BMscPtr bmsc_bmsc_diff(BMscPtr specification, BMscPtr flow);
-BMscPtr hmsc_bmsc_diff(HMscPtr specification, BMscPtr flow);
+bool event_comparison(MembershipContext* c, StrictEventPtr& a, StrictEventPtr b);
+BMscPtr bmsc_bmsc_diff(MembershipContext* c, BMscPtr specification, BMscPtr flow);
+BMscPtr hmsc_bmsc_diff(MembershipContext* c, HMscPtr specification, BMscPtr flow);
+
/**
* Find msc diffrences between flow and specification
*
@@ -79,20 +104,24 @@
}
BMscPtr bmsc = boost::dynamic_pointer_cast<BMsc> (specification);
+
+ //TODO refactoring flow BMSC get to MembershipContext and start to use it (not as the parameter)
+ MembershipContext* c = new MembershipContext();
+ c->set_mem(this);
if (bmsc == NULL)
{
HMscPtr hmsc = boost::dynamic_pointer_cast<HMsc > (specification);
- return hmsc_bmsc_diff(hmsc, flow);
+ return hmsc_bmsc_diff(c, hmsc, flow);
}
else
- return bmsc_bmsc_diff(bmsc, flow);
+ return bmsc_bmsc_diff(c, bmsc, flow);
}
//Instance "a" - flow
//Instance "b" - specification
-Difference* instance_diff(InstancePtr a, InstancePtr b)
+Difference* instance_diff(MembershipContext* c, InstancePtr a, InstancePtr b)
{
std::vector<StrictEventPtr> a_ordering;
std::vector<StrictEventPtr> b_ordering;
@@ -115,17 +144,24 @@
if (event_b != NULL)
start_b = event_b;
- //TODO check what is in context, maybe it is necessary to replace it.
- MembershipContext* c = new MembershipContext();
-
- while (event_a != NULL || event_b != NULL)
+ while (event_a != NULL && event_b != NULL)
{
- if (!compare_events(c, event_a.get(), event_b.get()))
- break;
+ if (!event_comparison(c, event_a, event_b))
+ break;
row++;
+
+ if(c->get_diff_type() == MESSAGE)
+ set_identification(c, event_a.get(), event_b.get());
+
event_a = event_a->get_successor();
event_b = event_b->get_successor();
+
+ //the algorithm skips REMOVED events in attributes checking part
+ while(event_a != NULL && event_a->get_marked() == REMOVED)
+ {
+ event_a = event_a->get_successor();
+ }
}
int lower, upper;
@@ -245,6 +281,20 @@
diff->setLocation(location);
diff->setMessage(missing->get_message(), missing->is_send());
+
+ if(c->get_diff_type() == ATTRIBUTE)
+ {
+ EventPtr missing_match_event = missing->get_matching_event();
+
+ if(missing_match_event == NULL)
+ throw std::runtime_error("Error: unexpected bahaviour");
+
+ bool set_value = false;
+ diff->setAttribute(missing_match_event->get_attribute("identification", -1, set_value));
+
+ if(set_value)
+ throw std::runtime_error("Error: unexpected bahaviour");
+ }
}
int old_col = col;
@@ -275,8 +325,11 @@
script[k] = diff;
- while (event_a != NULL && event_b != NULL && compare_events(c, event_a.get(), event_b.get()))
+ while (event_a != NULL && event_b != NULL && event_comparison(c, event_a, event_b))
{
+ if(c->get_diff_type() == MESSAGE)
+ set_identification(c, event_a.get(), event_b.get());
+
event_a = event_a->get_successor();
event_b = event_b->get_successor();
row++;
@@ -288,10 +341,6 @@
if (event_a == NULL && event_b == NULL)
// hit southeast corner, have the answer
return script[k];
-//{
-//print_result(script[k]);
-//return NULL;
-//}
if (event_a == NULL)
// hit the last row, don't look to the left
@@ -310,12 +359,13 @@
throw std::runtime_error("Error: I don't know");
}
-BMscPtr bmsc_bmsc_diff(BMscPtr specification, BMscPtr flow)
+BMscPtr bmsc_bmsc_diff(MembershipContext* c, BMscPtr specification, BMscPtr flow)
{
BMscDuplicator duplicator;
BMscPtr dup_flow;
dup_flow = duplicator.duplicate(flow);
+ c->set_bmsc(dup_flow);
InstancePtrList spec_inst = specification->get_instances();
InstancePtrList flow_inst = dup_flow->get_instances();
@@ -335,7 +385,7 @@
{
if ((*spec_it)->get_label() == (*flow_it)->get_label())
{
- Difference* diff = instance_diff(*flow_it, *spec_it);
+ Difference* diff = instance_diff(c, *flow_it, *spec_it);
if(diff != NULL)
diff_map.insert(std::make_pair((*flow_it)->get_label(), diff));
@@ -378,16 +428,30 @@
if(!diff_map.empty())
{
- process_diffrences(dup_flow, diff_map);
+ process_diffrences(c, dup_flow, diff_map);
+ check_attributes(c, specification, dup_flow);
+
+ c->clear_attributed_events();
return dup_flow;
}
else
- return NULL;
+ {
+ if(check_attributes(c, specification, dup_flow))
+ {
+ c->clear_attributed_events();
+ return dup_flow;
+ }
+ else
+ {
+ c->clear_attributed_events();
+ return NULL;
+ }
+ }
}
-BMscPtr hmsc_bmsc_diff(HMscPtr specification, BMscPtr flow)
+BMscPtr hmsc_bmsc_diff(MembershipContext* c, HMscPtr specification, BMscPtr flow)
{
-// print_report(RS_ERROR, L"Error: this feature is not supported yet");
+ c->get_mem()->print_report(RS_ERROR, L"Error: this feature is not supported yet");
return NULL;
}
@@ -511,7 +575,7 @@
* - msg, original message which is supposed to add
* - ins_name
*/
-void add_incomplete_message(BMscPtr dup_flow, Difference* diff, IncompleteMessagePtr msg, std::wstring ins_name)
+void add_incomplete_message(MembershipContext* c, BMscPtr dup_flow, Difference* diff, IncompleteMessagePtr msg, std::wstring ins_name)
{
StrictEventPtr new_e = new StrictEvent();
set_event_position(new_e, diff, ins_name, dup_flow);
@@ -527,6 +591,8 @@
diff->getLocation()->set_successor(new_e);
else
get_proper_area(dup_flow, diff, ins_name)->set_first(new_e);
+
+ set_identification(c, new_e.get(), msg->get_event());
}
void add_complete_message(BMscPtr dup_flow, Difference* diff, Difference* match_diff,
@@ -570,8 +636,6 @@
if(predecessor1 == NULL)
{
-// new_e1->set_successor(strict_e_a1->get_first());
-// strict_e_a1->get_first()->set_predecessor(new_e1);
strict_e_a1->set_first(new_e1);
}
else
@@ -579,8 +643,6 @@
if(predecessor2 == NULL)
{
-// new_e2->set_successor(strict_e_a2->get_first());
-// strict_e_a2->get_first()->set_predecessor(new_e2);
strict_e_a2->set_first(new_e2);
}
else
@@ -611,7 +673,7 @@
return new_e;
}
-void process_diffrences(BMscPtr dup_flow, const std::map<std::wstring, Difference*>& diff_map)
+void process_diffrences(MembershipContext* c, BMscPtr dup_flow, const std::map<std::wstring, Difference*>& diff_map)
{
std::map<std::wstring, Difference*>::const_iterator it;
std::map<std::wstring, std::list<Difference*> > insert_map;
@@ -659,7 +721,7 @@
{
IncompleteMessagePtr in_msg = boost::dynamic_pointer_cast<IncompleteMessage > (message);
- add_incomplete_message(dup_flow, (*ins_list_it), in_msg, ins_map_it->first);
+ add_incomplete_message(c, dup_flow, (*ins_list_it), in_msg, ins_map_it->first);
continue;
}
@@ -702,7 +764,7 @@
{
StrictEventPtr new_e = create_event(dup_flow, *ins_list_it, ins_map_it->first);
- CompleteMessagePtr new_msg = new CompleteMessage(message->get_label());
+ CompleteMessagePtr new_msg = new CompleteMessage(com_msg->get_label());
new_msg->set_marked(ADDED);
if((*ins_list_it)->getDirection() == SEND)
@@ -710,12 +772,29 @@
else
new_msg->glue_events((*unmatched_set_it)->getEvent(), new_e);
+ if(new_e->is_send())
+ {
+ set_identification(c, new_e.get(), com_msg->get_send_event());
+ set_identification(c, (*unmatched_set_it)->getEvent().get(), com_msg->get_receive_event());
+ }
+ else
+ {
+ set_identification(c, (*unmatched_set_it)->getEvent().get(), com_msg->get_send_event());
+ set_identification(c, new_e.get(), com_msg->get_receive_event());
+ }
+
was_created = true;
+ break;
}
}
- if(!was_created)
+ if(was_created)
{
+ unmatched_set.erase(unmatched_set_it);
+ unmatched_map_it->second = unmatched_set;
+ }
+ else
+ {
std::wstring match_inst;
if ((*ins_list_it)->getDirection() == SEND)
@@ -729,4 +808,170 @@
}
}
}
+
+
+ //check unmatched diffrences in unmatched map
+ for (unmatched_map_it = unmatched_map.begin(); unmatched_map_it != unmatched_map.end(); unmatched_map_it++)
+ {
+ std::set<Unmatched*> unmatched_set = unmatched_map_it->second;
+
+ if(!unmatched_set.empty())
+ std::wcerr << L"Warning: diff was not successfull" << std::endl;
+ }
+
}
+
+bool check_attributes(MembershipContext* c, BMscPtr specification, BMscPtr dup_flow)
+{
+ std::map<std::wstring, Difference*> diff_map;
+
+ InstancePtrList spec_insts = specification->get_instances();
+ InstancePtrList flow_insts = dup_flow->get_instances();
+ InstancePtrList::iterator flow_it;
+ InstancePtrList::iterator spec_it;
+ bool found = false;
+
+ c->set_diff_type(ATTRIBUTE);
+
+ for(spec_it = spec_insts.begin(); spec_it != spec_insts.end(); spec_it++)
+ {
+ for(flow_it = flow_insts.begin(); flow_it != flow_insts.end(); flow_it++)
+ {
+ if((*flow_it)->get_label() == (*spec_it)->get_label())
+ {
+ Difference* diff = instance_diff(c, *flow_it, *spec_it);
+
+ if(diff != NULL)
+ diff_map.insert(std::make_pair((*flow_it)->get_label(), diff));
+
+ found = true;
+ break;
+ }
+ }
+
+ if(!found)
+ throw std::runtime_error("Error: unexpected behaviour");
+ }
+
+ //process_diffrences
+ if(!diff_map.empty())
+ {
+//TODO much of the following code was copied from proccess diffrences
+ std::map<std::wstring, Difference*>::const_iterator it;
+ std::map<std::wstring, std::list<Difference*> > insert_map;
+ Difference* diff;
+
+ for (it = diff_map.begin(); it != diff_map.end(); it++)
+ {
+ std::list<Difference*> insert_list;
+ diff = it->second;
+
+ if (diff == NULL)
+ continue;
+
+ while (diff != NULL)
+ {
+ if (diff->getOperation() == REMOVE)
+ {
+ diff->getLocation()->set_marked(REMOVED);
+ EventPtr match_e = diff->getLocation()->get_matching_event();
+
+ if(match_e != NULL)
+ match_e->set_marked(REMOVED);
+
+ diff->getLocation()->get_message()->set_marked(REMOVED);
+ }
+ else
+ insert_list.push_back(diff);
+
+ diff = diff->getPrevious();
+ }
+
+ insert_map.insert(std::make_pair(it->first, insert_list));
+ }
+
+ std::map<std::wstring, std::list<Difference*> >::iterator ins_map_it;
+
+ for (ins_map_it = insert_map.begin(); ins_map_it != insert_map.end(); ins_map_it++)
+ {
+ std::list<Difference*> insert_list = ins_map_it->second;
+ std::list<Difference*>::iterator ins_list_it;
+
+ for (ins_list_it = insert_list.begin(); ins_list_it != insert_list.end(); ins_list_it++)
+ {
+ MscMessagePtr message = (*ins_list_it)->getMessage();
+ CompleteMessagePtr com_msg = boost::dynamic_pointer_cast<CompleteMessage> (message);
+
+ if (com_msg == NULL)
+ throw std::runtime_error("Error: unexpected behaviour");
+
+ std::wstring match_inst;
+ std::wstring inst;
+
+ if((*ins_list_it)->getDirection() == SEND)
+ {
+ inst = com_msg->get_sender()->get_label();
+ match_inst = com_msg->get_receiver()->get_label();
+ }
+ else
+ {
+ match_inst = com_msg->get_sender()->get_label();
+ inst = com_msg->get_receiver()->get_label();
+ }
+
+ MscMessagePtr m = (*ins_list_it)->getMessage();
+ CompleteMessagePtr commplete = boost::dynamic_pointer_cast<CompleteMessage>(m);
+ EventPtr e = commplete->get_send_event();
+ Event* match_e = find_event_on_instance_by_id(c, match_inst, (*ins_list_it)->getAttribute());
+
+ StrictEvent* match_se = dynamic_cast<StrictEvent*>(match_e);
+
+ if(match_se == NULL)
+ throw std::runtime_error("Error: unexpected behaviour");
+
+ //TODO skontrolovat ci sa eventu nastavi instancia a area atd.
+ StrictEventPtr new_match_e = new StrictEvent();
+//TODO set position
+ new_match_e->set_area(match_se->get_area());
+ new_match_e->set_marked(ADDED);
+
+ match_se->set_successor(new_match_e);
+
+ StrictEventPtr new_e = create_event(dup_flow, *ins_list_it, inst);
+
+ CompleteMessagePtr new_msg = new CompleteMessage((*ins_list_it)->getMessage()->get_label());
+ new_msg->set_marked(ADDED);
+
+ new_msg->glue_events(new_match_e, new_e);
+ }
+ }
+
+//-------------------------------------------------------------------
+ return true;
+ }
+ return false;
+}
+
+bool event_comparison(MembershipContext* c, StrictEventPtr& event_a, StrictEventPtr event_b)
+{
+ if(c->get_diff_type() == MESSAGE)
+ return compare_events(c, event_a.get(), event_b.get());
+ else
+ {
+ while(event_a != NULL && event_a->get_marked() == REMOVED)
+ {
+ event_a = event_a->get_successor();
+ }
+
+ int sum = (event_a == NULL) + (event_b == NULL);
+
+ switch (sum)
+ {
+ case 0: break;
+ case 1: return false;
+ case 2: return true;
+ }
+
+ return compare_events_attribute(c, event_a.get(), event_b.get());
+ }
+}
Modified: trunk/src/membership/diff_impl.h
===================================================================
--- trunk/src/membership/diff_impl.h 2011-02-23 19:26:36 UTC (rev 1050)
+++ trunk/src/membership/diff_impl.h 2011-02-27 16:01:18 UTC (rev 1051)
@@ -18,7 +18,7 @@
#ifndef __DIFF_IMPL__
#define __DIFF_IMPL__
-#include "membership_additional.h"
+#include "membership_alg.h"
enum Operation {ADD, REMOVE};
enum Direction {SEND, RECEIVE};
@@ -89,6 +89,7 @@
MscMessagePtr message;
enum Direction dir;
enum Operation op;
+ int attribute; //! ATTRIBUTE part, INSERT operation: attribute of matching event of missing event.
int line1;
int line2;
@@ -118,6 +119,16 @@
return op;
}
+ void setAttribute(int i)
+ {
+ attribute = i;
+ }
+
+ int getAttribute()
+ {
+ return attribute;
+ }
+
void setLine1(int row)
{
line1 = row;
Modified: trunk/src/membership/membership_additional.cpp
===================================================================
--- trunk/src/membership/membership_additional.cpp 2011-02-23 19:26:36 UTC (rev 1050)
+++ trunk/src/membership/membership_additional.cpp 2011-02-27 16:01:18 UTC (rev 1051)
@@ -136,6 +136,7 @@
return true;
}
+//TODO I don't like the time of increasing max id
void set_identification(MembershipContext* c, Event* node_e, Event* b_e)
{
if (node_e->is_send())
@@ -391,6 +392,7 @@
StrictOrderAreaPtr strict = boost::dynamic_pointer_cast<StrictOrderArea>(first);
+ //TODO check whether it could fall down (SEGFAULT)
StrictEventPtr str = strict->get_first();
//function finds event only in bMSC which is looked for, so coregion area is not allowed
Modified: trunk/src/membership/membership_additional.h
===================================================================
--- trunk/src/membership/membership_additional.h 2011-02-23 19:26:36 UTC (rev 1050)
+++ trunk/src/membership/membership_additional.h 2011-02-27 16:01:18 UTC (rev 1051)
@@ -35,6 +35,8 @@
*/
bool compare_events_attribute(MembershipContext* c, Event* a, Event* b);
+void compare_events_attribute_diff(MembershipContext* c, Event* spec_e, Event* flow_e);
+
//! tries to find configuration into map of seared configuration
bool look_at_checked_conf(MembershipContext* c, ReferenceNodePtr node, ConfigurationPtr b);
@@ -72,5 +74,4 @@
* id - id of event which is looked for
*/
Event* find_event_on_instance_by_id(MembershipContext* c, std::wstring label, int id, StrictEventPtr start_event = NULL);
-
#endif
Modified: trunk/src/membership/membership_base.h
===================================================================
--- trunk/src/membership/membership_base.h 2011-02-23 19:26:36 UTC (rev 1050)
+++ trunk/src/membership/membership_base.h 2011-02-27 16:01:18 UTC (rev 1051)
@@ -36,6 +36,7 @@
class CoregionOrdering;
enum check_type {membership, receive_ordering};
enum TopBottom {top, bottom};
+enum DiffType {MESSAGE, ATTRIBUTE};
typedef boost::intrusive_ptr<Position> PositionPtr;
typedef boost::intrusive_ptr<Configuration> ConfigurationPtr;
@@ -63,6 +64,8 @@
bool print_path; //! store whether the path will be printed
bool relative_time;
bool absolut_time;
+
+ enum DiffType diff_type;
public:
MembershipContext()
@@ -71,6 +74,7 @@
print_path = true;
relative_time = false;
absolut_time = false;
+ diff_type = MESSAGE;
}
void set_mem(MembershipAlg* m)
@@ -303,6 +307,16 @@
{
return absolut_time;
}
+
+ enum DiffType get_diff_type()
+ {
+ return diff_type;
+ }
+
+ void set_diff_type(enum DiffType type)
+ {
+ diff_type = type;
+ }
};
//! store information about the position of checking algorithm on instance
Modified: trunk/tests/diff/CMakeLists.txt
===================================================================
--- trunk/tests/diff/CMakeLists.txt 2011-02-23 19:26:36 UTC (rev 1050)
+++ trunk/tests/diff/CMakeLists.txt 2011-02-27 16:01:18 UTC (rev 1051)
@@ -28,5 +28,6 @@
ADD_DIFF_TEST(spec04.mpr flow04_3.mpr 1)
ADD_DIFF_TEST(spec04.mpr flow04_4.mpr 1)
ADD_DIFF_TEST(spec05.mpr flow05_1.mpr 1)
+ADD_DIFF_TEST(spec05.mpr flow05_2.mpr 1)
ADD_DIFF_TEST(spec06.mpr flow06_1.mpr 1)
Added: trunk/tests/diff/flow05_1.mpr
===================================================================
--- trunk/tests/diff/flow05_1.mpr (rev 0)
+++ trunk/tests/diff/flow05_1.mpr 2011-02-27 16:01:18 UTC (rev 1051)
@@ -0,0 +1,9 @@
+mscdocument Drawing1;
+msc Page_1;
+inst A;
+inst B;
+A: instance;
+endinstance;
+B: instance;
+endinstance;
+endmsc;
Added: trunk/tests/diff/flow05_1.mpr.result
===================================================================
--- trunk/tests/diff/flow05_1.mpr.result (rev 0)
+++ trunk/tests/diff/flow05_1.mpr.result 2011-02-27 16:01:18 UTC (rev 1051)
@@ -0,0 +1,23 @@
+OK: HMSC contains bMSC
+
+mscdocument msc_diff;
+msc Page_1;
+inst A;
+inst B;
+A: instance;
+/* ADDED */
+/* ADDED */
+out a,0 to B;
+/* ADDED */
+/* ADDED */
+out a,1 to B;
+endinstance;
+B: instance;
+/* ADDED */
+/* ADDED */
+in a,0 from A;
+/* ADDED */
+/* ADDED */
+in a,1 from A;
+endinstance;
+endmsc;
Added: trunk/tests/diff/flow05_2.mpr
===================================================================
--- trunk/tests/diff/flow05_2.mpr (rev 0)
+++ trunk/tests/diff/flow05_2.mpr 2011-02-27 16:01:18 UTC (rev 1051)
@@ -0,0 +1,13 @@
+mscdocument Drawing1;
+msc Page_1;
+inst A;
+inst B;
+A: instance;
+out a,3 to B;
+out a,0 to B;
+endinstance;
+B: instance;
+in a,0 from A;
+in a,3 from A;
+endinstance;
+endmsc;
Added: trunk/tests/diff/flow05_2.mpr.result
===================================================================
--- trunk/tests/diff/flow05_2.mpr.result (rev 0)
+++ trunk/tests/diff/flow05_2.mpr.result 2011-02-27 16:01:18 UTC (rev 1051)
@@ -0,0 +1,25 @@
+OK: HMSC contains bMSC
+
+mscdocument msc_diff;
+msc Page_1;
+inst A;
+inst B;
+A: instance;
+out a,0 to B;
+/* REMOVED */
+/* REMOVED */
+out a,1 to B;
+/* ADDED */
+/* ADDED */
+out a,2 to B;
+endinstance;
+B: instance;
+/* REMOVED */
+/* REMOVED */
+in a,1 from A;
+in a,0 from A;
+/* ADDED */
+/* ADDED */
+in a,2 from A;
+endinstance;
+endmsc;
Added: trunk/tests/diff/flow06_1.mpr
===================================================================
--- trunk/tests/diff/flow06_1.mpr (rev 0)
+++ trunk/tests/diff/flow06_1.mpr 2011-02-27 16:01:18 UTC (rev 1051)
@@ -0,0 +1,9 @@
+mscdocument Drawing1;
+msc Page_1;
+inst A;
+inst B;
+A: instance;
+endinstance;
+B: instance;
+endinstance;
+endmsc;
Added: trunk/tests/diff/flow06_1.mpr.result
===================================================================
--- trunk/tests/diff/flow06_1.mpr.result (rev 0)
+++ trunk/tests/diff/flow06_1.mpr.result 2011-02-27 16:01:18 UTC (rev 1051)
@@ -0,0 +1,23 @@
+OK: HMSC contains bMSC
+
+mscdocument msc_diff;
+msc Page_1;
+inst A;
+inst B;
+A: instance;
+/* ADDED */
+/* ADDED */
+out a,0 to B;
+/* ADDED */
+/* ADDED */
+out a,1 to B;
+endinstance;
+B: instance;
+/* ADDED */
+/* ADDED */
+in a,1 from A;
+/* ADDED */
+/* ADDED */
+in a,0 from A;
+endinstance;
+endmsc;
Added: trunk/tests/diff/spec05.mpr
===================================================================
--- trunk/tests/diff/spec05.mpr (rev 0)
+++ trunk/tests/diff/spec05.mpr 2011-02-27 16:01:18 UTC (rev 1051)
@@ -0,0 +1,13 @@
+mscdocument Drawing1;
+msc Page_1;
+inst A;
+inst B;
+A: instance;
+out a,0 to B;
+out a,3 to B;
+endinstance;
+B: instance;
+in a,0 from A;
+in a,3 from A;
+endinstance;
+endmsc;
Added: trunk/tests/diff/spec06.mpr
===================================================================
--- trunk/tests/diff/spec06.mpr (rev 0)
+++ trunk/tests/diff/spec06.mpr 2011-02-27 16:01:18 UTC (rev 1051)
@@ -0,0 +1,13 @@
+mscdocument Drawing1;
+msc Page_1;
+inst A;
+inst B;
+A: instance;
+out a,0 to B;
+out a,3 to B;
+endinstance;
+B: instance;
+in a,3 from A;
+in a,0 from A;
+endinstance;
+endmsc;
Added: trunk/tests/diff/spec07.mpr
===================================================================
--- trunk/tests/diff/spec07.mpr (rev 0)
+++ trunk/tests/diff/spec07.mpr 2011-02-27 16:01:18 UTC (rev 1051)
@@ -0,0 +1,11 @@
+mscdocument Drawing1;
+msc Page_1;
+inst A;
+inst B;
+A: instance;
+out a,0 to B;
+endinstance;
+B: instance;
+in a,0 from A;
+endinstance;
+endmsc;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|