You can subscribe to this list here.
| 2008 |
Jan
|
Feb
|
Mar
(7) |
Apr
(42) |
May
(45) |
Jun
(5) |
Jul
(2) |
Aug
(6) |
Sep
|
Oct
(4) |
Nov
(12) |
Dec
(18) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2009 |
Jan
(38) |
Feb
(15) |
Mar
(17) |
Apr
(25) |
May
(9) |
Jun
(8) |
Jul
(18) |
Aug
(3) |
Sep
(114) |
Oct
(58) |
Nov
(49) |
Dec
(42) |
| 2010 |
Jan
(20) |
Feb
(80) |
Mar
(72) |
Apr
(26) |
May
(76) |
Jun
(6) |
Jul
(19) |
Aug
(28) |
Sep
(119) |
Oct
(6) |
Nov
(11) |
Dec
(15) |
| 2011 |
Jan
(10) |
Feb
(25) |
Mar
(22) |
Apr
(11) |
May
(14) |
Jun
(12) |
Jul
(55) |
Aug
(18) |
Sep
(14) |
Oct
(9) |
Nov
(6) |
Dec
(39) |
| 2012 |
Jan
(53) |
Feb
(18) |
Mar
(35) |
Apr
(34) |
May
(5) |
Jun
(40) |
Jul
(8) |
Aug
(4) |
Sep
(30) |
Oct
(19) |
Nov
(8) |
Dec
(23) |
| 2013 |
Jan
(28) |
Feb
(39) |
Mar
(146) |
Apr
(5) |
May
(79) |
Jun
(11) |
Jul
(21) |
Aug
|
Sep
(5) |
Oct
(4) |
Nov
(10) |
Dec
(1) |
| 2014 |
Jan
(18) |
Feb
(8) |
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2016 |
Jan
(7) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <koc...@us...> - 2008-04-08 08:02:40
|
Revision: 13
http://scstudio.svn.sourceforge.net/scstudio/?rev=13&view=rev
Author: kocianon
Date: 2008-04-08 01:02:37 -0700 (Tue, 08 Apr 2008)
Log Message:
-----------
Coding Conventions changes
Modified Paths:
--------------
trunk/src/data/livenodedetection.cc
Modified: trunk/src/data/livenodedetection.cc
===================================================================
--- trunk/src/data/livenodedetection.cc 2008-04-08 07:17:12 UTC (rev 12)
+++ trunk/src/data/livenodedetection.cc 2008-04-08 08:02:37 UTC (rev 13)
@@ -27,7 +27,7 @@
private:
ReferenceNodePtr m_ReferenceNodePtrNode;
- bool visited;
+ bool m_visited;
list<GraphNode> m_graphNodeList;
public:
GraphNode(ReferenceNodePtr ref) : m_ReferenceNodePtrNode(ref), visited(false) {}
@@ -45,21 +45,27 @@
list<ReferenceNodePtr> referenceNodePtrList;
- list<ReferenceNodePtr> reachReferenceNodePtrList;
+ list<ReferenceNodePtr> reachedReferenceNodePtrList;
StartNodePtr startNodePrt;
HMscPtr hMscPtr;
- GraphNode m_GraphNodeFront;
- GraphNode m_GraphNodeSuccessor;
-
- startNodePrt = hMscPtr->m_start;
- referenceNodePtrList = startNodePrt->m_nodes;
-
+ GraphNode graphNodeFront;
+ GraphNode graphNodeSuccessor;
+
map<ReferenceNodePtr,list<GraphNode>> relationGraphRefmap;
list<ReferenceNodePtr>::iterator itReferenceNodePtr;
+ list<ReferenceNodePtr>::iterator itReferenceNodePtrSec;
list<GraphNode>::iterator itGraphNode;
+
+
+ /**
+ * getting data from HMsc object
+ */
+
+ startNodePrt = hMscPtr->m_start;
+ referenceNodePtrList = startNodePrt->m_nodes;
/**
*
@@ -67,61 +73,69 @@
*/
- for (itReferenceNodePtr = m_ReferenceNodePtrList.begin(); itReferenceNodePtr != m_ReferenceNodePtrList.end(); itReferenceNodePtr++ ){
- GraphNode m_newGraphNode = GraphNode(*itReferenceNodePtr);
- GraphNodeList.push_back(m_newGraphNode);
- if(*itReferenceNodePtr->m_end!=null)
- GraphNodeEndList.push_back(m_newGraphNode);
+ for (itReferenceNodePtr = referenceNodePtrList.begin(); itReferenceNodePtr != referenceNodePtrList.end(); referenceNodePtr++ )
+ {
+ GraphNode newGraphNode = GraphNode(*itReferenceNodePtr);
+ GraphNodeList.push_back(newGraphNode);
+ if((*itReferenceNodePtr)->m_end!=null)
+ GraphNodeEndList.push_back(newGraphNode);
- for (itReferenceNodePtr = itReferenceNodePtr->m_successors.begin(); itReferenceNodePtr != itReferenceNodePtr->m_successors.end(); itReferenceNodePtrChild++ ){
- if(m_mapReferenceNodePtrChild.find(*itReferenceNodePtr)==m_mapReferenceNodePtrChild.end){
- m_mapReferenceNodePtrChild.insert(pair<ReferenceNodePtr,GraphNode>(*itReferenceNodePtr,null))
- }
- // dont like selfish relations
- if(*itReferenceNodePtr != *itReferenceNodePtr)
- m_mapReferenceNodePtrChild.find(*itReferenceNodePtr)->second.push_back(m_newGraphNode);
- }
+ for (itReferenceNodePtrSec = (*itReferenceNodePtr)->m_successors.begin(); itReferenceNodePtrSec != (*itReferenceNodePtr)->m_successors.end(); itReferenceNodePtrSec++ )
+ {
+ // If list of particular refecenceNode doesnt exist just create it
+ if(relationGraphRefmap.find(*itReferenceNodePtrSec)==relationGraphRefmap.end)
+ relationGraphRefmap.insert(pair<ReferenceNodePtr,GraphNode>(*itReferenceNodePtrSec,null));
+ // dont like selfish relations -- it
+ if(*itReferenceNodePtr != *itReferenceNodePtrSec)
+ (relationGraphRefmap.find(*itReferenceNodePtrSec)->second).push_back(newGraphNode);
+ }
- }
+ }
- /**
- *
- * setting relations
- *
- */
-
-
- for(itGraphNode=GraphNodeList.begin(); itGraphNode != GraphNodeList.end(); itGraphNode++)
+
+ /**
+ *
+ * setting relations
+ *
+ */
+
+ for(itGraphNode=graphNodeList.begin(); itGraphNode != graphNodeList.end(); itGraphNode++)
{
- if(m_mapReferenceNodePtrChild.find((*itGraphNode)->m_ReferenceNodePtrNode)!=m_mapReferenceNodePtrChild.end())
+ if(relationGraphRefmap.find((*itGraphNode)->m_ReferenceNodePtrNode)!=.end())
{
- list<GraphNode> m_GraphNodelist = m_mapReferenceNodePtrChild.find((*itGraphNode)->m_ReferenceNodePtrNode)->second;
- for (itReferenceNodePtr = m_GraphNodelist.begin(); itReferenceNodePtr != m_GraphNodelist.end(); itReferenceNodePtr++ )
+ list<GraphNode> succGraphNodelist = relationGraphRefmap.find((*itGraphNode)->m_ReferenceNodePtrNode)->second;
+ for (itReferenceNodePtr = succGraphNodelist.begin(); itReferenceNodePtr != succGraphNodelist.end(); itReferenceNodePtr++)
{
- itGraphNode->graphNodeList.push_back(*itReferenceNodePtr);
+ (*itGraphNode)->m_graphNodeList.push_back(*itReferenceNodePtr);
}
}
}
- /**
- * finaly nodes to the queue
- */
+
+ /**
+ * finaly nodes to the queue
+ */
- for(itGraphNode = GraphNodeEndList.begin(); itGraphNode != GraphNodeEndList.end(); itGraphNode++){
- m_GraphNodeQueue.push(*itGraphNode);
- }
+ for(itGraphNode = graphNodeEndList.begin(); itGraphNode != graphNodeEndList.end(); itGraphNode++)
+ {
+ graphNodeQueue.push(*itGraphNode);
+ }
- while(!m_GraphNodeQueue.empty()){
- m_GraphNodeFront = m_GraphNodeQueue.front();
- if(!m_GraphNodeFront.visited){
- m_returnList.push_back(m_GraphNodeFront.graphNodeList);
- for(itGraphNode = m_GraphNodeFront.graphNodeList.begin(); itGraphNode != m_GraphNodeFront.graphNodeList.end(); itGraphNode++){
- m_GraphNodeQueue.push(*itGraphNode);
- }
+
+ while(!graphNodeQueue.empty())
+ {
+ graphNodeFront = graphNodeQueue.front();
+ if(!graphNodeFront.visited)
+ {
+ reachedReferenceNodePrtList.push_back(graphNodeFront.graphNodeList);
+ for(itGraphNode = graphNodeFront.graphNodeList.begin(); itGraphNode != graphNodeFront.graphNodeList.end(); itGraphNode++)
+ {
+ graphNodeQueue.push(*itGraphNode);
}
- m_GraphNodeQueue.pop();
-
+ graphNodeFront.visited=false;
}
+ graphNodeQueue.pop();
+ }
return 0;
-}
\ No newline at end of file
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <koc...@us...> - 2008-04-08 07:17:15
|
Revision: 12
http://scstudio.svn.sourceforge.net/scstudio/?rev=12&view=rev
Author: kocianon
Date: 2008-04-08 00:17:12 -0700 (Tue, 08 Apr 2008)
Log Message:
-----------
Modified Paths:
--------------
trunk/src/data/livenodedetection.cc
Property Changed:
----------------
trunk/src/data/livenodedetection.cc
Modified: trunk/src/data/livenodedetection.cc
===================================================================
--- trunk/src/data/livenodedetection.cc 2008-04-07 18:47:17 UTC (rev 11)
+++ trunk/src/data/livenodedetection.cc 2008-04-08 07:17:12 UTC (rev 12)
@@ -13,7 +13,7 @@
*
* Copyright (c) 2008 Jindra Babica <ba...@ma...>
*
- * $Id: $
+ * $Id$
*/
#include <list>
@@ -22,63 +22,65 @@
#include "msc.h"
-class GraphNode {
+class GraphNode
+{
+
private:
- ReferenceNodePtr m_ReferenceNodePtrNode;
+ ReferenceNodePtr m_ReferenceNodePtrNode;
+ bool visited;
+ list<GraphNode> m_graphNodeList;
public:
- boolean visited;
- list<GraphNode> graphNodeList;
- GraphNode(ReferenceNodePtr ref) : m_ReferenceNodePtrNode(ref), visited(false) {}
-
+ GraphNode(ReferenceNodePtr ref) : m_ReferenceNodePtrNode(ref), visited(false) {}
+
};
using namespace std;
-//
-//
-//
-ReferenceNodePtr main(int argc, char** argv) {
+int main(int argc, char** argv)
+{
- list<GraphNode> GraphNodeList;
- list<GraphNode> GraphNodeEndList;
- queue<GraphNode> m_GraphNodeQueue;
+ list<GraphNode> graphNodeList;
+ list<GraphNode> graphNodeEndList;
+ queue<GraphNode> graphNodeQueue;
- list<ReferenceNodePtr> m_ReferenceNodePtrList;
- list<ReferenceNodePtr> m_returnList;
+ list<ReferenceNodePtr> referenceNodePtrList;
+ list<ReferenceNodePtr> reachReferenceNodePtrList;
- StartNodePtr m_StartNodePrt;
- HMscPtr m_HMscPtr;
+ StartNodePtr startNodePrt;
+ HMscPtr hMscPtr;
- GraphNode m_GraphNodeFront;
- GraphNode m_GraphNodeSuccessor;
+ GraphNode m_GraphNodeFront;
+ GraphNode m_GraphNodeSuccessor;
- m_StartNodePrt = m_HMscPtr->m_start;
- m_ReferenceNodePtrList = m_StartNodePrt->m_nodes;
+ startNodePrt = hMscPtr->m_start;
+ referenceNodePtrList = startNodePrt->m_nodes;
- list<m_mapDependences> m_listMapDependences;
- map<ReferenceNodePtr,list<GraphNode>> m_mapReferenceNodePtrChild;
+ map<ReferenceNodePtr,list<GraphNode>> relationGraphRefmap;
- /**
- *
- * creating GraphNodes and tab of relations
- */
+ list<ReferenceNodePtr>::iterator itReferenceNodePtr;
+ list<GraphNode>::iterator itGraphNode;
+
+ /**
+ *
+ * creating GraphNodes and tab of relations
+ */
- list<ReferenceNodePtr>::iterator itReferenceNodePtr;
+
for (itReferenceNodePtr = m_ReferenceNodePtrList.begin(); itReferenceNodePtr != m_ReferenceNodePtrList.end(); itReferenceNodePtr++ ){
GraphNode m_newGraphNode = GraphNode(*itReferenceNodePtr);
GraphNodeList.push_back(m_newGraphNode);
if(*itReferenceNodePtr->m_end!=null)
GraphNodeEndList.push_back(m_newGraphNode);
- list<ReferenceNodePtr>::iterator itReferenceNodePtrChild;
- for (itReferenceNodePtrChild = itReferenceNodePtr->m_successors.begin(); itReferenceNodePtrChild != itReferenceNodePtr->m_successors.end(); itReferenceNodePtrChild++ ){
- if(m_mapReferenceNodePtrChild.find(*itReferenceNodePtrChild)==m_mapReferenceNodePtrChild.end){
- m_mapReferenceNodePtrChild.insert(pair<ReferenceNodePtr,GraphNode>(*itReferenceNodePtrChild,null))
+
+ for (itReferenceNodePtr = itReferenceNodePtr->m_successors.begin(); itReferenceNodePtr != itReferenceNodePtr->m_successors.end(); itReferenceNodePtrChild++ ){
+ if(m_mapReferenceNodePtrChild.find(*itReferenceNodePtr)==m_mapReferenceNodePtrChild.end){
+ m_mapReferenceNodePtrChild.insert(pair<ReferenceNodePtr,GraphNode>(*itReferenceNodePtr,null))
}
// dont like selfish relations
- if(*itReferenceNodePtrChild != *itReferenceNodePtr)
- m_mapReferenceNodePtrChild.find(*itReferenceNodePtrChild)->second.push_back(m_newGraphNode);
+ if(*itReferenceNodePtr != *itReferenceNodePtr)
+ m_mapReferenceNodePtrChild.find(*itReferenceNodePtr)->second.push_back(m_newGraphNode);
}
}
@@ -89,16 +91,18 @@
*
*/
- list<GraphNode>::iterator itGraphNode;
- for(itGraphNode=GraphNodeList.begin(); itGraphNode != GraphNodeList.end(); itGraphNode++){
- if(m_mapReferenceNodePtrChild.find((*itGraphNode)->m_ReferenceNodePtrNode)!=m_mapReferenceNodePtrChild.end()){
- list<GraphNode> m_GraphNodelist = m_mapReferenceNodePtrChild.find((*itGraphNode)->m_ReferenceNodePtrNode)->second;
- for (itReferenceNodePtr = m_GraphNodelist.begin(); itReferenceNodePtrChild != m_GraphNodelist.end(); itReferenceNodePtr++ ){
- itGraphNode->graphNodeList.push_back(itReferenceNodePtr);
- }
-
- }
+
+ for(itGraphNode=GraphNodeList.begin(); itGraphNode != GraphNodeList.end(); itGraphNode++)
+ {
+ if(m_mapReferenceNodePtrChild.find((*itGraphNode)->m_ReferenceNodePtrNode)!=m_mapReferenceNodePtrChild.end())
+ {
+ list<GraphNode> m_GraphNodelist = m_mapReferenceNodePtrChild.find((*itGraphNode)->m_ReferenceNodePtrNode)->second;
+ for (itReferenceNodePtr = m_GraphNodelist.begin(); itReferenceNodePtr != m_GraphNodelist.end(); itReferenceNodePtr++ )
+ {
+ itGraphNode->graphNodeList.push_back(*itReferenceNodePtr);
+ }
}
+ }
/**
* finaly nodes to the queue
*/
@@ -119,6 +123,5 @@
}
- return m_returnList;
-}
-
+ return 0;
+}
\ No newline at end of file
Property changes on: trunk/src/data/livenodedetection.cc
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <koc...@us...> - 2008-04-07 18:47:25
|
Revision: 11
http://scstudio.svn.sourceforge.net/scstudio/?rev=11&view=rev
Author: kocianon
Date: 2008-04-07 11:47:17 -0700 (Mon, 07 Apr 2008)
Log Message:
-----------
Added Paths:
-----------
trunk/src/data/livenodedetection.cc
Added: trunk/src/data/livenodedetection.cc
===================================================================
--- trunk/src/data/livenodedetection.cc (rev 0)
+++ trunk/src/data/livenodedetection.cc 2008-04-07 18:47:17 UTC (rev 11)
@@ -0,0 +1,124 @@
+/*
+ * 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) 2008 Jindra Babica <ba...@ma...>
+ *
+ * $Id: $
+ */
+
+#include <list>
+#include <string>
+#include <map>
+#include "msc.h"
+
+
+class GraphNode {
+private:
+ ReferenceNodePtr m_ReferenceNodePtrNode;
+public:
+ boolean visited;
+ list<GraphNode> graphNodeList;
+ GraphNode(ReferenceNodePtr ref) : m_ReferenceNodePtrNode(ref), visited(false) {}
+
+};
+
+using namespace std;
+
+//
+//
+//
+ReferenceNodePtr main(int argc, char** argv) {
+
+ list<GraphNode> GraphNodeList;
+ list<GraphNode> GraphNodeEndList;
+ queue<GraphNode> m_GraphNodeQueue;
+
+
+ list<ReferenceNodePtr> m_ReferenceNodePtrList;
+ list<ReferenceNodePtr> m_returnList;
+
+ StartNodePtr m_StartNodePrt;
+ HMscPtr m_HMscPtr;
+
+ GraphNode m_GraphNodeFront;
+ GraphNode m_GraphNodeSuccessor;
+
+ m_StartNodePrt = m_HMscPtr->m_start;
+ m_ReferenceNodePtrList = m_StartNodePrt->m_nodes;
+
+ list<m_mapDependences> m_listMapDependences;
+ map<ReferenceNodePtr,list<GraphNode>> m_mapReferenceNodePtrChild;
+
+ /**
+ *
+ * creating GraphNodes and tab of relations
+ */
+
+ list<ReferenceNodePtr>::iterator itReferenceNodePtr;
+ for (itReferenceNodePtr = m_ReferenceNodePtrList.begin(); itReferenceNodePtr != m_ReferenceNodePtrList.end(); itReferenceNodePtr++ ){
+ GraphNode m_newGraphNode = GraphNode(*itReferenceNodePtr);
+ GraphNodeList.push_back(m_newGraphNode);
+ if(*itReferenceNodePtr->m_end!=null)
+ GraphNodeEndList.push_back(m_newGraphNode);
+
+ list<ReferenceNodePtr>::iterator itReferenceNodePtrChild;
+ for (itReferenceNodePtrChild = itReferenceNodePtr->m_successors.begin(); itReferenceNodePtrChild != itReferenceNodePtr->m_successors.end(); itReferenceNodePtrChild++ ){
+ if(m_mapReferenceNodePtrChild.find(*itReferenceNodePtrChild)==m_mapReferenceNodePtrChild.end){
+ m_mapReferenceNodePtrChild.insert(pair<ReferenceNodePtr,GraphNode>(*itReferenceNodePtrChild,null))
+ }
+ // dont like selfish relations
+ if(*itReferenceNodePtrChild != *itReferenceNodePtr)
+ m_mapReferenceNodePtrChild.find(*itReferenceNodePtrChild)->second.push_back(m_newGraphNode);
+ }
+
+ }
+
+ /**
+ *
+ * setting relations
+ *
+ */
+
+ list<GraphNode>::iterator itGraphNode;
+ for(itGraphNode=GraphNodeList.begin(); itGraphNode != GraphNodeList.end(); itGraphNode++){
+ if(m_mapReferenceNodePtrChild.find((*itGraphNode)->m_ReferenceNodePtrNode)!=m_mapReferenceNodePtrChild.end()){
+ list<GraphNode> m_GraphNodelist = m_mapReferenceNodePtrChild.find((*itGraphNode)->m_ReferenceNodePtrNode)->second;
+ for (itReferenceNodePtr = m_GraphNodelist.begin(); itReferenceNodePtrChild != m_GraphNodelist.end(); itReferenceNodePtr++ ){
+ itGraphNode->graphNodeList.push_back(itReferenceNodePtr);
+ }
+
+ }
+ }
+ /**
+ * finaly nodes to the queue
+ */
+
+ for(itGraphNode = GraphNodeEndList.begin(); itGraphNode != GraphNodeEndList.end(); itGraphNode++){
+ m_GraphNodeQueue.push(*itGraphNode);
+ }
+
+ while(!m_GraphNodeQueue.empty()){
+ m_GraphNodeFront = m_GraphNodeQueue.front();
+ if(!m_GraphNodeFront.visited){
+ m_returnList.push_back(m_GraphNodeFront.graphNodeList);
+ for(itGraphNode = m_GraphNodeFront.graphNodeList.begin(); itGraphNode != m_GraphNodeFront.graphNodeList.end(); itGraphNode++){
+ m_GraphNodeQueue.push(*itGraphNode);
+ }
+ }
+ m_GraphNodeQueue.pop();
+
+ }
+
+ return m_returnList;
+}
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ba...@us...> - 2008-04-03 17:22:46
|
Revision: 10
http://scstudio.svn.sourceforge.net/scstudio/?rev=10&view=rev
Author: babicaj
Date: 2008-04-03 10:21:55 -0700 (Thu, 03 Apr 2008)
Log Message:
-----------
Syntax checked
Modified Paths:
--------------
trunk/src/data/msc.h
trunk/src/data/msc_modifications.h
trunk/src/data/msc_path.h
Modified: trunk/src/data/msc.h
===================================================================
--- trunk/src/data/msc.h 2008-03-13 20:56:06 UTC (rev 9)
+++ trunk/src/data/msc.h 2008-04-03 17:21:55 UTC (rev 10)
@@ -21,6 +21,8 @@
#include <list>
#include <string>
+#include <set>
+
#include "counted_ptr.h"
class HMscNode;
@@ -31,21 +33,27 @@
class Event;
class Msc;
class BMsc;
+class HMsc;
class MscMessage;
class EventArea;
class StrictOrderArea;
class GeneralOrderArea;
+class InstanceArea;
+template <class T> class Dag;
+template <class T> class DagNode;
typedef counted_ptr<Msc> MscPtr;
typedef counted_ptr<BMsc> BMscPtr;
-typedef counter_ptr<ReferenceNode> ReferenceNodePtr;
+typedef counted_ptr<HMsc> HMscPtr;
+
+typedef counted_ptr<ReferenceNode> ReferenceNodePtr;
typedef std::list<ReferenceNodePtr> ReferenceNodePtrList;
-typedef counter_ptr<StartNode> StartNodePtr;
+typedef counted_ptr<StartNode> StartNodePtr;
-typedef counter_ptr<EndNode> EndNodePtr;
+typedef counted_ptr<EndNode> EndNodePtr;
typedef counted_ptr<Instance> InstancePtr;
typedef std::list<InstancePtr> InstancePtrList;
@@ -64,7 +72,55 @@
typedef counted_ptr<GeneralOrderArea> GeneralOrderAreaPtr;
+
/**
+ * Node of directed acyclic graph.
+ */
+template <class T>
+class DagNode{
+
+ /**
+ * Object which is contained in this DagNode.
+ */
+ T m_content;
+
+ /**
+ * Successors of this node.
+ */
+ std::list<T> m_successors;
+};
+
+/**
+ * Directed acyclic graph.
+ */
+template <class T>
+class Dag
+{
+public:
+ /**
+ * Pointered alternative to DagNode.
+ */
+ typedef counted_ptr<DagNode<T> > DagNodePtr;
+
+ /**
+ * List of pointered DagNodes.
+ */
+ typedef std::list<DagNodePtr> DagNodePtrList;
+
+ /**
+ * Set of pointered DagNodes.
+ */
+ typedef std::set<DagNodePtr> DagNodePtrSet;
+
+private:
+ /**
+ * Events which aren't successors of any other events.
+ */
+ DagNodePtrList m_minimal_events;
+
+};
+
+/**
* Represents virtual base class for BMsc and HMsc.
*/
class Msc
@@ -73,7 +129,7 @@
/**
* Label of MSC.
*/
- string m_label;
+ std::string m_label;
};
@@ -172,7 +228,7 @@
/**
* Label of process.
*/
- string m_label;
+ std::string m_label;
/**
* Events which occures at instance.
@@ -224,7 +280,7 @@
/**
* EventAreas which occure at instance.
*/
- EventAreaPtrList m_areas
+ EventAreaPtrList m_areas;
};
@@ -236,7 +292,7 @@
/**
* Label of message.
*/
- string m_label;
+ std::string m_label;
/**
* Sender of message.
@@ -277,50 +333,5 @@
EventPtr m_matching_event;
};
-/**
- * Directed acyclic graph.
- */
-template <class T>
-class Dag
-{
-
- /**
- * List of pointered DagNodes.
- */
- typedef std::list<DagNode<T>::DagNodePtr> DagNodePtrList;
-
- /**
- * Set of pointered DagNodes.
- */
- typedef std::set<DagNode<T>::DagNodePtr> DagNodePtrSet;
-
- /**
- * Events which aren't successors of any other events.
- */
- Dag<T>::DagNodePtrList m_minimal_events;
-};
-
-/**
- * Node of directed acyclic graph.
- */
-template <class T>
-class DagNode{
-
- /**
- * Pointered alternative to DagNode.
- */
- typedef counted_ptr<DagNode<T>> DagNodePtr;
-
- /**
- * Object which is contained in this DagNode.
- */
- T m_content;
-
- /**
- * Successors of this node.
- */
- std::list<T> m_successors;
-};
-
#endif /* _MSC_H */
Modified: trunk/src/data/msc_modifications.h
===================================================================
--- trunk/src/data/msc_modifications.h 2008-03-13 20:56:06 UTC (rev 9)
+++ trunk/src/data/msc_modifications.h 2008-04-03 17:21:55 UTC (rev 10)
@@ -66,12 +66,12 @@
/**
* Events which were removed from EventArea.
*/
- stl::set<Event> m_removed_events;
+ std::set<Event> m_removed_events;
/**
* Events which are new in EventArea.
*/
- stl::set<Event> m_new_events;
+ std::set<Event> m_new_events;
};
@@ -224,7 +224,7 @@
*/
std::set<ReferenceNodePtr> m_new_nodes;
-}
+};
#endif /* _MSC_MODIFICATIONS_H */
Modified: trunk/src/data/msc_path.h
===================================================================
--- trunk/src/data/msc_path.h 2008-03-13 20:56:06 UTC (rev 9)
+++ trunk/src/data/msc_path.h 2008-04-03 17:21:55 UTC (rev 10)
@@ -19,9 +19,12 @@
#ifndef _MSC_PATH_H
#define _MSC_PATH_H
+#include <list>
#include "msc.h"
-#include <list>
+#include "counted_ptr.h"
+class PathNode;
+
typedef counted_ptr<PathNode> PathNodePtr;
typedef std::list<PathNodePtr> PathNodePtrList;
@@ -47,9 +50,9 @@
class PathNode{
/**
- * HmscNode which path goes through.
+ * ReferenceNode which path goes through.
*/
- HmscNodePtr m_node;
+ ReferenceNodePtr m_node;
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ba...@us...> - 2008-03-13 21:58:37
|
Revision: 9
http://scstudio.svn.sourceforge.net/scstudio/?rev=9&view=rev
Author: babicaj
Date: 2008-03-13 13:56:06 -0700 (Thu, 13 Mar 2008)
Log Message:
-----------
To be more conform to ITU-T specification there were suggested new types of nodes in HMsc: StartNode, EndNode and ReferenceNode. These types have common parent HMscNode. New attributes were added to HMscModification to be more capable to recognize new and removed ReferenceNodes.
Modified Paths:
--------------
trunk/src/data/msc.h
trunk/src/data/msc_modifications.h
Modified: trunk/src/data/msc.h
===================================================================
--- trunk/src/data/msc.h 2008-03-12 20:49:11 UTC (rev 8)
+++ trunk/src/data/msc.h 2008-03-13 20:56:06 UTC (rev 9)
@@ -23,11 +23,13 @@
#include <string>
#include "counted_ptr.h"
-class HmscNode;
+class HMscNode;
+class ReferenceNode;
+class EndNode;
+class StartNode;
class Instance;
class Event;
class Msc;
-class HmscNode;
class BMsc;
class MscMessage;
class EventArea;
@@ -38,9 +40,13 @@
typedef counted_ptr<BMsc> BMscPtr;
-typedef counter_ptr<HmscNode> HmscNodePtr;
-typedef std::list<HmscNodePtr> HmscNodePtrList;
+typedef counter_ptr<ReferenceNode> ReferenceNodePtr;
+typedef std::list<ReferenceNodePtr> ReferenceNodePtrList;
+typedef counter_ptr<StartNode> StartNodePtr;
+
+typedef counter_ptr<EndNode> EndNodePtr;
+
typedef counted_ptr<Instance> InstancePtr;
typedef std::list<InstancePtr> InstancePtrList;
@@ -90,23 +96,71 @@
{
/**
- * Start nodes of HMsc.
+ * Start node of HMsc.
+ *
+ * Mandatory element in HMsc, should be initialized in constructor.
*/
- HmscNodePtrList m_start_nodes;
+ StartNodePtr m_start;
+
+ /**
+ * All ReferenceNodes of HMsc.
+ */
+ ReferenceNodePtrList m_nodes;
};
-class HmscNode
+/**
+ * Base abstract class for node of HMsc
+ */
+class HMscNode{
+
+};
+
+/**
+ * Start node of HMsc.
+ *
+ * According to ITU-T standard, each HMsc has got exactly
+ * one start node.
+ */
+class StartNode:public HMscNode
{
+
+ /**
+ * Succesors of StartNode.
+ */
+ ReferenceNodePtrList m_successors;
+};
+
+/**
+ * End node of HMsc.
+ */
+class EndNode:public HMscNode
+{
+
+
+};
+
+/**
+ * HMscNode which references either BMsc or HMsc.
+ */
+class ReferenceNode:public HMscNode
+{
+
/**
- * Succesors of HmscNode
+ * Succesors of ReferenceNode.
*/
- HmscNodePtrList m_successors;
+ ReferenceNodePtrList m_successors;
/**
- * MSC which is contained in this node
+ * MSC which is contained in this node.
*/
MscPtr m_msc;
+
+ /**
+ * EndNode which this ReferenceNode is connected to,
+ * NULL if there isn't any such connection.
+ */
+ EndNodePtr m_end;
};
/**
Modified: trunk/src/data/msc_modifications.h
===================================================================
--- trunk/src/data/msc_modifications.h 2008-03-12 20:49:11 UTC (rev 8)
+++ trunk/src/data/msc_modifications.h 2008-03-13 20:56:06 UTC (rev 9)
@@ -137,7 +137,7 @@
/**
* Modified InstanceArea.
*/
- InstanceAreaPtrList m_modified_instance_area;
+ InstanceAreaPtr m_modified_area;
};
@@ -165,28 +165,28 @@
};
/**
- * Modification of HMscNode.
+ * Modification of ReferenceNode.
*/
-class HMscNodeModification: public MscModification
+class ReferenceNodeModification: public MscModification
{
/**
- * Previous version of HMscNode.
+ * Previous version of ReferenceNode.
*/
- HMscNodePtr m_previous;
+ ReferenceNodePtr m_previous;
/**
* Removed successors.
*/
- std::set<HMscNodePtr> m_removed_successors;
+ std::set<ReferenceNodePtr> m_removed_successors;
/**
* New successors.
*/
- std::set<HMscNodePtr> m_new_successors;
+ std::set<ReferenceNodePtr> m_new_successors;
/**
- * Changed Msc of the HMscNode.
+ * Changed Msc of the ReferenceNode.
*
* If NULL then Msc points to the same one (doesn't care if it was
* internally modified).
@@ -205,15 +205,25 @@
HMscPtr m_previous;
/**
- * Removed start nodes.
+ * Removed successors of StartNode.
*/
- std::set<HMscNodePtr> m_removed_start_nodes;
+ std::set<ReferenceNodePtr> m_removed_beginners;
/**
- * New start nodes.
+ * New successors of StartNode.
*/
- std::set<HMscNodePtr> m_new_start_nodes;
+ std::set<ReferenceNodePtr> m_new_beginners;
+ /**
+ * Removed nodes.
+ */
+ std::set<ReferenceNodePtr> m_removed_nodes;
+
+ /**
+ * New nodes.
+ */
+ std::set<ReferenceNodePtr> m_new_nodes;
+
}
#endif /* _MSC_MODIFICATIONS_H */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ba...@us...> - 2008-03-12 20:49:21
|
Revision: 8
http://scstudio.svn.sourceforge.net/scstudio/?rev=8&view=rev
Author: babicaj
Date: 2008-03-12 13:49:11 -0700 (Wed, 12 Mar 2008)
Log Message:
-----------
New typedefs included in msc.h and completely revised idea of modifications in msc_modifications.h
Modified Paths:
--------------
trunk/src/data/msc.h
trunk/src/data/msc_modifications.h
Modified: trunk/src/data/msc.h
===================================================================
--- trunk/src/data/msc.h 2008-03-10 20:31:26 UTC (rev 7)
+++ trunk/src/data/msc.h 2008-03-12 20:49:11 UTC (rev 8)
@@ -31,6 +31,8 @@
class BMsc;
class MscMessage;
class EventArea;
+class StrictOrderArea;
+class GeneralOrderArea;
typedef counted_ptr<Msc> MscPtr;
@@ -50,8 +52,12 @@
typedef counted_ptr<EventArea> EventAreaPtr;
typedef std::list<EventAreaPtr> EventAreaPtrList;
-typedef counted_ptr<Instance> InstancePtr;
+typedef counted_ptr<InstanceArea> InstanceAreaPtr;
+typedef counted_ptr<StrictOrderArea> StrictOrderAreaPtr;
+
+typedef counted_ptr<GeneralOrderArea> GeneralOrderAreaPtr;
+
/**
* Represents virtual base class for BMsc and HMsc.
*/
@@ -230,6 +236,11 @@
typedef std::list<DagNode<T>::DagNodePtr> DagNodePtrList;
/**
+ * Set of pointered DagNodes.
+ */
+ typedef std::set<DagNode<T>::DagNodePtr> DagNodePtrSet;
+
+ /**
* Events which aren't successors of any other events.
*/
Dag<T>::DagNodePtrList m_minimal_events;
Modified: trunk/src/data/msc_modifications.h
===================================================================
--- trunk/src/data/msc_modifications.h 2008-03-10 20:31:26 UTC (rev 7)
+++ trunk/src/data/msc_modifications.h 2008-03-12 20:49:11 UTC (rev 8)
@@ -19,6 +19,7 @@
#ifndef _MSC_MODIFICATIONS_H
#define _MSC_MODIFICATIONS_H
+#include <set>
#include "msc.h"
/**
@@ -28,116 +29,192 @@
};
+typedef counted_ptr<MscModification> MscModificationPtr;
+typedef std::set<MscModificationPtr> MscModificationPtrSet;
+
/**
- * Modification of BMsc.
+ * Container of modifications.
*
- * Used to express modification of BMsc, i.e. new process added,
- * removed events, added events etc.
+ * Encapsulates container of modifications performed in previous
+ * version of Msc. These modifications are ordered in descending
+ * order by level of hierarchical structure which they reside in.
+ * However, modifications can be accessed in both directions.
+ *
+ * Purpose of this container will be seen when we use iterative
+ * type of checking algorithms of particular property of Msc.
+ * This type of algorithms is capable to use results from previous
+ * version of Msc to decrease computing complexity. Withou this
+ * approach (container of modifications) it would be neccessary to
+ * involve searching of modifications into complexity.
*/
-class BMscModification:public MscModification{
+class MscModificationContainer{
/**
- * Old version of BMsc.
- *
- * Pointer to previous version of BMsc. If NULL then m_new didn't
- * have previous version (i.e. m_new is original).
+ * Container of sorted modifications.
*/
- BMscPtr m_old;
+ MscModificationPtrSet m_modifications;
+};
+
+
+
+/**
+ * Base class for modifications in EventArea.
+ */
+class EventAreaModification:public MscModification{
+
/**
- * New version of BMsc.
- *
- * Pointer to modified version of BMsc. If NULL then original (m_old)
- * BMsc was removed.
+ * Events which were removed from EventArea.
*/
- BMscPtr m_new;
+ stl::set<Event> m_removed_events;
+ /**
+ * Events which are new in EventArea.
+ */
+ stl::set<Event> m_new_events;
+
};
/**
- * Modification of HMsc.
- *
- * Usefull when either whole HMsc is new or was completly removed
- * and checking algorithms do not already need to keep results from
- * previous version for this HMsc.
+ * Modifications which are performed in StrictOrderArea.
*/
-class HMscNodeModification:public MscModification{
+class StrictOrderModification:public EventAreaModification{
+
+ /**
+ * Previous version of StrictOrderArea.
+ */
+ StrictOrderAreaPtr m_previous;
/**
- * Old version of HMscNode.
- *
- * Pointer to previous version of HMscNode. If NULL then m_new didn't
- * have previous version (i.e. m_new is original).
+ * New order of events.
*/
- HMscNodePtr m_old;
+ EventPtrList m_events;
+};
+
+/**
+ * Modifications which are performed in GeneralOrderArea.
+ */
+class GeneralOrderModification:public EventAreaModification{
+
/**
- * New version of HMscNode.
- *
- * Pointer to modified version of HMscNode. If NULL then original (m_old)
- * HMscNode was removed.
+ * Previous version of GeneralOrderArea.
*/
- HMscNodePtr m_new;
+ GeneralOrderAreaPtr m_previous;
+ /**
+ * Events which are newly minimimal in modified version.
+ */
+ Dag<Event>::DagNodePtrSet m_minimal_events;
+
+ /**
+ * Events with modified successors.
+ */
+ Dag<Event>::DagNodePtrSet m_modified_events;
+
};
/**
- * Modification of HMscNode in HMsc.
- *
- * Usage of this modification is essential when edges are added
- * or removed between nodes of HMsc. Such modifications shpouldn't
- * be described using HMscModification because it would be neccessary
- * to find out which ones nodes are different from the previous ones.
- * Such approach would increase computing complexity of checking
- * algorithms.
+ * Modification of instance.
*/
-class HMscModification:public MscModification{
+class InstanceModification:public MscModification{
/**
- * Old version of HMsc.
- *
- * Pointer to previous version of HMsc. If NULL then m_new didn't
- * have previous version (i.e. m_new is original).
+ * Previous version of Instance.
*/
- HMscPtr m_old;
+ InstancePtr m_previous;
/**
- * New version of HMsc.
- *
- * Pointer to modified version of HMsc. If NULL then original (m_old)
- * HMsc was removed.
+ * Removed EventAreas from Instance.
*/
- HMscPtr m_new;
+ std::set<EventAreaPtr> m_removed_areas;
+ /**
+ * New EventAreas at instance.
+ */
+ std::set<EventAreaPtr> m_new_areas;
+
+ /**
+ * Modified InstanceArea.
+ */
+ InstanceAreaPtrList m_modified_instance_area;
+
};
-typedef counted_ptr<MscModification> MscModificationPtr;
-typedef std::set<MscModificationPtr> MscModificationPtrSet;
+/**
+ * Modification of BMsc.
+ */
+class BMscModification: public MscModification
+{
+ /**
+ * Previous version of BMsc.
+ */
+ BMscPtr m_previous;
+
+ /**
+ * Removed Instances.
+ */
+ std::set<EventAreaPtr> m_removed_instances;
+
+ /**
+ * New Instances.
+ */
+ std::set<EventAreaPtr> m_new_instances;
+
+};
+
/**
- * Container of modifications.
- *
- * Encapsulates container of modifications performed in previous
- * version of Msc. These modifications are ordered in descending
- * order by level of hierarchical structure which they reside in.
- * However, modifications can be accessed in both directions.
- *
- * Purpose of this container will be seen when we use iterative
- * type of checking algorithms of particular property of Msc.
- * This type of algorithms is capable to use results from previous
- * version of Msc to decrease computing complexity. Withou this
- * approach (container of modifications) it would be neccessary to
- * involve searching of modifications into complexity.
+ * Modification of HMscNode.
*/
-class MscModificationContainer{
+class HMscNodeModification: public MscModification
+{
/**
- * Container of sorted modifications.
+ * Previous version of HMscNode.
*/
- MscModificationPtrSet m_modifications;
+ HMscNodePtr m_previous;
+ /**
+ * Removed successors.
+ */
+ std::set<HMscNodePtr> m_removed_successors;
+
+ /**
+ * New successors.
+ */
+ std::set<HMscNodePtr> m_new_successors;
+
+ /**
+ * Changed Msc of the HMscNode.
+ *
+ * If NULL then Msc points to the same one (doesn't care if it was
+ * internally modified).
+ */
+ MscPtr m_changed_msc;
};
+/**
+ * Modification of HMsc
+ */
+class HMscModification:public MscModification{
+ /**
+ * Previous version of HMsc.
+ */
+ HMscPtr m_previous;
+
+ /**
+ * Removed start nodes.
+ */
+ std::set<HMscNodePtr> m_removed_start_nodes;
+
+ /**
+ * New start nodes.
+ */
+ std::set<HMscNodePtr> m_new_start_nodes;
+
+}
+
#endif /* _MSC_MODIFICATIONS_H */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ba...@us...> - 2008-03-10 20:31:44
|
Revision: 7
http://scstudio.svn.sourceforge.net/scstudio/?rev=7&view=rev
Author: babicaj
Date: 2008-03-10 13:31:26 -0700 (Mon, 10 Mar 2008)
Log Message:
-----------
Event contained reference to Instance. In case of lost/found message(m_matching_event=NULL) we weren't able to determine receiver/sender of Event. Instance reference moved to MscMessage.
Modified Paths:
--------------
trunk/src/data/msc.h
Modified: trunk/src/data/msc.h
===================================================================
--- trunk/src/data/msc.h 2008-03-09 13:32:22 UTC (rev 6)
+++ trunk/src/data/msc.h 2008-03-10 20:31:26 UTC (rev 7)
@@ -50,6 +50,8 @@
typedef counted_ptr<EventArea> EventAreaPtr;
typedef std::list<EventAreaPtr> EventAreaPtrList;
+typedef counted_ptr<Instance> InstancePtr;
+
/**
* Represents virtual base class for BMsc and HMsc.
*/
@@ -72,7 +74,7 @@
/**
* Processes' instances which are contained in Bmsc.
*/
- InstancePtrList m_processes;
+ InstancePtrList m_instances;
};
/**
@@ -113,11 +115,11 @@
string m_label;
/**
- * Events which occures at process.
+ * Events which occures at instance.
*
* Events are ordered in list, moreover they have order numbers, see Event.
*/
- EventPtrList m_events;
+ InstanceAreaPtr m_areas;
};
@@ -175,6 +177,22 @@
* Label of message.
*/
string m_label;
+
+ /**
+ * Sender of message.
+ *
+ * The counted_ptr shouldn't be used instead because of
+ * occurence of cyclic references.
+ */
+ Instance* m_sender;
+
+ /**
+ * Receiver of message.
+ *
+ * The counted_ptr shouldn't be used instead because of
+ * occurence of cyclic references.
+ */
+ Instance* m_receiver;
};
/**
@@ -191,16 +209,11 @@
/**
* Label of message whose this is send or receive event.
*/
- string m_message;
+ MscMessagePtr m_message;
/**
- * Instance that this event occures at.
+ * Opposite (send/receive) event of this event.
*/
- InstancePtr m_process;
-
- /**
- * Oposite (send/receive) event of this event.
- */
EventPtr m_matching_event;
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ba...@us...> - 2008-03-09 13:32:34
|
Revision: 6
http://scstudio.svn.sourceforge.net/scstudio/?rev=6&view=rev
Author: babicaj
Date: 2008-03-09 06:32:22 -0700 (Sun, 09 Mar 2008)
Log Message:
-----------
Msc modifications container added.
Modified Paths:
--------------
trunk/src/data/msc.h
trunk/src/data/msc_path.h
Added Paths:
-----------
trunk/src/data/msc_modifications.h
Modified: trunk/src/data/msc.h
===================================================================
--- trunk/src/data/msc.h 2008-03-07 19:06:21 UTC (rev 5)
+++ trunk/src/data/msc.h 2008-03-09 13:32:22 UTC (rev 6)
@@ -16,8 +16,8 @@
* $Id: $
*/
-#ifndef _HMSC_STRUCTURE_H
-#define _HMSC_STRUCTURE_H
+#ifndef _MSC_H
+#define _MSC_H
#include <list>
#include <string>
@@ -127,7 +127,7 @@
class EventArea
{
-}
+};
/**
* EventArea whose events are ordered lineary as they follow each other.
@@ -139,7 +139,7 @@
* List of Events which occure in this area.
*/
EventPtrList m_events;
-}
+};
/**
* EventArea whose events are ordered like directed acyclic graph.
@@ -151,7 +151,7 @@
* Directed acyclic graph representing events' ordering.
*/
Dag<EventPtr> m_events;
-}
+};
/**
* Area of Instance that represents area where Events at this Instance are located.
@@ -164,7 +164,7 @@
*/
EventAreaPtrList m_areas
-}
+};
/**
* Message sent by Instances.
@@ -175,7 +175,7 @@
* Label of message.
*/
string m_label;
-}
+};
/**
* Event which occures at process.
@@ -220,7 +220,7 @@
* Events which aren't successors of any other events.
*/
Dag<T>::DagNodePtrList m_minimal_events;
-}
+};
/**
* Node of directed acyclic graph.
@@ -242,15 +242,7 @@
* Successors of this node.
*/
std::list<T> m_successors;
+};
- /**
- * Used when traversing Dag in a way of depth-first search.
- *
- * Depth-first search is efficient way how to detect eventual
- * cycles which are forbidden in Dag.
- */
- enum{FREE,VISITED,FINISHED} m_color;
-}
+#endif /* _MSC_H */
-#endif /* _HMSC_STRUCTURE_H */
-
Added: trunk/src/data/msc_modifications.h
===================================================================
--- trunk/src/data/msc_modifications.h (rev 0)
+++ trunk/src/data/msc_modifications.h 2008-03-09 13:32:22 UTC (rev 6)
@@ -0,0 +1,143 @@
+/*
+ * 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) 2008 Jindra Babica <ba...@ma...>
+ *
+ * $Id: $
+ */
+
+#ifndef _MSC_MODIFICATIONS_H
+#define _MSC_MODIFICATIONS_H
+
+#include "msc.h"
+
+/**
+ * General base class for modification of MSC.
+ */
+class MscModification{
+
+};
+
+/**
+ * Modification of BMsc.
+ *
+ * Used to express modification of BMsc, i.e. new process added,
+ * removed events, added events etc.
+ */
+class BMscModification:public MscModification{
+
+ /**
+ * Old version of BMsc.
+ *
+ * Pointer to previous version of BMsc. If NULL then m_new didn't
+ * have previous version (i.e. m_new is original).
+ */
+ BMscPtr m_old;
+
+ /**
+ * New version of BMsc.
+ *
+ * Pointer to modified version of BMsc. If NULL then original (m_old)
+ * BMsc was removed.
+ */
+ BMscPtr m_new;
+
+};
+
+/**
+ * Modification of HMsc.
+ *
+ * Usefull when either whole HMsc is new or was completly removed
+ * and checking algorithms do not already need to keep results from
+ * previous version for this HMsc.
+ */
+class HMscNodeModification:public MscModification{
+
+ /**
+ * Old version of HMscNode.
+ *
+ * Pointer to previous version of HMscNode. If NULL then m_new didn't
+ * have previous version (i.e. m_new is original).
+ */
+ HMscNodePtr m_old;
+
+ /**
+ * New version of HMscNode.
+ *
+ * Pointer to modified version of HMscNode. If NULL then original (m_old)
+ * HMscNode was removed.
+ */
+ HMscNodePtr m_new;
+
+};
+
+/**
+ * Modification of HMscNode in HMsc.
+ *
+ * Usage of this modification is essential when edges are added
+ * or removed between nodes of HMsc. Such modifications shpouldn't
+ * be described using HMscModification because it would be neccessary
+ * to find out which ones nodes are different from the previous ones.
+ * Such approach would increase computing complexity of checking
+ * algorithms.
+ */
+class HMscModification:public MscModification{
+
+ /**
+ * Old version of HMsc.
+ *
+ * Pointer to previous version of HMsc. If NULL then m_new didn't
+ * have previous version (i.e. m_new is original).
+ */
+ HMscPtr m_old;
+
+ /**
+ * New version of HMsc.
+ *
+ * Pointer to modified version of HMsc. If NULL then original (m_old)
+ * HMsc was removed.
+ */
+ HMscPtr m_new;
+
+};
+
+typedef counted_ptr<MscModification> MscModificationPtr;
+typedef std::set<MscModificationPtr> MscModificationPtrSet;
+
+/**
+ * Container of modifications.
+ *
+ * Encapsulates container of modifications performed in previous
+ * version of Msc. These modifications are ordered in descending
+ * order by level of hierarchical structure which they reside in.
+ * However, modifications can be accessed in both directions.
+ *
+ * Purpose of this container will be seen when we use iterative
+ * type of checking algorithms of particular property of Msc.
+ * This type of algorithms is capable to use results from previous
+ * version of Msc to decrease computing complexity. Withou this
+ * approach (container of modifications) it would be neccessary to
+ * involve searching of modifications into complexity.
+ */
+class MscModificationContainer{
+
+ /**
+ * Container of sorted modifications.
+ */
+ MscModificationPtrSet m_modifications;
+
+};
+
+
+#endif /* _MSC_MODIFICATIONS_H */
+
Modified: trunk/src/data/msc_path.h
===================================================================
--- trunk/src/data/msc_path.h 2008-03-07 19:06:21 UTC (rev 5)
+++ trunk/src/data/msc_path.h 2008-03-09 13:32:22 UTC (rev 6)
@@ -16,8 +16,8 @@
* $Id: $
*/
-#ifndef _PATH_H
-#define _PATH_H
+#ifndef _MSC_PATH_H
+#define _MSC_PATH_H
#include "msc.h"
#include <list>
@@ -76,5 +76,5 @@
PathNodePtr m_path;
};
-#endif /* _PATH_H */
+#endif /* _MSC_PATH_H */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ba...@us...> - 2008-03-07 19:06:25
|
Revision: 5
http://scstudio.svn.sourceforge.net/scstudio/?rev=5&view=rev
Author: babicaj
Date: 2008-03-07 11:06:21 -0800 (Fri, 07 Mar 2008)
Log Message:
-----------
Event areas with different event order interpretation added and modifications of arrangement of code.
Modified Paths:
--------------
trunk/src/data/msc.h
trunk/src/data/msc_path.h
Modified: trunk/src/data/msc.h
===================================================================
--- trunk/src/data/msc.h 2008-03-06 21:01:17 UTC (rev 4)
+++ trunk/src/data/msc.h 2008-03-07 19:06:21 UTC (rev 5)
@@ -1,20 +1,20 @@
/*
-* 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) 2008 Jindra Babica <ba...@ma...>
-*
-* $Id$
-*/
+ * 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) 2008 Jindra Babica <ba...@ma...>
+ *
+ * $Id: $
+ */
#ifndef _HMSC_STRUCTURE_H
#define _HMSC_STRUCTURE_H
@@ -24,123 +24,233 @@
#include "counted_ptr.h"
class HmscNode;
-class Process;
+class Instance;
class Event;
class Msc;
class HmscNode;
-class Bmsc;
+class BMsc;
+class MscMessage;
+class EventArea;
-typedef counted_ptr<Msc> MSC;
-typedef counted_ptr<Bmsc> BMSC;
-typedef counted_ptr<Event> EVENT;
-typedef counted_ptr<Process> PROCESS;
-typedef counter_ptr<HmscNode> HMSC_NODE;
-typedef std::list<HMSC_NODE> HMSC_NODES;
-typedef std::list<PROCESS> PROCESSES;
-typedef std::list<EVENT> EVENTS;
+typedef counted_ptr<Msc> MscPtr;
+typedef counted_ptr<BMsc> BMscPtr;
+
+typedef counter_ptr<HmscNode> HmscNodePtr;
+typedef std::list<HmscNodePtr> HmscNodePtrList;
+
+typedef counted_ptr<Instance> InstancePtr;
+typedef std::list<InstancePtr> InstancePtrList;
+
+typedef counted_ptr<Event> EventPtr;
+typedef std::list<EventPtr> EventPtrList;
+
+typedef counted_ptr<MscMessage> MscMessagePtr;
+
+typedef counted_ptr<EventArea> EventAreaPtr;
+typedef std::list<EventAreaPtr> EventAreaPtrList;
+
/**
- * Represents virtual base class for Bmsc and Hmsc.
+ * Represents virtual base class for BMsc and HMsc.
*/
-class Msc{
-
- /**
- * Label of MSC.
- */
- string m_label;
-
+class Msc
+{
+
+ /**
+ * Label of MSC.
+ */
+ string m_label;
+
};
/**
* Represents Basic MSC.
*/
-class Bmsc:public Msc{
-
- /**
- * Processes' instances which are contained in Bmsc.
- */
- PROCESSES m_processes;
+class BMsc:public Msc
+{
+
+ /**
+ * Processes' instances which are contained in Bmsc.
+ */
+ InstancePtrList m_processes;
};
/**
* Represents High-level MSC.
*/
-class Hmsc:public Msc{
-
- /**
- * Start nodes of Hmsc.
- */
- HMSC_NODES m_start_nodes;
+class HMsc:public Msc
+{
+
+ /**
+ * Start nodes of HMsc.
+ */
+ HmscNodePtrList m_start_nodes;
};
-class HmscNode{
-
- /**
- * Succesors of HmscNode
- */
- HMSC_NODES m_successors;
-
- /**
- * MSC which is contained in this node
- */
- MSC m_msc;
+class HmscNode
+{
+
+ /**
+ * Succesors of HmscNode
+ */
+ HmscNodePtrList m_successors;
+
+ /**
+ * MSC which is contained in this node
+ */
+ MscPtr m_msc;
};
/**
* Represents process (vertical line) in Basic MSC.
*/
-class Process{
-
- /**
- * Label of process.
- */
- string m_label;
-
- /**
- * Events which occures at process.
- *
- * Events are ordered in list, moreover they have order numbers, see Event.
- */
- EVENTS m_events;
-
+class Instance
+{
+
+ /**
+ * Label of process.
+ */
+ string m_label;
+
+ /**
+ * Events which occures at process.
+ *
+ * Events are ordered in list, moreover they have order numbers, see Event.
+ */
+ EventPtrList m_events;
+
};
/**
+ * General base area which contains events.
+ */
+class EventArea
+{
+
+}
+
+/**
+ * EventArea whose events are ordered lineary as they follow each other.
+ */
+class StrictOrderArea:public EventArea
+{
+
+ /**
+ * List of Events which occure in this area.
+ */
+ EventPtrList m_events;
+}
+
+/**
+ * EventArea whose events are ordered like directed acyclic graph.
+ */
+class GeneralOrderArea:public EventArea
+{
+
+ /**
+ * Directed acyclic graph representing events' ordering.
+ */
+ Dag<EventPtr> m_events;
+}
+
+/**
+ * Area of Instance that represents area where Events at this Instance are located.
+ */
+class InstanceArea
+{
+
+ /**
+ * EventAreas which occure at instance.
+ */
+ EventAreaPtrList m_areas
+
+}
+
+/**
+ * Message sent by Instances.
+ */
+class MscMessage
+{
+ /**
+ * Label of message.
+ */
+ string m_label;
+}
+
+/**
* Event which occures at process.
*/
-class Event{
-
- /**
- * Specifies whether event is sending (true) or receiving (false).
- */
- bool m_send;
-
- /**
- * Specifies order of event at Process.
- *
- * Note that if two events have same m_order it means that they are
- * unordered (coregion like).
- * @warning this must be remake, consider situation of three events a,b,c
- * where only a<b but the rest is unordered. Event order(at process) representation must
- * be refined in the sense of being able to describe acyclic directed graph.
- */
- int m_order;
-
- /**
- * Label of message whose this is send or receive event.
- */
- string m_message;
-
- /**
- * Process that this event occures at.
- */
- PROCESS m_process;
-
- /**
- * Oposite (send/receive) event of this event.
- */
- EVENT m_matching_event;
+class Event
+{
+
+ /**
+ * Specifies whether event is sending or receiving.
+ */
+ enum {SEND, RECEIVE} m_send;
+
+ /**
+ * Label of message whose this is send or receive event.
+ */
+ string m_message;
+
+ /**
+ * Instance that this event occures at.
+ */
+ InstancePtr m_process;
+
+ /**
+ * Oposite (send/receive) event of this event.
+ */
+ EventPtr m_matching_event;
};
+/**
+ * Directed acyclic graph.
+ */
+template <class T>
+class Dag
+{
+
+ /**
+ * List of pointered DagNodes.
+ */
+ typedef std::list<DagNode<T>::DagNodePtr> DagNodePtrList;
+
+ /**
+ * Events which aren't successors of any other events.
+ */
+ Dag<T>::DagNodePtrList m_minimal_events;
+}
+
+/**
+ * Node of directed acyclic graph.
+ */
+template <class T>
+class DagNode{
+
+ /**
+ * Pointered alternative to DagNode.
+ */
+ typedef counted_ptr<DagNode<T>> DagNodePtr;
+
+ /**
+ * Object which is contained in this DagNode.
+ */
+ T m_content;
+
+ /**
+ * Successors of this node.
+ */
+ std::list<T> m_successors;
+
+ /**
+ * Used when traversing Dag in a way of depth-first search.
+ *
+ * Depth-first search is efficient way how to detect eventual
+ * cycles which are forbidden in Dag.
+ */
+ enum{FREE,VISITED,FINISHED} m_color;
+}
+
#endif /* _HMSC_STRUCTURE_H */
Modified: trunk/src/data/msc_path.h
===================================================================
--- trunk/src/data/msc_path.h 2008-03-06 21:01:17 UTC (rev 4)
+++ trunk/src/data/msc_path.h 2008-03-07 19:06:21 UTC (rev 5)
@@ -1,20 +1,20 @@
/*
-* 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) 2008 Jindra Babica <ba...@ma...>
-*
-* $Id$
-*/
+ * 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) 2008 Jindra Babica <ba...@ma...>
+ *
+ * $Id: $
+ */
#ifndef _PATH_H
#define _PATH_H
@@ -22,8 +22,8 @@
#include "msc.h"
#include <list>
-typedef counted_ptr<PathNode> PATH_NODE;
-typedef std::list<PATH_NODE> PATH_NODES;
+typedef counted_ptr<PathNode> PathNodePtr;
+typedef std::list<PathNodePtr> PathNodePtrList;
/**
* Describes structured path through Hmsc.
@@ -33,24 +33,24 @@
* contains either Bmsc or nested MscPath.
*/
class MscPath{
-
- /**
- * Path at current level of structure.
- */
- PATH_NODES m_nodes;
-
+
+ /**
+ * Path at current level of structure.
+ */
+ PathNodePtrList m_nodes;
+
};
/**
* Element of MscPath.
*/
class PathNode{
-
- /**
- * HmscNode which path goes through.
- */
- HMSC_NODE m_node;
-
+
+ /**
+ * HmscNode which path goes through.
+ */
+ HmscNodePtr m_node;
+
};
/**
@@ -58,11 +58,11 @@
*/
class BmscPathNode:public PathNode{
- /**
- * Bmsc that is represented by this PathNode.
- */
- BMSC m_bmsc;
-
+ /**
+ * Bmsc that is represented by this PathNode.
+ */
+ BMscPtr m_bmsc;
+
};
/**
@@ -70,11 +70,11 @@
*/
class HmscPathNode:public PathNode{
- /**
- * MscPath that is represented by this PathNode.
- */
- PATH_NODE m_path;
-
+ /**
+ * MscPath that is represented by this PathNode.
+ */
+ PathNodePtr m_path;
+
};
#endif /* _PATH_H */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ba...@us...> - 2008-03-06 21:01:22
|
Revision: 4
http://scstudio.svn.sourceforge.net/scstudio/?rev=4&view=rev
Author: babicaj
Date: 2008-03-06 13:01:17 -0800 (Thu, 06 Mar 2008)
Log Message:
-----------
Current event order representation at process isn't able to describe all situations. This must be refined, there was added warning about this situation.
Modified Paths:
--------------
trunk/src/data/msc.h
Modified: trunk/src/data/msc.h
===================================================================
--- trunk/src/data/msc.h 2008-03-06 19:14:47 UTC (rev 3)
+++ trunk/src/data/msc.h 2008-03-06 21:01:17 UTC (rev 4)
@@ -120,6 +120,9 @@
*
* Note that if two events have same m_order it means that they are
* unordered (coregion like).
+ * @warning this must be remake, consider situation of three events a,b,c
+ * where only a<b but the rest is unordered. Event order(at process) representation must
+ * be refined in the sense of being able to describe acyclic directed graph.
*/
int m_order;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ba...@us...> - 2008-03-06 19:14:55
|
Revision: 3
http://scstudio.svn.sourceforge.net/scstudio/?rev=3&view=rev
Author: babicaj
Date: 2008-03-06 11:14:47 -0800 (Thu, 06 Mar 2008)
Log Message:
-----------
First version of MSC hierarchical structure and MSC path which should be used for displaying erroneous traces.
Added Paths:
-----------
trunk/src/data/msc.h
trunk/src/data/msc_path.h
Added: trunk/src/data/msc.h
===================================================================
--- trunk/src/data/msc.h (rev 0)
+++ trunk/src/data/msc.h 2008-03-06 19:14:47 UTC (rev 3)
@@ -0,0 +1,143 @@
+/*
+* 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) 2008 Jindra Babica <ba...@ma...>
+*
+* $Id$
+*/
+
+#ifndef _HMSC_STRUCTURE_H
+#define _HMSC_STRUCTURE_H
+
+#include <list>
+#include <string>
+#include "counted_ptr.h"
+
+class HmscNode;
+class Process;
+class Event;
+class Msc;
+class HmscNode;
+class Bmsc;
+
+typedef counted_ptr<Msc> MSC;
+typedef counted_ptr<Bmsc> BMSC;
+typedef counted_ptr<Event> EVENT;
+typedef counted_ptr<Process> PROCESS;
+typedef counter_ptr<HmscNode> HMSC_NODE;
+typedef std::list<HMSC_NODE> HMSC_NODES;
+typedef std::list<PROCESS> PROCESSES;
+typedef std::list<EVENT> EVENTS;
+
+/**
+ * Represents virtual base class for Bmsc and Hmsc.
+ */
+class Msc{
+
+ /**
+ * Label of MSC.
+ */
+ string m_label;
+
+};
+
+/**
+ * Represents Basic MSC.
+ */
+class Bmsc:public Msc{
+
+ /**
+ * Processes' instances which are contained in Bmsc.
+ */
+ PROCESSES m_processes;
+};
+
+/**
+ * Represents High-level MSC.
+ */
+class Hmsc:public Msc{
+
+ /**
+ * Start nodes of Hmsc.
+ */
+ HMSC_NODES m_start_nodes;
+};
+
+class HmscNode{
+
+ /**
+ * Succesors of HmscNode
+ */
+ HMSC_NODES m_successors;
+
+ /**
+ * MSC which is contained in this node
+ */
+ MSC m_msc;
+};
+
+/**
+ * Represents process (vertical line) in Basic MSC.
+ */
+class Process{
+
+ /**
+ * Label of process.
+ */
+ string m_label;
+
+ /**
+ * Events which occures at process.
+ *
+ * Events are ordered in list, moreover they have order numbers, see Event.
+ */
+ EVENTS m_events;
+
+};
+
+/**
+ * Event which occures at process.
+ */
+class Event{
+
+ /**
+ * Specifies whether event is sending (true) or receiving (false).
+ */
+ bool m_send;
+
+ /**
+ * Specifies order of event at Process.
+ *
+ * Note that if two events have same m_order it means that they are
+ * unordered (coregion like).
+ */
+ int m_order;
+
+ /**
+ * Label of message whose this is send or receive event.
+ */
+ string m_message;
+
+ /**
+ * Process that this event occures at.
+ */
+ PROCESS m_process;
+
+ /**
+ * Oposite (send/receive) event of this event.
+ */
+ EVENT m_matching_event;
+};
+
+#endif /* _HMSC_STRUCTURE_H */
+
Added: trunk/src/data/msc_path.h
===================================================================
--- trunk/src/data/msc_path.h (rev 0)
+++ trunk/src/data/msc_path.h 2008-03-06 19:14:47 UTC (rev 3)
@@ -0,0 +1,80 @@
+/*
+* 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) 2008 Jindra Babica <ba...@ma...>
+*
+* $Id$
+*/
+
+#ifndef _PATH_H
+#define _PATH_H
+
+#include "msc.h"
+#include <list>
+
+typedef counted_ptr<PathNode> PATH_NODE;
+typedef std::list<PATH_NODE> PATH_NODES;
+
+/**
+ * Describes structured path through Hmsc.
+ *
+ * As same as Hmsc is structured, path through that structure is designed to be
+ * structured too. I.e. path is list of particular nodes, where these nodes
+ * contains either Bmsc or nested MscPath.
+ */
+class MscPath{
+
+ /**
+ * Path at current level of structure.
+ */
+ PATH_NODES m_nodes;
+
+};
+
+/**
+ * Element of MscPath.
+ */
+class PathNode{
+
+ /**
+ * HmscNode which path goes through.
+ */
+ HMSC_NODE m_node;
+
+};
+
+/**
+ * PathNode which isn't more structured - contains only Bmsc.
+ */
+class BmscPathNode:public PathNode{
+
+ /**
+ * Bmsc that is represented by this PathNode.
+ */
+ BMSC m_bmsc;
+
+};
+
+/**
+ * PathNode which is more structured - contains other MscPath.
+ */
+class HmscPathNode:public PathNode{
+
+ /**
+ * MscPath that is represented by this PathNode.
+ */
+ PATH_NODE m_path;
+
+};
+#endif /* _PATH_H */
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|