What is CS312 About?

Course overview information can be found here.

Background on ML

Our first order of business in this course is to learn how to use ML. Why learn another language?

We use a zillion different programming languages to communicate with machines and each other:

Though there are only a handful of general-purpose languages that you will learn and use, you'll be learning and using special-purpose languages for the rest of your life.  Even general-purpose languages come and go.  Today, it's Java and C++.  Yesterday, it was Pascal and C, before that Fortran and Lisp.  Who knows what it will be like tomorrow? You have to learn how to learn new languages.

In addition, many projects will require that you build "little" languages for gluing things together.

We gain a lot of leverage by having good notation and good language support for a given domain.  

So it's important to understand programming models and programming paradigms because in this fast changing field, you need to be able to rapidly adapt.

It's crucial that you understand the principles behind programming that transcend the specifics of today.

There's no better way to get at these principles than to approach programming from a completely different perspective.

This is one reason why we're using ML -- it's very different from what most of you will have seen.


A great general-purpose programming language:

Fact:  there are thousands of general purpose languages.

Corollary:  there are no great programming languages.  

But there are some pretty good ones.  Java and ML are pretty good general-purpose languages (at least when compared to their predecessors.)


SML is a functional programming language.

SML is a statically typed, type-safe programming language.

SML (and SML/NJ in particular) supports a number of advanced features.


Some history

    (see Paulson's book for more info):

Robin Milner and others at the Edinburgh (Scotland) Laboratory for Computer Science were working on theorem provers in the late '70s and early '80s. 

Traditionally, theorem provers were implemented in languages such as Lisp.

Milner kept running into the problem that the theorem provers would sometimes put incorrect "proofs" (i.e., non-proofs) together and claim that they were valid.

So he tried to develop a language that only allowed you to construct valid proofs.

"ML" which stands for "Meta Language" was the result of his (and others') work.  The type system of ML was carefully constructed so that you could only construct valid proofs in the language.  A theorem prover was then written as a program that constructed a proof.

Milner also formulated the type-inference system of ML, and proved its soundness.

(It should be noted that Milner also worked on concurrent programming languages, such as CCS, CSP, and the pi-Calculus and later went to receive the Turing Award -- the computer science equivalent of a Nobel Prize -- in large part for his work on ML

Eventually, this Classic ML evolved into a full-fledged programming language.

In the early '80s, there was a schism in the ML community with the French on one side and the British and US on another.  The French went on to develop CAML and later Objective CAML (O'caml) while the Brits and Americans developed Standard ML.  The two languages are actually quite similar.

What is ML used for today?

In truth, not a lot when compared to something like C, C++, or Java.  ML's real strength lies in language manipulation (i.e., compilers, analyzers, verifiers, provers, etc.)  This is not surprising since ML evolved from the domain of theorem proving.