8/14/03ALADDIN REU Symposium 20031 Implementing TALT William Lovas with Karl Crary.

Slides:



Advertisements
Similar presentations
RAM (cont.) 220 bytes of RAM (1 Mega-byte) 20 bits of address Address
Advertisements

Trustless Grid Computing in Bor-Yuh Evan Chang, Karl Crary, Margaret DeLap, Robert Harper, Jason Liszka, Tom Murphy VII, Frank Pfenning
Type Analysis and Typed Compilation Stephanie Weirich Cornell University.
Comparing Semantic and Syntactic Methods in Mechanized Proof Frameworks C.J. Bell, Robert Dockins, Aquinas Hobor, Andrew W. Appel, David Walker 1.
Certified Typechecking in Foundational Certified Code Systems Susmit Sarkar Carnegie Mellon University.
Week 3. Assembly Language Programming  Difficult when starting assembly programming  Have to work at low level  Use processor instructions >Requires.
Machine/Assembler Language Putting It All Together Noah Mendelsohn Tufts University Web:
Foundational Certified Code in a Metalogical Framework Karl Crary and Susmit Sarkar Carnegie Mellon University.
March 4, 2005Susmit Sarkar 1 A Cost-Effective Foundational Certified Code System Susmit Sarkar Thesis Proposal.
© 2010 Kettering University, All rights reserved..
Nicholas Moore Bianca Curutan Pooya Samizadeh McMaster University March 30, 2012.
1BA3 G Lacey Lecture 51 Evaluating mathematical expressions  How do computers evaluate x + y or any mathematical expression ?  Answer : “Reverse Polish.
ISBN Chapter 3 Describing Syntax and Semantics.
The Design and Implementation of a Certifying Compiler [Necula, Lee] A Certifying Compiler for Java [Necula, Lee et al] David W. Hill CSCI
Snick  snack A Working Computer Slides based on work by Bob Woodham and others.
Typed Assembly Languages COS 441, Fall 2004 Frances Spalding Based on slides from Dave Walker and Greg Morrisett.
Conductor A Framework for Distributed, Type-checked Computing Matthew Kehrt.
The Analytical Engine Module 6 Program Translation.
1 ICS 51 Introductory Computer Organization Fall 2006 updated: Oct. 2, 2006.
CS 536 Spring Code generation I Lecture 20.
A Type System for Expressive Security Policies David Walker Cornell University.
Snick  snack A Working Computer Slides based on work by Bob Woodham and others.
Describing Syntax and Semantics
EET 2261 Unit 2 HCS12 Architecture
Extensible Untrusted Code Verification Robert Schneck with George Necula and Bor-Yuh Evan Chang May 14, 2003 OSQ Retreat.
System Calls 1.
Linked Lists in MIPS Let’s see how singly linked lists are implemented in MIPS on MP2, we have a special type of doubly linked list Each node consists.
Instruction Set Architecture
1 History of compiler development 1953 IBM develops the 701 EDPM (Electronic Data Processing Machine), the first general purpose computer, built as a “defense.
Proof Carrying Code Zhiwei Lin. Outline Proof-Carrying Code The Design and Implementation of a Certifying Compiler A Proof – Carrying Code Architecture.
Analysis of Algorithms
ITEC 352 Lecture 12 ISA(3). Review Buses Memory ALU Registers Process of compiling.
Trustless Grid Computing in Bor-Yuh Evan Chang, Karl Crary, Margaret DeLap, Robert Harper, Jason Liszka, Tom Murphy VII, Frank Pfenning
1 CS232: Computer Architecture II Fall 2011 Intel i7 Quad-core.
Formal Verification Lecture 9. Formal Verification Formal verification relies on Descriptions of the properties or requirements Descriptions of systems.
Objective At the conclusion of this chapter you will be able to:
Unit-1 Introduction Prepared by: Prof. Harish I Rathod
COP4020 Programming Languages Names, Scopes, and Bindings Prof. Xin Yuan.
Chapter 7 Low-Level Programming Languages. 2 Chapter Goals List the operations that a computer can perform Discuss the relationship between levels of.
Chapter 7 Low-Level Programming Languages. 2 Chapter Goals List the operations that a computer can perform Discuss the relationship between levels of.
Sahar Mosleh California State University San MarcosPage 1 Stack operations, Applications and defining procedures.
Ted Pedersen – CS 3011 – Chapter 10 1 A brief history of computer architectures CISC – complex instruction set computing –Intel x86, VAX –Evolved from.
Secure Compiler Seminar 4/11 Visions toward a Secure Compiler Toshihiro YOSHINO (D1, Yonezawa Lab.)
Computer Organization 1 Instruction Fetch and Execute.
Sahar Mosleh California State University San MarcosPage 1 Assembly language and Digital Circuit By Sahar Mosleh California State University San Marcos.
Distributed Computing Projects. Find cures for diseases like Alzheimer's and Parkinson's by analyzing the ways proteins develop (protein.
SAFE KERNEL EXTENSIONS WITHOUT RUN-TIME CHECKING George C. Necula Peter Lee Carnegie Mellon U.
Dynamic Taint Analysis for Automatic Detection, Analysis, and Signature Generation of Exploits on Commodity Software Paper by: James Newsome and Dawn Song.
Question What technology differentiates the different stages a computer had gone through from generation 1 to present?
Control units In the last lecture, we introduced the basic structure of a control unit, and translated our assembly instructions into a binary representation.
Binary Context-Sensitive Recognizer (BCSR) Hong Pham December 4, 2007.
CS 177 Recitation Week 1 – Intro to Java. Questions?
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
Chapter 7: Low-Level Programming Languages Chapter 7 Low-Level Programming Languages Page 66 In order to execute instructions on a CPU, those instructions.
Certifying and Synthesizing Membership Equational Proofs Patrick Lincoln (SRI) joint work with Steven Eker (SRI), Jose Meseguer (Urbana) and Grigore Rosu.
Assembly language.
TALx86: A Realistic Typed Assembly Language
EECE-276 Fall 2003 Microprocessors & Microcontrollers II
John D. McGregor Session 9 Testing Vocabulary
Computer Programming Machine and Assembly.
COMP 1321 Digital Infrastructure
COMP 1321 Digital Infrastructure
Computer Instructions
Branch instructions We’ll implement branch instructions for the eight different conditions shown here. Bits 11-9 of the opcode field will indicate the.
Introduction to Microprocessor Programming
Instruction encoding We’ve already seen some important aspects of processor design. A datapath contains an ALU, registers and memory. Programmers and compilers.
Control units In the last lecture, we introduced the basic structure of a control unit, and translated our assembly instructions into a binary representation.
Review: The whole processor
Hmmm Assembly Language
Computer Architecture and System Programming Laboratory
Presentation transcript:

8/14/03ALADDIN REU Symposium Implementing TALT William Lovas with Karl Crary

8/14/03ALADDIN REU Symposium Grid Computing Low-cost supercomputing using idle cycles of Internet-connected PCs Cray X1 supercomputer: $8.4 million Pentium 4, 2.2 GHz: $699 (with rebate!) Getting everyone else’s PCs to do your work for you: priceless

8/14/03ALADDIN REU Symposium Grid Computing Developer PCs on The Internet

8/14/03ALADDIN REU Symposium Grid Computing project at Berkeley  scanning radio signals for signs of intelligence project at Stanford  studying diseases related to protein folding distributed.net  cracking encryption algorithms since 1997

8/14/03ALADDIN REU Symposium Grid Computing Very powerful: distributed.net, 22 hours to brute force 1 DES key out of 2 56 (= over 72 quadrillion!) distributed.net equivalent to 160,000 Pentium II 266 MHz PCs

8/14/03ALADDIN REU Symposium Grid Computing Few examples, because grid computing depends on users’ trust in the code they run ConCert Project: to develop a framework for trustless grid computing

8/14/03ALADDIN REU Symposium Roadmap Motivation: check! Methodology of TALT: the “how” and “why” A taste of TALT: to whet your appetite My work on TALT: what I accomplished, what I learned

8/14/03ALADDIN REU Symposium Establishing Safety How can we verify that code is safe? High-level languages use type systems… Why can’t low-level languages, too?

8/14/03ALADDIN REU Symposium Typed Assembly Language Formalizes a subset of x86 instruction set Adds a type system that demonstrates safety Idea: employ powerful tools from type theory to tame the assembly language beast!  subtyping, polymorphism

8/14/03ALADDIN REU Symposium TALT -- TAL Two Refines and extends the ideas from TAL Establishes a framework for future type systems  One type system won’t meet everyone’s needs “Two type systems good => Four type systems better!” -- Benjamin C. Pierce

8/14/03ALADDIN REU Symposium How TALT works Trusted  Twelf proof checker … and meta- theorem prover  Safety policy ( SP ) safe machine states, safe transitions  Runtime Untrusted  Code  Type system ( TS )  Safety proof ( TS(p) => SP(p)) Machine-checkable, via Twelf

8/14/03ALADDIN REU Symposium How TALT works code type system safety proof safety policy Twelftype system code runtime

8/14/03ALADDIN REU Symposium A taste of TALT Many interesting ideas, let’s talk about 3:  Register file subtyping  Universal polymorphism  Sized kinds white lies ahead!

8/14/03ALADDIN REU Symposium A taste of TALT Register file subtyping

8/14/03ALADDIN REU Symposium A taste of TALT Register file type looks like  { r0: t0, r1: t1, … rn: tn } Suppose a code-block expects:  { eax: int, ebx: int } Okay if register file actually has type:  { eax: int, ebx: int, ecx: int } Because of register file subtyping!

8/14/03ALADDIN REU Symposium A taste of TALT Universal polymorphism

8/14/03ALADDIN REU Symposium A taste of TALT Suppose a function f leaves the stack unchanged  Stack pointer stored in register esp How does a calling function know? f has a type polymorphic in esp ! Just like SML: - fun id x = x; val id = fn : 'a -> 'a

8/14/03ALADDIN REU Symposium A taste of TALT Sized kinds

8/14/03ALADDIN REU Symposium A taste of TALT Kinds: the “types of types” In TALT, the kind of a type specifies the size of that type’s values  A 4-byte word has type B4, which has kind T4  Pair of words has type B4*B4, which has kind T8 Typing rules know the sizes of operands Essential for complex addressing modes

8/14/03ALADDIN REU Symposium My work on TALT Implementation of infrastructure  Runtime  Certificate generator  “Assembler” Creation of new code as well as simplification/extension of existing code

8/14/03ALADDIN REU Symposium Runtime implementation Runtime provides primitive operations, like malloc, exit, return Works directly with machine code, so written in C, with some x86 assembly Great care taken to adhere to specification: runtime is trusted!

8/14/03ALADDIN REU Symposium Certificate Generation TALT binary looks like this: code magic number machine code certificate

8/14/03ALADDIN REU Symposium Certificate Generation Certificate generator generates: code magic number machine code certificate

8/14/03ALADDIN REU Symposium Certificate Generation When I arrived…  Certificate was a typing derivation in the TALT type system  Partially implemented and buggy derivation generator  Discovery: typing derivation too big to use as a practical certificate

8/14/03ALADDIN REU Symposium Certificate Generation And now…  Certificate is an XTALT program, in a notation that Twelf understands  Certificate generator is 97% complete (and hopefully not buggy!)  Code is much simpler  Type system is a little simpler, too

8/14/03ALADDIN REU Symposium “Assembler” Next step: translate XTALT programs into straight x86 assembly Assembly can be run through a standard assembler to produce machine code

8/14/03ALADDIN REU Symposium “Assembler” Now we also have: code magic number machine code certificate

8/14/03ALADDIN REU Symposium “Assembler” Then, only have to put the pieces together to produce TALT binaries!

8/14/03ALADDIN REU Symposium Summary Implemented TALT runtime in C, assembly Implemented certificate generator in SML  Simplified typing rules  Simplified code Hope to implement “assembler” by next week Very close to a working system!

8/14/03ALADDIN REU Symposium Summary Didn’t “discover” anything new, but … Learned a lot about type theory, and … Hacked on some interesting code! Questions?