mo_graph(new CycleGraph()),
failed_promise(false),
too_many_reads(false),
- asserted(false)
+ asserted(false),
+ bad_synchronization(false)
{
/* Allocate this "size" on the snapshotting heap */
priv = (struct model_snapshot_members *)calloc(1, sizeof(*priv));
node_stack->reset_execution();
failed_promise = false;
too_many_reads = false;
+ bad_synchronization = false;
reset_asserted();
snapshotObject->backTrackBeforeStep(0);
}
DEBUG("Infeasible: failed promise\n");
if (too_many_reads)
DEBUG("Infeasible: too many reads\n");
+ if (bad_synchronization)
+ DEBUG("Infeasible: bad synchronization ordering\n");
if (promises_expired())
DEBUG("Infeasible: promises expired\n");
}
- return !mo_graph->checkForCycles() && !failed_promise && !too_many_reads && !promises_expired();
+ return !mo_graph->checkForCycles() && !failed_promise && !too_many_reads && !bad_synchronization && !promises_expired();
}
/** Returns whether the current completed trace is feasible. */
void finish_execution();
bool isfeasibleprefix();
void set_assert() {asserted=true;}
+
+ /** @brief Alert the model-checker that an incorrectly-ordered
+ * synchronization was made */
+ void set_bad_synchronization() { bad_synchronization = true; }
+
const model_params params;
MEMALLOC
bool failed_promise;
bool too_many_reads;
bool asserted;
+ /** @brief Incorrectly-ordered synchronization was made */
+ bool bad_synchronization;
};
extern ModelChecker *model;