X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=nodestack.cc;h=01273479a69ed90919c3b60765fe8a814d2a584b;hb=5f5f526a141aa4727cb37920212623c8afffa1f6;hp=515a2d313abbee54abbd132057100c89f9f711fc;hpb=c4c6c997cb5d2d651d4dfa76390a42592432d266;p=model-checker.git diff --git a/nodestack.cc b/nodestack.cc index 515a2d3..0127347 100644 --- a/nodestack.cc +++ b/nodestack.cc @@ -462,6 +462,24 @@ Promise * Node::get_read_from_promise() const return read_from_promises[read_from_promise_idx]->get_reads_from_promise(); } +/** + * Gets a particular 'read-from-promise' form this Node. Only vlaid for a node + * where this->action is a 'read'. + * @param i The index of the Promise to get + * @return The Promise at index i, if the Promise is still available; NULL + * otherwise + */ +Promise * Node::get_read_from_promise(int i) const +{ + return read_from_promises[i]->get_reads_from_promise(); +} + +/** @return The size of the read-from-promise set */ +int Node::get_read_from_promise_size() const +{ + return read_from_promises.size(); +} + /** * Checks whether the read_from_promises set for this node is empty. * @return true if the read_from_promises set is empty.