













Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Programming Languages: Application and. Interpretation ... Summarize and clarify lecture material. ▫. Elaborate on material (outside research).
Typology: Slides
1 / 21
This page cannot be seen from the preview
Don't miss anything!














http://www.cs.purdue.edu/homes/suresh/456-Fall2005/
Programming experience/maturity
Mathematical maturity
Most important:
Foundations
Understand specific language features
Four classical approaches:
Informal
Easy to understand
Easy to misunderstand
Operational
Define programs in terms of rules that apply to a specific virtual
machine
Useful for implementing a compiler or interpreter
Denotational
Meaning in terms of functions from syntax (program text) to
domains (values)
Useful for describing the behavior of programs
Axiomatic
Logical rules for reasoning about programs
Useful for proving program correctness
Imperative
Fortran, Algol, C, Pascal
Designed around a notion of a program store
Program behavior expressed in terms of transformations on the store
Functional
Lisp, ML, Scheme, Haskell
Programs described in terms of a collection of functions
“Pure” functional languages are state-free
Logic
Prolog
Programs described in terms of a collection of logical relations
Concurrent
Fortran90, CSP, Linda
Special purpose
TeX, Postscript, HTML, CGI
Lisp 1.
Based on λ-calculus
Key aspect of the calculus is notion of substitution of free variables:
function f (args) = .... x ....
Suppose x is not included in args. Where should the binding for x
be constructed?
At the point where f is defined (lexical scoping)
At the points where f is applied (dynamic scoping)
Lisp 1.5 (and later dialects) chose dynamic scoping, even though it is
widely agreed today that lexical scoping is the more sensible choice.
When do these distinctions arise? Why are the differences important?
Lack of formal semantics to explore the ramifications of design choice
Strongly-typed object-oriented language that supports
inheritance
Uses a notion of covariance (rather than contravariance) in
typing functions
A function with a restricted set of inputs can be used in a
context where a function with a wider set of arguments is
expected
Type system may fail to prevent runtime type errors
Failure to cleanly separate notions of subtyping from
subclassing