Download Propositional Calculus

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Falcon (programming language) wikipedia , lookup

Knowledge representation and reasoning wikipedia , lookup

Class (computer programming) wikipedia , lookup

Logic programming wikipedia , lookup

Object-relational impedance mismatch wikipedia , lookup

Control flow wikipedia , lookup

C++ wikipedia , lookup

Go (programming language) wikipedia , lookup

Abstraction (computer science) wikipedia , lookup

Functional programming wikipedia , lookup

Reactive programming wikipedia , lookup

Domain-specific language wikipedia , lookup

Programming language wikipedia , lookup

Structured programming wikipedia , lookup

Object-oriented programming wikipedia , lookup

C Sharp (programming language) wikipedia , lookup

Transcript
Introduction to CS 550
Programming Languages
Jeremy Johnson
Drexel University
Course Description
 Covers basic concepts of the design and
implementation of programming languages,
including data representation and types,
functions, sequence control, environments,
block structure, subroutines and coroutines,
storage management. Emphasizes language
features and implementation, not mastery of any
particular languages.
2
Course Prerequisites
 CS 520, 570 and 571
 Assumes familiarity with the basics of logic
(predicate calculus), recursion and induction,
data structures, automata, and grammars. All
students should be proficient with at least one
object-oriented programming language, e.g.,
Java or C++, be familiar with inheritance,
polymorphism, and should have seen at least
two different programming languages.
3
Course Themes
 Evaluation and implementation of programming
languages.
 Tools for describing and analyzing languages,
including syntax, semantics, and pragmatics.
 Tools to design new languages.
 Proving properties of programs and
programming languages*
 Formal methods*
*New emphasis. Will use Coq Proof Assistant. Formal
methods having industrial impact [e.g. Sel4, CompCert]
4
Course Objectives
 Be able to formally specify the syntax and semantics of programming
languages.
 Be able to prove properties of programs using both equational reasoning
and structural induction.
 Be able to use a proof assistant to formally prove properties of programs
and programming languages
 Be able to implement an interpreter for a simple programming language.
 Be able to formally specify a type system and understand the type
inference process.
 Understand how to use a strongly typed language's type system to
capture program invariants.
5
Course Benefits
 Better able to formally express concepts and reason about them
 Become a better programmer and write programs with fewer bugs
 Improved ability to select appropriate languages and programming
constructs
 Better understand programming languages and their design tradeoffs
 Easier to learn new languages
 Able to design and implement new languages (little languages, interface
specifications, protocols)
6
Course Topics
 Functional Programming and Equational Reasoning (DrRacket, SICP)
 Operational Semantics for Scheme (SICP)
 Streams and Delayed Evaluation (SICP)
 Lambda Calculus (TAPL)
 Haskell and Introduction to Types (H)
 Introduction Coq (SF)
 Introduction Coq (SF)
 Operational Semantics and Formal Verification (SF)
 Hoare Logic (SF)
 Types (SF)
7
Textbook
 Abelson and Sussman, Structure and
Interpretation of Computer Programs
(SICP)
https://mitpress.mit.edu/sicp/
8
Textbook
 Benjamin Pierce, Types and Programming
Languages (TAPL)
www.cis.upenn.edu/~bcpierce/tapl/index.html
(available online through Drexel Library)
9
Textbook
 Miran Lipovača, Learn You a Haskell for
Great Good! (LYHGG)
http://learnyouahaskell.com/
10
Textbook
 Benjamin Pierce et al., Software
Foundations (SF)
www.cis.upenn.edu/~bcpierce/sf/current/index.
html
11
Software (DrRacket)
racket-lang.org
12
Software (GHC)
quicksort :: (Ord a) => [a] -> [a]
quicksort [] = []
quicksort (x:xs) =
let smallerSorted = quicksort [a | a <- xs, a <= x]
biggerSorted = quicksort [a | a <- xs, a > x]
in smallerSorted ++ [x] ++ biggerSorted
www.haskell.org
13
Software (Coq)
coq.inria.fr
14
Grading
 Course Requirements and Grading
1. Class Participation (10  2% = 20%)
 In class exercises – online students submit offline
 Graded for effort
2. Five Bi-weekly homework assignments (5 
10% = 50%)
 Done in pairs
3. Midterms (15%) and Final (15%) exam
 Online Midterm week 6
 Online Final exam during finals week
15
Class Logistics
 Announcements will be posted in piazza
 Use Piazza to ask questions
 I will regularly monitor and reply to questions
in a timely manner
 Office hours M 8-9 online, R 4-6.
 Assignments will be due by 9am on Thur
every other week starting with week 3
 Late assignments will be accepted through
Sunday at 9am with a 10% per day penalty
16
Class Logistics
 In class exercises (10  2)
 Worth 2 points each
 Labs may be done with a partner and will be
graded in class for effort
 Online students submit lab by the following
Monday @ 9am
 Don’t fall behind
 Come to class prepared
 Go to office hours and get help if you are
having difficulty
17