Work

Next Generation of Virtual Platforms

Year: 2005
Type: article
Abstract: This paper is addressing three major and quite controversial issues critical for the next generation of virtual platforms for object-oriented languages. The first one is providing explicit support for parametric types in the virtual machine. Lack of proper support in the Java Virtual Machine is precisely the reason for violations in Java 5.0 with respect to dynamic type checking, correctness of run-time type information, and correctness of persistence and reflective capabilities. The second limitation of current object oriented languages and their virtual platforms is proper support for assertions (constraints). Contrary to customary views on assertions, we show that object-oriented languages (of the next generation) equipped with assertions and running on virtual platforms require proper support for these high-level features in the virtual machine. Parametric types equipped with assertions (constraints) should play a significant role in applications such as database systems, but the current virtual platforms have very inadequate support for persistence. We argue for much more sophisticated orthogonal persistent capabilities, where orthogonality is also a point of controversy. The main components of the required architecture are presented in the paper. This architecture includes representation of parametric types and logic-based constraints in class file and class object structures, a loader that performs appropriate actions on type parameters and constraints, and reflective capabilities that report information on type signatures and their associated constraints. A particularly surprising component of this architecture, not considered as a part of a virtual platform, is an interface with a program verification system that performs checking of constraints and verifies behavioral subtyping requirements. This is accomplished by interfacing the program verification system with reflective capabilities and performing verification by accessing type signatures and their associated constraints in (dynamically) loaded class objects. The specifics are elaborated in the paper and implemented by extending the Java Virtual Machine with the proposed functionalities. 1. EXTENDED VIRTUAL PLATFORMS The core idea of this paper is that virtual platforms, for object-oriented languages, with parametric types and logicbased constraints (assertions) must provide proper support for these high-level language features. Lack of proper support for parametric types has major implications for correctness of static and dynamic type checking, correctness of run-time type information, and correctness of persistence and reflective capabilities of virtual platforms [18, 36]. This point of view comes as a surprise after years of research and experience with languages such as C++ which indicated that parametric polymorphism can and should be handled completely statically. Hence, no support in the virtual machine should be required. But we show that lack of proper support in the Java Virtual Machine is precisely the reason for all of the above anomalies in Java 5.0. These surprisingly severe implications have been properly understood by the designers of the C# extension with parametric polymorphism [25]. Unlike the JVM, Common Language Runtime [37] has been extended with a variety of features ensuring proper support for parametric polymorphism. Almost complete lack of assertions in mainstream objectoriented languages such as Java (Eiffel [31] is an exception) is also regarded as a major limitation. But providing support for assertions comes with considerable more subtleties. Assertions (constraints) are logic-based, declarative, and hence a high-level language feature that seemingly does not require support in the underlying virtual machine. But just like with parametric types, we show that for languages running on virtual platforms this perfectly natural point of view does not hold any more. The view that virtual platforms for object-oriented languages should provide proper support for the management of constraints is new and much more subtle. We show that lack of proper support for constraints has non-trivial implications on integrating constraints into the overall environment and managing them in their declarative form. Lack of proper support for constraints makes it impossible for reflective capabilities of a virtual platform to report information on constraints along with types, and on the ability to verify behavioral subtyping requirements. A major subtlety in languages on virtual platforms is that the source code may not be available. Hence, verifying behavioral subtyping requires access to a suitable representation of constraints in class files and class objects. Because of dynamic loading these conditions must often be verified dynamically where static verification becomes a particular case. Of course, loading all class objects and performing effectively static verification is a preferable mode of operation in the proposed extended platform as well, especially if an interactive program verification system is used. Parametric classes along with constraints are typically required in typed persistent and database systems because of various types of collections equipped with data integrity constraints. But the current most popular virtual platforms for object-oriented languages, the Java Virtual Machine in particular, have very inadequate support for persistence. This has led to a variety of specialized virtual machines that have those capabilities. We argue that much more sophisticated persistent capabilities are required in the next generation of virtual platforms. Whether those will in fact support orthogonal persistence is yet another point of controversy. File System Class file Loader PVS System Class Object Read Class Create Class Object PVS Response Create PVS Theories
Language: English
Subfield: Software
Open Access status: green
OpenAlex ID: W164184602
FWCI: 0.629
Cites: 28
Cited by: 1
Related to: 10