Category Theory and Computer Programming pp 313-333 | Cite as

# A study in the foundations of programming methodology: Specifications, institutions, charters and parchments

## Abstract

The theory of institutions formalizes the intuitive notion of a "logical system." Institutions were introduced (1) to support as much computer science as possible *independently* of the underlying logical system, (2) to facilitate the transfer of results (and artifacts such as theorem provers) from one logical system to another, and (3) to permit combining a number of different logical systems. In particular, programming-in-the-large (in the style of the Clear specification language) is available for any specification or "logical" programming language based upon a suitable institution. Available features include generic modules, module hierarchies, "data constraints" (for data abstraction), and "multiplex" institutions (for combining multiple logical systems). The basic components of an **institution** are: a category of **signatures** (which generally provide symbols for constructing sentences); a set (or category) of Σ-**sentences** for each signature Σ; a category (or set) of Σ-**models** for each Σ; and a Σ-**satisfaction** relation, between Σ-sentences and Σ-models, for each Σ. The intuition of the basic axiom for institutions is that *truth (i.e., satisfaction) is invariant under change of notation*. This paper enriches institutions with sentence morphisms to model proofs, and uses this to explicate the notion of a logical programming language.

To ease constructing institutions, and to clarify various notions, this paper introduces two further concepts. A **charter** consists of an adjunction, a "base" functor, and a "ground" object; we show that "chartering" is a convenient way to "found" institutions. **Parchments** provide a notion of sentential syntax, and a simple way to "write" charters and thus get institutions. Parchments capture the insight that *the syntax of logic is an initial algebra*. Everything is illustrated with the many-sorted equational institution. Parchments also explicate the sense of finitude that is appropriate for specifications. Finally, we introduce **generalized institutions**, which generalize both institutions and Mayoh's "galleries", and we introduce corresponding generalized charters and parchments.

## Keywords

Logical System Equational Logic Signature Morphism Model Morphism Initial Algebra## Preview

Unable to display preview. Download preview PDF.

## References

- [Abrial, Schuman & Meyer 79]Abrial, J. R., S. A. Schuman and B. Meyer. Specification Language (draft). 1979. Cambridge University.Google Scholar
- [Barwise 74]Barwise, Jon. Axioms for Abstract Model Theory.
*Annals of Mathematical Logic*7:221–265, 1974.Google Scholar - [Beierle & Voss 85]Beierle, Christoph and Angelika Voss.
*Implementation Specifications*. Technical Report 147/85, Universität Kaiserslautern, 1985.Google Scholar - [Bjorner & Jones 78]Bjorner, Dines and Cliff Jones. The Vienna Development Method.
*Lecture Notes in Computer Science***61**, 1978.Google Scholar - Burstall & Goguen 77]Burstall, Rod and Joseph Goguen. Putting Theories together to Make Specifications.
*Proceedings, Fifth International Joint Conference on Artificial Intelligence*5:1045–1058, 1977.Google Scholar - [Burstall & Goguen 80]Burstall, Rod and Joseph Goguen. The Semantics of Clear, a Specification Language. In
*Lecture Notes in Computer Science*. Volume 86:*Proceedings of the 1979 Copenhagen Winter School on Abstract Software Specification*, pages 292–332. Springer-Verlag, 1980.Google Scholar - [Burstall & Goguen 81]Burstall, Rod and Joseph Goguen. An Informal Introduction to Specifications using Clear. In Robert Boyer and J Moore (editors),
*The Correctness Problem in Computer Science*, pages 185–213. Academic Press, 1981. Reprinted in*Software Specification Techniques*, edited by N. Gehani and A. D. McGettrick, Addison-Wesley, 1985, pages 363–390.Google Scholar - [Futatsugi, Goguen, Jouannaud & Meseguer 85]Futatsugi, Kokichi, Joseph Goguen, Jean-Pierre Jouannaud and José Meseguer. Principles of OBJ2. In
*Proceedings, Symposium on Principles of Programming Languages*, pages 52–66. Association for Computing Machinery, 1985.Google Scholar - [Goguen 71]Goguen, Joseph. Mathematical Representation of Hierarchically Organized Systems. In E. Attinger (editor),
*Global Systems Dynamics*, pages 112–128. S. Karger, 1971.Google Scholar - [Goguen 74]Goguen, Joseph. Semantics of Computation. In
*Proceedings, First International Symposium on Category Theory Applied to Computation and Control*, pages 234–249. University of Massachusetts at Amherst, 1974. Also published in Lecture Notes in Computer Science, Volume 25, Springer-Verlag, 1975, pages 151–163.Google Scholar - [Goguen 86]Goguen, Joseph. Reusing and Interconnecting Software Components.
*IEEE Computer*19(2):16–28, February, 1986.Google Scholar - [Goguen & Burstall 84]Goguen, Joseph and Rod Burstall. Some Fundamental Algebraic Tools for the Semantics of Computation, Part 1: Comma Categories, Colimits, Signatures and Theories.
*Theoretical Computer Science*31(2):175–209, 1984.Google Scholar - [Goguen & Burstall 85]Goguen, Joseph and Rod Burstall.
*Institutions: Abstract Model Theory for Computer Science*. Technical Report CSLI-85-30, Center for the Study of Language and Information, Stanford University, 1985. Also submitted for publication; a preliminary version appears in*Proceedings, Logics of Programming Workshop*, edited by Edward Clarke and Dexter Kozen, volume 164, Springer-Verlag Lecture Notes in Computer Science, pages 221–256, 1984.Google Scholar - [Goguen & Ginali 78]Goguen, Joseph and Susanna Ginali. A Categorical Approach to General Systems Theory. In George Klir (editor),
*Applied General Systems Research*, pages 257–270. Plenum, 1978.Google Scholar - [Goguen & Meseguer 85]Goguen, Joseph and José Meseguer. Completeness of Many-sorted Equational Logic.
*Houston Journal of Mathematics*11(3):307–334, 1985. Preliminary versions have appeared in:*SIGPLAN Notices*, July 1981, Volume 16, Number 7, pages 24–37, and January 1982, Volume 17, Number 1, pages 9–17; SRI Technical Report CSL-135, May 1982; and Technical Report CSLI-84-15, Center for the Study of Language and Information, Stanford University, September 1984.Google Scholar - [Goguen & Meseguer 86a]Goguen, Joseph and José Meseguer. Eqlog: Equality, Types, and Generic Modules for Logic Programming. In Douglas DeGroot and Gary Lindstrom (editors),
*Functional and Logic Programming*, pages 295–363. Prentice-Hall, 1986. An earlier version appears in the*Journal of Logic Programming*, volume 1, number 2, pages 179–210, September 1984.Google Scholar - [Goguen & Meseguer 86b]Goguen, Joseph and José Meseguer. Object-Oriented Programming as Reflective Equational Programming. In preparation. 1986Google Scholar
- [Goguen, Thatcher, Wagner & Wright 77]Goguen, Joseph, James Thatcher, Eric Wagner and Jesse Wright. Initial Algebra Semantics and Continuous Algebras.
*Journal of the Association for Computing Machinery*24(1), January, 1977.Google Scholar - [Lloyd 84]Lloyd, J. W.
*Foundations of Logic Programming*. Springer-Verlag, 1984.Google Scholar - [Lyndon 66]
- [Mac Lane 71]Mac Lane, Saunders.
*Categories for the Working Mathematician*. Springer-Verlag, 1971.Google Scholar - [Mayoh 85]Mayoh, Brian.
*Galleries and Institutions*. Technical Report DAIMI PB-191, Aarhus University, 1985. This contains a number of reports, some of which have been presented at various conferences.Google Scholar - [Reichel 84]Reichel, Horst.
*Structural Induction on Partial Algebras*. Akademie-Verlag, 1984.Google Scholar - [Sanella & Tarlecki 85a]Sanella, Donald and Andrzej Tarlecki. On Observational Equivalence and Algebraic Specification. In
*Lecture Notes in Computer Science*. Volume 185:*Mathematical Foundations of Software Development, volume 1: Proceedings of the Colloquium on Trees in Algebra and Programming*, pages 308–322. Springer-Verlag, 1985. Also appeared as University of Edinburgh, Department of Computer Science Technical Report CSR-172-84.Google Scholar - [Sanella & Tarlecki 85b]Sanella, Donald and Andrzej Tarlecki. Building Specifications in an Arbitrary Institution. In Giles Kahn, David MacQueen and Gordon Plotkin (editor),
*Lecture Notes in Computer Science*. Volume 173:*Proceedings, International Symposium on the Semantics of Data Types*, pages 337–356. Springer-Verlag, 1985. Also appeared as Internal Report CSR-184-85, University of Edinburgh, Department of Computer Science.Google Scholar - [Tarlecki 84]Tarlecki, Andrzej. Free Constructions in Algebraic Institutions. In
*Lecture Notes in Computer Science*. Volume 176:*Proceedings, Int. Symp. Math. Foundations of Computer Science*, pages 526–534. Springer-Verlag, 1984. Extended version, University of Edinburgh Computer Science Department Report CSR-149-83, and revised version ‘On the existence of Free Models in Abstract Algebraic Institutions', September 1984.Google Scholar - [van Emden & Kowalski 76]van Emden, Maartin H. and Robert Kowalski. The Semantics of Predicate Logic as a Programming Language.
*Journal of the Association for Computing Machinery*23(4):733–742, 1976.Google Scholar