greetings from team cal! andrei tapai (language guru) fei-tzin lee (system integrator) ramses...
TRANSCRIPT
Greetings From Team CAL!
Andrei Tapai (Language Guru)Fei-Tzin Lee (System Integrator)
Ramses Driskell (System Architect)Geoffrey Loss (Tester and Validator)
Percee Goings (Project Manager)
Who is Cal
Mr. JavaMrs. Flexyacc
Can I play with Cal
Why is Cal bothering me
Management ?
Source
Motivations and Inception of CAL
*This pattern is “Rule 90”
1 part high-school computer science nostalgia
1 part fascination with Cellular automatons
= Cal
+
Motivations and Inception of CAL
*This pattern is “Rule 90”
1 part high-school computer science nostalgia
1 part fascination with Cellular automatons
= Cal
+
The Properties of CAL Programs
*This pattern is “Rule 3283936144”
- We wanted only the essentials- 1. A specification for the grid- 2. A specification of what properties
cells have and how they are initialized
- 3. A main function that is applied to all cells to take them from state T to state T+1
- 4. All helper functions associated with the main function
Syntactic Constructs of CAL
1. Definition of grid size2. Definition of cells
3. functions!
(type name (parameters)|Statements|
4. But wait, what is this!
5. …at last: The cal_it() function!i. Think of it as main!ii. Execution begins hereiii. Provides the specification for a “tick” of an automaton.
Note: We’re still not sure if its pronounced “call it”or “cal it” (as in cal-culator). Maybe we’ll never know.
Meanwhile in other languages:
ClassesConstructorsIncomprehensible GUI codeX and Y coordinatesX = Y + (1/2 + windowWidth) +… border + padding…. What.Annoying string constructsGet() and set()SEMICOLONSAnd especially…Failing to work becauseYou put a semicolon After an if statement.
Translator Architecture
CAL
Source Code
Translator Architecture
CAL
Source Code
Lexical Analysis
Token Stream
Translator Architecture
CAL
Source Code
Lexical Analysis
Token Stream
Syntactical Analysis/SDD
AST
Translator Architecture
CAL
Source Code
Lexical Analysis
Token Stream
Syntactical Analysis/SDD
AST
AST Traversal/Code Generation
Target Java Code
Translator Architecture
CAL
Source Code
Lexical Analysis
Token Stream
Syntactical Analysis/SDD
AST
AST Traversal/Code Generation
Target Java Code
Overview
Seeds.cal SeedsCAL.java
cal.ycal.flex
jflex byacc
OverviewSeedsCAL.java
Driver
GUI
CAL_GUI
Runtime
Driver“SeedsCAL.java”
SeedsCAL class
GUI
Java reflection
CAL_GUI
inner Cell class
Development
TESTINGBy
Geoffrey Loss
STILL LIFES
OSCILLATORS
Now for a quick Demo…
Lessons Learned!
• Starting early!• Compilers can be/are extremely rewarding
ventures• Get a barebones up and running ASAP• Don’t break your compiler by trying to
implement too many things at once• Integrating a GUI can be very difficult• Decide on the specifics early on!
Thanks Folks!