CS 641 meeting -*- Outline -*- * syntax for commands with unbounded choice a necessary step in the definition of wp and wlp for recursive procs the point is to define the syntax of commands so can do induction ** layers this will be done in 3 layers ------------------------- LAYERS OF SYNTAX Let S be a set of simple commands. Let H be a set of procedure names. examples (.) A (choices) ([] i \in I :: c.i) ________________ * A (compositions) x:=x-1; h ______________ A = S \cup H x:=x-1 , h ---------------------------------- ** definitions ---------------------------------- SYNTAX SETS (LANGUAGES) Let A be a set of symbols not containing \epsilon or `;'. * def: A = set of strings over A with \epsilon the empty string, and concatenation written with `;'. (.) * def: A = PowerSet(A ) \ {}. elements of this set are *commands*. ---------------------------------- Can regard A as subset of A* and A* as subset of A(.). An element s \in A* is sequential composition of its terms. An element r \in A(.) is choice of its element strings. Q: so why is A(.) non-empty? --------------------------- LANGUAGE EXTENSIONS def: Let v: A -> PT. The *string extension* of v, v*: A* -> PT is defined inductively as v* .\epsilon = identity v*.(a;s) = v.a o v*.s def: Let v: A -> PT. The *language extension* of v, v(.): A(.) -> PT is defined as v(.).r = (inf s \in r :: v*.s) Lemma: for any predicate p \in |P, v(.).r.p = (all s \in r :: v*.s.p) --------------------------- Lemma: (a) Let V be an inf-closed subset of PT that contains the identity function and is closed under composition. Then v(.) : A(.) -> V for every v : A -> V. (b) The subsets MT, MC, MP, MU of PT satisfy the condition in part (a). Q: how would you prove this?