X-Git-Url: http://plrg.eecs.uci.edu/git/?p=c11tester.git;a=blobdiff_plain;f=promise.cc;h=29e261f04086dca1891d12934bb75596af03000a;hp=26a1095f4440a4b65d80dd67917da2f423ab28fe;hb=cb7d648c3c1c3d916c7fc60a7cb332eb2b52d510;hpb=f1ba5c8c393c310e2210cbfb74020bec67fa6934 diff --git a/promise.cc b/promise.cc index 26a1095f..29e261f0 100644 --- a/promise.cc +++ b/promise.cc @@ -166,3 +166,9 @@ bool Promise::same_location(const ModelAction *act) const { return get_reader(0)->same_var(act); } + +/** @brief Get this Promise's index within the execution's promise array */ +int Promise::get_index() const +{ + return model->get_promise_number(this); +}