Newer
Older
//
// Created by ghofrane on 5/4/22.
//
#ifndef PMC_SOG_CNDFS_H
#define PMC_SOG_CNDFS_H
using namespace std ;
typedef pair<struct myState*, int> coupleSuccessor;
struct myState{
LDDState *left;
const spot::twa_graph_state* right;
vector<pair<struct myState*, int>> new_successors;
atomic_bool isAcceptance {false};
atomic_bool isConstructed {false};
bool cyan {false};
atomic_bool blue {false};
atomic_bool red {false};
};
typedef struct myState _state; // @alias
static constexpr uint8_t MAX_THREADS=64;
ModelCheckBaseMT * mMcl;
spot::twa_graph_ptr mAa;
atomic<uint8_t> mIdThread;
static void threadHandler(void *context);
std::thread* mlThread[MAX_THREADS];
// typedef myState _state;
SafeDequeue<struct myState*> sharedPoolTemp;
// SafeDequeue<myCouple> sharedPool;
SafeDequeue<spot::formula> transitionNames;
SafeDequeue<coupleSuccessor> new_successor;
CNDFS(ModelCheckBaseMT *mcl,const spot::twa_graph_ptr &af,const uint16_t& nbTh);
void computeSuccessors(_state *state);
void dfsBlue(_state *state);
_state* getInitialState();
void dfsRed(_state* state, deque<_state*> mydeque);
atomic_bool awaitCondition(_state* state,deque<_state*> mydeque);
_state* buildState(LDDState* left, spot::state* right, bool acc, bool constructed,bool cyan);