## Specification Refinement with System F (1999)

Venue: | In Proc. CSL'99, volume 1683 of LNCS |

Citations: | 6 - 3 self |

### BibTeX

@INPROCEEDINGS{Hannay99specificationrefinement,

author = {Jo Erskine Hannay},

title = {Specification Refinement with System F},

booktitle = {In Proc. CSL'99, volume 1683 of LNCS},

year = {1999},

pages = {530--545},

publisher = {Springer}

}

### OpenURL

### Abstract

. Essential concepts of algebraic specification refinement are translated into a type-theoretic setting involving System F and Reynolds' relational parametricity assertion as expressed in Plotkin and Abadi's logic for parametric polymorphism. At first order, the type-theoretic setting provides a canonical picture of algebraic specification refinement. At higher order, the type-theoretic setting allows future generalisation of the principles of algebraic specification refinement to higher order and polymorphism. We show the equivalence of the acquired type-theoretic notion of specification refinement with that from algebraic specification. To do this, a generic algebraic-specification strategy for behavioural refinement proofs is mirrored in the type-theoretic setting. 1 Introduction This paper aims to express in type theory certain essential concepts of algebraic specification refinement. The benefit to algebraic specification is that inherently first-order concepts are tra...

### Citations

364 |
Types, abstraction and parametric polymorphism
- Reynolds
- 1983
(Show Context)
Citation Context ...ehavioural equivalence and stability. We will express this refinement framework in a type-theoretic environment comprised of System F and the assumption of relational parametricity in Reynolds' sense =-=[27, 18]-=-, as expressed in Plotkin and Abadi's logic for parametric polymorphism [24]. Abstract data types are expressed in the type theory as existential types. The above concepts of specification refinement ... |

143 | Toward formal development of programs from algebraic specifications: parameterisation revisited
- Sannella, Sokolowski, et al.
(Show Context)
Citation Context ...torssF : Sig SP 0 ! Sig SP of the form u:Sig SP 0 :unpack(u)(Sig SP )(X:x: Prof SP 0 [X ] : (packXx 0 )) for some x 0 : Prof SP [X ]. The concept of algebraic specification of algebras is extended in =-=[28]-=- to algebraic specifications of constructors. In the simple case, we can extend our translation in Def. 1 to this framework. Example 8. An algebraic specification of Example 3's Tr , can be given by \... |

124 | A logic for parametric polymorphism
- Plotkin, Abadi
- 1993
(Show Context)
Citation Context ...c specifications. 3 The Type Theory We now sketch the logic in [24, 19] for parametric polymorphism on System F. It is this accompanying logic that bears an extension rather than the type theory. See =-=[1]-=- for a more internalised approach. System F has types and terms as follows. T ::= X j T ! T j 8X:T t ::= x j x:T:t j tt j X:t j tT where X and x range over type and term variables resp. However, formu... |

121 |
Parameterized Programming
- Goguen
- 1983
(Show Context)
Citation Context ...roughout the remainder of the refinement process. It is convenient to lay aside the fully refined parts and continue development on the remaining unresolved parts only. Letsbe a parameterised program =-=[9]-=- with input interface SP j+1 and output interface SP j . Given a programsP that is a full refinement of SP j+1 , the instantiation (P ) is then a full refinement of SP j . The semantics of a parameter... |

66 | On observational equivalence and algebraic specification
- Sannella, Tarlecki
- 1987
(Show Context)
Citation Context ... s for s 2 In and ; otherwise. Two \Sigma -algebras A and B are observationally equivalent w.r.t. Obs ; In, written A j Obs;In B, if every observable computation has equivalent denotations in A and B =-=[29]-=-. However, the semanticss[[SP ]] is not always closed under behavioural equivalence. For example, the stack-with-pointer implementation of stacks of natural numbers does not satisfy pop(push(x; s)) = ... |

55 | Essential Concepts of Algebraic Specification and Program Development
- Sannella, Tarlecki
- 1997
(Show Context)
Citation Context ...bstract descriptions of processes and data types are methodically refined to concrete executable descriptions, viz. programs and program modules. In this paper we base ourselves on the description in =-=[31, 30]-=-, and we highlight three essential concepts that make this account of specification refinement apt for real-life development. These are so-called constructorsimplementations, behavioural equivalence a... |

55 |
A kernel language for algebraic specification and implementation
- Sannella, Wirsing
(Show Context)
Citation Context ...a full refinement or realisation of an abstract specification. The basic definition of refinement we adopt here is given by the following refinement relation ; on specifications of the same signature =-=[30, 32]-=-: SP j ;SP j+1 def () [[SP j ]] ' [[SP j+1 ]]. There are two indispensable refinements as it were, of the refinement relation. One introduces constructors, the other involves behavioural abstraction. ... |

44 |
Automatic synthesis of typed -programs on term algebras. TCS
- Bohm, Berarducci
- 1985
(Show Context)
Citation Context ...se of [21]. From this we also get ` ; 8Z:8u:9X:T [X; Z]:9A:9a:T [A; Z] : u = (packA a) Weak versions of standard constructs such as products, initial and final (co-)algebras are encodable in System F =-=[8]-=-. With Param, these constructs are provably universal constructions. We can e.g. freely use product types. Given ae aeA\ThetaB and ae 0 aeA 0 \ThetaB 0 , (ae\Thetaae) is defined as the action (X \Thet... |

42 |
Data Abstraction and the Correctness of Modular Programming
- Schoett
- 1987
(Show Context)
Citation Context ...= Obs. In fact In = Obs is virtually always a sensible choice, and a very reasonable simplifying assumption. Behavioural refinement steps are in general hard to verify. A helpful concept is stability =-=[33]-=-. A constructor [[]] is stable if A j Obs 0 ;In 0 B ) [[]](A) j Obs;In [[]](B). Under stability, it suffices for proving hSP j ; Obs ; Ini ; \Omega SP j+1 ; Obs 0 ; In 0 ff , to show that [[[SP j ]]] ... |

40 |
Foundations for Programming Languages. Foundations of Computing series
- Mitchell
- 1996
(Show Context)
Citation Context ... ` ; 8A; B:8a:T [A]; b:T [B] : 9R aeA \Theta B : a(T [R])b , V C2Obs 8f:8X:(T [X ] ! C) : (fA a) = (fB b) Proof: ): This follows from Param. (: We must exhibit an R such that a(T [R])b. Semantically, =-=[22, 33]-=- define a relation between elements iff they are denotable by some common term. We mimic this: Give R def = (a:A; b: B):(9f:8X:(T [X ] ! X):(fA a) = as(fB b) = b). We must now derive a(T [R])b, i.e. f... |

36 | The definition of Extended ML: A gentle introduction
- Kahrs, Sannella, et al.
- 1997
(Show Context)
Citation Context ...top(push(x; s)) = x We omit universal quantification over free variables in examples. The semantics of a data type (in a program) is an algebra. Wide-spectrum specification languagesse.g. Extended ML =-=[14]-=-, allow specifications and programs to be written in a uniform language, so that specifications are abstract descriptions of a data type or systems of data types, while program modules and programs ar... |

34 |
Behavioural and abstractor specifications
- Bidoit, Hennicker, et al.
- 1995
(Show Context)
Citation Context ...ays an essential role. It gives the equivalence at first order of observational equivalence to equality at existential type. In algebraic specification there is a generic proof strategy formalised in =-=[6, 4, 5]-=- for proving observational refinements. This considers axiomatisations of so-called behavioural (partial) congruences. As also observed in [25], Plotkin and Abadi's logic is not sufficient to accommod... |

34 |
On the equivalence of data representations
- Mitchell
- 1991
(Show Context)
Citation Context ...]:9R aeA \Theta B : u = (packAa)sv = (packBb)sa(T [R; eq Z ])b The sequent in Fact 2 states the equivalence of equality at existential type with the existence of a simulation relation in the sense of =-=[21]-=-. From this we also get ` ; 8Z:8u:9X:T [X; Z]:9A:9a:T [A; Z] : u = (packA a) Weak versions of standard constructs such as products, initial and final (co-)algebras are encodable in System F [8]. With ... |

32 | Behavioural theories and the proof of behavioural properties
- Bidoit, Hennicker
- 1996
(Show Context)
Citation Context ...ays an essential role. It gives the equivalence at first order of observational equivalence to equality at existential type. In algebraic specification there is a generic proof strategy formalised in =-=[6, 4, 5]-=- for proving observational refinements. This considers axiomatisations of so-called behavioural (partial) congruences. As also observed in [25], Plotkin and Abadi's logic is not sufficient to accommod... |

29 |
Universal algebra in higher types
- Meinke
- 1992
(Show Context)
Citation Context ...guage, and [34] promoting dependent types in specification. Only [25] utilises relational parametricity. There are also non-type-theoretic higher-order approaches using higher-order universal algebra =-=[20]-=-, and other set-theoretic models [16]. The next section outlines algebraic specification refinement, highlighting the three essential concepts above. Then, the translation of algebraic specification r... |

27 | Outline of a proof theory of parametricity
- Mairson
- 1991
(Show Context)
Citation Context ... specification building operators, e.g. [36, 32, 37]. But as a starting point for the translation into type theory, we only consider basic specifications. 3 The Type Theory We now sketch the logic in =-=[24, 19]-=- for parametric polymorphism on System F. It is this accompanying logic that bears an extension rather than the type theory. See [1] for a more internalised approach. System F has types and terms as f... |

26 | Prelogical relations
- Honsell, Sannella
- 2002
(Show Context)
Citation Context ...roof of Lemma 4. At higher-order, one could try altering the relational proof criteria by incorporating explicit definability clauses. This is reminiscent of recent approaches on the semantical level =-=[15, 13]-=-. Acknowledgements Thanks are due to Martin Hofmann, Don Sannella, and the referees for helpful comments and suggestions. This research has been supported by EPSRC grant GR/K63795, and NFR (Norwegian ... |

25 | On behavioural abstraction and behavioural satisfaction in higher-order logic
- Hofmann, Sannella
- 1996
(Show Context)
Citation Context ...) = us\Phi 0 [A; a]. Let a and A denote the witnesses projected out from that assumption. Now, Beh is in general infinitary. However, with higher-order logic one gets a finitary Beh equivalent to Beh =-=[12]-=-. Thus we formstype-theoretically by def = (a: A; a 0 : A):(Beh A (a; a 0 )). Sincesis an axiomatisation of a partial congruence, we have a T [] a. We use Sub to get SA , s a ands0 ae SA \Theta SA and... |

22 |
Proof systems for structured specifications with observability operators
- Hennicker, Wirsing, et al.
(Show Context)
Citation Context ...ays an essential role. It gives the equivalence at first order of observational equivalence to equality at existential type. In algebraic specification there is a generic proof strategy formalised in =-=[6, 4, 5]-=- for proving observational refinements. This considers axiomatisations of so-called behavioural (partial) congruences. As also observed in [25], Plotkin and Abadi's logic is not sufficient to accommod... |

19 |
Structured specifications: Syntax, semantics and proof calculus
- Wirsing
(Show Context)
Citation Context ... the abstraction barrier by checking equality on the underlying implementation. d Algebraic specifications may be complex, built from basic specifications using specification building operators, e.g. =-=[36, 32, 37]-=-. But as a starting point for the translation into type theory, we only consider basic specifications. 3 The Type Theory We now sketch the logic in [24, 19] for parametric polymorphism on System F. It... |

18 | An axiomatic approach to binary logical relations with applications to data refinement
- Kinoshita, O’Hearn, et al.
- 1997
(Show Context)
Citation Context ...roof of Lemma 4. At higher-order, one could try altering the relational proof criteria by incorporating explicit definability clauses. This is reminiscent of recent approaches on the semantical level =-=[15, 13]-=-. Acknowledgements Thanks are due to Martin Hofmann, Don Sannella, and the referees for helpful comments and suggestions. This research has been supported by EPSRC grant GR/K63795, and NFR (Norwegian ... |

17 |
Type Systems for Modular Programs and Specifications
- Aspinall
- 1997
(Show Context)
Citation Context ...k linking algebraic specification and type theory includes [17] encoding constructor implementations in ECC, [26] expressing module-algebra axioms in ECC, [23] encoding behavioural equalities in UTT, =-=[2]-=- treating the specification language ASL+, [35] using Nuprl as a specification language, and [34] promoting dependent types in specification. Only [25] utilises relational parametricity. There are als... |

17 |
Structural specifications with behavioural operators: semantics, proof methods and applications
- Hennicker
- 1997
(Show Context)
Citation Context ...s on another as yet undeveloped data type. On the other hand, letting all sorts be input sorts would disallow intuitively feasible behavioural refinements as illustrated in the following example from =-=[10]-=-. Example 2. Consider the following specification of sets of natural numbers. spec Set is sorts nat; set operators empty : set; add : nat \Theta set ! set in : nat \Theta set ! bool; remove : nat \The... |

17 | A simple model for quotient types
- Hofmann
- 1995
(Show Context)
Citation Context ..., where domA ( Obs;In ) s def = fa 2 A s j asObs;In ag. This proof method is not available in the type theory and logic of [24]. One remedy would be to augment the type theory by quotient types, e.g. =-=[11]-=-, and subset types. However, for its simplicity and because it complies to existing proof techniques in algebraic specification, we adapt an idea from [25] where the logic is augmented with an axiom s... |

13 |
Algebraic Specification Languages: An Overview
- Wirsing
- 1995
(Show Context)
Citation Context ... the abstraction barrier by checking equality on the underlying implementation. d Algebraic specifications may be complex, built from basic specifications using specification building operators, e.g. =-=[36, 32, 37]-=-. But as a starting point for the translation into type theory, we only consider basic specifications. 3 The Type Theory We now sketch the logic in [24, 19] for parametric polymorphism on System F. It... |

6 |
A logic for abstract data types as existential types
- Poll, Zwanenburg
- 1999
(Show Context)
Citation Context ...e logic of [24]. These axioms are tailored to suit refinement proof purposes. One could alternatively derive them from more fundamental and general axioms. Definition 4 (Existence of Quotients (Quot) =-=[25]-=-). ` ; 8X:8x:T [X ]:8R aeX \Theta X : (x T [R] xsequiv(R)) ) 9Q:9q:T [Q]:9epi:X ! Q : 8x; y:X : xRy , (epi x) =Q (epi y)s8q:Q:9x:X : q =Q (epi x)sx (T [(x: X; q: Q):((epi x) =Q q)]) q where equiv (R) ... |

6 | Verifying properties of module construction in type theory
- Reus, Streicher
- 1993
(Show Context)
Citation Context ...ur results complement those of [25] in that we consider also partial congruences. Other work linking algebraic specification and type theory includes [17] encoding constructor implementations in ECC, =-=[26]-=- expressing module-algebra axioms in ECC, [23] encoding behavioural equalities in UTT, [2] treating the specification language ASL+, [35] using Nuprl as a specification language, and [34] promoting de... |

5 |
Dependent types considered necessary for specification languages
- Streicher, Wirsing
- 1990
(Show Context)
Citation Context ...ions in ECC, [26] expressing module-algebra axioms in ECC, [23] encoding behavioural equalities in UTT, [2] treating the specification language ASL+, [35] using Nuprl as a specification language, and =-=[34]-=- promoting dependent types in specification. Only [25] utilises relational parametricity. There are also non-type-theoretic higher-order approaches using higher-order universal algebra [20], and other... |

5 |
Typing abstract data types
- Underwood
- 1994
(Show Context)
Citation Context ...ory includes [17] encoding constructor implementations in ECC, [26] expressing module-algebra axioms in ECC, [23] encoding behavioural equalities in UTT, [2] treating the specification language ASL+, =-=[35]-=- using Nuprl as a specification language, and [34] promoting dependent types in specification. Only [25] utilises relational parametricity. There are also non-type-theoretic higher-order approaches us... |

4 |
Behavioural specifications in type theory
- Mylonakis
- 1995
(Show Context)
Citation Context ... consider also partial congruences. Other work linking algebraic specification and type theory includes [17] encoding constructor implementations in ECC, [26] expressing module-algebra axioms in ECC, =-=[23]-=- encoding behavioural equalities in UTT, [2] treating the specification language ASL+, [35] using Nuprl as a specification language, and [34] promoting dependent types in specification. Only [25] util... |

3 |
Program specification and data type refinement in type theory
- Luo
- 1993
(Show Context)
Citation Context ...tation is also interesting in its own right, and our results complement those of [25] in that we consider also partial congruences. Other work linking algebraic specification and type theory includes =-=[17]-=- encoding constructor implementations in ECC, [26] expressing module-algebra axioms in ECC, [23] encoding behavioural equalities in UTT, [2] treating the specification language ASL+, [35] using Nuprl ... |

2 | Algebraic specifications, higher-order types, and set-theoretic models
- Kirchner, Mosses
- 1998
(Show Context)
Citation Context ...ypes in specification. Only [25] utilises relational parametricity. There are also non-type-theoretic higher-order approaches using higher-order universal algebra [20], and other set-theoretic models =-=[16]-=-. The next section outlines algebraic specification refinement, highlighting the three essential concepts above. Then, the translation of algebraic specification refinement into a System F environment... |