Automated rapid prototyping of TUG specifications using Prolog
Introduction
Rapid prototyping has been used for exploring vague user requirements in the front-end of the software life cycle. When the vague user requirements are understood, the prototype is thrown away. Therefore, a throwaway prototype should be built quickly and cheaply. Manual rapid prototyping methods are not cost effective for building throwaway prototypes. Automated rapid prototyping may reduce the cost of prototyping and the time of developing it. One automated rapid prototyping technique is the direct execution of a specification. Direct execution of a specification has the benefits of quick construction of the prototype, direct support for formal specifications, and quick response to the specification changes. However, existing formal specification languages still have difficulties in specifying software systems such as non-functional behavior of the systems. For non-executable formal specification languages, a prototype may be derived from the specification via software transformations. Automatic rapid prototyping has its benefits; however, it also has the problems. The use of a prototype depends on the capability of its specification. In addition, rederivation of prototypes from scratch may not be efficient if the specification is large.
Our approach to rapid prototyping uses a formal specification language to automatically generate a prototype in Prolog via a set of software transformation rules. Because there is a direct correspondence between the language and Prolog, the transformation is mechanical and straightforward. Specifiers can concentrate on generating the prototype without the distraction of transforming one notation into another. In order to avoid the rederivation of the entire prototype from scratch, we allow the prototype to be updated only in response to the revised specification. Nevertheless, if there is a major change in the specification, a new prototype is suggested to be regenerated from scratch. Like other existing formal specification languages, our formal specification language may not provide enough abstractions for prototyping some particular features of systems. Therefore, our approach is designed to support the derived prototype to be extended or modified in a modular manner. The specification is written in modules in terms of the language patterns that support module independence, the prototype is then derived in a modular way that supports the ease of modifications to the prototype.
The remainder of this paper is organized as follows. Related work that has influenced our approach is presented. The specification language used for automated rapid prototyping is described and the rapid prototyping process via the language is outlined. The software transformation rules used for the derivation of prototypes in Prolog are presented. The use of the approach is demonstrated with an example system. Finally, the strengths, limitations, and future research are explored.
Section snippets
Related work
An executable specification language can be exercised as a prototype that enables user requirements to be explored, formulated, and analyzed in the software requirements and specification phase. When used as rapid prototyping technique, the behavior of the software system interacting with its environment can be demonstrated and observed before it exists in production quality form. After the validation of the specification, the specification can form a formal document for all phases of software
Description of TUG
The TUG specification language consists of three parts: a name part where the title with input/output parameters are given, an analysis part where the input data is defined, and an anatomy part where the output data is generated.
The name part contains a module or scheme title with input/output parameters. The input/output parameters are enclosed in parentheses. The analysis part contains the rules for analyzing the input data. To analyze the input data, DCGs are used to represent the rules to
Rapid prototyping process via software transformations
The idea of prototyping via software transformations is not new [4], [33]. However, an automatic rapid prototyping approach should avoid a prototype to be rederived from scratch whenever there is a change in the specification. Also, the automated approach should allow developers to easily extend the functions of the prototype manually in case the specification language does not support abstractions for features needed for demonstration. A rapid prototyping approach via software transformations
A telegram analysis problem
This section illustrates the usage of TUG by means of a telegram analysis problem. A specification in TUG is formalized incrementally in a modular and top-down manner. The example also illustrates how the language supports module independence via the language patterns. The telegram analysis problem is specified informally in Ref. [28]:
A program is required to process a stream of telegrams. This stream is available as a sequence of letters, digits and blanks on some device and can be transferred
Discussion
An approach was developed to support rapid prototyping via software transformations by deriving a prototype in Prolog from a specification in TUG. We did not directly use the Prolog language to specify user requirements. Programming languages more or less concentrate on how rather than what and are generally unsuitable for specification purposes. In addition, a specification in Prolog lacks modularity in contrast to a specification in TUG. Since the main purpose of a specification is to aid the
Summary, contributions, and future research
Rapid prototyping via software transformations helps build prototypes automatically from specifications. In this paper, a formal method with TUG was presented to support the rapid prototyping via software transformations process in which a prototype can be built quickly and cheaply. Automation of the application of software transformations reduces the labor intensity of developing prototypes manually. Rapid prototyping via software transformations also provides support for prototype
References (48)
Specification aspects of VDM
Information and Software Technology
(April 1988)- et al.
A larch shared language handbook
Science of Computer Programming
(1986) - et al.
Definite clause grammars for language analysis
Artificial Intelligence
(1980) - et al.
Logical programming for the telegram analysis problem
Computer Languages
(1987) - et al.
A framework for the specification of reactive and concurrent systems in Z
- et al.
Algebraic Specification
(1989) - et al.
Using transformations in specification-based prototyping
IEEE Transactions on Software Engineering
(May 1993) - et al.
Asspegique: an integrated environment for algebraic specifications
(1985) - et al.
VDM’87: VDM—A Formal Method at Work
(1987)
Temporal logic-based deadlock analysis for Ada
IEEE Transactions on Software Engineering
Object-Z: an object-oriented extension to Z
Formal verification of concurrent programs using the larch prover
IEEE Transaction on Software Engineering
Scalable templates for specification reuse
Validating software specifications against user claims
Programming in Prolog
Operational prototyping: a new development approach
IEEE Software
Computer aided transformation of Z into Prolog
Z: An Introduction to Formal Methods
Visualizing concurrent Z specifications
Specifications are (preferably) executable
Software Engineering Journal
Rapid prototyping in the OBJ specification language
ACM SIGSOFT, Software Engineering Notes
Parameterized programming
IEEE Transactions on Software Engineering
Executing formal specifications need not be harmful
Software Engineering Journal
Cited by (3)
A language for writing formal software specifications: The library problem revisited
2006, Proceedings - Third International Conference onInformation Technology: New Generations, ITNG 2006Management of innovation in network industries: The mobile internet in Japan and Europe
2006, Management of Innovation in Network Industries: The Mobile Internet in Japan and EuropeAn introduction to TUG: A language for writing reusable formal program specifications
2005, International Conference on Information Technology: Coding and Computing, ITCC