printf comment

parent 3ede9104
...@@ -153,7 +153,7 @@ BipError &RandomScheduler::runStep() { ...@@ -153,7 +153,7 @@ BipError &RandomScheduler::runStep() {
return error; return error;
} }
printf("a\n"); //printf("a\n");
// execute an enabled external port in priority // execute an enabled external port in priority
if (!engine().externals().empty()) { if (!engine().externals().empty()) {
// log enabled interaction / internal ports / external ports // log enabled interaction / internal ports / external ports
...@@ -171,7 +171,7 @@ BipError &RandomScheduler::runStep() { ...@@ -171,7 +171,7 @@ BipError &RandomScheduler::runStep() {
logger().log(chosenPort, emptyInteractions, emptyInternals, engine().externals()); logger().log(chosenPort, emptyInteractions, emptyInternals, engine().externals());
BipError &error = engine().execute(chosenPort); BipError &error = engine().execute(chosenPort);
logger().log(error); logger().log(error);
printf("b\n"); //printf("b\n");
if (error.type() != NO_ERROR) { if (error.type() != NO_ERROR) {
return error; return error;
} }
...@@ -179,22 +179,22 @@ BipError &RandomScheduler::runStep() { ...@@ -179,22 +179,22 @@ BipError &RandomScheduler::runStep() {
return BipError::NoError; return BipError::NoError;
} }
else { else {
printf("c\n"); //printf("c\n");
if (newNotifications()) { if (newNotifications()) {
printf("d\n"); //printf("d\n");
// if notifications have to be treated, continue // if notifications have to be treated, continue
return BipError::NoError; return BipError::NoError;
} }
else if (engine().interactions().empty() && engine().internals().empty() && !interactive()) { else if (engine().interactions().empty() && engine().internals().empty() && !interactive()) {
printf("e\n"); //printf("e\n");
// wait for incoming events // wait for incoming events
waitForNotifications(); waitForNotifications();
printf("f\n"); //printf("f\n");
return BipError::NoError; return BipError::NoError;
} }
} }
printf("g\n"); //printf("g\n");
// interactions and internal ports enabled at the current state // interactions and internal ports enabled at the current state
const vector<InteractionValue *> &interactions = engine().interactions(); const vector<InteractionValue *> &interactions = engine().interactions();
const vector<AtomInternalPort *> &internals = engine().internals(); const vector<AtomInternalPort *> &internals = engine().internals();
...@@ -400,7 +400,7 @@ BipError &RandomScheduler::runStep() { ...@@ -400,7 +400,7 @@ BipError &RandomScheduler::runStep() {
logger().log(chosenInteraction, interactions, internals, externals); logger().log(chosenInteraction, interactions, internals, externals);
BipError &error = engine().execute(chosenInteraction); BipError &error = engine().execute(chosenInteraction);
logger().log(error); logger().log(error);
printf("h\n"); //printf("h\n");
if (error.type() != NO_ERROR) { if (error.type() != NO_ERROR) {
return error; return error;
} }
...@@ -412,7 +412,7 @@ BipError &RandomScheduler::runStep() { ...@@ -412,7 +412,7 @@ BipError &RandomScheduler::runStep() {
logger().log(chosenInternal, interactions, internals, externals); logger().log(chosenInternal, interactions, internals, externals);
BipError &error = engine().execute(chosenInternal); BipError &error = engine().execute(chosenInternal);
logger().log(error); logger().log(error);
printf("j\n"); //printf("j\n");
if (error.type() != NO_ERROR) { if (error.type() != NO_ERROR) {
return error; return error;
} }
...@@ -423,7 +423,7 @@ BipError &RandomScheduler::runStep() { ...@@ -423,7 +423,7 @@ BipError &RandomScheduler::runStep() {
} }
} }
printf("k\n"); //printf("k\n");
return BipError::NoError; return BipError::NoError;
} }
...@@ -460,11 +460,11 @@ BipError &RandomScheduler::run() { ...@@ -460,11 +460,11 @@ BipError &RandomScheduler::run() {
return error; return error;
} }
printf("a\n"); //printf("a\n");
// execute an enabled external port in priority // execute an enabled external port in priority
if (!engine().externals().empty()) { if (!engine().externals().empty()) {
printf("b\n"); //printf("b\n");
// log enabled interaction / internal ports / external ports // log enabled interaction / internal ports / external ports
vector<InteractionValue *> emptyInteractions; vector<InteractionValue *> emptyInteractions;
vector<AtomInternalPort *> emptyInternals; vector<AtomInternalPort *> emptyInternals;
...@@ -487,22 +487,22 @@ BipError &RandomScheduler::run() { ...@@ -487,22 +487,22 @@ BipError &RandomScheduler::run() {
continue; continue;
} }
else { else {
printf("c\n"); //printf("c\n");
if (newNotifications()) { if (newNotifications()) {
// if notifications have to be treated, continue // if notifications have to be treated, continue
printf("d\n"); //printf("d\n");
continue; continue;
} }
else if (engine().interactions().empty() && engine().internals().empty() && !interactive()) { else if (engine().interactions().empty() && engine().internals().empty() && !interactive()) {
printf("e\n"); //printf("e\n");
// wait for incoming events // wait for incoming events
waitForNotifications(); waitForNotifications();
printf("f\n"); //printf("f\n");
continue; continue;
} }
} }
printf("g\n"); //printf("g\n");
// interactions and internal ports enabled at the current state // interactions and internal ports enabled at the current state
const vector<InteractionValue *> &interactions = engine().interactions(); const vector<InteractionValue *> &interactions = engine().interactions();
const vector<AtomInternalPort *> &internals = engine().internals(); const vector<AtomInternalPort *> &internals = engine().internals();
...@@ -702,7 +702,7 @@ BipError &RandomScheduler::run() { ...@@ -702,7 +702,7 @@ BipError &RandomScheduler::run() {
} }
if (chosenIndex < interactions.size()) { if (chosenIndex < interactions.size()) {
printf("h\n"); //printf("h\n");
// execute an interaction // execute an interaction
InteractionValue &chosenInteraction = *interactions[chosenIndex]; InteractionValue &chosenInteraction = *interactions[chosenIndex];
...@@ -715,7 +715,7 @@ BipError &RandomScheduler::run() { ...@@ -715,7 +715,7 @@ BipError &RandomScheduler::run() {
} }
} }
else { else {
printf("j\n"); //printf("j\n");
// execute an internal port // execute an internal port
AtomInternalPort &chosenInternal = *internals[chosenIndex - interactions.size()]; AtomInternalPort &chosenInternal = *internals[chosenIndex - interactions.size()];
...@@ -733,7 +733,7 @@ BipError &RandomScheduler::run() { ...@@ -733,7 +733,7 @@ BipError &RandomScheduler::run() {
} }
} }
printf("k\n"); //printf("k\n");
// log deadlock or reached limit // log deadlock or reached limit
if (!interactive()) { if (!interactive()) {
logger().log(engine().interactions(), engine().internals(), engine().externals()); logger().log(engine().interactions(), engine().internals(), engine().externals());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment