CS 330 Lecture 17 – C
Agenda what ?s buffer overflows gripes with assembly history of compilers and C atoi itoa TODO Read The Descent to C. Write down 2-3 questions or observations on a 1/4 sheet. Note Today we exploit a buffer overflow in an assembly program to redirect the CPU to a function that we aren’t authorized to run! […]
CS 330 Lecture 16 – Functions in Assembly and Buffer Overflows
Agenda what ?s local variables frame pointer functions buffer overflows TODO I’m in Memphis for a computer science education conference the rest of the week. No class on Wednesday or Friday. Please use your time to work on CSX! Note We close out our discussion of assembly today by looking at how functions in our […]
CS 330 Lecture 15 – Assembly Analogs
Agenda what ?s program this how does assembly handle… call-by-value semantics? types? composite types/structs? loops? local variables? return values? if statements? Note Today we continue our foray into assemble, examining how the notions we take for granted in high-level languages are implemented at the assembly level. But first, let’s start with a little warmup Program […]
CS 330 Lecture 14 – Assembly
Agenda what ?s Human Resource Machine hello, x86 adding two globals printing getting user input counting TODO Read Programming from the Ground Up, from chapter 1 through section Planning the Program of chapter 3. Click on Download Area to find the PDF. Write down 2-3 questions or observations on a 1/4 sheet. Note Now that we’ve […]
CS 330 Lecture 13 – Functions
Agenda what ?s adding functions to Logo scope choices closures in other languages TODO For an extra credit quarter sheet, write a Logo program. Clone the repository of our code in Eclipse, run Interpreter, and feed it a file containing a Logo program. Share your program on Piazza. Note Today we will round out our […]
CS 330 Lecture 12 – ASTs and Variables
Agenda what ?s AST generation expressions statements move and turn variables TODO Start the CSX homework. Due before March 11. Pull from both twodee and origin to get updates. Note Today we’ll got Logo programs up and running. We’ll generate a full AST representation of program and execute it instead of eagerly evaluating a construct as […]
CS 330 Lecture 11 – Abstract Syntax Trees
Agenda what ?s math problem a Logo grammar translating to an AST TODO Watch Aiken’s lectures 24 and 25 on abstract syntax trees and recursive descent parsing. On a 1/4 sheet, summarize your results from searching for reasons why many languages use semi-colons as statement terminators and parentheses around actual parameter lists. Note We’re about to write […]
CS 330 Homework – CSX – due before March 11
See the PDF.
CS 330 Lecture 10 – Interpreting a Parse Tree
Agenda what ?s retcon: matching numeric ranges with regex evaluate this tree walking eager vs. lazy toward Logo Note We left off last time being able to lex and parse boolean expressions. Today we evaluate them by walking the parse tree. First off, let’s try doing this manually. Evaluate this tree: We’ll automate this evaluation […]
CS 330 Lecture 9 – Grammars
Agenda the source-to-execution pipeline a boolean grammar terminals (the atoms) nonterminals (the molecules) productions an interpreter TODO Setup ANTLR4 per Getting Started with ANTLR4. Define the aliases in you shell’s startup files (.zshrc or .bashrc, probably) so they stick around between sessions. Create a lexer and parser for the boolean grammar provided below. On a 1/4 sheet, draw the […]