In this paper we develop a theory of composition of default specifications. This theory generalizes the work by Goguen and Burstall, where specifications written in an arbitrary logical system (institution) are structured as com- binations of theories. It extends the classical composition by allowing partial re-use (and overriding) of specification modules. The modularisation units are hierarchic specifications, i.e. axioms and defaults organized by priority lev- els. The semantics are given by default institutions, which are a generalisation of institutions in order to enable partial reuse of specifications. Composition is formalized by the use of appropriate categories, both at the syntactic and semantic levels. The theory of composition with overriding is illustrated with an example of an object-oriented specification. Large specifications must be structured in independent, reusable modules in order to ensure modularity and reusability. Modularity enables large specifications to be split into smaller parts, where each part is well-defined in itself. This allows specifications to be developed in an incremental way, where different modules are elaborated independently. Large specifi- cations are then built from small, understandable pieces, which ameliorate the difficulties in producing consistent, rigorous specifications that reflect the users' requirements. Reusability is important where many specifications share big parts, as these need not be recreated. In order to get the desired levels of modularity and reusability, we need to say how to form larger specifications from smaller modules. Therefore, an essential purpose of a specification language is to say how to assemble theories to make new and larger specifications. Moreover, and having this purpose in mind, much of the syntax and semantics of specifications does not depend upon the logical system in which the theories are expressed. Institutions (7) provide a foundation for approaching these problems. They provide a way of talking about the informal notion of a 'logical system' and a way of 'gluing' together theories using colimits in order to form larger specifications. Although institutions provide a way of structuring specifications, they allow existing spec- ifications to be enriched but not modified. In (13), default institutions are proposed as a complementary structure that allows partial reuse of existing specification modules: a 'de- fault' module is used as a template that can be modified by introducing specific exceptions to suit the needs of the application at hand. Default institutions are a generalisation of the con- cept of institution presented in (7). In addition to the usual components of institutions, they include a notion of distance between morphisms of interpretations. This notion of distance is used in order to choose the models of the exception closest to the models of the default module. In this paper, we develop a theory of composition of default specifications, which general-
[1]
Francisco Miguel Alves Campos de Sousa Dionísio.
Composition of hierarchic default specifications
,
1997
.
[2]
Cristina Sernadas,et al.
Data Encapsulation and Modularity: Three Views of Inheritance
,
1993,
MFCS.
[3]
Mark Ryan,et al.
Defaults and revision in structured theories
,
1991,
[1991] Proceedings Sixth Annual IEEE Symposium on Logic in Computer Science.
[4]
Cristina Sernadas,et al.
Object Specification Logic
,
1995,
J. Log. Comput..
[5]
Roel Wieringa,et al.
Information systems, correctness and reusability : selected papers from the IS-CORE Workshop, Amsterdam, 26-30 September 1994
,
1995
.
[6]
Sofia Guerra,et al.
Distance Functions for Defaults in Reactive Systems
,
2000,
AMAST.
[7]
Pierre-Yves Schobbens,et al.
Exceptions for Algebraic Specifications: On the Meaning of "but"
,
1993,
Sci. Comput. Program..
[8]
Joseph A. Goguen,et al.
Institutions: abstract model theory for specification and programming
,
1992,
JACM.
[9]
Horst Herrlich,et al.
Abstract and concrete categories
,
1990
.