Java Intermediate Language
From Wikipedia, the free encyclopedia
|
|
The topic of this article may not meet Wikipedia's general notability guideline. Please help to establish notability by adding reliable, secondary sources about the topic. If notability cannot be established, the article is likely to be merged, redirected, or deleted. (July 2010) |
|
|
This article is written like a manual or guidebook. Please help rewrite this article from a neutral point of view. (July 2010) |
| This article does not cite any references or sources. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed. (July 2010) |
In computer science, Java Intermediate Language is an intermediate language (which is a subset of XML and SGML) representing the type structure of a Java program. The language was proposed by the team of SableVM in McGill University in January 2002 to aid the analysis of a Java program with the goals of scalability and good performance.
The language has not seen much adoption outside the Sable team.
[edit] Example
Consider the following piece of Java code.
public MyClass implements MyInterface extends MySupperClass { int MyField; void MyMethod (double x, double y) { double z; z = x + y; this.MyField = z } }
This piece can be expressed in the language, as follows:
<jil> <class name="MyClass" extends="MySupperClass"> <modifiers><modifier name="public" /></modifiers> <interfaces><interface name="myinterface" /></interfaces> <fields> <field name="MyField" type="int" /> </fields> <methods> <method name="MyMethod" returntype="void"> <parameters> <parameter name="x" type="double" /> <parameter name="y" type="double" /> </parameters> <locals> <local name="z" type="double" /> </locals> <statements> <!-- Each statement is expressed by some intermediate format for code generator like three address code. In the below a language called baf is used. --> <baf> <![CDATA[ $r2 = $r0 + $r1; this.MyField = (double) $r2; ]]> <!-- Here, we are assuming x is expressed as $r0, y $r1 and z $r2. --> </baf> </statements> </method> </methods> </class> </jil>
[edit] External links
| This programming language-related article is a stub. You can help Wikipedia by expanding it. |