Issue474

Title M&S refactoring: rename classes, variables etc to fit paper name conventions
Priority wish Status resolved
Superseder Nosy List malte, silvan
Assigned To silvan Keywords
Optional summary

Created on 2014-09-22.15:18:24 by silvan, last changed by silvan.

Messages
msg3653 (view) Author: silvan Date: 2014-10-04.22:57:27
Merged.
msg3651 (view) Author: malte Date: 2014-10-04.22:04:40
Yes, please!
msg3650 (view) Author: silvan Date: 2014-10-04.22:03:51
I'm fine with that. Should I also close the branch and re-merge in the repository?
msg3637 (view) Author: malte Date: 2014-10-04.19:44:41
Once we're closer to the end of the M&S refactoring, we should perhaps reread
all of the code in context and then we'll hopefully see if there are more names
that can be improved, but I don't think we need to keep this issue open for
this. So I think we can close this -- if you think this is premature, feel free
to reopen it.
msg3506 (view) Author: silvan Date: 2014-09-23.11:48:23
Ok, merged, but not closed yet.
msg3505 (view) Author: malte Date: 2014-09-23.11:39:54
Feel free to merge without me looking at it, but perhaps closer to the end of
the complete refactoring, we can have another look and see if there are other
places where the names can be improved. (Maybe it's not worth fretting too much
about getting it 100% perfect now when many things will change anyway.)
msg3504 (view) Author: silvan Date: 2014-09-23.11:35:09
I thought the same about abstract states being fine.

Okay, so we may consider making it a class, but not in this issue. Do you
need/want to look at the renamings in the code or can I merge?
msg3503 (view) Author: malte Date: 2014-09-23.11:33:07
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.
msg3502 (view) Author: silvan Date: 2014-09-23.11:25:06
I renamed Abstraction to TransitionSystem and now I wonder whether I should
change AbstractStateRef (typedef int) to something else (or get rid of this
typedef). What do you think?
msg3499 (view) Author: silvan Date: 2014-09-22.21:43:19
This is part of the meta issue432.
msg3495 (view) Author: silvan Date: 2014-09-22.15:18:23
We want to have a look at the m&s code and rename classes and variables to fit
paper names, e.g. Abstraction -> TransitionSystem.
History
Date User Action Args
2014-10-04 22:57:28silvansetmessages: + msg3653
2014-10-04 22:04:40maltesetmessages: + msg3651
2014-10-04 22:03:51silvansetmessages: + msg3650
2014-10-04 19:44:41maltesetstatus: chatting -> resolved
messages: + msg3637
2014-09-23 11:48:23silvansetmessages: + msg3506
2014-09-23 11:39:54maltesetmessages: + msg3505
2014-09-23 11:35:09silvansetmessages: + msg3504
2014-09-23 11:33:07maltesetmessages: + msg3503
2014-09-23 11:25:06silvansetmessages: + msg3502
2014-09-22 21:43:19silvansetmessages: + msg3499
2014-09-22 15:18:24silvancreate