250 likes | 373 Views
Concurrency Analysis of Java RMI Using Source Transformation and Verisoft. By Tim Cassidy Supervised by Jim Cordy Tom Dean. Special Thanks. My father My supervisors Juergen Dingel Dean Jin Debby Robertson. Motivation. Concurrency Can improve performance Can degrade performance
E N D
Concurrency Analysis of Java RMI UsingSource Transformation and Verisoft By Tim Cassidy Supervised by Jim Cordy Tom Dean
Special Thanks • My father • My supervisors • Juergen Dingel • Dean Jin • Debby Robertson
Motivation • Concurrency • Can improve performance • Can degrade performance • Expand the scope of Verisoft (a concurrency analysis tool)
Background • Modeling/Verification tools • Can provide useful insight into a model • But how to make the model • Concurrency Models • Threads and Processes (local and remote) • RMI – Remote Method Invocation • Source Transformation • What’s it good for? • Translation • Rephrasing
Artifacts Used In My Solution • Why Verisoft? • Variety of problems inherent in Model Checking/Verification • Model Construction Problem SOLVED! • State Space Explosion addressed up to a predefined depth • Why Java RMI? • Flexible • Need to know basis
The Sequence Diagram for a Remote Method Invocation in Java RMI
Overview of JCUV • Transform Java RMI (distributed) to C++ Using Verisoft on single machine (inter-process) • Three Step Process • First Step (powered by TXL) • Transform Java to C++ • Second Step (powered by TXL) • Transform C++ to C++ using Verisoft • Third Step • Use Verisoft to analyze resultant/generated code
First Step • Semantic preserving transformation from Java to C++ • Limitations • Unique Naming/Renaming • Constructors • Nested/Inner Classes • Inherent Weakness of Reference Counting Memory Management Strategy • AND MORE!!!
Second Step • Generation of RMI related classes • Generation of Naming • Generation of Remote Object Stub (Proxy For Remote Object) • Generation of UnicastRemoteObject • Limitations • Marshalling/Unmarshalling of Objects
Third Step • Necessary Steps • Compile and link C++ code • Configure system_file.VS prior to Verisoft run-time • Execute Verisoft (manual, guided, automatic)
First Step Experiment • Over 14,000 lines of Java code (all associated with java.util.Hashtable) • Ran 100 C++ tests on the resultant code and it functioned in an identical manner to the original Java code
JCUV Experiments • Two small Java RMI applications were analyzed • Trivial deadlock in one • Divergence was found in the other (with sufficient clients and single server)
Future Work • Eventual goal would be to analyze any form of concurrency implemented in Java • More generalized use of the Java RMI framework • Internet communication without the use of RMI • Simple thread communication • Use JCUV on large and more realistic pieces of Java RMI code
Contributions • Concurrency can be a source of inconsistent problems and therefore debugging can be difficult or even impossible • Modelling/Verification tools - difficult and sometimes simply intractable to attempt a transformation from a programming language to a modelling language
Contributions (cont’d) • My approach attempts to simplify the creation of a model • Three step transformation • From Java code that makes use of RMI to C++ that uses Verisoft
Related Work • Java PathFinder and Bandera • Supports Linear Temporal Logic or Computation Tree Logic (better solution to Requirement Specification problem) • Poor support for Output Interpretation problem • Not capable of transforming/translating Java RMI into a modelling language
Realistic TXL Rule Type out rule manually