liva
play

LIVA A Lite Version of Java Shanqi Lu, Jiafei Song, Zihan Jiao, - PowerPoint PPT Presentation

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


  1. LIVA A Lite Version of Java Shanqi Lu, Jiafei Song, Zihan Jiao, Yanan Zhang, Hyoyoon Kate Kim

  2. 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.

  3. Tools 04 01 02 03 OS X GitHub VMware Ubuntu Operating System Version Control Make Development Consistent Operating System

  4. 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

  5. GitHub History

  6. Features LIVA Types Operators Functions Classes Inheritance cv Arrays Loops cv If-Else cv Standard Library

  7. 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 }

  8. 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); } }

  9. Architecture Source Code .liva file LLVM Code Parser SAST AST Scanner Generation AST

  10. AST PROGRAM Classes Fields Methods SUCCESS Constructors Constructors Expressions Statements

  11. SAST PROGRAM Functions Classes Main Reserved Fields SUCCESS Name Function Formals Body Function Type Return Type Name

  12. 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

  13. Testing

  14. Testing Unit Test Successful & Unsuccessful Small pieces

  15. Testing Integration Test Small tests integated into larger one

  16. Lessons Learned Time Management Start the project early Cooperation Teamwork and integration Communication Avoid doing the same work Software Tools Efficiency improvement

  17. DEMO

More recommend