
Systematic techniques for dealing with concurrency can be very helpful in concurrent programming. In his concurrent programming text, Andrews [2] describes a technique for developing concurrent programs based on first developing solutions using course-grained atomic commands and atomic await primitives (which are usually not available in real programming environments), then systematically transforming the solution to an implementation that uses available synchronization primitives. Transformations are known for semaphores, conditional critical regions, and monitors. In this paper, transformations are given for the synchronization constructs provided by the Java programming language [1]. Familiarity with the basic facilities to support concurrency provided by Java is assumed.
The software engineering industry suffers from almost unmanageable complexity both in the products it produces and in the processes of production. One of the current shortcomings in the software production process is the weakness of the models used. This paper makes observations on the role of knowledge in engineering and examines the central role of models and simulation. We develop an argument for the application of certain new forms of modelling methods in software engineering in order to impose more discipline and give a principled framework for building models that can support the software life-cycle. The concept of a model is examined in depth and different characteristics and types of model are defined. This introduces the relatively new concept of qualitative models and their use in the field known as model-based reasoning. Unlike previous knowledge-based methods, model-based reasoning has several important advantages. Although very few modelbased software projects exist, we illustrate how this approach can be developed by drawing on applications from traditional engineering. It is argued that, because qualitative modelling offers great power for addressing the issue of complexity, such models have considerable potential as high-level abstractions of software products. These could form the core of tools for the management and support of the software development process through the whole product life-cycle.
A number of applications in simulation and software testing require random number generation, both uniform and non-uniform. Although libraries are available for random number generation, there is no user-friendly tool to enable the user to use and build random number generators. This paper presents the RVGEN tool, developed at TRDDC. Using the tool, the software developer can design a random number generator specific to a particular pattern. The tool takes specifications at a high level and also partly in C++, and generates C++ code for a number of user-friendly functions. These include setting and getting of random variate parameters, GUIs for inputting parameters, validation of parameters, parameter input and output from a file, generation of random variate class declarations, generation of seeds for multiple streams, and testing of the random variate generator. The tool provides a number of classical, generalpurpose and empiric distributions by default.
We reveal a grey area in the specification of Java and of its implementation through the Java Virtual Machine (JVM): the treatment of initialization of classes and interfaces. We report the results of our experiments with different implementations of Java, which confirm the theoretical prediction of our work on mathematical models for Java [4] and the JVM [3], namely that the designers of Java and the JVM have used notions of initialization which do not match and which afflict the portability of Java programs. We also show that concurrent initialization may deadlock and that various current Java compilers violate the initialization semantics through standard optimization techniques.
The refinement calculus is a well-established theory for formal development of imperative program code and is supported by a number of automated tools. Via a detailed case study, this article shows how refinement theory and tool support can be extended for a program with real-time constraints. The approach adapts a timed variant of the refinement calculus and makes corresponding enhancements to a theorem-prover based refinement tool.