idea for student project: emitting Android .dex classfiles directly

370 kali dilihat
Langsung ke pesan pertama yang belum dibaca

Miguel Garcia

belum dibaca,
3 Apr 2012, 15.26.0803/04/12
kepadascala-i...@googlegroups.com

Scala developers targeting Android must bear with an extra build step (jar to dex conversion), given that there's no dedicated backend to replace GenJVM (to directly translate ICode [1] into dex files).

Two recent developments can simplify the construction of an Android-backend:

  (a) ASMDEX [2] an ASM-based bytecode manipulation framework for DEX bytecode.

  (b) an ASM-based version of GenJVM [3], in connection with the extensive ASM documentation (user guide [4] and developer docs [5]).

That's the idea. Disclaimer: I'm in no way an expert in Android development. I just got this idea after contributing to both the GenJVM and GenMSIL Scala backends :)


Miguel
http://lampwww.epfl.ch/~magarcia/ScalaCompilerCornerReloaded/


[1] http://www.sts.tu-harburg.de/people/mi.garcia/ScalaCompilerCorner/GenICode01.pdf

[2] http://mail.ow2.org/wws/arc/asm/2012-04/msg00000.html
    http://asm.ow2.org/asmdex-index.html

[3] https://github.com/magarciaEPFL/scala/tree/GenASM2
    https://groups.google.com/d/topic/scala-internals/l35CbKnRaXU/discussion

[4] http://download.forge.objectweb.org/asm/asm4-guide.pdf

[5] http://asm.ow2.org/doc/developer-guide.html


Miguel Garcia

belum dibaca,
3 Apr 2012, 15.33.4703/04/12
kepadascala-i...@googlegroups.com

And, in case it helps, there's already a compiler plugin to convert Scala AST into three-address code, documentation at:
  http://lamp.epfl.ch/~magarcia/ScalaCompilerCornerReloaded/2011Q2/Moving3A.pdf


Miguel
http://lampwww.epfl.ch/~magarcia/ScalaCompilerCornerReloaded/l

Simon Ochsenreither

belum dibaca,
8 Apr 2012, 20.09.2208/04/12
kepadascala-i...@googlegroups.com
Hi,

There is also http://code.google.com/p/dexmaker/.

Bye, Simon

Miguel Garcia

belum dibaca,
19 Apr 2012, 10.42.2119/04/12
kepadascala-i...@googlegroups.com

Another reference for those interested in Dalvik bytecode (this time with a program verification focus)

Title: Study, Formalization, and Analysis of Dalvik Bytecode
Authors: Erik Ramsgaard Wognsen, Henrik Sø ndberg Karlsen
http://students.cs.aau.dk/erikrw/report_sw9.pdf

Quoting from the Abstract:
"We generalize the Dalvik instruction set and formalize it using operational semantics based on the Dalvik documentation, inspection of the Dalvik VM source code, and manual testing."

Part of that work was presented at BYTECODE 2012, http://wwwhome.ewi.utwente.nl/~marieke/Bytecode2012/abstracts.html


Miguel
http://lampwww.epfl.ch/~magarcia/ScalaCompilerCornerReloaded/


On Tuesday, April 3, 2012 9:26:08 PM UTC+2, Miguel Garcia wrote:

Simon Ochsenreither

belum dibaca,
19 Apr 2012, 11.28.3219/04/12
kepadascala-i...@googlegroups.com
Interesting, thanks!
Balas ke semua
Balas ke penulis
Teruskan
0 pesan baru