Skip to content
Snippets Groups Projects
Commit 3fe4985b authored by Chiheb Amer Abid's avatar Chiheb Amer Abid
Browse files

modifié : src/LDDGraph.h

	modifié :         src/LDDState.cpp
	modifié :         src/LDDState.h
	modifié :         src/main.cpp
parent c03f2e1f
No related branches found
No related tags found
No related merge requests found
......@@ -12,10 +12,12 @@ class LDDGraph
{
private:
map<string,int>* m_transition;
map<int,string>* m_places;
void printGraph(LDDState *, size_t &);
public:
string getTransition(int pos);
string getPlace(int pos);
void setTransition(map<string,int>& list_transitions);
MetaLDDNodes m_GONodes;
LDDState *getLDDStateById(unsigned int id);
......
#include "LDDState.h"
#include <sylvan.h>
#include <sylvan_int.h>
#include "LDDState.h"
#define GETNODE(mdd) ((mddnode_t)llmsset_index_to_ptr(nodes, mdd))
LDDState::~LDDState()
{
//dtor
......@@ -29,8 +32,23 @@ vector<pair<LDDState*, int>>* LDDState::getSuccessors() {
return &Successors;
}
void LDDState::setMarked() {
m_marked=true;
vector<int> LDDState::getMarkedPlaces() {
vector<int> result;
MDD mdd=m_lddstate;
int depth=0;
while (mdd>lddmc_true)
{
mddnode_t node=GETNODE(m_lddstate);
if (mddnode_getvalue(node)==1) {
result.push_back(depth);
}
mdd=mddnode_getdown(node);
depth++;
}
return result;
}
......@@ -3,6 +3,7 @@
#include <sylvan.h>
#include <set>
#include <vector>
#include <string>
using namespace std;
using namespace sylvan;
typedef set<int> Set;
......@@ -27,17 +28,19 @@ class LDDState {
bool m_boucle;
bool m_blocage;
bool m_visited;
bool m_marked;
bool isVirtual();
void setVirtual();
void setDiv(bool di) {m_boucle=di;}
bool isDiv() {return m_boucle;}
void setDeadLock(bool de) {m_blocage=de;}
bool isDeadLock() {return m_blocage;}
void setMarked();
vector<int> getMarkedPlaces();
protected:
private:
bool m_virtual = false;
};
typedef pair<LDDState*, int> LDDEdge;
......
......@@ -122,8 +122,6 @@ int main(int argc, char** argv)
MPI_Comm_size(MPI_COMM_WORLD,&n_tasks);
MPI_Comm_rank(MPI_COMM_WORLD,&task_id);
//
if (n_tasks==1)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment