decaf
play

DECAF Hidy Han, JiaYan Hu, Kim Tao, Kylie Wu Overview Introduction - PowerPoint PPT Presentation

DECAF Hidy Han, JiaYan Hu, Kim Tao, Kylie Wu Overview Introduction & Background Project Timeline Development Environment Syntax & Usage Architecture Testing Demo DECAF - So Easy to Use You Wont


  1. DECAF Hidy Han, JiaYan Hu, Kim Tao, Kylie Wu

  2. Overview Introduction & Background ● Project Timeline ● Development Environment ● Syntax & Usage ● Architecture ● Testing ● Demo ●

  3. DECAF - So Easy to Use You Won’t Even Need Caffeine General-Purpose Programming Language, with core features extracted from Java and C. Top-level classes and functions ● Comprehensive C features ● Simple Object-Oriented ● functionality

  4. Goals ● Safety: DECAF is statically typed. ○ Explicit rather than implicit type casting. ○ ● Familiarity: Syntax designed to resemble that of Java and C ○ Great for both beginner and veteran programmers. ○

  5. Project Timeline

  6. Development Environment

  7. Syntax Comments Operators Built-in Types // A single line comment + // add bool // true, false - // subtract int // 4115 /* * // multiply float // 0.25 A multi-line comment / // divide char // ‘h’ */ % // modulus string // “Hello World” and // and array // [int] arr = [int, 5] or // or not // not === // eq. !== // neq. < // lt. > // gt. <= // leq. >= // geq. <type> // cast

  8. Syntax Arrays Control Flow Classes [int] nums = [int, 5]; main() -> int { class Animal { int x; string name; nums[0] = -5; while (x < 5) { int legs; nums[1] = nums[0]; x = x + 1; Animal(string n, int l) -> Animal { if (true) { self.name = n; print_string(“nums[0] is now ”); print_string("foo"); self.legs = l; print_int(nums[0]); continue; } } talk() -> void { print_string("bar"); print_string(self.name); } print_string(" says hi\n"); return 0; } } }

  9. Scanner Architecture Parser Semantic Checker Code Generator LLVM IR DECAF Executables

  10. DECAF Program Global Classes Global Functions Name Fields Return Type Name Methods Formals Body (stmt)

  11. Test Suite ● Automated in testall.sh ● Compares output with test_case.out ● New test cases added when new features are added

  12. Demo

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend