1 / 18

Jeannie: Granting Java Native Interface Developers their Wishes

2. FFI: Foreign Function Interface. User Program

tarak
Download Presentation

Jeannie: Granting Java Native Interface Developers their Wishes

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


    1. 1 Jeannie: Granting Java Native Interface Developers their Wishes

    2. 2 FFI: Foreign Function Interface

    3. 3 JNI = Java Native Interface

    4. 4 FFI Design Goals Productivity Writing & maintaining code Safety Preventing & detecting bugs Efficiency At transition & elsewhere Portability Different OS, HW, virtual execution environment

    5. 5 Jeannie Example

    6. 6 Jeannie Build Process

    7. 7 Translation Scheme

    8. 8 Typing Nested expressions have equivalent types if (`((jboolean)feof(stdin))) ..; Java references are opaque in C Use in nested Java expression Assign to variable Pass as parameter Return as result C can widen Java references `List lst = `new ArrayList(10); C pointers/structs/unions are illegal in Java

    9. 9 Java Garbage Collection

    10. 10 Compiler Stages

    11. 11 Scalable Composition: Syntax

    12. 12 Scalable Composition: Analyzers

    13. 13 Scalable Composition: CodeGen

    14. 14 FFI Design Goals: Revisited Productivity Concise syntax Safety Static error checking Efficiency See next slide Portability Java virtual machines: HotSpot, J9, Jikes RVM Operating systems: Mac OS X, Linux, Cygwin

    15. 15 Efficiency: JNI vs. Jeannie

    16. 16 Nested expression is simple: for (i = 0, n = `ja.length; i < n; i++) s += `ja[`i]; Array Access

    17. 17 Efficiency: Bulk vs. Simple Array Access

    18. 18 Related Work Improving JNI Productivity: Bubak+Kurzyniec (Janet) Safety: Tan et al. (Ccured, ILEA), Furr+Foster (type inference) Efficiency: Stepanian et al. (JIT native code) Portability: Chen et al. (dynamic binary translator) Deep language interoperability XJ, XTATIC, C?, Linq, DALI Scalable composition Polyglot, JastAdd, Silver, Stratego/XT, Safari

    19. 19 Conclusions Have: Language: Jeannie = FFI(Java+C) Open source compiler contributed to xtc http://cs.nyu.edu/rgrimm/xtc Next: Debugging Fault isolation Optimization

More Related