Theory KPL_syntax
section ‹Syntax of KPL›
theory KPL_syntax imports
Misc
begin
text‹Locations of local variables›
typedecl V
text ‹C strings›
typedecl name
text ‹Procedure names›
typedecl proc_name
text ‹Local-id, group-id›
type_synonym lid = nat
type_synonym gid = nat
text ‹Fully-qualified thread-id›
type_synonym tid = "gid × lid"
text ‹Let @{term "(G,T)"} range over threadsets›
type_synonym threadset = "gid set × (gid ⇀ lid set)"
text ‹Returns the set of tids in a threadset›
fun tids :: "threadset ⇒ tid set"
where
"tids (G,T) = {(i,j) | i j. i ∈ G ∧ j ∈ the (T i)}"
type_synonym word = nat
datatype loc =
Name name
| Var V
text ‹Local expressions›