Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bip_fmu
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Anastasios Temperekidis
bip_fmu
Commits
5c0d57e0
Commit
5c0d57e0
authored
Feb 25, 2022
by
Anastasios Temperekidis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
printf comment
parent
3ede9104
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
20 deletions
+20
-20
RandomScheduler.cpp
Engines/reference-engine/specific/src/RandomScheduler.cpp
+20
-20
No files found.
Engines/reference-engine/specific/src/RandomScheduler.cpp
View file @
5c0d57e0
...
...
@@ -153,7 +153,7 @@ BipError &RandomScheduler::runStep() {
return
error
;
}
printf
(
"a
\n
"
);
//
printf("a\n");
// execute an enabled external port in priority
if
(
!
engine
().
externals
().
empty
())
{
// log enabled interaction / internal ports / external ports
...
...
@@ -171,7 +171,7 @@ BipError &RandomScheduler::runStep() {
logger
().
log
(
chosenPort
,
emptyInteractions
,
emptyInternals
,
engine
().
externals
());
BipError
&
error
=
engine
().
execute
(
chosenPort
);
logger
().
log
(
error
);
printf
(
"b
\n
"
);
//
printf("b\n");
if
(
error
.
type
()
!=
NO_ERROR
)
{
return
error
;
}
...
...
@@ -179,22 +179,22 @@ BipError &RandomScheduler::runStep() {
return
BipError
::
NoError
;
}
else
{
printf
(
"c
\n
"
);
//
printf("c\n");
if
(
newNotifications
())
{
printf
(
"d
\n
"
);
//
printf("d\n");
// if notifications have to be treated, continue
return
BipError
::
NoError
;
}
else
if
(
engine
().
interactions
().
empty
()
&&
engine
().
internals
().
empty
()
&&
!
interactive
())
{
printf
(
"e
\n
"
);
//
printf("e\n");
// wait for incoming events
waitForNotifications
();
printf
(
"f
\n
"
);
//
printf("f\n");
return
BipError
::
NoError
;
}
}
printf
(
"g
\n
"
);
//
printf("g\n");
// interactions and internal ports enabled at the current state
const
vector
<
InteractionValue
*>
&
interactions
=
engine
().
interactions
();
const
vector
<
AtomInternalPort
*>
&
internals
=
engine
().
internals
();
...
...
@@ -400,7 +400,7 @@ BipError &RandomScheduler::runStep() {
logger
().
log
(
chosenInteraction
,
interactions
,
internals
,
externals
);
BipError
&
error
=
engine
().
execute
(
chosenInteraction
);
logger
().
log
(
error
);
printf
(
"h
\n
"
);
//
printf("h\n");
if
(
error
.
type
()
!=
NO_ERROR
)
{
return
error
;
}
...
...
@@ -412,7 +412,7 @@ BipError &RandomScheduler::runStep() {
logger
().
log
(
chosenInternal
,
interactions
,
internals
,
externals
);
BipError
&
error
=
engine
().
execute
(
chosenInternal
);
logger
().
log
(
error
);
printf
(
"j
\n
"
);
//
printf("j\n");
if
(
error
.
type
()
!=
NO_ERROR
)
{
return
error
;
}
...
...
@@ -423,7 +423,7 @@ BipError &RandomScheduler::runStep() {
}
}
printf
(
"k
\n
"
);
//
printf("k\n");
return
BipError
::
NoError
;
}
...
...
@@ -460,11 +460,11 @@ BipError &RandomScheduler::run() {
return
error
;
}
printf
(
"a
\n
"
);
//
printf("a\n");
// execute an enabled external port in priority
if
(
!
engine
().
externals
().
empty
())
{
printf
(
"b
\n
"
);
//
printf("b\n");
// log enabled interaction / internal ports / external ports
vector
<
InteractionValue
*>
emptyInteractions
;
vector
<
AtomInternalPort
*>
emptyInternals
;
...
...
@@ -487,22 +487,22 @@ BipError &RandomScheduler::run() {
continue
;
}
else
{
printf
(
"c
\n
"
);
//
printf("c\n");
if
(
newNotifications
())
{
// if notifications have to be treated, continue
printf
(
"d
\n
"
);
//
printf("d\n");
continue
;
}
else
if
(
engine
().
interactions
().
empty
()
&&
engine
().
internals
().
empty
()
&&
!
interactive
())
{
printf
(
"e
\n
"
);
//
printf("e\n");
// wait for incoming events
waitForNotifications
();
printf
(
"f
\n
"
);
//
printf("f\n");
continue
;
}
}
printf
(
"g
\n
"
);
//
printf("g\n");
// interactions and internal ports enabled at the current state
const
vector
<
InteractionValue
*>
&
interactions
=
engine
().
interactions
();
const
vector
<
AtomInternalPort
*>
&
internals
=
engine
().
internals
();
...
...
@@ -702,7 +702,7 @@ BipError &RandomScheduler::run() {
}
if
(
chosenIndex
<
interactions
.
size
())
{
printf
(
"h
\n
"
);
//
printf("h\n");
// execute an interaction
InteractionValue
&
chosenInteraction
=
*
interactions
[
chosenIndex
];
...
...
@@ -715,7 +715,7 @@ BipError &RandomScheduler::run() {
}
}
else
{
printf
(
"j
\n
"
);
//
printf("j\n");
// execute an internal port
AtomInternalPort
&
chosenInternal
=
*
internals
[
chosenIndex
-
interactions
.
size
()];
...
...
@@ -733,7 +733,7 @@ BipError &RandomScheduler::run() {
}
}
printf
(
"k
\n
"
);
//
printf("k\n");
// log deadlock or reached limit
if
(
!
interactive
())
{
logger
().
log
(
engine
().
interactions
(),
engine
().
internals
(),
engine
().
externals
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment