Ian,
Thanks - I was having a brainstorm. I note one oddity with the precedences. If you work at it, both ways of putting the brackets in something of the form %mu x: X | A /\ B can be type correct. The precedences give you the predicate conjunction (%mu x : X | A) /\ B, whereas I would have expected %mu x : X | (A /\ B). As Phil Clayton said on another forum, any reasonable Z style guide would strongly encourage people to bracket these weird cases. In retrospect, I wish the standard had been more restrictive about brackets. Having worked a lot with a large multi-author Z spec over the last few years, misplaced brackets are one of the most common causes of error.
Regards,
Rob.
On 19 Jul 2011, at 11:02, Ian Toyn wrote:
> Rob Arthan writes about parsing the following predicate.
>
> {} = %lambda x: %Z @ [y: %Z | x < y] \/ [y:%Z | y < x]
>
> ISO Z assigns precedences to operators.
> Function construction binds tighter than relation operator application,
> which binds tighter than disjunction (whether predicate or expression).
> Those precedences have the effect of requiring the parse indicated below by parentheses.
>
> ({} = (%lambda x: %Z @ [y: %Z | x < y])) \/ [y:%Z | y < x]
>
> Only then is any ambiguity in the use of logical operations considered.
> Since the left disjunct is a predicate, this disjunction is a predicate.
>
> CZT (and also CADiZ) find the parse described above.
>
> Does that work-around the issue, or did I miss something?
>
> Regards,
> Ian
>
>
> ------------------------------------------------------------------------------
> Magic Quadrant for Content-Aware Data Loss Prevention
> Research study explores the data loss prevention market. Includes in-depth
> analysis on the changes within the DLP market, and the criteria used to
> evaluate the strengths and weaknesses of these DLP solutions.
> http://www.accelacomm.com/jaw/sfnl/114/51385063/
> _______________________________________________
> CZT-Users mailing list
> CZT...@li...
> https://lists.sourceforge.net/lists/listinfo/czt-users
|