Boardr The Racing Board Game Creation Language. Project Manager: Eric Leung Language and Tools Guru: Shensi Ding System Architect: Seong Jin Park System.

Slides:



Advertisements
Similar presentations
Designing a Program & the Java Programming Language
Advertisements

Vilmos Zsombori , Shanghai
CardGhost ——Language design for card game Team member: Yang Jian, yj2220 Xiaoming Guo, gx2158 Yu An, ya2249 Dingding Xi, dx2131 Feng Zhou, fz2168.
Translator Architecture Code Generator ParserTokenizer string of characters (source code) string of tokens abstract program string of integers (object.
Compilers and Language Translation
CSC 313 – Advanced Programming Topics. Today’s Goal  Make you forget reading that was assigned  I went back & reviewed others; none like this one 
Your First Java Program: HelloWorld.java
SableCC SableCC is developed by professors and graduate students at McGill University and is open source (licensed under the Apache License, Version 2.0)‏
BROOM: A Matrix Language Chris Tobin Michael Weiss Gabe Glaser Brian Pellegrini.
WPSM Programming Language A simple language that transform simple data structure into complex xML format Wai Y. Wong Peter Chen Seema Gupta Miqdad Mohammed.
Chapter 3 Program translation1 Chapt. 3 Language Translation Syntax and Semantics Translation phases Formal translation models.
The Attribute Gatherers Team Team Leader: Suvendu Kumar Dash Developers: Adrijan Radikovic Shari Naik Wang Xue Tester: Hogil Kim.
CS 153: Concepts of Compiler Design August 25 Class Meeting Department of Computer Science San Jose State University Fall 2014 Instructor: Ron Mak
ANTLR with ASTs. Abstract Syntax Trees ANTLR can be instructed to produce ASTs for the output of the parser ANTLR uses a prefix notation for representing.
ANTLR.
ANTLR Andrew Pangborn & Zach Busser. ANTLR in a Nutshell ANother Tool for Language Recognition generates lexers generates parsers (and parse trees)‏ Java-based,
Grammars and Parsing. Sentence  Noun Verb Noun Noun  boys Noun  girls Noun  dogs Verb  like Verb  see Grammars Grammar: set of rules for generating.
© Janice Regan, CMPT 128, Jan CMPT 128 Introduction to Computing Science for Engineering Students Creating a program.
THE HOG LANGUAGE A scripting MapReduce language. Jason Halpern Testing/Validation Samuel Messing Project Manager Benjamin Rapaport System Architect Kurry.
Planning for the Solution
Getting Started with ANTLR Chapter 1. Domain Specific Languages DSLs are high-level languages designed for specific tasks DSLs include data formats, configuration.
COP4020 Programming Languages
Chapter 1 Introduction Dr. Frank Lee. 1.1 Why Study Compiler? To write more efficient code in a high-level language To provide solid foundation in parsing.
Parser-Driven Games Tool programming © Allan C. Milne Abertay University v
Chapter 10: Compilers and Language Translation Invitation to Computer Science, Java Version, Third Edition.
1 Programming Languages Tevfik Koşar Lecture - II January 19 th, 2006.
Java Programming Introduction & Concepts. Introduction to Java Developed at Sun Microsystems by James Gosling in 1991 Object Oriented Free Compiled and.
{ Graphite Grigory Arashkovich, Anuj Khanna, Anirban Gangopadhyay, Michael D’Egidio, Laura Willson.
CoZy: A very cool language for temperature control Project Manager: Hannah Keiler Language and Tools Guru: Nate Booth System Architect: Giovanni Ortuno.
Python – Part 1 Python Programming Language 1. What is Python? High-level language Interpreted – easy to test and use interactively Object-oriented Open-source.
CST320 - Lec 11 Why study compilers? n n Ties lots of things you know together: –Theory (finite automata, grammars) –Data structures –Modularization –Utilization.
Java Programming, Second Edition Chapter One Creating Your First Java Program.
Turnt. A TURN BASED GAME CREATION LANGUAGE.. turnt Language JEFFREY TAO.
Chapter 6 Programming Languages (2) Introduction to CS 1 st Semester, 2015 Sanghyun Park.
LANGUAGE AND TOOLS GURU S UHAN CANARAN PROJECT MANAGER A NDREAS NILSSON SYSTEM ARCHITECT A KSHAT SIKARWAR SYSTEM INTEGRATOR E RIC SCHMIDT TESTER AND VALIDATOR.
BUILD ON THE POLYGLOT COMPILER FRAMEWORK MIHAL BRUMBULLI 7th Workshop “SEERE” Montenegro-Risan 9-14 September 2007 SimJ Programming Language.
CS453 LectureIntroduction1 CS453 Compiler Construction Instructor:Wim Bohm Computer Science Building 470 TA: tba
CS 153: Concepts of Compiler Design August 26 Class Meeting Department of Computer Science San Jose State University Fall 2015 Instructor: Ron Mak
Group 4 Java Compiler Group Members: Atul Singh(Y6127) Manish Agrawal(Y6241) Mayank Sachan(Y6253) Sudeept Sinha(Y6483)
Introduction to Parsing
Towards the better software metrics tool motivation and the first experiences Gordana Rakić Zoran Budimac.
CPS 506 Comparative Programming Languages Syntax Specification.
1. 2 Preface In the time since the 1986 edition of this book, the world of compiler design has changed significantly 3.
1 Compiler Design (40-414)  Main Text Book: Compilers: Principles, Techniques & Tools, 2 nd ed., Aho, Lam, Sethi, and Ullman, 2007  Evaluation:  Midterm.
Celluloid An interactive media sequencing language.
The Functions and Purposes of Translators Syntax (& Semantic) Analysis.
. n COMPILERS n n AND n n INTERPRETERS. -Compilers nA compiler is a program thatt reads a program written in one language - the source language- and translates.
Context-free grammars. Roadmap Last time – Regex == DFA – JLex for generating Lexers This time – CFGs, the underlying abstraction for Parsers.
CS101: Introduction to Computer Science Slides adapted from Sedgewick and Wayne Copyright © Your First Java.
Dharmen Mehta (Project Manager) Nimai Buch (Language Guru) Yash Parikh (System Architect) Amol Joshi (System Integrator) Chaitanya Korgaonkar (Verifier.
1 Compiler & its Phases Krishan Kumar Asstt. Prof. (CSE) BPRCE, Gohana.
David LOU – Project Manager Markus SCHANTA – Language Guru Long CHEN – System Architect Xiaolong JIANG – System Integrator Jingbo YANG – Tester & Validator.
1 Steps to use Flex Ravi Chotrani New York University Reviewed By Prof. Mohamed Zahran.
Spring 2009 Programming Fundamentals I Java Programming XuanTung Hoang Lecture No. 8.
CS223: Software Engineering
LECTURE 3 Compiler Phases. COMPILER PHASES Compilation of a program proceeds through a fixed series of phases.  Each phase uses an (intermediate) form.
MiniJava Compiler A multi-back-end JIT compiler of Java.
CS 404Ahmed Ezzat 1 CS 404 Introduction to Compiler Design Lecture 1 Ahmed Ezzat.
Software Engineering Algorithms, Compilers, & Lifecycle.
CS 404Ahmed Ezzat 1 CS 404 Introduction to Compiler Design Lecture Ahmed Ezzat.
Computer Programming Your First Java Program: HelloWorld.java.
PRINCIPLES OF COMPILER DESIGN
Introduction to Compiler Construction
Grammar-based Specification and Parsing for Binary File Formats
CS 3304 Comparative Languages
PROGRAMMING LANGUAGES
-by Nisarg Vasavada (Compiled*)
CMPE 152: Compiler Design August 23 Class Meeting
CMPE 152: Compiler Design January 29 Class Meeting
Chapter 10: Compilers and Language Translation
Presentation transcript:

Boardr The Racing Board Game Creation Language

Project Manager: Eric Leung Language and Tools Guru: Shensi Ding System Architect: Seong Jin Park System Integrator: Jessica Wang Tester and Validator: Nicholas Chao The Team

Boardr: Origins ● Programming Languages and Translators course ● wanted a concept that we were all interested in ● games → board games → racing board games

Motivation 1. Winning condition provided. 2. Available for beginning programmers.

Development/Runtime Environment ● Java JDK 7 ● ANTLR v4 - ANTLRworks ● git - Github ● Makefile o make game g={pathToGame}

Language Highlights: ● Rules ● Board, Players, Die ● Library functions ● Command line game output

Hello World Player Hello; //creates a Player named Hello Player World; //creates a Player named World Board HelloWorld = 1; //creates a board with one block Die = 1; //creates a die with one side with maximum (and minimum) value of 1 Number[] i = [ 1 ]; //array of Numbers that contains the positions Rule hello (i) { //creates a new rule, with i as a placeholder String hello = “Hello World”; println(hello); //prints “Hello World!” to the console };

Here’s the parse tree!

next Token Translator Architecture Lexer Parser CustomListener Symbol Table.boardr file BoardrTranslator token stream AST Java Code Playable Game

Semantic Analysis Basic types: Board, Die, Player, Number, String, boolean Type checking! ● Symbol Table ● Type Mismatch ● Undeclared Variable ● Operation Mismatch

Testing Plan ● Step 1: Run file through antlr to verify correct parse tree. If incorrect, modify grammar and repeat. ● Step 2: Translate file, using strings to verify correct symbol tables and type checking. We printed out the expected results and compared to the output. If incorrect, modify symbol table or type checking method. ● Step 3: Check output versus parallel java program. If incorrect, analyze and modify Translator or boardr file.

Example Test Program Input 1.Player One; 2.Board board = 5; 3.Die = 1; 4.Rule types([1]){ 5.String s = "string"; 6. boolean[] b = [true]; 7.String[] sa = ["hello", 1]; 8. }; Output javac BoardrTranslator.java java BoardrTranslator../testing/typeCheckTest.boardr text is Strings="string"; should be string: "string"; should be boolean: true should be string: "hello" should be string: 1 TypeMismatchError: Type error! Cannot convert Number into String

DEMO FunTown and Ladders

Timeline of Events Language Reference Manual (3/26) Board idea (early February) Team Formation Grammar implemented (4/20) Basic Hello World (4/25) Code generation complete (5/10) Final Report & Presentation Begin code generation (4/21 onwards)

Github Commits Note: All of the earliest commits working on grammar (from late March/early April) were lost because of Github failures.

Lessons Learned 1. Listen and be considerate of each others’ opinions. 2. Be flexible with each others’ schedules. 3. Review project continuously. 4. Figure out implementation details carefully.

What Worked Well 1. Start early on the final report. 2. Set up a group calendar. 3. Dedicate days to working on the project.

Advice 1. Remind each other of due dates. 2. Know the tools that you are using (well).

Why use Boardr? ● intuitive ● interactive ● for basic programmers

Thank you!