B atch I mage P rocessing L anguage Programming Language and Translator Final Project (Team 15)

Slides:



Advertisements
Similar presentations
Vilmos Zsombori , Shanghai
Advertisements

Symbol Table.
CardGhost ——Language design for card game Team member: Yang Jian, yj2220 Xiaoming Guo, gx2158 Yu An, ya2249 Dingding Xi, dx2131 Feng Zhou, fz2168.
Chapter 7 User-Defined Methods. Chapter Objectives  Understand how methods are used in Java programming  Learn about standard (predefined) methods and.
Methods. int month; int year class Month Defining Classes A class contains data declarations (static and instance variables) and method declarations (behaviors)
WPSM Programming Language A simple language that transform simple data structure into complex xML format Wai Y. Wong Peter Chen Seema Gupta Miqdad Mohammed.
Telescoping Languages: A Compiler Strategy for Implementation of High-Level Domain-Specific Programming Systems Ken Kennedy Rice University.
Honors Compilers The Course Project Feb 28th 2002.
B iological S cripting L anguage Jared Eng Jay Kota Igor Marfin Amna Qaiser Jared Eng Jay Kota Igor Marfin Amna Qaiser BSL.
Crash Language1 Crash. A Graphical Animation Tool By: Mikhail Litvin Vadim Belobrovka Michael Anikin Daniel Burdeinick.
ESL - A language for Social Networks Team : Fantastic Four Ashwath Narsimhan – Project Manager Jyotsna Sebe – System Architect Shailesh Saroha – System.
1 Problem 2 A Scanner / Parser for Simple C. 2 Outline l Language syntax for SC l Requirements for the scanner l Requirement for the parser l companion.
GodMode Team OneUp 1. Joe Ennever - Systems Integrator Zack Sheppard - Language Guru Nic Borensztein - Project Manager Danny Hertz - Systems Architect.
C++ Functions CS242 COMPUTER PROGRAMMING T.Banan Al-Hadlaq.
PROJECT MANAGER: YOUNGHOON JEON SYSTEM ARCHITECT: YOUNGHOON JUNG LANGUAGE GURU: JINHYUNG PARK SYSTEM INTEGRATOR: WONJOON SONG VALIDATION AND TESTING: AKSHAI.
Owl Andrew Olowude Ben Klingher Belai Lencho Kenneth Cheng Martin Li A language for finite automata Team 20 _________ /_ ___ \ \ \ \__/\___/ / \_\/______/
THE HOG LANGUAGE A scripting MapReduce language. Jason Halpern Testing/Validation Samuel Messing Project Manager Benjamin Rapaport System Architect Kurry.
Parser-Driven Games Tool programming © Allan C. Milne Abertay University v
Boardr The Racing Board Game Creation Language. Project Manager: Eric Leung Language and Tools Guru: Shensi Ding System Architect: Seong Jin Park System.
Abc Compiler Zak Fry. Who and Where Programming Tools Group at Oxford University, UK – Oege de Moor Sable Research Group at McGill University, Quebec.
Lexical Analysis - An Introduction. The Front End The purpose of the front end is to deal with the input language Perform a membership test: code  source.
Practice 1 Seoul National University Graphics & Media Lab.
1 Scope Scope describes the region where an identifier is known, and semantic rules for this.
CIS-165 C++ Programming I CIS-165 C++ Programming I Bergen Community College Prof. Faisal Aljamal.
introducing the Java Data Processing Framework Paolo Ciccarese, PhD On behalf of the JDPF Team Pavia, December 11, 2007.
Flex: A fast Lexical Analyzer Generator CSE470: Spring 2000 Updated by Prasad.
Compiler Construction Dr. Noam Rinetzky and Orr Tamir School of Computer Science Tel Aviv University
 Overview of technical progress  Grammar-based implementation.
1 Compiler Design (40-414)  Main Text Book: Compilers: Principles, Techniques & Tools, 2 nd ed., Aho, Lam, Sethi, and Ullman, 2007  Evaluation:  Midterm.
Cross Language Clone Analysis Team 2 October 13, 2010.
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.
YACC. Introduction What is YACC ? a tool for automatically generating a parser given a grammar written in a yacc specification (.y file) YACC (Yet Another.
Dharmen Mehta (Project Manager) Nimai Buch (Language Guru) Yash Parikh (System Architect) Amol Joshi (System Integrator) Chaitanya Korgaonkar (Verifier.
The Model of Compilation Natawut Nupairoj, Ph.D. Department of Computer Engineering Chulalongkorn University.
What am I? while b != 0 if a > b a := a − b else b := b − a return a AST == Abstract Syntax Tree.
David LOU – Project Manager Markus SCHANTA – Language Guru Long CHEN – System Architect Xiaolong JIANG – System Integrator Jingbo YANG – Tester & Validator.
By Mr. Muhammad Pervez Akhtar
Cross Language Clone Analysis Team 2 February 3, 2011.
Spring 2009 Programming Fundamentals I Java Programming XuanTung Hoang Lecture No. 8.
PHP Reusing Code and Writing Functions 1. Function = a self-contained module of code that: Declares a calling interface – prototype! Performs some task.
Lesson 4 CDT301 – Compiler Theory, Spring 2011 Teacher: Linus Källberg.
Creating FunctionstMyn1 Creating Functions Function can be divided into two groups: –Internal (built in) functions –User-defined functions.
More yacc. What is yacc – Tool to produce a parser given a grammar – YACC (Yet Another Compiler Compiler) is a program designed to compile a LALR(1) grammar.
Principles of Programming CSEB134 : BS/ CHAPTER Fundamentals of the C Programming Language.
Yi Zhang yz2414(Project manager) Shuaishuai Nie sn2479(Language Guru) Xuanchen Tang xt2128(System Architect) Lewis Flanagan lrf2123(System Integrator)
A language for auralizing data. MOTIVATION  Visual input overload!  Automatic musical scoring.
ICS312 Introduction to Compilers Set 23. What is a Compiler? A compiler is software (a program) that translates a high-level programming language to machine.
Project Part 2: Parser. Command line: bison –d translate.y Command line: flex filename.l gcc y.tab.c lex.yy.c -lfl Bison.
Defining Your Own Classes II
Functions + Overloading + Scope
Chapter 7 User-Defined Methods.
Data Virtualization Tutorial: Introduction to SQL Script
INC 161 , CPE 100 Computer Programming
Compiler Construction
-by Nisarg Vasavada (Compiled*)
CS 153: Concepts of Compiler Design November 30 Class Meeting
Bison: Parser Generator
CMPE 152: Compiler Design December 5 Class Meeting
Basic Program Analysis: AST
Chapter 7 LC-2 Assembly Language.
Polynomial Manipulation Language
CSE 3302 Programming Languages
CSE401 Introduction to Compiler Construction
Comments, Prototypes, Headers & Multiple Source Files
C-to-LC3 Compiler Over the course of the next two weeks, you will build a program that will compile C code to LC-3 assembly language Don't panic! You.
Implementation of a Functional Programming Language
A language for auralizing data
General Computer Science for Engineers CISC 106 Lecture 03
CSCE 314: Programming Languages Dr. Dylan Shell
Presentation transcript:

B atch I mage P rocessing L anguage Programming Language and Translator Final Project (Team 15)

What is BIPL Batch Image Processing Language Procedural scripting language

Why is BIPL Simple & Intuitive Powerful Flexible

Project Manage Shih-Hao Tsai (Project Manager) Structure Terry Tsai (Language Guru) Compiler Architecture Fan Wei (System Architect) Environment Yi-Hong Lin (System Integrator) Testing Chun-Chao Wang(Testing & validate)

How Project Managed Weekly meeting Version Control

Project Manage Shih-Hao Tsai (Project Manager) Structure Terry Tsai (Language Guru) Compiler Architecture Fan Wei (System Architect) Environment Yi-Hong Lin (System Integrator) Testing Chun-Chao Wang(Testing & validate)

Program Structure Function DeclarationsBegin BlockBody BlockEnd Block

Function Declarations image apply_watermark(string str, image i) { image lbl = label(str, "Tahoma",72, 0, 200, 40); return lbl # [(i.width-lbl.width)/2, (i.height-lbl.height)/2] : compose(i,.); }

Begin Block BEGIN { string path = ""; int x = 0, y = 0; int xRes = 1366, yRes = 768; int scale = yRes / 10; image canv = canvas(xRes, yRes); }

Body Block { if (path == "") canv.pathname = $.pathname; $ = $ * [$.width, scale]; if (x + $.width <= canv.width) { canv = compose(canv, $ # [x,y]); x += $.width; } else { int lsize = canv.width-x; int rsize = $.width - lsize; canv = $ : crop(., [0,0], [lsize,$.height]) # [x,y] : compose(canv,.); (x = 0, y += scale); if (y >= canv.width) break; canv = $ : crop(., [lsize,0], [rsize,$.height]) # [x,y] : compose(canv,.); x += rsize; } canv = $ : crop(., [0,0], [lsize,$.height]) # [x,y] : compose(canv,.); (x = 0, y += scale); if (y >= canv.width) break; canv = $ : crop(., [lsize,0], [rsize,$.height]) # [x,y] : compose(canv,.); canv = $ : crop(., [0,0], [lsize,$.height]) # [x,y] : compose(canv,.); (x = 0, y += scale); if (y >= canv.width) break; canv = $ : crop(., [lsize,0], [rsize,$.height]) # [x,y] : compose(canv,.);

End Block END { canv = apply_watermark("generated using BIPL", canv); canv.filename = "CANVAS"; save(canv, "JPG"); }

Project Manage Shih-Hao Tsai (Project Manager) Structure Terry Tsai (Language Guru) Compiler Architecture Fan Wei (System Architect) Environment Yi-Hong Lin (System Integrator) Testing Chun-Chao Wang(Testing & validate)

Translator Architecture Tokenizer Parser Symbol Table flex++ bipl_frontend.exe Image modules skeleton bison bipl.l symboltable.h bipl.y test.bipl Function Declarations Begin Block Body Block End Block 7 types operator overloading Built-in functions prebuilt libraries module.dll test.exe FRONTEND BACKEND C C

Sample Program int x () return 1; BEGIN { image c = canvas( , ); int i = 0, j = 0; } { c = compose(c, $ * [100,100] # [i*100,j*100]); i = i + 1; if (i == 10) { i = 0; j = j + 1; } END { c.filename = "test"; save(c, "JPG"); }

Tokenizer Parser Symbol Table flex++ bipl_frontend.exe Image modules skeleton bison bipl.l symboltable.h bipl.y test.bipl Function Declarations Begin Block Body Block End Block 7 types operator overloading Built-in functions prebuilt libraries module.dll test.exe FRONTENDBACKEND C C Translator Architecture

int x () return 1; BEGIN { image c = canvas( , ); Tokenizer

End Block Tokenizer Parser Symbol Table flex++ bipl_frontend.exe Image modules skeleton bison bipl.l symboltable.h bipl.y test.bipl Function Declarations Begin Block Body Block 7 types operator overloading Built-in functions prebuilt libraries module.dll test.exe FRONTENDBACKEND C C End Block Translator Architecture

= T_IMAGE expr1 id2 ( FLT_CONST expr2 ); imageTypesccanvas canvasimageTypes2 composeimageTypes2 ……… xintTypes0...…… cimageTypes int x () return 1; BEGIN { image c = canvas( , ); Parser id1,

Tokenizer Parser Symbol Table flex++ bipl_frontend.exe Image modules skeleton bison bipl.l symboltable.h bipl.y test.bipl Function Declarations Begin Block Body Block End Block 7 types operator overloading Built-in functions prebuilt libraries module.dll test.exe FRONTENDBACKEND C C Translator Architecture

Function Declarations intTypes x() return intTypes(1); Begin Block imageTypes c = canvas(floatTypes(1000.0),floatTypes(1000.0)); intTypes i = intTypes(0), j = intTypes(0); Body Block c = compose(c,_dollar_sign*pairTypes(100,100)|pairTypes (i*intTypes(100),j*intTypes(100))); i = i+intTypes(1); if (i==intTypes(10)) { i = intTypes(0); j = j+intTypes(1); } End Block c.filename = stringTypes("test"); save(c,stringTypes("JPG")); Frontend Output int x () return 1; BEGIN { image c = canvas( , ); int i = 0, j = 0; } { c = compose(c, $ * [100,100] # [i*100,j*100]); i = i + 1; if (i == 10) { I = 0; j = j + 1; } END { c.filename = "test"; save(c, "JPG"); }

Tokenizer Parser Symbol Table flex++ bipl_frontend.exe Image modules skeleton bison bipl.l symboltable.h bipl.y test.bipl Function Declarations Begin Block Body Block End Block 7 types operator overloading Built-in functions prebuilt libraries module.dll test.exe FRONTENDBACKEND C C Translator Architecture

Project Manage Shih-Hao Tsai (Project Manager) Structure Terry Tsai (Language Guru) Compiler Architecture Fan Wei (System Architect) Environment Yi-Hong Lin (System Integrator) Testing Chun-Chao Wang(Testing & validate)

Runtime Environment Use parameters to indicate files or directory Supported image file type will be selected (runtime) Dynamic-linked library may load > build_bipl.bat test.bipl > test.exe -f path/to/somefolder > test.exe > test.exe lena.jpg lena.bmp test.exe directory list of image files Outputs Dynamic-linked libraries

Development Environment Bison(yacc), flex(lex), Visual Studio 2010(cl.exe) msbuild to build libraries and BIPL files. c-generic-libraries argtable

Project Manage Shih-Hao Tsai (Project Manager) Structure Terry Tsai (Language Guru) Compiler Architecture Fan Wei (System Architect) Environment Yi-Hong Lin (System Integrator) Testing Chun-Chao Wang(Testing & validate)

Test Plan System TestFrontendBackendNon-TechnicalPerformanceSpace

System Test Frontend Redefinition Undeclared identifier Scope of identifier # of Function parameter Built-in functions Dollar sign Frontend Redefinition Undeclared identifier Scope of identifier # of Function parameter Built-in functions Dollar sign Backend Primitive types Operator Type conversion Image type Operators Built-in functions Backend Primitive types Operator Type conversion Image type Operators Built-in functions

Non-Technical Part Performance Batch image processing test Space Dynamic-link library

Demonstration Terry Tsai / Yi-Hong Lin Conclusion Shih-Hao Tsai

DEMO demo sample code 1

DEMO demo sample code 2

Demonstration Terry Tsai / Yi-Hong Lin Conclusion Shih-Hao Tsai

Conclusion What we learned? What worked well? What’s done differently? Why people need to use BIPL?

~THANKS~