Lecture 20
Hiding Exploit in Compilers
bootstrapping, self-generating code,
tombstone diagrams
Ras Bodik
Make Your Own Language!
CS164: Introduction to Programming
Languages and Compilers, Fall 2014
UC Berkeley
1
Outline
Ken Thompsons Reflections on trust
CS164 Programming Language and Compilers
Spring 2014
Written Assignment 4
Assigned: February 26
Due: March 5 at 10:30am
Instructions: This assignment asks you to prepare written answers to questions on LR parsers. Each of
the questions has a short answer.
Homework #1
Point Value: 10 points
CS 184/284a: Foundations of Computer Graphics
Spring 2013
Prof. James OBrien
page !1 of !4
Due Date: Jan. 30th, 5:00 pm
UNIVERSITY OF CALIFORNIA
College of Engineering,UNIVERSITYprerequisite math background. In general,
1
CS-184: Computer Graphics
Lecture #13: Natural Splines, B-Splines, and
NURBS
!
!
Prof. James OBrien
University of California, Berkeley
!
!
V2014-S-13-1.0
2
Natural Splines
Draw
a smooth line through several points
A real draftsmans
spline.
!
Imag
1
CS-184: Computer Graphics
Lecture #2: Color
!
!
!
Prof. James OBrien
University of California, Berkeley
!
!
V2014-S-02-1.0
Slides revised using additional materials from Maneesh Agrawala
2
Announcements
!
Sign
up for Piazza
!
Assignment
0: due Fr
CS-184: Computer Graphics
Lecture #11: Texture and Other Maps
!
!
Prof. James OBrien
University of California, Berkeley
!
!
V2014-S-11-1.0
Today
Texture
Mapping
2D
3D
Procedural
Bump
and Displacement Maps
Maps
Shadow Maps
Environment
2
11-Te
CS-184: Computer Graphics
Lecture #14: Subdivision
!
!
Prof. James OBrien
University of California, Berkeley
!
!
V2013-F-14-1.0
Subdivision
Start
Key
with:
Given control points for a curve or surface, nd new control points for
a sub-section of curv
CS-184: Computer Graphics
Lecture 22: Radiometry
!
James OBrien
University of California, Berkeley
!
!
V2014-S-15-1.0
Today
Radiometry: measuring light
Local Illumination and Raytracing were discussed in an ad hoc fashion
Proper discussion requires
CS-184: Computer Graphics
Lecture #12: Curves and Surfaces
!
!
Prof. James OBrien
University of California, Berkeley
!
!
V2014-F-12-1.0
Today
General
Splines
curve and surface representations
and other polynomial bases
2
12-Surfaces.key - March 16,
CS-184: Computer Graphics
Lecture #8: Projection
!
!
!
Prof. James OBrien
University of California, Berkeley
!
!
V2014-S-08-1.0
Today
Windowing
and Viewing Transformations
Windows and viewports
Orthographic projection
Perspective projection
2
08-
CS-184: Computer Graphics
Lecture #20: Spring and Mass systems
!
!
Prof. James OBrien
University of California, Berkeley
!
!
V2014-S-20-1.0
Today
Spring
and Mass systems
Distance springs
Spring dampers
Edge springs
2
20-SpringMassSystems.key - Ap
1
CS-184: Computer Graphics
Lecture #17: Introduction to Animation
!
!
Prof. James OBrien
University of California, Berkeley
!
!
V2014-S-17-1.0
2
Introduction to Animation
Generate
perception of motion with sequence of image
shown in rapid succession
1
CS-184: Computer Graphics
Lecture #19: Motion Capture
!
!
Prof. James OBrien
University of California, Berkeley
!
!
V2014-F-19-1.0
2
Today
Motion
Capture
2
19-MoCap.key - April 21, 2014
3
Motion Capture
Record
Use
motion from physical objects
mot
CS-184/284a: Computer Graphics
Lecture #1: Introduction and Overview
!
!
Prof. James OBrien
University of California, Berkeley
!
!
V2014-S-01-1.0
Today
Introduction
and Course Overview
Assignments AS0
and HW1
2
01-Introduction.key - January 21, 201
1
CS-184: Computer Graphics
Lecture #21: Integration Basics
!
!
Prof. James OBrien
University of California, Berkeley
!
!
V2014-S-21-1.0
2
Today
Introduction
to Simulation
Basic particle systems
Time integration (simple version)
2
21-Simulation.key
CS-184: Computer Graphics
Lecture #9: Scan Conversion
!
Prof. James OBrien
University of California, Berkeley
!
!
V2014-S-09-1.0
With additional slides based on those of Maneesh Agrawala
Today
2D
Scan Conversion
Drawing Lines
Drawing Curves
Fill
CS-184: Computer Graphics
Lecture #6: Raytracing
!
!
!
Prof. James OBrien
University of California, Berkeley
!
!
V2014-S-06-1.0
Today
Raytracing
Shadows and direct lighting
Reection and refraction
Antialiasing, motion blur, soft shadows, and dept
CS164 Programming Language and Compilers
Spring 2014
Programming Assignment V
Assigned: April 9
1
Due: May 9, at 11:59 PM (Checkpoint due April 23, at 11:59 PM)
Introduction
In this assignment, you will implement a code generator for Cool. When successful
CS164 Programming Language and Compilers
Spring 2014
Written Assignment 2
Assigned: February 10
Due: February 19 at 10:30am
Instructions: This assignment asks you to prepare written answers to questions on context-free grammars.
Each of the questions has
CS164 Programming Language and Compilers
Spring 2014
Solutions to Written Assignment 2
Assigned:
Due:
1. Let L be the language consisting of all palindromes over the alphabet = cfw_a, b. That is, L consists of all
sequences of as and bs that read the same
CS164 Programming Language and Compilers
Spring 2014
Solutions to Written Assignment 3
Assigned:
Due:
1. Use left-factoring and/or elimination of left recursion to convert the following grammars into LL(1) grammars. You may assume that these grammars are
CS164 Programming Language and Compilers
Spring 2014
Solutions to Written Assignment 1
Assigned:
Due:
1.
2. The language recognized by the DFA is the set of all strings in which the number of as is 2 mod 3. A
regular expression that represents such a lang
CS164 Programming Language and Compilers
Spring 2014
Written Assignment 3
Assigned: February 19
Due: February 26 at 10:30am
Instructions: This assignment asks you to prepare written answers to questions on LL and LR parsers.
Each of the questions has a sh
CS164 Programming Language and Compilers
Spring 2014
Written Assignment 1
Assigned: February 3
Due: February 10 at 10:30am
Instructions: This assignment asks you to prepare written answers to questions on regular languages and
nite automata. Each of the q
Assignment #0
Point Value: 30 points
Due Date: Jam. 31th, 11:59pm
CS 184/284a: Foundations of Computer Graphics
Spring 2014
Prof. James OBrien
page !1 of !2
This assignment serves two purposes. First it gets your account set up, second it forces you to fi
Assignment #01
Point Value: 60 points
Due Date: Fri., Feb. 14, 11:59pm
CS 184/284a: Foundations of Computer Graphics
Fall 2013
Prof. James OBrien
page !1 of !4
This assignment gets you started doing basic shading calculations. The shading model that you w
Assignment #2
Point Value: 120 points
Due Date: March 14, 11:59pm
CS 184/284a: Foundations of Computer Graphics
Spring 2014
Prof. James OBrien
page !1 of !4
For this assignment you will write a ray tracer and use it to generate beautiful pictures that wil