Hi, If there is a more appropriate place for me to ask these questions, please let me know.
I'm currently working through CTM, and am enjoying it very much. I was confused by the answers to question #6 at the end of chapter #2 (the answers obtained by running the code snippets to verify my guesses). I can't find a section that explains the blocking of a case statement when there are unbound variables in the value given as the first argument. At first I thought the answer was with the case->if translation from an earlier question, because it compares the values from the records, which would mean case foo(bar:X baz:Y) of foo(bar:bar baz:baz) ... would block the same way as ... if X == bar andthen Y == baz ... Though this confused me further because case foo(bar:bar baz:baz) of foo(bar:X baz:Y) ... Would translate to roughly the same thing in terms of entailment checks, but in reality, that statement doesn't block: it just binds X and Y. Also, to fully implement 'case' in terms of 'if' (including binding pattern variables) wouldn't we have to be able to distinguish between variable identifiers and atoms, to ensure that for: case foo(bar:bar) of foo(bar:bar) ... we don't try to bind 'bar' to 'bar'? I don't think page 67 covers this either; it says that we put bindings for <x>1 -> E(<x>).<feat>1 through <x>n -> E(<x>).<feat>n into the environment, which would seem to result in bindings for bar -> bar, given the above example. Am I missing a layer of abstraction here? Thanks in advance, Moe Aboulkheir _________________________________________________________________________________ mozart-users mailing list mozart-users@ps.uni-sb.de http://www.mozart-oz.org/mailman/listinfo/mozart-users