|
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.
|