LIVA A Lite Version of Java Shanqi Lu, Jiafei Song, Zihan Jiao, Yanan Zhang, Hyoyoon Kate Kim
Introduction What we are looking for from LIVA Simple It is designed to let programmers, who are familiar with class-based languages, to feel comfortable with developing common algorithms like GCD. It is lite in the sense that it maintains some but not all features in Java. Object-Oriented It has a Java-like syntax and supports object-oriented paradigm and inheritance. Portable LIVA is a portable language and compiled down to LLVM.
Tools 04 01 02 03 OS X GitHub VMware Ubuntu Operating System Version Control Make Development Consistent Operating System
Project Schedule 36 Days’ Project !!! Proposal Hello World Milestone milestone with main function call Brain storm for proposed language design and print feature July 6 - July 11 July 12- July 20 July 21- Aug 1 Aug 2- Aug 11 Language Reference Final Work Manual All features and test suite completed Syntax and scope determined
GitHub History
Features LIVA Types Operators Functions Classes Inheritance cv Arrays Loops cv If-Else cv Standard Library
Syntax LIVA Operator Op ors Typ ype Comme Co mments ts int a = 1; | '+' { PLUS } /*This is a Liva comment!*/ float b = 2.2; | '-' { MINUS } | '*' { TIMES } char c = '3' ; boolean d = true ; | '/' { DIVIDE } | '%' { MODULO } int [] x = new int [10]; | '=' { ASSIGN } float [] y = new float [10]; | "==" { EQ } | "!=" { NEQ } y [1] = 1.0; | '<' { LT } | "<=" { LEQ } | ">" { GT } | ">=" { GEQ } | "&" { AND } | "|" { OR } | "!" { NOT }
Syntax Class Cl ss Contr Co trol Fl Flow Object ct int i ; class myclass{ class test { for ( i =0; i<10; i = i +1){ int calc ( int x, int y){ void main(){ print( i ); int z; int x = 9; } z = x + y; int y = 6; return (z); int z; while ( i > 0){ } print( i ); } class myclass obj = i = i - 1; new myclass(); } class subcls extends myclass{ z = obj.calc(x, y); int b ; if ( true ){ constructor( int a){ print ( "z=" ,z); print(42); this . b = a; } } else { } } print(8); int calc ( int x, int y){ } int z; z = x - y; return (z); } }
Architecture Source Code .liva file LLVM Code Parser SAST AST Scanner Generation AST
AST PROGRAM Classes Fields Methods SUCCESS Constructors Constructors Expressions Statements
SAST PROGRAM Functions Classes Main Reserved Fields SUCCESS Name Function Formals Body Function Type Return Type Name
Testing Test proce Te cedure o Co Compile an and ru run te test-if if1.liv liva o Co Compare t the o output wi with t test-if1 if1.out o If If they ar are e the e same, ame, don one! e! Ot Other erwis ise, e, fin find ou out the e prob oblems lems. 120 120 te test file files o Al All pa passe ssed! Te Testall.sh sh o Ba Based on on the the te test sc script of of Mi MicroC o Te Test all all files files in in a si singl ngle co command
Testing
Testing Unit Test Successful & Unsuccessful Small pieces
Testing Integration Test Small tests integated into larger one
Lessons Learned Time Management Start the project early Cooperation Teamwork and integration Communication Avoid doing the same work Software Tools Efficiency improvement
DEMO
Recommend
More recommend