CS 641 meeting -*- Outline -*- * the syntactic algebra (4.7) need to define choice and composition syntax for A(.) Why is this a problem? A(.) is semantics, not syntax. Consider the following (c1 [] (c2 ; c3 [] c4 ; c5)) ; c6 This isn't a part of A(.), even though c2;c3 and c4;c5 are, because it isn't flattened as required by A(.). Q: how could you translate the above into an element of A(.)? {c1;c6, c2;c3;c6, c4;c5;c6} so we want syntactic operators [] and ; that are given meaning by just such a translation. Q: What's the translation for []? Let I be nonempty ([] i \in I :: q.i) =def= (\cup i \in I :: q.i) Q: And for ;? s \in q;r equiv (exists t \in q, u \in r :: s = t;u). (that last ; is composition as strings in A*.) ---------------------- SEMANTICS OF CHOICE AND COMPOSITION Let A([],;) be set of commands obtained from A(.) by using ; and []. Let q, q.i \in A([],;) Let r,s,t \in A(.) meaning : A([],;) -> A(.) meaning.r = r meaning.([] i \in I :: q.i) = (\cup i \in I :: meaning.(q.i)) meaning.(q;r) = {s | t \in meaning.q, u \in meaning.r, and s = t;u} ----------------------- that last ; is composition as strings in A*. Hesselink doesn't use meaning or A([],;), he thinks of [] and ; as operators "on A(.)" and thus *identifies* the two examples above Use S(.) to denote the subset of A(.) that consists of nonempty sets of strings over S. (as in section 2.6) Thm (distributivity): For nonempty sets C and D of A(.), ([] c \in C :: c) ; ([] d \in D :: d) = ([] c \in C, d \in D :: c;d) Note that this is equality instead of semantic equivalence. (compare chapter 3) Q: can you prove this?