1 / 19

Java Library Migration Custom Tailored for embedded systems.

Java Library Migration Custom Tailored for embedded systems. JT Perry. People in the Project. University of Nebraska at Omaha (UNO) Faculty Harvey Siy Victor Winter Students Az Mametjanov James T. Perry Satish Srinivasan. Sandia National Laboratories (SNL) Providing the Grant

doctor
Download Presentation

Java Library Migration Custom Tailored for embedded systems.

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Java Library MigrationCustom Tailored for embedded systems. JT Perry

  2. People in the Project • University of Nebraska at Omaha (UNO) • Faculty • Harvey Siy • Victor Winter • Students • Az Mametjanov • James T. Perry • Satish Srinivasan • Sandia National Laboratories (SNL) • Providing the Grant • People Involved • Ben Farkas • Jim McCoy • Dom Montoya • Steve Morrison • Greg Wickstrom

  3. ? ? ? ? The Need for Library Migration • Tiny embedded systems may need to save memory and cannot hold full Libraries. • Some embedded systems may have restricted functionality. • These systems may then be unable to handle the code in the Libraries. (such as floating point numbers) JAVA LIBRARIES X = (int) 10.5;

  4. How should libraries be edited? • Must remove all unsupported code. • While remaining syntactically correct. • And also, it must keep maximum functionality.

  5. Concept of correct editing. (Example: remove “float”) • Must remove all unsupported code. • While remaining syntactically correct. • And also, it must keep maximum functionality.

  6. Transforming Java ClassesWith automation • There are many steps to automate such processes. • One such tool is the class parser included with Sun’s compiler “javap.”

  7. How do I start using javap? • First you must compile the java file using javac • Example: • Compiling will generate a class file of the java file. • Shown: • Now you are able to run javap on the class name. • Example:

  8. What does javap produce? • With no options, javap simply shows the fields and methods in the class. • Without options, we do not have a clear view of the class, which is we use the -verbose option.

  9. Javap -verbose Cafe • Bellow are snapshots from using javap. Fields and Methods (with bytecodes) Constant pool

  10. Example of javap • This walk-through will be done with the java file shown on the right: • After Compiling… “javap TinyCafe”produces:

  11. Example:“javap -verbose TinyCafe” Constant pool: • We can now see how java labels methods and fields.

  12. Example, continued:“javap -verbose TinyCafe” Constant pool: • Thus, all the information is stored in the comment • This applies to all the methods and fields in the Constant pool.

  13. Walk-through of Transformation- Using class “TransformCafe.java”

  14. Walk-through of Transformation- Using class “TransformCafe.java”

  15. The float is not here! Other issues….Constructor methods can be tricky. • “javap -verbose FunkyCafe.java” It's here! Look! Check Table

  16. We see that this line is NOT within the body (between first and last line) Thus, the method is NOT dependent on this float. Other issues….Constructor methods can be tricky. • “javap -verbose FunkyCafe.java”

  17. Other issues….Constructor methods can be tricky. • “javap -verbose FunkyCafe2.java”

  18. Impossible to tell? Huge Difference… same bytecodesConstructor methods can be tricky. • “javap –verbose” on FunkyCafe3.java & FunkyCafe4.java SOLUTION: Pretty Print File To Remove Confusion! IT’S THE SAME!

  19. Other Questions?

More Related