




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





This is the part where we mention our names (I’m abysmal at remembering them, so you’ll have to help me out) and something we like (e.g., I’m partial to Babylon 5).
Programming Languages Topic of Ultimate Mastery
Wes Weimer CS 655 – TR 5:00-6:15 @ MEC 339 http://www.cs.virginia.edu/~weimer/
Reasonable Initial Skepticism (^) Today’s Class
C++
Java (or C#)
Consider the following program fragment: Code Type inference fun id(x) = x id : α → α (for any α) val c = alloc id c : ptr (α → α) (for any α) fun inc(x) = x + 1 inc : int → int c := inc Ok, since c : ptr (int → int) (c) (“hi”) Ok, since c : ptr (string → string)
Prerequisites
Assignments
⇓ σ
⇓ false
Def: σx:= n = n ⇓ σ[x := n]^ σx:= n =^ σ(y)
⇓ n
⇓ σ’
⇓ true ⇓ σ’
hypotheses therefore result ⇓ n {Z} Z ∧ ((P ⇒ Q) ⇒ P) ⇒ P Θ; ∆; Σ; Γ x : Γ(x)
Can really show anything. Varies by judgment.
Conclusion
Hypothesis 1 … HypothesisN
Γ if b then e1 else e2 : τ
Γ b : bool Γ e1 : τ Γ e2 : τ