Skip to content
Snippets Groups Projects
Commit 0daf63e3 authored by chihebabid's avatar chihebabid
Browse files

Fixed some errors

parent f284df1a
No related branches found
No related tags found
1 merge request!6Feature/ufscc emptiness check
Pipeline #4965 passed
......@@ -38,8 +38,8 @@ CNDFS::~CNDFS()=default;
//structure qui represente le produit de 2 états
void CNDFS::DfsBlue(ModelCheckBaseMT &mcl,shared_ptr<spot::twa_graph> a) {
mMcl = &mcl;
void CNDFS::DfsBlue() {
//cout << "First state SOG from CNDFS " << mMcl->getInitialMetaState() << endl;
//cout << "First state SOG from CNDFS " << typeid(m.getGraph()->getInitialAggregate()->getSuccessors()).name() << endl;
//cout << "First state BA from CNDFS " << a->get_init_state()<<endl;
......@@ -47,7 +47,7 @@ CNDFS::~CNDFS()=default;
//iterate succ of BA initial state
//mtx.lock();
spot::twa_succ_iterator* i = a->succ_iter(a->get_init_state());
spot::twa_succ_iterator* i = mAa->succ_iter(mAa->get_init_state());
if (i->first())
do
{
......@@ -56,7 +56,7 @@ CNDFS::~CNDFS()=default;
<< std::this_thread::get_id()<< endl;
}
while (i->next());
a->release_iter(i);
mAa->release_iter(i);
//mtx.unlock();
//iterate succ of SOG first state
......
......@@ -4,20 +4,25 @@
#ifndef PMC_SOG_CNDFS_H
#define PMC_SOG_CNDFS_H
#include "ModelCheckBaseMT.h"
#include "SogKripkeTh.h"
#include "../ModelCheckBaseMT.h"
#include <spot/tl/apcollect.hh>
class CNDFS {
private:
static ModelCheckBaseMT *mMcl;
ModelCheckBaseMT *mMcl;
shared_ptr<spot::twa_graph> mAa;
uint16_t mNbTh;
public:
//CNDFS(ModelCheckBaseMT *mMcl, const shared_ptr<spot::twa_graph> &mAa);
CNDFS(ModelCheckBaseMT &mcl,shared_ptr<spot::twa_graph> af,const uint16_t& nbTh) {
mMcl=&mcl;
mAa=af;
mNbTh=nbTh; // nulber of threads to be created
}
virtual ~CNDFS();
//static void DfsBlue();
static void DfsBlue(ModelCheckBaseMT &mcl, shared_ptr<spot::twa_graph> af);
void DfsBlue();
// static void spawnThreads(int n, ModelCheckBaseMT &mcl, shared_ptr<spot::twa_graph> af);
};
......
......@@ -527,13 +527,14 @@ int main(int argc, char **argv)
// cout<<"pointeur sur sog "<< typeid(mcl).name() <<endl;
// cout <<"pointeur sur BA "<< typeid(aa).name() <<endl;
CNDFS cndfs;
CNDFS cndfs(*mcl,aa,3);
// You have now to call a non static method of object cndfs that will create threads and execute your dfs algorithm
// Your static method should be defined as private and called by a non static method
// try else you send me a request tomorrw if you have pbs
//CNDFS cndfs(*mcl, aa);
//cndfs.DfsBlue(*mcl, aa);
thread thread_1 (cndfs.DfsBlue,ref(*mcl),ref(aa));
thread thread_2 (cndfs.DfsBlue,ref(*mcl),ref(aa));
thread_1.join();
thread_2.join();
// n.spawnThreads(2,*mcl,aa);
return(0);
......
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