You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The iterator can be a typedef of the STL cache container type.
The first call to either begin() or end() constructs the cache. This also implies that the cache is owned by the CfgInterface, which can edit the cache at its will -- invalidating existing iterators.
Whenever the cache is empty/null, it must be (re-)constructed.
The iterators obtained from begin() and end() are incomparable as the graph may have been edited between the two calls.
Iterator holds the traversal stack
The iterator is not a simple typedef
begin() returns an object which has the traversal stack inside.
end() is a sentinel instance of the iterator, allowing any call to end() to be comparable to any call to begin() -- given that they are iterators over the same CfgInterface.
Editing the graph while traversing via an iterator leads to undefined behaviour, but it should never crash. A naive implementation can lead to crash when some unvisited worklist node is deleted from the graph (but not from the worklist).
The text was updated successfully, but these errors were encountered:
This is not very straight forward.
Cache traversal with
begin()
(orend()
)begin()
orend()
constructs the cache. This also implies that the cache is owned by theCfgInterface
, which can edit the cache at its will -- invalidating existing iterators.begin()
andend()
are incomparable as the graph may have been edited between the two calls.Iterator holds the traversal stack
begin()
returns an object which has the traversal stack inside.end()
is a sentinel instance of the iterator, allowing any call toend()
to be comparable to any call tobegin()
-- given that they are iterators over the sameCfgInterface
.The text was updated successfully, but these errors were encountered: