I think the name is good. Calling the states of a transition system "abstract
states" is something we often do.
Regarding whether it's useful, it's not an easy question. I like the idea of
seeing at a glance what is and isn't an abstract state. There are 49 lines that
use the word "AbstractStateRef", which is quite a lot, so this seems to be a
useful concept.
On the other hand, a typedef doesn't offer any type safety, so calling something
an AbstractStateRef rather than an int is more a comment than anything else.
Considering the large number of uses, I wonder if it couldn't be useful for code
clarity to replace AbstractStateRef by an actual class (which would just
encapsulate an int).
For me, the main drawback with getting rid of it is that function signatures and
member declarations are much easier to understand if you know that something
refers to an abstract state and not just an arbitrary int. Examples:
abstraction.cc: vector<vector<AbstractStateRef> > forward_graph(num_states);
abstraction.cc: deque<AbstractStateRef> queue;
abstraction.h: std::vector<std::vector<AbstractStateRef> > lookup_table;
shrink_bucket_based.h: typedef std::vector<AbstractStateRef> Bucket;
shrink_strategy.h: typedef __gnu_cxx::slist<AbstractStateRef> EquivalenceClass;
I think these are much clear than if they all said "int" instead.
|