Lecture 14: Mocking Mockingbirds

Slides:



Advertisements
Similar presentations
Types and Programming Languages Lecture 7 Simon Gay Department of Computing Science University of Glasgow 2006/07.
Advertisements

David Evans CS655: Programming Languages University of Virginia Computer Science Lecture 20: Total Correctness; Proof-
Class 39: Universality cs1120 Fall 2009 David Evans University of Virginia.
David Evans CS150: Computer Science University of Virginia Computer Science Lecture 39: Lambda Calculus.
David Evans CS655: Programming Languages University of Virginia Computer Science Lecture 19: Minding Ps & Qs: Axiomatic.
The Design and Implementation of a Certifying Compiler [Necula, Lee] A Certifying Compiler for Java [Necula, Lee et al] David W. Hill CSCI
Lecture 2 Page 1 CS 236, Spring 2008 Security Principles and Policies CS 236 On-Line MS Program Networks and Systems Security Peter Reiher Spring, 2008.
A Type System for Expressive Security Policies David Walker Cornell University.
David Evans CS150: Computer Science University of Virginia Computer Science Lecture 28: Implementing Interpreters.
David Evans CS200: Computer Science University of Virginia Computer Science Class 31: Universal Turing Machines.
Administrative Stuff (yawn) How rude - I think I forgot to introduce myself. Lecturer: Rob Day Cell Office Kenny Road, Room 200E.
Lecture 20: λ Calculus λ Calculus & Computability Yan Huang Dept. of Comp. Sci. University of Virginia.
David Evans Class 13: Quicksort, Problems and Procedures CS150: Computer Science University of Virginia Computer Science.
CSE S. Tanimoto Lambda Calculus 1 Lambda Calculus What is the simplest functional language that is still Turing complete? Where do functional languages.
Let’s Stop Beating Dead Horses, and Start Beating Trojan Horses! David Evans INFOSEC Malicious Code Workshop San Antonio, 13.
Lecture 8: The Meaning of Life, Searching for Truth and The Stuff Primitives are Made Of (and a smattering of Quantum Physics) David Evans
CSE 230 The -Calculus. Background Developed in 1930’s by Alonzo Church Studied in logic and computer science Test bed for procedural and functional PLs.
David Evans CS655: Programming Languages University of Virginia Computer Science Lecture 21: Proof-Carrying Code and.
CSCI1600: Embedded and Real Time Software Lecture 28: Verification I Steven Reiss, Fall 2015.
CMSC 330: Organization of Programming Languages Lambda Calculus and Types.
David Evans CS200: Computer Science University of Virginia Computer Science Class 32: The Meaning of Truth.
David Evans CS150: Computer Science University of Virginia Computer Science Class 32: Computability in Theory and Practice.
Arvind Computer Science and Artificial Intelligence Laboratory M.I.T. L03-1 September 14, 2006http:// -calculus: A Basis for.
Fall 2013 Lecture 27: Turing machines and decidability CSE 311: Foundations of Computing.
(Thunking about Thunks)
Lecture 4: Metacircles Eval Apply David Evans
CS 550 Programming Languages Jeremy Johnson
Lecture 6: Lambda Calculus
Lambda Calculus CSE 340 – Principles of Programming Languages
Lecture 2: Schreme David Evans
Lecture 4: Evaluation Rules Recursion CS200: Computer Science
Class 22: Inheritance CS150: Computer Science University of Virginia
Class 27: Universal Turing Machines CS150: Computer Science
Class 30: Models of Computation CS200: Computer Science
MA/CSSE 473 Day 10 Data Encryption RSA.
Lecture 3 of Computer Science II
Lecture 37: A Universal Computer
CS 611: Lecture 9 More Lambda Calculus: Recursion, Scope, and Substitution September 17, 1999 Cornell University Computer Science Department Andrew Myers.
September 4, 1997 Programming Languages (CS 550) Lecture 6 Summary Operational Semantics of Scheme using Substitution Jeremy R. Johnson TexPoint fonts.
Lambda Calculus Revisited
Introduction CSE 1310 – Introduction to Computers and Programming
Turing Machines, Busy Beavers, and Big Questions about Computing
Security in Java Real or Decaf? cs205: engineering software
Class 36: The Meaning of Truth CS200: Computer Science
This Lecture Substitution model
Lecture 14: Blocking and Catching Photons Background
Lecture 25: Metalinguistics > (meval '((lambda (x) (* x x)) 4)
Lecture 21: Crosscutting Aspect-Oriented Programming Background
Lecture 10: The Return of Paco Background just got here last week
Class 37: Making Lists, Numbers and Recursion from Glue Alone
Class 33: Making Recursion M.C. Escher, Ascending and Descending
Lecture 10: Using Object-Oriented Languages
Lecture 17: Defeating Malcode (Shameless Self-Promotion) Background
Tonga Institute of Higher Education IT 141: Information Systems
Lecture 19: Proof-Carrying Code Background just got here last week
Class 31: Universal Turing Machines CS200: Computer Science
Lecture 10: Fixed Points ad Infinitum M.C. Escher, Moebius Ants
Class 34: Models of Computation CS200: Computer Science
Tonga Institute of Higher Education IT 141: Information Systems
Class 33: Learning to Count CS200: Computer Science
David Evans Lecture 19: ||ism I don’t think we have found the right programming concepts for parallel computers yet.
Lecture 13: Proof-Carrying Code Background just got here last week
Lecture 12: Minding your Ps & Qs:
CSE S. Tanimoto Lambda Calculus
This Lecture Substitution model
Lecture 15: Crazy Eddie and the Fixed Points Background
Self-Referencing Functions
CSE341: Programming Languages Lecture 12 Equivalence
Group 4: Song Li, Ying Lu, Hexin Wang, and Michael Walker May 1, 2000
Lecture 23: Computability CS200: Computer Science
Presentation transcript:

David Evans http://www.cs.virginia.edu/~evans Lecture 14: Mocking Mockingbirds God created the integers – all else is the result of man. Leopold Kronecker God created application – all else is the result of man. Alonzo Church (not really) Background just got here last week finished degree at MIT week before Philosophy of advising students don’t come to grad school to implement someone else’s idea can get paid more to do that in industry learn to be a researcher important part of that is deciding what problems and ideas are worth spending time on grad students should have their own project looking for students who can come up with their own ideas for research will take good students interested in things I’m interested in – systems, programming languages & compilers, security rest of talk – give you a flavor of the kinds of things I am interested in meant to give you ideas (hopefully even inspiration!) but not meant to suggest what you should work on Start filling out survey. CS655: Programming Languages University of Virginia Computer Science David Evans http://www.cs.virginia.edu/~evans

University of Virginia CS 655 Menu Midterm Survey Is Proof-Carrying Code Useful? My INFOSEC Malicious Code Talk Intro to Lambda Calculus 9 May 2019 University of Virginia CS 655

Is Proof-Carrying Code Useful? Visit www.cedillasys.com 9 May 2019 University of Virginia CS 655

Let’s Stop Beating Dead Horses, and Start Beating Trojan Horses! David Evans www.cs.virginia.edu/~evans/ INFOSEC Malicious Code Workshop San Antonio, 13 January 2000 University of Virginia Department of Computer Science Charlottesville, VA

INFOSEC Malicious Code Analogy: Security Cryptography Fun to do research in, lots of cool math problems, opportunities to dazzle people with your brilliance, etc. But, 99.9999% of break ins do not involve attack on sensible cryptography Guessing passwords and stealing keys Back doors, buffer overflows Ignorant implementers choosing bad cryptography [Netscape Navigator Mail] 13 January 2000 INFOSEC Malicious Code

Structure of Argument Low-level code safety (isolation) is the wrong focus Agree Disagree PCC is not a realistic solution for the real problems in the foreseeable future PCC is not the most promising solution for low-level code safety Lots of useful research and results coming from PCC, but realistic solution to malicious code won’t be one of them. 13 January 2000 INFOSEC Malicious Code

INFOSEC Malicious Code Low-level code safety Type safety, memory safety, control flow safety [Kozen98] All high-level code safety depends on it Many known pretty good solutions: separate processes, SFI, interpreter Very few real attacks exploit low-level code safety vulnerabilities One exception: buffer overflows Many known solutions to this Just need to sue vendors to get them implemented 13 January 2000 INFOSEC Malicious Code

High-Level Code Safety Enforcement is (embarrassingly) easy Reference monitors (since 1970s) Can enforce most useful policies [Schneider98] Performance penalty is small Writing good policies is the hard part Better ways to define policies Ways to reason about properties of policies Ideas for the right policies for different scenarios Ways to develop, reason about, and test distributed policies 13 January 2000 INFOSEC Malicious Code

INFOSEC Malicious Code Proofs Reference Monitors All possible executions Current execution so far No run-time costs Monitoring and calling overhead Checking integrated into code Checking separate from code Excruciatingly difficult Trivially easy Vendor sets policy Consumer sets policy 13 January 2000 INFOSEC Malicious Code

INFOSEC Malicious Code Fortune Cookie “That which be proved cannot be worth much.” Fortune cookie quoted on Peter’s web page must can True for all users True for all executions Exception: Low-level code safety 13 January 2000 INFOSEC Malicious Code

Reasons you might prefer PCC Run-time performance? Amortizes additional download and verification time only rarely SFI Performance penalty: ~5% If you care, pay $20 more for a better processor or wait 5 weeks Smaller TCB? Not really smaller: twice as big as SFI (Touchstone VCGen+checker – 8300 lines / MisFiT x86 SFI implementation – 4500 lines) You are a vendor who cares more about quality than time to market (not really PCC) 13 January 2000 INFOSEC Malicious Code

University of Virginia CS 655 Lambda Calculus Developed by Alonzo Church [1940] 9 May 2019 University of Virginia CS 655

University of Virginia CS 655 -calculus term = variable |  term | term term same as:  = x |   |   Evaluation rule: -reduction (substitution) (x. M)N   M [ x := N] Substitute N for x in M. 9 May 2019 University of Virginia CS 655

University of Virginia CS 655 Some Simple Functions I  x.x C  xy.yx Abbreviation for x.(y. yx) CII = (x.(y. yx)) (x.x) (x.x)   (y. y (x.x)) (x.x)   x.x (x.x)   x.x = I 9 May 2019 University of Virginia CS 655

Text-Substitution Problem Hard to keep all the x’s in x.(y. yx)) (x.x) (x.x) straight Smullyan/Keenan solve this by abandoning text representation and using pictures (Mockingbird paper) Traditional solution: rename before substitution 9 May 2019 University of Virginia CS 655

University of Virginia CS 655 Mystery Function p  xy.  pca.pca (x.x xy.x) x) y (p ((x.x xy.y) x) (x. z.z (xy.y) y) m  xy.  pca.pca (x.x xy.x) x) x.x (p y (m ((x.x xy.y) x) y)) f  x.  pca.pca ((x.x xy.x) x) (z.z (xy.y) (x.x)) (m x (f ((x.x xy.y) x))) if x = 0 1 x * f (x – 1) 9 May 2019 University of Virginia CS 655

Some Interesting Functions T  xy. x F  xy. y if  pca . pca Evaluate: if T M N ((pca . pca) (xy. x)) M N  (ca . (x.(y. x)) ca)) M N    (x.(y. x)) M N  (y. M )) N   M and  xy. if x y F or  xy. if x T y 9 May 2019 University of Virginia CS 655

University of Virginia CS 655 Coupling [M, N]  z.z M N first  p.p T second  p.p F first [M, N] = p.p T (z.z M N)   (z.z M N) T = (z.z M N) xy. x   (xy. x) M N   M 9 May 2019 University of Virginia CS 655

University of Virginia CS 655 Tupling n-tuple: [M] = M [M0,..., Mn-1, Mn] = [M0, [M1 ,..., [Mn-1, Mn ]... ] n-tuple direct: [M0,..., Mn-1, Mn] = z.z M0,..., Mn-1, Mn Pi,n = x.x Ui,n Ui,n = x0... xn. xi What is P1,2? 9 May 2019 University of Virginia CS 655

University of Virginia CS 655 Counting 0  I 1  [F, I] 2  [F, [F, I]] 3  [F, [F [F, I]] ... n + 1  [F, n] 9 May 2019 University of Virginia CS 655

University of Virginia CS 655 Arithmetic Zero?  x.x T Zero? 0 = (x.x T) I = T Zero? 1 = (x.x T) [F, I] = F succ  x.[F, x] pred  x.x F pred 1 = (x.x F) [F, I] = [F, I]F = I = 0 pred 0 = (x.x F) I = IF = F add  xy.if (Zero? x) y (add (pred x) (succ y) 9 May 2019 University of Virginia CS 655

University of Virginia CS 655 Factorial mult  xy. if (Zero? x) 0 (add y (mult (pred x) y)) fact  x. if (Zero? x) 1 (mult x (fact (pred x))) Recursive definition should make you uncomfortable. After Spring Break – fixed points 9 May 2019 University of Virginia CS 655

University of Virginia CS 655 Summary All you need is application and abstraction and you can compute anything This is just one way of representing numbers, booleans, etc. – many others are possible Integers, booleans, if, while, +, *, =, <, subtyping, multiple inheritance, etc. are for wimps! Real programmers only use . 9 May 2019 University of Virginia CS 655

University of Virginia CS 655 Charge Go to Ion Stoica’s talk “Scalable Internet Services”, 3:30 today, this room Enjoy your Spring Break Make some real progress on your projects – prepare to write March 23 Preliminary Reports Mockingbird paper – describes -calculus using pictoral representation Challenge (worth 1 position paper point) Keenan’s challenge: find a mapping that will give a unique musical tune for most combinators (hear the bird-songs) 9 May 2019 University of Virginia CS 655