Mind the gap! Abstract versus concrete models of specifications [chapter]

Donald Sannella, Andrzej Tarlecki
1996 Lecture Notes in Computer Science  
In the theory of algebraic specifications, many-sorted algebras are used to model programs: the representation of data is arbitrary and operations are modelled as ordinary functions. The theory that underlies the formal development of programs from specifications takes advantage of the many useful properties that these models enjoy. The models that underlie the semantics of programming languages are different. For example, the semantics of Standard ML uses rather concrete models, where data
more » ... es are represented as closed constructor terms and functions are represented as "closures". The properties of these models are quite different from those of many-sorted algebras. This discrepancy brings into question the applicability of the theory of specification and formal program development in the context of a concrete programming language, as has been attempted in the Extended ML framework for the formal development of Standard ML programs. This paper is a preliminary study of the difference between abstract and concrete models of specifications, inspired by the kind of concrete models used in the semantics of Standard ML, in an attempt to determine the consequences of the discrepancy. Proposition 2.2 The familiesS = recursives ⊆ N s∈S , [·] = [·] s :s → |A| s s∈S andΩ = partial recursivef :s 1 ×· · ·×s n s f:s 1 ×···×sn→s∈Ω form a modest Σ-algebra A over a partial Σ-algebra A iff [·] :Ā → A is a surjective Σ-homomorphism, wherē A is the partial Σ-algebra with carriersS and operationsΩ. This means that we can view any modest algebra A as a surjective homomorphism fromĀ to |A|, and vice versa. It also says that one may viewĀ as a concrete implementation of |A|, with [·] as the so-called "abstraction function" [Hoa72]. Corollary 2.3 LetĀ together with [·] form a modest Σ-algebra over A. If j : A → B is a surjective Σ-homomorphism thenĀ together with j • [·] :Ā → B forms a modest Σ-algebra over B.
doi:10.1007/3-540-61550-4_143 fatcat:al6t4ovhqjhnbon7i6rhnaloje