|
From: <ma...@us...> - 2011-10-09 16:43:09
|
Revision: 1205
http://scstudio.svn.sourceforge.net/scstudio/?rev=1205&view=rev
Author: madzin
Date: 2011-10-09 16:43:02 +0000 (Sun, 09 Oct 2011)
Log Message:
-----------
Modify difference processing in diff algorithm. In this version the algorithm returns in some cases better result. It is hard to say whether it returns minimal diff in any case.
Modified Paths:
--------------
trunk/src/data/msc.h
trunk/src/membership/diff_impl.cpp
trunk/src/membership/membership_base.h
Added Paths:
-----------
trunk/tests/diff/flow07_1.mpr.result2
trunk/tests/diff/flow12_1.mpr.result
trunk/tests/diff/flow12_2.mpr.result
Modified: trunk/src/data/msc.h
===================================================================
--- trunk/src/data/msc.h 2011-10-03 23:00:43 UTC (rev 1204)
+++ trunk/src/data/msc.h 2011-10-09 16:43:02 UTC (rev 1205)
@@ -2011,6 +2011,17 @@
m_successor = successor;
}
+ void remove_successor()
+ {
+ if(m_successor->is_last())
+ m_successor = NULL;
+ else
+ {
+ m_successor = m_successor->m_successor;
+ m_successor->m_predecessor = this;
+ }
+ }
+
void set_predecessor(const StrictEventPtr& predecessor)
{
if(!is_first())
@@ -2022,6 +2033,17 @@
m_predecessor = predecessor.get();
}
+ void remove_predecessor()
+ {
+ if(m_predecessor->is_first())
+ m_predecessor = NULL;
+ else
+ {
+ m_predecessor = m_predecessor->m_predecessor;
+ m_predecessor->m_successor = this;
+ }
+ }
+
int is_first() const
{
return m_predecessor==NULL;
Modified: trunk/src/membership/diff_impl.cpp
===================================================================
--- trunk/src/membership/diff_impl.cpp 2011-10-03 23:00:43 UTC (rev 1204)
+++ trunk/src/membership/diff_impl.cpp 2011-10-09 16:43:02 UTC (rev 1205)
@@ -19,11 +19,11 @@
void process_diffrences(MembershipContext* c, BMscPtr dup_flow, const std::map<std::wstring, Difference*>& diff_map,
std::set<MscMessagePtr>& added_messages, std::set<MscMessagePtr>& removed_messages);
-bool check_attributes(MembershipContext* c, BMscPtr specification, BMscPtr dup_flow);
bool check_matching_event_creation(std::map<std::wstring, std::list<Difference*> > insert_map, Difference* diff);
std::map<std::wstring, std::list<Difference*> > create_insert_map(MembershipContext* c,
const std::map<std::wstring, Difference*>& diff_map);
void diff_identification_settings(MembershipContext* c, const std::map<std::wstring, Difference*>& diff_map);
+void diff_identification_settings2(MembershipContext* c, const std::map<std::wstring, Difference*>& diff_map, std::set<Difference*> unmatched_diff);
InstancePtr find_instance(BMscPtr bmsc, std::wstring name);
void separate_diffrences(MembershipContext* c,
const std::map<std::wstring, Difference*>& diff_map,
@@ -47,7 +47,7 @@
while(st != NULL)
{
- std::wcerr << st->get_message()->get_label() << L" id: " << st->get_attribute("identification", -3, setting) << L" ";
+ std::wcerr << st->get_message()->get_label() << " " << st << L" id: " << st->get_attribute("identification", -3, setting) << L" ";
std::wcerr << L" removed: " << (st->get_marked()==REMOVED) << std::endl;
st = st->get_successor();
}
@@ -143,17 +143,8 @@
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;
@@ -267,10 +258,6 @@
for (int i = 0; i < row-1; i++)
{
location = location->get_successor();
-
-//TODO check this
- if(location->get_marked() == REMOVED)
- i--;
}
if(row <= 0)
location = NULL;
@@ -323,9 +310,6 @@
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++;
@@ -387,12 +371,11 @@
if(compare_events(original_event, (*discover)->getLocation().get(), false))
{
- //function returns bool value: true in case the proper event has been found
- // false in case the proper event has not been found
StrictEventPtr new_location = search_predecessors_successors(*discover, original_event);
if(new_location != NULL)
{
+ //modify difference to matching event
(*discover)->setLocation(new_location);
matched_differences.insert(*un_it);
matched_differences.insert(*discover);
@@ -400,6 +383,14 @@
}
}
}
+
+ //remove matched differences from unmatched_differences
+ std::set<Difference*>::iterator matched_it;
+ for(matched_it = matched_differences.begin(); matched_it != matched_differences.end(); matched_it++)
+ {
+(*matched_it)->getLocation()->set_marked(REMOVED);
+ unmatched_differences.erase(*matched_it);
+ }
}
/**
@@ -418,7 +409,7 @@
* 2. wrong ordering: one event of the message is in proper place but the other is in wrong ordering
* on instance. Remove diffrence is supposed to be paired with add diffrence.
*/
-void diff_identification_preprocessing(MembershipContext* c,
+std::set<Difference*> diff_identification_preprocessing(MembershipContext* c,
std::map<std::wstring, Difference*>& diff_map)
{
//diffrences which operation is add, separated by instances
@@ -444,8 +435,11 @@
CompleteMessagePtr msg = boost::dynamic_pointer_cast<CompleteMessage> ((*list_it)->getMessage());
if(msg == NULL)
+{
//in case the message is incomplete, there is no pair
+(*list_it)->getLocation()->set_marked(REMOVED);
continue;
+}
else
{
//in case the message is complete
@@ -462,7 +456,10 @@
//for advanced remove diffrences matching is it irelevant, because when there is not matching difference it means that one event was on right place (remove_insert exmaple).
if(matching_it == remove_map.end())
+ {
+ unmatched_differences.insert(*list_it);
continue;
+ }
std::list<Difference*>::reverse_iterator matching_list_it;
@@ -474,7 +471,11 @@
}
if(matching_list_it != matching_it->second.rend())
+ {
+(*matching_list_it)->getLocation()->set_marked(REMOVED);
+(*list_it)->getLocation()->set_marked(REMOVED);
continue;
+ }
else
unmatched_differences.insert(*list_it);
}
@@ -483,13 +484,19 @@
//at this moment all candidates for advanced matching are in unmatched_differences
preprocessing_advanced_matching(unmatched_differences);
+ //TODO in identification settings I need to solve unmatched_differences
+ //at this moment I have got all unmatched remove deiffrences in unmatched_differences
+ //think about if I can marked messages as removed when the matching difference of the remove difference is insert/add
+ //NIE pretoze by sa mi rozhodili identifikatory ak by som pridaval identifikatory ako v metode identification_settings2
+
+ return unmatched_differences;
}
/**
* Because of previous computation does not return the minimal diagrams diff, some
* added messages is now supposed to be deleted.
*/
-void remove_added_message(MscMessagePtr msg)
+void remove_added_message(MembershipContext* c, MscMessagePtr msg)
{
CompleteMessagePtr com_msg = boost::dynamic_pointer_cast<CompleteMessage> (msg);
StrictEventPtr s_e, r_e;
@@ -507,30 +514,36 @@
else
//sets NULL as a predecessor of the successor
s_e->get_successor()->set_predecessor(NULL);
+
+ c->remove_attributed_event(s_e.get());
}
else
{
s_e = dynamic_cast<StrictEvent*>(com_msg->get_send_event());
r_e = dynamic_cast<StrictEvent*>(com_msg->get_receive_event());
- if(s_e || r_e)
+ if(s_e == NULL || r_e == NULL)
throw std::runtime_error("Error: unexpected behaviour");
+ //IT can not occure NULL pointer exception because some other message has to be present in the area
//remove send event
if(s_e->get_predecessor() != NULL)
- //remove event (to predecessor sets event's successor as successor)
- s_e->get_predecessor()->set_successor(s_e->get_successor());
+ //remove event (call remove_successor from the predecessor)
+ s_e->get_predecessor()->remove_successor();
else
//sets NULL as a predecessor of the successor
- s_e->get_successor()->set_predecessor(NULL);
+ s_e->get_successor()->remove_predecessor();
//remove receive event
if(r_e->get_predecessor() != NULL)
//remove event (to predecessor sets event's successor as successor)
- r_e->get_predecessor()->set_successor(r_e->get_successor());
+ r_e->get_predecessor()->remove_successor();
else
//sets NULL as a predecessor of the successor
- r_e->get_successor()->set_predecessor(NULL);
+ r_e->get_successor()->remove_predecessor();
+
+ c->remove_attributed_event(s_e.get());
+ c->remove_attributed_event(r_e.get());
}
}
@@ -542,7 +555,7 @@
{
CompleteMessagePtr com_msg = boost::dynamic_pointer_cast<CompleteMessage> (msg);
- if(com_msg == NULL)
+ if(com_msg != NULL)
{
com_msg->get_send_event()->set_marked(NONE);
com_msg->get_receive_event()->set_marked(NONE);
@@ -561,7 +574,8 @@
* Function process incomplete messages. In case the same incomplete message is added and removed in the same
* place, the function removes added message and unmarked removed message.
*/
-void post_processing_incomplete_msg(IncompleteMessagePtr in_msg, std::set<MscMessagePtr>& removed_messages)
+void post_processing_incomplete_msg(MembershipContext* c, IncompleteMessagePtr in_msg,
+ std::set<MscMessagePtr>& removed_messages)
{
std::set<MscMessagePtr>::iterator removed_it;
StrictEventPtr neighbor, event;
@@ -574,43 +588,117 @@
//get successor of the event
neighbor = event->get_successor();
- //neighbor and event has to be same because of the function precess only same messages
- if(neighbor != NULL && compare_events(event.get(), neighbor.get(), false))
+ //searched event is not neccessary the first successor
+ while(neighbor != NULL)
{
removed_it = removed_messages.find(neighbor->get_message());
if(removed_it != removed_messages.end())
{
- //the messages of the parameters was taken from added_messages
- remove_added_message(in_msg);
- reconstruct_removed_message(*removed_it);
+ //neighbor and event has to be same because of the function precess only same messages
+ if(compare_events(event.get(), neighbor.get(), false))
+ {
+ //the messages of the parameters was taken from added_messages
+ remove_added_message(c, in_msg);
+ reconstruct_removed_message(*removed_it);
- //one message can be removed only once
- return ;
+ //one message can be removed only once
+ return ;
+ }
}
+ else
+ //in case the successor is not removed no other event could be matching event
+ break;
+
+ //look at a next successor
+ neighbor = neighbor->get_successor();
}
+//TODO code for predecessor and successor was copied with small diffrences
//get predecessor of the event
neighbor = event->get_predecessor();
- if(neighbor != NULL && compare_events(event.get(), neighbor.get(), false))
+ //searched event is not neccessary the first predecessor
+ while(neighbor != NULL)
{
removed_it = removed_messages.find(neighbor->get_message());
-
+
if(removed_it != removed_messages.end())
{
- //the messages of the parameters was taken from added_messages
- remove_added_message(in_msg);
- reconstruct_removed_message(*removed_it);
+ //neighbor and event has to be same because of the function precess only same messages
+ if(compare_events(event.get(), neighbor.get(), false))
+ {
+ //the messages of the parameters was taken from added_messages
+ remove_added_message(c, in_msg);
+ reconstruct_removed_message(*removed_it);
+
+ //one message can be removed only once
+ return ;
+ }
}
+ else
+ //in case the successor is not removed no other event could be matching event
+ break;
+
+ //look at a next successor
+ neighbor = neighbor->get_predecessor();
}
}
+//musim skontrolovat ci medzi removed receive a added receive su vsetky eventy removed
+bool can_reconstruct_message(StrictEventPtr added_send, MscMessagePtr removed_msg)
+{
+ CompleteMessagePtr msg = boost::dynamic_pointer_cast<CompleteMessage> (added_send->get_message());
+ StrictEventPtr added_receive = dynamic_cast<StrictEvent*> (msg->get_receive_event());
+
+ msg = boost::dynamic_pointer_cast<CompleteMessage> (removed_msg);
+ StrictEventPtr removed_receive = dynamic_cast<StrictEvent*> (msg->get_receive_event());
+
+ if(added_receive == NULL || removed_receive == NULL)
+ throw std::runtime_error("Error: unexpected behaviour");
+
+ //look at successors
+ StrictEventPtr neighbor = removed_receive->get_successor();
+
+ while(neighbor != NULL)
+ {
+ if(added_receive == neighbor)
+ return true;
+ else
+ {
+ if(neighbor->get_marked() != REMOVED)
+ break;
+ }
+
+ neighbor = neighbor->get_successor();
+ }
+
+ //TODO znovu skopceny kod pre predchodcu
+ //look at predecessors
+ neighbor = removed_receive->get_predecessor();
+
+ while(neighbor != NULL)
+ {
+ if(added_receive == neighbor)
+ return true;
+ else
+ {
+ if(neighbor->get_marked() != REMOVED)
+ break;
+ }
+
+ neighbor = neighbor->get_predecessor();
+ }
+
+ return false;
+}
+
/**
* Function process complete messages. In case the same complete message is added and removed in the same
* place, the function removes added message and unmarked removed message.
*/
-void post_processing_complete_msg(CompleteMessagePtr com_msg, std::set<MscMessagePtr>& removed_messages)
+void post_processing_complete_msg(MembershipContext* c, CompleteMessagePtr com_msg,
+ std::set<MscMessagePtr>& removed_messages)
{
std::set<MscMessagePtr>::iterator removed_it;
StrictEventPtr s_neighbor, r_neighbor, s_e, r_e;
@@ -621,40 +709,70 @@
if(s_e == NULL || r_e == NULL)
throw std::runtime_error("Error: unexpected behaviour");
+//musim urobit take kolecko, od sendu sa pozriem po succesoroch a potom od mozneho receivu musim prehladat jak successorov tak predecesorov a najst dany event.
+//take iste kolecko musim urobit pri prehladavami predecesorov
+
//check successor
s_neighbor = s_e->get_successor();
- r_neighbor = r_e->get_successor();
- //not neccessary to compare receive events because of the same messages
- if(s_neighbor != NULL && r_neighbor != NULL && s_neighbor->get_message() == r_neighbor->get_message()
- && compare_events(s_e.get(), s_neighbor.get(), false))
+ while(s_neighbor != NULL)
{
+ //look among removed
removed_it = removed_messages.find(s_neighbor->get_message());
-
+
if(removed_it != removed_messages.end())
{
- //the messages of the parameters was taken from added_messages
- remove_added_message(com_msg);
- reconstruct_removed_message(*removed_it);
+ //in case we think about the reconstruction, events have to be same,
+ //otherwise look at a next successor
+ if(compare_events(s_e.get(), s_neighbor.get(), false))
+ {
+ //must look at the receive event
+ //in case the message could not be reconstructed, look at a next successor
+ if(can_reconstruct_message(s_e, *removed_it))
+ {
+ //the messages of the parameters was taken from added_messages
+ remove_added_message(c, com_msg);
+ reconstruct_removed_message(*removed_it);
+
+ //each message could be reconstructed only once
+ return ;
+ }
+ }
}
+ else
+ break;
+
+ s_neighbor = s_neighbor->get_successor();
}
//check predecessor
s_neighbor = s_e->get_predecessor();
- r_neighbor = r_e->get_predecessor();
- //not neccessary to compare receive events because of the same messages
- if(s_neighbor != NULL && r_neighbor != NULL && s_neighbor->get_message() == r_neighbor->get_message()
- && compare_events(s_e.get(), s_neighbor.get(), false))
+ while(s_neighbor != NULL)
{
+ //look among removed
removed_it = removed_messages.find(s_neighbor->get_message());
if(removed_it != removed_messages.end())
{
- //the messages of the parameters was taken from added_messages
- remove_added_message(com_msg);
- reconstruct_removed_message(*removed_it);
+ //in case we think about the reconstruction, events have to be same,
+ //otherwise look at a next successor
+ if(compare_events(s_e.get(), s_neighbor.get(), false))
+ {
+ //must look at the receive event
+ //in case the message could not be reconstructed, look at a next successor
+ if(can_reconstruct_message(s_e, *removed_it))
+ {
+ //the messages of the parameters was taken from added_messages
+ remove_added_message(c, com_msg);
+ reconstruct_removed_message(*removed_it);
+ }
+ }
}
+ else
+ break;
+
+ s_neighbor = s_neighbor->get_predecessor();
}
}
@@ -664,7 +782,8 @@
* into the same place. If it found message which was removed and added it deletes the add message and
* deletes the marking of the removed message.
*/
-void post_processing(std::set<MscMessagePtr>& added_messages, std::set<MscMessagePtr>& removed_messages)
+void post_processing(MembershipContext* c, std::set<MscMessagePtr>& added_messages,
+ std::set<MscMessagePtr>& removed_messages)
{
std::set<MscMessagePtr>::iterator added_it, removed_it;
StrictEventPtr neighbor;
@@ -678,11 +797,11 @@
{
//process incomplete message
IncompleteMessagePtr in_msg = boost::dynamic_pointer_cast<IncompleteMessage> (*added_it);
- post_processing_incomplete_msg(in_msg, removed_messages);
+ post_processing_incomplete_msg(c, in_msg, removed_messages);
}
else
//process complete message
- post_processing_complete_msg(com_msg, removed_messages);
+ post_processing_complete_msg(c, com_msg, removed_messages);
}
}
@@ -828,8 +947,10 @@
if(i == 0)
{
- diff_identification_preprocessing(c, diff_map);
- diff_identification_settings(c, diff_map);
+ std::set<Difference*> unmatched_diff = diff_identification_preprocessing(c, diff_map);
+ diff_identification_settings2(c, diff_map, unmatched_diff);
+
+
}
}
@@ -839,7 +960,7 @@
std::set<MscMessagePtr> removed_messages;
process_diffrences(c, dup_flow, diff_map, added_messages, removed_messages);
- post_processing(added_messages, removed_messages);
+ post_processing(c, added_messages, removed_messages);
c->clear_attributed_events();
return dup_flow;
@@ -1073,74 +1194,7 @@
return new_msg;
}
-/**
- * Add new (missing) message to the diagram and remove diffrences from the insert map
- */
-//TODO zabezpecit aby sa diffrence odoberalo aj v metode add_incomplete_message
-Difference* add_complete_message(MembershipContext* c, BMscPtr dup_flow, StrictEventPtr event,
- Difference* matching_diff)
-{
/*
- std::map<std::wstring, std::list<Difference*> >::iterator insert_it;
- InstancePtr matching_inst; // matching instance
-
- //original message which is supposed to be created
- CompleteMessagePtr msg = boost::dynamic_pointer_cast<CompleteMessage> (diff->getMessage());
-
- if(diff->getDirection() == SEND)
- matching_inst = msg->get_receiver();
- else
- matching_inst = msg->get_sender();
-
- insert_it = insert_map.find(matching_inst->get_label());
-
- if(insert_it == insert_map.end())
- return diff;
-
- std::list<Difference*>::reverse_iterator list_it;
-
- for(list_it = insert_it->second.rbegin(); list_it != insert_it->second.rend(); list_it++)
- {
- if(*list_it == NULL)
- {
- throw std::runtime_error("Something wrong ");
- continue;
- }
-
- if((*list_it)->getMessage() == msg)
- break;
- }
-
- if(list_it == insert_it->second.rend())
- return diff;
-
- CompleteMessagePtr new_msg = create_complete_message(dup_flow, diff, *list_it);
-
- set_identification(c, new_msg->get_send_event(), msg->get_send_event());
- set_identification(c, new_msg->get_receive_event(), msg->get_receive_event());
-
- //remove matching diffrence from the insert map
- insert_it->second.remove(*list_it);
-
- //remove diffrence from the insert map
- std::wstring diff_instance;
-
- if(diff->getDirection() == SEND)
- diff_instance = msg->get_sender()->get_label();
- else
- diff_instance = msg->get_receiver()->get_label();
-
- insert_it = insert_map.find(diff_instance);
-
- if(insert_it == insert_map.end())
- throw std::runtime_error("Error: unexpected behaviour");
-
- insert_it->second.remove(diff);
-*/
- return NULL;
-}
-
-/*
* process diffrences which operation is ADD
*
* the function travers insert map and creates events for all diffrences. It is
@@ -1403,9 +1457,8 @@
if(compare_events(original_event, (*discover)->getLocation().get(), false))
{
- //function returns bool value: true in case the proper event has been found
- // false in case the proper event has not been found
- if(search_predecessors_successors(*discover, original_event))
+
+ if(search_predecessors_successors(*discover, original_event) != NULL)
{
matched_differences.insert(*removes_it);
matched_differences.insert(*discover);
@@ -1569,7 +1622,7 @@
//process advanced matching of "remove" differences
if(!unmatched_remove.empty())
advanced_remove_matching(unmatched_remove, removed_messages);
-
+
if(!unmatched_remove.empty() || !unmatched_insert.empty())
{
//in case the ordering is wrong, this situation creates one remove difference and
@@ -1578,112 +1631,6 @@
}
}
-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);
-
- //TODO prerobit ako pri prvej kontrole all_instances
- 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("Unexpected behaviour.");
- }
-
- //process_diffrences
-// if(!diff_map.empty())
-// process_diffrences(c, dup_flow, diff_map);
-/*
- {
-//TODO much of the following code was copied from proccess diffrences
- std::map<std::wstring, std::list<Difference*> > insert_map;
- std::map<std::wstring, std::list<Difference*> > remove_map;
-
- separate_diffrences(c, diff_map, insert_map, remove_map);
-
- 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("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("Unexpected behaviour.");
-
- StrictEventPtr new_match_e = new StrictEvent();
- set_event_position(new_match_e, match_se, match_inst, dup_flow);
-
- 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)
@@ -1776,6 +1723,106 @@
}
}
+std::map<EventPtr, Difference*> get_removed_diff(const std::set<Difference*>& unmatched_diff)
+{
+ std::set<Difference*>::const_iterator un_it;
+ std::map<EventPtr, Difference*> un_remove;
+
+ for(un_it = unmatched_diff.begin(); un_it != unmatched_diff.end(); un_it++)
+ {
+ if((*un_it)->getOperation() == REMOVE)
+ un_remove.insert(std::make_pair((*un_it)->getLocation(), *un_it));
+ }
+
+ return un_remove;
+}
+
+//this implementation is only a test
+void diff_identification_settings2(MembershipContext* c, const std::map<std::wstring, Difference*>& diff_map,
+ std::set<Difference*> unmatched_diff)
+{
+ InstancePtr spec_inst, flow_inst;
+ StrictEventPtr spec_e, flow_e;
+ std::list<Difference*> insert_list;
+
+ //diffrences which operation is add, separated by instances
+ std::map<std::wstring, std::list<Difference*> > insert_map;
+ //diffrences which operation is remove, separated by instances
+ std::map<std::wstring, std::list<Difference*> > remove_map;
+
+ std::map<std::wstring, std::list<Difference*> >::iterator insert_map_it;
+
+ //TODO in case this way will works fine the separation can be done in the method which call this method
+ separate_diffrences(c, diff_map, insert_map, remove_map);
+
+ //get unmatched diff which are supposed to be removed
+ std::map<EventPtr, Difference*> r_unmatched_diff = get_removed_diff(unmatched_diff);
+
+ BMscPtr specification = boost::dynamic_pointer_cast<BMsc> (c->get_specification());
+
+ if(specification == NULL)
+ return ;
+
+ InstancePtrList instances = specification->get_instances();
+ InstancePtrList::iterator instances_it;
+
+ for(instances_it = instances.begin(); instances_it != instances.end(); instances_it++)
+ {
+ insert_map_it = insert_map.find((*instances_it)->get_label());
+
+ if(insert_map_it != insert_map.end())
+ insert_list = insert_map_it->second;
+
+ spec_inst = find_instance(boost::dynamic_pointer_cast<BMsc> (c->get_specification()), (*instances_it)->get_label());
+ flow_inst = find_instance(c->get_bmsc(), (*instances_it)->get_label());
+
+ if(spec_inst == NULL || flow_inst == NULL)
+ continue;
+
+ StrictOrderAreaPtr spec_ea = boost::dynamic_pointer_cast<StrictOrderArea>(spec_inst->get_first());
+ StrictOrderAreaPtr flow_ea = boost::dynamic_pointer_cast<StrictOrderArea>(flow_inst->get_first());
+
+ if(spec_ea == NULL || flow_ea == NULL)
+ continue;
+
+ spec_e = spec_ea->get_first();
+ flow_e = flow_ea->get_first();
+
+ //set identification to proper events
+ std::list<Difference*>::reverse_iterator list_it = insert_list.rbegin();
+
+ std::vector<Difference*> insert_diff;
+ insert_diff.insert(insert_diff.begin(), insert_list.begin(), insert_list.end());
+ std::vector<Difference*>::reverse_iterator vec_it = insert_diff.rbegin();
+
+ while(spec_e != NULL && flow_e != NULL)
+ {
+ if(flow_e->get_marked() == REMOVED || r_unmatched_diff.find(flow_e) != r_unmatched_diff.end())
+ {
+ flow_e->set_marked(NONE);
+ flow_e = flow_e->get_successor();
+ continue;
+ }
+ else
+ {
+ //NULL moze byt ked je insert event ako prvy na instancii
+ if(vec_it != insert_diff.rend() &&
+ ((*vec_it)->getLocation() == NULL || (*vec_it)->getLocation() == flow_e->get_predecessor()))
+ {
+ spec_e = spec_e->get_successor();
+ vec_it++;
+ continue;
+ }
+ }
+
+ set_identification(c, spec_e.get(), flow_e.get());
+ spec_e = spec_e->get_successor();
+ flow_e = flow_e->get_successor();
+ }
+ }
+}
+
+
void diff_identification_settings(MembershipContext* c, const std::map<std::wstring, Difference*>& diff_map)
{
std::map<std::wstring, Difference*>::const_iterator map_it;
@@ -1835,8 +1882,7 @@
{
//due to some differences (REMOVE and ADD) can have same location
//...
[truncated message content] |
|
From: <ob...@us...> - 2011-11-26 01:36:35
|
Revision: 1209
http://scstudio.svn.sourceforge.net/scstudio/?rev=1209&view=rev
Author: obouda
Date: 2011-11-26 01:36:29 +0000 (Sat, 26 Nov 2011)
Log Message:
-----------
Set svn:ignore to contain *.vcproj*. Also added *.pdf and *.chm to relevant svn:ignore for directories - these documents should not be committed to the version control anyway.
Property Changed:
----------------
trunk/
trunk/doc/
trunk/doc/help/
trunk/src/check/boundedness/
trunk/src/check/liveness/
trunk/src/check/localchoice/
trunk/src/check/order/
trunk/src/check/pseudocode/
trunk/src/check/race/
trunk/src/check/realizability/
trunk/src/check/structure/
trunk/src/check/time/
trunk/src/data/Z120/
trunk/src/data/beautify/
trunk/src/data/engmann/
trunk/src/data/modelchecking/
trunk/src/view/visio/setup-nsis/
trunk/tests/
trunk/tests/diff/
trunk/tests/race/
trunk/tests/tightening_tests/
trunk/tests/time/consistency/
trunk/tests/time/time_race/
trunk/tests/time_constraints/
Property changes on: trunk
___________________________________________________________________
Modified: svn:ignore
- CMakeFiles
CMakeCache.txt
cmake_install.cmake
CTestTestfile.cmake
DartConfiguration.tcl
Testing
*.ncb
*.sln
*.suo
*.dir
Makefile
*.vcproj
debug
release
.dep.inc
+ CMakeFiles
CMakeCache.txt
cmake_install.cmake
CTestTestfile.cmake
DartConfiguration.tcl
Testing
*.ncb
*.sln
*.suo
*.dir
Makefile
*.vcproj*
debug
Debug
release
Release
.dep.inc
temp
Property changes on: trunk/doc
___________________________________________________________________
Modified: svn:ignore
- CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj
*.log
*.aux
*.out
+ CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj*
*.log
*.aux
*.out
*.pdf
Property changes on: trunk/doc/help
___________________________________________________________________
Modified: svn:ignore
- CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj
+ CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj*
*.chm
Property changes on: trunk/src/check/boundedness
___________________________________________________________________
Modified: svn:ignore
- CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj
+ CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj*
Property changes on: trunk/src/check/liveness
___________________________________________________________________
Modified: svn:ignore
- CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj
+ CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj*
Property changes on: trunk/src/check/localchoice
___________________________________________________________________
Modified: svn:ignore
- CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj
+ CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj*
Property changes on: trunk/src/check/order
___________________________________________________________________
Modified: svn:ignore
- CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj
+ CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj*
Property changes on: trunk/src/check/pseudocode
___________________________________________________________________
Modified: svn:ignore
- CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj
+ CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj*
Property changes on: trunk/src/check/race
___________________________________________________________________
Modified: svn:ignore
- CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj
+ CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj*
Property changes on: trunk/src/check/realizability
___________________________________________________________________
Modified: svn:ignore
- CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj
+ CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj*
Property changes on: trunk/src/check/structure
___________________________________________________________________
Modified: svn:ignore
- CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj
+ CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj*
Property changes on: trunk/src/check/time
___________________________________________________________________
Modified: svn:ignore
- CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj
+ CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj*
Property changes on: trunk/src/data/Z120
___________________________________________________________________
Modified: svn:ignore
- CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj
Z120.tokens
Z120Lexer.*
Z120Parser.*
+ CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj*
Z120.tokens
Z120Lexer.*
Z120Parser.*
Property changes on: trunk/src/data/beautify
___________________________________________________________________
Modified: svn:ignore
- CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj
+ CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj*
Property changes on: trunk/src/data/engmann
___________________________________________________________________
Modified: svn:ignore
- CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj
+ CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj*
Property changes on: trunk/src/data/modelchecking
___________________________________________________________________
Modified: svn:ignore
- CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj
+ CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj*
Property changes on: trunk/src/view/visio/setup-nsis
___________________________________________________________________
Modified: svn:ignore
- Debug
Release
api.h
pluginapi.*
*.cer
+ Debug
Release
api.h
pluginapi.*
*.cer
*.vcproj*
Property changes on: trunk/tests
___________________________________________________________________
Modified: svn:ignore
- CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj
+ CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj*
Property changes on: trunk/tests/diff
___________________________________________________________________
Added: svn:ignore
+ CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj*
Property changes on: trunk/tests/race
___________________________________________________________________
Added: svn:ignore
+ CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj*
Property changes on: trunk/tests/tightening_tests
___________________________________________________________________
Added: svn:ignore
+ CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj*
Property changes on: trunk/tests/time/consistency
___________________________________________________________________
Added: svn:ignore
+ CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj*
Property changes on: trunk/tests/time/time_race
___________________________________________________________________
Added: svn:ignore
+ CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj*
Property changes on: trunk/tests/time_constraints
___________________________________________________________________
Added: svn:ignore
+ CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj*
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ob...@us...> - 2011-12-11 21:16:15
|
Revision: 1222
http://scstudio.svn.sourceforge.net/scstudio/?rev=1222&view=rev
Author: obouda
Date: 2011-12-11 21:16:08 +0000 (Sun, 11 Dec 2011)
Log Message:
-----------
Z120 export canonization:
- introduced a template class BasicStringListPrinter and its specialization StringListPrinter
- node list after the "connect" keyword is now sorted
Modified Paths:
--------------
trunk/src/data/Z120/z120.h
trunk/src/data/Z120/z120_save.cpp
trunk/tests/time_constraints/proper_neg13.mpr.result
trunk/tests/time_constraints/proper_neg13.mpr.result1
trunk/tests/time_constraints/proper_neg21.mpr.result
trunk/tests/time_constraints/proper_neg22.mpr.result
trunk/tests/time_constraints/proper_neg23.mpr.result
trunk/tests/time_constraints/proper_neg24.mpr.result
trunk/tests/time_constraints/proper_neg25.mpr.result
trunk/tests/time_constraints/proper_neg26.mpr.result
trunk/tests/time_constraints/proper_neg26.mpr.result.1
trunk/tests/time_constraints/proper_neg27.mpr.result
trunk/tests/time_constraints/proper_neg27.mpr.result.1
trunk/tests/time_constraints/proper_neg6.mpr.result
trunk/tests/time_constraints/proper_neg7.mpr.result
trunk/tests/time_constraints/proper_neg9.mpr.result
trunk/tests/z120_test/z120_time22.mpr.result
trunk/tests/z120_test/z120_time23.mpr.result
trunk/tests/z120_test/z120_time24.mpr.result
trunk/tests/z120_test/z120_time25.mpr.result
Added Paths:
-----------
trunk/tests/string_list_printer_test.cpp
Modified: trunk/src/data/Z120/z120.h
===================================================================
--- trunk/src/data/Z120/z120.h 2011-12-10 00:47:45 UTC (rev 1221)
+++ trunk/src/data/Z120/z120.h 2011-12-11 21:16:08 UTC (rev 1222)
@@ -87,8 +87,8 @@
//! export a HMSC drawing
int save_hmsc(std::ostream& stream, const HMscPtr& hmsc);
- void print_element_attributes(std::ostream& stream,
- const MscElementPtr& element);
+ template<class OutputStreamType>
+ void print_element_attributes(OutputStreamType& stream, const MscElementPtr& element);
// print global comments
// note: used when the comment is attached to BMsc or HMsc
Modified: trunk/src/data/Z120/z120_save.cpp
===================================================================
--- trunk/src/data/Z120/z120_save.cpp 2011-12-10 00:47:45 UTC (rev 1221)
+++ trunk/src/data/Z120/z120_save.cpp 2011-12-11 21:16:08 UTC (rev 1222)
@@ -23,8 +23,10 @@
#include <map>
#include <ostream>
#include <iterator>
+#include <sstream>
#include "data/Z120/z120.h"
+#include "data/Z120/string_list_printer.h"
// list of ITU-T Z.120 keywords that must not be used as names
static const char* keywords[] =
@@ -221,7 +223,7 @@
{
//TODO print warning that the comment is not valid
// print_report(RS_WARNING, stringize() << L"Comment text \"" << TOWSTRING(value) << L"\" is not allowed");
-
+
// double the apostrophe
os << "''";
}
@@ -267,6 +269,7 @@
return os;
}
+
ExportFormatter::PreconditionList Z120::get_preconditions(MscPtr msc) const
{
ExportFormatter::PreconditionList result;
@@ -320,7 +323,8 @@
return 1; // unexpected pointer
}
-void Z120::print_element_attributes(std::ostream& stream, const MscElementPtr& element)
+template<class OutputStreamType>
+void Z120::print_element_attributes(OutputStreamType& stream, const MscElementPtr& element)
{
switch(element->get_marked())
{
@@ -342,7 +346,7 @@
pos != attributes.end(); pos++)
{
stream << *pos;
-
+
if(*pos == "membership_counter")
stream << " " << element->get_attribute("membership_counter", -1);
}
@@ -389,7 +393,7 @@
void print_absolute_time(std::ostream& stream, AbsoluteTimePtr abs)
{
const std::list< MscTimeInterval<double> > constraints = abs->get_interval_set().get_set();
-
+
for(std::list< MscTimeInterval<double> >::const_iterator it = constraints.begin();
it != constraints.end(); it++)
{
@@ -757,26 +761,26 @@
<< L"Warning: HMSC node without successors violates the Z.120 standard.");
}
+ // output canonization: output the list of nodes in the lexicographic order
+ BasicStringListPrinter<int> succ_printer(" connect", ",");
+
for(NodeRelationPtrVector::const_iterator spos = predecessor_node->get_successors().begin();
spos != predecessor_node->get_successors().end(); spos++)
{
SuccessorNode *successor = (*spos)->get_successor();
- // is it a first item being printed?
- if(spos == predecessor_node->get_successors().begin())
- stream << " connect";
- else
- stream << ",";
+ print_element_attributes(succ_printer.get_current_stream(), *spos);
- print_element_attributes(stream, *spos);
-
HMscNode *successor_node = dynamic_cast<HMscNode*>(successor);
- stream << " L" << node_id_map.get_id(successor_node);
+ succ_printer << " L" << node_id_map.get_id(successor_node);
+ succ_printer.commit_item(node_id_map.get_id(successor_node));
// add successors of this node to the stack
// note: std::list<>::push_back doesn't invalidate iterators
push_back_if_unique<HMscNodePtr>(node_stack, successor_node);
}
+
+ succ_printer.print(stream);
}
print_comments(stream, *npos);
Added: trunk/tests/string_list_printer_test.cpp
===================================================================
--- trunk/tests/string_list_printer_test.cpp (rev 0)
+++ trunk/tests/string_list_printer_test.cpp 2011-12-11 21:16:08 UTC (rev 1222)
@@ -0,0 +1,136 @@
+#include <iostream>
+#include <sstream>
+
+#include "data/Z120/string_list_printer.h"
+
+#define TEST_BEGIN(prologue) {\
+ std::stringstream teststream; \
+ std::cout << prologue << std::endl;
+
+#define TEST_BEGIN_W(prologue) {\
+ std::wstringstream teststream; \
+ std::cout << prologue << std::endl;
+
+#define TEST_END(expected) \
+ std::cout << std::endl; \
+ if (teststream.str() == expected) \
+ std::cout << "TEST PASSED"; \
+ else \
+ { \
+ std::cout << "TEST FAILED" << std::endl; \
+ std::cout << "Expected: \"" << expected << "\"" << std::endl; \
+ std::cout << "Result: \"" << teststream.str() << "\""; \
+ errors++; \
+ } \
+ std::cout << std::endl << std::endl; \
+ }
+
+#define TEST_END_W(expected) \
+ std::cout << std::endl; \
+ if (teststream.str() == expected) \
+ std::cout << "TEST PASSED"; \
+ else \
+ { \
+ std::cout << "TEST FAILED" << std::endl; \
+ std::wcout << "Expected: \"" << expected << "\"" << std::endl; \
+ std::wcout << "Result: \"" << teststream.str() << "\""; \
+ errors++; \
+ } \
+ std::cout << std::endl << std::endl; \
+ }
+
+void custom_printing_func(std::stringstream& out)
+{
+ out << "/attributes/";
+}
+
+
+int main()
+{
+ int errors = 0;
+
+ TEST_BEGIN("Simple usage example");
+ StringListPrinter printer("connect: ", ", ", ";\n");
+ printer.add_item("L2");
+ printer.add_item("L1");
+ printer.add_item("L0");
+ printer.add_item("L1");
+ printer.print(teststream);
+ printer.print(std::cout);
+ TEST_END("connect: L0, L1, L1, L2;\n");
+
+
+ TEST_BEGIN("Items may also be specified by consecutive filling operations");
+ StringListPrinter printer;
+ printer.set_item_separator(","); // an alternative way for specifying parameters
+ printer << 'L';
+ printer << 42;
+ printer.commit_item(); // adds item "L42"
+ printer << 'L';
+ printer << 13;
+ printer.commit_item(); // adds item "L13"
+ // the stream for filling current item can be had for other functions directly
+ // printing to a stream:
+ custom_printing_func(printer.get_current_stream());
+ printer << "L50";
+ printer.commit_item();
+ printer.print(teststream);
+ printer.print(std::cout);
+ TEST_END("/attributes/L50,L13,L42");
+
+
+ TEST_BEGIN("Note the last item is placed as the first item, as \"[\" < \"L\". If some order should be "\
+ "directed, a custom key may be specified both for add_item() and commit_item() methods");
+ StringListPrinter printer;
+ printer.add_item("abc", "2");
+ printer << "def";
+ printer.commit_item("3");
+ printer.add_item("xyz", "1");
+ printer.print(teststream);
+ printer.print(std::cout);
+ TEST_END("xyzabcdef");
+
+ TEST_BEGIN("...even with integer keys, using the basic template class");
+ BasicStringListPrinter<int> printer;
+ printer.add_item("abc", 2);
+ printer << "def";
+ printer.commit_item(3);
+ printer.add_item("xyz", 1);
+ printer.print(teststream);
+ printer.print(std::cout);
+ TEST_END("xyzabcdef");
+
+ TEST_BEGIN("The printer may print to anything overloading operator <<");
+ StringListPrinter printer;
+ printer.add_item("a").add_item("b").add_item("c");
+ std::stringstream ss;
+ printer.print(ss);
+ teststream << ss.str();
+ std::cout << ss.str();
+ TEST_END("abc");
+
+ TEST_BEGIN("... even another StringListPrinter");
+ StringListPrinter sub1("sub1head ", ", ", " sub1tail");
+ sub1.add_item("A").add_item("B").add_item("C");
+ StringListPrinter sub2("sub2head ", ", ", " sub2tail");
+ sub2.add_item("X").add_item("Y").add_item("Z");
+ StringListPrinter main("mainhead ", "; ", " maintail"); // do not confuse with "Mein Teil" by Rammstein ;-)
+ sub1.print(main.get_current_stream());
+ main.commit_item();
+ sub2.print(main.get_current_stream());
+ main.commit_item();
+ main.print(teststream);
+ TEST_END("mainhead sub1head A, B, C sub1tail; sub2head X, Y, Z sub2tail maintail");
+
+ TEST_BEGIN_W("For the cases lexicographic ordering is not suitable, a custom comparator (both "\
+ "for items and keys) may be specified as a template argument. Similarly, the item "\
+ "and key datatypes are also templated");
+ BasicStringListPrinter<int, wchar_t, std::greater<int>, std::less<std::wstring> > printer(L"head ");
+ // printer now uses wstrings, integers as keys; sorting by keys is descending:
+ printer.add_item(L"abc", 3).add_item(L"def", 1).add_item(L"xyz", 2);
+ printer.print(teststream);
+ printer.print(std::wcout);
+ TEST_END_W(L"head abcxyzdef");
+
+ return errors;
+}
Property changes on: trunk/tests/string_list_printer_test.cpp
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Modified: trunk/tests/time_constraints/proper_neg13.mpr.result
===================================================================
--- trunk/tests/time_constraints/proper_neg13.mpr.result 2011-12-10 00:47:45 UTC (rev 1221)
+++ trunk/tests/time_constraints/proper_neg13.mpr.result 2011-12-11 21:16:08 UTC (rev 1222)
@@ -16,7 +16,7 @@
connect L4;
L2: reference NAME time [0,inf);
connect L5;
-L4: connect L5, L3;
+L4: connect L3, L5;
L5: connect L6;
/* MARKED */
L3: reference NAME2 connect L6;
Modified: trunk/tests/time_constraints/proper_neg13.mpr.result1
===================================================================
--- trunk/tests/time_constraints/proper_neg13.mpr.result1 2011-12-10 00:47:45 UTC (rev 1221)
+++ trunk/tests/time_constraints/proper_neg13.mpr.result1 2011-12-11 21:16:08 UTC (rev 1222)
@@ -16,7 +16,7 @@
connect L4;
L2: reference NAME time [0,inf);
connect L5;
-L4: connect L5, L3;
+L4: connect L3, L5;
L5: connect L6;
/* MARKED */
L3: reference NAME2 connect L6;
Modified: trunk/tests/time_constraints/proper_neg21.mpr.result
===================================================================
--- trunk/tests/time_constraints/proper_neg21.mpr.result 2011-12-10 00:47:45 UTC (rev 1221)
+++ trunk/tests/time_constraints/proper_neg21.mpr.result 2011-12-11 21:16:08 UTC (rev 1222)
@@ -16,7 +16,7 @@
L1: reference NAME time [0,inf);
bottom/* MARKED */
bottom L3 [0,inf);
- connect L4, L3, L5;
+ connect L3, L4, L5;
L4: connect L1, L3;
L3: reference NAME time [0,inf);
top/* MARKED */
@@ -26,7 +26,7 @@
L6: final;
/* MARKED */
L2: reference A connect L0, L7;
-L7: connect L5, L3;
+L7: connect L3, L5;
endmsc;
msc NAME;
inst asd;
Modified: trunk/tests/time_constraints/proper_neg22.mpr.result
===================================================================
--- trunk/tests/time_constraints/proper_neg22.mpr.result 2011-12-10 00:47:45 UTC (rev 1221)
+++ trunk/tests/time_constraints/proper_neg22.mpr.result 2011-12-11 21:16:08 UTC (rev 1222)
@@ -12,7 +12,7 @@
connect L2, L3;
L2: reference NAME time [0,inf);
connect L1;
-L3: connect L2, L1;
+L3: connect L1, L2;
L1: reference NAME time [0,inf);
connect L4;
L4: final;
Modified: trunk/tests/time_constraints/proper_neg23.mpr.result
===================================================================
--- trunk/tests/time_constraints/proper_neg23.mpr.result 2011-12-10 00:47:45 UTC (rev 1221)
+++ trunk/tests/time_constraints/proper_neg23.mpr.result 2011-12-11 21:16:08 UTC (rev 1222)
@@ -12,7 +12,7 @@
connect L2, L3;
L2: reference NAME time [0,inf);
connect L1;
-L3: connect L2, L1;
+L3: connect L1, L2;
L1: reference NAME time [0,inf);
connect L4;
L4: final;
Modified: trunk/tests/time_constraints/proper_neg24.mpr.result
===================================================================
--- trunk/tests/time_constraints/proper_neg24.mpr.result 2011-12-10 00:47:45 UTC (rev 1221)
+++ trunk/tests/time_constraints/proper_neg24.mpr.result 2011-12-11 21:16:08 UTC (rev 1222)
@@ -12,7 +12,7 @@
connect L2, L3;
L2: reference NAME time [0,inf);
connect L1;
-L3: connect L2, L1;
+L3: connect L1, L2;
L1: reference NAME time [0,inf);
connect L4;
L4: final;
Modified: trunk/tests/time_constraints/proper_neg25.mpr.result
===================================================================
--- trunk/tests/time_constraints/proper_neg25.mpr.result 2011-12-10 00:47:45 UTC (rev 1221)
+++ trunk/tests/time_constraints/proper_neg25.mpr.result 2011-12-11 21:16:08 UTC (rev 1222)
@@ -13,9 +13,9 @@
top/* MARKED */
bottom L4 [0,inf);
connect L1;
-L3: connect L2, L1;
+L3: connect L1, L2;
L1: reference NAME time [0,inf);
- connect L5, L4;
+ connect L4, L5;
L5: final;
/* MARKED */
L4: reference A connect L5;
Modified: trunk/tests/time_constraints/proper_neg26.mpr.result
===================================================================
--- trunk/tests/time_constraints/proper_neg26.mpr.result 2011-12-10 00:47:45 UTC (rev 1221)
+++ trunk/tests/time_constraints/proper_neg26.mpr.result 2011-12-11 21:16:08 UTC (rev 1222)
@@ -12,7 +12,7 @@
/* MARKED */
L2: reference NAME time [0,inf);
connect L1;
-L3: connect L2, L1;
+L3: connect L1, L2;
/* MARKED */
L1: reference NAME time [0,inf);
connect L4, L5;
@@ -47,7 +47,7 @@
/* MARKED */
L2: reference NAME time [0,inf);
connect L1;
-L3: connect L2, L1;
+L3: connect L1, L2;
/* MARKED */
L1: reference NAME time [0,inf);
connect L4, L5;
Modified: trunk/tests/time_constraints/proper_neg26.mpr.result.1
===================================================================
--- trunk/tests/time_constraints/proper_neg26.mpr.result.1 2011-12-10 00:47:45 UTC (rev 1221)
+++ trunk/tests/time_constraints/proper_neg26.mpr.result.1 2011-12-11 21:16:08 UTC (rev 1222)
@@ -12,7 +12,7 @@
/* MARKED */
L2: reference NAME time [0,inf);
connect L1;
-L3: connect L2, L1;
+L3: connect L1, L2;
/* MARKED */
L1: reference NAME time [0,inf);
connect L4, L5;
@@ -28,7 +28,7 @@
/* MARKED */
L2: reference NAME time [0,inf);
connect L1;
-L3: connect L2, L1;
+L3: connect L1, L2;
/* MARKED */
L1: reference NAME time [0,inf);
connect L4, L5;
Modified: trunk/tests/time_constraints/proper_neg27.mpr.result
===================================================================
--- trunk/tests/time_constraints/proper_neg27.mpr.result 2011-12-10 00:47:45 UTC (rev 1221)
+++ trunk/tests/time_constraints/proper_neg27.mpr.result 2011-12-11 21:16:08 UTC (rev 1222)
@@ -12,7 +12,7 @@
/* MARKED */
L2: reference NAME time [0,inf);
connect L1;
-L3: connect L2, L1;
+L3: connect L1, L2;
/* MARKED */
L1: reference NAME time [0,inf);
connect L4, L5;
@@ -46,7 +46,7 @@
connect L2, L3;
/* MARKED */
L2: reference NAME connect L3;
-L3: connect L2, L1;
+L3: connect L1, L2;
/* MARKED */
L1: reference B connect L4;
L4: final;
Modified: trunk/tests/time_constraints/proper_neg27.mpr.result.1
===================================================================
--- trunk/tests/time_constraints/proper_neg27.mpr.result.1 2011-12-10 00:47:45 UTC (rev 1221)
+++ trunk/tests/time_constraints/proper_neg27.mpr.result.1 2011-12-11 21:16:08 UTC (rev 1222)
@@ -11,7 +11,7 @@
connect L2, L3;
/* MARKED */
L2: reference NAME connect L3;
-L3: connect L2, L1;
+L3: connect L1, L2;
/* MARKED */
L1: reference B connect L4;
L4: final;
@@ -24,7 +24,7 @@
/* MARKED */
L2: reference NAME time [0,inf);
connect L1;
-L3: connect L2, L1;
+L3: connect L1, L2;
/* MARKED */
L1: reference NAME time [0,inf);
connect L4, L5;
Modified: trunk/tests/time_constraints/proper_neg6.mpr.result
===================================================================
--- trunk/tests/time_constraints/proper_neg6.mpr.result 2011-12-10 00:47:45 UTC (rev 1221)
+++ trunk/tests/time_constraints/proper_neg6.mpr.result 2011-12-11 21:16:08 UTC (rev 1222)
@@ -9,7 +9,7 @@
top L4 [0,inf);
connect L4;
L3: final;
-L4: reference bMSC4 connect L3, L2, L4;
+L4: reference bMSC4 connect L2, L3, L4;
endmsc;
msc bMSC1;
inst p;
Modified: trunk/tests/time_constraints/proper_neg7.mpr.result
===================================================================
--- trunk/tests/time_constraints/proper_neg7.mpr.result 2011-12-10 00:47:45 UTC (rev 1221)
+++ trunk/tests/time_constraints/proper_neg7.mpr.result 2011-12-11 21:16:08 UTC (rev 1222)
@@ -9,7 +9,7 @@
bottom L4 [0,inf);
connect L4;
L3: final;
-L4: reference bMSC4 connect L3, L2, L4;
+L4: reference bMSC4 connect L2, L3, L4;
endmsc;
msc bMSC1;
inst p;
Modified: trunk/tests/time_constraints/proper_neg9.mpr.result
===================================================================
--- trunk/tests/time_constraints/proper_neg9.mpr.result 2011-12-10 00:47:45 UTC (rev 1221)
+++ trunk/tests/time_constraints/proper_neg9.mpr.result 2011-12-11 21:16:08 UTC (rev 1222)
@@ -9,7 +9,7 @@
bottom L4 [0,inf);
connect L4;
L3: final;
-L4: reference bMSC connect L3, L2, L4;
+L4: reference bMSC connect L2, L3, L4;
endmsc;
msc bMSC;
inst p;
Modified: trunk/tests/z120_test/z120_time22.mpr.result
===================================================================
--- trunk/tests/z120_test/z120_time22.mpr.result 2011-12-10 00:47:45 UTC (rev 1221)
+++ trunk/tests/z120_test/z120_time22.mpr.result 2011-12-11 21:16:08 UTC (rev 1222)
@@ -10,7 +10,7 @@
connect L2, L3;
L2: reference NAME time [0,inf);
connect L1;
-L3: connect L2, L1, L4;
+L3: connect L1, L2, L4;
L1: reference NAME time [0,inf);
connect L5;
L4: condition mark connect L3;
Modified: trunk/tests/z120_test/z120_time23.mpr.result
===================================================================
--- trunk/tests/z120_test/z120_time23.mpr.result 2011-12-10 00:47:45 UTC (rev 1221)
+++ trunk/tests/z120_test/z120_time23.mpr.result 2011-12-11 21:16:08 UTC (rev 1222)
@@ -10,7 +10,7 @@
connect L2, L3;
L2: reference NAME time [0,inf);
connect L1;
-L3: connect L4, L2, L1;
+L3: connect L1, L2, L4;
L1: reference NAME time [0,inf);
connect L5;
L4: condition mark connect L3;
Modified: trunk/tests/z120_test/z120_time24.mpr.result
===================================================================
--- trunk/tests/z120_test/z120_time24.mpr.result 2011-12-10 00:47:45 UTC (rev 1221)
+++ trunk/tests/z120_test/z120_time24.mpr.result 2011-12-11 21:16:08 UTC (rev 1222)
@@ -10,7 +10,7 @@
connect L2, L3;
L2: reference NAME time [0,inf);
connect L1;
-L3: connect L4, L2, L1;
+L3: connect L1, L2, L4;
L1: reference NAME time [0,inf);
connect L5;
L4: condition mark connect L3;
Modified: trunk/tests/z120_test/z120_time25.mpr.result
===================================================================
--- trunk/tests/z120_test/z120_time25.mpr.result 2011-12-10 00:47:45 UTC (rev 1221)
+++ trunk/tests/z120_test/z120_time25.mpr.result 2011-12-11 21:16:08 UTC (rev 1222)
@@ -10,7 +10,7 @@
connect L2, L3;
L2: reference NAME time [0,inf);
connect L1;
-L3: connect L4, L1, L2;
+L3: connect L1, L2, L4;
L1: reference NAME time [0,inf);
connect L5;
L4: condition mark connect L3;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ob...@us...> - 2011-12-12 00:07:14
|
Revision: 1226
http://scstudio.svn.sourceforge.net/scstudio/?rev=1226&view=rev
Author: obouda
Date: 2011-12-12 00:07:07 +0000 (Mon, 12 Dec 2011)
Log Message:
-----------
Z120 export canonization:
- time data canonized
Modified Paths:
--------------
trunk/src/data/Z120/string_list_printer.h
trunk/src/data/Z120/z120_save.cpp
trunk/tests/z120_test/z120_time26.mpr.result
trunk/tests/z120_test/z120_time27.mpr.result
trunk/tests/z120_test/z120_time28.mpr.result
trunk/tests/z120_test/z120_time29.mpr.result
trunk/tests/z120_test/z120_time30.mpr.result
trunk/tests/z120_test/z120_time31.mpr.result
Removed Paths:
-------------
trunk/tests/z120_test/z120_time26.mpr.result1
trunk/tests/z120_test/z120_time27.mpr.result1
trunk/tests/z120_test/z120_time28.mpr.result1
trunk/tests/z120_test/z120_time29.mpr.result1
trunk/tests/z120_test/z120_time30.mpr.result1
trunk/tests/z120_test/z120_time31.mpr.result1
Modified: trunk/src/data/Z120/string_list_printer.h
===================================================================
--- trunk/src/data/Z120/string_list_printer.h 2011-12-11 21:37:01 UTC (rev 1225)
+++ trunk/src/data/Z120/string_list_printer.h 2011-12-12 00:07:07 UTC (rev 1226)
@@ -164,18 +164,18 @@
: m_head(head), m_item_separator(item_separator), m_tail(tail)
{}
- //! gets a string which will be printed before all the items, but only if there really are some items
+ //! returns a string which will be printed before all the items, but only if there really are some items
ItemType get_head() const {
return m_head;
}
- //! gets a string which will be printed between every two items
+ //! returns a string which will be printed between every two items
ItemType get_item_separator() const
{
return m_item_separator;
}
- //! gets a string which will be printed after all the items, but only if there really were some items
+ //! returns a string which will be printed after all the items, but only if there really were some items
ItemType get_tail() const
{
return m_tail;
@@ -212,6 +212,30 @@
}
/**
+ * \brief returns the number of items in the printer (not counting a possible uncommitted item)
+ */
+ int size() const
+ {
+ return m_items.size();
+ }
+
+ /**
+ * \brief checks whether the printer is empty, i.e. there have not been any items added yet
+ */
+ bool empty() const
+ {
+ return m_items.empty();
+ }
+
+ /**
+ * \brief removes all committed items from the printer (any uncommitted item is untouched, though)
+ */
+ void clear()
+ {
+ m_items.clear();
+ }
+
+ /**
* \brief adds a single item to the string list, under a given key (or "" key if not specified)
* provides a fluent interface
*/
Modified: trunk/src/data/Z120/z120_save.cpp
===================================================================
--- trunk/src/data/Z120/z120_save.cpp 2011-12-11 21:37:01 UTC (rev 1225)
+++ trunk/src/data/Z120/z120_save.cpp 2011-12-12 00:07:07 UTC (rev 1226)
@@ -394,48 +394,52 @@
{
const std::list< MscTimeInterval<double> > constraints = abs->get_interval_set().get_set();
+ // NOTE: using the output ordering just for sure, in real, just one interval is present
+ BasicStringListPrinter<double> printer;
+
for(std::list< MscTimeInterval<double> >::const_iterator it = constraints.begin();
it != constraints.end(); it++)
{
if(it->get_begin_value() != it->get_end_value())
{
if (it->get_begin_closed())
- stream << "@[";
+ printer << "@[";
else
- stream << "@(";
+ printer << "@(";
- stream << it->get_begin() << "," << it->get_end();
+ printer << it->get_begin() << "," << it->get_end();
if (it->get_end_closed())
- stream << "]";
+ printer << "]";
else
- stream << ")";
+ printer << ")";
}
else
- stream << "[@" << it->get_begin() << "]";
+ printer << "[@" << it->get_begin() << "]";
+
+ printer.commit_item(it->get_begin().get_value());
}
+
+ printer.print(stream);
}
void Z120::print_time_relations(std::ostream& stream, PtrIDMap<EventPtr>& event_id_map,
const EventPtr& event)
{
- size_t printed = 0;
+ BasicStringListPrinter<long> printer("time", ",", ";\n");
const TimeRelationEventPtrList& relations = event->get_time_relations();
- const AbsoluteTimePtrList absolut_times = event->get_absolut_times();
- // process all absolut time constraints
- for(AbsoluteTimePtrList::const_iterator apos = absolut_times.begin();
- apos != absolut_times.end(); apos++)
+ const AbsoluteTimePtrList absolute_times = event->get_absolut_times();
+ // process all absolute time constraints
+ for(AbsoluteTimePtrList::const_iterator apos = absolute_times.begin();
+ apos != absolute_times.end(); apos++)
{
- if(!printed++)
- stream << "time ";
- else
- stream << ", ";
+ print_element_attributes(printer.get_current_stream(), *apos);
- print_element_attributes(stream, *apos);
-
- //do not used the print function of MscTimeInterval due to [@3]
- print_absolute_time(stream, *apos);
+ // NOTE: not using the MscTimeInterval.to_string() due to constraints like [@3]
+ printer << " ";
+ print_absolute_time(printer.get_current_stream(), *apos);
+ printer.commit_item(-1);
}
// process all time relations
@@ -447,24 +451,20 @@
if((*rpos)->get_event_a() != event)
continue;
- // is it a first item being printed?
- if(!printed++)
- stream << "time";
- else
- stream << ",";
+ print_element_attributes(printer.get_current_stream(), *rpos);
- print_element_attributes(stream, *rpos);
+ long event_id = event_id_map.get_id((*rpos)->get_event_b());
+ printer << " e" << event_id;
- stream << " e" << event_id_map.get_id((*rpos)->get_event_b());
-
if((*rpos)->is_directed())
- stream << " origin";
+ printer << " origin";
- stream << " " << (*rpos)->get_label();
+ printer << " " << (*rpos)->get_label();
+
+ printer.commit_item(event_id);
}
- if(printed)
- stream << ";" << std::endl;
+ printer.print(stream);
}
int Z120::save_bmsc(std::ostream& stream, const BMscPtr& bmsc)
@@ -590,7 +590,7 @@
void Z120::print_time_relations1(std::ostream& stream,
const ReferenceNodePtr& reference_node, TimeRelationRefNodePtrSet relations)
{
- size_t printed = 0;
+ StringListPrinter printer(" time", ",", ";\n");
// process all time relations
for(TimeRelationRefNodePtrSet::const_iterator rpos = relations.begin();
@@ -600,26 +600,20 @@
if((*rpos)->get_ref_node_a() != (*rpos)->get_ref_node_b())
continue;
- // is it a first item being printed?
- if(!printed++)
- stream << " time";
- else
- stream << ",";
+ print_element_attributes(printer.get_current_stream(), *rpos);
- print_element_attributes(stream, *rpos);
-
- stream << " " << (*rpos)->get_label();
+ printer << " " << (*rpos)->get_label();
+ printer.commit_item((*rpos)->get_label());
}
- if(printed)
- stream << ";" << std::endl;
+ printer.print(stream);
}
void Z120::print_time_relations2(std::ostream& stream,
PtrIDMap<HMscNodePtr>& node_id_map, const std::string& title,
const ReferenceNodePtr& reference_node, TimeRelationRefNodePtrSet relations)
{
- size_t printed = 0;
+ BasicStringListPrinter<std::pair<long,bool> > printer(" " + title, ",", ";\n");
// process all time relations
for(TimeRelationRefNodePtrSet::const_iterator rpos = relations.begin();
@@ -633,32 +627,29 @@
if((*rpos)->get_ref_node_a() != reference_node)
continue;
- // is it a first item being printed?
- if(!printed++)
- stream << " " << title;
- else
- stream << ",";
+ print_element_attributes(printer.get_current_stream(), *rpos);
- print_element_attributes(stream, *rpos);
-
if((*rpos)->get_ref_node_b() == NULL)
throw std::invalid_argument("Disconnected time constraint.");
if((*rpos)->is_bottom_node_b())
- stream << " bottom";
+ printer << " bottom";
else
- stream << " top";
+ printer << " top";
- stream << " L" << node_id_map.get_id((*rpos)->get_ref_node_b());
+ const long node_id = node_id_map.get_id((*rpos)->get_ref_node_b());
+ printer << " L" << node_id;
if((*rpos)->is_directed())
- stream << " origin";
+ printer << " origin";
- stream << " " << (*rpos)->get_label();
+ printer << " " << (*rpos)->get_label();
+
+ // order by node id, "top" earlier than "bottom"
+ printer.commit_item(std::make_pair<long,bool>(node_id, !(*rpos)->is_bottom_node_b()));
}
- if(printed)
- stream << ";" << std::endl;
+ printer.print(stream);
}
int Z120::save_hmsc(std::ostream& stream, const HMscPtr& hmsc)
@@ -762,7 +753,7 @@
}
// output canonization: output the list of nodes in the lexicographic order
- BasicStringListPrinter<int> succ_printer(" connect", ",");
+ BasicStringListPrinter<long> succ_printer(" connect", ",");
for(NodeRelationPtrVector::const_iterator spos = predecessor_node->get_successors().begin();
spos != predecessor_node->get_successors().end(); spos++)
@@ -772,8 +763,9 @@
print_element_attributes(succ_printer.get_current_stream(), *spos);
HMscNode *successor_node = dynamic_cast<HMscNode*>(successor);
- succ_printer << " L" << node_id_map.get_id(successor_node);
- succ_printer.commit_item(node_id_map.get_id(successor_node));
+ const long node_id = node_id_map.get_id(successor_node);
+ succ_printer << " L" << node_id;
+ succ_printer.commit_item(node_id);
// add successors of this node to the stack
// note: std::list<>::push_back doesn't invalidate iterators
Modified: trunk/tests/z120_test/z120_time26.mpr.result
===================================================================
--- trunk/tests/z120_test/z120_time26.mpr.result 2011-12-11 21:37:01 UTC (rev 1225)
+++ trunk/tests/z120_test/z120_time26.mpr.result 2011-12-12 00:07:07 UTC (rev 1226)
@@ -26,7 +26,7 @@
concurrent;
label e2;
in NAME,0 from P1 before e3;
-time e4 [12], e3 [4];
+time e3 [4], e4 [12];
label e3;
in NAME,1 from P1;
endconcurrent;
Deleted: trunk/tests/z120_test/z120_time26.mpr.result1
===================================================================
--- trunk/tests/z120_test/z120_time26.mpr.result1 2011-12-11 21:37:01 UTC (rev 1225)
+++ trunk/tests/z120_test/z120_time26.mpr.result1 2011-12-12 00:07:07 UTC (rev 1226)
@@ -1,36 +0,0 @@
-Warning 32: Unexpected (top L1 origin) at time definition: L2
-OK: z120_time26 is correct, should be correct
-
-mscdocument z120_time26;
-msc Main;
-initial connect L0;
-L0: connect L1, L2;
-L1: reference Subprocess connect L3;
-L2: reference Subprocess time [3,4], [1,2);
- top bottom L1 origin (1,10);
- connect L1;
-L3: final;
-endmsc;
-msc Subprocess;
-inst P1;
-inst P2;
-P1: instance;
-out NAME,0 to P2;
-label e0;
-out NAME,1 to P2;
-time e1 [7];
-label e1;
-in NAME,2 from P2;
-endinstance;
-P2: instance;
-concurrent;
-label e2;
-in NAME,0 from P1 before e3;
-time e4 [12], e3 [4];
-label e3;
-in NAME,1 from P1;
-endconcurrent;
-label e4;
-out NAME,2 to P1;
-endinstance;
-endmsc;
Modified: trunk/tests/z120_test/z120_time27.mpr.result
===================================================================
--- trunk/tests/z120_test/z120_time27.mpr.result 2011-12-11 21:37:01 UTC (rev 1225)
+++ trunk/tests/z120_test/z120_time27.mpr.result 2011-12-12 00:07:07 UTC (rev 1226)
@@ -26,7 +26,7 @@
concurrent;
label e2;
in NAME,0 from P1 before e3;
-time e4 [12], e3 [4];
+time e3 [4], e4 [12];
label e3;
in NAME,1 from P1;
endconcurrent;
Deleted: trunk/tests/z120_test/z120_time27.mpr.result1
===================================================================
--- trunk/tests/z120_test/z120_time27.mpr.result1 2011-12-11 21:37:01 UTC (rev 1225)
+++ trunk/tests/z120_test/z120_time27.mpr.result1 2011-12-12 00:07:07 UTC (rev 1226)
@@ -1,36 +0,0 @@
-Warning 32: Unexpected (bottom L1 origin) at time definition: L2
-OK: z120_time27 is correct, should be correct
-
-mscdocument z120_time27;
-msc Main;
-initial connect L0;
-L0: connect L1, L2;
-L1: reference Subprocess connect L3;
-L2: reference Subprocess time [3,4], [1,2);
- top bottom L1 origin (1,10);
- connect L1;
-L3: final;
-endmsc;
-msc Subprocess;
-inst P1;
-inst P2;
-P1: instance;
-out NAME,0 to P2;
-label e0;
-out NAME,1 to P2;
-time e1 [7];
-label e1;
-in NAME,2 from P2;
-endinstance;
-P2: instance;
-concurrent;
-label e2;
-in NAME,0 from P1 before e3;
-time e4 [12], e3 [4];
-label e3;
-in NAME,1 from P1;
-endconcurrent;
-label e4;
-out NAME,2 to P1;
-endinstance;
-endmsc;
Modified: trunk/tests/z120_test/z120_time28.mpr.result
===================================================================
--- trunk/tests/z120_test/z120_time28.mpr.result 2011-12-11 21:37:01 UTC (rev 1225)
+++ trunk/tests/z120_test/z120_time28.mpr.result 2011-12-12 00:07:07 UTC (rev 1226)
@@ -26,7 +26,7 @@
concurrent;
label e2;
in NAME,0 from P1 before e3;
-time e4 [12], e3 [4];
+time e3 [4], e4 [12];
label e3;
in NAME,1 from P1;
endconcurrent;
Deleted: trunk/tests/z120_test/z120_time28.mpr.result1
===================================================================
--- trunk/tests/z120_test/z120_time28.mpr.result1 2011-12-11 21:37:01 UTC (rev 1225)
+++ trunk/tests/z120_test/z120_time28.mpr.result1 2011-12-12 00:07:07 UTC (rev 1226)
@@ -1,36 +0,0 @@
-Warning 32: Unexpected (top L1) at time definition: L2
-OK: z120_time28 is correct, should be correct
-
-mscdocument z120_time28;
-msc Main;
-initial connect L0;
-L0: connect L1, L2;
-L1: reference Subprocess connect L3;
-L2: reference Subprocess time [3,4], [1,2);
- top bottom L1 origin (1,10);
- connect L1;
-L3: final;
-endmsc;
-msc Subprocess;
-inst P1;
-inst P2;
-P1: instance;
-out NAME,0 to P2;
-label e0;
-out NAME,1 to P2;
-time e1 [7];
-label e1;
-in NAME,2 from P2;
-endinstance;
-P2: instance;
-concurrent;
-label e2;
-in NAME,0 from P1 before e3;
-time e4 [12], e3 [4];
-label e3;
-in NAME,1 from P1;
-endconcurrent;
-label e4;
-out NAME,2 to P1;
-endinstance;
-endmsc;
Modified: trunk/tests/z120_test/z120_time29.mpr.result
===================================================================
--- trunk/tests/z120_test/z120_time29.mpr.result 2011-12-11 21:37:01 UTC (rev 1225)
+++ trunk/tests/z120_test/z120_time29.mpr.result 2011-12-12 00:07:07 UTC (rev 1226)
@@ -26,7 +26,7 @@
concurrent;
label e2;
in NAME,0 from P1 before e3;
-time e4 [12], e3 [4];
+time e3 [4], e4 [12];
label e3;
in NAME,1 from P1;
endconcurrent;
Deleted: trunk/tests/z120_test/z120_time29.mpr.result1
===================================================================
--- trunk/tests/z120_test/z120_time29.mpr.result1 2011-12-11 21:37:01 UTC (rev 1225)
+++ trunk/tests/z120_test/z120_time29.mpr.result1 2011-12-12 00:07:07 UTC (rev 1226)
@@ -1,36 +0,0 @@
-Warning 32: Unexpected (bottom L1) at time definition: L2
-OK: z120_time29 is correct, should be correct
-
-mscdocument z120_time29;
-msc Main;
-initial connect L0;
-L0: connect L1, L2;
-L1: reference Subprocess connect L3;
-L2: reference Subprocess time [3,4], [1,2);
- top bottom L1 origin (1,10);
- connect L1;
-L3: final;
-endmsc;
-msc Subprocess;
-inst P1;
-inst P2;
-P1: instance;
-out NAME,0 to P2;
-label e0;
-out NAME,1 to P2;
-time e1 [7];
-label e1;
-in NAME,2 from P2;
-endinstance;
-P2: instance;
-concurrent;
-label e2;
-in NAME,0 from P1 before e3;
-time e4 [12], e3 [4];
-label e3;
-in NAME,1 from P1;
-endconcurrent;
-label e4;
-out NAME,2 to P1;
-endinstance;
-endmsc;
Modified: trunk/tests/z120_test/z120_time30.mpr.result
===================================================================
--- trunk/tests/z120_test/z120_time30.mpr.result 2011-12-11 21:37:01 UTC (rev 1225)
+++ trunk/tests/z120_test/z120_time30.mpr.result 2011-12-12 00:07:07 UTC (rev 1226)
@@ -26,7 +26,7 @@
concurrent;
label e2;
in NAME,0 from P1 before e3;
-time e4 [12], e3 [4];
+time e3 [4], e4 [12];
label e3;
in NAME,1 from P1;
endconcurrent;
Deleted: trunk/tests/z120_test/z120_time30.mpr.result1
===================================================================
--- trunk/tests/z120_test/z120_time30.mpr.result1 2011-12-11 21:37:01 UTC (rev 1225)
+++ trunk/tests/z120_test/z120_time30.mpr.result1 2011-12-12 00:07:07 UTC (rev 1226)
@@ -1,36 +0,0 @@
-Warning 32: Unexpected (L1 origin) at time definition: L2
-OK: z120_time30 is correct, should be correct
-
-mscdocument z120_time30;
-msc Main;
-initial connect L0;
-L0: connect L1, L2;
-L1: reference Subprocess connect L3;
-L2: reference Subprocess time [3,4], [1,2);
- top bottom L1 origin (1,10);
- connect L1;
-L3: final;
-endmsc;
-msc Subprocess;
-inst P1;
-inst P2;
-P1: instance;
-out NAME,0 to P2;
-label e0;
-out NAME,1 to P2;
-time e1 [7];
-label e1;
-in NAME,2 from P2;
-endinstance;
-P2: instance;
-concurrent;
-label e2;
-in NAME,0 from P1 before e3;
-time e4 [12], e3 [4];
-label e3;
-in NAME,1 from P1;
-endconcurrent;
-label e4;
-out NAME,2 to P1;
-endinstance;
-endmsc;
Modified: trunk/tests/z120_test/z120_time31.mpr.result
===================================================================
--- trunk/tests/z120_test/z120_time31.mpr.result 2011-12-11 21:37:01 UTC (rev 1225)
+++ trunk/tests/z120_test/z120_time31.mpr.result 2011-12-12 00:07:07 UTC (rev 1226)
@@ -26,7 +26,7 @@
concurrent;
label e2;
in NAME,0 from P1 before e3;
-time e4 [12], e3 [4];
+time e3 [4], e4 [12];
label e3;
in NAME,1 from P1;
endconcurrent;
Deleted: trunk/tests/z120_test/z120_time31.mpr.result1
===================================================================
--- trunk/tests/z120_test/z120_time31.mpr.result1 2011-12-11 21:37:01 UTC (rev 1225)
+++ trunk/tests/z120_test/z120_time31.mpr.result1 2011-12-12 00:07:07 UTC (rev 1226)
@@ -1,36 +0,0 @@
-Warning 32: Unexpected (L1) at time definition: L2
-OK: z120_time31 is correct, should be correct
-
-mscdocument z120_time31;
-msc Main;
-initial connect L0;
-L0: connect L1, L2;
-L1: reference Subprocess connect L3;
-L2: reference Subprocess time [3,4], [1,2);
- top bottom L1 origin (1,10);
- connect L1;
-L3: final;
-endmsc;
-msc Subprocess;
-inst P1;
-inst P2;
-P1: instance;
-out NAME,0 to P2;
-label e0;
-out NAME,1 to P2;
-time e1 [7];
-label e1;
-in NAME,2 from P2;
-endinstance;
-P2: instance;
-concurrent;
-label e2;
-in NAME,0 from P1 before e3;
-time e4 [12], e3 [4];
-label e3;
-in NAME,1 from P1;
-endconcurrent;
-label e4;
-out NAME,2 to P1;
-endinstance;
-endmsc;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <xr...@us...> - 2011-12-22 14:50:52
|
Revision: 1245
http://scstudio.svn.sourceforge.net/scstudio/?rev=1245&view=rev
Author: xrehak
Date: 2011-12-22 14:50:42 +0000 (Thu, 22 Dec 2011)
Log Message:
-----------
Now, also *.vsd files of doc/help/ will be included in the installation directory.
Modified Paths:
--------------
trunk/doc/help/montecarlo/montecarlo.html
trunk/doc/help/unique_instance/unique_instance.html
trunk/src/view/visio/scstudio.nsi
Added Paths:
-----------
trunk/doc/help/montecarlo/montecarlo.vsd
Modified: trunk/doc/help/montecarlo/montecarlo.html
===================================================================
--- trunk/doc/help/montecarlo/montecarlo.html 2011-12-22 13:45:22 UTC (rev 1244)
+++ trunk/doc/help/montecarlo/montecarlo.html 2011-12-22 14:50:42 UTC (rev 1245)
@@ -121,6 +121,9 @@
measurements in your drawing. To receive simulation results you need
to start the Microsoft Excel.
</p>
+ <p>
+ A tutorial example can be found <a href="montecarlo.vsd">here</a>.
+ </p>
</div>
</body>
</html>
Added: trunk/doc/help/montecarlo/montecarlo.vsd
===================================================================
(Binary files differ)
Property changes on: trunk/doc/help/montecarlo/montecarlo.vsd
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/doc/help/unique_instance/unique_instance.html
===================================================================
--- trunk/doc/help/unique_instance/unique_instance.html 2011-12-22 13:45:22 UTC (rev 1244)
+++ trunk/doc/help/unique_instance/unique_instance.html 2011-12-22 14:50:42 UTC (rev 1245)
@@ -123,6 +123,7 @@
<ul class="gallery">
<li>
<ul>
+ <a href="pictures/uniqueinstance.vsd">
<li>
<img src="pictures/uniqueinstance.png" width="350" border="0"
alt="BMSC violating unique instance names"
@@ -131,10 +132,12 @@
<li class="caption">
BMSC violating unique instance names
</li>
+ </a>
</ul>
</li>
<li>
<ul>
+ <a href="pictures/uniqueinstance_result.vsd">
<li>
<img src="pictures/uniqueinstance2.png" width="350" border="0"
alt="SCStudio result" title="SCStudio result" />
@@ -142,6 +145,7 @@
<li class="caption">
SCStudio result
</li>
+ </a>
</ul>
</li>
</ul>
Modified: trunk/src/view/visio/scstudio.nsi
===================================================================
--- trunk/src/view/visio/scstudio.nsi 2011-12-22 13:45:22 UTC (rev 1244)
+++ trunk/src/view/visio/scstudio.nsi 2011-12-22 14:50:42 UTC (rev 1245)
@@ -151,6 +151,7 @@
File /r "..\..\..\doc\help\*.html"
File /r "..\..\..\doc\help\*.css"
File /r "..\..\..\doc\help\*.png"
+ File /r "..\..\..\doc\help\*.vsd"
SetOutPath "$INSTDIR\stencils\Sequence Chart Studio"
File "stencils\Sequence Chart Studio\Basic MSC.vsx"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
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.
|
|
From: <ma...@us...> - 2012-01-08 18:07:55
|
Revision: 1264
http://scstudio.svn.sourceforge.net/scstudio/?rev=1264&view=rev
Author: madzin
Date: 2012-01-08 18:07:48 +0000 (Sun, 08 Jan 2012)
Log Message:
-----------
Repair tests result, remove test from automatic tests due to not satisfied prerequisites. Fix bug in getting last event of a instance.
Modified Paths:
--------------
trunk/src/membership/membership_additional.cpp
trunk/tests/membership/CMakeLists.txt
trunk/tests/membership/complete_pat8_2.mpr.result
trunk/tests/membership/time_cycleWithEmpty_neg_pat.mpr.result
trunk/tests/membership/time_cycle_neg_pat.mpr.result
trunk/tests/membership/time_hard_bmsc_pat03.mpr.result
trunk/tests/membership/time_hard_bmsc_pat05.mpr.result
trunk/tests/membership/time_simple2_neg_pat.mpr.result
Added Paths:
-----------
trunk/tests/membership/complete_pat7.mpr.result
trunk/tests/membership/coregion_minimal_pat7.mpr.result
trunk/tests/membership/time_cycle_pos2_hmsc.mpr
trunk/tests/membership/time_cycle_pos2_pat.mpr
trunk/tests/membership/time_cycle_pos2_pat.mpr.result
trunk/tests/membership/time_simple1_neg_pat.mpr.result
Modified: trunk/src/membership/membership_additional.cpp
===================================================================
--- trunk/src/membership/membership_additional.cpp 2012-01-08 12:09:12 UTC (rev 1263)
+++ trunk/src/membership/membership_additional.cpp 2012-01-08 18:07:48 UTC (rev 1264)
@@ -345,7 +345,7 @@
str = dynamic_cast<StrictOrderArea*>(area);
cor = dynamic_cast<CoregionArea*>(area);
- if(str == NULL)
+ if(str != NULL)
{
if(!is_strict_area_null(str))
not_null_area = str;
@@ -356,10 +356,12 @@
}
str = dynamic_cast<StrictOrderArea*>(not_null_area);
- cor = dynamic_cast<CoregionArea*>(not_null_area);
if(str != NULL)
return str->get_last().get();
+
+ cor = dynamic_cast<CoregionArea*>(not_null_area);
+
if(cor != NULL)
{
CoregionOrderingPtr cor_ord = c->find_coregion_ordering(cor);
Modified: trunk/tests/membership/CMakeLists.txt
===================================================================
--- trunk/tests/membership/CMakeLists.txt 2012-01-08 12:09:12 UTC (rev 1263)
+++ trunk/tests/membership/CMakeLists.txt 2012-01-08 18:07:48 UTC (rev 1264)
@@ -95,7 +95,8 @@
#due to duplicator, membership works only over MSC graph
#ADD_MEMBER_TEST(test_hmsc19.mpr test_bmsc19.mpr 1)
-ADD_MEMBER_TEST(test_hmsc19.mpr test_bmsc19.mpr 0)
+#specification is not a HMSC graph
+#ADD_MEMBER_TEST(test_hmsc19.mpr test_bmsc19.mpr 0)
#test bMSC x bMSC
ADD_MEMBER_TEST(BMSCxBMSC1.mpr BMSCxBMSC1.mpr 1)
@@ -154,6 +155,7 @@
ADD_MEMBER_TEST(time_simple2_neg_hmsc.mpr time_simple2_neg_pat.mpr 0)
ADD_MEMBER_TEST(time_cycle_neg_hmsc.mpr time_cycle_neg_pat.mpr 0)
ADD_MEMBER_TEST(time_cycle_pos_hmsc.mpr time_cycle_pos_pat.mpr 1)
+ADD_MEMBER_TEST(time_cycle_pos2_hmsc.mpr time_cycle_pos2_pat.mpr 1)
ADD_MEMBER_TEST(time_cycleWithEmpty_pos_hmsc.mpr time_cycleWithEmpty_pos_pat.mpr 1)
ADD_MEMBER_TEST(time_cycleWithEmpty_neg_hmsc.mpr time_cycleWithEmpty_neg_pat.mpr 0)
ADD_MEMBER_TEST(test_bmsc28.mpr test_bmsc28_1.mpr 1)
Added: trunk/tests/membership/complete_pat7.mpr.result
===================================================================
--- trunk/tests/membership/complete_pat7.mpr.result (rev 0)
+++ trunk/tests/membership/complete_pat7.mpr.result 2012-01-08 18:07:48 UTC (rev 1264)
@@ -0,0 +1,121 @@
+Flow "Page_1" not found. Unsatisfied time constraint(s) (red intervals are not satisfied, blue intervals are partially satisfied):
+mscdocument complete;
+msc Page_1;
+/* PATH */
+initial connect/* PATH */
+ L0;
+/* PATH */
+L0: reference A/* PATH */
+ connect/* PATH */
+ L1;
+/* PATH */
+L1:/* PATH */
+ connect/* PATH */
+ L2, L3;
+/* PATH */
+L2: reference C top/* NOT_COVER */
+ bottom L4 [4,5];
+ bottom top L4 [2,3);
+/* PATH */
+ connect/* PATH */
+ L4;
+L3: reference B time [1];
+ connect L5;
+/* PATH */
+L4: reference D/* PATH */
+ connect/* PATH */
+ L5;
+/* PATH */
+L5:/* PATH */
+ connect/* PATH */
+ L6;
+/* PATH */
+L6: final/* PATH */
+;
+endmsc;
+msc A;
+inst PC;
+inst Router;
+inst Server;
+PC: instance;
+label e0;
+out c,0 to Router;
+time e1 [0,1);
+endinstance;
+Router: instance;
+concurrent;
+label e1;
+in c,0 from PC;
+label e2;
+out a,1 to Server before e3;
+time e3 [1,2];
+label e3;
+out b,2 to Server;
+endconcurrent;
+endinstance;
+Server: instance;
+in a,1 from Router;
+in b,2 from Router;
+endinstance;
+endmsc;
+msc C;
+inst PC;
+inst Router;
+inst Server;
+PC: instance;
+out a,0 to Router;
+out a,1 to Router;
+endinstance;
+Router: instance;
+in a,0 from PC;
+in b,2 from Server;
+in a,1 from PC;
+endinstance;
+Server: instance;
+out b,2 to Router;
+endinstance;
+endmsc;
+msc B;
+inst PC;
+inst Router;
+inst Server;
+PC: instance;
+in c,0 from Server;
+out b,1 to Router;
+endinstance;
+Router: instance;
+in c,2 from Server;
+in b,1 from PC;
+endinstance;
+Server: instance;
+concurrent;
+out c,2 to Router;
+out c,0 to PC;
+endconcurrent;
+endinstance;
+endmsc;
+msc D;
+inst PC;
+inst Router;
+inst Server;
+PC: instance;
+in b,0 from Router;
+out c,1 to Router;
+endinstance;
+Router: instance;
+concurrent;
+in a,2 from Server;
+in a,3 from Server;
+in b,4 from Server;
+out b,0 to PC;
+endconcurrent;
+in c,1 from PC;
+endinstance;
+Server: instance;
+concurrent;
+out a,2 to Router;
+out a,3 to Router;
+out b,4 to Router;
+endconcurrent;
+endinstance;
+endmsc;
Modified: trunk/tests/membership/complete_pat8_2.mpr.result
===================================================================
--- trunk/tests/membership/complete_pat8_2.mpr.result 2012-01-08 12:09:12 UTC (rev 1263)
+++ trunk/tests/membership/complete_pat8_2.mpr.result 2012-01-08 18:07:48 UTC (rev 1264)
@@ -64,6 +64,7 @@
inst Server;
PC: instance;
out a,0 to Router;
+time @[9,10];
out a,1 to Router;
endinstance;
Router: instance;
@@ -86,6 +87,7 @@
Router: instance;
in c,2 from Server;
in b,1 from PC;
+time @[0,15];
endinstance;
Server: instance;
concurrent;
@@ -101,6 +103,7 @@
PC: instance;
in b,0 from Router;
out c,1 to Router;
+time @[15,16];
endinstance;
Router: instance;
concurrent;
Added: trunk/tests/membership/coregion_minimal_pat7.mpr.result
===================================================================
--- trunk/tests/membership/coregion_minimal_pat7.mpr.result (rev 0)
+++ trunk/tests/membership/coregion_minimal_pat7.mpr.result 2012-01-08 18:07:48 UTC (rev 1264)
@@ -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;
Modified: trunk/tests/membership/time_cycleWithEmpty_neg_pat.mpr.result
===================================================================
--- trunk/tests/membership/time_cycleWithEmpty_neg_pat.mpr.result 2012-01-08 12:09:12 UTC (rev 1263)
+++ trunk/tests/membership/time_cycleWithEmpty_neg_pat.mpr.result 2012-01-08 18:07:48 UTC (rev 1264)
@@ -1,4 +1,4 @@
-Flow "Page_1" not found. Unsatisfied time constraint(s) (red intervals are not satisfied, blue intervals are partially satisfied):
+Flow "Page_1" not found. Unsatisfied time constraint(s) (red intervals are not satisfied, blue intervals are partially satisfied):
mscdocument time_cycleWithEmpty_neg_hmsc;
msc Page_1;
/* PATH */
Modified: trunk/tests/membership/time_cycle_neg_pat.mpr.result
===================================================================
--- trunk/tests/membership/time_cycle_neg_pat.mpr.result 2012-01-08 12:09:12 UTC (rev 1263)
+++ trunk/tests/membership/time_cycle_neg_pat.mpr.result 2012-01-08 18:07:48 UTC (rev 1264)
@@ -1,4 +1,4 @@
-Flow "Page_1" not found. Unsatisfied time constraint(s) (red intervals are not satisfied, blue intervals are partially satisfied):
+Flow "Page_1" not found. Unsatisfied time constraint(s) (red intervals are not satisfied, blue intervals are partially satisfied):
mscdocument time_cycle_neg_hmsc;
msc Page_1;
/* PATH */
Added: trunk/tests/membership/time_cycle_pos2_hmsc.mpr
===================================================================
--- trunk/tests/membership/time_cycle_pos2_hmsc.mpr (rev 0)
+++ trunk/tests/membership/time_cycle_pos2_hmsc.mpr 2012-01-08 18:07:48 UTC (rev 1264)
@@ -0,0 +1,44 @@
+/*
+ modified test time_cycle_neg, changed time constraint in bMSC2
+*/
+mscdocument time_cycle_neg_hmsc.vsd;
+msc Page_1;
+initial connect L0;
+L0: reference bMSC1 time [0,11);
+ connect L0, L1;
+L1: reference bMSC2 time [0,12);
+ connect L2;
+L2: final;
+endmsc;
+msc bMSC1;
+inst p;
+inst q;
+inst r;
+p: instance;
+label e0;
+out a,0 to q;
+time e1 [1,2];
+endinstance;
+q: instance;
+label e1;
+in a,0 from p;
+endinstance;
+r: instance;
+endinstance;
+endmsc;
+msc bMSC2;
+inst p;
+inst q;
+inst r;
+p: instance;
+endinstance;
+q: instance;
+label e0;
+out b,0 to r;
+time e1 [0,5)+[6,9];
+endinstance;
+r: instance;
+label e1;
+in b,0 from q;
+endinstance;
+endmsc;
Added: trunk/tests/membership/time_cycle_pos2_pat.mpr
===================================================================
--- trunk/tests/membership/time_cycle_pos2_pat.mpr (rev 0)
+++ trunk/tests/membership/time_cycle_pos2_pat.mpr 2012-01-08 18:07:48 UTC (rev 1264)
@@ -0,0 +1,32 @@
+/*
+ modified time_cycle_neg test
+*/
+mscdocument time_cycle_neg_pat.vsd;
+msc Page_1;
+inst p;
+inst q;
+inst r;
+p: instance;
+label e0;
+out a,0 to q;
+time e1 [1], e2 [2], e3 [4], e4 [3], e5 [5], e6 [6], e7 [12];
+label e2;
+out a,1 to q;
+label e4;
+out a,2 to q;
+endinstance;
+q: instance;
+label e1;
+in a,0 from p;
+label e3;
+in a,1 from p;
+label e5;
+in a,2 from p;
+label e6;
+out b,3 to r;
+endinstance;
+r: instance;
+label e7;
+in b,3 from q;
+endinstance;
+endmsc;
Added: trunk/tests/membership/time_cycle_pos2_pat.mpr.result
===================================================================
--- trunk/tests/membership/time_cycle_pos2_pat.mpr.result (rev 0)
+++ trunk/tests/membership/time_cycle_pos2_pat.mpr.result 2012-01-08 18:07:48 UTC (rev 1264)
@@ -0,0 +1,57 @@
+Flow "Page_1" found.
+Diagram with found flow highlighted.
+mscdocument time_cycle_pos2_hmsc;
+msc Page_1;
+/* PATH */
+initial connect/* PATH */
+ L0;
+/* PATH */
+/* ATTRIBUTES: [membership_counter 3] */
+L0: reference bMSC1 time [0,11);
+/* PATH */
+/* PATH */
+ connect/* PATH */
+ L0,/* PATH */
+ L1;
+/* PATH */
+/* ATTRIBUTES: [membership_counter 1] */
+L1: reference bMSC2 time [0,12);
+/* PATH */
+ connect/* PATH */
+ L2;
+/* PATH */
+L2: final/* PATH */
+;
+endmsc;
+msc bMSC1;
+inst p;
+inst q;
+inst r;
+p: instance;
+label e0;
+out a,0 to q;
+time e1 [1,2];
+endinstance;
+q: instance;
+label e1;
+in a,0 from p;
+endinstance;
+r: instance;
+endinstance;
+endmsc;
+msc bMSC2;
+inst q;
+inst r;
+inst p;
+q: instance;
+label e0;
+out b,0 to r;
+time e1 [0,5)+[6,9];
+endinstance;
+r: instance;
+label e1;
+in b,0 from q;
+endinstance;
+p: instance;
+endinstance;
+endmsc;
Modified: trunk/tests/membership/time_hard_bmsc_pat03.mpr.result
===================================================================
--- trunk/tests/membership/time_hard_bmsc_pat03.mpr.result 2012-01-08 12:09:12 UTC (rev 1263)
+++ trunk/tests/membership/time_hard_bmsc_pat03.mpr.result 2012-01-08 18:07:48 UTC (rev 1264)
@@ -1,4 +1,4 @@
-Flow "Page_1" not found. Unsatisfied time constraint(s) (red intervals are not satisfied, blue intervals are partially satisfied):
+Flow "Page_1" not found. Unsatisfied time constraint(s) (red intervals are not satisfied, blue intervals are partially satisfied):
mscdocument time_hard_bmsc03;
msc Page_1;
inst A;
Modified: trunk/tests/membership/time_hard_bmsc_pat05.mpr.result
===================================================================
--- trunk/tests/membership/time_hard_bmsc_pat05.mpr.result 2012-01-08 12:09:12 UTC (rev 1263)
+++ trunk/tests/membership/time_hard_bmsc_pat05.mpr.result 2012-01-08 18:07:48 UTC (rev 1264)
@@ -1,4 +1,4 @@
-Flow "Page_1" not found. Unsatisfied time constraint(s) (red intervals are not satisfied, blue intervals are partially satisfied):
+Flow "Page_1" not found. Unsatisfied time constraint(s) (red intervals are not satisfied, blue intervals are partially satisfied):
mscdocument time_hard_bmsc05;
msc Page_1;
inst A;
Added: trunk/tests/membership/time_simple1_neg_pat.mpr.result
===================================================================
--- trunk/tests/membership/time_simple1_neg_pat.mpr.result (rev 0)
+++ trunk/tests/membership/time_simple1_neg_pat.mpr.result 2012-01-08 18:07:48 UTC (rev 1264)
@@ -0,0 +1,44 @@
+Flow "Pattern" not found. Unsatisfied time constraint(s) (red intervals are not satisfied, blue intervals are partially satisfied):
+mscdocument time_simple1_neg_hmsc;
+msc HMSC;
+/* PATH */
+initial connect/* PATH */
+ L0;
+/* MARKED */
+L0: reference MSC_A time (11,12];
+/* PATH */
+ connect/* PATH */
+ L1;
+/* PATH */
+L1: final/* PATH */
+;
+endmsc;
+msc MSC_A;
+inst p;
+inst q;
+inst r;
+p: instance;
+label e0;
+out a,0 to q;
+time e1 [1], e2 [2], e3 [4],/* NOT_COVER */
+ e4 [5], e5 [5], e6 [6], e7 [12];
+label e2;
+out a,1 to q;
+label e4;
+out a,2 to q;
+endinstance;
+q: instance;
+label e1;
+in a,0 from p;
+label e3;
+in a,1 from p;
+label e5;
+in a,2 from p;
+label e6;
+out b,3 to r;
+endinstance;
+r: instance;
+label e7;
+in b,3 from q;
+endinstance;
+endmsc;
Modified: trunk/tests/membership/time_simple2_neg_pat.mpr.result
===================================================================
--- trunk/tests/membership/time_simple2_neg_pat.mpr.result 2012-01-08 12:09:12 UTC (rev 1263)
+++ trunk/tests/membership/time_simple2_neg_pat.mpr.result 2012-01-08 18:07:48 UTC (rev 1264)
@@ -1,4 +1,4 @@
-Flow "Pattern" not found. Unsatisfied time constraint(s) (red intervals are not satisfied, blue intervals are partially satisfied):
+Flow "Pattern" not found. Unsatisfied time constraint(s) (red intervals are not satisfied, blue intervals are partially satisfied):
mscdocument time_simple2_neg_hmsc;
msc HMSC;
/* PATH */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-01-09 00:32:47
|
Revision: 1266
http://scstudio.svn.sourceforge.net/scstudio/?rev=1266&view=rev
Author: madzin
Date: 2012-01-09 00:32:40 +0000 (Mon, 09 Jan 2012)
Log Message:
-----------
Fix small bug in error messages
Modified Paths:
--------------
trunk/src/membership/membership_time.cpp
trunk/tests/membership/CMakeLists.txt
trunk/tests/membership/TODO
trunk/tests/membership/complete_pat4.mpr.result
Modified: trunk/src/membership/membership_time.cpp
===================================================================
--- trunk/src/membership/membership_time.cpp 2012-01-09 00:25:13 UTC (rev 1265)
+++ trunk/src/membership/membership_time.cpp 2012-01-09 00:32:40 UTC (rev 1266)
@@ -441,7 +441,7 @@
{
std::wstring msg = L"Error: not decidable which event is the ";
msg += map_it->first->is_top_node_a()?L"minimal":L"maximal";
- msg += L"one of the ";
+ msg += L" one of the ";
msg += map_it->first->get_ref_node_a()->get_msc()->get_label() + L" node.";
c->get_mem()->print_report(RS_ERROR, msg);
@@ -450,7 +450,7 @@
{
std::wstring msg = L"Error: not decidable which event is the ";
msg += map_it->first->is_top_node_b()?L"minimal":L"maximal";
- msg += L"one of the ";
+ msg += L" one of the ";
msg += map_it->first->get_ref_node_b()->get_msc()->get_label() + L" node.";
c->get_mem()->print_report(RS_ERROR, msg);
Modified: trunk/tests/membership/CMakeLists.txt
===================================================================
--- trunk/tests/membership/CMakeLists.txt 2012-01-09 00:25:13 UTC (rev 1265)
+++ trunk/tests/membership/CMakeLists.txt 2012-01-09 00:32:40 UTC (rev 1266)
@@ -198,6 +198,8 @@
ADD_MEMBER_TEST(complete.mpr complete_pat5.mpr 1)
ADD_MEMBER_TEST(complete1.mpr complete_pat3.mpr 1)
+#see TODO
+#ADD_MEMBER_TEST(time_maximal.mpr time_maximal_pat.mpr 1)
#complete.mpr separeted into small pieces
ADD_MEMBER_TEST(test_bmsc32.mpr test_bmsc32_1.mpr 1)
Modified: trunk/tests/membership/TODO
===================================================================
--- trunk/tests/membership/TODO 2012-01-09 00:25:13 UTC (rev 1265)
+++ trunk/tests/membership/TODO 2012-01-09 00:32:40 UTC (rev 1266)
@@ -17,11 +17,6 @@
-----------------------------------------------------------------
-minimalone -> minimal one
-maximalone -> maximal one
-
------------------------------------------------------------------
-
Get minimal event of BMSC
Get maximal event of BMSC
Modified: trunk/tests/membership/complete_pat4.mpr.result
===================================================================
--- trunk/tests/membership/complete_pat4.mpr.result 2012-01-09 00:25:13 UTC (rev 1265)
+++ trunk/tests/membership/complete_pat4.mpr.result 2012-01-09 00:32:40 UTC (rev 1266)
@@ -1,2 +1,2 @@
-Error: not decidable which event is the minimalone of the C node.
+Error: not decidable which event is the minimal one of the C node.
Flow "Page_2" not found.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mbe...@us...> - 2012-01-13 14:12:30
|
Revision: 1283
http://scstudio.svn.sourceforge.net/scstudio/?rev=1283&view=rev
Author: mbezdeka
Date: 2012-01-13 14:12:24 +0000 (Fri, 13 Jan 2012)
Log Message:
-----------
fixed english in element numbering dialog
Modified Paths:
--------------
trunk/doc/help/frontend/pictures/message_numbering_autoenum_options.png
trunk/src/view/visio/addon/dllmodule.rc
Modified: trunk/doc/help/frontend/pictures/message_numbering_autoenum_options.png
===================================================================
(Binary files differ)
Modified: trunk/src/view/visio/addon/dllmodule.rc
===================================================================
--- trunk/src/view/visio/addon/dllmodule.rc 2012-01-13 12:10:41 UTC (rev 1282)
+++ trunk/src/view/visio/addon/dllmodule.rc 2012-01-13 14:12:24 UTC (rev 1283)
@@ -206,9 +206,9 @@
EXSTYLE WS_EX_TRANSPARENT
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- CONTROL "as nearest element",IDC_NEAREST_MSG,"Button",BS_AUTORADIOBUTTON | WS_GROUP,17,27,77,10
- CONTROL "as nearest numbered element",IDC_NEAREST_NUMBERED_MSG,
- "Button",BS_AUTORADIOBUTTON,17,41,111,10
+ CONTROL "as the nearest element",IDC_NEAREST_MSG,"Button",BS_AUTORADIOBUTTON | WS_GROUP,17,27,90,10
+ CONTROL "as the nearest numbered element",IDC_NEAREST_NUMBERED_MSG,
+ "Button",BS_AUTORADIOBUTTON,17,41,124,10
CONTROL "don't number",IDC_DONT_NUMBER,"Button",BS_AUTORADIOBUTTON | WS_GROUP,17,81,58,10
CONTROL "use numbering style:",IDC_USE_NUMBERING_STYLE,"Button",BS_AUTORADIOBUTTON,17,97,83,10
GROUPBOX "",IDC_STATIC,7,17,286,42,WS_GROUP
@@ -217,7 +217,8 @@
EDITTEXT IDC_ADDITION_GLOBAL,185,95,38,14,ES_AUTOHSCROLL | ES_NOHIDESEL
EDITTEXT IDC_STARTING_INDEX_GLOBAL,254,95,25,14,ES_AUTOHSCROLL | ES_NUMBER
LTEXT "Index:",IDC_STATIC,227,97,21,8,SS_CENTERIMAGE
- CONTROL "automatic numbering new elements",IDC_ENUM_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,7,129,10
+ CONTROL "automatic numbering of new elements",IDC_ENUM_CHECK,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,7,137,10
GROUPBOX "If no nearest (numbered) element found:",IDC_STATIC,7,67,286,54,WS_GROUP
END
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-01-18 02:25:43
|
Revision: 1294
http://scstudio.svn.sourceforge.net/scstudio/?rev=1294&view=rev
Author: madzin
Date: 2012-01-18 02:25:36 +0000 (Wed, 18 Jan 2012)
Log Message:
-----------
Fix bug in find flow algorithm. Algorithm crashed when the diff part should work with coregion. The functionality was not added but a message is printed to the user (Diff is not available).
Modified Paths:
--------------
trunk/src/membership/diff_impl.cpp
trunk/src/membership/membership_alg.cpp
trunk/src/membership/membership_base.h
trunk/tests/diff/CMakeLists.txt
trunk/tests/diff/TODO
Added Paths:
-----------
trunk/tests/diff/coregion.mpr
trunk/tests/diff/coregion_flow.mpr
trunk/tests/diff/coregion_flow.mpr.result
trunk/tests/diff/flow12_2.mpr.result2
Modified: trunk/src/membership/diff_impl.cpp
===================================================================
--- trunk/src/membership/diff_impl.cpp 2012-01-16 18:07:50 UTC (rev 1293)
+++ trunk/src/membership/diff_impl.cpp 2012-01-18 02:25:36 UTC (rev 1294)
@@ -73,7 +73,7 @@
* parameters: a - specification
* b - flow
*/
-MscPtr MembershipAlg::diff(MscPtr specification, std::vector<MscPtr>& msc_flows)
+MscPtr MembershipAlg::diff(MembershipContext* c, MscPtr specification, std::vector<MscPtr>& msc_flows)
{
if(msc_flows.size() > 1)
{
@@ -97,8 +97,6 @@
BMscPtr bmsc = boost::dynamic_pointer_cast<BMsc> (specification);
- MembershipContext* c = new MembershipContext();
- c->set_mem(this);
c->set_diff_type(MESSAGE);
BMscPtr result = NULL;
@@ -112,12 +110,16 @@
else
result = bmsc_bmsc_diff(c, bmsc, flow);
- delete c;
return result;
}
-//Instance "a" - flow
-//Instance "b" - specification
+/*
+ Instance "a" - flow
+ Instance "b" - specification
+
+ Method can return NULL in case the specification contains coregion,
+ could be recognized by MembershipContext attribute.
+*/
DifferencePtr instance_diff(MembershipContext* c, InstancePtr a, InstancePtr b)
{
std::vector<StrictEventPtr> a_ordering;
@@ -128,6 +130,15 @@
EventAreaPtr a_area = a->get_first();
EventAreaPtr b_area = b->get_first();
+ CoregionAreaPtr a_ca = boost::dynamic_pointer_cast<CoregionArea > (a_area);
+ CoregionAreaPtr b_ca = boost::dynamic_pointer_cast<CoregionArea > (b_area);
+
+ if(a_ca != NULL || b_ca != NULL)
+ {
+ c->spec_contain_coregion();
+ return NULL;
+ }
+
StrictOrderAreaPtr a_soa = boost::dynamic_pointer_cast<StrictOrderArea > (a_area);
StrictOrderAreaPtr b_soa = boost::dynamic_pointer_cast<StrictOrderArea > (b_area);
@@ -315,6 +326,43 @@
while (event_a != NULL && event_b != NULL && event_comparison(c, event_a, event_b))
{
+ //check the coregion area in flow
+ if(event_a->get_successor() == NULL)
+ {
+ EventAreaPtr next_area = event_a->get_area()->get_next();
+ CoregionAreaPtr next_ca = boost::dynamic_pointer_cast<CoregionArea>(next_area);
+
+ if(next_ca != NULL)
+ throw std::runtime_error("Flow contains coregion");
+
+ StrictOrderAreaPtr next_soa = boost::dynamic_pointer_cast<StrictOrderArea>(next_area);
+
+ //this would never happen due to there is no reason to have string order
+ //area after another string order area.
+ if(next_soa != NULL)
+ throw std::runtime_error("Unexpected behaviour");
+ }
+
+ //check the coregion area in specification
+ if(event_b->get_successor() == NULL)
+ {
+ EventAreaPtr next_area = event_b->get_area()->get_next();
+ CoregionAreaPtr next_ca = boost::dynamic_pointer_cast<CoregionArea>(next_area);
+
+ if(next_ca != NULL)
+ {
+ c->spec_contain_coregion();
+ return NULL;
+ }
+
+ StrictOrderAreaPtr next_soa = boost::dynamic_pointer_cast<StrictOrderArea>(next_area);
+
+ //this would never happen due to there is no reason to have string order
+ //area after another string order area.
+ if(next_soa != NULL)
+ throw std::runtime_error("Unexpected behaviour");
+ }
+
event_a = event_a->get_successor();
event_b = event_b->get_successor();
row++;
@@ -912,6 +960,14 @@
//when some instance of the specification is not contained in the flow
if(!flow_found)
{
+ CoregionAreaPtr spec_ca = boost::dynamic_pointer_cast<CoregionArea> ((*spec_it)->get_first());
+
+ if(spec_ca != NULL)
+ {
+ c->spec_contain_coregion();
+ return NULL;
+ }
+
StrictOrderAreaPtr s_e_a = boost::dynamic_pointer_cast<StrictOrderArea> ((*spec_it)->get_first());
StrictEventPtr s_e = s_e_a==NULL ? NULL : s_e_a->get_first();
DifferencePtr old_diff = NULL;
@@ -946,6 +1002,9 @@
//when the instance of proper name was found in both MSCs (specification, flow)
DifferencePtr diff = instance_diff(c, *flow_it, *spec_it);
+ if(c->get_spec_contain_coregion())
+ return NULL;
+
if(diff != NULL)
diff_map.insert(std::make_pair((*flow_it)->get_label(), diff));
}
Modified: trunk/src/membership/membership_alg.cpp
===================================================================
--- trunk/src/membership/membership_alg.cpp 2012-01-16 18:07:50 UTC (rev 1293)
+++ trunk/src/membership/membership_alg.cpp 2012-01-18 02:25:36 UTC (rev 1294)
@@ -158,8 +158,23 @@
std::vector<MscPtr> flows;
flows.push_back(bmsc_f);
- result = diff(bmsc, flows);
+ result = diff(c, bmsc, flows);
+ //print an error in case the specification contains coregion
+ if(c->get_spec_contain_coregion())
+ {
+ std::wstring msg = L"Flow \"" + bmsc_f->get_label() + L"\" not found";
+
+ msg += L".\n";
+ msg += L"Diff is not available (due to a coregion in the specification).";
+
+ print_report(RS_ERROR, msg);
+
+ c->clear_attributed_events();
+ delete c;
+ return NULL;
+ }
+
if(result != NULL)
{
std::wstring message;
@@ -221,7 +236,7 @@
}
}
- print_report(RS_ERROR, L"Find flow algorithm cannot recognize an MSC type of specification.");
+ print_report(RS_ERROR, L"Find flow algorithm cannot recognize an MSC type of the specification.");
return NULL;
}
@@ -630,6 +645,8 @@
bool coregion_strict(MembershipContext* c, std::vector<Event*>& node_events, std::vector<Event*>& b_events,
enum check_type type)
{
+ c->spec_contain_coregion();
+
if(type == receive_ordering)
return coregion_strict_receive_ordering(c, node_events, b_events);
Modified: trunk/src/membership/membership_base.h
===================================================================
--- trunk/src/membership/membership_base.h 2012-01-16 18:07:50 UTC (rev 1293)
+++ trunk/src/membership/membership_base.h 2012-01-18 02:25:36 UTC (rev 1294)
@@ -276,6 +276,7 @@
std::vector<std::pair<TimeConstraintPtr, HMscNodePtr> > not_full_covered_intervals; //! intervals in specification which are not full covered
std::stack<HMscNodePtr> path; //! store information about the path if the flow meets the specification
bool print_path; //! store whether the path will be printed
+ bool contain_spec_coregion; //! store whether the specification contains coregion
MembershipResultPtr result;
@@ -296,6 +297,7 @@
{
max_id = 0;
print_path = true;
+ contain_spec_coregion = false;
diff_type = NOT_DIFF;
checking_time_mode = NO_TIME;
result = NULL;
@@ -558,6 +560,16 @@
return print_path;
}
+ void spec_contain_coregion(bool value=true)
+ {
+ contain_spec_coregion = value;
+ }
+
+ bool get_spec_contain_coregion()
+ {
+ return contain_spec_coregion;
+ }
+
//TODO upravit aby nedochadzalo k tolkemu kopirovaniu
void update_result()
{
@@ -1299,7 +1311,7 @@
MscPtr find_flow(MscPtr msc, MscPtr bmsc, std::vector<std::wstring> instances,
std::vector<std::pair<std::wstring, std::vector<MscPtr> > >& messages);
//! Make diff between specification and flow
- MscPtr diff(MscPtr specification, std::vector<MscPtr>& flows);
+ MscPtr diff(MembershipContext* c, MscPtr specification, std::vector<MscPtr>& flows);
public:
Modified: trunk/tests/diff/CMakeLists.txt
===================================================================
--- trunk/tests/diff/CMakeLists.txt 2012-01-16 18:07:50 UTC (rev 1293)
+++ trunk/tests/diff/CMakeLists.txt 2012-01-18 02:25:36 UTC (rev 1294)
@@ -43,4 +43,5 @@
ADD_DIFF_TEST(spec11.mpr flow11.mpr 1)
ADD_DIFF_TEST(spec12.mpr flow12_1.mpr 1)
ADD_DIFF_TEST(spec12.mpr flow12_2.mpr 1)
+ADD_DIFF_TEST(coregion.mpr coregion_flow.mpr 0)
Modified: trunk/tests/diff/TODO
===================================================================
--- trunk/tests/diff/TODO 2012-01-16 18:07:50 UTC (rev 1293)
+++ trunk/tests/diff/TODO 2012-01-18 02:25:36 UTC (rev 1294)
@@ -1,2 +1,4 @@
not minimal results:
./diff_test spec11.mpr flow11.mpr 1
+
+flow12_2.mpr.result2
Added: trunk/tests/diff/coregion.mpr
===================================================================
--- trunk/tests/diff/coregion.mpr (rev 0)
+++ trunk/tests/diff/coregion.mpr 2012-01-18 02:25:36 UTC (rev 1294)
@@ -0,0 +1,15 @@
+mscdocument Drawing1;
+msc Page_1;
+inst A;
+inst B;
+A: instance;
+concurrent;
+in NAME,0 from B;
+out NAME,1 to B;
+endconcurrent;
+endinstance;
+B: instance;
+out NAME,0 to A;
+in NAME,1 from A;
+endinstance;
+endmsc;
Added: trunk/tests/diff/coregion_flow.mpr
===================================================================
--- trunk/tests/diff/coregion_flow.mpr (rev 0)
+++ trunk/tests/diff/coregion_flow.mpr 2012-01-18 02:25:36 UTC (rev 1294)
@@ -0,0 +1,11 @@
+mscdocument Drawing3;
+msc Page_1;
+inst A;
+inst B;
+A: instance;
+in NAME,0 from B;
+endinstance;
+B: instance;
+out NAME,0 to A;
+endinstance;
+endmsc;
Added: trunk/tests/diff/coregion_flow.mpr.result
===================================================================
--- trunk/tests/diff/coregion_flow.mpr.result (rev 0)
+++ trunk/tests/diff/coregion_flow.mpr.result 2012-01-18 02:25:36 UTC (rev 1294)
@@ -0,0 +1,3 @@
+Flow "Page_1" not found.
+Diff is not available (due to a coregion in the specification).
+OK: HMSC doesn't contain bMSC
Added: trunk/tests/diff/flow12_2.mpr.result2
===================================================================
--- trunk/tests/diff/flow12_2.mpr.result2 (rev 0)
+++ trunk/tests/diff/flow12_2.mpr.result2 2012-01-18 02:25:36 UTC (rev 1294)
@@ -0,0 +1,31 @@
+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;
+/* REMOVED */
+/* REMOVED */
+out a,3 to B;
+endinstance;
+B: instance;
+/* REMOVED */
+/* REMOVED */
+in a,1 from A;
+/* REMOVED */
+/* REMOVED */
+in a,3 from A;
+in a,0 from A;
+/* ADDED */
+/* ADDED */
+in a,2 from A;
+endinstance;
+endmsc;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <got...@us...> - 2012-01-21 20:55:25
|
Revision: 1297
http://scstudio.svn.sourceforge.net/scstudio/?rev=1297&view=rev
Author: gotthardp
Date: 2012-01-21 20:55:19 +0000 (Sat, 21 Jan 2012)
Log Message:
-----------
Fixes for CMake 2.8 and ANTLR 3.4
Modified Paths:
--------------
trunk/CMakeLists.txt
trunk/FindANTLR.cmake
Modified: trunk/CMakeLists.txt
===================================================================
--- trunk/CMakeLists.txt 2012-01-21 20:50:45 UTC (rev 1296)
+++ trunk/CMakeLists.txt 2012-01-21 20:55:19 UTC (rev 1297)
@@ -52,7 +52,7 @@
FIND_PACKAGE(Boost COMPONENTS date_time thread REQUIRED)
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR})
-FIND_PACKAGE(Java)
+FIND_PACKAGE(Java COMPONENTS Runtime)
# keep antlr an optional prerequisite
FIND_PACKAGE(ANTLR)
Modified: trunk/FindANTLR.cmake
===================================================================
--- trunk/FindANTLR.cmake 2012-01-21 20:50:45 UTC (rev 1296)
+++ trunk/FindANTLR.cmake 2012-01-21 20:55:19 UTC (rev 1297)
@@ -8,6 +8,7 @@
antlr-3.1.1.jar
antlr-3.1.2.jar
antlr-3.1.3.jar
+ antlr-3.4-complete.jar
PATHS
${ANTLR_ROOT}/lib
DOC "The ANTLR class file")
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <xr...@us...> - 2012-01-23 09:35:10
|
Revision: 1301
http://scstudio.svn.sourceforge.net/scstudio/?rev=1301&view=rev
Author: xrehak
Date: 2012-01-23 09:35:01 +0000 (Mon, 23 Jan 2012)
Log Message:
-----------
Newer version of ANTLR is prefered.
Repaired compatibility to all antlr-3.1.* and antlr-3.4.
Modified Paths:
--------------
trunk/FindANTLR.cmake
trunk/src/data/Z120/z120_load.cpp
Modified: trunk/FindANTLR.cmake
===================================================================
--- trunk/FindANTLR.cmake 2012-01-23 08:11:28 UTC (rev 1300)
+++ trunk/FindANTLR.cmake 2012-01-23 09:35:01 UTC (rev 1301)
@@ -5,10 +5,10 @@
FIND_FILE(ANTLR_CLASSPATH
NAMES
+ antlr-3.4-complete.jar
+ antlr-3.1.3.jar
+ antlr-3.1.2.jar
antlr-3.1.1.jar
- antlr-3.1.2.jar
- antlr-3.1.3.jar
- antlr-3.4-complete.jar
PATHS
${ANTLR_ROOT}/lib
DOC "The ANTLR class file")
Modified: trunk/src/data/Z120/z120_load.cpp
===================================================================
--- trunk/src/data/Z120/z120_load.cpp 2012-01-23 08:11:28 UTC (rev 1300)
+++ trunk/src/data/Z120/z120_load.cpp 2012-01-23 09:35:01 UTC (rev 1301)
@@ -25,8 +25,15 @@
{
std::vector<MscPtr> result;
+#ifdef ANTLR3_ENC_8BIT
+ // ANTLR version >= 3.4
pANTLR3_INPUT_STREAM input =
antlr3FileStreamNew((pANTLR3_UINT8)filename.c_str(), ANTLR3_ENC_8BIT);
+#else
+ // ANTLR version 3.1.*
+ pANTLR3_INPUT_STREAM input =
+ antlr3AsciiFileStreamNew((pANTLR3_UINT8)filename.c_str());
+#endif
if (input == NULL || input < 0)
{
print_report(RS_ERROR,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-02-06 22:34:07
|
Revision: 1308
http://scstudio.svn.sourceforge.net/scstudio/?rev=1308&view=rev
Author: madzin
Date: 2012-02-06 22:34:00 +0000 (Mon, 06 Feb 2012)
Log Message:
-----------
Fix bug - ID: 3480475
Modify the output of searcher algorithms (at this moment just Find Flow).
Modified Paths:
--------------
trunk/src/data/searcher.h
trunk/src/membership/membership_alg.cpp
trunk/src/membership/membership_base.h
trunk/tests/diff/diff_test.cpp
trunk/tests/membership/absolut_time_bmsc01_2.mpr.result
trunk/tests/membership/absolut_time_bmsc02_2.mpr.result
trunk/tests/membership/bmsc_spec4_pat.mpr.result
trunk/tests/membership/complete_absolute_pat3.mpr.result
trunk/tests/membership/complete_absolute_pat8.mpr.result
trunk/tests/membership/complete_pat8_1.mpr.result
trunk/tests/membership/complete_pat8_2.mpr.result
trunk/tests/membership/membership_test.cpp
trunk/tests/membership/test_bmsc28_3.mpr.result
trunk/tests/membership/test_bmsc28_4.mpr.result
trunk/tests/membership/test_bmsc29_2.mpr.result
trunk/tests/membership/test_bmsc30_2.mpr.result
trunk/tests/membership/time_hard_bmsc_pat02.mpr.result
trunk/tests/membership/time_hard_bmsc_pat04.mpr.result
Modified: trunk/src/data/searcher.h
===================================================================
--- trunk/src/data/searcher.h 2012-02-02 19:08:51 UTC (rev 1307)
+++ trunk/src/data/searcher.h 2012-02-06 22:34:00 UTC (rev 1308)
@@ -30,6 +30,76 @@
#pragma warning(disable: 4275)
#endif
+class SearcherResult;
+
+typedef boost::intrusive_ptr<SearcherResult> SearcherResultPtr;
+
+class SearcherResult
+{
+ enum TReportSeverity msg_type;
+ std::wstring msg;
+ std::vector<MscPtr> counterexamples;
+
+ private:
+ //! Number of references to this object.
+ mutable volatile boost::uint32_t m_counter;
+
+ // see http://www.boost.org/doc/libs/1_37_0/libs/smart_ptr/intrusive_ptr.html
+ friend void intrusive_ptr_add_ref(const SearcherResult *ptr);
+ friend void intrusive_ptr_release(const SearcherResult *ptr);
+
+ public:
+
+ SearcherResult(enum TReportSeverity type, std::wstring msg, std::vector<MscPtr> examples)
+ {
+ this->msg_type = type;
+ this->msg = msg;
+ this->counterexamples = examples;
+ m_counter = 0;
+ }
+
+ enum TReportSeverity get_msg_type()
+ {
+ return msg_type;
+ }
+
+ std::wstring get_msg()
+ {
+ return msg;
+ }
+
+ std::vector<MscPtr> get_counterexamples()
+ {
+ return counterexamples;
+ }
+};
+
+inline void intrusive_ptr_add_ref(const SearcherResult *ptr)
+{
+ if(ptr != NULL)
+#if BOOST_VERSION > 103500
+ boost::interprocess::detail::atomic_inc32(&ptr->m_counter);
+#else
+ ++ptr->m_counter;
+#endif
+}
+
+inline void intrusive_ptr_release(const SearcherResult *ptr)
+{
+ if(ptr != NULL)
+ {
+#if BOOST_VERSION > 103500
+ // note, atomic_dec32() returns the old value pointed to by mem
+ if(boost::interprocess::detail::atomic_dec32(&ptr->m_counter) == 1)
+#else
+ if(ptr->m_counter-- == 1)
+#endif
+ // the last pointer is being released, delete the objet
+ delete ptr;
+ }
+}
+
+
class Searcher : public Reporter
{
public:
@@ -41,9 +111,9 @@
virtual PreconditionList get_preconditions(MscPtr msc) const = 0;
//! Find the first occurence of needle in haystack.
- virtual std::vector<std::pair<std::wstring, std::vector<MscPtr> > > find(MscPtr msc, std::vector<MscPtr>& bmscs) = 0;
+ virtual std::vector<SearcherResultPtr> find(MscPtr msc, std::vector<MscPtr>& bmscs) = 0;
- virtual std::vector<std::pair<std::wstring, std::vector<MscPtr> > > find(MscPtr msc, std::vector<MscPtr>& bmscs, std::vector<std::wstring> instances) = 0;
+ virtual std::vector<SearcherResultPtr> find(MscPtr msc, std::vector<MscPtr>& bmscs, std::vector<std::wstring> instances) = 0;
//! Make diff between specification and flow
// virtual MscPtr diff(MscPtr specification, std::vector<MscPtr>& flows) = 0;
Modified: trunk/src/membership/membership_alg.cpp
===================================================================
--- trunk/src/membership/membership_alg.cpp 2012-02-02 19:08:51 UTC (rev 1307)
+++ trunk/src/membership/membership_alg.cpp 2012-02-06 22:34:00 UTC (rev 1308)
@@ -43,7 +43,7 @@
* NULL value means that the specification cover will not be depicted.
*/
MscPtr MembershipAlg::find_flow(MscPtr msc, MscPtr bmsc, std::vector<std::wstring> instances,
- std::vector<std::pair<std::wstring, std::vector<MscPtr> > >& messages)
+ std::vector<SearcherResultPtr>& messages)
{
HMscPtr hmsc = boost::dynamic_pointer_cast<HMsc > (msc);
BMscPtr bmsc_f = boost::dynamic_pointer_cast<BMsc > (bmsc);
@@ -58,7 +58,7 @@
c->set_mem(this);
c->set_focused_instances(instances);
c->set_bmsc(bmsc_f);
- c->set_result_messages(messages);
+// c->set_result_messages(messages);
MscPtr result = NULL;
std::wstring focused_instance_names = L"";
@@ -99,7 +99,7 @@
std::vector<MscPtr> result_vec;
result_vec.push_back(result);
- messages.push_back(std::make_pair(msg, result_vec));
+ messages.push_back(new SearcherResult(RS_ERROR, msg, result_vec));
c->clear_attributed_events();
delete c;
@@ -108,12 +108,12 @@
if(c->get_result()->get_corupted_intervals_size().second != 0)
{
- std::wstring msg = L"Flow \"" + bmsc->get_label() + L" not found. Unsatisfied time constraint(s). Some interval(s) are only partially satisfied: ";
+ std::wstring msg = L"Flow \"" + bmsc->get_label() + L"\" not found. Unsatisfied time constraint(s). Some interval(s) are only partially satisfied: ";
std::vector<MscPtr> result_vec;
result_vec.push_back(result);
- messages.push_back(std::make_pair(msg, result_vec));
+ messages.push_back(new SearcherResult(RS_ERROR, msg, result_vec));
c->clear_attributed_events();
delete c;
@@ -128,7 +128,7 @@
msg += L".";
- messages.push_back(std::make_pair(msg, result_vec));
+ messages.push_back(new SearcherResult(RS_NOTICE, msg, result_vec));
c->clear_attributed_events();
delete c;
@@ -177,13 +177,14 @@
if(result != NULL)
{
- std::wstring message;
- message = L"Flow \"" + bmsc_f->get_label() + L"\" not found. Diff: ";
+ std::wstring msg;
+ msg = L"Flow \"" + bmsc_f->get_label() + L"\" not found. Diff: ";
std::vector<MscPtr> diff_result;
diff_result.push_back(result);
- messages.push_back(std::make_pair(message, diff_result));
+ messages.push_back(new SearcherResult(RS_ERROR, msg, diff_result));
+
}
c->clear_attributed_events();
@@ -199,7 +200,7 @@
std::vector<MscPtr> result_vec;
result_vec.push_back(result);
- messages.push_back(std::make_pair(msg, result_vec));
+ messages.push_back(new SearcherResult(RS_ERROR, msg, result_vec));
c->clear_attributed_events();
delete c;
@@ -208,12 +209,12 @@
if(c->get_result()->get_corupted_intervals_size().second != 0)
{
- std::wstring msg = L"Flow \"" + bmsc_f->get_label() + L" not found. Unsatisfied time constraint(s). Some interval(s) are only partially satisfied: ";
+ std::wstring msg = L"Flow \"" + bmsc_f->get_label() + L"\" not found. Unsatisfied time constraint(s). Some interval(s) are only partially satisfied: ";
std::vector<MscPtr> result_vec;
result_vec.push_back(result);
- messages.push_back(std::make_pair(msg, result_vec));
+ messages.push_back(new SearcherResult(RS_ERROR, msg, result_vec));
c->clear_attributed_events();
delete c;
@@ -240,13 +241,13 @@
return NULL;
}
-std::vector<std::pair<std::wstring, std::vector<MscPtr> > > MembershipAlg::find(MscPtr msc,
+std::vector<SearcherResultPtr> MembershipAlg::find(MscPtr msc,
std::vector<MscPtr>& bmscs,
std::vector<std::wstring> instances)
{
MscPtr temp;
bool cover = false;
- std::vector<std::pair<std::wstring, std::vector<MscPtr> > > messages;
+ std::vector<SearcherResultPtr> messages;
HMscPtr hmsc = boost::dynamic_pointer_cast<HMsc>(msc);
BMscPtr bmsc = boost::dynamic_pointer_cast<BMsc>(msc);
BMscGraphDuplicator hmsc_duplicator;
@@ -283,7 +284,7 @@
if(cover)
{
- std::vector<std::pair<std::wstring, std::vector<MscPtr> > > msg;
+ std::vector<SearcherResultPtr> msg;
dup_msc = hmsc_duplicator.duplicate(hmsc);
@@ -296,15 +297,15 @@
msc_cover.push_back(dup_msc);
if(msc_for_cover.size() > 1)
- messages.push_back(std::make_pair(L"Diagram with found flows highlighted.", msc_cover));
+ messages.push_back(new SearcherResult(RS_NOTICE, L"Diagram with found flows highlighted.", msc_cover));
else
- messages.push_back(std::make_pair(L"Diagram with found flow highlighted.", msc_cover));
+ messages.push_back(new SearcherResult(RS_NOTICE, L"Diagram with found flow highlighted.", msc_cover));
}
return messages;
}
-std::vector<std::pair<std::wstring, std::vector<MscPtr> > > MembershipAlg::find(MscPtr msc, std::vector<MscPtr>& bmscs)
+std::vector<SearcherResultPtr> MembershipAlg::find(MscPtr msc, std::vector<MscPtr>& bmscs)
{
std::vector<std::wstring> instances;
return find(msc, bmscs, instances);
Modified: trunk/src/membership/membership_base.h
===================================================================
--- trunk/src/membership/membership_base.h 2012-02-02 19:08:51 UTC (rev 1307)
+++ trunk/src/membership/membership_base.h 2012-02-06 22:34:00 UTC (rev 1308)
@@ -289,7 +289,7 @@
enum DiffType diff_type;
- std::vector<std::pair<std::wstring, std::vector<MscPtr> > > result_messages;
+// std::vector<std::pair<std::wstring, std::vector<MscPtr> > > result_messages;
// bool search_bmsc;
public:
@@ -810,21 +810,22 @@
diff_type = type;
}
- void set_result_messages(std::vector<std::pair<std::wstring, std::vector<MscPtr> > >& messages)
+/*
+ void set_result_messages(std::vector<SearchResultPtr>& messages)
{
result_messages = messages;
}
-/*
+
std::map<string, std::vector<MscPtr> > get_result_messages()
{
return result_messages;
}
-*/
+
void add_result_message(std::wstring message, std::vector<MscPtr> results)
{
result_messages.push_back(std::make_pair(message, results));
}
-/*
+
void set_search_bmsc()
{
search_bmsc = true;
@@ -1309,7 +1310,7 @@
{
private:
MscPtr find_flow(MscPtr msc, MscPtr bmsc, std::vector<std::wstring> instances,
- std::vector<std::pair<std::wstring, std::vector<MscPtr> > >& messages);
+ std::vector<SearcherResultPtr>& messages);
//! Make diff between specification and flow
MscPtr diff(MembershipContext* c, MscPtr specification, std::vector<MscPtr>& flows);
@@ -1337,9 +1338,9 @@
//! Finds each bmsc flow from the vector in hmsc specification
- virtual std::vector<std::pair<std::wstring, std::vector<MscPtr> > > find(MscPtr hmsc, std::vector<MscPtr>& bmscs);
+ virtual std::vector<SearcherResultPtr> find(MscPtr hmsc, std::vector<MscPtr>& bmscs);
- virtual std::vector<std::pair<std::wstring, std::vector<MscPtr> > > find(MscPtr msc, std::vector<MscPtr>& bmscs, std::vector<std::wstring> instances);
+ virtual std::vector<SearcherResultPtr> find(MscPtr msc, std::vector<MscPtr>& bmscs, std::vector<std::wstring> instances);
MscPtr get_dp_msc(MscPtr msc);
Modified: trunk/tests/diff/diff_test.cpp
===================================================================
--- trunk/tests/diff/diff_test.cpp 2012-02-02 19:08:51 UTC (rev 1307)
+++ trunk/tests/diff/diff_test.cpp 2012-02-06 22:34:00 UTC (rev 1308)
@@ -100,7 +100,7 @@
MembershipAlg mem;
mem.set_printer(&printer);
- std::vector<std::pair<std::wstring, std::vector<MscPtr> > > result;
+ std::vector<SearcherResultPtr> result;
result = mem.find(msc[0], msc_b);
@@ -128,11 +128,11 @@
try
{
- std::vector<std::pair<std::wstring, std::vector<MscPtr> > >::iterator result_it;
+ std::vector<SearcherResultPtr>::iterator result_it;
for(result_it = result.begin(); result_it != result.end(); result_it++)
{
- for(unsigned int i = 0; i < result_it->second.size(); i++)
- z120.save_msc(std::cout, L"msc_diff", result_it->second.at(i));
+ for(unsigned int i = 0; i < (*result_it)->get_counterexamples().size(); i++)
+ z120.save_msc(std::cout, L"msc_diff", (*result_it)->get_counterexamples().at(i));
}
}
catch(std::exception& exc)
Modified: trunk/tests/membership/absolut_time_bmsc01_2.mpr.result
===================================================================
--- trunk/tests/membership/absolut_time_bmsc01_2.mpr.result 2012-02-02 19:08:51 UTC (rev 1307)
+++ trunk/tests/membership/absolut_time_bmsc01_2.mpr.result 2012-02-06 22:34:00 UTC (rev 1308)
@@ -1,4 +1,4 @@
-Flow "bbb not found. Unsatisfied time constraint(s). Some interval(s) are only partially satisfied:
+Flow "bbb" not found. Unsatisfied time constraint(s). Some interval(s) are only partially satisfied:
mscdocument absolut_time_hmsc01;
msc iha;
/* PATH */
Modified: trunk/tests/membership/absolut_time_bmsc02_2.mpr.result
===================================================================
--- trunk/tests/membership/absolut_time_bmsc02_2.mpr.result 2012-02-02 19:08:51 UTC (rev 1307)
+++ trunk/tests/membership/absolut_time_bmsc02_2.mpr.result 2012-02-06 22:34:00 UTC (rev 1308)
@@ -1,4 +1,4 @@
-Flow "bbb not found. Unsatisfied time constraint(s). Some interval(s) are only partially satisfied:
+Flow "bbb" not found. Unsatisfied time constraint(s). Some interval(s) are only partially satisfied:
mscdocument absolut_time_hmsc02;
msc iha;
/* PATH */
Modified: trunk/tests/membership/bmsc_spec4_pat.mpr.result
===================================================================
--- trunk/tests/membership/bmsc_spec4_pat.mpr.result 2012-02-02 19:08:51 UTC (rev 1307)
+++ trunk/tests/membership/bmsc_spec4_pat.mpr.result 2012-02-06 22:34:00 UTC (rev 1308)
@@ -1,4 +1,4 @@
-Flow "Page_1 not found. Unsatisfied time constraint(s). Some interval(s) are only partially satisfied:
+Flow "Page_1" not found. Unsatisfied time constraint(s). Some interval(s) are only partially satisfied:
mscdocument bmsc_spec4;
msc Page_1;
inst PC;
Modified: trunk/tests/membership/complete_absolute_pat3.mpr.result
===================================================================
--- trunk/tests/membership/complete_absolute_pat3.mpr.result 2012-02-02 19:08:51 UTC (rev 1307)
+++ trunk/tests/membership/complete_absolute_pat3.mpr.result 2012-02-06 22:34:00 UTC (rev 1308)
@@ -1,4 +1,4 @@
-Flow "Page_1 not found. Unsatisfied time constraint(s). Some interval(s) are only partially satisfied:
+Flow "Page_1" not found. Unsatisfied time constraint(s). Some interval(s) are only partially satisfied:
mscdocument complete_absolute;
msc Page_1;
/* PATH */
Modified: trunk/tests/membership/complete_absolute_pat8.mpr.result
===================================================================
--- trunk/tests/membership/complete_absolute_pat8.mpr.result 2012-02-02 19:08:51 UTC (rev 1307)
+++ trunk/tests/membership/complete_absolute_pat8.mpr.result 2012-02-06 22:34:00 UTC (rev 1308)
@@ -1,4 +1,4 @@
-Flow "Page_1 not found. Unsatisfied time constraint(s). Some interval(s) are only partially satisfied:
+Flow "Page_1" not found. Unsatisfied time constraint(s). Some interval(s) are only partially satisfied:
mscdocument complete_absolute;
msc Page_1;
/* PATH */
Modified: trunk/tests/membership/complete_pat8_1.mpr.result
===================================================================
--- trunk/tests/membership/complete_pat8_1.mpr.result 2012-02-02 19:08:51 UTC (rev 1307)
+++ trunk/tests/membership/complete_pat8_1.mpr.result 2012-02-06 22:34:00 UTC (rev 1308)
@@ -1,4 +1,4 @@
-Flow "Page_1 not found. Unsatisfied time constraint(s). Some interval(s) are only partially satisfied:
+Flow "Page_1" not found. Unsatisfied time constraint(s). Some interval(s) are only partially satisfied:
mscdocument complete;
msc Page_1;
/* PATH */
Modified: trunk/tests/membership/complete_pat8_2.mpr.result
===================================================================
--- trunk/tests/membership/complete_pat8_2.mpr.result 2012-02-02 19:08:51 UTC (rev 1307)
+++ trunk/tests/membership/complete_pat8_2.mpr.result 2012-02-06 22:34:00 UTC (rev 1308)
@@ -1,4 +1,4 @@
-Flow "Page_1 not found. Unsatisfied time constraint(s). Some interval(s) are only partially satisfied:
+Flow "Page_1" not found. Unsatisfied time constraint(s). Some interval(s) are only partially satisfied:
mscdocument complete_absolute;
msc Page_1;
/* PATH */
Modified: trunk/tests/membership/membership_test.cpp
===================================================================
--- trunk/tests/membership/membership_test.cpp 2012-02-02 19:08:51 UTC (rev 1307)
+++ trunk/tests/membership/membership_test.cpp 2012-02-06 22:34:00 UTC (rev 1308)
@@ -108,7 +108,7 @@
if(bmsc == NULL)
throw std::runtime_error("Error: Flow typecasting failed");
- std::vector<std::pair<std::wstring, std::vector<MscPtr> > > result;
+ std::vector<SearcherResultPtr> result;
std::vector<MscPtr> bmscs;
bmscs.push_back(bmsc);
@@ -155,14 +155,14 @@
if(!result.empty())
{
- std::vector<std::pair<std::wstring, std::vector<MscPtr> > >::iterator vec_it;
+ std::vector<SearcherResultPtr>::iterator vec_it;
for(vec_it = result.begin(); vec_it != result.end(); vec_it++)
{
- std::wcerr << vec_it->first << std::endl;
- for(unsigned int i = 0; i < vec_it->second.size(); i++)
+ std::wcerr << (*vec_it)->get_msg() << std::endl;
+ for(unsigned int i = 0; i < (*vec_it)->get_counterexamples().size(); i++)
{
- z120.save_msc(std::cout, TOWSTRING(filename), vec_it->second.at(i));
+ z120.save_msc(std::cout, TOWSTRING(filename), (*vec_it)->get_counterexamples().at(i));
}
}
}
Modified: trunk/tests/membership/test_bmsc28_3.mpr.result
===================================================================
--- trunk/tests/membership/test_bmsc28_3.mpr.result 2012-02-02 19:08:51 UTC (rev 1307)
+++ trunk/tests/membership/test_bmsc28_3.mpr.result 2012-02-06 22:34:00 UTC (rev 1308)
@@ -1,4 +1,4 @@
-Flow "Page_2 not found. Unsatisfied time constraint(s). Some interval(s) are only partially satisfied:
+Flow "Page_2" not found. Unsatisfied time constraint(s). Some interval(s) are only partially satisfied:
mscdocument test_bmsc28;
msc Page_1;
inst a;
Modified: trunk/tests/membership/test_bmsc28_4.mpr.result
===================================================================
--- trunk/tests/membership/test_bmsc28_4.mpr.result 2012-02-02 19:08:51 UTC (rev 1307)
+++ trunk/tests/membership/test_bmsc28_4.mpr.result 2012-02-06 22:34:00 UTC (rev 1308)
@@ -1,4 +1,4 @@
-Flow "Page_2 not found. Unsatisfied time constraint(s). Some interval(s) are only partially satisfied:
+Flow "Page_2" not found. Unsatisfied time constraint(s). Some interval(s) are only partially satisfied:
mscdocument test_bmsc28;
msc Page_1;
inst a;
Modified: trunk/tests/membership/test_bmsc29_2.mpr.result
===================================================================
--- trunk/tests/membership/test_bmsc29_2.mpr.result 2012-02-02 19:08:51 UTC (rev 1307)
+++ trunk/tests/membership/test_bmsc29_2.mpr.result 2012-02-06 22:34:00 UTC (rev 1308)
@@ -1,4 +1,4 @@
-Flow "bmsc3 not found. Unsatisfied time constraint(s). Some interval(s) are only partially satisfied:
+Flow "bmsc3" not found. Unsatisfied time constraint(s). Some interval(s) are only partially satisfied:
mscdocument test_hmsc29;
msc iha;
/* PATH */
Modified: trunk/tests/membership/test_bmsc30_2.mpr.result
===================================================================
--- trunk/tests/membership/test_bmsc30_2.mpr.result 2012-02-02 19:08:51 UTC (rev 1307)
+++ trunk/tests/membership/test_bmsc30_2.mpr.result 2012-02-06 22:34:00 UTC (rev 1308)
@@ -1,4 +1,4 @@
-Flow "bmsc3 not found. Unsatisfied time constraint(s). Some interval(s) are only partially satisfied:
+Flow "bmsc3" not found. Unsatisfied time constraint(s). Some interval(s) are only partially satisfied:
mscdocument test_hmsc30;
msc iha;
/* PATH */
Modified: trunk/tests/membership/time_hard_bmsc_pat02.mpr.result
===================================================================
--- trunk/tests/membership/time_hard_bmsc_pat02.mpr.result 2012-02-02 19:08:51 UTC (rev 1307)
+++ trunk/tests/membership/time_hard_bmsc_pat02.mpr.result 2012-02-06 22:34:00 UTC (rev 1308)
@@ -1,4 +1,4 @@
-Flow "Page_1 not found. Unsatisfied time constraint(s). Some interval(s) are only partially satisfied:
+Flow "Page_1" not found. Unsatisfied time constraint(s). Some interval(s) are only partially satisfied:
mscdocument time_hard_bmsc02;
msc Page_1;
inst A;
Modified: trunk/tests/membership/time_hard_bmsc_pat04.mpr.result
===================================================================
--- trunk/tests/membership/time_hard_bmsc_pat04.mpr.result 2012-02-02 19:08:51 UTC (rev 1307)
+++ trunk/tests/membership/time_hard_bmsc_pat04.mpr.result 2012-02-06 22:34:00 UTC (rev 1308)
@@ -1,4 +1,4 @@
-Flow "Page_1 not found. Unsatisfied time constraint(s). Some interval(s) are only partially satisfied:
+Flow "Page_1" not found. Unsatisfied time constraint(s). Some interval(s) are only partially satisfied:
mscdocument time_hard_bmsc04;
msc Page_1;
inst A;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-02-07 14:31:12
|
Revision: 1310
http://scstudio.svn.sourceforge.net/scstudio/?rev=1310&view=rev
Author: madzin
Date: 2012-02-07 14:31:02 +0000 (Tue, 07 Feb 2012)
Log Message:
-----------
Fix bug in time find flow - ID: 3480535
Modified Paths:
--------------
trunk/src/membership/membership_alg.cpp
trunk/tests/membership/CMakeLists.txt
Added Paths:
-----------
trunk/tests/membership/test_bmsc36.mpr
trunk/tests/membership/test_bmsc36.mpr.resutl
trunk/tests/membership/test_hmsc36.mpr
Modified: trunk/src/membership/membership_alg.cpp
===================================================================
--- trunk/src/membership/membership_alg.cpp 2012-02-06 22:56:23 UTC (rev 1309)
+++ trunk/src/membership/membership_alg.cpp 2012-02-07 14:31:02 UTC (rev 1310)
@@ -364,12 +364,15 @@
return true;
}
+ //If this is the first computed result and the time constraints are corupted
if(c->get_result() == NULL)
{
c->update_result();
return false;
}
+ //If there is some computed result, it is necessary to compare these computed results and
+ //store result with smoler amount of corupted intervals.
if(c->get_not_covered_intervals().size() < c->get_result()->get_corupted_intervals_size().first)
c->update_result();
else
@@ -401,8 +404,19 @@
if (end != NULL)
{
+ //TODO refactoring; check_time_constraints returns true also in case that the was corupted interval
+ // it returns false e.g. can decide which event is minimal/maximal.
if(check_end_node(c, end, b) && check_time_constraints(c))
- return store_result(c);
+ {
+ if(store_result(c))
+ return true;
+ else
+ {
+ c->top_pop_path();
+ c->pop_time_stacks();
+ return false;
+ }
+ }
else
return false;
}
Modified: trunk/tests/membership/CMakeLists.txt
===================================================================
--- trunk/tests/membership/CMakeLists.txt 2012-02-06 22:56:23 UTC (rev 1309)
+++ trunk/tests/membership/CMakeLists.txt 2012-02-07 14:31:02 UTC (rev 1310)
@@ -255,3 +255,4 @@
ADD_MEMBER_TEST(bmsc_spec4.mpr bmsc_spec4_pat.mpr 1)
ADD_MEMBER_TEST(bmsc_spec5.mpr bmsc_spec5_pat.mpr 1)
+ADD_MEMBER_TEST(test_hmsc36.mpr test_bmsc36.mpr 1)
Added: trunk/tests/membership/test_bmsc36.mpr
===================================================================
--- trunk/tests/membership/test_bmsc36.mpr (rev 0)
+++ trunk/tests/membership/test_bmsc36.mpr 2012-02-07 14:31:02 UTC (rev 1310)
@@ -0,0 +1,14 @@
+mscdocument Drawing1;
+msc Page_1;
+inst A;
+inst B;
+A: instance;
+label e0;
+out ask,0 to B;
+time e1 [0,7);
+endinstance;
+B: instance;
+label e1;
+in ask,0 from A;
+endinstance;
+endmsc;
Added: trunk/tests/membership/test_bmsc36.mpr.resutl
===================================================================
--- trunk/tests/membership/test_bmsc36.mpr.resutl (rev 0)
+++ trunk/tests/membership/test_bmsc36.mpr.resutl 2012-02-07 14:31:02 UTC (rev 1310)
@@ -0,0 +1,43 @@
+Flow "Page_1" found.
+Diagram with found flow highlighted.
+mscdocument test_hmsc36;
+msc HMSC;
+/* PATH */
+initial connect L0,/* PATH */
+ L1;
+L0: reference MSC01 connect L2;
+/* PATH */
+/* ATTRIBUTES: [membership_counter 1] */
+L1: reference MSC02/* PATH */
+ connect/* PATH */
+ L2;
+/* PATH */
+L2: final/* PATH */
+;
+endmsc;
+msc MSC01;
+inst A;
+inst B;
+A: instance;
+label e0;
+out ask,0 to B;
+time e1 [10,11);
+endinstance;
+B: instance;
+label e1;
+in ask,0 from A;
+endinstance;
+endmsc;
+msc MSC02;
+inst A;
+inst B;
+A: instance;
+label e0;
+out ask,0 to B;
+time e1 [0,7);
+endinstance;
+B: instance;
+label e1;
+in ask,0 from A;
+endinstance;
+endmsc;
Added: trunk/tests/membership/test_hmsc36.mpr
===================================================================
--- trunk/tests/membership/test_hmsc36.mpr (rev 0)
+++ trunk/tests/membership/test_hmsc36.mpr 2012-02-07 14:31:02 UTC (rev 1310)
@@ -0,0 +1,33 @@
+mscdocument Drawing1;
+msc HMSC;
+initial connect L0, L1;
+L0: reference MSC01 connect L2;
+L1: reference MSC02 connect L2;
+L2: final;
+endmsc;
+msc MSC01;
+inst A;
+inst B;
+A: instance;
+label e0;
+out ask,0 to B;
+time e1 [10,11);
+endinstance;
+B: instance;
+label e1;
+in ask,0 from A;
+endinstance;
+endmsc;
+msc MSC02;
+inst A;
+inst B;
+A: instance;
+label e0;
+out ask,0 to B;
+time e1 [0,7);
+endinstance;
+B: instance;
+label e1;
+in ask,0 from A;
+endinstance;
+endmsc;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <xr...@us...> - 2012-02-10 15:55:25
|
Revision: 1312
http://scstudio.svn.sourceforge.net/scstudio/?rev=1312&view=rev
Author: xrehak
Date: 2012-02-10 15:55:14 +0000 (Fri, 10 Feb 2012)
Log Message:
-----------
pcap2z120 moved to tools directory.
Modified Paths:
--------------
trunk/COPYING
trunk/README
Added Paths:
-----------
trunk/tools/
trunk/tools/pcap2z120/
trunk/tools/pcap2z120/README
trunk/tools/pcap2z120.py
Modified: trunk/COPYING
===================================================================
--- trunk/COPYING 2012-02-10 13:42:37 UTC (rev 1311)
+++ trunk/COPYING 2012-02-10 15:55:14 UTC (rev 1312)
@@ -1,3 +1,17 @@
+This software is the result of the project Institute for Theoretical
+Computer Science, No. 1M0545, and this result is consistent with
+the expected objectives of the project. The owner of the result is
+Masaryk University, a public university, ID: 00216224. Masaryk University
+allows other companies and individuals to use this software free
+of charge and without territorial restrictions under the terms of
+the license listed bellow. This permission is granted for the duration
+of property rights. This software is not subject to special information
+treatment according to Act No. 412/2005 Coll., as amended. In case
+that a person who will use the software under this license offer
+violates the license terms, the permission to use the software terminates.
+
+
+
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Modified: trunk/README
===================================================================
--- trunk/README 2012-02-10 13:42:37 UTC (rev 1311)
+++ trunk/README 2012-02-10 15:55:14 UTC (rev 1312)
@@ -8,6 +8,10 @@
Part B. Developer Instructions
==============================
+
+Obtaining the source code
+-------------------------
+
The repository has the following structure
doc/ Documentation, manual pages.
src/ Source codes.
@@ -15,8 +19,8 @@
data/ Structures for MSC, export and import functions.
view/ Applications.
visio/ Microsoft Visio plug-in.
- test/ Console application for tests under Unix/Linux.
tests/ Automated regression tests.
+ tools/ Auxiliary tools and third-party SW.
To get the latest sources
svn co https://scstudio.svn.sourceforge.net/svnroot/scstudio/trunk scstudio
@@ -25,6 +29,30 @@
svn cp trunk https://scstudio.svn.sourceforge.net/svnroot/scstudio/tags/0.1
+Compiling SCStudio (Linux version)
+----------------------------------
+
+$ cd scstudio/trunk
+$ cmake .
+$ make
+[$ make test]
+
+
+Compiling SCStudio (Windows version)
+------------------------------------
+
+CMake.exe on scstudio\trunk\CMakeList.txt
+
+MS Visual Studio on scstudio\trunk\src\scstudio.sln
+
+MS Visual Studio on scstudio\trunk\src\view\visio\scstudio.sln
+
+NSIS on scstudio\src\view\visio\scstudio.nsi
+
+
+Configuring SVN for commits
+---------------------------
+
Source files should have the following properties
svn:eol-style=native
svn:keywords=Id
Added: trunk/tools/pcap2z120/README
===================================================================
--- trunk/tools/pcap2z120/README (rev 0)
+++ trunk/tools/pcap2z120/README 2012-02-10 15:55:14 UTC (rev 1312)
@@ -0,0 +1,24 @@
+$Id$
+
+
+pcap2z120.py is a python script that transforms network trefic saved
+in pcap files to textual MSC file following Z120 recommendation.
+The script was created in cooperation with SCStudio developers. In
+case message labels contains unsupported characters, a warning is
+printed to stderr but the file could be used for import into SCStudio.
+
+The script is a modification of pcap2msc script which transforms
+pcap files into mscgen-compatible file.
+pcap2z120.py (as wel as pcap2msc) uses tshark behind the scenes.
+
+More information can be found at http://code.google.com/p/pcap2msc/
+
+Usage:
+
+$ pcap2z120.py ./avses-tosip.cap sip
+
+or
+
+$ python pcap2z120.py ./avses-tosip.cap sip
+
+
Property changes on: trunk/tools/pcap2z120/README
___________________________________________________________________
Added: svn:keywords
+ Date Revision Author HeadURL Id
Added: svn:eol-style
+ native
Copied: trunk/tools/pcap2z120.py (from rev 1311, threeparted/pcap2z120)
===================================================================
--- trunk/tools/pcap2z120.py (rev 0)
+++ trunk/tools/pcap2z120.py 2012-02-10 15:55:14 UTC (rev 1312)
@@ -0,0 +1,138 @@
+#!/usr/bin/python
+
+
+#This script transforms network trefic saved in pcap files to textual MSC file following Z120 recommendation. The scripc was created with cooperation of SCStudio developers.
+#In case message labels contains unsupported characters, a warning is printed to stderr but the file could be used for import into SCStudio.
+
+#The script is a modification of pcap2msc script which transforms pcap files into mscgen-compatible file. More information can be found at http://code.google.com/p/pcap2msc/
+
+#Code License: GPL v2
+#contact: ma...@gm...
+
+import sys
+import subprocess
+import re
+
+def usage():
+ print >>sys.stderr, '%s: <.pcap> [tshark additional options] "wireshark display filter"' % sys.argv[0]
+ sys.exit(1)
+
+n = len(sys.argv)
+if n < 3:
+ usage()
+
+capture = sys.argv[1]
+dfilter = sys.argv[-1]
+
+tshark_cmd = [ 'tshark', '-n' ]
+tshark_cmd.extend(sys.argv[2:-1])
+tshark_cmd.append('-r')
+tshark_cmd.append(sys.argv[1])
+tshark_cmd.append(sys.argv[-1])
+
+# start tshark subprocess and prepare a pipe to which it will write stdout
+shark = subprocess.Popen(tshark_cmd, stdout=subprocess.PIPE)
+sharkout = shark.stdout
+
+# list of messages displayed by tshark
+messages = []
+
+#accord Z120 recommendation
+z120 = True
+
+while True:
+ line = sharkout.readline()
+ # eof encountered
+ if len(line) == 0:
+ break
+
+ regex = re.compile('^ *(\d+) +(\d+\.\d+) +(\d+\.\d+\.\d+\.\d+) -> (\d+\.\d+\.\d+\.\d+) (.*?)$')
+
+ ret = regex.match(line)
+ if ret != None:
+ msg = {}
+ msg['num'] = ret.group(1)
+ msg['date'] = ret.group(2)
+ msg['src'] = ret.group(3)
+ msg['dst'] = ret.group(4)
+
+ mesg = ret.group(5).lstrip().rstrip()
+
+ if any([mesg.find(" ") != -1, mesg.find("\"") != -1,
+ mesg.find("?") != -1, mesg.find("%") != -1,
+ mesg.find("+") != -1, mesg.find("-") != -1,
+ mesg.find("!") != -1, mesg.find("/") != -1,
+ mesg.find("*") != -1, mesg.find("=") != -1,
+ mesg.find("@") != -1, mesg.find("&") != -1,
+ mesg.find("(") != -1, mesg.find(")") != -1,
+ mesg.find("[") != -1, mesg.find("]") != -1,
+ mesg.find("<") != -1, mesg.find(">") != -1,
+ mesg.find("#") != -1, mesg.find(",") != -1,
+ mesg.find(";") != -1, mesg.find(":") != -1]):
+ if z120:
+ print >> sys.stderr, "Warning: Message lable violates Z120 recomendation. The label includes special symbol, e.g. space, ?, /, (, &, etc."
+ z120 = False
+
+ msg['msg'] = mesg
+ messages.append(msg)
+ else:
+ print >>sys.stderr, "line '%s' not handled by regex !" % line
+ break
+
+# synchronously wait for tshark termination
+shark.wait()
+if shark.returncode != 0:
+ print >>sys.stderr, "tshark returned error code %d" % shark.returncode
+ sys.exit(1)
+
+# list of entity
+# contains IP addresses used IP datagrams exchanged in this capture
+entities = []
+for msg in messages:
+ if msg['src'] not in entities:
+ entities.append(msg['src'])
+ if msg['dst'] not in entities:
+ entities.append(msg['dst'])
+
+
+# PRINT GENERATED FILE ON STDOUT
+
+#print header
+print("mscdocument FILE;")
+#print("mscdocument " + sys.argv[1] + ";")
+print("msc traffic;")
+
+#print instances
+line = ''
+for i in range(0, len(entities)):
+ line += '%s: instance;' % (entities[i])
+ if i < len(entities)-1:
+ line += '\n'
+print("%s" % line)
+
+#print messages
+identificator = 0
+for msg in messages:
+ src = entities.index(msg['src'])
+ dst = entities.index(msg['dst'])
+
+ if z120:
+ print("%s: out %s,%d to %s;") % (entities[src], msg['msg'], identificator, entities[dst])
+ print("%s: in %s,%d from %s;") % (entities[dst], msg['msg'], identificator, entities[src])
+ identificator += 1
+ else:
+ print("%s: out \'%s\',%d to %s;") % (entities[src], msg['msg'], identificator, entities[dst])
+ print("%s: in \'%s\',%d from %s;") % (entities[dst], msg['msg'], identificator, entities[src])
+ identificator += 1
+
+#end all instances
+line = ''
+for i in range(0, len(entities)):
+ line += '%s: endinstance;' % (entities[i])
+ if i < len(entities)-1:
+ line += '\n'
+print("%s" % line)
+
+#end of msc
+print("endmsc;")
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-02-13 09:57:08
|
Revision: 1317
http://scstudio.svn.sourceforge.net/scstudio/?rev=1317&view=rev
Author: madzin
Date: 2012-02-13 09:56:57 +0000 (Mon, 13 Feb 2012)
Log Message:
-----------
Add IPv6 support into pcap transformation.
Modified Paths:
--------------
trunk/src/data/Z120/Z120.g
trunk/tools/pcap2z120/pcap2z120.py
Modified: trunk/src/data/Z120/Z120.g
===================================================================
--- trunk/src/data/Z120/Z120.g 2012-02-11 21:00:54 UTC (rev 1316)
+++ trunk/src/data/Z120/Z120.g 2012-02-13 09:56:57 UTC (rev 1317)
@@ -412,14 +412,18 @@
;
event_definition:
- NAME
+ instance_name
{
- set_instance_name_fun(context, (char*) ($NAME.text->chars));
+ set_instance_name_fun(context, (char*) ($instance_name.text->chars));
}
':' instance_event_list
| instance_name_list ':' multi_instance_event_list
;
+instance_name:
+ NAME | Character_String //Character_String is extra; Not supported in Z120 recommentation
+;
+
instance_event_list:
(instance_event)+
;
@@ -570,7 +574,7 @@
;
output_address:
- NAME | ('env' | reference_identification) ('via' NAME)?
+ instance_name | ('env' | reference_identification) ('via' NAME)?
;
reference_identification:
@@ -579,7 +583,7 @@
;
input_address:
- NAME | ('env' | reference_identification) ('via' NAME)?
+ instance_name | ('env' | reference_identification) ('via' NAME)?
;
Modified: trunk/tools/pcap2z120/pcap2z120.py
===================================================================
--- trunk/tools/pcap2z120/pcap2z120.py 2012-02-11 21:00:54 UTC (rev 1316)
+++ trunk/tools/pcap2z120/pcap2z120.py 2012-02-13 09:56:57 UTC (rev 1317)
@@ -46,24 +46,42 @@
messages = []
#accord Z120 recommendation
-z120 = True
+z120 = True
+ipv6_occurred = False
while True:
+ ipv6 = False
line = sharkout.readline()
# eof encountered
if len(line) == 0:
break
+ #IPv4 trafic
regex = re.compile('^ *(\d+) +(\d+\.\d+) +(\d+\.\d+\.\d+\.\d+) -> (\d+\.\d+\.\d+\.\d+) (.*?)$')
+ ret = regex.match(line)
- ret = regex.match(line)
+ #IPv6 trafic
+ if ret == None:
+ regex = re.compile('^ *(\d+) +(\d+\.\d+) +((\w+\:\:?)+\w+) -> ((\w+\:\:?)+\w+) (.*?)$')
+ ret = regex.match(line)
+ ipv6 = True
+
+ if ipv6_occurred == False:
+ print >> sys.stderr, "Warning: Instance name violates Z120 recomendation. IPv6 address includes ':' symbol."
+ ipv6_occurred = True;
+
if ret != None:
msg = {}
msg['num'] = ret.group(1)
msg['date'] = ret.group(2)
- msg['src'] = ret.group(3)
- msg['dst'] = ret.group(4)
+ if ipv6:
+ msg['src'] = "\'" + ret.group(3) + "\'"
+ msg['dst'] = "\'" + ret.group(4) + "\'"
+ else:
+ msg['src'] = ret.group(3)
+ msg['dst'] = ret.group(4)
+
mesg = ret.group(5).lstrip().rstrip()
if any([mesg.find(" ") != -1, mesg.find("\"") != -1,
@@ -77,6 +95,9 @@
mesg.find("<") != -1, mesg.find(">") != -1,
mesg.find("#") != -1, mesg.find(",") != -1,
mesg.find(";") != -1, mesg.find(":") != -1]):
+
+ mesg = "\'" + mesg + "\'"
+
if z120:
print >> sys.stderr, "Warning: Message lable violates Z120 recomendation. The label includes special symbol, e.g. space, ?, /, (, &, etc."
z120 = False
@@ -124,14 +145,9 @@
src = entities.index(msg['src'])
dst = entities.index(msg['dst'])
- if z120:
- print("%s: out %s,%d to %s;") % (entities[src], msg['msg'], identificator, entities[dst])
- print("%s: in %s,%d from %s;") % (entities[dst], msg['msg'], identificator, entities[src])
- identificator += 1
- else:
- print("%s: out \'%s\',%d to %s;") % (entities[src], msg['msg'], identificator, entities[dst])
- print("%s: in \'%s\',%d from %s;") % (entities[dst], msg['msg'], identificator, entities[src])
- identificator += 1
+ print("%s: out %s,%d to %s;") % (entities[src], mesg, identificator, entities[dst])
+ print("%s: in %s,%d from %s;") % (entities[dst], mesg, identificator, entities[src])
+ identificator += 1
#end all instances
line = ''
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ob...@us...> - 2012-03-05 23:26:01
|
Revision: 1329
http://scstudio.svn.sourceforge.net/scstudio/?rev=1329&view=rev
Author: obouda
Date: 2012-03-05 23:25:55 +0000 (Mon, 05 Mar 2012)
Log Message:
-----------
Ignoring some doc files generated by the build process
Modified Paths:
--------------
trunk/src/view/visio/scstudio.nsi
Property Changed:
----------------
trunk/doc/find_flow/
trunk/doc/help/
trunk/doc/help/acyclic/
trunk/doc/help/beautify/
trunk/doc/help/boundedness/
trunk/doc/help/deadlock/
trunk/doc/help/fifo/
trunk/doc/help/frontend/
trunk/doc/help/livelock/
trunk/doc/help/localchoice/
trunk/doc/help/membership/
trunk/doc/help/montecarlo/
trunk/doc/help/race/
trunk/doc/help/realizability/
trunk/doc/help/recursivity/
trunk/doc/help/time_consistency/
trunk/doc/help/time_syntax/
trunk/doc/help/time_tighten/
trunk/doc/help/time_trace_race/
trunk/doc/help/unique_instance/
Property changes on: trunk/doc/find_flow
___________________________________________________________________
Added: svn:ignore
+ *.vcproj
CMakeFiles
CTestTestfile.cmake
cmake_install.cmake
memb_alg.aux
memb_alg.dir
memb_alg.log
memb_alg.out
memb_alg.pdf
Property changes on: trunk/doc/help
___________________________________________________________________
Modified: svn:ignore
- CMakeFiles
cmake_install.cmake
CTestTestfile.cmake
*.dir
Makefile
*.vcproj*
*.chm
+ *.chm
*.dir
*.vcproj*
CMakeFiles
CTestTestfile.cmake
Makefile
cmake_install.cmake
index.html
Property changes on: trunk/doc/help/acyclic
___________________________________________________________________
Added: svn:ignore
+ acyclic.html
Property changes on: trunk/doc/help/beautify
___________________________________________________________________
Added: svn:ignore
+ beautify.html
Property changes on: trunk/doc/help/boundedness
___________________________________________________________________
Added: svn:ignore
+ boundedness.html
Property changes on: trunk/doc/help/deadlock
___________________________________________________________________
Added: svn:ignore
+ deadlock.html
Property changes on: trunk/doc/help/fifo
___________________________________________________________________
Added: svn:ignore
+ fifo.html
Property changes on: trunk/doc/help/frontend
___________________________________________________________________
Added: svn:ignore
+ automatic_drawing.html
flip_message_direction.html
message_numbering.html
settings.html
shape_selection.html
shortcuts.html
Property changes on: trunk/doc/help/livelock
___________________________________________________________________
Added: svn:ignore
+ livelock.html
Property changes on: trunk/doc/help/localchoice
___________________________________________________________________
Added: svn:ignore
+ localchoice.html
Property changes on: trunk/doc/help/membership
___________________________________________________________________
Added: svn:ignore
+ membership.html
Property changes on: trunk/doc/help/montecarlo
___________________________________________________________________
Added: svn:ignore
+ montecarlo.html
Property changes on: trunk/doc/help/race
___________________________________________________________________
Added: svn:ignore
+ race.html
Property changes on: trunk/doc/help/realizability
___________________________________________________________________
Added: svn:ignore
+ realizability.html
Property changes on: trunk/doc/help/recursivity
___________________________________________________________________
Added: svn:ignore
+ recursivity.html
Property changes on: trunk/doc/help/time_consistency
___________________________________________________________________
Added: svn:ignore
+ time_consistency.html
Property changes on: trunk/doc/help/time_syntax
___________________________________________________________________
Added: svn:ignore
+ time_syntax.html
Property changes on: trunk/doc/help/time_tighten
___________________________________________________________________
Added: svn:ignore
+ time_tighten.html
Property changes on: trunk/doc/help/time_trace_race
___________________________________________________________________
Added: svn:ignore
+ time_race.html
Property changes on: trunk/doc/help/unique_instance
___________________________________________________________________
Added: svn:ignore
+ unique_instance.html
Modified: trunk/src/view/visio/scstudio.nsi
===================================================================
--- trunk/src/view/visio/scstudio.nsi 2012-03-03 22:42:33 UTC (rev 1328)
+++ trunk/src/view/visio/scstudio.nsi 2012-03-05 23:25:55 UTC (rev 1329)
@@ -83,7 +83,7 @@
; copy $value to $4 withou "\" at the end, if it is there
StrCpy $1 ${value} 1 -1 # copy the last char
${If} $1 == "\"
- StrCpy $4 ${value} -1 # erase the last char
+ StrCpy $4 ${value} -1 # erase the last char
${Else}
StrCpy $4 ${value} # copy
${EndIf}
@@ -101,7 +101,7 @@
; append ";" at the end of path-list, if not already there
StrCpy $1 $0 1 -1 # copy the last char
${If} $1 != ";"
- StrCpy $0 "$0;" # add ";" at the end
+ StrCpy $0 "$0;" # add ";" at the end
${EndIf}
; check if the value already included in the path-list
@@ -245,7 +245,7 @@
writeRegBin HKCU '${RegMainPath}\Beautify' 'HeadValue' 00002041
WriteRegBin HKCU '${RegMainPath}\Beautify' 'CoregionValue' 00002041
WriteRegBin HKCU '${RegMainPath}\Beautify' 'InstanceValue' 00007042
- WriteRegBin HKCU '${RegMainPath}\Beautify' 'IncompleteMsgValue' 0000A040
+ WriteRegBin HKCU '${RegMainPath}\Beautify' 'IncompleteMsgValue' 0000A040
writeRegBin HKCU '${RegMainPath}\Beautify' 'SlopeMsgValue' 00000000
writeRegBin HKCU '${RegMainPath}\Beautify' 'HeadDistValue' 0000A040
writeRegBin HKCU '${RegMainPath}\Beautify' 'BeginCorDistValue' 0000A040
@@ -269,9 +269,9 @@
writeRegBin HKCU '${RegMainPath}\Beautify' 'XCurrentGrid' 00000000
writeRegBin HKCU '${RegMainPath}\Beautify' 'YCurrentGrid' 00000000
writeRegBin HKCU '${RegMainPath}\Beautify' 'CurrentWidthPage' 00005243
- writeRegBin HKCU '${RegMainPath}\Beautify' 'CurrentHeightPage' 00809443
-
+ writeRegBin HKCU '${RegMainPath}\Beautify' 'CurrentHeightPage' 00809443
+
; configure simulator
WriteRegBin HKCU '${RegMainPath}\Simulator' 'BinWidth' 0000803F
WriteRegBin HKCU '${RegMainPath}\Simulator' 'MaxMessageDelay' 00002041
@@ -380,7 +380,7 @@
$R3 = StrLen (temp)
$R4 = StartCharPos (temp)
$R5 = TempStr (temp)*/
-
+
;Get input from user
Exch $R0
Exch
@@ -389,18 +389,18 @@
Push $R3
Push $R4
Push $R5
-
+
;Get "String" and "SubString" length
StrLen $R2 $R0
StrLen $R3 $R1
;Start "StartCharPos" counter
StrCpy $R4 0
-
+
;Loop until "SubString" is found or "String" reaches its end
${Do}
;Remove everything before and after the searched part ("TempStr")
StrCpy $R5 $R1 $R2 $R4
-
+
;Compare "TempStr" with "SubString"
${IfThen} $R5 == $R0 ${|} ${ExitDo} ${|}
;If not "SubString", this could be "String"'s end
@@ -408,14 +408,14 @@
;If not, continue the loop
IntOp $R4 $R4 + 1
${Loop}
-
+
/*After this point:
------------------------------------------
$R0 = ResultVar (output)*/
-
+
;Remove part before "SubString" on "String" (if there has one)
StrCpy $R0 $R1 `` $R4
-
+
;Return output to user
Pop $R5
Pop $R4
@@ -432,14 +432,14 @@
!macro __StrRep un
Function ${un}StrRep
- ;Written by dirtydingus 2003-02-20 04:30:09
+ ;Written by dirtydingus 2003-02-20 04:30:09
; USAGE
;Push String to do replacement in (haystack)
;Push String to replace (needle)
;Push Replacement
;Call StrRep
- ;Pop $R0 result
-
+ ;Pop $R0 result
+
Exch $R4 ; $R4 = Replacement String
Exch
Exch $R3 ; $R3 = String to replace (needle)
@@ -486,7 +486,7 @@
Exch
Push $R2
StrCpy $R1 "0"
-loop:
+loop:
;Check for Key
EnumRegKey $R2 HKCU $R0 $R1
StrCmp $R2 "" done
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <xr...@us...> - 2012-03-14 14:14:19
|
Revision: 1346
http://scstudio.svn.sourceforge.net/scstudio/?rev=1346&view=rev
Author: xrehak
Date: 2012-03-14 14:14:06 +0000 (Wed, 14 Mar 2012)
Log Message:
-----------
LpSolve added as a third party SW.
Modified Paths:
--------------
trunk/FindLpSolve.cmake
trunk/README
trunk/src/data/beautify/CMakeLists.txt
Added Paths:
-----------
trunk/third-party-sw/
trunk/third-party-sw/lpsolve/
trunk/third-party-sw/lpsolve/README
trunk/third-party-sw/lpsolve/lib/
trunk/third-party-sw/lpsolve/lib/liblpsolve55.lib
trunk/third-party-sw/lpsolve/lib/liblpsolve55d.lib
trunk/third-party-sw/lpsolve/lib/lpsolve55.dll
trunk/third-party-sw/lpsolve/lib/lpsolve55.lib
trunk/third-party-sw/lpsolve/lib32/
trunk/third-party-sw/lpsolve/lib32/liblpsolve55.a
trunk/third-party-sw/lpsolve/lib32/liblpsolve55.so
trunk/third-party-sw/lpsolve/lib64/
trunk/third-party-sw/lpsolve/lib64/liblpsolve55.a
trunk/third-party-sw/lpsolve/lib64/liblpsolve55.so
trunk/third-party-sw/lpsolve/lp_Hash.h
trunk/third-party-sw/lpsolve/lp_SOS.h
trunk/third-party-sw/lpsolve/lp_lib.h
trunk/third-party-sw/lpsolve/lp_matrix.h
trunk/third-party-sw/lpsolve/lp_mipbb.h
trunk/third-party-sw/lpsolve/lp_types.h
trunk/third-party-sw/lpsolve/lp_utils.h
trunk/third-party-sw/lpsolve/lpsolve_README.txt
Modified: trunk/FindLpSolve.cmake
===================================================================
--- trunk/FindLpSolve.cmake 2012-03-13 23:19:59 UTC (rev 1345)
+++ trunk/FindLpSolve.cmake 2012-03-14 14:14:06 UTC (rev 1346)
@@ -1,14 +1,32 @@
# set the default LPSOLVE_ROOT value
+
+set(FIND_LIBRARY_USE_LIB64_PATHS TRUE)
+
IF(NOT LPSOLVE_ROOT)
- SET(LPSOLVE_ROOT $ENV{LPSOLVE_ROOT} CACHE PATH "The LPSOLVE directory root.")
+ #set implicit LPSOLVE_ROOT
+ SET(LPSOLVE_ROOT "${CMAKE_SOURCE_DIR}/third-party-sw/lpsolve" CACHE PATH "The LPSOLVE directory root.")
+ IF(ENV{LPSOLVE_ROOT})
+ SET(LPSOLVE_ROOT $ENV{LPSOLVE_ROOT} CACHE PATH "The LPSOLVE directory root.")
+ ENDIF(ENV{LPSOLVE_ROOT})
ENDIF(NOT LPSOLVE_ROOT)
-FIND_LIBRARY(LPSOLVE_LIBRARY
- NAMES lpsolve55
- PATHS
- ${LPSOLVE_ROOT}
- ${LPSOLVE_ROOT}/lib
+IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ FIND_LIBRARY(LPSOLVE_LIBRARY
+ NAMES lpsolve55
+ PATHS
+ ${LPSOLVE_ROOT}
+ ${LPSOLVE_ROOT}/lib
+ ${LPSOLVE_ROOT}/lib64
+ DOC "The lp_solve library")
+ELSE()
+ FIND_LIBRARY(LPSOLVE_LIBRARY
+ NAMES lpsolve55
+ PATHS
+ ${LPSOLVE_ROOT}
+ ${LPSOLVE_ROOT}/lib
+ ${LPSOLVE_ROOT}/lib32
DOC "The lp_solve library")
+ENDIF()
FIND_PATH(LPSOLVE_INCLUDE_DIR
NAMES lp_lib.h
Modified: trunk/README
===================================================================
--- trunk/README 2012-03-13 23:19:59 UTC (rev 1345)
+++ trunk/README 2012-03-14 14:14:06 UTC (rev 1346)
@@ -20,7 +20,8 @@
view/ Applications.
visio/ Microsoft Visio plug-in.
tests/ Automated regression tests.
- tools/ Auxiliary tools and third-party SW.
+ third-party-sw/ Third-party SW.
+ tools/ Auxiliary tools.
To get the latest sources
svn co https://scstudio.svn.sourceforge.net/svnroot/scstudio/trunk scstudio
Modified: trunk/src/data/beautify/CMakeLists.txt
===================================================================
--- trunk/src/data/beautify/CMakeLists.txt 2012-03-13 23:19:59 UTC (rev 1345)
+++ trunk/src/data/beautify/CMakeLists.txt 2012-03-14 14:14:06 UTC (rev 1346)
@@ -1,4 +1,4 @@
-OPTION(BUILD_OPTIMIZER "Enable to build the layout optimizer" OFF)
+OPTION(BUILD_OPTIMIZER "Enable to build the layout optimizer" ON)
IF(BUILD_OPTIMIZER)
FIND_PACKAGE(LpSolve REQUIRED)
INCLUDE_DIRECTORIES(${LPSOLVE_INCLUDE_DIR})
Added: trunk/third-party-sw/lpsolve/README
===================================================================
--- trunk/third-party-sw/lpsolve/README (rev 0)
+++ trunk/third-party-sw/lpsolve/README 2012-03-14 14:14:06 UTC (rev 1346)
@@ -0,0 +1,10 @@
+# $Id$
+
+This is a library is downloaded from
+http://sourceforge.net/projects/lpsolve/files/lpsolve/5.5.2.0/
+
+Actually, it is assembled from
+- lp_solve_5.5.2.0_dev_win32.zip
+- lp_solve_5.5.2.0_dev_ux32.tar.gz
+- lp_solve_5.5.2.0_dev_ux64.tar.gz
+- lpsolve_README.txt is taken from lp_solve_5.5.2.0_source.tar.gz
Property changes on: trunk/third-party-sw/lpsolve/README
___________________________________________________________________
Added: svn:keywords
+ Date Revision Author HeadURL Id
Added: svn:eol-style
+ native
Added: trunk/third-party-sw/lpsolve/lib/liblpsolve55.lib
===================================================================
(Binary files differ)
Property changes on: trunk/third-party-sw/lpsolve/lib/liblpsolve55.lib
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/third-party-sw/lpsolve/lib/liblpsolve55d.lib
===================================================================
(Binary files differ)
Property changes on: trunk/third-party-sw/lpsolve/lib/liblpsolve55d.lib
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/third-party-sw/lpsolve/lib/lpsolve55.dll
===================================================================
(Binary files differ)
Property changes on: trunk/third-party-sw/lpsolve/lib/lpsolve55.dll
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/third-party-sw/lpsolve/lib/lpsolve55.lib
===================================================================
(Binary files differ)
Property changes on: trunk/third-party-sw/lpsolve/lib/lpsolve55.lib
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/third-party-sw/lpsolve/lib32/liblpsolve55.a
===================================================================
(Binary files differ)
Property changes on: trunk/third-party-sw/lpsolve/lib32/liblpsolve55.a
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/third-party-sw/lpsolve/lib32/liblpsolve55.so
===================================================================
(Binary files differ)
Property changes on: trunk/third-party-sw/lpsolve/lib32/liblpsolve55.so
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/third-party-sw/lpsolve/lib64/liblpsolve55.a
===================================================================
(Binary files differ)
Property changes on: trunk/third-party-sw/lpsolve/lib64/liblpsolve55.a
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/third-party-sw/lpsolve/lib64/liblpsolve55.so
===================================================================
(Binary files differ)
Property changes on: trunk/third-party-sw/lpsolve/lib64/liblpsolve55.so
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/third-party-sw/lpsolve/lp_Hash.h
===================================================================
--- trunk/third-party-sw/lpsolve/lp_Hash.h (rev 0)
+++ trunk/third-party-sw/lpsolve/lp_Hash.h 2012-03-14 14:14:06 UTC (rev 1346)
@@ -0,0 +1,43 @@
+#ifndef HEADER_lp_hash
+#define HEADER_lp_hash
+
+/* For row and column name hash tables */
+
+typedef struct _hashelem
+{
+ char *name;
+ int index;
+ struct _hashelem *next;
+ struct _hashelem *nextelem;
+} hashelem;
+
+typedef struct /* _hashtable */
+{
+ hashelem **table;
+ int size;
+ int base;
+ int count;
+ struct _hashelem *first;
+ struct _hashelem *last;
+} hashtable;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+STATIC hashtable *create_hash_table(int size, int base);
+STATIC void free_hash_table(hashtable *ht);
+STATIC hashelem *findhash(const char *name, hashtable *ht);
+STATIC hashelem *puthash(const char *name, int index, hashelem **list, hashtable *ht);
+STATIC void drophash(const char *name, hashelem **list, hashtable *ht);
+STATIC void free_hash_item(hashelem **hp);
+STATIC hashtable *copy_hash_table(hashtable *ht, hashelem **list, int newsize);
+STATIC int find_var(lprec *lp, char *name, MYBOOL verbose);
+STATIC int find_row(lprec *lp, char *name, MYBOOL Unconstrained_rows_found);
+
+#ifdef __cplusplus
+ }
+#endif
+
+#endif /* HEADER_lp_hash */
+
Property changes on: trunk/third-party-sw/lpsolve/lp_Hash.h
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Added: trunk/third-party-sw/lpsolve/lp_SOS.h
===================================================================
--- trunk/third-party-sw/lpsolve/lp_SOS.h (rev 0)
+++ trunk/third-party-sw/lpsolve/lp_SOS.h 2012-03-14 14:14:06 UTC (rev 1346)
@@ -0,0 +1,108 @@
+#ifndef HEADER_lp_SOS
+#define HEADER_lp_SOS
+
+/* Specially Ordered Sets (SOS) prototypes and settings */
+/* ------------------------------------------------------------------------- */
+
+#include "lp_types.h"
+#include "lp_utils.h"
+#include "lp_matrix.h"
+
+
+/* SOS constraint defines */
+/* ------------------------------------------------------------------------- */
+#define SOS1 1
+#define SOS2 2
+#define SOS3 -1
+#define SOSn MAXINT32
+#define SOS_START_SIZE 10 /* Start size of SOS_list array; realloced if needed */
+
+/* Define SOS_is_feasible() return values */
+/* ------------------------------------------------------------------------- */
+#define SOS3_INCOMPLETE -2
+#define SOS_INCOMPLETE -1
+#define SOS_COMPLETE 0
+#define SOS_INFEASIBLE 1
+#define SOS_INTERNALERROR 2
+
+
+typedef struct _SOSgroup SOSgroup;
+
+typedef struct _SOSrec
+{
+ SOSgroup *parent;
+ int tagorder;
+ char *name;
+ int type;
+ MYBOOL isGUB;
+ int size;
+ int priority;
+ int *members;
+ REAL *weights;
+ int *membersSorted;
+ int *membersMapped;
+} SOSrec;
+
+/* typedef */ struct _SOSgroup
+{
+ lprec *lp; /* Pointer to owner */
+ SOSrec **sos_list; /* Array of pointers to SOS lists */
+ int sos_alloc; /* Size allocated to specially ordered sets (SOS1, SOS2...) */
+ int sos_count; /* Number of specially ordered sets (SOS1, SOS2...) */
+ int maxorder; /* The highest-order SOS in the group */
+ int sos1_count; /* Number of the lowest order SOS in the group */
+ int *membership; /* Array of variable-sorted indeces to SOSes that the variable is member of */
+ int *memberpos; /* Starting positions of the each column's membership list */
+} /* SOSgroup */;
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* SOS storage structure */
+STATIC SOSgroup *create_SOSgroup(lprec *lp);
+STATIC void resize_SOSgroup(SOSgroup *group);
+STATIC int append_SOSgroup(SOSgroup *group, SOSrec *SOS);
+STATIC int clean_SOSgroup(SOSgroup *group, MYBOOL forceupdatemap);
+STATIC void free_SOSgroup(SOSgroup **group);
+
+STATIC SOSrec *create_SOSrec(SOSgroup *group, char *name, int type, int priority, int size, int *variables, REAL *weights);
+STATIC MYBOOL delete_SOSrec(SOSgroup *group, int sosindex);
+STATIC int append_SOSrec(SOSrec *SOS, int size, int *variables, REAL *weights);
+STATIC void free_SOSrec(SOSrec *SOS);
+
+/* SOS utilities */
+STATIC int make_SOSchain(lprec *lp, MYBOOL forceresort);
+STATIC int SOS_member_updatemap(SOSgroup *group);
+STATIC MYBOOL SOS_member_sortlist(SOSgroup *group, int sosindex);
+STATIC MYBOOL SOS_shift_col(SOSgroup *group, int sosindex, int column, int delta, LLrec *usedmap, MYBOOL forceresort);
+int SOS_member_delete(SOSgroup *group, int sosindex, int member);
+int SOS_get_type(SOSgroup *group, int sosindex);
+int SOS_infeasible(SOSgroup *group, int sosindex);
+int SOS_member_index(SOSgroup *group, int sosindex, int member);
+int SOS_member_count(SOSgroup *group, int sosindex);
+int SOS_memberships(SOSgroup *group, int column);
+int *SOS_get_candidates(SOSgroup *group, int sosindex, int column, MYBOOL excludetarget, REAL *upbound, REAL *lobound);
+int SOS_is_member(SOSgroup *group, int sosindex, int column);
+MYBOOL SOS_is_member_of_type(SOSgroup *group, int column, int sostype);
+MYBOOL SOS_set_GUB(SOSgroup *group, int sosindex, MYBOOL state);
+MYBOOL SOS_is_GUB(SOSgroup *group, int sosindex);
+MYBOOL SOS_is_marked(SOSgroup *group, int sosindex, int column);
+MYBOOL SOS_is_active(SOSgroup *group, int sosindex, int column);
+MYBOOL SOS_is_full(SOSgroup *group, int sosindex, int column, MYBOOL activeonly);
+MYBOOL SOS_can_activate(SOSgroup *group, int sosindex, int column);
+MYBOOL SOS_set_marked(SOSgroup *group, int sosindex, int column, MYBOOL asactive);
+MYBOOL SOS_unmark(SOSgroup *group, int sosindex, int column);
+int SOS_fix_unmarked(SOSgroup *group, int sosindex, int variable, REAL *bound, REAL value,
+ MYBOOL isupper, int *diffcount, DeltaVrec *changelog);
+int SOS_fix_list(SOSgroup *group, int sosindex, int variable, REAL *bound,
+ int *varlist, MYBOOL isleft, DeltaVrec *changelog);
+int SOS_is_satisfied(SOSgroup *group, int sosindex, REAL *solution);
+MYBOOL SOS_is_feasible(SOSgroup *group, int sosindex, REAL *solution);
+
+#ifdef __cplusplus
+ }
+#endif
+
+#endif /* HEADER_lp_SOS */
Property changes on: trunk/third-party-sw/lpsolve/lp_SOS.h
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Added: trunk/third-party-sw/lpsolve/lp_lib.h
===================================================================
--- trunk/third-party-sw/lpsolve/lp_lib.h (rev 0)
+++ trunk/third-party-sw/lpsolve/lp_lib.h 2012-03-14 14:14:06 UTC (rev 1346)
@@ -0,0 +1,2294 @@
+
+#ifndef HEADER_lp_lib
+#define HEADER_lp_lib
+
+/* --------------------------------------------------------------------------
+
+ This is the main library header file for the lp_solve v5.0 release
+
+ Starting at version 3.0, LP_Solve is released under the LGPL license.
+ For full information, see the enclosed file LGPL.txt.
+
+ Original developer: Michel Berkelaar - mi...@ic...
+ Most changes 1.5-2.0: Jeroen Dirks - je...@to...
+ Changes 3.2-4.0: Kjell Eikland - kje...@br...
+ (Simplex code, SOS, SC, code optimization)
+ Peter Notebaert - lp...@pe...
+ (Sensitivity analysis, documentation)
+ Changes 5.0+: Kjell Eikland - kje...@br...
+ (BFP, XLI, simplex, B&B, code modularization)
+ Peter Notebaert - lp...@pe...
+ (Sensitivity analysis, New lp parser, LINDO (XLI)
+ parser, VB/.NET interface, documentation)
+
+ Release notes:
+
+ Version 4.0 enhances version 3.2 in terms of internal program/simplex
+ architecture, call level interfaces, data layout, features and contains
+ several bug fixes. There is now complete support for semi-continuous
+ variables and SOS constructions. In the process, a complete API
+ was added. The MPS parser has been amended to support this.
+ Sensitivity analysis and variouse bug fixes was provided by Peter
+ Notebaert in 4.0 sub-releases. Peter also wrote a complete
+ documentation of the API and contributed a VB interface, both of which
+ significantly enhanced the accessibility of lp_solve.
+
+ Version 5.0 is a major rewrite and code cleanup. The main additions that
+ drove forward this cleanup were the modular inversion logic with optimal
+ column ordering, addition of primal phase 1 and dual phase 2 logic for
+ full flexibility in the selection of primal and dual simplex modes,
+ DEVEX and steepest edge pivot selection, along with dynamic cycling
+ detection and prevention. This cleanup made it possible to harmonize the
+ internal rounding principles, contributing to increased numerical stability.
+
+ Version 5.1 rearranges the matrix storage model by enabling both legacy
+ element record-based storage and split vector storage. In addition the
+ lprec structure is optimized and additional routines are added, mainly for
+ sparse vector additions and enhanced XLI functionality. Support for XML-
+ based models was added on the basis of the LPFML schema via xli_LPFML.
+
+ Version 5.2 removes the objective function from the constraint matrix,
+ adds a number of presolve options and speed them up. Degeneracy handling
+ is significantly improved. Support for XLI_ZIMPL was added.
+ Multiple and partial pricing has been enhanced and activated.
+
+ -------------------------------------------------------------------------- */
+/* Define user program feature option switches */
+/* ------------------------------------------------------------------------- */
+
+# if defined _WIN32 && !defined __GNUC__
+# define isnan _isnan
+# endif
+#if defined NOISNAN
+# define isnan(x) FALSE
+#endif
+
+#define SETMASK(variable, mask) variable |= mask
+#define CLEARMASK(variable, mask) variable &= ~(mask)
+#define TOGGLEMASK(variable, mask) variable ^= mask
+#define ISMASKSET(variable, mask) (MYBOOL) (((variable) & (mask)) != 0)
+
+/* Utility/system settings */
+/* ------------------------------------------------------------------------- */
+/*#define INTEGERTIME */ /* Set use of lower-resolution timer */
+
+
+/* New v5.0+ simplex/optimization features and settings */
+/* ------------------------------------------------------------------------- */
+/*#define NoRowScaleOF */ /* Optionally skip row-scaling of the OF */
+#define DoMatrixRounding /* Round A matrix elements to precision */
+#define DoBorderRounding /* Round RHS, bounds and ranges to precision */
+#define Phase1EliminateRedundant /* Remove rows of redundant artificials */
+#define FixViolatedOptimal
+#define ImproveSolutionPrecision /* Round optimal solution values */
+/*#define IncreasePivotOnReducedAccuracy */ /* Increase epspivot on instability */
+/*#define FixInaccurateDualMinit */ /* Reinvert on inaccuracy in dual minits */
+/*#define EnforcePositiveTheta */ /* Ensure that the theta range is valid */
+#define ResetMinitOnReinvert
+/*#define UsePrimalReducedCostUpdate */ /* Not tested */
+/*#define UseDualReducedCostUpdate */ /* Seems Ok, but slower than expected */
+/*#ifdef UseLegacyExtrad */ /* Use v3.2- style Extrad method */
+#define UseMilpExpandedRCF /* Non-ints in reduced cost bound tightening */
+/*#define UseMilpSlacksRCF */ /* Slacks in reduced cost bound tightening (degen
+ prone); requires !SlackInitMinusInf */
+#define LegacySlackDefinition /* Slack as the "value of the constraint" */
+
+
+/* Development features (change at own risk) */
+/* ------------------------------------------------------------------------- */
+/*#define MIPboundWithOF */ /* Enable to detect OF constraint for use during B&B */
+/*#define SlackInitMinusInf */ /* Slacks have 0 LB if this is not defined */
+#define FULLYBOUNDEDSIMPLEX FALSE /* WARNING: Activate at your own risk! */
+
+
+/* Specify use of the basic linear algebra subroutine library */
+/* ------------------------------------------------------------------------- */
+#define libBLAS 2 /* 0: No, 1: Internal, 2: External */
+#define libnameBLAS "myBLAS"
+
+
+/* Active inverse logic (default is optimized original etaPFI) */
+/* ------------------------------------------------------------------------- */
+#if !defined LoadInverseLib
+# define LoadInverseLib TRUE /* Enable alternate inverse libraries */
+#endif
+/*#define ExcludeNativeInverse */ /* Disable INVERSE_ACTIVE inverse engine */
+
+#define DEF_OBJINBASIS TRUE /* Additional rows inserted at the top (1 => OF) */
+
+#define INVERSE_NONE -1
+#define INVERSE_LEGACY 0
+#define INVERSE_ETAPFI 1
+#define INVERSE_LUMOD 2
+#define INVERSE_LUSOL 3
+#define INVERSE_GLPKLU 4
+
+#ifndef RoleIsExternalInvEngine /* Defined in inverse DLL drivers */
+ #ifdef ExcludeNativeInverse
+ #define INVERSE_ACTIVE INVERSE_NONE /* Disable native engine */
+ #else
+ #define INVERSE_ACTIVE INVERSE_LEGACY /* User or DLL-selected */
+ #endif
+#endif
+
+
+/* Active external language interface logic (default is none) */
+/* ------------------------------------------------------------------------- */
+#if !defined LoadLanguageLib
+# define LoadLanguageLib TRUE /* Enable alternate language libraries */
+#endif
+#define ExcludeNativeLanguage /* Disable LANGUAGE_ACTIVE XLI */
+
+#define LANGUAGE_NONE -1
+#define LANGUAGE_LEGACYLP 0
+#define LANGUAGE_CPLEXLP 1
+#define LANGUAGE_MPSX 2
+#define LANGUAGE_LPFML 3
+#define LANGUAGE_MATHPROG 4
+#define LANGUAGE_AMPL 5
+#define LANGUAGE_GAMS 6
+#define LANGUAGE_ZIMPL 7
+#define LANGUAGE_S 8
+#define LANGUAGE_R 9
+#define LANGUAGE_MATLAB 10
+#define LANGUAGE_OMATRIX 11
+#define LANGUAGE_SCILAB 12
+#define LANGUAGE_OCTAVE 13
+#define LANGUAGE_EMPS 14
+
+#ifndef RoleIsExternalLanguageEngine /* Defined in XLI driver libraries */
+ #ifdef ExcludeNativeLanguage
+ #define LANGUAGE_ACTIVE LANGUAGE_NONE /* Disable native engine */
+ #else
+ #define LANGUAGE_ACTIVE LANGUAGE_CPLEXLP /* User or DLL-selected */
+ #endif
+#endif
+
+
+/* Default parameters and tolerances */
+/* ------------------------------------------------------------------------- */
+#define OriginalPARAM 0
+#define ProductionPARAM 1
+#define ChvatalPARAM 2
+#define LoosePARAM 3
+#if 1
+ #define ActivePARAM ProductionPARAM
+#else
+ #define ActivePARAM LoosePARAM
+#endif
+
+
+/* Miscellaneous settings */
+/* ------------------------------------------------------------------------- */
+#ifndef Paranoia
+ #ifdef _DEBUG
+ #define Paranoia
+ #endif
+#endif
+
+
+/* Program version data */
+/* ------------------------------------------------------------------------- */
+#define MAJORVERSION 5
+#define MINORVERSION 5
+#define RELEASE 2
+#define BUILD 0
+#define BFPVERSION 12 /* Checked against bfp_compatible() */
+#define XLIVERSION 12 /* Checked against xli_compatible() */
+/* Note that both BFPVERSION and XLIVERSION typically have to be incremented
+ in the case that the lprec structure changes. */
+
+
+/* Include/header files */
+/* ------------------------------------------------------------------------- */
+#include <sys/types.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include <stdio.h>
+
+#include "lp_types.h"
+#include "lp_utils.h"
+
+#if (LoadInverseLib == TRUE) || (LoadLanguageLib == TRUE)
+ #ifdef WIN32
+ #include <windows.h>
+ #else
+ #include <dlfcn.h>
+ #endif
+#endif
+
+#ifndef BFP_CALLMODEL
+ #ifdef WIN32
+ #define BFP_CALLMODEL __stdcall /* "Standard" call model */
+ #else
+ #define BFP_CALLMODEL
+ #endif
+#endif
+#ifndef XLI_CALLMODEL
+ #define XLI_CALLMODEL BFP_CALLMODEL
+#endif
+
+#define REGISTER register /* Speed up certain operations */
+
+
+/* Definition of program constrants */
+/* ------------------------------------------------------------------------- */
+#define SIMPLEX_UNDEFINED 0
+#define SIMPLEX_Phase1_PRIMAL 1
+#define SIMPLEX_Phase1_DUAL 2
+#define SIMPLEX_Phase2_PRIMAL 4
+#define SIMPLEX_Phase2_DUAL 8
+#define SIMPLEX_DYNAMIC 16
+#define SIMPLEX_AUTODUALIZE 32
+
+#define SIMPLEX_PRIMAL_PRIMAL (SIMPLEX_Phase1_PRIMAL + SIMPLEX_Phase2_PRIMAL)
+#define SIMPLEX_DUAL_PRIMAL (SIMPLEX_Phase1_DUAL + SIMPLEX_Phase2_PRIMAL)
+#define SIMPLEX_PRIMAL_DUAL (SIMPLEX_Phase1_PRIMAL + SIMPLEX_Phase2_DUAL)
+#define SIMPLEX_DUAL_DUAL (SIMPLEX_Phase1_DUAL + SIMPLEX_Phase2_DUAL)
+#define SIMPLEX_DEFAULT (SIMPLEX_DUAL_PRIMAL)
+
+/* Variable codes (internal) */
+#define ISREAL 0
+#define ISINTEGER 1
+#define ISSEMI 2
+#define ISSOS 4
+#define ISSOSTEMPINT 8
+#define ISGUB 16
+
+/* Presolve defines */
+#define PRESOLVE_NONE 0
+#define PRESOLVE_ROWS 1
+#define PRESOLVE_COLS 2
+#define PRESOLVE_LINDEP 4
+#define PRESOLVE_AGGREGATE 8 /* Not implemented */
+#define PRESOLVE_SPARSER 16 /* Not implemented */
+#define PRESOLVE_SOS 32
+#define PRESOLVE_REDUCEMIP 64
+#define PRESOLVE_KNAPSACK 128 /* Implementation not tested completely */
+#define PRESOLVE_ELIMEQ2 256
+#define PRESOLVE_IMPLIEDFREE 512
+#define PRESOLVE_REDUCEGCD 1024
+#define PRESOLVE_PROBEFIX 2048
+#define PRESOLVE_PROBEREDUCE 4096
+#define PRESOLVE_ROWDOMINATE 8192
+#define PRESOLVE_COLDOMINATE 16384 /* Reduced functionality, should be expanded */
+#define PRESOLVE_MERGEROWS 32768
+#define PRESOLVE_IMPLIEDSLK 65536
+#define PRESOLVE_COLFIXDUAL 131072
+#define PRESOLVE_BOUNDS 262144
+#define PRESOLVE_LASTMASKMODE (PRESOLVE_DUALS - 1)
+#define PRESOLVE_DUALS 524288
+#define PRESOLVE_SENSDUALS 1048576
+
+/* Basis crash options */
+#define CRASH_NONE 0
+#define CRASH_NONBASICBOUNDS 1
+#define CRASH_MOSTFEASIBLE 2
+#define CRASH_LEASTDEGENERATE 3
+
+/* Solution recomputation options (internal) */
+#define INITSOL_SHIFTZERO 0
+#define INITSOL_USEZERO 1
+#define INITSOL_ORIGINAL 2
+
+/* Strategy codes to avoid or recover from degenerate pivots,
+ infeasibility or numeric errors via randomized bound relaxation */
+#define ANTIDEGEN_NONE 0
+#define ANTIDEGEN_FIXEDVARS 1
+#define ANTIDEGEN_COLUMNCHECK 2
+#define ANTIDEGEN_STALLING 4
+#define ANTIDEGEN_NUMFAILURE 8
+#define ANTIDEGEN_LOSTFEAS 16
+#define ANTIDEGEN_INFEASIBLE 32
+#define ANTIDEGEN_DYNAMIC 64
+#define ANTIDEGEN_DURINGBB 128
+#define ANTIDEGEN_RHSPERTURB 256
+#define ANTIDEGEN_BOUNDFLIP 512
+#define ANTIDEGEN_DEFAULT (ANTIDEGEN_FIXEDVARS | ANTIDEGEN_STALLING /* | ANTIDEGEN_INFEASIBLE */)
+
+/* REPORT defines */
+#define NEUTRAL 0
+#define CRITICAL 1
+#define SEVERE 2
+#define IMPORTANT 3
+#define NORMAL 4
+#define DETAILED 5
+#define FULL 6
+
+/* MESSAGE defines */
+#define MSG_NONE 0
+#define MSG_PRESOLVE 1
+#define MSG_ITERATION 2
+#define MSG_INVERT 4
+#define MSG_LPFEASIBLE 8
+#define MSG_LPOPTIMAL 16
+#define MSG_LPEQUAL 32
+#define MSG_LPBETTER 64
+#define MSG_MILPFEASIBLE 128
+#define MSG_MILPEQUAL 256
+#define MSG_MILPBETTER 512
+#define MSG_MILPSTRATEGY 1024
+#define MSG_MILPOPTIMAL 2048
+#define MSG_PERFORMANCE 4096
+#define MSG_INITPSEUDOCOST 8192
+
+/* MPS file types */
+#define MPSFIXED 1
+#define MPSFREE 2
+#define MPSIBM 4
+#define MPSNEGOBJCONST 8
+
+#define MPS_FREE (MPSFREE<<2)
+#define MPS_IBM (MPSIBM<<2)
+#define MPS_NEGOBJCONST (MPSNEGOBJCONST<<2)
+
+/* MPS defines (internal) */
+#define MPSUNDEF -4
+#define MPSNAME -3
+#define MPSOBJSENSE -2
+#define MPSOBJNAME -1
+#define MPSROWS 0
+#define MPSCOLUMNS 1
+#define MPSRHS 2
+#define MPSBOUNDS 3
+#define MPSRANGES 4
+#define MPSSOS 5
+
+#define MPSVARMASK "%-8s"
+#define MPSVALUEMASK "%12g"
+
+/* Constraint type codes (internal) */
+#define ROWTYPE_EMPTY 0
+#define ROWTYPE_LE 1
+#define ROWTYPE_GE 2
+#define ROWTYPE_EQ 3
+#define ROWTYPE_CONSTRAINT ROWTYPE_EQ /* This is the mask for modes */
+#define ROWTYPE_OF 4
+#define ROWTYPE_INACTIVE 8
+#define ROWTYPE_RELAX 16
+#define ROWTYPE_GUB 32
+#define ROWTYPE_OFMAX (ROWTYPE_OF + ROWTYPE_GE)
+#define ROWTYPE_OFMIN (ROWTYPE_OF + ROWTYPE_LE)
+#define ROWTYPE_CHSIGN ROWTYPE_GE
+
+/* Public constraint codes */
+#define FR ROWTYPE_EMPTY
+#define LE ROWTYPE_LE
+#define GE ROWTYPE_GE
+#define EQ ROWTYPE_EQ
+#define OF ROWTYPE_OF
+
+/* MIP constraint classes */
+#define ROWCLASS_Unknown 0 /* Undefined/unknown */
+#define ROWCLASS_Objective 1 /* The objective funct...
[truncated message content] |
|
From: <lko...@us...> - 2012-03-21 13:54:42
|
Revision: 1351
http://scstudio.svn.sourceforge.net/scstudio/?rev=1351&view=rev
Author: lkorenciak
Date: 2012-03-21 13:54:31 +0000 (Wed, 21 Mar 2012)
Log Message:
-----------
fixed CMakeLists to properly install scstudio command line executable
Modified Paths:
--------------
trunk/CMakeLists.txt
trunk/src/CMakeLists.txt
trunk/src/check/time/CMakeLists.txt
trunk/src/data/beautify/CMakeLists.txt
trunk/src/scstudio.cpp
trunk/tests/tightening_tests/tighten_test.cpp
Modified: trunk/CMakeLists.txt
===================================================================
--- trunk/CMakeLists.txt 2012-03-20 06:16:45 UTC (rev 1350)
+++ trunk/CMakeLists.txt 2012-03-21 13:54:31 UTC (rev 1351)
@@ -64,6 +64,26 @@
SET(LIBRARY_OUTPUT_PATH ${EXECUTABLE_OUTPUT_PATH})
ENDIF(WIN32)
+# use, i.e. don't skip the full RPATH for the build tree
+SET(CMAKE_SKIP_BUILD_RPATH FALSE)
+
+# when building, don't use the install RPATH already
+# (but later on when installing)
+SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
+
+SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
+
+# add the automatically determined parts of the RPATH
+# which point to directories outside the build tree to the install RPATH
+SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+
+
+# the RPATH to be used when installing, but only if it's not a system directory
+LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" isSystemDir)
+IF("${isSystemDir}" STREQUAL "-1")
+ SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
+ENDIF("${isSystemDir}" STREQUAL "-1")
+
ADD_SUBDIRECTORY(doc)
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(tests)
Modified: trunk/src/CMakeLists.txt
===================================================================
--- trunk/src/CMakeLists.txt 2012-03-20 06:16:45 UTC (rev 1350)
+++ trunk/src/CMakeLists.txt 2012-03-21 13:54:31 UTC (rev 1351)
@@ -11,6 +11,34 @@
FIND_PACKAGE(Excel)
ENDIF(WIN32)
+
+IF(ANTLR_FOUND)
+ADD_DEFINITIONS(-DHAVE_ANTLR)
+SET(BUILD_SHARED_LIBS ON)
+ADD_EXECUTABLE(scstudio
+ scstudio.cpp
+)
+
+TARGET_LINK_LIBRARIES(scstudio
+ scmsc
+ sctime
+ scrace
+ scliveness
+ sclocalchoice
+ scboundedness
+ scmembership
+ scpseudocode
+ scZ120
+)
+
+INSTALL(TARGETS scstudio
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib)
+
+ENDIF(ANTLR_FOUND)
+
+
CONFIGURE_FILE(
${CMAKE_CURRENT_SOURCE_DIR}/config.h.in
${CMAKE_CURRENT_BINARY_DIR}/config.h)
Modified: trunk/src/check/time/CMakeLists.txt
===================================================================
--- trunk/src/check/time/CMakeLists.txt 2012-03-20 06:16:45 UTC (rev 1350)
+++ trunk/src/check/time/CMakeLists.txt 2012-03-21 13:54:31 UTC (rev 1351)
@@ -18,8 +18,6 @@
find_block.h
hmsc_block_paths.cpp
hmsc_block_paths.h
-
-
)
TARGET_LINK_LIBRARIES(sctime
@@ -27,3 +25,7 @@
scpseudocode
)
+INSTALL(TARGETS sctime
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib)
\ No newline at end of file
Modified: trunk/src/data/beautify/CMakeLists.txt
===================================================================
--- trunk/src/data/beautify/CMakeLists.txt 2012-03-20 06:16:45 UTC (rev 1350)
+++ trunk/src/data/beautify/CMakeLists.txt 2012-03-21 13:54:31 UTC (rev 1351)
@@ -19,6 +19,8 @@
beautify.cpp
instance_sequencer.h
instance_sequencer.cpp
+ layout_optimizer.h
+ layout_optimizer.cpp
time_transformer.h
time_transformer.cpp
${OPTIMIZER_SOURCES}
Modified: trunk/src/scstudio.cpp
===================================================================
--- trunk/src/scstudio.cpp 2012-03-20 06:16:45 UTC (rev 1350)
+++ trunk/src/scstudio.cpp 2012-03-21 13:54:31 UTC (rev 1351)
@@ -23,6 +23,10 @@
#include <list>
+#include "data/Z120/z120.h"
+#include "check/time/tightening.h"
+#include "membership/membership_alg.h"
+
#define FORARR(i,array) for (unsigned i = 0; i < sizeof(array)/sizeof(array[0]); ++i)
@@ -251,7 +255,8 @@
<< " 1 if the property being checked is violated" << std::endl
<< " 2 if a precondition for the algorithm is not met" << std::endl
<< " 3 if the input cannot be read" << std::endl
- << " >3 on an internal error" << std::endl
+ << " 4 if the ouput writing fails" << std::endl
+ << " >4 on an internal error" << std::endl
<< std::endl
<< "SUPPORTED CHECKERS" << std::endl
<< " The following checkers are supported (names recognized in case insensitive manner):" << std::endl
@@ -290,16 +295,65 @@
int call_tighten_time(const char* input_msc)
{
- // FIXME
std::cout << "tighten time on " << input_msc << std::endl;
+
+ Z120 z120;
+
+ StreamReportPrinter printer(std::wcerr);
+ z120.set_printer(&printer);
+
+ std::vector<MscPtr> msc;
+
+ try
+ {
+ msc = z120.load_msc(input_msc);
+ }
+ catch(std::exception& exc)
+ {
+ std::wcerr << "EXCEPTION: " << exc.what() << std::endl;
+ return 3;
+ }
+
+ if(msc.size()==0)
+ {
+ std::wcerr<<"Could not find any MSC. Nothing to do."<<std::endl;
+ return 3;
+ }
+
+ Tighter tighter;
+ MscPtr result = tighter.transform(msc[0]);
+
+ //TODO check whther prerequisities were satisfied. if no report error and return 2
+
+ if(result == NULL)
+ {
+ std::wcerr << "ERROR: tightening algorithm failed." << std::endl;
+ return 5;
+ }
+ else
+ {
+ std::wcerr << "OK: tightening is finished." << std::endl;
+ try
+ {
+ z120.save_msc(std::cout, L"tightened_msc", result);
+ }
+ catch(std::exception& exc)
+ {
+ std::wcerr << "EXCEPTION: Cannot write the document: " << exc.what() << std::endl;
+ return 4;
+ }
+ }
return 0;
}
int call_diff(const char* msc_file1, const char* msc_file2)
{
- // FIXME
std::cout << "diff on " << msc_file1 << " and " << msc_file2 << std::endl;
+
+
+
+
return 0;
}
@@ -314,8 +368,82 @@
std::cout << " " << *i;
}
}
- std::cout << std::endl;
- return 0;
+ std::cout<<std::endl;
+
+ std::vector<std::wstring> focused_instances;
+
+ for (std::list<std::string>::iterator i = instances.begin(); i != instances.end(); ++i)
+ {
+ std::string s = *i;
+ std::wstring temp(s.length(),L' ');
+ std::copy(s.begin(), s.end(), temp.begin());
+
+ focused_instances.push_back(temp);
+ }
+
+ Z120 z120;
+
+ StreamReportPrinter printer(std::wcerr);
+ z120.set_printer(&printer);
+
+ int errors = 0;
+
+ std::vector<MscPtr> msc;
+ std::vector<MscPtr> msc_b;
+
+ try
+ {
+ msc = z120.load_msc(specification);
+ }
+ catch(std::exception& exc)
+ {
+ std::wcerr << "EXCEPTION: " << exc.what() << std::endl;
+ }
+
+ try
+ {
+ msc_b = z120.load_msc(flow);
+ }
+ catch(std::exception& exc)
+ {
+ std::wcerr << "EXCEPTION: " << exc.what() << std::endl;
+ }
+
+ MembershipAlg mem;
+ mem.set_printer(&printer);
+
+ if(msc_b.size() != 1 || msc_b[0] == NULL)
+ throw std::runtime_error("Error: Unexpected behaviour");
+
+ BMscPtr bmsc = boost::dynamic_pointer_cast<BMsc>(msc_b[0]);
+
+ if(bmsc == NULL)
+ throw std::runtime_error("Error: Flow typecasting failed");
+
+ std::vector<SearcherResultPtr> result;
+ std::vector<MscPtr> bmscs;
+ bmscs.push_back(bmsc);
+
+ if(focused_instances.empty())
+ result = mem.find(msc[0], bmscs);
+ else
+ result = mem.find(msc[0], bmscs, focused_instances);
+
+ if(!result.empty())
+ {
+ std::vector<SearcherResultPtr>::iterator vec_it;
+
+ for(vec_it = result.begin(); vec_it != result.end(); vec_it++)
+ {
+ std::wcerr << (*vec_it)->get_msg() << std::endl;
+ for(unsigned int i = 0; i < (*vec_it)->get_counterexamples().size(); i++)
+ {
+ z120.save_msc(std::cout, TOWSTRING(specification), (*vec_it)->get_counterexamples().at(i));
+ }
+ }
+ }
+
+ return errors;
}
Modified: trunk/tests/tightening_tests/tighten_test.cpp
===================================================================
--- trunk/tests/tightening_tests/tighten_test.cpp 2012-03-20 06:16:45 UTC (rev 1350)
+++ trunk/tests/tightening_tests/tighten_test.cpp 2012-03-21 13:54:31 UTC (rev 1351)
@@ -82,7 +82,6 @@
if(result == NULL)
{
- std::wcerr << "result was null" << std::endl;
if(satisfied)
{
std::wcerr << "ERROR: tightening algorithm failed" << std::endl;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2012-03-27 15:09:52
|
Revision: 1356
http://scstudio.svn.sourceforge.net/scstudio/?rev=1356&view=rev
Author: madzin
Date: 2012-03-27 15:09:39 +0000 (Tue, 27 Mar 2012)
Log Message:
-----------
Add pcap library and test file.
Modified Paths:
--------------
trunk/FindPCAP.cmake
trunk/src/data/pcap/CMakeLists.txt
trunk/src/data/pcap/pcap_load.cpp
trunk/tests/CMakeLists.txt
Added Paths:
-----------
trunk/tests/pcap/
trunk/tests/pcap/CMakeLists.txt
trunk/tests/pcap/pcap_test.cpp
trunk/third-party-sw/pcap/
trunk/third-party-sw/pcap/bluetooth.h
trunk/third-party-sw/pcap/bpf.h
trunk/third-party-sw/pcap/ipnet.h
trunk/third-party-sw/pcap/lib/
trunk/third-party-sw/pcap/lib/libpcap.a
trunk/third-party-sw/pcap/lib/libpcap.so
trunk/third-party-sw/pcap/lib/libpcap.so.0.8
trunk/third-party-sw/pcap/lib/libpcap.so.1.1.1
trunk/third-party-sw/pcap/namedb.h
trunk/third-party-sw/pcap/pcap.h
trunk/third-party-sw/pcap/sll.h
trunk/third-party-sw/pcap/usb.h
trunk/third-party-sw/pcap/vlan.h
Modified: trunk/FindPCAP.cmake
===================================================================
--- trunk/FindPCAP.cmake 2012-03-23 02:28:45 UTC (rev 1355)
+++ trunk/FindPCAP.cmake 2012-03-27 15:09:39 UTC (rev 1356)
@@ -1,18 +1,19 @@
# set the default PCAP_ROOT value
IF(NOT PCAP_ROOT)
+ SET(PCAP_ROOT "${CMAKE_SOURCE_DIR}/third-party-sw/pcap" CACHE PATH "The LPSOLVE directory root.")
SET(PCAP_ROOT $ENV{PCAP_ROOT} CACHE PATH "The PCAP directory root.")
ENDIF(NOT PCAP_ROOT)
FIND_LIBRARY(PCAP_LIBRARY
- NAMES wpcap
+ NAMES pcap
PATHS
- ${PCAP_ROOT}/Lib
+ ${PCAP_ROOT}/lib
DOC "The PCAP library")
FIND_PATH(PCAP_INCLUDE_DIR
NAMES pcap.h
PATHS
- ${PCAP_ROOT}/Include
+ ${PCAP_ROOT}
DOC "The PCAP include files")
INCLUDE(FindPackageHandleStandardArgs)
Modified: trunk/src/data/pcap/CMakeLists.txt
===================================================================
--- trunk/src/data/pcap/CMakeLists.txt 2012-03-23 02:28:45 UTC (rev 1355)
+++ trunk/src/data/pcap/CMakeLists.txt 2012-03-27 15:09:39 UTC (rev 1356)
@@ -7,16 +7,15 @@
module.cpp
pcap_load.h
pcap_load.cpp
- arp.cpp
- ethernet.cpp
- icmp.cpp
- ip.cpp
- tcp.cpp
- udp.cpp
+# arp.cpp
+# ethernet.cpp
+# icmp.cpp
+# ip.cpp
+# tcp.cpp
+# udp.cpp
)
TARGET_LINK_LIBRARIES(scpcap
scmsc
${PCAP_LIBRARY}
- ws2_32.lib
)
Modified: trunk/src/data/pcap/pcap_load.cpp
===================================================================
--- trunk/src/data/pcap/pcap_load.cpp 2012-03-23 02:28:45 UTC (rev 1355)
+++ trunk/src/data/pcap/pcap_load.cpp 2012-03-27 15:09:39 UTC (rev 1356)
@@ -28,6 +28,12 @@
std::vector<MscPtr> result;
int res;
+ MscPtr msc = new BMsc(L"name");
+
+ std::cout << "Hello, Here I am!!! at PCAP load function" << std::endl;
+ std::wcout << msc->get_label() << std::endl;
+ return result;
+
pcap_t *fp;
char errbuf[PCAP_ERRBUF_SIZE];
// open the capture file
@@ -40,7 +46,9 @@
struct pcap_pkthdr *header;
const u_char *pkt_data;
+
// inspect all packets in the file
+/*
while((res = pcap_next_ex(fp, &header, &pkt_data)) >= 0)
{
PacketDataUnit packet;
@@ -51,7 +59,7 @@
inspect_ethernet(packet);
}
-
+*/
if(res == -1)
{
print_report(RS_ERROR,
Modified: trunk/tests/CMakeLists.txt
===================================================================
--- trunk/tests/CMakeLists.txt 2012-03-23 02:28:45 UTC (rev 1355)
+++ trunk/tests/CMakeLists.txt 2012-03-27 15:09:39 UTC (rev 1356)
@@ -142,6 +142,9 @@
ADD_SUBDIRECTORY(diff)
+IF(BUILD_PCAP)
+ ADD_SUBDIRECTORY(pcap)
+ENDIF(BUILD_PCAP)
SET(TIGHTEN_SEQUENCE 0)
MACRO(ADD_TIGHTEN_TEST FILE SATISFIED)
Added: trunk/tests/pcap/CMakeLists.txt
===================================================================
--- trunk/tests/pcap/CMakeLists.txt (rev 0)
+++ trunk/tests/pcap/CMakeLists.txt 2012-03-27 15:09:39 UTC (rev 1356)
@@ -0,0 +1,29 @@
+FIND_PACKAGE(PythonInterp REQUIRED)
+
+ADD_EXECUTABLE(pcap_test
+ pcap_test.cpp
+)
+
+TARGET_LINK_LIBRARIES(pcap_test
+ scpcap
+ scpseudocode
+ scmsc
+ scZ120
+)
+
+#GET_TARGET_PROPERTY(MEMBERSHIP_TEST_EXECUTABLE membership_test LOCATION)
+# Replace the "$(IntDir)", "$(OutDir)", or "$(CONFIGURATION)"
+# depending on the generator being used with the test-time variable.
+#STRING(REGEX REPLACE "\\$\\(.*\\)" "\${CTEST_CONFIGURATION_TYPE}"
+# MEMBERSHIP_TEST_EXECUTABLE "")
+
+#partial membership
+#ADD_TEST("membership_test-0-partial_mem_easy_pat1.mpr"
+# ${PYTHON_EXECUTABLE} "${CMAKE_SOURCE_DIR}/tests/membership/membership_diff.py"
+# "./membership_test" "${CMAKE_CURRENT_SOURCE_DIR}/partial_mem_easy.mpr"
+# "${CMAKE_CURRENT_SOURCE_DIR}/partial_mem_easy_pat1.mpr" 1 "A")
+
+#ADD_MEMBER_TEST(test_hmsc01.mpr test_bmsc01.mpr 1)
+#ADD_MEMBER_TEST(test_hmsc02.mpr test_bmsc02.mpr 0)
+#ADD_MEMBER_TEST(test_hmsc03.mpr test_bmsc03.mpr 1)
+#ADD_MEMBER_TEST(test_hmsc04.mpr test_bmsc04.mpr 0)
Added: trunk/tests/pcap/pcap_test.cpp
===================================================================
--- trunk/tests/pcap/pcap_test.cpp (rev 0)
+++ trunk/tests/pcap/pcap_test.cpp 2012-03-27 15:09:39 UTC (rev 1356)
@@ -0,0 +1,110 @@
+/*
+ * scstudio - Sequence Chart Studio
+ * http://scstudio.sourceforge.net
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * Copyright (c) 2009 Petr Gotthard <pet...@ce...>
+ *
+ * $Id: z120_test.cpp 1274 2012-01-10 15:49:30Z lkorenciak $
+ */
+
+#include <string.h>
+#include <iostream>
+
+#include "data/Z120/z120.h"
+#include "data/pcap/pcap_load.h"
+
+char* extract_filename(char* filename)
+{
+ char *last_name = filename;
+ char *last_dot = NULL;
+
+ for(char *pos = filename; *pos != '\0'; pos++)
+ {
+ if(*pos == '.')
+ last_dot = pos;
+ else if(*pos == '\\' || *pos == '/')
+ last_name = pos+1;
+ }
+
+ if(last_dot != NULL)
+ *last_dot = '\0'; // strip the extension
+
+ return last_name;
+}
+
+int main(int argc, char** argv)
+{
+ if(argc < 3)
+ {
+ std::wcerr << "Usage: " << argv[0] << " <filename> <satisfied>" << std::endl;
+ return 1;
+ }
+
+ Pcap pcap;
+ Z120 z120;
+
+ StreamReportPrinter printer(std::wcerr);
+ z120.set_printer(&printer);
+
+ int errors = 0;
+
+ char *endptr;
+ int satisfied = strtol(argv[2], &endptr, 10);
+ if(*argv[2] == '\0' || *endptr != '\0')
+ {
+ std::wcerr << "ERROR: Not a boolean value: " << argv[2] << std::endl;
+ return 1;
+ }
+
+ std::vector<MscPtr> msc = pcap.load_msc(argv[1]);
+
+ char *path = strdup(argv[1]);
+ char *filename = extract_filename(path);
+
+ if(!msc.empty())
+ {
+ if(satisfied)
+ std::cout << "OK: " << filename << " is correct, should be correct" << std::endl;
+ else
+ {
+ std::wcerr << "ERROR: " << filename << " is correct, should NOT be correct" << std::endl;
+ errors = 1;
+ }
+
+ std::cout << std::endl;
+
+ try
+ {
+ z120.save_msc(std::cout, TOWSTRING(filename), msc[0], msc);
+ }
+ catch(std::exception& exc)
+ {
+ std::wcerr << "EXCEPTION: Cannot save the document: " << exc.what() << std::endl;
+ errors = 1;
+ }
+ }
+ else
+ {
+ if(satisfied)
+ {
+ std::wcerr << "ERROR: Syntax error in " << filename << ", should NOT be erroneous" << std::endl;
+ errors = 1;
+ }
+ else
+ std::cout << "OK: Syntax error in " << filename << ", should be erroneous" << std::endl;
+ }
+
+ free(path);
+// free(filename);
+ return errors;
+}
+
Added: trunk/third-party-sw/pcap/bluetooth.h
===================================================================
--- trunk/third-party-sw/pcap/bluetooth.h (rev 0)
+++ trunk/third-party-sw/pcap/bluetooth.h 2012-03-27 15:09:39 UTC (rev 1356)
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2006 Paolo Abeni (Italy)
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote
+ * products derived from this software without specific prior written
+ * permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * bluetooth data struct
+ * By Paolo Abeni <pao...@em...>
+ *
+ * @(#) $Header: /tcpdump/master/libpcap/pcap/bluetooth.h,v 1.1 2007-09-22 02:10:17 guy Exp $
+ */
+
+#ifndef _PCAP_BLUETOOTH_STRUCTS_H__
+#define _PCAP_BLUETOOTH_STRUCTS_H__
+
+/*
+ * Header prepended libpcap to each bluetooth h:4 frame.
+ * fields are in network byte order
+ */
+typedef struct _pcap_bluetooth_h4_header {
+ u_int32_t direction; /* if first bit is set direction is incoming */
+} pcap_bluetooth_h4_header;
+
+
+#endif
Added: trunk/third-party-sw/pcap/bpf.h
===================================================================
--- trunk/third-party-sw/pcap/bpf.h (rev 0)
+++ trunk/third-party-sw/pcap/bpf.h 2012-03-27 15:09:39 UTC (rev 1356)
@@ -0,0 +1,1072 @@
+/*-
+ * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from the Stanford/CMU enet packet filter,
+ * (net/enet.c) distributed as part of 4.3BSD, and code contributed
+ * to Berkeley by Steven McCanne and Van Jacobson both of Lawrence
+ * Berkeley Laboratory.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * @(#)bpf.h 7.1 (Berkeley) 5/7/91
+ *
+ * @(#) $Header: /tcpdump/master/libpcap/pcap/bpf.h,v 1.32 2008-12-23 20:13:29 guy Exp $ (LBL)
+ */
+
+/*
+ * This is libpcap's cut-down version of bpf.h; it includes only
+ * the stuff needed for the code generator and the userland BPF
+ * interpreter, and the libpcap APIs for setting filters, etc..
+ *
+ * "pcap-bpf.c" will include the native OS version, as it deals with
+ * the OS's BPF implementation.
+ *
+ * XXX - should this all just be moved to "pcap.h"?
+ */
+
+#ifndef BPF_MAJOR_VERSION
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* BSD style release date */
+#define BPF_RELEASE 199606
+
+#ifdef MSDOS /* must be 32-bit */
+typedef long bpf_int32;
+typedef unsigned long bpf_u_int32;
+#else
+typedef int bpf_int32;
+typedef u_int bpf_u_int32;
+#endif
+
+/*
+ * Alignment macros. BPF_WORDALIGN rounds up to the next
+ * even multiple of BPF_ALIGNMENT.
+ */
+#ifndef __NetBSD__
+#define BPF_ALIGNMENT sizeof(bpf_int32)
+#else
+#define BPF_ALIGNMENT sizeof(long)
+#endif
+#define BPF_WORDALIGN(x) (((x)+(BPF_ALIGNMENT-1))&~(BPF_ALIGNMENT-1))
+
+#define BPF_MAXBUFSIZE 0x8000
+#define BPF_MINBUFSIZE 32
+
+/*
+ * Structure for "pcap_compile()", "pcap_setfilter()", etc..
+ */
+struct bpf_program {
+ u_int bf_len;
+ struct bpf_insn *bf_insns;
+};
+
+/*
+ * Struct return by BIOCVERSION. This represents the version number of
+ * the filter language described by the instruction encodings below.
+ * bpf understands a program iff kernel_major == filter_major &&
+ * kernel_minor >= filter_minor, that is, if the value returned by the
+ * running kernel has the same major number and a minor number equal
+ * equal to or less than the filter being downloaded. Otherwise, the
+ * results are undefined, meaning an error may be returned or packets
+ * may be accepted haphazardly.
+ * It has nothing to do with the source code version.
+ */
+struct bpf_version {
+ u_short bv_major;
+ u_short bv_minor;
+};
+/* Current version number of filter architecture. */
+#define BPF_MAJOR_VERSION 1
+#define BPF_MINOR_VERSION 1
+
+/*
+ * Data-link level type codes.
+ *
+ * Do *NOT* add new values to this list without asking
+ * "tcp...@li..." for a value. Otherwise, you run
+ * the risk of using a value that's already being used for some other
+ * purpose, and of having tools that read libpcap-format captures not
+ * being able to handle captures with your new DLT_ value, with no hope
+ * that they will ever be changed to do so (as that would destroy their
+ * ability to read captures using that value for that other purpose).
+ */
+
+/*
+ * These are the types that are the same on all platforms, and that
+ * have been defined by <net/bpf.h> for ages.
+ */
+#define DLT_NULL 0 /* BSD loopback encapsulation */
+#define DLT_EN10MB 1 /* Ethernet (10Mb) */
+#define DLT_EN3MB 2 /* Experimental Ethernet (3Mb) */
+#define DLT_AX25 3 /* Amateur Radio AX.25 */
+#define DLT_PRONET 4 /* Proteon ProNET Token Ring */
+#define DLT_CHAOS 5 /* Chaos */
+#define DLT_IEEE802 6 /* 802.5 Token Ring */
+#define DLT_ARCNET 7 /* ARCNET, with BSD-style header */
+#define DLT_SLIP 8 /* Serial Line IP */
+#define DLT_PPP 9 /* Point-to-point Protocol */
+#define DLT_FDDI 10 /* FDDI */
+
+/*
+ * These are types that are different on some platforms, and that
+ * have been defined by <net/bpf.h> for ages. We use #ifdefs to
+ * detect the BSDs that define them differently from the traditional
+ * libpcap <net/bpf.h>
+ *
+ * XXX - DLT_ATM_RFC1483 is 13 in BSD/OS, and DLT_RAW is 14 in BSD/OS,
+ * but I don't know what the right #define is for BSD/OS.
+ */
+#define DLT_ATM_RFC1483 11 /* LLC-encapsulated ATM */
+
+#ifdef __OpenBSD__
+#define DLT_RAW 14 /* raw IP */
+#else
+#define DLT_RAW 12 /* raw IP */
+#endif
+
+/*
+ * Given that the only OS that currently generates BSD/OS SLIP or PPP
+ * is, well, BSD/OS, arguably everybody should have chosen its values
+ * for DLT_SLIP_BSDOS and DLT_PPP_BSDOS, which are 15 and 16, but they
+ * didn't. So it goes.
+ */
+#if defined(__NetBSD__) || defined(__FreeBSD__)
+#ifndef DLT_SLIP_BSDOS
+#define DLT_SLIP_BSDOS 13 /* BSD/OS Serial Line IP */
+#define DLT_PPP_BSDOS 14 /* BSD/OS Point-to-point Protocol */
+#endif
+#else
+#define DLT_SLIP_BSDOS 15 /* BSD/OS Serial Line IP */
+#define DLT_PPP_BSDOS 16 /* BSD/OS Point-to-point Protocol */
+#endif
+
+/*
+ * 17 is used for DLT_OLD_PFLOG in OpenBSD;
+ * OBSOLETE: DLT_PFLOG is 117 in OpenBSD now as well. See below.
+ * 18 is used for DLT_PFSYNC in OpenBSD; don't use it for anything else.
+ */
+
+#define DLT_ATM_CLIP 19 /* Linux Classical-IP over ATM */
+
+/*
+ * Apparently Redback uses this for its SmartEdge 400/800. I hope
+ * nobody else decided to use it, too.
+ */
+#define DLT_REDBACK_SMARTEDGE 32
+
+/*
+ * These values are defined by NetBSD; other platforms should refrain from
+ * using them for other purposes, so that NetBSD savefiles with link
+ * types of 50 or 51 can be read as this type on all platforms.
+ */
+#define DLT_PPP_SERIAL 50 /* PPP over serial with HDLC encapsulation */
+#define DLT_PPP_ETHER 51 /* PPP over Ethernet */
+
+/*
+ * The Axent Raptor firewall - now the Symantec Enterprise Firewall - uses
+ * a link-layer type of 99 for the tcpdump it supplies. The link-layer
+ * header has 6 bytes of unknown data, something that appears to be an
+ * Ethernet type, and 36 bytes that appear to be 0 in at least one capture
+ * I've seen.
+ */
+#define DLT_SYMANTEC_FIREWALL 99
+
+/*
+ * Values between 100 and 103 are used in capture file headers as
+ * link-layer types corresponding to DLT_ types that differ
+ * between platforms; don't use those values for new DLT_ new types.
+ */
+
+/*
+ * This value was defined by libpcap 0.5; platforms that have defined
+ * it with a different value should define it here with that value -
+ * a link type of 104 in a save file will be mapped to DLT_C_HDLC,
+ * whatever value that happens to be, so programs will correctly
+ * handle files with that link type regardless of the value of
+ * DLT_C_HDLC.
+ *
+ * The name DLT_C_HDLC was used by BSD/OS; we use that name for source
+ * compatibility with programs written for BSD/OS.
+ *
+ * libpcap 0.5 defined it as DLT_CHDLC; we define DLT_CHDLC as well,
+ * for source compatibility with programs written for libpcap 0.5.
+ */
+#define DLT_C_HDLC 104 /* Cisco HDLC */
+#define DLT_CHDLC DLT_C_HDLC
+
+#define DLT_IEEE802_11 105 /* IEEE 802.11 wireless */
+
+/*
+ * 106 is reserved for Linux Classical IP over ATM; it's like DLT_RAW,
+ * except when it isn't. (I.e., sometimes it's just raw IP, and
+ * sometimes it isn't.) We currently handle it as DLT_LINUX_SLL,
+ * so that we don't have to worry about the link-layer header.)
+ */
+
+/*
+ * Frame Relay; BSD/OS has a DLT_FR with a value of 11, but that collides
+ * with other values.
+ * DLT_FR and DLT_FRELAY packets start with the Q.922 Frame Relay header
+ * (DLCI, etc.).
+ */
+#define DLT_FRELAY 107
+
+/*
+ * OpenBSD DLT_LOOP, for loopback devices; it's like DLT_NULL, except
+ * that the AF_ type in the link-layer header is in network byte order.
+ *
+ * DLT_LOOP is 12 in OpenBSD, but that's DLT_RAW in other OSes, so
+ * we don't use 12 for it in OSes other than OpenBSD.
+ */
+#ifdef __OpenBSD__
+#define DLT_LOOP 12
+#else
+#define DLT_LOOP 108
+#endif
+
+/*
+ * Encapsulated packets for IPsec; DLT_ENC is 13 in OpenBSD, but that's
+ * DLT_SLIP_BSDOS in NetBSD, so we don't use 13 for it in OSes other
+ * than OpenBSD.
+ */
+#ifdef __OpenBSD__
+#define DLT_ENC 13
+#else
+#define DLT_ENC 109
+#endif
+
+/*
+ * Values between 110 and 112 are reserved for use in capture file headers
+ * as link-layer types corresponding to DLT_ types that might differ
+ * between platforms; don't use those values for new DLT_ types
+ * other than the corresponding DLT_ types.
+ */
+
+/*
+ * This is for Linux cooked sockets.
+ */
+#define DLT_LINUX_SLL 113
+
+/*
+ * Apple LocalTalk hardware.
+ */
+#define DLT_LTALK 114
+
+/*
+ * Acorn Econet.
+ */
+#define DLT_ECONET 115
+
+/*
+ * Reserved for use with OpenBSD ipfilter.
+ */
+#define DLT_IPFILTER 116
+
+/*
+ * OpenBSD DLT_PFLOG; DLT_PFLOG is 17 in OpenBSD, but that's DLT_LANE8023
+ * in SuSE 6.3, so we can't use 17 for it in capture-file headers.
+ *
+ * XXX: is there a conflict with DLT_PFSYNC 18 as well?
+ */
+#ifdef __OpenBSD__
+#define DLT_OLD_PFLOG 17
+#define DLT_PFSYNC 18
+#endif
+#define DLT_PFLOG 117
+
+/*
+ * Registered for Cisco-internal use.
+ */
+#define DLT_CISCO_IOS 118
+
+/*
+ * For 802.11 cards using the Prism II chips, with a link-layer
+ * header including Prism monitor mode information plus an 802.11
+ * header.
+ */
+#define DLT_PRISM_HEADER 119
+
+/*
+ * Reserved for Aironet 802.11 cards, with an Aironet link-layer header
+ * (see Doug Ambrisko's FreeBSD patches).
+ */
+#define DLT_AIRONET_HEADER 120
+
+/*
+ * Reserved for Siemens HiPath HDLC.
+ */
+#define DLT_HHDLC 121
+
+/*
+ * This is for RFC 2625 IP-over-Fibre Channel.
+ *
+ * This is not for use with raw Fibre Channel, where the link-layer
+ * header starts with a Fibre Channel frame header; it's for IP-over-FC,
+ * where the link-layer header starts with an RFC 2625 Network_Header
+ * field.
+ */
+#define DLT_IP_OVER_FC 122
+
+/*
+ * This is for Full Frontal ATM on Solaris with SunATM, with a
+ * pseudo-header followed by an AALn PDU.
+ *
+ * There may be other forms of Full Frontal ATM on other OSes,
+ * with different pseudo-headers.
+ *
+ * If ATM software returns a pseudo-header with VPI/VCI information
+ * (and, ideally, packet type information, e.g. signalling, ILMI,
+ * LANE, LLC-multiplexed traffic, etc.), it should not use
+ * DLT_ATM_RFC1483, but should get a new DLT_ value, so tcpdump
+ * and the like don't have to infer the presence or absence of a
+ * pseudo-header and the form of the pseudo-header.
+ */
+#define DLT_SUNATM 123 /* Solaris+SunATM */
+
+/*
+ * Reserved as per request from Kent Dahlgren <ke...@pr...>
+ * for private use.
+ */
+#define DLT_RIO 124 /* RapidIO */
+#define DLT_PCI_EXP 125 /* PCI Express */
+#define DLT_AURORA 126 /* Xilinx Aurora link layer */
+
+/*
+ * Header for 802.11 plus a number of bits of link-layer information
+ * including radio information, used by some recent BSD drivers as
+ * well as the madwifi Atheros driver for Linux.
+ */
+#define DLT_IEEE802_11_RADIO 127 /* 802.11 plus radiotap radio header */
+
+/*
+ * Reserved for the TZSP encapsulation, as per request from
+ * Chris Waters <chr...@ne...>
+ * TZSP is a generic encapsulation for any other link type,
+ * which includes a means to include meta-information
+ * with the packet, e.g. signal strength and channel
+ * for 802.11 packets.
+ */
+#define DLT_TZSP 128 /* Tazmen Sniffer Protocol */
+
+/*
+ * BSD's ARCNET headers have the source host, destination host,
+ * and type at the beginning of the packet; that's what's handed
+ * up to userland via BPF.
+ *
+ * Linux's ARCNET headers, however, have a 2-byte offset field
+ * between the host IDs and the type; that's what's handed up
+ * to userland via PF_PACKET sockets.
+ *
+ * We therefore have to have separate DLT_ values for them.
+ */
+#define DLT_ARCNET_LINUX 129 /* ARCNET */
+
+/*
+ * Juniper-private data link types, as per request from
+ * Hannes Gredler <ha...@ju...>. The DLT_s are used
+ * for passing on chassis-internal metainformation such as
+ * QOS profiles, etc..
+ */
+#define DLT_JUNIPER_MLPPP 130
+#define DLT_JUNIPER_MLFR 131
+#define DLT_JUNIPER_ES 132
+#define DLT_JUNIPER_GGSN 133
+#define DLT_JUNIPER_MFR 134
+#define DLT_JUNIPER_ATM2 135
+#define DLT_JUNIPER_SERVICES 136
+#define DLT_JUNIPER_ATM1 137
+
+/*
+ * Apple IP-over-IEEE 1394, as per a request from Dieter Siegmund
+ * <di...@ap...>. The header that's presented is an Ethernet-like
+ * header:
+ *
+ * #define FIREWIRE_EUI64_LEN 8
+ * struct firewire_header {
+ * u_char firewire_dhost[FIREWIRE_EUI64_LEN];
+ * u_char firewire_shost[FIREWIRE_EUI64_LEN];
+ * u_short firewire_type;
+ * };
+ *
+ * with "firewire_type" being an Ethernet type value, rather than,
+ * for example, raw GASP frames being handed up.
+ */
+#define DLT_APPLE_IP_OVER_IEEE1394 138
+
+/*
+ * Various SS7 encapsulations, as per a request from Jeff Morriss
+ * <jeff.morriss[AT]ulticom.com> and subsequent discussions.
+ */
+#define DLT_MTP2_WITH_PHDR 139 /* pseudo-header with various info, followed by MTP2 */
+#define DLT_MTP2 140 /* MTP2, without pseudo-header */
+#define DLT_MTP3 141 /* MTP3, without pseudo-header or MTP2 */
+#define DLT_SCCP 142 /* SCCP, without pseudo-header or MTP2 or MTP3 */
+
+/*
+ * DOCSIS MAC frames.
+ */
+#define DLT_DOCSIS 143
+
+/*
+ * Linux-IrDA packets. Protocol defined at http://www.irda.org.
+ * Those packets include IrLAP headers and above (IrLMP...), but
+ * don't include Phy framing (SOF/EOF/CRC & byte stuffing), because Phy
+ * framing can be handled by the hardware and depend on the bitrate.
+ * This is exactly the format you would get capturing on a Linux-IrDA
+ * interface (irdaX), but not on a raw serial port.
+ * Note the capture is done in "Linux-cooked" mode, so each packet include
+ * a fake packet header (struct sll_header). This is because IrDA packet
+ * decoding is dependant on the direction of the packet (incomming or
+ * outgoing).
+ * When/if other platform implement IrDA capture, we may revisit the
+ * issue and define a real DLT_IRDA...
+ * Jean II
+ */
+#define DLT_LINUX_IRDA 144
+
+/*
+ * Reserved for IBM SP switch and IBM Next Federation switch.
+ */
+#define DLT_IBM_SP 145
+#define DLT_IBM_SN 146
+
+/*
+ * Reserved for private use. If you have some link-layer header type
+ * that you want to use within your organization, with the capture files
+ * using that link-layer header type not ever be sent outside your
+ * organization, you can use these values.
+ *
+ * No libpcap release will use these for any purpose, nor will any
+ * tcpdump release use them, either.
+ *
+ * Do *NOT* use these in capture files that you expect anybody not using
+ * your private versions of capture-file-reading tools to read; in
+ * particular, do *NOT* use them in products, otherwise you may find that
+ * people won't be able to use tcpdump, or snort, or Ethereal, or... to
+ * read capture files from your firewall/intrusion detection/traffic
+ * monitoring/etc. appliance, or whatever product uses that DLT_ value,
+ * and you may also find that the developers of those applications will
+ * not accept patches to let them read those files.
+ *
+ * Also, do not use them if somebody might send you a capture using them
+ * for *their* private type and tools using them for *your* private type
+ * would have to read them.
+ *
+ * Instead, ask "tcp...@li..." for a new DLT_ value,
+ * as per the comment above, and use the type you're given.
+ */
+#define DLT_USER0 147
+#define DLT_USER1 148
+#define DLT_USER2 149
+#define DLT_USER3 150
+#define DLT_USER4 151
+#define DLT_USER5 152
+#define DLT_USER6 153
+#define DLT_USER7 154
+#define DLT_USER8 155
+#define DLT_USER9 156
+#define DLT_USER10 157
+#define DLT_USER11 158
+#define DLT_USER12 159
+#define DLT_USER13 160
+#define DLT_USER14 161
+#define DLT_USER15 162
+
+/*
+ * For future use with 802.11 captures - defined by AbsoluteValue
+ * Systems to store a number of bits of link-layer information
+ * including radio information:
+ *
+ * http://www.shaftnet.org/~pizza/software/capturefrm.txt
+ *
+ * but it might be used by some non-AVS drivers now or in the
+ * future.
+ */
+#define DLT_IEEE802_11_RADIO_AVS 163 /* 802.11 plus AVS radio header */
+
+/*
+ * Juniper-private data link type, as per request from
+ * Hannes Gredler <ha...@ju...>. The DLT_s are used
+ * for passing on chassis-internal metainformation such as
+ * QOS profiles, etc..
+ */
+#define DLT_JUNIPER_MONITOR 164
+
+/*
+ * Reserved for BACnet MS/TP.
+ */
+#define DLT_BACNET_MS_TP 165
+
+/*
+ * Another PPP variant as per request from Karsten Keil <kk...@su...>.
+ *
+ * This is used in some OSes to allow a kernel socket filter to distinguish
+ * between incoming and outgoing packets, on a socket intended to
+ * supply pppd with outgoing packets so it can do dial-on-demand and
+ * hangup-on-lack-of-demand; incoming packets are filtered out so they
+ * don't cause pppd to hold the connection up (you don't want random
+ * input packets such as port scans, packets from old lost connections,
+ * etc. to force the connection to stay up).
+ *
+ * The first byte of the PPP header (0xff03) is modified to accomodate
+ * the direction - 0x00 = IN, 0x01 = OUT.
+ */
+#define DLT_PPP_PPPD 166
+
+/*
+ * Names for backwards compatibility with older versions of some PPP
+ * software; new software should use DLT_PPP_PPPD.
+ */
+#define DLT_PPP_WITH_DIRECTION DLT_PPP_PPPD
+#define DLT_LINUX_PPP_WITHDIRECTION DLT_PPP_PPPD
+
+/*
+ * Juniper-private data link type, as per request from
+ * Hannes Gredler <ha...@ju...>. The DLT_s are used
+ * for passing on chassis-internal metainformation such as
+ * QOS profiles, cookies, etc..
+ */
+#define DLT_JUNIPER_PPPOE 167
+#define DLT_JUNIPER_PPPOE_ATM 168
+
+#define DLT_GPRS_LLC 169 /* GPRS LLC */
+#define DLT_GPF_T 170 /* GPF-T (ITU-T G.7041/Y.1303) */
+#define DLT_GPF_F 171 /* GPF-F (ITU-T G.7041/Y.1303) */
+
+/*
+ * Requested by Oolan Zimmer <oz...@gc...> for use in Gcom's T1/E1 line
+ * monitoring equipment.
+ */
+...
[truncated message content] |
|
From: <Xb...@us...> - 2012-04-17 14:29:16
|
Revision: 1384
http://scstudio.svn.sourceforge.net/scstudio/?rev=1384&view=rev
Author: Xborza
Date: 2012-04-17 14:29:06 +0000 (Tue, 17 Apr 2012)
Log Message:
-----------
First version of pcap implementation
Modified Paths:
--------------
trunk/src/data/pcap/CMakeLists.txt
trunk/src/data/pcap/pcap_load.cpp
trunk/src/data/pcap/pcap_load.h
trunk/tests/pcap/CMakeLists.txt
trunk/tests/pcap/pcap_test.cpp
Modified: trunk/src/data/pcap/CMakeLists.txt
===================================================================
--- trunk/src/data/pcap/CMakeLists.txt 2012-04-17 13:57:19 UTC (rev 1383)
+++ trunk/src/data/pcap/CMakeLists.txt 2012-04-17 14:29:06 UTC (rev 1384)
@@ -4,6 +4,8 @@
ADD_LIBRARY(scpcap SHARED
export.h
+ pcap_struct.h
+ pcap_struct.cpp
module.cpp
pcap_load.h
pcap_load.cpp
@@ -17,5 +19,6 @@
TARGET_LINK_LIBRARIES(scpcap
scmsc
+ ws2_32
${PCAP_LIBRARY}
)
Modified: trunk/src/data/pcap/pcap_load.cpp
===================================================================
--- trunk/src/data/pcap/pcap_load.cpp 2012-04-17 13:57:19 UTC (rev 1383)
+++ trunk/src/data/pcap/pcap_load.cpp 2012-04-17 14:29:06 UTC (rev 1384)
@@ -19,55 +19,142 @@
// include pcap library
// under Windows WinPcap Developer's Pack http://www.winpcap.org/devel.htm
// under UN*X libpcap http://www.tcpdump.org
-#include <pcap.h>
#include "pcap_load.h"
+
std::vector<MscPtr> Pcap::load_msc(const std::string &filename)
{
- std::vector<MscPtr> result;
- int res;
- MscPtr msc = new BMsc(L"name");
+std::vector<MscPtr> result;
- std::cout << "Hello, Here I am!!! at PCAP load function" << std::endl;
- std::wcout << msc->get_label() << std::endl;
- return result;
+pcap_if_t *alldevs;
+pcap_if_t *d;
+int inum;
+int i=0;
+pcap_t *adhandle;
+char errbuf[PCAP_ERRBUF_SIZE];
+u_int netmask;
+char packet_filter[] = "(ip) and (tcp)";
+struct bpf_program fcode;
- pcap_t *fp;
- char errbuf[PCAP_ERRBUF_SIZE];
- // open the capture file
- if((fp = pcap_open_offline(filename.c_str(), errbuf)) == NULL)
- {
- print_report(RS_ERROR,
- stringize() << "Cannot open file '" << TOWSTRING(filename) << "'.");
- return result;
- }
+ /* Retrieve the device list */
+ if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL, &alldevs, errbuf) == -1)
+ {
+ fprintf(stderr,"Error in pcap_findalldevs: %s\n", errbuf);
+ exit(1);
+ }
+
+ /* Print the list */
+ for(d=alldevs; d; d=d->next)
+ {
+ printf("%d. %s", ++i, d->name);
+ if (d->description)
+ printf(" (%s)\n", d->description);
+ else
+ printf(" (No description available)\n");
+ }
- struct pcap_pkthdr *header;
- const u_char *pkt_data;
+ if(i==0)
+ {
+ printf("\nNo interfaces found! Make sure WinPcap is installed.\n");
+ return result;
+ }
+
+ printf("Enter the interface number (1-%d) or press 0 choose offline mode:",i);
+ scanf_s("%d", &inum);
+
+ if(inum < 0 || inum > i)
+ {
+ printf("\nInterface number out of range.\n");
+ /* Free the device list */
+ pcap_freealldevs(alldevs);
+ return result;
+ }
- // inspect all packets in the file
-/*
- while((res = pcap_next_ex(fp, &header, &pkt_data)) >= 0)
- {
- PacketDataUnit packet;
- packet.time_sent = packet.time_received =
- header->ts.tv_sec + header->ts.tv_usec / 1000000;
- packet.length = header->caplen;
- packet.data = pkt_data;
+ if(inum != 0){ // online mode
- inspect_ethernet(packet);
- }
-*/
- if(res == -1)
- {
- print_report(RS_ERROR,
- stringize() << "Error reading the packets: '" << pcap_geterr(fp));
- }
+ /* Jump to the selected adapter */
+ for(d=alldevs, i=0; i< inum-1 ;d=d->next, i++);
+
+ /* Open the adapter */
+ if ( (adhandle= pcap_open(d->name, // name of the device
+ 65536, // portion of the packet to capture.
+ // 65536 grants that the whole packet will be captured on all the MACs.
+ PCAP_OPENFLAG_PROMISCUOUS, // promiscuous mode
+ 1000, // read timeout
+ NULL, // remote authentication
+ errbuf // error buffer
+ ) ) == NULL)
+ {
+ fprintf(stderr,"\nUnable to open the adapter. %s is not supported by WinPcap\n");
+ /* Free the device list */
+ pcap_freealldevs(alldevs);
+ return result;
+ }
+ }
+ else{ // OPEN OFFLINE MODE
+ if((adhandle = pcap_open_offline(filename.c_str(),errbuf)) == NULL){
+ std::cout << "ERROR: Cannot open pcap file, wrong name!\n";
+ return result;
+ }
+ }
+
+ /* Check the link layer. We support only Ethernet for simplicity. */
+ if(pcap_datalink(adhandle) != DLT_EN10MB)
+ {
+ fprintf(stderr,"\nThis program works only on Ethernet networks.\n");
+ /* Free the device list */
+ pcap_freealldevs(alldevs);
+ return result;
+ }
+
- pcap_close(fp);
- return result;
+ if(inum != 0 && d->addresses != NULL)
+ /* Retrieve the mask of the first address of the interface */
+ netmask=((struct sockaddr_in *)(d->addresses->netmask))->sin_addr.S_un.S_addr;
+ else
+ /* If the interface is without addresses we suppose to be in a C class network */
+ netmask=0xffffff;
+
+
+ //compile the filter
+ if (pcap_compile(adhandle, &fcode, packet_filter, 1, netmask) <0 )
+ {
+ fprintf(stderr,"\nUnable to compile the packet filter. Check the syntax.\n");
+ /* Free the device list */
+ pcap_freealldevs(alldevs);
+ return result;
+ }
+
+ //set the filter
+ if (pcap_setfilter(adhandle, &fcode)<0)
+ {
+ fprintf(stderr,"\nError setting the filter.\n");
+ /* Free the device list */
+ pcap_freealldevs(alldevs);
+ return result;
+ }
+
+ printf("\nlistening on %s...\n", (inum == 0) ? "OFFLINE" : d->description);
+
+ /* At this point, we don't need any more the device list. Free it */
+ pcap_freealldevs(alldevs);
+
+ /* start the capture */
+
+ PcapContext* pcapCon;
+ pcapCon = new PcapContext();
+
+ handStruct hands;
+ hands.pcap = pcapCon;
+ hands.result = &result;
+
+ pcap_loop(adhandle, 0, packet_handler, (u_char*)&hands);
+
+ result.push_back(hands.pcap->getMsc());
+
+ return result;
}
ImportFormatter::TransformationList Pcap::get_transformations(MscPtr msc) const
@@ -77,4 +164,7 @@
return result;
}
+
+
+
// $Id$
Modified: trunk/src/data/pcap/pcap_load.h
===================================================================
--- trunk/src/data/pcap/pcap_load.h 2012-04-17 13:57:19 UTC (rev 1383)
+++ trunk/src/data/pcap/pcap_load.h 2012-04-17 14:29:06 UTC (rev 1384)
@@ -20,14 +20,21 @@
#define _SCPCAP_PCAP_IMPORT_H_
#ifdef WIN32
-#include <windows.h>
#define uint16_t UINT16
#define uint32_t UINT32
+#include <WinSock2.h>
+#include <Windows.h>
#endif
-#include "data/formatter.h"
+//#include "pcap_struct.h"
+#include <stdio.h>
+
+#define HAVE_REMOTE
+
+#include "pcap_struct.h"
#include "data/pcap/export.h"
+
class SCPCAP_EXPORT Pcap : public Formatter, public ImportFormatter
{
public:
@@ -61,6 +68,6 @@
int inspect_udp(const PacketDataUnit& packet);
};
-#endif /* _SCPCAP_PCAP_IMPORT_H_ */
+#endif _SCPCAP_PCAP_IMPORT_H_
// $Id$
Modified: trunk/tests/pcap/CMakeLists.txt
===================================================================
--- trunk/tests/pcap/CMakeLists.txt 2012-04-17 13:57:19 UTC (rev 1383)
+++ trunk/tests/pcap/CMakeLists.txt 2012-04-17 14:29:06 UTC (rev 1384)
@@ -4,6 +4,8 @@
pcap_test.cpp
)
+INCLUDE_DIRECTORIES(${PCAP_INCLUDE_DIR})
+
TARGET_LINK_LIBRARIES(pcap_test
scpcap
scpseudocode
Modified: trunk/tests/pcap/pcap_test.cpp
===================================================================
--- trunk/tests/pcap/pcap_test.cpp 2012-04-17 13:57:19 UTC (rev 1383)
+++ trunk/tests/pcap/pcap_test.cpp 2012-04-17 14:29:06 UTC (rev 1384)
@@ -15,9 +15,11 @@
*
* $Id: z120_test.cpp 1274 2012-01-10 15:49:30Z lkorenciak $
*/
+#define _WINSOCKAPI_
#include <string.h>
#include <iostream>
+#include <fstream>
#include "data/Z120/z120.h"
#include "data/pcap/pcap_load.h"
@@ -43,12 +45,13 @@
int main(int argc, char** argv)
{
- if(argc < 3)
+ if(argc < 4)
{
- std::wcerr << "Usage: " << argv[0] << " <filename> <satisfied>" << std::endl;
+ std::wcerr << "Usage: " << argv[0] << " <(pcap)filename> <(msc)filename> <satisfied>" << std::endl;
return 1;
}
+ std::ofstream outFile;
Pcap pcap;
Z120 z120;
@@ -58,8 +61,8 @@
int errors = 0;
char *endptr;
- int satisfied = strtol(argv[2], &endptr, 10);
- if(*argv[2] == '\0' || *endptr != '\0')
+ int satisfied = strtol(argv[3], &endptr, 10);
+ if(*argv[3] == '\0' || *endptr != '\0')
{
std::wcerr << "ERROR: Not a boolean value: " << argv[2] << std::endl;
return 1;
@@ -67,9 +70,16 @@
std::vector<MscPtr> msc = pcap.load_msc(argv[1]);
- char *path = strdup(argv[1]);
+ char *path = _strdup(argv[1]);
char *filename = extract_filename(path);
+ char *path2 = _strdup(argv[2]);
+ std::string outmsc;
+ outmsc.append(argv[2]);
+ outmsc.append(".mpr");
+ outFile.open(outmsc);
+
+
if(!msc.empty())
{
if(satisfied)
@@ -84,7 +94,7 @@
try
{
- z120.save_msc(std::cout, TOWSTRING(filename), msc[0], msc);
+ z120.save_msc(outFile, TOWSTRING(filename), msc[0], msc);
}
catch(std::exception& exc)
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <xr...@us...> - 2012-06-01 17:31:12
|
Revision: 1402
http://scstudio.svn.sourceforge.net/scstudio/?rev=1402&view=rev
Author: xrehak
Date: 2012-06-01 17:30:06 +0000 (Fri, 01 Jun 2012)
Log Message:
-----------
Boost libraries included in SVN repository (only for Windows).
Added missing boost_serialization into CMake of pseudocode.
Modified Paths:
--------------
trunk/CMakeLists.txt
trunk/src/check/pseudocode/CMakeLists.txt
trunk/src/view/visio/addon/scstudio.vcproj
Added Paths:
-----------
trunk/third-party-sw/boost/
trunk/third-party-sw/boost/boost/
trunk/third-party-sw/boost/boost/accumulators/
trunk/third-party-sw/boost/boost/accumulators/accumulators.hpp
trunk/third-party-sw/boost/boost/accumulators/accumulators_fwd.hpp
trunk/third-party-sw/boost/boost/accumulators/framework/
trunk/third-party-sw/boost/boost/accumulators/framework/accumulator_base.hpp
trunk/third-party-sw/boost/boost/accumulators/framework/accumulator_concept.hpp
trunk/third-party-sw/boost/boost/accumulators/framework/accumulator_set.hpp
trunk/third-party-sw/boost/boost/accumulators/framework/accumulators/
trunk/third-party-sw/boost/boost/accumulators/framework/accumulators/droppable_accumulator.hpp
trunk/third-party-sw/boost/boost/accumulators/framework/accumulators/external_accumulator.hpp
trunk/third-party-sw/boost/boost/accumulators/framework/accumulators/reference_accumulator.hpp
trunk/third-party-sw/boost/boost/accumulators/framework/accumulators/value_accumulator.hpp
trunk/third-party-sw/boost/boost/accumulators/framework/depends_on.hpp
trunk/third-party-sw/boost/boost/accumulators/framework/external.hpp
trunk/third-party-sw/boost/boost/accumulators/framework/extractor.hpp
trunk/third-party-sw/boost/boost/accumulators/framework/features.hpp
trunk/third-party-sw/boost/boost/accumulators/framework/parameters/
trunk/third-party-sw/boost/boost/accumulators/framework/parameters/accumulator.hpp
trunk/third-party-sw/boost/boost/accumulators/framework/parameters/sample.hpp
trunk/third-party-sw/boost/boost/accumulators/framework/parameters/weight.hpp
trunk/third-party-sw/boost/boost/accumulators/framework/parameters/weights.hpp
trunk/third-party-sw/boost/boost/accumulators/numeric/
trunk/third-party-sw/boost/boost/accumulators/numeric/detail/
trunk/third-party-sw/boost/boost/accumulators/numeric/detail/function1.hpp
trunk/third-party-sw/boost/boost/accumulators/numeric/detail/function2.hpp
trunk/third-party-sw/boost/boost/accumulators/numeric/detail/function3.hpp
trunk/third-party-sw/boost/boost/accumulators/numeric/detail/function4.hpp
trunk/third-party-sw/boost/boost/accumulators/numeric/detail/function_n.hpp
trunk/third-party-sw/boost/boost/accumulators/numeric/detail/pod_singleton.hpp
trunk/third-party-sw/boost/boost/accumulators/numeric/functional/
trunk/third-party-sw/boost/boost/accumulators/numeric/functional/complex.hpp
trunk/third-party-sw/boost/boost/accumulators/numeric/functional/valarray.hpp
trunk/third-party-sw/boost/boost/accumulators/numeric/functional/vector.hpp
trunk/third-party-sw/boost/boost/accumulators/numeric/functional.hpp
trunk/third-party-sw/boost/boost/accumulators/numeric/functional_fwd.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/
trunk/third-party-sw/boost/boost/accumulators/statistics/count.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/covariance.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/density.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/error_of.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/error_of_mean.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/extended_p_square.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/extended_p_square_quantile.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/kurtosis.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/max.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/mean.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/median.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/min.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/moment.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/p_square_cumulative_distribution.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/p_square_quantile.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/parameters/
trunk/third-party-sw/boost/boost/accumulators/statistics/parameters/quantile_probability.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/peaks_over_threshold.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/pot_quantile.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/pot_tail_mean.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/rolling_count.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/rolling_mean.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/rolling_sum.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/rolling_window.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/skewness.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/stats.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/sum.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/sum_kahan.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/tail.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/tail_mean.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/tail_quantile.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/tail_variate.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/tail_variate_means.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/times2_iterator.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/variance.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/variates/
trunk/third-party-sw/boost/boost/accumulators/statistics/variates/covariate.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/weighted_covariance.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/weighted_density.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/weighted_extended_p_square.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/weighted_kurtosis.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/weighted_mean.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/weighted_median.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/weighted_moment.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/weighted_p_square_cumulative_distribution.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/weighted_p_square_quantile.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/weighted_peaks_over_threshold.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/weighted_skewness.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/weighted_sum.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/weighted_sum_kahan.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/weighted_tail_mean.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/weighted_tail_quantile.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/weighted_tail_variate_means.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/weighted_variance.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics/with_error.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics.hpp
trunk/third-party-sw/boost/boost/accumulators/statistics_fwd.hpp
trunk/third-party-sw/boost/boost/algorithm/
trunk/third-party-sw/boost/boost/algorithm/minmax.hpp
trunk/third-party-sw/boost/boost/algorithm/minmax_element.hpp
trunk/third-party-sw/boost/boost/algorithm/string/
trunk/third-party-sw/boost/boost/algorithm/string/case_conv.hpp
trunk/third-party-sw/boost/boost/algorithm/string/classification.hpp
trunk/third-party-sw/boost/boost/algorithm/string/compare.hpp
trunk/third-party-sw/boost/boost/algorithm/string/concept.hpp
trunk/third-party-sw/boost/boost/algorithm/string/config.hpp
trunk/third-party-sw/boost/boost/algorithm/string/constants.hpp
trunk/third-party-sw/boost/boost/algorithm/string/detail/
trunk/third-party-sw/boost/boost/algorithm/string/detail/case_conv.hpp
trunk/third-party-sw/boost/boost/algorithm/string/detail/classification.hpp
trunk/third-party-sw/boost/boost/algorithm/string/detail/find_format.hpp
trunk/third-party-sw/boost/boost/algorithm/string/detail/find_format_all.hpp
trunk/third-party-sw/boost/boost/algorithm/string/detail/find_format_store.hpp
trunk/third-party-sw/boost/boost/algorithm/string/detail/find_iterator.hpp
trunk/third-party-sw/boost/boost/algorithm/string/detail/finder.hpp
trunk/third-party-sw/boost/boost/algorithm/string/detail/finder_regex.hpp
trunk/third-party-sw/boost/boost/algorithm/string/detail/formatter.hpp
trunk/third-party-sw/boost/boost/algorithm/string/detail/formatter_regex.hpp
trunk/third-party-sw/boost/boost/algorithm/string/detail/predicate.hpp
trunk/third-party-sw/boost/boost/algorithm/string/detail/replace_storage.hpp
trunk/third-party-sw/boost/boost/algorithm/string/detail/sequence.hpp
trunk/third-party-sw/boost/boost/algorithm/string/detail/trim.hpp
trunk/third-party-sw/boost/boost/algorithm/string/detail/util.hpp
trunk/third-party-sw/boost/boost/algorithm/string/erase.hpp
trunk/third-party-sw/boost/boost/algorithm/string/find.hpp
trunk/third-party-sw/boost/boost/algorithm/string/find_format.hpp
trunk/third-party-sw/boost/boost/algorithm/string/find_iterator.hpp
trunk/third-party-sw/boost/boost/algorithm/string/finder.hpp
trunk/third-party-sw/boost/boost/algorithm/string/formatter.hpp
trunk/third-party-sw/boost/boost/algorithm/string/iter_find.hpp
trunk/third-party-sw/boost/boost/algorithm/string/join.hpp
trunk/third-party-sw/boost/boost/algorithm/string/predicate.hpp
trunk/third-party-sw/boost/boost/algorithm/string/predicate_facade.hpp
trunk/third-party-sw/boost/boost/algorithm/string/regex.hpp
trunk/third-party-sw/boost/boost/algorithm/string/regex_find_format.hpp
trunk/third-party-sw/boost/boost/algorithm/string/replace.hpp
trunk/third-party-sw/boost/boost/algorithm/string/sequence_traits.hpp
trunk/third-party-sw/boost/boost/algorithm/string/split.hpp
trunk/third-party-sw/boost/boost/algorithm/string/std/
trunk/third-party-sw/boost/boost/algorithm/string/std/list_traits.hpp
trunk/third-party-sw/boost/boost/algorithm/string/std/rope_traits.hpp
trunk/third-party-sw/boost/boost/algorithm/string/std/slist_traits.hpp
trunk/third-party-sw/boost/boost/algorithm/string/std/string_traits.hpp
trunk/third-party-sw/boost/boost/algorithm/string/std_containers_traits.hpp
trunk/third-party-sw/boost/boost/algorithm/string/trim.hpp
trunk/third-party-sw/boost/boost/algorithm/string/trim_all.hpp
trunk/third-party-sw/boost/boost/algorithm/string/yes_no_type.hpp
trunk/third-party-sw/boost/boost/algorithm/string.hpp
trunk/third-party-sw/boost/boost/algorithm/string_regex.hpp
trunk/third-party-sw/boost/boost/aligned_storage.hpp
trunk/third-party-sw/boost/boost/any.hpp
trunk/third-party-sw/boost/boost/archive/
trunk/third-party-sw/boost/boost/archive/add_facet.hpp
trunk/third-party-sw/boost/boost/archive/archive_exception.hpp
trunk/third-party-sw/boost/boost/archive/basic_archive.hpp
trunk/third-party-sw/boost/boost/archive/basic_binary_iarchive.hpp
trunk/third-party-sw/boost/boost/archive/basic_binary_iprimitive.hpp
trunk/third-party-sw/boost/boost/archive/basic_binary_oarchive.hpp
trunk/third-party-sw/boost/boost/archive/basic_binary_oprimitive.hpp
trunk/third-party-sw/boost/boost/archive/basic_streambuf_locale_saver.hpp
trunk/third-party-sw/boost/boost/archive/basic_text_iarchive.hpp
trunk/third-party-sw/boost/boost/archive/basic_text_iprimitive.hpp
trunk/third-party-sw/boost/boost/archive/basic_text_oarchive.hpp
trunk/third-party-sw/boost/boost/archive/basic_text_oprimitive.hpp
trunk/third-party-sw/boost/boost/archive/basic_xml_archive.hpp
trunk/third-party-sw/boost/boost/archive/basic_xml_iarchive.hpp
trunk/third-party-sw/boost/boost/archive/basic_xml_oarchive.hpp
trunk/third-party-sw/boost/boost/archive/binary_iarchive.hpp
trunk/third-party-sw/boost/boost/archive/binary_iarchive_impl.hpp
trunk/third-party-sw/boost/boost/archive/binary_oarchive.hpp
trunk/third-party-sw/boost/boost/archive/binary_oarchive_impl.hpp
trunk/third-party-sw/boost/boost/archive/binary_wiarchive.hpp
trunk/third-party-sw/boost/boost/archive/binary_woarchive.hpp
trunk/third-party-sw/boost/boost/archive/codecvt_null.hpp
trunk/third-party-sw/boost/boost/archive/detail/
trunk/third-party-sw/boost/boost/archive/detail/abi_prefix.hpp
trunk/third-party-sw/boost/boost/archive/detail/abi_suffix.hpp
trunk/third-party-sw/boost/boost/archive/detail/archive_serializer_map.hpp
trunk/third-party-sw/boost/boost/archive/detail/auto_link_archive.hpp
trunk/third-party-sw/boost/boost/archive/detail/auto_link_warchive.hpp
trunk/third-party-sw/boost/boost/archive/detail/basic_archive_impl.hpp
trunk/third-party-sw/boost/boost/archive/detail/basic_config.hpp
trunk/third-party-sw/boost/boost/archive/detail/basic_iarchive.hpp
trunk/third-party-sw/boost/boost/archive/detail/basic_iserializer.hpp
trunk/third-party-sw/boost/boost/archive/detail/basic_oarchive.hpp
trunk/third-party-sw/boost/boost/archive/detail/basic_oserializer.hpp
trunk/third-party-sw/boost/boost/archive/detail/basic_pointer_iserializer.hpp
trunk/third-party-sw/boost/boost/archive/detail/basic_pointer_oserializer.hpp
trunk/third-party-sw/boost/boost/archive/detail/basic_serializer.hpp
trunk/third-party-sw/boost/boost/archive/detail/basic_serializer_map.hpp
trunk/third-party-sw/boost/boost/archive/detail/check.hpp
trunk/third-party-sw/boost/boost/archive/detail/common_iarchive.hpp
trunk/third-party-sw/boost/boost/archive/detail/common_oarchive.hpp
trunk/third-party-sw/boost/boost/archive/detail/decl.hpp
trunk/third-party-sw/boost/boost/archive/detail/interface_iarchive.hpp
trunk/third-party-sw/boost/boost/archive/detail/interface_oarchive.hpp
trunk/third-party-sw/boost/boost/archive/detail/iserializer.hpp
trunk/third-party-sw/boost/boost/archive/detail/oserializer.hpp
trunk/third-party-sw/boost/boost/archive/detail/polymorphic_iarchive_route.hpp
trunk/third-party-sw/boost/boost/archive/detail/polymorphic_oarchive_route.hpp
trunk/third-party-sw/boost/boost/archive/detail/register_archive.hpp
trunk/third-party-sw/boost/boost/archive/detail/utf8_codecvt_facet.hpp
trunk/third-party-sw/boost/boost/archive/dinkumware.hpp
trunk/third-party-sw/boost/boost/archive/impl/
trunk/third-party-sw/boost/boost/archive/impl/archive_serializer_map.ipp
trunk/third-party-sw/boost/boost/archive/impl/basic_binary_iarchive.ipp
trunk/third-party-sw/boost/boost/archive/impl/basic_binary_iprimitive.ipp
trunk/third-party-sw/boost/boost/archive/impl/basic_binary_oarchive.ipp
trunk/third-party-sw/boost/boost/archive/impl/basic_binary_oprimitive.ipp
trunk/third-party-sw/boost/boost/archive/impl/basic_text_iarchive.ipp
trunk/third-party-sw/boost/boost/archive/impl/basic_text_iprimitive.ipp
trunk/third-party-sw/boost/boost/archive/impl/basic_text_oarchive.ipp
trunk/third-party-sw/boost/boost/archive/impl/basic_text_oprimitive.ipp
trunk/third-party-sw/boost/boost/archive/impl/basic_xml_grammar.hpp
trunk/third-party-sw/boost/boost/archive/impl/basic_xml_iarchive.ipp
trunk/third-party-sw/boost/boost/archive/impl/basic_xml_oarchive.ipp
trunk/third-party-sw/boost/boost/archive/impl/text_iarchive_impl.ipp
trunk/third-party-sw/boost/boost/archive/impl/text_oarchive_impl.ipp
trunk/third-party-sw/boost/boost/archive/impl/text_wiarchive_impl.ipp
trunk/third-party-sw/boost/boost/archive/impl/text_woarchive_impl.ipp
trunk/third-party-sw/boost/boost/archive/impl/xml_iarchive_impl.ipp
trunk/third-party-sw/boost/boost/archive/impl/xml_oarchive_impl.ipp
trunk/third-party-sw/boost/boost/archive/impl/xml_wiarchive_impl.ipp
trunk/third-party-sw/boost/boost/archive/impl/xml_woarchive_impl.ipp
trunk/third-party-sw/boost/boost/archive/iterators/
trunk/third-party-sw/boost/boost/archive/iterators/base64_exception.hpp
trunk/third-party-sw/boost/boost/archive/iterators/base64_from_binary.hpp
trunk/third-party-sw/boost/boost/archive/iterators/binary_from_base64.hpp
trunk/third-party-sw/boost/boost/archive/iterators/dataflow.hpp
trunk/third-party-sw/boost/boost/archive/iterators/dataflow_exception.hpp
trunk/third-party-sw/boost/boost/archive/iterators/escape.hpp
trunk/third-party-sw/boost/boost/archive/iterators/head_iterator.hpp
trunk/third-party-sw/boost/boost/archive/iterators/insert_linebreaks.hpp
trunk/third-party-sw/boost/boost/archive/iterators/istream_iterator.hpp
trunk/third-party-sw/boost/boost/archive/iterators/mb_from_wchar.hpp
trunk/third-party-sw/boost/boost/archive/iterators/ostream_iterator.hpp
trunk/third-party-sw/boost/boost/archive/iterators/remove_whitespace.hpp
trunk/third-party-sw/boost/boost/archive/iterators/transform_width.hpp
trunk/third-party-sw/boost/boost/archive/iterators/unescape.hpp
trunk/third-party-sw/boost/boost/archive/iterators/wchar_from_mb.hpp
trunk/third-party-sw/boost/boost/archive/iterators/xml_escape.hpp
trunk/third-party-sw/boost/boost/archive/iterators/xml_unescape.hpp
trunk/third-party-sw/boost/boost/archive/iterators/xml_unescape_exception.hpp
trunk/third-party-sw/boost/boost/archive/polymorphic_binary_iarchive.hpp
trunk/third-party-sw/boost/boost/archive/polymorphic_binary_oarchive.hpp
trunk/third-party-sw/boost/boost/archive/polymorphic_iarchive.hpp
trunk/third-party-sw/boost/boost/archive/polymorphic_oarchive.hpp
trunk/third-party-sw/boost/boost/archive/polymorphic_text_iarchive.hpp
trunk/third-party-sw/boost/boost/archive/polymorphic_text_oarchive.hpp
trunk/third-party-sw/boost/boost/archive/polymorphic_text_wiarchive.hpp
trunk/third-party-sw/boost/boost/archive/polymorphic_text_woarchive.hpp
trunk/third-party-sw/boost/boost/archive/polymorphic_xml_iarchive.hpp
trunk/third-party-sw/boost/boost/archive/polymorphic_xml_oarchive.hpp
trunk/third-party-sw/boost/boost/archive/polymorphic_xml_wiarchive.hpp
trunk/third-party-sw/boost/boost/archive/polymorphic_xml_woarchive.hpp
trunk/third-party-sw/boost/boost/archive/shared_ptr_helper.hpp
trunk/third-party-sw/boost/boost/archive/text_iarchive.hpp
trunk/third-party-sw/boost/boost/archive/text_oarchive.hpp
trunk/third-party-sw/boost/boost/archive/text_wiarchive.hpp
trunk/third-party-sw/boost/boost/archive/text_woarchive.hpp
trunk/third-party-sw/boost/boost/archive/tmpdir.hpp
trunk/third-party-sw/boost/boost/archive/wcslen.hpp
trunk/third-party-sw/boost/boost/archive/xml_archive_exception.hpp
trunk/third-party-sw/boost/boost/archive/xml_iarchive.hpp
trunk/third-party-sw/boost/boost/archive/xml_oarchive.hpp
trunk/third-party-sw/boost/boost/archive/xml_wiarchive.hpp
trunk/third-party-sw/boost/boost/archive/xml_woarchive.hpp
trunk/third-party-sw/boost/boost/array.hpp
trunk/third-party-sw/boost/boost/asio/
trunk/third-party-sw/boost/boost/asio/basic_datagram_socket.hpp
trunk/third-party-sw/boost/boost/asio/basic_deadline_timer.hpp
trunk/third-party-sw/boost/boost/asio/basic_io_object.hpp
trunk/third-party-sw/boost/boost/asio/basic_raw_socket.hpp
trunk/third-party-sw/boost/boost/asio/basic_seq_packet_socket.hpp
trunk/third-party-sw/boost/boost/asio/basic_serial_port.hpp
trunk/third-party-sw/boost/boost/asio/basic_signal_set.hpp
trunk/third-party-sw/boost/boost/asio/basic_socket.hpp
trunk/third-party-sw/boost/boost/asio/basic_socket_acceptor.hpp
trunk/third-party-sw/boost/boost/asio/basic_socket_iostream.hpp
trunk/third-party-sw/boost/boost/asio/basic_socket_streambuf.hpp
trunk/third-party-sw/boost/boost/asio/basic_stream_socket.hpp
trunk/third-party-sw/boost/boost/asio/basic_streambuf.hpp
trunk/third-party-sw/boost/boost/asio/basic_streambuf_fwd.hpp
trunk/third-party-sw/boost/boost/asio/buffer.hpp
trunk/third-party-sw/boost/boost/asio/buffered_read_stream.hpp
trunk/third-party-sw/boost/boost/asio/buffered_read_stream_fwd.hpp
trunk/third-party-sw/boost/boost/asio/buffered_stream.hpp
trunk/third-party-sw/boost/boost/asio/buffered_stream_fwd.hpp
trunk/third-party-sw/boost/boost/asio/buffered_write_stream.hpp
trunk/third-party-sw/boost/boost/asio/buffered_write_stream_fwd.hpp
trunk/third-party-sw/boost/boost/asio/buffers_iterator.hpp
trunk/third-party-sw/boost/boost/asio/completion_condition.hpp
trunk/third-party-sw/boost/boost/asio/connect.hpp
trunk/third-party-sw/boost/boost/asio/datagram_socket_service.hpp
trunk/third-party-sw/boost/boost/asio/deadline_timer.hpp
trunk/third-party-sw/boost/boost/asio/deadline_timer_service.hpp
trunk/third-party-sw/boost/boost/asio/detail/
trunk/third-party-sw/boost/boost/asio/detail/array.hpp
trunk/third-party-sw/boost/boost/asio/detail/array_fwd.hpp
trunk/third-party-sw/boost/boost/asio/detail/atomic_count.hpp
trunk/third-party-sw/boost/boost/asio/detail/base_from_completion_cond.hpp
trunk/third-party-sw/boost/boost/asio/detail/bind_handler.hpp
trunk/third-party-sw/boost/boost/asio/detail/buffer_resize_guard.hpp
trunk/third-party-sw/boost/boost/asio/detail/buffer_sequence_adapter.hpp
trunk/third-party-sw/boost/boost/asio/detail/buffered_stream_storage.hpp
trunk/third-party-sw/boost/boost/asio/detail/call_stack.hpp
trunk/third-party-sw/boost/boost/asio/detail/completion_handler.hpp
trunk/third-party-sw/boost/boost/asio/detail/config.hpp
trunk/third-party-sw/boost/boost/asio/detail/consuming_buffers.hpp
trunk/third-party-sw/boost/boost/asio/detail/deadline_timer_service.hpp
trunk/third-party-sw/boost/boost/asio/detail/descriptor_ops.hpp
trunk/third-party-sw/boost/boost/asio/detail/descriptor_read_op.hpp
trunk/third-party-sw/boost/boost/asio/detail/descriptor_write_op.hpp
trunk/third-party-sw/boost/boost/asio/detail/dev_poll_reactor.hpp
trunk/third-party-sw/boost/boost/asio/detail/dev_poll_reactor_fwd.hpp
trunk/third-party-sw/boost/boost/asio/detail/epoll_reactor.hpp
trunk/third-party-sw/boost/boost/asio/detail/epoll_reactor_fwd.hpp
trunk/third-party-sw/boost/boost/asio/detail/event.hpp
trunk/third-party-sw/boost/boost/asio/detail/eventfd_select_interrupter.hpp
trunk/third-party-sw/boost/boost/asio/detail/fd_set_adapter.hpp
trunk/third-party-sw/boost/boost/asio/detail/fenced_block.hpp
trunk/third-party-sw/boost/boost/asio/detail/gcc_arm_fenced_block.hpp
trunk/third-party-sw/boost/boost/asio/detail/gcc_hppa_fenced_block.hpp
trunk/third-party-sw/boost/boost/asio/detail/gcc_sync_fenced_block.hpp
trunk/third-party-sw/boost/boost/asio/detail/gcc_x86_fenced_block.hpp
trunk/third-party-sw/boost/boost/asio/detail/handler_alloc_helpers.hpp
trunk/third-party-sw/boost/boost/asio/detail/handler_invoke_helpers.hpp
trunk/third-party-sw/boost/boost/asio/detail/handler_tracking.hpp
trunk/third-party-sw/boost/boost/asio/detail/handler_type_requirements.hpp
trunk/third-party-sw/boost/boost/asio/detail/hash_map.hpp
trunk/third-party-sw/boost/boost/asio/detail/impl/
trunk/third-party-sw/boost/boost/asio/detail/impl/descriptor_ops.ipp
trunk/third-party-sw/boost/boost/asio/detail/impl/dev_poll_reactor.hpp
trunk/third-party-sw/boost/boost/asio/detail/impl/dev_poll_reactor.ipp
trunk/third-party-sw/boost/boost/asio/detail/impl/epoll_reactor.hpp
trunk/third-party-sw/boost/boost/asio/detail/impl/epoll_reactor.ipp
trunk/third-party-sw/boost/boost/asio/detail/impl/eventfd_select_interrupter.ipp
trunk/third-party-sw/boost/boost/asio/detail/impl/handler_tracking.ipp
trunk/third-party-sw/boost/boost/asio/detail/impl/kqueue_reactor.hpp
trunk/third-party-sw/boost/boost/asio/detail/impl/kqueue_reactor.ipp
trunk/third-party-sw/boost/boost/asio/detail/impl/pipe_select_interrupter.ipp
trunk/third-party-sw/boost/boost/asio/detail/impl/posix_event.ipp
trunk/third-party-sw/boost/boost/asio/detail/impl/posix_mutex.ipp
trunk/third-party-sw/boost/boost/asio/detail/impl/posix_thread.ipp
trunk/third-party-sw/boost/boost/asio/detail/impl/posix_tss_ptr.ipp
trunk/third-party-sw/boost/boost/asio/detail/impl/reactive_descriptor_service.ipp
trunk/third-party-sw/boost/boost/asio/detail/impl/reactive_serial_port_service.ipp
trunk/third-party-sw/boost/boost/asio/detail/impl/reactive_socket_service_base.ipp
trunk/third-party-sw/boost/boost/asio/detail/impl/resolver_service_base.ipp
trunk/third-party-sw/boost/boost/asio/detail/impl/select_reactor.hpp
trunk/third-party-sw/boost/boost/asio/detail/impl/select_reactor.ipp
trunk/third-party-sw/boost/boost/asio/detail/impl/service_registry.hpp
trunk/third-party-sw/boost/boost/asio/detail/impl/service_registry.ipp
trunk/third-party-sw/boost/boost/asio/detail/impl/signal_set_service.ipp
trunk/third-party-sw/boost/boost/asio/detail/impl/socket_ops.ipp
trunk/third-party-sw/boost/boost/asio/detail/impl/socket_select_interrupter.ipp
trunk/third-party-sw/boost/boost/asio/detail/impl/strand_service.hpp
trunk/third-party-sw/boost/boost/asio/detail/impl/strand_service.ipp
trunk/third-party-sw/boost/boost/asio/detail/impl/task_io_service.hpp
trunk/third-party-sw/boost/boost/asio/detail/impl/task_io_service.ipp
trunk/third-party-sw/boost/boost/asio/detail/impl/throw_error.ipp
trunk/third-party-sw/boost/boost/asio/detail/impl/timer_queue.ipp
trunk/third-party-sw/boost/boost/asio/detail/impl/timer_queue_set.ipp
trunk/third-party-sw/boost/boost/asio/detail/impl/win_event.ipp
trunk/third-party-sw/boost/boost/asio/detail/impl/win_iocp_handle_service.ipp
trunk/third-party-sw/boost/boost/asio/detail/impl/win_iocp_io_service.hpp
trunk/third-party-sw/boost/boost/asio/detail/impl/win_iocp_io_service.ipp
trunk/third-party-sw/boost/boost/asio/detail/impl/win_iocp_serial_port_service.ipp
trunk/third-party-sw/boost/boost/asio/detail/impl/win_iocp_socket_service_base.ipp
trunk/third-party-sw/boost/boost/asio/detail/impl/win_mutex.ipp
trunk/third-party-sw/boost/boost/asio/detail/impl/win_static_mutex.ipp
trunk/third-party-sw/boost/boost/asio/detail/impl/win_thread.ipp
trunk/third-party-sw/boost/boost/asio/detail/impl/win_tss_ptr.ipp
trunk/third-party-sw/boost/boost/asio/detail/impl/winsock_init.ipp
trunk/third-party-sw/boost/boost/asio/detail/io_control.hpp
trunk/third-party-sw/boost/boost/asio/detail/kqueue_reactor.hpp
trunk/third-party-sw/boost/boost/asio/detail/kqueue_reactor_fwd.hpp
trunk/third-party-sw/boost/boost/asio/detail/local_free_on_block_exit.hpp
trunk/third-party-sw/boost/boost/asio/detail/macos_fenced_block.hpp
trunk/third-party-sw/boost/boost/asio/detail/mutex.hpp
trunk/third-party-sw/boost/boost/asio/detail/noncopyable.hpp
trunk/third-party-sw/boost/boost/asio/detail/null_event.hpp
trunk/third-party-sw/boost/boost/asio/detail/null_fenced_block.hpp
trunk/third-party-sw/boost/boost/asio/detail/null_mutex.hpp
trunk/third-party-sw/boost/boost/asio/detail/null_signal_blocker.hpp
trunk/third-party-sw/boost/boost/asio/detail/null_static_mutex.hpp
trunk/third-party-sw/boost/boost/asio/detail/null_thread.hpp
trunk/third-party-sw/boost/boost/asio/detail/null_tss_ptr.hpp
trunk/third-party-sw/boost/boost/asio/detail/object_pool.hpp
trunk/third-party-sw/boost/boost/asio/detail/old_win_sdk_compat.hpp
trunk/third-party-sw/boost/boost/asio/detail/op_queue.hpp
trunk/third-party-sw/boost/boost/asio/detail/operation.hpp
trunk/third-party-sw/boost/boost/asio/detail/pipe_select_interrupter.hpp
trunk/third-party-sw/boost/boost/asio/detail/pop_options.hpp
trunk/third-party-sw/boost/boost/asio/detail/posix_event.hpp
trunk/third-party-sw/boost/boost/asio/detail/posix_fd_set_adapter.hpp
trunk/third-party-sw/boost/boost/asio/detail/posix_mutex.hpp
trunk/third-party-sw/boost/boost/asio/detail/posix_signal_blocker.hpp
trunk/third-party-sw/boost/boost/asio/detail/posix_static_mutex.hpp
trunk/third-party-sw/boost/boost/asio/detail/posix_thread.hpp
trunk/third-party-sw/boost/boost/asio/detail/posix_tss_ptr.hpp
trunk/third-party-sw/boost/boost/asio/detail/push_options.hpp
trunk/third-party-sw/boost/boost/asio/detail/reactive_descriptor_service.hpp
trunk/third-party-sw/boost/boost/asio/detail/reactive_null_buffers_op.hpp
trunk/third-party-sw/boost/boost/asio/detail/reactive_serial_port_service.hpp
trunk/third-party-sw/boost/boost/asio/detail/reactive_socket_accept_op.hpp
trunk/third-party-sw/boost/boost/asio/detail/reactive_socket_connect_op.hpp
trunk/third-party-sw/boost/boost/asio/detail/reactive_socket_recv_op.hpp
trunk/third-party-sw/boost/boost/asio/detail/reactive_socket_recvfrom_op.hpp
trunk/third-party-sw/boost/boost/asio/detail/reactive_socket_recvmsg_op.hpp
trunk/third-party-sw/boost/boost/asio/detail/reactive_socket_send_op.hpp
trunk/third-party-sw/boost/boost/asio/detail/reactive_socket_sendto_op.hpp
trunk/third-party-sw/boost/boost/asio/detail/reactive_socket_service.hpp
trunk/third-party-sw/boost/boost/asio/detail/reactive_socket_service_base.hpp
trunk/third-party-sw/boost/boost/asio/detail/reactor.hpp
trunk/third-party-sw/boost/boost/asio/detail/reactor_fwd.hpp
trunk/t...
[truncated message content] |
|
From: <ob...@us...> - 2012-06-20 19:03:17
|
Revision: 1406
http://scstudio.svn.sourceforge.net/scstudio/?rev=1406&view=rev
Author: obouda
Date: 2012-06-20 19:03:04 +0000 (Wed, 20 Jun 2012)
Log Message:
-----------
Included Antlr, WTL, and SimpleOpt in the third-party-sw. Now it is handled automatically.
Fixed some library paths in visio/addon/scstudio.vcproj
Modified Paths:
--------------
trunk/CMakeLists.txt
trunk/src/view/visio/addon/scstudio.vcproj
trunk/src/view/visio/build-setup.bat
Added Paths:
-----------
trunk/src/view/visio/addon/SimpleOpt.h
trunk/third-party-sw/antlr/
trunk/third-party-sw/antlr/lib/
trunk/third-party-sw/antlr/lib/antlr-3.1.3.jar
trunk/third-party-sw/antlr/runtime/
trunk/third-party-sw/antlr/runtime/C/
trunk/third-party-sw/antlr/runtime/C/32bit/
trunk/third-party-sw/antlr/runtime/C/32bit/antlr3c.lib
trunk/third-party-sw/antlr/runtime/C/32bit/antlr3cd.lib
trunk/third-party-sw/antlr/runtime/C/antlr3c.lib
trunk/third-party-sw/antlr/runtime/C/antlr3cd.lib
trunk/third-party-sw/antlr/runtime/C/include/
trunk/third-party-sw/antlr/runtime/C/include/antlr3.h
trunk/third-party-sw/antlr/runtime/C/include/antlr3baserecognizer.h
trunk/third-party-sw/antlr/runtime/C/include/antlr3basetree.h
trunk/third-party-sw/antlr/runtime/C/include/antlr3basetreeadaptor.h
trunk/third-party-sw/antlr/runtime/C/include/antlr3bitset.h
trunk/third-party-sw/antlr/runtime/C/include/antlr3collections.h
trunk/third-party-sw/antlr/runtime/C/include/antlr3commontoken.h
trunk/third-party-sw/antlr/runtime/C/include/antlr3commontree.h
trunk/third-party-sw/antlr/runtime/C/include/antlr3commontreeadaptor.h
trunk/third-party-sw/antlr/runtime/C/include/antlr3commontreenodestream.h
trunk/third-party-sw/antlr/runtime/C/include/antlr3convertutf.h
trunk/third-party-sw/antlr/runtime/C/include/antlr3cyclicdfa.h
trunk/third-party-sw/antlr/runtime/C/include/antlr3debugeventlistener.h
trunk/third-party-sw/antlr/runtime/C/include/antlr3defs.h
trunk/third-party-sw/antlr/runtime/C/include/antlr3encodings.h
trunk/third-party-sw/antlr/runtime/C/include/antlr3errors.h
trunk/third-party-sw/antlr/runtime/C/include/antlr3exception.h
trunk/third-party-sw/antlr/runtime/C/include/antlr3filestream.h
trunk/third-party-sw/antlr/runtime/C/include/antlr3input.h
trunk/third-party-sw/antlr/runtime/C/include/antlr3interfaces.h
trunk/third-party-sw/antlr/runtime/C/include/antlr3intstream.h
trunk/third-party-sw/antlr/runtime/C/include/antlr3lexer.h
trunk/third-party-sw/antlr/runtime/C/include/antlr3memory.h
trunk/third-party-sw/antlr/runtime/C/include/antlr3parser.h
trunk/third-party-sw/antlr/runtime/C/include/antlr3parsetree.h
trunk/third-party-sw/antlr/runtime/C/include/antlr3recognizersharedstate.h
trunk/third-party-sw/antlr/runtime/C/include/antlr3rewritestreams.h
trunk/third-party-sw/antlr/runtime/C/include/antlr3string.h
trunk/third-party-sw/antlr/runtime/C/include/antlr3stringstream.h
trunk/third-party-sw/antlr/runtime/C/include/antlr3tokenstream.h
trunk/third-party-sw/antlr/runtime/C/include/antlr3treeparser.h
trunk/third-party-sw/simpleopt/
trunk/third-party-sw/simpleopt/SimpleOpt.h
trunk/third-party-sw/wtl/
trunk/third-party-sw/wtl/AppWiz/
trunk/third-party-sw/wtl/AppWiz/Files/
trunk/third-party-sw/wtl/AppWiz/Files/HTML/
trunk/third-party-sw/wtl/AppWiz/Files/HTML/1033/
trunk/third-party-sw/wtl/AppWiz/Files/HTML/1033/AppType.htm
trunk/third-party-sw/wtl/AppWiz/Files/HTML/1033/UIFeatures.htm
trunk/third-party-sw/wtl/AppWiz/Files/HTML/1033/default.htm
trunk/third-party-sw/wtl/AppWiz/Files/Images/
trunk/third-party-sw/wtl/AppWiz/Files/Images/WTLApp70.gif
trunk/third-party-sw/wtl/AppWiz/Files/Images/WTLApp70_Background.gif
trunk/third-party-sw/wtl/AppWiz/Files/Scripts/
trunk/third-party-sw/wtl/AppWiz/Files/Scripts/1033/
trunk/third-party-sw/wtl/AppWiz/Files/Scripts/1033/default.js
trunk/third-party-sw/wtl/AppWiz/Files/Templates/
trunk/third-party-sw/wtl/AppWiz/Files/Templates/1033/
trunk/third-party-sw/wtl/AppWiz/Files/Templates/1033/AboutDlg.cpp
trunk/third-party-sw/wtl/AppWiz/Files/Templates/1033/AboutDlg.h
trunk/third-party-sw/wtl/AppWiz/Files/Templates/1033/ChildFrm.cpp
trunk/third-party-sw/wtl/AppWiz/Files/Templates/1033/ChildFrm.h
trunk/third-party-sw/wtl/AppWiz/Files/Templates/1033/Frame.cpp
trunk/third-party-sw/wtl/AppWiz/Files/Templates/1033/Frame.h
trunk/third-party-sw/wtl/AppWiz/Files/Templates/1033/MainDlg.cpp
trunk/third-party-sw/wtl/AppWiz/Files/Templates/1033/MainDlg.h
trunk/third-party-sw/wtl/AppWiz/Files/Templates/1033/Ribbon.h
trunk/third-party-sw/wtl/AppWiz/Files/Templates/1033/Ribbon.xml
trunk/third-party-sw/wtl/AppWiz/Files/Templates/1033/Templates.inf
trunk/third-party-sw/wtl/AppWiz/Files/Templates/1033/View.cpp
trunk/third-party-sw/wtl/AppWiz/Files/Templates/1033/View.h
trunk/third-party-sw/wtl/AppWiz/Files/Templates/1033/resource.h
trunk/third-party-sw/wtl/AppWiz/Files/Templates/1033/root.cpp
trunk/third-party-sw/wtl/AppWiz/Files/Templates/1033/root.exe.manifest
trunk/third-party-sw/wtl/AppWiz/Files/Templates/1033/root.h
trunk/third-party-sw/wtl/AppWiz/Files/Templates/1033/root.ico
trunk/third-party-sw/wtl/AppWiz/Files/Templates/1033/root.idl
trunk/third-party-sw/wtl/AppWiz/Files/Templates/1033/root.rc
trunk/third-party-sw/wtl/AppWiz/Files/Templates/1033/root.rgs
trunk/third-party-sw/wtl/AppWiz/Files/Templates/1033/rootDoc.ico
trunk/third-party-sw/wtl/AppWiz/Files/Templates/1033/rootidl.h
trunk/third-party-sw/wtl/AppWiz/Files/Templates/1033/rootps.def
trunk/third-party-sw/wtl/AppWiz/Files/Templates/1033/rootps.mk
trunk/third-party-sw/wtl/AppWiz/Files/Templates/1033/stdafx.cpp
trunk/third-party-sw/wtl/AppWiz/Files/Templates/1033/stdafx.h
trunk/third-party-sw/wtl/AppWiz/Files/Templates/1033/toolbar.bmp
trunk/third-party-sw/wtl/AppWiz/Files/WTLAppWiz.ico
trunk/third-party-sw/wtl/AppWiz/Files/WTLAppWiz.vsdir
trunk/third-party-sw/wtl/AppWiz/Files/WTLAppWiz.vsz
trunk/third-party-sw/wtl/AppWiz/setup100.js
trunk/third-party-sw/wtl/AppWiz/setup100x.js
trunk/third-party-sw/wtl/AppWiz/setup110.js
trunk/third-party-sw/wtl/AppWiz/setup110x.js
trunk/third-party-sw/wtl/AppWiz/setup70.js
trunk/third-party-sw/wtl/AppWiz/setup71.js
trunk/third-party-sw/wtl/AppWiz/setup80.js
trunk/third-party-sw/wtl/AppWiz/setup80x.js
trunk/third-party-sw/wtl/AppWiz/setup90.js
trunk/third-party-sw/wtl/AppWiz/setup90x.js
trunk/third-party-sw/wtl/AppWizCE/
trunk/third-party-sw/wtl/AppWizCE/Files/
trunk/third-party-sw/wtl/AppWizCE/Files/HTML/
trunk/third-party-sw/wtl/AppWizCE/Files/HTML/1033/
trunk/third-party-sw/wtl/AppWizCE/Files/HTML/1033/AppType.htm
trunk/third-party-sw/wtl/AppWizCE/Files/HTML/1033/Platforms.htm
trunk/third-party-sw/wtl/AppWizCE/Files/HTML/1033/UIFeatures.htm
trunk/third-party-sw/wtl/AppWizCE/Files/HTML/1033/default.htm
trunk/third-party-sw/wtl/AppWizCE/Files/Images/
trunk/third-party-sw/wtl/AppWizCE/Files/Images/WTLApp70.gif
trunk/third-party-sw/wtl/AppWizCE/Files/Images/WTLApp70_Background.gif
trunk/third-party-sw/wtl/AppWizCE/Files/Scripts/
trunk/third-party-sw/wtl/AppWizCE/Files/Scripts/1033/
trunk/third-party-sw/wtl/AppWizCE/Files/Scripts/1033/default.js
trunk/third-party-sw/wtl/AppWizCE/Files/Templates/
trunk/third-party-sw/wtl/AppWizCE/Files/Templates/1033/
trunk/third-party-sw/wtl/AppWizCE/Files/Templates/1033/AboutDlg.cpp
trunk/third-party-sw/wtl/AppWizCE/Files/Templates/1033/AboutDlg.h
trunk/third-party-sw/wtl/AppWizCE/Files/Templates/1033/Frame.cpp
trunk/third-party-sw/wtl/AppWizCE/Files/Templates/1033/Frame.h
trunk/third-party-sw/wtl/AppWizCE/Files/Templates/1033/MainDlg.cpp
trunk/third-party-sw/wtl/AppWizCE/Files/Templates/1033/MainDlg.h
trunk/third-party-sw/wtl/AppWizCE/Files/Templates/1033/Templates.inf
trunk/third-party-sw/wtl/AppWizCE/Files/Templates/1033/View.cpp
trunk/third-party-sw/wtl/AppWizCE/Files/Templates/1033/View.h
trunk/third-party-sw/wtl/AppWizCE/Files/Templates/1033/resource.h
trunk/third-party-sw/wtl/AppWizCE/Files/Templates/1033/root.cpp
trunk/third-party-sw/wtl/AppWizCE/Files/Templates/1033/root.h
trunk/third-party-sw/wtl/AppWizCE/Files/Templates/1033/root.ico
trunk/third-party-sw/wtl/AppWizCE/Files/Templates/1033/root.idl
trunk/third-party-sw/wtl/AppWizCE/Files/Templates/1033/root.rc
trunk/third-party-sw/wtl/AppWizCE/Files/Templates/1033/root.rc2
trunk/third-party-sw/wtl/AppWizCE/Files/Templates/1033/root.rgs
trunk/third-party-sw/wtl/AppWizCE/Files/Templates/1033/rootidl.h
trunk/third-party-sw/wtl/AppWizCE/Files/Templates/1033/rootps.def
trunk/third-party-sw/wtl/AppWizCE/Files/Templates/1033/rootps.mk
trunk/third-party-sw/wtl/AppWizCE/Files/Templates/1033/stdafx.cpp
trunk/third-party-sw/wtl/AppWizCE/Files/Templates/1033/stdafx.h
trunk/third-party-sw/wtl/AppWizCE/Files/Templates/1033/toolbar.bmp
trunk/third-party-sw/wtl/AppWizCE/Files/WTLAppWizCE.ico
trunk/third-party-sw/wtl/AppWizCE/Files/WTLAppWizCE.vsdir
trunk/third-party-sw/wtl/AppWizCE/Files/WTLAppWizCE.vsz
trunk/third-party-sw/wtl/AppWizCE/setup80.js
trunk/third-party-sw/wtl/AppWizCE/setup90.js
trunk/third-party-sw/wtl/AppWizMobile/
trunk/third-party-sw/wtl/AppWizMobile/Files/
trunk/third-party-sw/wtl/AppWizMobile/Files/1033/
trunk/third-party-sw/wtl/AppWizMobile/Files/1033/NewStyles.css
trunk/third-party-sw/wtl/AppWizMobile/Files/HTML/
trunk/third-party-sw/wtl/AppWizMobile/Files/HTML/1033/
trunk/third-party-sw/wtl/AppWizMobile/Files/HTML/1033/AppType.htm
trunk/third-party-sw/wtl/AppWizMobile/Files/HTML/1033/Platforms.htm
trunk/third-party-sw/wtl/AppWizMobile/Files/HTML/1033/UIFeatures.htm
trunk/third-party-sw/wtl/AppWizMobile/Files/HTML/1033/default.htm
trunk/third-party-sw/wtl/AppWizMobile/Files/Images/
trunk/third-party-sw/wtl/AppWizMobile/Files/Images/AppWizCE2.gif
trunk/third-party-sw/wtl/AppWizMobile/Files/Images/AppWizCE2_Background.gif
trunk/third-party-sw/wtl/AppWizMobile/Files/Images/WTLApp70.gif
trunk/third-party-sw/wtl/AppWizMobile/Files/Images/WTLApp70_Background.gif
trunk/third-party-sw/wtl/AppWizMobile/Files/Scripts/
trunk/third-party-sw/wtl/AppWizMobile/Files/Scripts/1033/
trunk/third-party-sw/wtl/AppWizMobile/Files/Scripts/1033/default.js
trunk/third-party-sw/wtl/AppWizMobile/Files/Templates/
trunk/third-party-sw/wtl/AppWizMobile/Files/Templates/1033/
trunk/third-party-sw/wtl/AppWizMobile/Files/Templates/1033/AboutDlg.cpp
trunk/third-party-sw/wtl/AppWizMobile/Files/Templates/1033/AboutDlg.h
trunk/third-party-sw/wtl/AppWizMobile/Files/Templates/1033/Frame.cpp
trunk/third-party-sw/wtl/AppWizMobile/Files/Templates/1033/Frame.h
trunk/third-party-sw/wtl/AppWizMobile/Files/Templates/1033/MainDlg.cpp
trunk/third-party-sw/wtl/AppWizMobile/Files/Templates/1033/MainDlg.h
trunk/third-party-sw/wtl/AppWizMobile/Files/Templates/1033/Templates.inf
trunk/third-party-sw/wtl/AppWizMobile/Files/Templates/1033/View.cpp
trunk/third-party-sw/wtl/AppWizMobile/Files/Templates/1033/View.h
trunk/third-party-sw/wtl/AppWizMobile/Files/Templates/1033/resource.h
trunk/third-party-sw/wtl/AppWizMobile/Files/Templates/1033/root.cpp
trunk/third-party-sw/wtl/AppWizMobile/Files/Templates/1033/root.ico
trunk/third-party-sw/wtl/AppWizMobile/Files/Templates/1033/root.rc2
trunk/third-party-sw/wtl/AppWizMobile/Files/Templates/1033/rootppc.rc
trunk/third-party-sw/wtl/AppWizMobile/Files/Templates/1033/rootsp.rc
trunk/third-party-sw/wtl/AppWizMobile/Files/Templates/1033/stdafx.cpp
trunk/third-party-sw/wtl/AppWizMobile/Files/Templates/1033/stdafx.h
trunk/third-party-sw/wtl/AppWizMobile/Files/Templates/1033/toolbar.bmp
trunk/third-party-sw/wtl/AppWizMobile/Files/WTLMobile.ico
trunk/third-party-sw/wtl/AppWizMobile/Files/WTLMobile.vsdir
trunk/third-party-sw/wtl/AppWizMobile/Files/WTLMobile.vsz
trunk/third-party-sw/wtl/AppWizMobile/setup80.js
trunk/third-party-sw/wtl/AppWizMobile/setup90.js
trunk/third-party-sw/wtl/CPL.TXT
trunk/third-party-sw/wtl/Include/
trunk/third-party-sw/wtl/Include/atlapp.h
trunk/third-party-sw/wtl/Include/atlcrack.h
trunk/third-party-sw/wtl/Include/atlctrls.h
trunk/third-party-sw/wtl/Include/atlctrlw.h
trunk/third-party-sw/wtl/Include/atlctrlx.h
trunk/third-party-sw/wtl/Include/atlddx.h
trunk/third-party-sw/wtl/Include/atldlgs.h
trunk/third-party-sw/wtl/Include/atldwm.h
trunk/third-party-sw/wtl/Include/atlfind.h
trunk/third-party-sw/wtl/Include/atlframe.h
trunk/third-party-sw/wtl/Include/atlgdi.h
trunk/third-party-sw/wtl/Include/atlmisc.h
trunk/third-party-sw/wtl/Include/atlprint.h
trunk/third-party-sw/wtl/Include/atlres.h
trunk/third-party-sw/wtl/Include/atlresce.h
trunk/third-party-sw/wtl/Include/atlribbon.h
trunk/third-party-sw/wtl/Include/atlscrl.h
trunk/third-party-sw/wtl/Include/atlsplit.h
trunk/third-party-sw/wtl/Include/atltheme.h
trunk/third-party-sw/wtl/Include/atluser.h
trunk/third-party-sw/wtl/Include/atlwince.h
trunk/third-party-sw/wtl/Include/atlwinx.h
trunk/third-party-sw/wtl/Samples/
trunk/third-party-sw/wtl/Samples/Aero/
trunk/third-party-sw/wtl/Samples/Aero/AboutDlg.h
trunk/third-party-sw/wtl/Samples/Aero/Aero.cpp
trunk/third-party-sw/wtl/Samples/Aero/Aero.h
trunk/third-party-sw/wtl/Samples/Aero/Aero.rc
trunk/third-party-sw/wtl/Samples/Aero/Aero.sln
trunk/third-party-sw/wtl/Samples/Aero/Aero.vcproj
trunk/third-party-sw/wtl/Samples/Aero/AeroView.h
trunk/third-party-sw/wtl/Samples/Aero/MainFrm.h
trunk/third-party-sw/wtl/Samples/Aero/res/
trunk/third-party-sw/wtl/Samples/Aero/res/Aero.ico
trunk/third-party-sw/wtl/Samples/Aero/res/toolbar.bmp
trunk/third-party-sw/wtl/Samples/Aero/resource.h
trunk/third-party-sw/wtl/Samples/Aero/stdafx.cpp
trunk/third-party-sw/wtl/Samples/Aero/stdafx.h
trunk/third-party-sw/wtl/Samples/Alpha/
trunk/third-party-sw/wtl/Samples/Alpha/Alpha.cpp
trunk/third-party-sw/wtl/Samples/Alpha/Alpha.dsp
trunk/third-party-sw/wtl/Samples/Alpha/Alpha.dsw
trunk/third-party-sw/wtl/Samples/Alpha/Alpha.h
trunk/third-party-sw/wtl/Samples/Alpha/Alpha.rc
trunk/third-party-sw/wtl/Samples/Alpha/Alpha.sln
trunk/third-party-sw/wtl/Samples/Alpha/Alpha.vcproj
trunk/third-party-sw/wtl/Samples/Alpha/Debug/
trunk/third-party-sw/wtl/Samples/Alpha/Debug/Alpha.exe.manifest
trunk/third-party-sw/wtl/Samples/Alpha/Release/
trunk/third-party-sw/wtl/Samples/Alpha/Release/Alpha.exe.manifest
trunk/third-party-sw/wtl/Samples/Alpha/aboutdlg.h
trunk/third-party-sw/wtl/Samples/Alpha/mainfrm.h
trunk/third-party-sw/wtl/Samples/Alpha/readme.txt
trunk/third-party-sw/wtl/Samples/Alpha/res/
trunk/third-party-sw/wtl/Samples/Alpha/res/Alpha.ico
trunk/third-party-sw/wtl/Samples/Alpha/res/toolbar.bmp
trunk/third-party-sw/wtl/Samples/Alpha/res/toolbar_old.bmp
trunk/third-party-sw/wtl/Samples/Alpha/resource.h
trunk/third-party-sw/wtl/Samples/Alpha/stdafx.cpp
trunk/third-party-sw/wtl/Samples/Alpha/stdafx.h
trunk/third-party-sw/wtl/Samples/Alpha/view.h
trunk/third-party-sw/wtl/Samples/BmpView/
trunk/third-party-sw/wtl/Samples/BmpView/BmpView.cpp
trunk/third-party-sw/wtl/Samples/BmpView/BmpView.dsp
trunk/third-party-sw/wtl/Samples/BmpView/BmpView.dsw
trunk/third-party-sw/wtl/Samples/BmpView/BmpView.rc
trunk/third-party-sw/wtl/Samples/BmpView/BmpView.sln
trunk/third-party-sw/wtl/Samples/BmpView/BmpView.vcproj
trunk/third-party-sw/wtl/Samples/BmpView/BmpViewCE.rc
trunk/third-party-sw/wtl/Samples/BmpView/BmpViewCE.vcp
trunk/third-party-sw/wtl/Samples/BmpView/BmpViewCE.vcw
trunk/third-party-sw/wtl/Samples/BmpView/BmpViewPPC.rc
trunk/third-party-sw/wtl/Samples/BmpView/BmpViewPPC.vcp
trunk/third-party-sw/wtl/Samples/BmpView/BmpViewPPC.vcw
trunk/third-party-sw/wtl/Samples/BmpView/list.h
trunk/third-party-sw/wtl/Samples/BmpView/mainfrm.h
trunk/third-party-sw/wtl/Samples/BmpView/props.h
trunk/third-party-sw/wtl/Samples/BmpView/res/
trunk/third-party-sw/wtl/Samples/BmpView/res/BmpView.exe.manifest
trunk/third-party-sw/wtl/Samples/BmpView/res/BmpView.ico
trunk/third-party-sw/wtl/Samples/BmpView/res/Toolbar.bmp
trunk/third-party-sw/wtl/Samples/BmpView/res/ToolbarCE.bmp
trunk/third-party-sw/wtl/Samples/BmpView/resource.h
trunk/third-party-sw/wtl/Samples/BmpView/resourcece.h
trunk/third-party-sw/wtl/Samples/BmpView/resourceppc.h
trunk/third-party-sw/wtl/Samples/BmpView/stdafx.cpp
trunk/third-party-sw/wtl/Samples/BmpView/stdafx.h
trunk/third-party-sw/wtl/Samples/BmpView/view.h
trunk/third-party-sw/wtl/Samples/GuidGen/
trunk/third-party-sw/wtl/Samples/GuidGen/GuidGen.cpp
trunk/third-party-sw/wtl/Samples/GuidGen/GuidGen.dsp
trunk/third-party-sw/wtl/Samples/GuidGen/GuidGen.dsw
trunk/third-party-sw/wtl/Samples/GuidGen/GuidGen.rc
trunk/third-party-sw/wtl/Samples/GuidGen/GuidGen.sln
trunk/third-party-sw/wtl/Samples/GuidGen/GuidGen.vcproj
trunk/third-party-sw/wtl/Samples/GuidGen/GuidGenCE.rc
trunk/third-party-sw/wtl/Samples/GuidGen/GuidGenCE.vcp
trunk/third-party-sw/wtl/Samples/GuidGen/GuidGenCE.vcw
trunk/third-party-sw/wtl/Samples/GuidGen/aboutdlg.h
trunk/third-party-sw/wtl/Samples/GuidGen/maindlg.h
trunk/third-party-sw/wtl/Samples/GuidGen/res/
trunk/third-party-sw/wtl/Samples/GuidGen/res/GuidGen.exe.manifest
trunk/third-party-sw/wtl/Samples/GuidGen/res/GuidGen.ico
trunk/third-party-sw/wtl/Samples/GuidGen/resource.h
trunk/third-party-sw/wtl/Samples/GuidGen/resourcece.h
trunk/third-party-sw/wtl/Samples/GuidGen/stdatl.cpp
trunk/third-party-sw/wtl/Samples/GuidGen/stdatl.h
trunk/third-party-sw/wtl/Samples/ImageView/
trunk/third-party-sw/wtl/Samples/ImageView/ImageView.EVC.rc
trunk/third-party-sw/wtl/Samples/ImageView/ImageView.VS.rc
trunk/third-party-sw/wtl/Samples/ImageView/ImageView.VS.rc2
trunk/third-party-sw/wtl/Samples/ImageView/ImageView.cpp
trunk/third-party-sw/wtl/Samples/ImageView/ImageView.sln
trunk/third-party-sw/wtl/Samples/ImageView/ImageView.vcp
trunk/third-party-sw/wtl/Samples/ImageView/ImageView.vcproj
trunk/third-party-sw/wtl/Samples/ImageView/ImageView.vcw
trunk/third-party-sw/wtl/Samples/ImageView/ImageViewdlg.h
trunk/third-party-sw/wtl/Samples/ImageView/ImageViewview.h
trunk/third-party-sw/wtl/Samples/ImageView/mainfrm.h
trunk/third-party-sw/wtl/Samples/ImageView/res/
trunk/third-party-sw/wtl/Samples/ImageView/res/BmpView.ico
trunk/third-party-sw/wtl/Samples/ImageView/res/bitmap1.bmp
trunk/third-party-sw/wtl/Samples/ImageView/res/bitmap2.bmp
trunk/third-party-sw/wtl/Samples/ImageView/resource.h
trunk/third-party-sw/wtl/Samples/ImageView/stdafx.cpp
trunk/third-party-sw/wtl/Samples/ImageView/stdafx.h
trunk/third-party-sw/wtl/Samples/MDIDocVw/
trunk/third-party-sw/wtl/Samples/MDIDocVw/HELLO.ICO
trunk/third-party-sw/wtl/Samples/MDIDocVw/MDI.ICO
trunk/third-party-sw/wtl/Samples/MDIDocVw/MDI.cpp
trunk/third-party-sw/wtl/Samples/MDIDocVw/MDI.dsp
trunk/third-party-sw/wtl/Samples/MDIDocVw/MDI.dsw
trunk/third-party-sw/wtl/Samples/MDIDocVw/MDI.rc
trunk/third-party-sw/wtl/Samples/MDIDocVw/MDI.sln
trunk/third-party-sw/wtl/Samples/MDIDocVw/MDI.vcproj
trunk/third-party-sw/wtl/Samples/MDIDocVw/mainfrm.h
trunk/third-party-sw/wtl/Samples/MDIDocVw/res/
trunk/third-party-sw/wtl/Samples/MDIDocVw/res/HelloDoc.ico
trunk/third-party-sw/wtl/Samples/MDIDocVw/res/MDI.ICO
trunk/third-party-sw/wtl/Samples/MDIDocVw/res/MDI.RC2
trunk/third-party-sw/wtl/Samples/MDIDocVw/res/MDI.exe.manifest
trunk/third-party-sw/wtl/Samples/MDIDocVw/res/Toolbar.bmp
trunk/third-party-sw/wtl/Samples/MDIDocVw/res/idr_boun.ico
trunk/third-party-sw/wtl/Samples/MDIDocVw/resource.h
trunk/third-party-sw/wtl/Samples/MDIDocVw/stdafx.cpp
trunk/third-party-sw/wtl/Samples/MDIDocVw/stdafx.h
trunk/third-party-sw/wtl/Samples/MTPad/
trunk/third-party-sw/wtl/Samples/MTPad/MTPad.cpp
trunk/third-party-sw/wtl/Samples/MTPad/MTPad.dsp
trunk/third-party-sw/wtl/Samples/MTPad/MTPad.dsw
trunk/third-party-sw/wtl/Samples/MTPad/MTPad.h
trunk/third-party-sw/wtl/Samples/MTPad/MTPad.rc
trunk/third-party-sw/wtl/Samples/MTPad/MTPad.sln
trunk/third-party-sw/wtl/Samples/MTPad/MTPad.vcproj
trunk/third-party-sw/wtl/Samples/MTPad/MTPadCE.rc
trunk/third-party-sw/wtl/Samples/MTPad/MTPadCE.vcp
trunk/third-party-sw/wtl/Samples/MTPad/MTPadCE.vcw
trunk/third-party-sw/wtl/Samples/MTPad/aboutdlg.h
trunk/third-party-sw/wtl/Samples/MTPad/finddlg.h
trunk/third-party-sw/wtl/Samples/MTPad/mainfrm.h
trunk/third-party-sw/wtl/Samples/MTPad/res/
trunk/third-party-sw/wtl/Samples/MTPad/res/MTPad.exe.manifest
trunk/third-party-sw/wtl/Samples/MTPad/res/MTPad.ico
trunk/third-party-sw/wtl/Samples/MTPad/res/MTPadDoc.ico
trunk/third-party-sw/wtl/Samples/MTPad/res/Toolbar.bmp
trunk/third-party-sw/wtl/Samples/MTPad/res/ToolbarCE.bmp
trunk/third-party-sw/wtl/Samples/MTPad/res/printpre.bmp
trunk/third-party-sw/wtl/Samples/MTPad/resource.h
trunk/third-party-sw/wtl/Samples/MTPad/resourcece.h
trunk/third-party-sw/wtl/Samples/MTPad/stdatl.cpp
trunk/third-party-sw/wtl/Samples/MTPad/stdatl.h
trunk/third-party-sw/wtl/Samples/MTPad/view.h
trunk/third-party-sw/wtl/Samples/MTPad7/
trunk/third-party-sw/wtl/Samples/MTPad7/MTPad.cpp
trunk/third-party-sw/wtl/Samples/MTPad7/MTPad.h
trunk/third-party-sw/wtl/Samples/MTPad7/MTPad.vcproj
trunk/third-party-sw/wtl/Samples/MTPad7/MTPad7.sln
trunk/third-party-sw/wtl/Samples/MTPad7/MTPadRibbon.h
trunk/third-party-sw/wtl/Samples/MTPad7/MTPadRibbon.rc
trunk/third-party-sw/wtl/Samples/MTPad7/MTPadRibbon.xml
trunk/third-party-sw/wtl/Samples/MTPad7/aboutdlg.h
trunk/third-party-sw/wtl/Samples/MTPad7/finddlg.h
trunk/third-party-sw/wtl/Samples/MTPad7/mainfrm.h
trunk/third-party-sw/wtl/Samples/MTPad7/mtpad.rc
trunk/third-party-sw/wtl/Samples/MTPad7/res/
trunk/third-party-sw/wtl/Samples/MTPad7/res/ClosePreviewHH.bmp
trunk/third-party-sw/wtl/Samples/MTPad7/res/GoToNextHS.bmp
trunk/third-party-sw/wtl/Samples/MTPad7/res/GoToPreviousHS.bmp
trunk/third-party-sw/wtl/Samples/MTPad7/res/MTPad.ico
trunk/third-party-sw/wtl/Samples/MTPad7/res/MTPadDoc.ico
trunk/third-party-sw/wtl/Samples/MTPad7/res/PortraitLandscapeHS.bmp
trunk/third-party-sw/wtl/Samples/MTPad7/res/PrintPreviewL.bmp
trunk/third-party-sw/wtl/Samples/MTPad7/res/SelectAllS.bmp
trunk/third-party-sw/wtl/Samples/MTPad7/res/Toolbar.bmp
trunk/third-party-sw/wtl/Samples/MTPad7/res/UndoS.bmp
trunk/third-party-sw/wtl/Samples/MTPad7/res/printpre.bmp
trunk/third-party-sw/wtl/Samples/MTPad7/resource.h
trunk/third-party-sw/wtl/Samples/MTPad7/stdatl.cpp
trunk/third-party-sw/wtl/Samples/MTPad7/stdatl.h
trunk/third-party-sw/wtl/Samples/MTPad7/view.h
trunk/third-party-sw/wtl/Samples/MiniPie/
trunk/third-party-sw/wtl/Samples/MiniPie/MiniPie.cpp
trunk/third-party-sw/wtl/Samples/MiniPie/MiniPie.rc2
trunk/third-party-sw/wtl/Samples/MiniPie/MiniPie.sln
trunk/third-party-sw/wtl/Samples/MiniPie/MiniPie.vcproj
trunk/third-party-sw/wtl/Samples/MiniPie/MiniPieFrame.cpp
trunk/third-party-sw/wtl/Samples/MiniPie/MiniPieFrame.h
trunk/third-party-sw/wtl/Samples/MiniPie/MiniPieppc.rc
trunk/third-party-sw/wtl/Samples/MiniPie/MiniPiesp.rc
trunk/third-party-sw/wtl/Samples/MiniPie/UrlDlg.cpp
trunk/third-party-sw/wtl/Samples/MiniPie/UrlDlg.h
trunk/third-party-sw/wtl/Samples/MiniPie/res/
trunk/third-party-sw/wtl/Samples/MiniPie/res/MiniPie.ico
trunk/third-party-sw/wtl/Samples/MiniPie/resourceppc.h
trunk/third-party-sw/wtl/Samples/MiniPie/resourcesp.h
trunk/third-party-sw/wtl/Samples/MiniPie/stdafx.cpp
trunk/third-party-sw/wtl/Samples/MiniPie/stdafx.h
trunk/third-party-sw/wtl/Samples/SPControls/
trunk/third-party-sw/wtl/Samples/SPControls/SPcontrols.cpp
trunk/third-party-sw/wtl/Samples/SPControls/SPcontrols.rc
trunk/third-party-sw/wtl/Samples/SPControls/SPcontrols.sln
trunk/third-party-sw/wtl/Samples/SPControls/SPcontrols.vcp
trunk/third-party-sw/wtl/Samples/SPControls/SPcontrols.vcproj
trunk/third-party-sw/wtl/Samples/SPControls/SPcontrols.vcw
trunk/third-party-sw/wtl/Samples/SPControls/atlcesp.rc
trunk/third-party-sw/wtl/Samples/SPControls/maindlg.h
trunk/third-party-sw/wtl/Samples/SPControls/res/
trunk/third-party-sw/wtl/Samples/SPControls/res/SPcontrols.ico
trunk/third-party-sw/wtl/Samples/SPControls/resource.h
trunk/third-party-sw/wtl/Samples/SPControls/stdafx.cpp
trunk/third-party-sw/wtl/Samples/SPControls/stdafx.h
trunk/third-party-sw/wtl/Samples/TabBrowser/
trunk/third-party-sw/wtl/Samples/TabBrowser/AboutDlg.h
trunk/third-party-sw/wtl/Samples/TabBrowser/AddressCombo.h
trunk/third-party-sw/wtl/Samples/TabBrowser/BrowserView.h
trunk/third-party-sw/wtl/Samples/TabBrowser/CustomTabView.h
trunk/third-party-sw/wtl/Samples/TabBrowser/MainFrm.h
trunk/third-party-sw/wtl/Samples/TabBrowser/OpenDlg.h
trunk/third-party-sw/wtl/Samples/TabBrowser/TabBrowser.cpp
trunk/third-party-sw/wtl/Samples/TabBrowser/TabBrowser.h
trunk/third-party-sw/wtl/Samples/TabBrowser/TabBrowser.rc
trunk/third-party-sw/wtl/Samples/TabBrowser/TabBrowser60.dsp
trunk/third-party-sw/wtl/Samples/TabBrowser/TabBrowser60.dsw
trunk/third-party-sw/wtl/Samples/TabBrowser/TabBrowser70.sln
trunk/third-party-sw/wtl/Samples/TabBrowser/TabBrowser70.vcproj
trunk/third-party-sw/wtl/Samples/TabBrowser/TabBrowser71.sln
trunk/third-party-sw/wtl/Samples/TabBrowser/TabBrowser71.vcproj
trunk/third-party-sw/wtl/Samples/TabBrowser/TabBrowser80.sln
trunk/third-party-sw/wtl/Samples/TabBrowser/TabBrowser80.vcproj
trunk/third-party-sw/wtl/Samples/TabBrowser/TabBrowser80x.sln
trunk/third-party-sw/wtl/Samples/TabBrowser/TabBrowser80x.vcproj
trunk/third-party-sw/wtl/Samples/TabBrowser/WindowsDlg.h
trunk/third-party-sw/wtl/Samples/TabBrowser/res/
trunk/third-party-sw/wtl/Samples/TabBrowser/res/Go.bmp
trunk/third-party-sw/wtl/Samples/TabBrowser/res/PageImage.bmp
trunk/third-party-sw/wtl/Samples/TabBrowser/res/TabBrowser.exe.manifest
trunk/third-party-sw/wtl/Samples/TabBrowser/res/TabBrowser.ico
trunk/third-party-sw/wtl/Samples/TabBrowser/res/TabToolbar.bmp
trunk/third-party-sw/wtl/Samples/TabBrowser/res/Toolbar.bmp
trunk/third-party-sw/wtl/Samples/TabBrowser/res/Toolbar_Big.bmp
trunk/third-party-sw/wtl/Samples/TabBrowser/resource.h
trunk/third-party-sw/wtl/Samples/TabBrowser/stdafx.cpp
trunk/third-party-sw/wtl/Samples/TabBrowser/stdafx.h
trunk/third-party-sw/wtl/Samples/WTLExplorer/
trunk/third-party-sw/wtl/Samples/WTLExplorer/ExplorerCombo.H
trunk/third-party-sw/wtl/Samples/WTLExplorer/MainFrm.Cpp
trunk/third-party-sw/wtl/Samples/WTLExplorer/ShellMgr.Cpp
trunk/third-party-sw/wtl/Samples/WTLExplorer/ShellMgr.H
trunk/third-party-sw/wtl/Samples/WTLExplorer/WTLExplorer.cpp
trunk/third-party-sw/wtl/Samples/WTLExplorer/WTLExplorer.dsp
trunk/third-party-sw/wtl/Samples/WTLExplorer/WTLExplorer.dsw
trunk/third-party-sw/wtl/Samples/WTLExplorer/WTLExplorer.rc
trunk/third-party-sw/wtl/Samples/WTLExplorer/mainfrm.h
trunk/third-party-sw/wtl/Samples/WTLExplorer/res/
trunk/third-party-sw/wtl/Samples/WTLExplorer/res/Toolbar.bmp
trunk/third-party-sw/wtl/Samples/WTLExplorer/res/WTLExplorer.exe.manifest
trunk/third-party-sw/wtl/Samples/WTLExplorer/res/WTLExplorer.ico
trunk/third-party-sw/wtl/Samples/WTLExplorer/res/go.bmp
trunk/third-party-sw/wtl/Samples/WTLExplorer/res/idt_go1.bmp
trunk/third-party-sw/wtl/Samples/WTLExplorer/resource.h
trunk/third-party-sw/wtl/Samples/WTLExplorer/stdafx.cpp
trunk/third-party-sw/wtl/Samples/WTLExplorer/stdafx.h
trunk/third-party-sw/wtl/Samples/Wizard97Test/
trunk/third-party-sw/wtl/Samples/Wizard97Test/Wizard/
trunk/third-party-sw/wtl/Samples/Wizard97Test/Wizard/FolderDialogStatusText.h
trunk/third-party-sw/wtl/Samples/Wizard97Test/Wizard/TestWizard.cpp
trunk/third-party-sw/wtl/Samples/Wizard97Test/Wizard/TestWizard.h
trunk/third-party-sw/wtl/Samples/Wizard97Test/Wizard/TestWizardCompletionPage.cpp
trunk/third-party-sw/wtl/Samples/Wizard97Test/Wizard/TestWizardCompletionPage.h
trunk/third-party-sw/wtl/Samples/Wizard97Test/Wizard/TestWizardFilePreviewPage.cpp
trunk/third-party-sw/wtl/Samples/Wizard97Test/Wizard/TestWizardFilePreviewPage.h
trunk/third-party-sw/wtl/Samples/Wizard97Test/Wizard/TestWizardInfo.cpp
trunk/third-party-sw/wtl/Samples/Wizard97Test/Wizard/TestWizardInfo.h
trunk/third-party-sw/wtl/Samples/Wizard97Test/Wizard/TestWizardOutputPage.cpp
trunk/third-party-sw/wtl/Samples/Wizard97Test/Wizard/TestWizardOutputPage.h
trunk/third-party-sw/wtl/Samples/Wizard97Test/Wizard/TestWizardPathFilterPage.cpp
trunk/third-party-sw/wtl/Samples/Wizard97Test/Wizard/TestWizardPathFilterPage.h
trunk/third-party-sw/wtl/Samples/Wizard97Test/Wizard/TestWizardSheet.cpp
trunk/third-party-sw/wtl/Samples/Wizard97Test/Wizard/TestWizardSheet.h
trunk/third-party-sw/wtl/Samples/Wizard97Test/Wizard/TestWizardWelcomePage.cpp
trunk/third-party-sw/wtl/Samples/Wizard97Test/Wizard/TestWizardWelcomePage.h
trunk/third-party-sw/wtl/Samples/Wizard97Test/Wizard97Test.cpp
trunk/third-party-sw/wtl/Samples/Wizard97Test/Wizard97Test.dsp
trunk/third-party-sw/wtl/Samples/Wizard97Test/Wizard97Test.dsw
trunk/third-party-sw/wtl/Samples/Wizard97Test/Wizard97Test.h
trunk/third-party-sw/wtl/Samples/Wizard97Test/Wizard97Test.rc
trunk/third-party-sw/wtl/Samples/Wizard97Test/Wizard97Test...
[truncated message content] |
|
From: <xr...@us...> - 2012-06-20 22:28:11
|
Revision: 1408
http://scstudio.svn.sourceforge.net/scstudio/?rev=1408&view=rev
Author: xrehak
Date: 2012-06-20 22:28:04 +0000 (Wed, 20 Jun 2012)
Log Message:
-----------
Cmake for antlr and lpsolved improved. Detection of 32/64-bit.
Modified Paths:
--------------
trunk/CMakeLists.txt
trunk/FindANTLR.cmake
trunk/FindLpSolve.cmake
Added Paths:
-----------
trunk/third-party-sw/antlr/runtime/C/lib32/
trunk/third-party-sw/antlr/runtime/C/lib64/
trunk/third-party-sw/antlr/runtime/C/lib64/antlr3c.lib
trunk/third-party-sw/antlr/runtime/C/lib64/antlr3cd.lib
Removed Paths:
-------------
trunk/third-party-sw/antlr/runtime/C/32bit/
trunk/third-party-sw/antlr/runtime/C/antlr3c.lib
trunk/third-party-sw/antlr/runtime/C/antlr3cd.lib
Modified: trunk/CMakeLists.txt
===================================================================
--- trunk/CMakeLists.txt 2012-06-20 19:05:09 UTC (rev 1407)
+++ trunk/CMakeLists.txt 2012-06-20 22:28:04 UTC (rev 1408)
@@ -29,10 +29,20 @@
ADD_DEFINITIONS(-DHOST_IS_BIG_ENDIAN)
ENDIF(BIG_ENDIAN)
+# 32/64 platform test
+IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ SET(ARCHITECTURE_PTR_SIZE "64")
+ MESSAGE(STATUS "Check architecture - 64-bit")
+ELSE()
+ SET(ARCHITECTURE_PTR_SIZE "32")
+ MESSAGE(STATUS "Check architecture - 32-bit")
+ENDIF()
+
# Enforce strict ANSI C/C++ compliancy checking
IF(CMAKE_COMPILER_IS_GNUCXX)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -ansi -Wall -Wno-long-long")
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
+
# Disable microsoft security warnings
IF(MSVC)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS")
@@ -59,7 +69,7 @@
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR})
# antlr setup
-IF (WIN32)
+IF(WIN32)
IF(NOT ANTLR_ROOT)
#set implicit ANTLR_ROOT
SET(ANTLR_ROOT "${CMAKE_SOURCE_DIR}/third-party-sw/antlr/" CACHE PATH "The Antlr directory root.")
Modified: trunk/FindANTLR.cmake
===================================================================
--- trunk/FindANTLR.cmake 2012-06-20 19:05:09 UTC (rev 1407)
+++ trunk/FindANTLR.cmake 2012-06-20 22:28:04 UTC (rev 1408)
@@ -1,4 +1,5 @@
# set the default ANTLR_ROOT value
+
IF(NOT ANTLR_ROOT)
SET(ANTLR_ROOT $ENV{ANTLR_ROOT} CACHE PATH "The ANTLR directory root.")
ENDIF(NOT ANTLR_ROOT)
@@ -11,6 +12,7 @@
antlr-3.1.1.jar
PATHS
${ANTLR_ROOT}/lib
+# NO_DEFAULT_PATH
DOC "The ANTLR class file")
FIND_LIBRARY(ANTLR_LIBRARY
@@ -18,6 +20,8 @@
PATHS
${ANTLR_ROOT}/runtime/C
${ANTLR_ROOT}/runtime/C/Release
+ ${ANTLR_ROOT}/runtime/C/lib${ARCHITECTURE_PTR_SIZE}
+# NO_DEFAULT_PATH
DOC "The ANTLR library")
FIND_LIBRARY(ANTLR_LIBRARY_DEBUG
@@ -25,6 +29,8 @@
PATHS
${ANTLR_ROOT}/runtime/C
${ANTLR_ROOT}/runtime/C/Debug
+ ${ANTLR_ROOT}/runtime/C/lib${ARCHITECTURE_PTR_SIZE}
+# NO_DEFAULT_PATH
DOC "The ANTLR debug library")
IF(NOT ANTLR_LIBRARY_DEBUG)
@@ -41,6 +47,7 @@
NAMES antlr3.h
PATHS
${ANTLR_ROOT}/runtime/C/include
+# NO_DEFAULT_PATH
DOC "The ANTLR include files")
INCLUDE(FindPackageHandleStandardArgs)
Modified: trunk/FindLpSolve.cmake
===================================================================
--- trunk/FindLpSolve.cmake 2012-06-20 19:05:09 UTC (rev 1407)
+++ trunk/FindLpSolve.cmake 2012-06-20 22:28:04 UTC (rev 1408)
@@ -8,25 +8,14 @@
ENDIF(ENV{LPSOLVE_ROOT})
ENDIF(NOT LPSOLVE_ROOT)
-IF(CMAKE_SIZEOF_VOID_P EQUAL 8)
- FIND_LIBRARY(LPSOLVE_LIBRARY
- NAMES lpsolve55
- PATHS
- ${LPSOLVE_ROOT}
- ${LPSOLVE_ROOT}/lib
- ${LPSOLVE_ROOT}/lib64
- NO_DEFAULT_PATH
- DOC "The lp_solve library")
-ELSE()
- FIND_LIBRARY(LPSOLVE_LIBRARY
- NAMES lpsolve55
- PATHS
- ${LPSOLVE_ROOT}
- ${LPSOLVE_ROOT}/lib
- ${LPSOLVE_ROOT}/lib32
- NO_DEFAULT_PATH
- DOC "The lp_solve library")
-ENDIF()
+FIND_LIBRARY(LPSOLVE_LIBRARY
+ NAMES lpsolve55
+ PATHS
+ ${LPSOLVE_ROOT}
+ ${LPSOLVE_ROOT}/lib
+ ${LPSOLVE_ROOT}/lib${ARCHITECTURE_PTR_SIZE}
+ NO_DEFAULT_PATH
+ DOC "The lp_solve library")
FIND_PATH(LPSOLVE_INCLUDE_DIR
NAMES lp_lib.h
Deleted: trunk/third-party-sw/antlr/runtime/C/antlr3c.lib
===================================================================
(Binary files differ)
Deleted: trunk/third-party-sw/antlr/runtime/C/antlr3cd.lib
===================================================================
(Binary files differ)
Copied: trunk/third-party-sw/antlr/runtime/C/lib64/antlr3c.lib (from rev 1407, trunk/third-party-sw/antlr/runtime/C/antlr3c.lib)
===================================================================
(Binary files differ)
Copied: trunk/third-party-sw/antlr/runtime/C/lib64/antlr3cd.lib (from rev 1407, trunk/third-party-sw/antlr/runtime/C/antlr3cd.lib)
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <xr...@us...> - 2012-06-21 00:55:48
|
Revision: 1411
http://scstudio.svn.sourceforge.net/scstudio/?rev=1411&view=rev
Author: xrehak
Date: 2012-06-21 00:55:42 +0000 (Thu, 21 Jun 2012)
Log Message:
-----------
Support for 3party ANTLR for linux. swotched off in CMakeList.
Modified Paths:
--------------
trunk/FindANTLR.cmake
Added Paths:
-----------
trunk/third-party-sw/antlr/runtime/C/lib32/libantlr3c.so
trunk/third-party-sw/antlr/runtime/C/lib64/libantlr3c.so
Modified: trunk/FindANTLR.cmake
===================================================================
--- trunk/FindANTLR.cmake 2012-06-21 00:36:39 UTC (rev 1410)
+++ trunk/FindANTLR.cmake 2012-06-21 00:55:42 UTC (rev 1411)
@@ -12,7 +12,7 @@
antlr-3.1.1.jar
PATHS
${ANTLR_ROOT}/lib
-# NO_DEFAULT_PATH
+ NO_DEFAULT_PATH
DOC "The ANTLR class file")
FIND_LIBRARY(ANTLR_LIBRARY
@@ -21,7 +21,7 @@
${ANTLR_ROOT}/runtime/C
${ANTLR_ROOT}/runtime/C/Release
${ANTLR_ROOT}/runtime/C/lib${ARCHITECTURE_PTR_SIZE}
-# NO_DEFAULT_PATH
+ NO_DEFAULT_PATH
DOC "The ANTLR library")
FIND_LIBRARY(ANTLR_LIBRARY_DEBUG
@@ -30,7 +30,7 @@
${ANTLR_ROOT}/runtime/C
${ANTLR_ROOT}/runtime/C/Debug
${ANTLR_ROOT}/runtime/C/lib${ARCHITECTURE_PTR_SIZE}
-# NO_DEFAULT_PATH
+ NO_DEFAULT_PATH
DOC "The ANTLR debug library")
IF(NOT ANTLR_LIBRARY_DEBUG)
@@ -47,7 +47,7 @@
NAMES antlr3.h
PATHS
${ANTLR_ROOT}/runtime/C/include
-# NO_DEFAULT_PATH
+ NO_DEFAULT_PATH
DOC "The ANTLR include files")
INCLUDE(FindPackageHandleStandardArgs)
Added: trunk/third-party-sw/antlr/runtime/C/lib32/libantlr3c.so
===================================================================
(Binary files differ)
Property changes on: trunk/third-party-sw/antlr/runtime/C/lib32/libantlr3c.so
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
Added: trunk/third-party-sw/antlr/runtime/C/lib64/libantlr3c.so
===================================================================
(Binary files differ)
Property changes on: trunk/third-party-sw/antlr/runtime/C/lib64/libantlr3c.so
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|