Under the name of deep a cross development platform for Java was created. The project was initiated and is maintained by the Institut for Computer Science at the Eastern Switzerland University of Applied Sciences, OST, Buchs, Switzerland.
A Java compiler converts a Java file into a class file. A class file represents the original program in a compact binary form and could be interpreted by a JVM or, as in our case, will be translated directly in the target machine code. Bytecode is strictly defined in The Java Virtual Machine Specification, Java SE 7 Edition and can be verified.
Our deep compiler translates Bytecode into machine code for a certain processor. To optimize for speed and code size and to make use of register based architecture - such as PPC or ARM - we transform the Bytecode in a first step into Static Single Assignment Form, SSA. This form is simple and platform independent and can be used for various optimizations. In a second step, which is platform specific, registers are allocated and code is generated.
The product of the frontend is the code in SSA form. Every necessary class with all its methods are parsed (see Class File Reader) and entered into a directory. From their instructions, the control flow graphs (see Control Flow Graph) are built. This directed graph shows all possible branches which can be taken during execution of a program. The CFG can be optimized, e.g. elimination of code which is never run. After this the SSA is created.
For each supported architecture a specific backend is necessary. As a first step, registers are assigned for all SSA instruction results. After this machine instructions can be issued for the target. Finally the linker combines everything into a executable target image.
Currently, PowerPC and ARMv7 code can be generated. As target processors we use mpc555 and mpc5200 for PowerPC and the Zynq-7000 with a dual core ARM Cortex-A9 processor as an ARM target.
In order to work efficiently with deep some more tools and components are useful.
When working extensively with class files our Class File Browser might be advantageous. It displays all information of a class file in easily readable form. It can be downloaded as an eclipse plugin from https://marketplace.eclipse.org/content/eclipse-class-file-browser.
The runtime system comprises all Java classes which run directly on the target. Among them is the kernel, memory management for heap and stack, a scheduler and exception handling. The runtime system includes target independent classes as well as processor specific classes.
The configuration files describe the properties of the used architecture and the memory layout of a target board. This information might be used by the compiler and the linker as well as by the kernel (see Configuration).
This eclipse view shows all the compiled and linked classes with their methods together with their CFG, SSA and machine code. The placement of each method and variable in the target memory is also visible.
Many views in eclipse support the viewing of variables, objects, registers and memory sections. We also deploy the debugger framework of eclipse to support target debugging with setting breakpoints and single-stepping (see Debugger).
The internal documentation for maintainers can be found here.