September 11, 2014
"Pink Floyd" is the band he associates with laziness.
Until 1950's: Switches for 1's and 0's, coding in machine language
Assembly: Mnemonic representation of the machine code
1954-57: Fortran was a comipled language and is a athematica

September 23, 2014
Ambiguous languages:
Languages that are ambiguous mean that you can analyze it to find meaning in two ways that are both correct, so you dont know which one the author meant.
It is left most or right most derivation if it derives th

September 2, 2014
Orthoganality pop quiz:
APL is a mathematics language that has a low degree of readability even though it is very "writable"
A small number of symbols that mean large amounts of complex things.
Reliablity - Mean time between failures

September 30, 2014
Top - Down parsers
LL ( Left to right, left most derivation)
E -> E + T
-> T
T -> T + F
-> F
F -> id
the first line of the top down parsing is
E => E + T
so long as "id + id"
is maintained within the final sentential form we're looki

September 18, 2014
BNF - Backus Naur Form
In context free terminals you never see nonterminals on the right hand side.
In the realm of Context Free Languages, every non-terminal is an abstraction.
All intermediate derivations are considered to be in

September 9, 2014
Reading Assignment: 2.0-2.2.0
Next readings will be 2.2.2-2.2.4 and 2.3-2.3.1
Scanning:
Breaks program into tokens
Breaks the language down into the basic syntactic units
This can be fine tuned specifically for languages.
Saves a lo

October 7, 2014
Read 4.0-4. (inclusive)
HW 3.5, 3.6, 3.11, 3.14, 3.19
Midterm Oct 14
Type Compatibility
THere are two ways that types are checked for equivalence
Name Equivalence:
Two variables have compatible types if:
They are in the same declarat

November 4, 2014
Functional Language programming:
Composition means apply one function first then the other.
Construction takes multiple functions and applies them to one value and returns their result.
Apply - to - all takes one function and applie

December 9, 2014
Recursive calls are bad because they force you to allocate space for local variables every time you make a recursive call to the function.
on the stack-dynamic setup, the variables/arrays have their sizes determined at unit-invocation ti

October 15, 2014
Overloading: Ad-Hoc Polymorphism
A name can refer to more than one object at a given point
Some overloading happens in almost all languages
When the compiler sees different but compatible types being operated on it uses something calle

November 13, 2014
Chapter 11:
Logic Programming:
You focus on using statements or queries about the state of a universe
You can provide rules: Nick is male.
Or ask questions about rules: Is Ryan male?
if you ask man(x) you're asking it to provide y

October 9, 2014
Test Review Monday around 8pm
Static scope binding
Uses the form of the procedure structure
So if
Acfw_
Bcfw_
Ccfw_
Dcfw_
then B looks in A
D looks in C looks in A
Dynamic scope binding
Uses the stack of activation records t

December 2, 2014
inmode: Data flows into the called routine
outmode: Data flows out of the called routine
inoutmode: Data flows both ways
In pass by name the values are bound at reference time not call time
In a global variable situation
Still binds at r

October 2, 2014
Characteristics of a language that stop it from being top down parsable
1. Left recursive
2. Common prefixes (Pairwise Disjointness)
Chapter 3: Names, Scopes, and Binding
Scope is visibility
lifetime is when and for how long you're bound t

September 25, 2014
HOMEWORK DUE NEXT CLASS: In 2.10, 2.12ab, 2.13 ab, 2.14 write a context free grammar of the language
Midterm exam is October 14.
Covers everything up to it.
Probably go through chapter 3, maybe slightly further.
Remember that the par

October 23, 2014
=
Lecture:
=
Decoration of a parse tree:
to figure out the decoration you have to do a reverse right most recursion of the parse to find the final values.
Evaluating Attributes
In a very simple attribute grammar:
each symbol has at

November 18, 2014
Facts: unconditional assertions of truth
Rules: Assertions from which conclusions can be drawn if certain conditions are true.
Instantiation is binding a value to a variable
Unification is the process of finding a variable for which a m

October 21, 2014
Semantics
Static Semantics
Attribute grammars
Language specific, program independent
Dynamic Semantics
Operational Semantics
Denotational semantics
depend on the program
After parsing, the next two compilation phases are
Semantic a

Department of Computer Science
CS 3304
Comparative Languages
Lecture 12: Subroutines
21 July 2016
2016 Denis Gracanin
Department of Computer Science
Introduction
Abstraction: a process by which the programmer can
associate a name with a potentially comp

Department of Computer Science
CS 3304
Comparative Languages
Lecture 4: ANTLR Syntax
8 July 2016
2016 Denis Gracanin
Department of Computer Science
Introduction
Discuss how to use ANTLR.
Some material is taken from:
A book by Terence Parr, The Definiti