## Type class polymorphism in an institutional framework (2005)

### Cached

### Download Links

- [www.informatik.uni-bremen.de]
- [www.informatik.uni-bremen.de]
- [www.informatik.uni-bremen.de]
- DBLP

### Other Repositories/Bibliography

Venue: | IN JOSÉ FIADEIRO, EDITOR, 17TH WADT, LECTURE NOTES IN COMPUTER SCIENCE |

Citations: | 12 - 7 self |

### BibTeX

@INPROCEEDINGS{Schröder05typeclass,

author = {Lutz Schröder and Till Mossakowski and Christoph Lüth},

title = {Type class polymorphism in an institutional framework},

booktitle = {IN JOSÉ FIADEIRO, EDITOR, 17TH WADT, LECTURE NOTES IN COMPUTER SCIENCE},

year = {2005},

pages = {234--248},

publisher = {Springer}

}

### OpenURL

### Abstract

Higher-order logic with shallow type class polymorphism is widely used as a specification formalism. Its polymorphic entities (types, operators, axioms) can easily be equipped with a ‘naive ’ semantics defined in terms of collections of instances. However, this semantics has the unpleasant property that while model reduction preserves satisfaction of sentences, model expansion generally does not. In other words, unless further measures are taken, type class polymorphism fails to constitute a proper institution, being only a so-called rps preinstitution; this is unfortunate, as it means that one cannot use institution-independent or heterogeneous structuring languages, proof calculi, and tools with it. Here, we suggest to remedy this problem by modifying the notion of model to include information also about its potential future extensions. Our construction works at a high level of generality in the sense that it provides, for any preinstitution, an institution in which the original preinstitution can be represented. The semantics of polymorphism used in the specification language HasCasl makes use of this result. In fact, HasCasl’s polymorphism is a special case of a general notion of polymorphism in institutions introduced here, and our construction leads to the right notion of semantic consequence when applied to this generic polymorphism. The appropriateness of the construction for other frameworks that share the same problem depends on methodological questions to be decided case by case. In particular, it turns out that our method is apparently unsuitable for observational logics, while it works well with abstract state machine formalisms such as state-based Casl.

### Citations

717 |
Isabelle/HOL — A Proof Assistant for Higher-Order Logic, volume 2283 of LNCS
- Nipkow, Paulson, et al.
- 2002
(Show Context)
Citation Context ...only for this fixed instance; in the proof, we are allowed to make use of all instances of φ, including instances involving the new syntactic material. Proofs of polymorphic formulas e.g. in Isabelle =-=[29]-=- work in precisely this way, which we have now provided with a semantic foundation. Proof (Theorem 15). ‘Only If’: by Proposition 10, we have ρ(∀σ. φ) |= ρ(∀ρ. ψ), and ψ is an instance of ρ(∀ρ. ψ). Th... |

475 |
Institutions: Abstract Model Theory for Specification and Programming
- Goguen, Burstall
- 1992
(Show Context)
Citation Context ...ate-based Casl. 1 Introduction The idea that a logic is something that comes with signatures, models, sentences and a satisfaction relation is formalized in the notion of institution as introduced in =-=[15]-=-. In practice, this concept is exploited to support genericity and heterogeneity in specification frameworks. For example, the semantics and proof calculus for structured and architectural specificati... |

92 | Building specifications in an arbitrary institution
- Sanella, Tarlecki
- 1988
(Show Context)
Citation Context ...od I (Σ ′ ) and all ϕ ∈ Sen I (Σ). The notion of institutions owes much of its importance to the fact that several languages for modularizing specifications are generic over an underlying institution =-=[11, 12, 13, 18, 27, 33]-=-. Furthermore, institutions form the basis of heterogeneous frameworks such as heterogeneous Casl [25, 26]. Such frameworks require a means of interrelating institutions, i.e. some notion of morphism ... |

85 | Logical support for modularisation
- Diaconescu, Goguen, et al.
- 1991
(Show Context)
Citation Context ...od I (Σ ′ ) and all ϕ ∈ Sen I (Σ). The notion of institutions owes much of its importance to the fact that several languages for modularizing specifications are generic over an underlying institution =-=[11, 12, 13, 18, 27, 33]-=-. Furthermore, institutions form the basis of heterogeneous frameworks such as heterogeneous Casl [25, 26]. Such frameworks require a means of interrelating institutions, i.e. some notion of morphism ... |

70 | Type classes and overloading in higher-order logic
- Wenzel
- 1997
(Show Context)
Citation Context ...lberg 2005sType Class Polymorphism in an Institutional Framework 235 Type class polymorphism has been used in programming languages like Haskell [31], as well as in the higher-order logic of Isabelle =-=[38]-=-. It is one of the central features of the recently developed specification language HasCasl [35, 36]. Little attention has been paid in the literature to the question whether type class polymorphism ... |

67 | An Analysis of Girard’s Paradox
- Coquand
- 1986
(Show Context)
Citation Context ...blem is not solved by treating quantified types as firstclass types (higher rank polymorphism), even if one manages to work around the obstacle that the latter is inconsistent with higher order logic =-=[10]-=-: e.g., the restriction that signature morphisms be surjective on types is imposed also in [28], where it is needed in order to ensure preservation of coherent families of domains in a semantics of hi... |

54 |
Logics for Coalgebras and Applications to Computer Science
- Kurz
- 2000
(Show Context)
Citation Context ..., being regarded as constituting the requirements on the system, and the non-observable part, i.e. the implementation, is added later; indeed, this specification style is explicitly advocated e.g. in =-=[20]-=-. Finally, let us have a look at the specification of stateful systems in the statesas-algebras paradigm as used e.g. in the specification language SB-Casl [4]. The problem here, as pointed out in Sec... |

45 |
Axioms for Abstract Model Theory
- Barwise
- 1974
(Show Context)
Citation Context ...of signature, model, sentence and satisfaction. These are the ingredients of the notion of institution as introduced by Goguen and Burstall [15]. Contrary to Barwise’s notion of abstract model theory =-=[2]-=-, the theory of institutions does not assume that signatures are algebraic signatures; indeed, nothing at all is said about signatures except that they form a class and that there are signature morphi... |

38 |
B.: Fundamentals of Algebraic Specification 2
- Ehrig, Mahr
- 1990
(Show Context)
Citation Context ...od I (Σ ′ ) and all ϕ ∈ Sen I (Σ). The notion of institutions owes much of its importance to the fact that several languages for modularizing specifications are generic over an underlying institution =-=[11, 12, 13, 18, 27, 33]-=-. Furthermore, institutions form the basis of heterogeneous frameworks such as heterogeneous Casl [25, 26]. Such frameworks require a means of interrelating institutions, i.e. some notion of morphism ... |

37 | Wellfounded trees in categories
- Moerdijk, Palmgren
- 2000
(Show Context)
Citation Context ...general recursive definitions over cpo’s – inductive datatype definitions, provided that the base theory already contains the natural numbers (this is a categorical result inherited from topos theory =-=[22]-=-) – class declarations. In general, it depends on the expressive power of signatures and theories in the preinstitution at hand whether or not using derived signature morphisms leads to a satisfactory... |

32 | W.: An Implementation-Oriented Semantics for Module Composition
- Goguen, Tracz
- 2000
(Show Context)
Citation Context |

31 |
Institution morphisms. Formal Aspects of Computing 13:274–307
- Goguen, Rosu
- 2002
(Show Context)
Citation Context ...e most important ones are institution comorphisms, which essentially express that fact that one institution is encoded into another. Definition 2. Given institutions I and J, aninstitution comorphism =-=[17]-=- (also called a plain map of institutions [21]) µ =(Φ, α, β) :I → J consists of – a functor Φ : Sign I → Sign J , – a natural transformation α : Sen I → Sen J ◦ Φ, – a natural transformation β : Mod J... |

27 |
Isabelle/HOL—A Proof Assistant for HigherOrder Logic, volume 2283
- Nipkow, Paulson, et al.
- 2008
(Show Context)
Citation Context ...only for this fixed instance; in the proof, we are allowed to make use of all instances of φ, including instances involving the new syntactic material. Proofs of polymorphic formulas e.g. in Isabelle =-=[29]-=- work in precisely this way, which we have now provided with a semantic foundation. Proof (Theorem 15). ‘Only If’: by Proposition 10, we have ρ(∀σ. φ) |= ρ(∀ρ. ψ), and ψ is an instance of ρ(∀ρ. ψ). Th... |

25 | HasCasl: Towards integrated specification and development of functional programs
- Schroder, Mossakowski
- 2002
(Show Context)
Citation Context ...been used in programming languages like Haskell [31], as well as in the higher-order logic of Isabelle [38]. It is one of the central features of the recently developed specification language HasCasl =-=[35, 36]-=-. Little attention has been paid in the literature to the question whether type class polymorphism can be formalized as an institution, the main problem here being that with the ‘naive’ semantics, the... |

24 |
Abstract and concrete categories, Wiley Interscience
- Adámek, Herrlich, et al.
- 1990
(Show Context)
Citation Context ...e translation map Sen I (σ) :Sen I (Σ) → Sen I (Σ ′ ), where Sen I (σ)(ϕ) is often written as σϕ; – a functor Mod I :(Sign I ) op → CAT (where CAT denotes the quasicategory of categories and functors =-=[1]-=-) giving, for each signature Σ, the category of models Mod I (Σ), and for each signature morphism σ : Σ → Σ ′ , the reduct functor Mod I (σ) :Mod I (Σ ′ ) → Mod I (Σ), where Mod I (σ)(M ′ ), the σ-red... |

22 |
Quasi-Varieties in Abstract Algebraic Institutions
- Tarlecki
- 1986
(Show Context)
Citation Context ...s not only in accordance with intuitive expectations, but also greatly simplifies the original notion. Our construction of polymorphic formulae is similar in spirit to the open formulae introduced in =-=[37]-=-: given a signature Σ1, anopenΣ1-formula is just a sentence φ in some extension Σ2 of Σ1, and a Σ1-model M satisfies such a formula if all its expansions to Σ2 satisfy φ. In typical algebraic settings... |

21 | On the integration of observability and reachability concepts - Bidoit, Hennicker - 2002 |

16 | Refinement operators and information flow security
- Bossi, Focardi, et al.
- 2003
(Show Context)
Citation Context .... The suitability of ours250 L. Schröder, T. Mossakowski, and C. Lüth approach for security formalisms, which also exhibit the phenomenon that security assertions tend to be unstable under refinement =-=[8]-=-, is under investigation. A particularly pleasing point is that HasCasl’s polymorphic sentences can be subsumed under a general definition of polymorphic formulae over institutions; the extended model... |

15 | The RAISE Specification Language
- George, Haff, et al.
- 1992
(Show Context)
Citation Context ... to the very abstract or hyper-loose semantics as introduced in [9, 30], where models may interpret more symbols than just the ones named in their signature. This is used e.g. in the semantics of RSL =-=[14]-=-. There are two crucial differences here. The first is of motivational nature: the purpose of very abstract semantics is to ensure that refinement is model class inclusion; there is no intended connec... |

14 |
Casl user manual
- Bidoit, Mosses
- 2004
(Show Context)
Citation Context ...ich provides a common framework for algebraic specification and functional programming, oriented in particular towards Haskell. This is achieved by extending the algebraic specification language Casl =-=[6]-=- with higher-order functions in the style of Moggi’s partial λcalculus [23], type constructors, type classes, and constructor classes (for details, see [35, 36]); general recursion is specified on top... |

11 | State-based extension of Casl
- Baumeister, Zamulin
- 2000
(Show Context)
Citation Context ...vational logics, signature morphisms are usually not allowed to introduce new observers [5, 16], precisely in order to rescue the satisfaction condition. Moreover, in the (non-)institution of SB-Casl =-=[3, 4]-=-, the satisfaction condition fails for signature morphisms that introduce additional state components [3]. We discuss both these examples from a methodological perspective; it turns out that our const... |

11 | Higher-order logic and theorem proving for structured specifications
- BORZYSZKOWSKI
- 1999
(Show Context)
Citation Context ...nature morphisms by simply ruling out the introduction of new types. For the case of polymorphism without type classes, one solution is to parametrize the notion of model by a fixed universe of types =-=[7, 19]-=-; this solution, however, does not seem to be suitable for type class polymorphism. The main goal of the present work is to provide a semantics that avoids both problems, i.e. caters for type classes ... |

8 | HasCasl – Integrated functional specification and programming. Language summary, available at http://www. informatik.uni-bremen.de/agbkb/forschung/formal_methods/CoFI/HasCASL
- Schröder, Mossakowski, et al.
(Show Context)
Citation Context ...been used in programming languages like Haskell [31], as well as in the higher-order logic of Isabelle [38]. It is one of the central features of the recently developed specification language HasCasl =-=[35, 36]-=-. Little attention has been paid in the literature to the question whether type class polymorphism can be formalized as an institution, the main problem here being that with the ‘naive’ semantics, the... |

6 |
General logic. Logic Colloquium'87
- Meseguer
- 1989
(Show Context)
Citation Context ...sms, which essentially express that fact that one institution is encoded into another. Definition 2. Given institutions I and J, aninstitution comorphism [17] (also called a plain map of institutions =-=[21]-=-) µ =(Φ, α, β) :I → J consists of – a functor Φ : Sign I → Sign J , – a natural transformation α : Sen I → Sen J ◦ Φ, – a natural transformation β : Mod J ◦ Φop → Mod I such that the following satisfa... |

6 | The HasCasl prologue: categorical syntax and semantics of the partial λ-calculus, available as http://www.informatik.uni-bremen.de/~lschrode/ hascasl/plam.ps
- Schröder
(Show Context)
Citation Context ...nsions are indeed the expected ones under this definition; this includes – equational definitions – well-founded recursive definitions of functions into types that admit a unique description operator =-=[34]-=- – general recursive definitions over cpo’s – inductive datatype definitions, provided that the base theory already contains the natural numbers (this is a categorical result inherited from topos theo... |

5 |
Categories of partial morphisms and the λp-calculus, Category Theory and
- Moggi
- 1986
(Show Context)
Citation Context ... programming, oriented in particular towards Haskell. This is achieved by extending the algebraic specification language Casl [6] with higher-order functions in the style of Moggi’s partial λcalculus =-=[23]-=-, type constructors, type classes, and constructor classes (for details, see [35, 36]); general recursion is specified on top of this in the style of HOLCF. The semantics of a HasCasl specification is... |

5 | Representations, hierarchies and graphs of institutions
- Mossakowski
- 1996
(Show Context)
Citation Context ...M |= σϕ implies M|σ |= ϕ for all M, σ, ϕ, and an eps preinstitution (‘extensions preserve satisfaction’) if the reverse implication holds. Let PI1, PI2 be preinstitutions. A preinstitution comorphism =-=[24]-=- µ : PI1 → PI2 consists of the same data (Φ, α, β) as an institution comorphism (in particular, sentence translation is covariant and model translation is contravariant), without however being require... |

5 |
Polymorphism in an institutional framework
- Nielsen, Pletat
- 1986
(Show Context)
Citation Context ...odel reduction, not by model expansion, because expanded models may have more types. Thus, the naive semantics defines only a so-called rps preinstitution [32] rather than an institution. The work of =-=[28]-=- is an initial attempt to define an institution for polymorphism but imposes severe restrictions on signature morphisms by simply ruling out the introduction of new types. For the case of polymorphism... |

4 |
Transforming Algebraic Specifications -- Lessons Learnt from an Example
- Pepper
- 1991
(Show Context)
Citation Context ...on 13. The comorphism η is weakly eps. Moreover, η is rps if PI is rps. Remark 14. Interestingly, the concept of extended model is close to the very abstract or hyper-loose semantics as introduced in =-=[9, 30]-=-, where models may interpret more symbols than just the ones named in their signature. This is used e.g. in the semantics of RSL [14]. There are two crucial differences here. The first is of motivatio... |

4 |
A soft stairway to institutions, Recent Trends
- Salibra, Scollo
- 1993
(Show Context)
Citation Context ... of polymorphic axioms is preserved only by model reduction, not by model expansion, because expanded models may have more types. Thus, the naive semantics defines only a so-called rps preinstitution =-=[32]-=- rather than an institution. The work of [28] is an initial attempt to define an institution for polymorphism but imposes severe restrictions on signature morphisms by simply ruling out the introducti... |

3 |
A hidden agenda, Theoret
- Goguen, Malcolm
(Show Context)
Citation Context ...ples of logical frameworks where the satisfaction condition fails unless restrictions are imposed. E.g. in observational logics, signature morphisms are usually not allowed to introduce new observers =-=[5, 16]-=-, precisely in order to rescue the satisfaction condition. Moreover, in the (non-)institution of SB-Casl [3, 4], the satisfaction condition fails for signature morphisms that introduce additional stat... |

3 | A set-theoretic model for a typed polymorphic lambda calculus -- a contribution to MetaSoft, VDM: The Way Ahead
- Kubiak, Borzyszkowski, et al.
- 1988
(Show Context)
Citation Context ...nature morphisms by simply ruling out the introduction of new types. For the case of polymorphism without type classes, one solution is to parametrize the notion of model by a fixed universe of types =-=[7, 19]-=-; this solution, however, does not seem to be suitable for type class polymorphism. The main goal of the present work is to provide a semantics that avoids both problems, i.e. caters for type classes ... |

2 |
An institution for SB-Casl, talk presented at
- Baumeister
- 2001
(Show Context)
Citation Context ...vational logics, signature morphisms are usually not allowed to introduce new observers [5, 16], precisely in order to rescue the satisfaction condition. Moreover, in the (non-)institution of SB-Casl =-=[3, 4]-=-, the satisfaction condition fails for signature morphisms that introduce additional state components [3]. We discuss both these examples from a methodological perspective; it turns out that our const... |

1 | Very abstract specifications: a formalism independent approach
- Cerioli, Reggio
- 1998
(Show Context)
Citation Context ...on 13. The comorphism η is weakly eps. Moreover, η is rps if PI is rps. Remark 14. Interestingly, the concept of extended model is close to the very abstract or hyper-loose semantics as introduced in =-=[9, 30]-=-, where models may interpret more symbols than just the ones named in their signature. This is used e.g. in the semantics of RSL [14]. There are two crucial differences here. The first is of motivatio... |

1 |
Structured theories and institutions, Category Theory and
- Durán, Meseguer
- 1999
(Show Context)
Citation Context |

1 |
of heterogeneous specification, Recent Trends
- Foundations
- 2003
(Show Context)
Citation Context ...erogeneity in specification frameworks. For example, the semantics and proof calculus for structured and architectural specifications in Casl [27] is generic over institutions, and heterogeneous Casl =-=[25, 26]-=- uses a graph of institutions for heterogeneous specification. The central condition governing the behaviour of institutions is the satisfaction condition, stating that satisfaction of sentences is pr... |

1 |
heterogeneous specification. Language summary
- HetCasl
- 2004
(Show Context)
Citation Context ...erogeneity in specification frameworks. For example, the semantics and proof calculus for structured and architectural specifications in Casl [27] is generic over institutions, and heterogeneous Casl =-=[25, 26]-=- uses a graph of institutions for heterogeneous specification. The central condition governing the behaviour of institutions is the satisfaction condition, stating that satisfaction of sentences is pr... |