next up previous contents
Next: Exercise 15.1 Up: Comparison of Specification Languages Previous: The Data Type Invariant

Specification versus High Level Programming Languages

Notations for formally capturing specifications which allow a more abstract level of expression than that offered by a programming language are undoubtably essential in Software Engineering. But programming languages are formal languages, in that they have a precise syntax and semantics. The difference is that program languages are conceived primarily to express algorithms, and to do so efficiently with respect to computer space and time.

As VDM was developed in the 1970's, it is not surprising that some programming languages have data structuring facilities as least as powerful. For example, modern functional programming languages contain list comprehension, algebraic types, polymorphism and so on. If we limit VDM to explicitly defined functions then specifications are made executable by interpreting them as if they were expressions in a functional languages. The main difference of course is in the use of implicit specifications, which abstract away procedural details and therefore have no parallel in programming.

In a similar fashion, executable algebraic specification languages can be compared with modern functional programming languages. Both use a re-write rule model to execute functions; both allow types to be built up using constructor operations. The main difference is that specification language component data types can be structured in a way which emphasizes the formal properties of the specification, with the emphasis on axioms as mathematical objects rather than executable statements.



 
next up previous contents
Next: Exercise 15.1 Up: Comparison of Specification Languages Previous: The Data Type Invariant
Lee McCluskey
2002-12-18