Issue374

Title Make fact names more readable for boolean variables
Priority wish Status resolved
Superseder Nosy List jendrik, malte
Assigned To jendrik Keywords
Optional summary

Created on 2013-04-19.19:12:02 by jendrik, last changed by jendrik.

Messages
msg2423 (view) Author: jendrik Date: 2013-04-19.21:05:48
Done.
msg2418 (view) Author: malte Date: 2013-04-19.19:37:17
It's probably better not to do this on the string level but on some other level,
but I don't really remember the relevant code in the translator. Let me have a
look... something like this:

$ hg diff
diff -r 567207f32fa9 src/translate/fact_groups.py
--- a/src/translate/fact_groups.py	Sat Feb 23 05:59:25 2013 +0100
+++ b/src/translate/fact_groups.py	Fri Apr 19 19:34:49 2013 +0200
@@ -84,7 +84,10 @@
     group_keys = []
     for group in groups:
         group_key = [str(fact) for fact in group]
-        group_key.append("<none of those>")
+        if len(group) == 1:
+            group_key.append(str(group[0].negate()))
+        else:
+            group_key.append("<none of those>")

However, there is some code that relies on the fact names and that will break
given this, function get_predicate_for_fact in
src/search/landmarks/landmark_factory_rpg_sasp.cc. This reliance on fact names
is a major no-no and should be addressed at some point, but at the moment I
think it'd be fine to just patch the code so that it can treat "NegatedAtom"
like "Atom".

Can you make these two changes (translator + search)?
msg2416 (view) Author: jendrik Date: 2013-04-19.19:12:02
It would be nice to change this more generally to make the
output more readable: if a SAS+ variable has only two values and one of these is
a "none of those", then check if the other is "Atom ..." and call the other
value "NegatedAtom ..." instead.
History
Date User Action Args
2013-04-20 15:43:19jendriksetstatus: chatting -> resolved
2013-04-19 21:05:48jendriksetmessages: + msg2423
2013-04-19 19:37:17maltesetstatus: unread -> chatting
messages: + msg2418
2013-04-19 19:12:02jendrikcreate