Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mc-sog
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PMC-SOG
mc-sog
Commits
0daf63e3
Commit
0daf63e3
authored
2 years ago
by
chihebabid
Browse files
Options
Downloads
Patches
Plain Diff
Fixed some errors
parent
f284df1a
No related branches found
Branches containing commit
No related tags found
1 merge request
!6
Feature/ufscc emptiness check
Pipeline
#4965
passed
2 years ago
Stage: build
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/algorithm/CNDFS.cpp
+4
-4
4 additions, 4 deletions
src/algorithm/CNDFS.cpp
src/algorithm/CNDFS.h
+10
-5
10 additions, 5 deletions
src/algorithm/CNDFS.h
src/main.cpp
+6
-5
6 additions, 5 deletions
src/main.cpp
with
20 additions
and
14 deletions
src/algorithm/CNDFS.cpp
+
4
−
4
View file @
0daf63e3
...
...
@@ -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
=
mA
a
->
succ_iter
(
mA
a
->
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
);
mA
a
->
release_iter
(
i
);
//mtx.unlock();
//iterate succ of SOG first state
...
...
This diff is collapsed.
Click to expand it.
src/algorithm/CNDFS.h
+
10
−
5
View file @
0daf63e3
...
...
@@ -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);
};
...
...
This diff is collapsed.
Click to expand it.
src/main.cpp
+
6
−
5
View file @
0daf63e3
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment