meeting -*- Outline -*- * semantics (3.2) This is in essence, a denotational semantics. a set-theoretic model a type S denotes a set in some universe U of nonempty sets a term t:S denotes an element in the meaning of S ** Semantics of types Use M.S for the meaning of S Q: Can the meaning of a type S, M.S, be empty? Why? no, we never want to deal with types that can't have members Q: What is the universe, U, closed under? non-empty subset, cartesian product, power set, and function space construction Q: What distinguised sets are assumed in the universe, U? an infinite set of individuals, I, a two-element set, 2 == {tt,ff} Q: What's a model of a type structure? a map from operators, f \in Op_n, to fuctions M.f: U^n -> U such that M.Bool == 2 M.(S -> T) == {f | f : M.S -> M.T} ** Semantics of terms Q: What is a model of a signature, SG, over a type structure AT? A model of AT and a meaning function, M, such that for all c:S \in SG, M.c:S \in M.S and for all types S, M.(==):S->S->Bool is equality on M.S Q: What is a model of a type environment? an environment, which relates variables to values ------------------------------------------ MEANING OF TERMS def: Let TE be a type environment. A TE-environment, E, is a function E : dom(TE) -> U such that for all (v:S) \in TE, E.v \in M.S def: Let be a signature. Let TE |- t: S. Let E be a TE-environment. Then M_E.t:S is defined by M_E.c:S == M.c if c:S \in SG, and c \not\in dom(TE) M_E.v:S == E.v if v:S \in TE M_E.(t1.t2):S == (M_E.t1).(M_E.t2) M_E.(\v:S.t):S == (\a.M_{E,(v:a)}.t) M_E.(t:S):S == M_E.t : S ------------------------------------------