idea for student project: emitting Android .dex classfiles directly

Showing 1-5 of 5 messages
idea for student project: emitting Android .dex classfiles directly Miguel Garcia 4/3/12 12:26 PM

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


Re: idea for student project: emitting Android .dex classfiles directly Miguel Garcia 4/3/12 12:33 PM

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
Re: idea for student project: emitting Android .dex classfiles directly Simon Ochsenreither 4/8/12 5:09 PM
Hi,

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

Bye, Simon
Re: idea for student project: emitting Android .dex classfiles directly Miguel Garcia 4/19/12 7:42 AM

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:
Re: idea for student project: emitting Android .dex classfiles directly Simon Ochsenreither 4/19/12 8:28 AM
Interesting, thanks!