|
ABSTRACT
Higher-level languages interface with lower-level languages such as C to access platform functionality, reuse legacy libraries, or improve performance. This raises the issue of how to best integrate different languages while also reconciling productivity, safety, portability, and efficiency. This paper presents Jeannie, a new language design for integrating Java with C. In Jeannie, both Javaand C code are nested within each other in the same file and compile down to JNI, the Java platform's standard foreign function interface. By combining the two languages' syntax and semantics, Jeannie eliminates verbose boiler-plate code, enables static error detection across the language boundary, and simplifies dynamic resource management. We describe the Jeannie language and its compiler, while also highlighting lessons from composing two mature programming languages.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
R. Anisko, V. David, and C. Vasseur. Transformers: a C++ program transformation framework. Tech. Report 0310, Laboratoire de Recherche et D& 233;veloppement de l'Epita, Le Kremlin-Bicêtre cedex, France, May 2004.
|
| |
2
|
|
 |
3
|
Jonthan Bachrach , Keith Playford, The Java syntactic extender (JSE), Proceedings of the 16th ACM SIGPLAN conference on Object oriented programming, systems, languages, and applications, p.31-42, October 14-18, 2001, Tampa Bay, FL, USA
|
 |
4
|
|
| |
5
|
S. S. Bakken, A. Aulbach, E. Schmid, J. Winstead, L. T. Wilson, R. Lefdorf, A. Zmievski, and J. Ahto. PHP Manual. PHP Documentation Group, Feb. 2004. http://www.php.net/manual/.
|
 |
6
|
Daniel J. Barrett , Alan Kaplan , Jack C. Wileden, Automated support for seamless interoperability in polylingual software systems, Proceedings of the 4th ACM SIGSOFT symposium on Foundations of software engineering, p.147-155, October 16-18, 1996, San Francisco, California, United States
|
| |
7
|
|
| |
8
|
G. Bierman, E. Meijer, and W. Schulte. The essence of data access in CΩ. In Proc. 19th European Conference on Object-Oriented Programming, vol. 3586 of LNCS, pp. 287--311, July 2005.
|
| |
9
|
J. Blosser. Java tip 98: Reflect on the visitor design pattern. JavaWorld, July 2000. http://www.javaworld.com/javaworld/javatips/jw-javatip98.html.
|
| |
10
|
M. Blume. No-longer foreign: Teaching an ML compiler to speak C ``natively''. Electronic Notes in Theoretical Computer Science, 59(1):36--52, Sept. 2001.
|
| |
11
|
C. Brabrand, M. I. Schwartzbach, and M. Vanggaard. The metafront system: Extensible parsing and transformation. Electronic Notes in Theoretical Computer Science, 82(3):592--611, Dec. 2003.
|
 |
12
|
Martin Bravenboer , Éric Tanter , Eelco Visser, Declarative, formal, and extensible syntax definition for aspectJ, Proceedings of the 21st annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications, October 22-26, 2006, Portland, Oregon, USA
|
| |
13
|
|
 |
14
|
Martin Bravenboer , Eelco Visser, Concrete syntax for objects: domain-specific language embedding and assimilation without restrictions, Proceedings of the 19th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, October 24-28, 2004, Vancouver, BC, Canada
|
| |
15
|
M. Bubak, D. Kurzyniec, and P. Luszczek. Creating Java to native code interfaces with Janet extension. In Proc. SGI Users's Conference, pp. 283--294, Oct. 2000.
|
| |
16
|
L. Cardelli, F. Matthes, and M. Abadi. Extensible syntax with lexical scoping. Tech. Report 121, Digital Equipment, Systems Research Center, Feb. 1994.
|
| |
17
|
M. Chakravarty, S. Finne, F. Henderson, M. Kowalczyk, D. Leijen, S. Marlow, E. Meijer, S. Panne, S. P. Jones, A. Reid, M. Wallace, and M. Weber. The Haskell 98 foreign function interface 1.0. http://www.cse.unsw.edu.au/~chak/haskell/ffi/, 2003.
|
| |
18
|
Miaobo Chen , Shalom Goldenberg , Suresh Srinivas , Valery Ushakov , Young Wang , Qi Zhang , Eric Lin , Yoav Zach, Java JNI Bridge: A Framework for Mixed Native ISA Execution, Proceedings of the International Symposium on Code Generation and Optimization, p.65-75, March 26-29, 2006
[doi> 10.1109/CGO.2006.22]
|
 |
19
|
Jeremy Condit , Matthew Harren , Scott McPeak , George C. Necula , Westley Weimer, CCured in the real world, Proceedings of the ACM SIGPLAN 2003 conference on Programming language design and implementation, June 09-11, 2003, San Diego, California, USA
|
 |
20
|
|
| |
21
|
K. Fisher, R. Pucella, and J. Reppy. A framework for interoperability. Electronic Notes in Theoretical Computer Science, 59(1):3--19, Sept. 2001.
|
| |
22
|
Marc E. Fiuczynski , Robert Grimm , Yvonne Coady , David Walker, patch (1) considered harmful, Proceedings of the 10th conference on Hot Topics in Operating Systems, p.16-16, June 12-15, 2005, Santa Fe, NM
|
| |
23
|
M. Furr and J. S. Foster. Polymorphic type inference for the JNI. In Proc. 15th European Symposium on Programming, pp. 309--324, Mar. 2006.
|
| |
24
|
|
 |
25
|
Steven E. Ganz , Amr Sabry , Walid Taha, Macros as multi-stage computations: type-safe, generative, binding macros in MacroML, Proceedings of the sixth ACM SIGPLAN international conference on Functional programming, September 03-05, 2001, Florence, Italy
|
| |
26
|
V. Gapeyev, M. Y. Levin, B. C. Pierce, and A. Schmitt. XML goes native: Run-time representations for xtatic. In Proc. 14th International Conference on Compiler Construction, vol. 3443 of LNCS, pp. 43--58, Apr. 2005.
|
| |
27
|
|
| |
28
|
R. Grimm. xtc (eXTensible C). http://cs.nyu.edu/rgrimm/xtc/.
|
 |
29
|
|
| |
30
|
C. Grothoff. Walkabout revisited: The runabout. In Proc. 17th European Conference on Object-Oriented Programming, vol. 2743 of LNCS, pp. 101--125, July 2003.
|
 |
31
|
Matthew Harren , Mukund Raghavachari , Oded Shmueli , Michael G. Burke , Rajesh Bordawekar , Igor Pechtchanski , Vivek Sarkar, XJ: facilitating XML processing in Java, Proceedings of the 14th international conference on World Wide Web, May 10-14, 2005, Chiba, Japan
[doi> 10.1145/1060745.1060788]
|
| |
32
|
G. Hedin. The JastAdd extensible Java compiler. http://jastadd.cs.lth.se/web/extjava/index.shtml.
|
| |
33
|
L. Huelsbergen. A portable C interface for Standard ML of New Jersey. Tech. report, AT&T Bell Laboratories, Jan. 1996. http://www.smlnj.org/doc/SMLNJ--C/smlnj-c.ps.
|
| |
34
|
International Organization for Standardization. Information Technology--Programming Languages-C. ISO/IEC Standard 9899:TC2, May 2005.
|
| |
35
|
|
| |
36
|
D. Kurzyniec. Creating Java to native code interfaces with Janet extension. Master's thesis, University of Mining and Metallurgy, Kraków, Poland, Aug. 2000. http://janet-project.sourceforge.net/papers/janet_msc.pdf.
|
| |
37
|
X. Leroy, D. Doligez, J. Garrigue, D. Rémy, and J. Vouillon. The Objective Caml system release 3.09. http://caml.inria.fr/, Oct. 2005.
|
| |
38
|
|
| |
39
|
J. Lind-Nielsen. BuDDy. http://buddy.sourceforge.net/.
|
 |
40
|
|
 |
41
|
Erik Meijer , Brian Beckman , Gavin Bierman, LINQ: reconciling object, relations and XML in the .NET framework, Proceedings of the 2006 ACM SIGMOD international conference on Management of data, June 27-29, 2006, Chicago, IL, USA
[doi> 10.1145/1142473.1142552]
|
 |
42
|
Todd Millstein, Practical predicate dispatch, Proceedings of the 19th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, October 24-28, 2004, Vancouver, BC, Canada
|
| |
43
|
|
| |
44
|
N. Nystrom, M. R. Clarkson, and A. C. Myers. Polyglot: An extensible compiler framework for Java. In Proc. 12th International Conference on Compiler Construction, vol. 2622 of LNCS, pp. 138--152. Springer, Apr. 2003.
|
 |
45
|
Nathaniel Nystrom , Xin Qi , Andrew C. Myers, J&: nested intersection for scalable software composition, Proceedings of the 21st annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications, October 22-26, 2006, Portland, Oregon, USA
|
 |
46
|
|
 |
47
|
|
| |
48
|
M. Roth and E. Pelegrí-Llopart. JavaServer Pages specification version 2.0. Tech. report, Sun Microsystems, Nov. 2003.
|
| |
49
|
A. Shalit. The Dylan Reference Manual. Addison-Wesley, Sept. 1996.
|
 |
50
|
|
 |
51
|
Levon Stepanian , Angela Demke Brown , Allan Kielstra , Gita Koblents , Kevin Stoodley, Inlining java native calls at runtime, Proceedings of the 1st ACM/USENIX international conference on Virtual execution environments, June 11-12, 2005, Chicago, IL, USA
[doi> 10.1145/1064979.1064997]
|
| |
52
|
Sun Microsystems. Java native interface specification, release 1.1, Jan. 1997.
|
| |
53
|
Sun Microsystems. Integrating native methods into Java programs. http://java.sun.com/docs/books/tutorialNB/download/tut-native1dot0.zip, May 1998.
|
| |
54
|
G. Tan, A. W. Appel, S. Chakradhar, A. Raghunathan, S. Ravi, and D. Wang. Safe Java native interface. In Proc. 2006 IEEE International Symposium on Secure Software Engineering, pp. 97--106, Mar. 2006.
|
 |
55
|
|
| |
56
|
|
| |
57
|
E. Visser. Syntax Definition for Language Prototyping. PhD thesis, University of Amsterdam, Sept. 1997.
|
 |
58
|
Joost Visser, Visitor combination and traversal control, Proceedings of the 16th ACM SIGPLAN conference on Object oriented programming, systems, languages, and applications, p.270-282, October 14-18, 2001, Tampa Bay, FL, USA
|
 |
59
|
|
| |
60
|
J. Whaley. JavaBDD. http://javabdd.sourceforge.net/.
|
| |
61
|
M. Yuen, M. Fiuczynski, R. Grimm, Y. Coady, and D. Walker. Making extensibility of system software practical with the C4 toolkit. In Proc. AOSD Workshop on Software Engineering Properties of Languages and Aspect Technologies, Mar. 2006.
|
CITED BY 8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Daniel Frampton , Stephen M. Blackburn , Perry Cheng , Robin J. Garner , David Grove , J. Eliot B. Moss , Sergey I. Salishev, Demystifying magic: high-level low-level programming, Proceedings of the 2009 ACM SIGPLAN/SIGOPS international conference on Virtual execution environments, March 11-13, 2009, Washington, DC, USA
|
|