From: Tim C. <tim...@ya...> - 2009-12-14 04:08:40
|
Jomi, I continued working on my approach and was basically finished by the time I saw your alternative. I am glad it is fixed. I am attaching my new patch just as a FYI, for posterity :^) and incase you can steal from it if other bugs relating to this are identified in future. This patch satisfies the old meaning of testMakeVarsAnnon4 and all the asunit tests as well. The primary change is in literal.java. It always anonymizes the beliefs (both rule and fact) from the beliefs as they are pulled out. It clones them first so as to not pollute the belief base with the new names. Because the beliefs are renamed and not the context of plans, the mapping from old names to new can be discarded. As such, a separate unifier is used to collect the renamings for rules (although a hashmap from vars to vars would probably be better). Structure.java has been updated to use the input unifier passed to makeVarsAnnon as a mapping from old variables to new. Thus, all variable are renamed, not just the anonymous ones. This renaming process will also inspect the annotations to ensure their renamings are consistent also. Basically you can call makeVarsAnnon on any structure and you will be given a consistent anonymisation that will respect any input manual renamings. All this aside, thank you again for fixing my original problem. regards, Tim __________________________________________________________________________________ See what's on at the movies in your area. Find out now: http://au.movies.yahoo.com/session-times/ |