X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=promise.cc;h=c695dc0ea21a4657cc04fd8601a28c77752f579b;hb=d7ef8a452c36e2ab3e56a8c43639006dc64d5d18;hp=23b92cd4186a59bb7a5b7c411668501afc4447e7;hpb=a0db445e3ecfedce6a85b7b381416b5c363a0614;p=model-checker.git diff --git a/promise.cc b/promise.cc index 23b92cd..c695dc0 100644 --- a/promise.cc +++ b/promise.cc @@ -140,3 +140,13 @@ bool Promise::is_compatible_exclusive(const ModelAction *act) const { return get_num_available_threads() == 1 && is_compatible(act); } + +/** + * @brief Check if a ModelAction's location matches this Promise + * @param act The ModelAction to check + * @return True if the action's location matches this Promise + */ +bool Promise::same_location(const ModelAction *act) const +{ + return get_reader(0)->same_var(act); +}