Presentation is loading. Please wait.

Presentation is loading. Please wait.

Drew Wyborski Programming Languages

Similar presentations


Presentation on theme: "Drew Wyborski Programming Languages"— Presentation transcript:

1 Drew Wyborski Programming Languages
ML: the metalanguage Drew Wyborski Programming Languages

2 Introduction Originally conceived to develop proof tactics
Automatically infers types Focus on developing programs through a logical approach Used as the basis for several other languages and dialects

3 Functional Programming
Logical analysis is simple and easy No reassignment or modification of types Can prove assertions about a program with ease Difficult to write programs that are illogical Lend themselves well of parallel execution Still retain all the useful components of a traditional language

4 Functional vs. Imperative
Development Cycle Development Language Run-time System FORTRAN, Pascal, C ML, Hope, Lisp

5 Language Overview Call-by-value evaluation strategy
Automatic memory allocation through garbage collection Parametric polymorphism Static typing Exception handling Pattern matching

6 Development and Creation
Developed by Robin Milner in 1973 at Edinburgh University The goal behind ML The perfect language

7 Standard ML Standard ML ’90 & Standard ML ‘97
Changes from original Edinburgh ML Standard ML-New Jersey Other popular versions Moscow ML ML Kit MLton PolyML

8 Characteristics Safety through the type-checker
Structures and signatures Flexibility of functions Call-by-value evaluation Polymorphism Compile-time type checking Type inference

9 Characteristics Garbage collection Exemption handling
Immutable data types Updating references Abstraction Parametric modules Formal definition Proof of completeness

10 Data Type/Operators Operators and types similar to C++/Java
int, string, bool and real remain the same Operators have slight differences Additional Boolean types are included showing the rational/logical basis andalso & orelse

11 Syntax Input is placed into user’s implementation
Machine responds with result of expression Specified layout for entry and output 3 + 4; val it = 7 : int If an error is made in entry, the machine responds with an appropriate error The unit data type

12 Definitions Global constants Functions Extensions val PI = 3.4;
Help increase readability Functions fun succ n = n+1; val succ = fn : int  int Extensions if…then…else functions Multiple input/output functions


Download ppt "Drew Wyborski Programming Languages"

Similar presentations


Ads by Google