Demystifying magic: high-level low-level programming (original) (raw)

Towards An Extensible Virtual Machine

2002

The Java Virtual Machine Language (JVML) is rapidly emerging as the de-facto standard for representing portable code and Java Virtual Machines (JVMs) are increasingly being used as standard platforms for running applications. But how suitable are the JVMs and the associated JVML for this purpose? This paper argues that JVML has a serious drawback in that it is not extensible enough. This lack of extensibility hinders the process of deploying new innovations in applications that run on the JVM platform. This paper also describes how a standard for portable code can be designed to be significantly more extensible than JVML. The paper explores the issues involved in designing such an extensible virtual machine (EVM), and reviews some recent research on formal techniques like type systems, logic frameworks, and analysis algorithms to show how an EVM can safely execute untrusted code.

Identifying a Unifying Mechanism for the Implementation of Concurrency Abstractions on Multi-language Virtual Machines

Lecture Notes in Computer Science, 2012

Supporting all known abstractions for concurrent and parallel programming in a virtual machines (VM) is a futile undertaking, but it is required to give programmers appropriate tools and performance. Instead of supporting all abstractions directly, VMs need a unifying mechanism similar to INVOKEDYNAMIC for JVMs. Our survey of parallel and concurrent programming concepts identifies concurrency abstractions as the ones benefiting most from support in a VM. Currently, their semantics is often weakened, reducing their engineering benefits. They require a mechanism to define flexible language guarantees. Based on this survey, we define an ownership-based meta-object protocol as candidate for VM support. We demonstrate its expressiveness by implementing actor semantics, software transactional memory, agents, CSP, and active objects. While the performance of our prototype confirms the need for VM support, it also shows that the chosen mechanism is appropriate to express a wide range of concurrency abstractions in a unified way.

Pointers and data abstractions in high level languages—I: Language proposals

Computer Languages, 1977

Recognizing the problems that the use of pointers pose to the construction of reliable software, this two-part paper proposes a scheme by which pointers may be used in a controlled manner to build data abstractions without being used as abstractions in their own right. Part I presents the language constructs facilitating the proposal. Part II (to be published in a forthcoming issue) attempts to show, by use of a fairly complex example, that proving the correctness of an implementation of an abstraction built in this manner from pointers need not be more difficult than other implementation correctness proofs.

Efficient Implementation of High-Level Languages on User-Level Communications Architectures

1994

User-level communication architectures -parallel architectures that give user code direct but protected access to the network -provide communication performance that is an order of magnitude higher than previous-generation message-passing architectures. Unfortunately, in order to take advantage of this level of performance, programmers must concern themselves with low-level issues that are often hardwaredependent (e.g., what primitives to use for large and small data transfers, and whether to use interrupts or polling). As a result, programs are difficult to design, implement, maintain, and port. New compiler and runtime system mechanisms are needed to allow programs written in high-level languages -languages where the programmer does not orchestrate communication -to achieve the full potential of user-level communication architectures. We propose a software architecture (compiler and runtime system) for implementing high-level languages with dynamic parallelism on user-level communication architectures. The compiler uses a simple runtime interface, and a new strategy called optimistic active messages to eliminate overhead due to context switching and thread creation. The runtime supports user-level message handlers and multithreading. We developed an implementation of the runtime for the CM-5; microbenchmarks demonstrate that our runtime has excellent base performance. We compare our compilation strategy and runtime with a portable runtime that uses traditional network interfaces. On our system, the microbenchmarks perform up to 30 times better; three hand-compiled applications run 10% to 50% faster. We also compare our approach on these applications with hand-crafted C programs that use active messages; the microbenchmarks perform within 25% of C, and almost all of the applications perform within a factor of two of C. By compiling high-level parallel languages to low-level communication primitives, we can achieve both high performance and ease of programming. Examples of high-level parallel languages include ABCL/f [34], Concert [24], HPF [20], Jade [30], Orca [5], and Prelude [38], just to name a few [6]

Cross-language, type-safe, and transparent object sharing for co-located managed runtimes

ACM SIGPLAN Notices, 2010

As software becomes increasingly complex and difficult to analyze, it is more and more common for developers to use high-level, type-safe, object-oriented (OO) programming languages and to architect systems that comprise multiple components. Different components are often implemented in different programming languages. In state-of-the-art multicomponent, multi-language systems, cross-component communication relies on remote procedure calls (RPC) and message passing. As components are increasingly co-located on the same physical machine to ensure high utilization of multi-core systems, there is a growing potential for using shared memory for cross-language cross-runtime communication. We present the design and implementation of Co-Located Runtime Sharing (CoLoRS), a system that enables cross-language, cross-runtime type-safe, transparent shared memory. CoLoRS provides object sharing for co-located OO runtimes for both static and dynamic languages. CoLoRS defines a language-neutral ob...

Constraining application behaviour by generating languages

2015

Our prototype platform targets the domain of mobile computing, and is implemented using Racket. It demonstrates resource access control (e.g., camera, address book, etc.) and tries to prevent leaking of private data. Racket is shown to be an extremely effective platform for designing new programming languages and their run-time libraries. We demonstrate that this approach allows reuse of an inter-component communication layer, is convenient for the application developer because it provides high-level building blocks to structure the application, and provides increased control to the platform owner, preventing certain classes of errors by the developer.

Channels: Runtime System Infrastructure for Security-Typed Languages

Twenty-Third Annual Computer Security Applications Conference (ACSAC 2007), 2007

Security-typed languages (STLs) are powerful tools for provably implementing policy in applications. The programmer maps policy onto programs by annotating types with information flow labels, and the STL compiler guarantees that data always obeys its label as it flows within an application. As data flows into or out of an application, however, a runtime system is needed to mediate between the information flow world within the application and the non-information flow world of the operating system. In the few existing STL applications, this problem has been handled in ad hoc ways that hindered software engineering and security analysis. In this paper, we present a principled approach to STL runtime system development along with policy infrastructure and class abstractions for the STL, Jif, that implement these principles. We demonstrate the effectiveness of our approach by using our infrastructure to develop a firewall application, FLOWWALL, that provably enforces its policy.

Language-neutral support of dynamic inheritance

2008

Virtual machines have been successfully applied in diverse scenarios to obtain several benefits. Application interoperability and distribution, code portability, and improving the runtime performance of programs are examples of these benefits. Techniques like JIT compilation have improved virtual machine runtime performance, becoming an adequate alternative to develop different types of software products. We have extended a production JIT-based virtual machine so they offer low-level support for structural reflection, in order to obtain the aforementioned advantages in dynamic languages implementation. As various dynamic languages offer support for dynamic inheritance, the next step in our research work is to enable this support in the aforementioned JIT-based virtual machine. Our approach enables dynamic inheritance in a language-neutral way, supporting both static and dynamic languages, so no language specification have to be modified to enable these features. It also enables static and dynamic languages to interoperate, since both types are now low-level supported by our machine.

Semantics-Driven Language Design:: Statically Type-Safe Virtual Types in Object-Oriented Languages

1999

The virtual class [15] construct was first introduced in the language Beta to provide added expressiveness when used with inheritance. Unfortunately, the virtual class construct in Beta is not statically type-safe. In this paper we show how a generalization of the semantics of object-oriented languages with a MyType construct leads to a variant of virtual classes which needs no run-time checks.

The Unavoidable Failure of Class-Based Languages in the Processor Cloud Era

2004

Classes are problematic in pervasive computing—systems we call “processor clouds”—where computers appear and disappear dynamically in a network. Problems with classes are mainly due to the dynamically distributed nature of these systems. The root cause of the problems is that the classinstance relationship is implicit. Two main manifestations are: state sharing vs. distribution conflicts, and inefficiencies caused by the binding of classes and their transitive closure to objects. The latter is worse in the case of ...