the amaze language - columbia universityaho/cs4115_spring-2012/lectures/12-05-09… · compiling...
TRANSCRIPT
![Page 1: The Amaze Language - Columbia Universityaho/cs4115_Spring-2012/lectures/12-05-09… · Compiling and Running Amaze /src folder contains the source files of the Amaze compiler run](https://reader033.vdocument.in/reader033/viewer/2022050506/5f97e4e18bb0f3702a421914/html5/thumbnails/1.jpg)
The Amaze Language
Project Manager Rouault FrancoeurLanguage Guru Daniel MercadoSystem Architect Jonathan BourdettSystem Integrator Orlando PinedaTester and Validator Jose Contreras
![Page 2: The Amaze Language - Columbia Universityaho/cs4115_Spring-2012/lectures/12-05-09… · Compiling and Running Amaze /src folder contains the source files of the Amaze compiler run](https://reader033.vdocument.in/reader033/viewer/2022050506/5f97e4e18bb0f3702a421914/html5/thumbnails/2.jpg)
Motivation● Interested in mazes and designing them.● Wanted a way to design mazes for GUIs
without the complexity of Java classes.● Wanted to design an easy to learn, but hard
to master language.
![Page 3: The Amaze Language - Columbia Universityaho/cs4115_Spring-2012/lectures/12-05-09… · Compiling and Running Amaze /src folder contains the source files of the Amaze compiler run](https://reader033.vdocument.in/reader033/viewer/2022050506/5f97e4e18bb0f3702a421914/html5/thumbnails/3.jpg)
What is Amaze?● Simple● Intuitive● Educational● Architecture Neutral● Detailed● Creative● Imperative and Domain Specific
Programming Language used for designing mazes
![Page 4: The Amaze Language - Columbia Universityaho/cs4115_Spring-2012/lectures/12-05-09… · Compiling and Running Amaze /src folder contains the source files of the Amaze compiler run](https://reader033.vdocument.in/reader033/viewer/2022050506/5f97e4e18bb0f3702a421914/html5/thumbnails/4.jpg)
Project Management● Each member assigned responsibilities
according to their role● Members allowed flexibility to get work done
efficiently● Set long term goals and short term goals
![Page 5: The Amaze Language - Columbia Universityaho/cs4115_Spring-2012/lectures/12-05-09… · Compiling and Running Amaze /src folder contains the source files of the Amaze compiler run](https://reader033.vdocument.in/reader033/viewer/2022050506/5f97e4e18bb0f3702a421914/html5/thumbnails/5.jpg)
Syntactic Constructs 1. Points2. Paths3. Structures4. Functions5. Boards6. Conditionals / Iteration7. Main Declaration
![Page 6: The Amaze Language - Columbia Universityaho/cs4115_Spring-2012/lectures/12-05-09… · Compiling and Running Amaze /src folder contains the source files of the Amaze compiler run](https://reader033.vdocument.in/reader033/viewer/2022050506/5f97e4e18bb0f3702a421914/html5/thumbnails/6.jpg)
1. Pointspoint x : 1,1;
● Stores a two-dimensional location on the
board. Location must be an integer
![Page 7: The Amaze Language - Columbia Universityaho/cs4115_Spring-2012/lectures/12-05-09… · Compiling and Running Amaze /src folder contains the source files of the Amaze compiler run](https://reader033.vdocument.in/reader033/viewer/2022050506/5f97e4e18bb0f3702a421914/html5/thumbnails/7.jpg)
2. Pathpath y : x, down, 1; ● Creates a line or "path" in the maze from a
start location in a specified direction for a specified length.
● Directions accepted are "up", "down", "left",
"right".
![Page 8: The Amaze Language - Columbia Universityaho/cs4115_Spring-2012/lectures/12-05-09… · Compiling and Running Amaze /src folder contains the source files of the Amaze compiler run](https://reader033.vdocument.in/reader033/viewer/2022050506/5f97e4e18bb0f3702a421914/html5/thumbnails/8.jpg)
3. Structuresstructure line1 {
point x : 1, 1;path y : x, right, 10;
}● Reusable blocks of code that can set paths
in multiple boards to avoid redundancy
![Page 9: The Amaze Language - Columbia Universityaho/cs4115_Spring-2012/lectures/12-05-09… · Compiling and Running Amaze /src folder contains the source files of the Amaze compiler run](https://reader033.vdocument.in/reader033/viewer/2022050506/5f97e4e18bb0f3702a421914/html5/thumbnails/9.jpg)
4. Functionsfunc int foo (int x) {
x = x + 7;return x; }
● Takes an integer, increments it by 7 and returns it to the function call.
print "Hello World";● Prints to the command line "Hello World";
![Page 10: The Amaze Language - Columbia Universityaho/cs4115_Spring-2012/lectures/12-05-09… · Compiling and Running Amaze /src folder contains the source files of the Amaze compiler run](https://reader033.vdocument.in/reader033/viewer/2022050506/5f97e4e18bb0f3702a421914/html5/thumbnails/10.jpg)
5. Boardboard stage1 {
point x: 1, foo(8);path y: x, right, 10;set(line1);
}● Create a frame where the maze is drawn.● Accepts points and path declaration.● Structures can be added using set().● Functions can also be called in a board
![Page 11: The Amaze Language - Columbia Universityaho/cs4115_Spring-2012/lectures/12-05-09… · Compiling and Running Amaze /src folder contains the source files of the Amaze compiler run](https://reader033.vdocument.in/reader033/viewer/2022050506/5f97e4e18bb0f3702a421914/html5/thumbnails/11.jpg)
6. Conditionals/ Iterationint x = 1;while( x < 3) {
if (x == 1) { print "One"'; }else {print "Not One"; }
}● if/else and while statements are made like in
C except brackets are mandatory.● else if statements do not exist in our
language.
![Page 12: The Amaze Language - Columbia Universityaho/cs4115_Spring-2012/lectures/12-05-09… · Compiling and Running Amaze /src folder contains the source files of the Amaze compiler run](https://reader033.vdocument.in/reader033/viewer/2022050506/5f97e4e18bb0f3702a421914/html5/thumbnails/12.jpg)
7. Main Declarationmain {
draw(stage1);}
● Although boards can be defined they must be drawn in the main function.
● Multiple boards can be drawn at the same time.
![Page 13: The Amaze Language - Columbia Universityaho/cs4115_Spring-2012/lectures/12-05-09… · Compiling and Running Amaze /src folder contains the source files of the Amaze compiler run](https://reader033.vdocument.in/reader033/viewer/2022050506/5f97e4e18bb0f3702a421914/html5/thumbnails/13.jpg)
Sample Programfunc int frank(int x){
x = x + 7;return x;
}structure megaman{ point e: 0,0; point f:50,0; path g: e,right,50; path h: f,down,50;
![Page 14: The Amaze Language - Columbia Universityaho/cs4115_Spring-2012/lectures/12-05-09… · Compiling and Running Amaze /src folder contains the source files of the Amaze compiler run](https://reader033.vdocument.in/reader033/viewer/2022050506/5f97e4e18bb0f3702a421914/html5/thumbnails/14.jpg)
Sample Program (Continued)
int bob = 0; int joe = frank(bob); if(true){ while(bob < joe) {
![Page 15: The Amaze Language - Columbia Universityaho/cs4115_Spring-2012/lectures/12-05-09… · Compiling and Running Amaze /src folder contains the source files of the Amaze compiler run](https://reader033.vdocument.in/reader033/viewer/2022050506/5f97e4e18bb0f3702a421914/html5/thumbnails/15.jpg)
Sample Program (Continued)
if(bob == 3){ print("Swagneto"); } else{ point fred: bob, 9; path batman: fred,down,13; } bob = bob + 1; } }}
![Page 16: The Amaze Language - Columbia Universityaho/cs4115_Spring-2012/lectures/12-05-09… · Compiling and Running Amaze /src folder contains the source files of the Amaze compiler run](https://reader033.vdocument.in/reader033/viewer/2022050506/5f97e4e18bb0f3702a421914/html5/thumbnails/16.jpg)
Sample Program (Continued)
board d { size: 100,100; start:0,0; end:50,50;
set(megaman); } main {
draw (d);}
![Page 17: The Amaze Language - Columbia Universityaho/cs4115_Spring-2012/lectures/12-05-09… · Compiling and Running Amaze /src folder contains the source files of the Amaze compiler run](https://reader033.vdocument.in/reader033/viewer/2022050506/5f97e4e18bb0f3702a421914/html5/thumbnails/17.jpg)
Compiling and Running Amaze
● /src folder contains the source files of the Amaze compiler
● run amazec.sh with an .amz file as an input● ./amazec.sh input_file.amz● a Java executable output to the src folder● execute with Java● java Out
![Page 18: The Amaze Language - Columbia Universityaho/cs4115_Spring-2012/lectures/12-05-09… · Compiling and Running Amaze /src folder contains the source files of the Amaze compiler run](https://reader033.vdocument.in/reader033/viewer/2022050506/5f97e4e18bb0f3702a421914/html5/thumbnails/18.jpg)
Sample Programs
Demo1Maze showing using a structure type
Demo 2
"Maze" showing a print statement, function, iteration, conditional statement, and structure type
![Page 19: The Amaze Language - Columbia Universityaho/cs4115_Spring-2012/lectures/12-05-09… · Compiling and Running Amaze /src folder contains the source files of the Amaze compiler run](https://reader033.vdocument.in/reader033/viewer/2022050506/5f97e4e18bb0f3702a421914/html5/thumbnails/19.jpg)
Translator Architecture
![Page 20: The Amaze Language - Columbia Universityaho/cs4115_Spring-2012/lectures/12-05-09… · Compiling and Running Amaze /src folder contains the source files of the Amaze compiler run](https://reader033.vdocument.in/reader033/viewer/2022050506/5f97e4e18bb0f3702a421914/html5/thumbnails/20.jpg)
Translator Architecture (More Specific)
![Page 21: The Amaze Language - Columbia Universityaho/cs4115_Spring-2012/lectures/12-05-09… · Compiling and Running Amaze /src folder contains the source files of the Amaze compiler run](https://reader033.vdocument.in/reader033/viewer/2022050506/5f97e4e18bb0f3702a421914/html5/thumbnails/21.jpg)
Software Development Environment
![Page 22: The Amaze Language - Columbia Universityaho/cs4115_Spring-2012/lectures/12-05-09… · Compiling and Running Amaze /src folder contains the source files of the Amaze compiler run](https://reader033.vdocument.in/reader033/viewer/2022050506/5f97e4e18bb0f3702a421914/html5/thumbnails/22.jpg)
Test Plan
board board1{
size: 19, 19;start: 1, 0;end: 18, 17;int x = 0;while(x){ x=10;}
}main{
draw(board1);}
“Invalid type in while loop. Expected a boolean but received a(n) int”
![Page 23: The Amaze Language - Columbia Universityaho/cs4115_Spring-2012/lectures/12-05-09… · Compiling and Running Amaze /src folder contains the source files of the Amaze compiler run](https://reader033.vdocument.in/reader033/viewer/2022050506/5f97e4e18bb0f3702a421914/html5/thumbnails/23.jpg)
Test Plan
board board1{
size : 11, 11;start : 0,0;end : 10, 10;point p : 0,0;path myPath : p, down,
10;point p2: 0,10;
path myPath2:p2,right,10;
} main{
draw(board1);}
“Invalid type in while loop. Expected a boolean but received a(n) int”
![Page 24: The Amaze Language - Columbia Universityaho/cs4115_Spring-2012/lectures/12-05-09… · Compiling and Running Amaze /src folder contains the source files of the Amaze compiler run](https://reader033.vdocument.in/reader033/viewer/2022050506/5f97e4e18bb0f3702a421914/html5/thumbnails/24.jpg)
Test Plan
![Page 25: The Amaze Language - Columbia Universityaho/cs4115_Spring-2012/lectures/12-05-09… · Compiling and Running Amaze /src folder contains the source files of the Amaze compiler run](https://reader033.vdocument.in/reader033/viewer/2022050506/5f97e4e18bb0f3702a421914/html5/thumbnails/25.jpg)
Lessons Learned ● Start Early● Set Milestones● Communicate
Effectively ● Figure Out How to
Work in Parallel
● Learn the capabilities of your team mates
● Communicate with other peers
● Don’t be afraid to use new tools or reject old tools!
![Page 26: The Amaze Language - Columbia Universityaho/cs4115_Spring-2012/lectures/12-05-09… · Compiling and Running Amaze /src folder contains the source files of the Amaze compiler run](https://reader033.vdocument.in/reader033/viewer/2022050506/5f97e4e18bb0f3702a421914/html5/thumbnails/26.jpg)
What Worked Well● Meeting Every Week● Team Synergy● Comfortable Atmosphere● Learning the Tools
○ ANTLR○ git
![Page 27: The Amaze Language - Columbia Universityaho/cs4115_Spring-2012/lectures/12-05-09… · Compiling and Running Amaze /src folder contains the source files of the Amaze compiler run](https://reader033.vdocument.in/reader033/viewer/2022050506/5f97e4e18bb0f3702a421914/html5/thumbnails/27.jpg)
Why use Amaze language?● Fun● Simple● Educational● Exercise your Creativity● Intuitive● Easy to Demonstrate
![Page 28: The Amaze Language - Columbia Universityaho/cs4115_Spring-2012/lectures/12-05-09… · Compiling and Running Amaze /src folder contains the source files of the Amaze compiler run](https://reader033.vdocument.in/reader033/viewer/2022050506/5f97e4e18bb0f3702a421914/html5/thumbnails/28.jpg)
Hopes for the future● Expand idea to a language made to design
interactive maze games● game design language
![Page 29: The Amaze Language - Columbia Universityaho/cs4115_Spring-2012/lectures/12-05-09… · Compiling and Running Amaze /src folder contains the source files of the Amaze compiler run](https://reader033.vdocument.in/reader033/viewer/2022050506/5f97e4e18bb0f3702a421914/html5/thumbnails/29.jpg)
THE END
Questions?