523 research outputs found

    Implementing a smalltalk to Java translator

    Get PDF
    A number of essential issues in translating Smalltalk to Java are addressed. The fIrst chapter gives a brief overview of Smalltalk and Java with respect to the relevant language features that will be translated. In the next section a convention is proposed for mapping Smalltalk method selectors to Java method names. The dynamic nature of Smalltalk instance methods is compared with Java's static type model as well as a solution to simulate the dynamic nature of Smalltalk in Java. A Java class hierarchy that parallels the Smalltalk class hierarchy (including the metaclass objects) is suggested. A further proposal is given for translating the dynamic attributes of Smalltalk class methods to the same behaviour to Java. These proposals are used to support ways of mapping both Smalltalk instance methods, as well as Smalltalk class methods to their Java counterparts. Ways of translating Smalltalk class variables, Smalltalk class instance variables and Smalltalk global variables are illustrated. A method for translating Smalltalk blocks to Java inner classes is implemented using Java exceptions to unwind the call stack. Various types of Small talk blocks are translated with increasing complexity. The various types of blocks translated are simple blocks; blocks with references to variables in the enclosing context; blocks with block arguments; blocks that need to refer to their own context executed from other contexts; blocks with multiple exit points as well as nested blocks. Some performance tests to illustrate the impact of using exceptions in Java are also reported. The next section introduces the Small talk grammar with the necessary productions used to implement a parser. Lexical and syntax analysis are explained. A brief overview of a recursive descent parser is given where an example of Smalltalk source code is parsed and all the relevant parse nodes illustrated. The encoding in each parse node to Java source is shown. The last section focuses on similar initiatives being pursued and compares the solutions in the dissertation against them. This dissertation focuses on key areas of the Smalltalk to Java translation process, but a few peculiar and unique Smalltalk features are not addressed. These are discussed in the last section and some suggestions are made on how the translations can be achieved.Dissertation (MSc (Computer Science))--University of Pretoria, 2006.Computer Scienceunrestricte

    The 14th Overture Workshop: Towards Analytical Tool Chains

    Get PDF
    This report contains the proceedings from the 14th Overture workshop organized in connection with the Formal Methods 2016 symposium. This includes nine papers describing different technological progress in relation to the Overture/VDM tool support and its connection with other tools such as Crescendo, Symphony, INTO-CPS, TASTE and ViennaTalk

    Waterfall: Primitives Generation on the Fly

    No full text
    Modern languages are typically supported by managed runtimes (Virtual Machines). Since VMs have to deal with many concepts such as memory management, abstract execution model and scheduling, they tend to be very complex. Additionally, VMs have to meet strong performance requirements. This demand of performance is one of the main reasons why many VMs are built statically. Thus, design decisions are frozen at compile time preventing changes at runtime. One clear example is the impossibility to dynamically adapt or change primitives of the VM once it has been compiled. In this work we present a toolchain that allows for altering and configuring components such as primitives and plug-ins at runtime. The main contribution is Waterfall, a dynamic and reflective translator from Slang, a restricted subset of Smalltalk, to native code. Waterfall generates primitives on demand and executes them on the fly. We validate our approach by implementing dynamic primitive modification and runtime customization of VM plug-ins

    A Pure Java Parallel Flow Solver

    Get PDF
    In this paper an overview is given on the "Have Java" project to attain a pure Java parallel Navier-Stokes flow solver (JParNSS) based on the thread concept and remote method invocation (RMI). The goal of this project is to produce an industrial flow solver running on an arbitrary sequential or parallel architecture, utilizing the Internet, capable of handling the most complex 3D geometries as well as flow physics, and also linking to codes in other areas such as aeroelasticity etc. Since Java is completely object-oriented the code has been written in an object-oriented programming (OOP) style. The code also includes a graphics user interface (GUI) as well as an interactive steering package for the parallel architecture. The Java OOP approach provides profoundly improved software productivity, robustness, and security as well as reusability and maintainability. OOP allows code construction similar to the aerodynamic design process because objects can be software coded and integrated, reflecting actual design procedures. In addition, Java is the programming language of the Internet and thus Java is the programming language of the Internet and thus Java objects on disparate machines or even separate networks can be connected. We explain the motivation for the design of JParNSS along with its capabilities that set it apart from other solvers. In the first two sections we present a discussion of the Java language as the programming tool for aerospace applications. In section three the objectives of the Have Java project are presented. In the next section the layer structures of JParNSS are discussed with emphasis on the parallelization and client-server (RMI) layers. JParNSS, like its predecessor ParNSS (ANSI-C), is based on the multiblock idea, and allows for arbitrarily complex topologies. Grids are accepted in GridPro property settings, grids of any size or block number can be directly read by JParNSS without any further modifications, requiring no additional preparation time for the solver input. In the last section, computational results are presented, with emphasis on multiprocessor Pentium and Sun parallel systems run by the Solaris operating system (OS)

    Compiling a simulation language in APL

    Full text link
    This is the author's version of the work. It is posted here for your personal use. Not for redistribution. The definitive Version of Record was published in APL Quote Quad, http://dx.doi.org/10.1145/327600.327625This paper describes the procedure used to build several compilers, written in APL and APL2, to translate two continuous simulation languages into APL and C++. The advantages and disadvantages of using APL to write a compiler are discussed. A compromise had to be found between performance (the model execution speed) and flexibility (the ease to modify parameters and test "what if" situations). The resulting compiler (an APL2 packaged workspace) has been used successfully to generate educational applications and in medical research.This paper has been sponsored by the Spanish Interdepartmental Commission of Science and Technology (CICYT), project number TIC-96-0723-C02-01

    Actor-based Concurrency in Newspeak 4

    Get PDF
    Actors are a model of computation invented by Carl Hewitt in the 1970s. It has seen a resurrection of mainstream use recently as a potential solution to the latency and concurrency that are quickly rising as the dominant challenges facing the software industry. In this project I explored the history of the actor model and a practical implementation of actor-based concurrency tightly integrated with non-blocking futures in the E programming language developed by Mark Miller. I implemented an actor-based concurrency framework for Newspeak that closely follows the E implementation and includes E-style futures and deep integration into the programming language via new syntax for asynchronous message passing

    An object-oriented continuous simulation language and its use for training purposes

    Full text link
    This is an electronic version of the paper presented at the SESP '98 - 5th International Workshop on Simulation for European Space Programmes, on 3-5 November 1998, held in Noordwijk (Holland)This paper describes a language designed to write and generate object-oriented simulation code. The language is called OOCSMP, an object-oriented extension of the CSMP simulation language, also extended to solve partial differential equations using different methods. Programs are automatically translated into C++ and JAVA. Graphical user interfaces are automatically generated for various operating systems. The procedure is demonstrated by the implementation of models of gravitation as applied to the solar system and different satellite systems.This paper has been sponsored by the Spanish Interdepartmental Commission of Science and Technology (CICYT), project numbers TIC-96-0723-C02-01 and TEL97-0306

    Building and Using Object-Oriented Frameworks for Semi-Structures Domains: The Sales Promotion Domain as Example

    Get PDF
    Object-oriented (00) frameworks are considered an important step forward in developing software applications efficiently. Success of frameworks has however predominantly been limited to structured domains.This paper describes a method for developing 00 domainframeworks for semi-structured domains. The complexityof such domains requires the use of more elaborate analysis and design techniques than those normallyused in 00 analysis and design. In the method describedhere, the knowledge of domain experts forms the basis for developing the framework. The 00 framework is constructed on the design level using a CASE-tool.Using the design model, the framework can be customized and extended to develop a variety of applicationsfor the domain. The approach is illustrated by developing a framework for the sales-promotions domain,and using this framework to build an application for product managers. It is concluded that the approach described here is beneficial to build and use 00 frameworksfor semi-structured domains

    Bridging the Gap between Machine and Language using First-Class Building Blocks

    Get PDF
    High-performance virtual machines (VMs) are increasingly reused for programming languages for which they were not initially designed. Unfortunately, VMs are usually tailored to specific languages, offer only a very limited interface to running applications, and are closed to extensions. As a consequence, extensions required to support new languages often entail the construction of custom VMs, thus impacting reuse, compatibility and performance. Short of building a custom VM, the language designer has to choose between the expressiveness and the performance of the language. In this dissertation we argue that the best way to open the VM is to eliminate it. We present Pinocchio, a natively compiled Smalltalk, in which we identify and reify three basic building blocks for object-oriented languages. First we define a protocol for message passing similar to calling conventions, independent of the actual message lookup mechanism. The lookup is provided by a self-supporting runtime library written in Smalltalk and compiled to native code. Since it unifies the meta- and base-level we obtain a metaobject protocol (MOP). Then we decouple the language-level manipulation of state from the machine-level implementation by extending the structural reflective model of the language with object layouts, layout scopes and slots. Finally we reify behavior using AST nodes and first-class interpreters separate from the low-level language implementation. We describe the implementations of all three first-class building blocks. For each of the blocks we provide a series of examples illustrating how they enable typical extensions to the runtime, and we provide benchmarks validating the practicality of the approaches
    corecore