page 1  (21 pages)
2to next section

SimPOL: Language and Translator for Object-Oriented Process Simulation

Brian A. Malloy, Mary Jean Harrold and John D. McGregor

Department of Computer Science

Clemson University

Clemson, SC 29634-1906


We present our new system for object-oriented process simulation, called SimPOL, that consists of two main components. The first component is the SimPOL language that incorporates simulation constructs into C++, an existing general-purpose object-oriented language, to produce a new language that is an extension of C++. The SimPOL language permits the user to construct a program for simulation modeling using simulation primitives like those in SIMULA. The second component is the SimPOL translator that translates the SimPOL language program into a C++ program by transforming the actions of each entity in the model into a process. A base class from which each of the simulation classes inherits, provides the simulation primitives to the user's classes. We have implemented a prototype of the SimPOL translator that demonstrates the usefulness and portability of SimPOL. The main benefit of our approach is the ease of simulation programming that it provides to the user because the simulation primitives required to model processes can be learned quickly by any C++ programmer. Another important benefit of our approach over previous approaches is that our preprocessor can be used with any existing C++ compiler and is therefore, truly portable. Since C++ is the most widely used object-oriented language, SimPOL will be of use to a large portion of the modeling community.

Keywords: C++, modeling, object-oriented design, process-oriented simulation.

1 Introduction

Simulation is an important application of computer science that uses a model to mimic the behavior of a

system. For example a factory floor assembly line may be simulated to calculate the mean cycle time of

producing a workpiece, or a medical office may be simulated to determine the average time that a patient

must wait to see a doctor. One way to facilitate simulation programming is to use special-purpose simu-

lation languages. Although many special-purpose simulation languages, such as SIMULA[11, 17], GPSS[26],

SIMSCRIPT[12] and SLAM[24], have been developed, none has emerged as the language for simulation mod-

eling. There are a number of possible reasons for this: the expense of compilers for these special-purpose

languages, the need to integrate the simulation model into a system written in a general-purpose language,

and the resistance of programmers to learn a new language of limited applicability. Thus, general-purpose

languages may be more appropriate for simulation programming[3, 5] as long as the underlying system can

be modeled with the language.

We use an alternate approach to modeling a system that exploits the generality" provided by a general-

purpose language by extending an existing language to include simulation facilities. We have developed a

new system, called SimPOL1, for object-oriented process simulation that consists of two main components.

The first component is the SimPOL language that incorporates simulation constructs into C++, an existing,

1SimPOL is pronounced simple.