## A Theory of Mixin Modules: Basic and Derived Operators (1996)

Venue: | Mathematical Structures in Computer Science |

Citations: | 39 - 13 self |

### BibTeX

@INPROCEEDINGS{Ancona96atheory,

author = {Davide Ancona and Elena Zucca},

title = {A Theory of Mixin Modules: Basic and Derived Operators},

booktitle = {Mathematical Structures in Computer Science},

year = {1996},

pages = {401--446}

}

### Years of Citing Articles

### OpenURL

### Abstract

Mixins are modules in which some components are deferred , i.e. their definition has to be provided by another module. Moreover, differently from parameterized modules (like ML functors), mixin modules can be mutually dependent and their composition supports redefinition of components (overriding). In this paper, we present a formal model of mixins and their basic composition operators. These operators can be viewed as a kernel language with clean semantics in which to express more complex operators of existing modular languages, including variants of inheritance in object oriented programming. Our formal model is given in an "institution independent" way, i.e. is parameterized by the semantic framework modeling the underlying core language. Introduction In object oriented languages, the definition of an heir class H from a parent class P takes usually the form H = extend P by M , where M denotes a collection of definitions of components (typically methods) which are either new, or re...

### Citations

1562 | The Definition of Standard ML
- Miller, Tofte, et al.
- 1990
(Show Context)
Citation Context ...single concrete module, which should depend on the (semantics of) the underlying core language, i.e. the language for defining module components, following the terminology introduced with Standard ML =-=[38]-=-. To this end, we generalize the model proposed above (mixins = functions over records of components) to functions over arbitrary semantic structures. That is achieved in a simple and natural way by t... |

1496 | The C++ Programming Language
- Stroustrup
- 1997
(Show Context)
Citation Context ...sses) are usually not supported, some languages allow the definition of abstract (parent) classes, i.e. classes with deferred components which can be concreted by heirs, for instance Eiffel [37], C++ =-=[42]-=- and Java [7], where deferred methods are called pure virtual and abstract , respectively; in other languages deferred methods are implemented by extra-linguistic features (cfr. the method subclassRes... |

921 |
Categories for the working mathematician
- Lane
- 1998
(Show Context)
Citation Context ...oe and denoted by \Gamma joe ; we write \Gamma j\Sigma i for \Gamma jj i , when j i : \Sigma i ! \Sigma, i = 1; 2, are the injections of a coproduct. We recall that Set is a cartesian closed category =-=[30]-=-; in particular, for any pair of small sets X and Y , there exists an evaluation map e X;Y : Y X \ThetaX ! Y , where Y X = hom(X;Y ) (the small set of all (total) functions from X to Y ), s.t., for an... |

476 |
Institutions: Abstract model theory for specication and programming
- Goguen, Burstall
- 1992
(Show Context)
Citation Context ...del proposed above (mixins = functions over records of components) to functions over arbitrary semantic structures. That is achieved in a simple and natural way by taking the approach of institutions =-=[25]-=- where syntactic interfaces (types) of modules are modeled by signatures of some institution I, and denotations of program modules are models of I; for instance, in a standard case, many-sorted algebr... |

421 | Mixin-based inheritance
- Bracha, Cook
- 1990
(Show Context)
Citation Context ...ot override methods of parent classes, called prefix patterns, (i.e., parent classes take precedence over subclasses), and superclass methods can invoke subclass methods via inner . As pointed out in =-=[14]-=-, these two mechanisms are two different uses of a single underlying construct; the only difference is the direction of class hierarchy growth. This underlying construct can be modeled in our context ... |

267 | A type-theoretic approach to higher-order modules with sharing
- Harper, Lillibridge
- 1994
(Show Context)
Citation Context ...ucted on top of the base language, on which as few as possible assumptions are made, is now becoming a standard approach, see, e.g., some recent work on type-theoretic foundations of SML-like modules =-=[27, 32, 33, 28, 17, 18]. A paper -=-which can be taken as representative of this point of view, summarized as a slogan in the title ("A modular module system") is [33], whose aim is to give a constructive proof of the validity... |

229 |
Abstract and Concrete Categories
- Adámek, Herrlich, et al.
- 1990
(Show Context)
Citation Context ... of standard algebras. We call them concrete model parts, since the category of \Sigma-models, for any signature \Sigma, is a concrete model category [11], i.e. a particular case of concrete category =-=[1]-=-; the same notion has been called static framework in a context where the aim was to enrich such a framework by dynamic features [4, 45]. Def. 4.3 The functor SSet : Set op ! Set is defined as follows... |

223 | Manifest types, modules, and separate compilation
- Leroy
- 1994
(Show Context)
Citation Context ...ucted on top of the base language, on which as few as possible assumptions are made, is now becoming a standard approach, see, e.g., some recent work on type-theoretic foundations of SML-like modules =-=[27, 32, 33, 28, 17, 18]. A paper -=-which can be taken as representative of this point of view, summarized as a slogan in the title ("A modular module system") is [33], whose aim is to give a constructive proof of the validity... |

219 |
Fundamentals of Algebraic Specification 1
- Ehrig, Mahr
- 1985
(Show Context)
Citation Context ...y, no properties on freeze are required for defining mixin models and their basic operators. The assumption that Mod preserves finite colimits ensures the existence of the amalgamated sum (see, e.g., =-=[23]-=-); indeed, Mod maps pushouts in Sig into pullbacks in Set and this implies that, for every pushout diagram in Sig \Sigma 0 \Gamma \Gamma \Gamma j 1 \Gamma \Gamma \Gamma` I@ @ @ j 2 @ @ @ \Sigma 1 \Sig... |

171 | Semantics of Programming Languages - Tennent - 1991 |

153 | The Programming Language Jigsaw: Mixins, Modularity and Multiple Inheritance
- Bracha
- 1992
(Show Context)
Citation Context ...mixin in which the corresponding component is deferred; then, this mixin is merged with another supplying the new definition. This view of overriding has been firstly introduced, at our knowledge, in =-=[13], where th-=-e operator which "cancels" a definition is called restrict . Note that in this way it is possible to replace an asymmetric (non commutative) binary operator, i.e. overriding, by restrict plu... |

141 | A Denotational Semantics of Inheritance
- Cook
- 1989
(Show Context)
Citation Context ...onents can be mutually recursive, redefining some of them actually changes the whole class behavior. The problem of giving a clean semantics to this mechanism has been independently solved by W. Cook =-=[16]-=- and U. S. Reddy [40]. The idea consists, roughly speaking, in interpreting P as a function, called by Cook a generator , mapping components into components. The current values of components in P are ... |

115 |
Module algebra
- Bergstra, Heering, et al.
- 1990
(Show Context)
Citation Context ...odeled as records) to modules (modeled as arbitrary semantic structures). From the other side, we extend to the case of mixins the well-established algebraic treatment of module composition (see e.g. =-=[10, 19, 41, 24, 21, 22, 35]-=-) 2 presenting a kernel module language with algebraic semantics. The main difference with respect to this literature is that we consider, together with classical operators (like export and renaming),... |

92 | Building specifications in an arbitrary institution
- Sanella, Tarlecki
- 1988
(Show Context)
Citation Context ...odeled as records) to modules (modeled as arbitrary semantic structures). From the other side, we extend to the case of mixins the well-established algebraic treatment of module composition (see e.g. =-=[10, 19, 41, 24, 21, 22, 35]-=-) 2 presenting a kernel module language with algebraic semantics. The main difference with respect to this literature is that we consider, together with classical operators (like export and renaming),... |

89 | Modularity meets inheritance
- Bracha, Lindstrom
- 1992
(Show Context)
Citation Context ...sed inheritance) and it is shown that the inheritance mechanism of Smalltalk and Beta can both be seen as the same mixin combinator, as proved in a formal context in this paper. After that, G. Bracha =-=[13, 15]-=- has proposed a set of module operators (called Jigsaw), which provides a framework for modularity independent from a particular computational paradigm. In other words, Jigsaw defines a language of mi... |

85 | Logical support for modularisation
- Diaconescu, Goguen, et al.
- 1991
(Show Context)
Citation Context ...odeled as records) to modules (modeled as arbitrary semantic structures). From the other side, we extend to the case of mixins the well-established algebraic treatment of module composition (see e.g. =-=[10, 19, 41, 24, 21, 22, 35]-=-) 2 presenting a kernel module language with algebraic semantics. The main difference with respect to this literature is that we consider, together with classical operators (like export and renaming),... |

79 | A modular module system
- Leroy
- 2000
(Show Context)
Citation Context ...ucted on top of the base language, on which as few as possible assumptions are made, is now becoming a standard approach, see, e.g., some recent work on type-theoretic foundations of SML-like modules =-=[27, 32, 33, 28, 17, 18]. A paper -=-which can be taken as representative of this point of view, summarized as a slogan in the title ("A modular module system") is [33], whose aim is to give a constructive proof of the validity... |

78 | Objects as Closures: Abstract Semantics of Object-Oriented Languages
- Reddy
- 1988
(Show Context)
Citation Context ...y recursive, redefining some of them actually changes the whole class behavior. The problem of giving a clean semantics to this mechanism has been independently solved by W. Cook [16] and U. S. Reddy =-=[40]-=-. The idea consists, roughly speaking, in interpreting P as a function, called by Cook a generator , mapping components into components. The current values of components in P are then obtained as the ... |

67 | Using parameterized signatures to express modular structure
- Jones
(Show Context)
Citation Context |

66 |
Fundamentals of Algebraic Specification 2: Module Specifications and Constraints
- Ehrig, Mahr
- 1990
(Show Context)
Citation Context |

60 | Mixin modules
- Duggan, Sourelis
- 1996
(Show Context)
Citation Context ...ally supported by WG n.6112 COMPASS, Murst 40% - Modelli della computazione e dei linguaggi di programmazione and CNR, Italy. 1 conversely. That allows recursive definitions to span module boundaries =-=[20]-=-, with a great benefit for modularity, as we illustrate in detail in Sect. 1. Second, going back to our original schema of inheritance H = extend P by M , with P concrete class, we have ignored until ... |

60 | Genericity Versus Inheritance - Meyer - 1988 |

55 | Import is Not Inheritance: Why We Need both Modules and Classes
- Szyperski
- 1992
(Show Context)
Citation Context ...n module can also be successfully introduced in object oriented languages where, in many cases, the notion of class turns out to be inadequate as the unique modularity feature offered by the language =-=[43]-=-. This generalization should be reflected at the semantic level: hence, in this paper, we aim at defining a formal model of mixin modules, based on the ideas outlined above, and a corresponding interp... |

32 |
M.: Encapsulation and composition as orthogonal operators on mixins: A solution to multiple inheritance problems. Object Oriented Systems 3(1
- Mens, Limberghen
- 1996
(Show Context)
Citation Context ...to either M 1 or M 2 [6]. This is essential, for instance, in object oriented languages supporting multiple inheritance where an heir class may inherit a method definition from several parent classes =-=[13, 34]-=-. The inheritance operators of Smalltalk and Beta (without considering the pseudo-variables super and inner) can be defined by an appropriate combination of the merge and restrict operations: H = (res... |

30 | D.: The Java TM Programming Language - Arnold, Gosling, et al. |

30 | Andrzej Tarlecki, Behavioural satisfaction and equivalence in concrete model categories
- Bidoit
- 1996
(Show Context)
Citation Context ...hed by some structure, like operations in the case of standard algebras. We call them concrete model parts, since the category of \Sigma-models, for any signature \Sigma, is a concrete model category =-=[11]-=-, i.e. a particular case of concrete category [1]; the same notion has been called static framework in a context where the aim was to enrich such a framework by dynamic features [4, 45]. Def. 4.3 The ... |

22 | An algebraic approach to mixins and modularity
- Ancona, Zucca
- 1996
(Show Context)
Citation Context ...this subject. Technical details and a more concrete model based on the notion of signature inclusion are given in the Appendix. A preliminary presentation of the ideas in this paper has been given in =-=[3]-=-; some strictly related work is in [2, 6, 5]. 1 Mixins and Mixin Operators: An Informal Introduction In this section, we introduce the notion of mixin module and the most relevant composition operator... |

15 | An applicative module calculus
- Courant
- 1997
(Show Context)
Citation Context |

13 | An algebra of mixin modules
- Ancona, Zucca
- 1997
(Show Context)
Citation Context ...more concrete model based on the notion of signature inclusion are given in the Appendix. A preliminary presentation of the ideas in this paper has been given in [3]; some strictly related work is in =-=[2, 6, 5]-=-. 1 Mixins and Mixin Operators: An Informal Introduction In this section, we introduce the notion of mixin module and the most relevant composition operators, by means of some examples written in Stan... |

12 | A Lambda Calculus of Incomplete Objects
- Bono, Bugliesi, et al.
- 1996
(Show Context)
Citation Context ...s): the main aim is to introduce in SML modules the possibility that recursive definitions span module boundaries. The proposal turns out to be very specific and tied to the features of SML. Finally, =-=[12]-=- presents a lambda calculus of incomplete objects, i.e. objects (records of methods) which may be typed even though they contain references to methods that are yet to be added; it is easy to recognize... |

12 |
Categorical Principles, Techniques and Results for High-Level Replacement Systems
- Ehrig, Lowe
- 1993
(Show Context)
Citation Context |

11 |
Theory of algebraic module specification including behavioral semantics and constraints
- Ehrig, Baldamus, et al.
- 1992
(Show Context)
Citation Context |

9 | Overriding operators in a mixin-based framework
- Ancona, Zucca
- 1997
(Show Context)
Citation Context ...more concrete model based on the notion of signature inclusion are given in the Appendix. A preliminary presentation of the ideas in this paper has been given in [3]; some strictly related work is in =-=[2, 6, 5]-=-. 1 Mixins and Mixin Operators: An Informal Introduction In this section, we introduce the notion of mixin module and the most relevant composition operators, by means of some examples written in Stan... |

9 |
Object Oriented Programming with Flavors
- Moon
- 1986
(Show Context)
Citation Context ... when applied to some parent class, which supplies an implementation for the deferred components. An abstract subclass is sometimes called mixin (this name was firstly used in the LISP community, see =-=[39, 29]-=-). At the semantic level, M can be seen as a function from deferred components, i.e. components which must be provided from the outside, to components which are defined within the class. Note that, as... |

8 |
From Static to Dynamic Abstract Data-Types
- Zucca
(Show Context)
Citation Context ...te model category [11], i.e. a particular case of concrete category [1]; the same notion has been called static framework in a context where the aim was to enrich such a framework by dynamic features =-=[4, 45]-=-. Def. 4.3 The functor SSet : Set op ! Set is defined as follows: ffl for any set S, the elements of SSet(S) are the S-sorted sets; ffl for any map oe: S 1 ! S 2 and any S 2 -sorted set A, (A joe ) s ... |

6 | An application framework for module composition tools
- Banavar, Lindstrom
- 1996
(Show Context)
Citation Context ...velopment and, moreover, the inability of manage them causes code duplication and loss of software extensibility. For other examples of mutually dependent modules (also in concrete cases) we refer to =-=[2, 9, 20]-=-. 1.2 Overriding Definitions In object oriented languages, inheritance allows overriding of definitions with precedence of either the heir, as e.g. in Smalltalk [26] or the parent class, as in Beta [3... |

5 | MIX(FL): a kernel language of mixin modules
- Ancona
- 2000
(Show Context)
Citation Context ...more concrete model based on the notion of signature inclusion are given in the Appendix. A preliminary presentation of the ideas in this paper has been given in [3]; some strictly related work is in =-=[2, 6, 5]-=-. 1 Mixins and Mixin Operators: An Informal Introduction In this section, we introduce the notion of mixin module and the most relevant composition operators, by means of some examples written in Stan... |

5 | A formal framework for modules with state
- Ancona, Zucca
- 1996
(Show Context)
Citation Context ...te model category [11], i.e. a particular case of concrete category [1]; the same notion has been called static framework in a context where the aim was to enrich such a framework by dynamic features =-=[4, 45]-=-. Def. 4.3 The functor SSet : Set op ! Set is defined as follows: ffl for any set S, the elements of SSet(S) are the S-sorted sets; ffl for any map oe: S 1 ! S 2 and any S 2 -sorted set A, (A joe ) s ... |

4 | An Application Framework for Compositional Modularity
- Banavar
- 1995
(Show Context)
Citation Context ...ed, obtaining what we call in this paper a mixin module (or simply mixin). Hence, an extension with mixins and corresponding composition operators is, in principle, applicable to any modular language =-=[13, 8]-=-, allowing the definitions of highly sophisticated module systems with a consequent enhancement of code reusability and extensibility; notice that the notion of mixin module can also be successfully i... |

4 |
A module calculus enjoying the subject-reduction property
- Courant
- 1996
(Show Context)
Citation Context |

4 |
Object-Oriented Software Construction. Computer Science
- Meyer
- 1988
(Show Context)
Citation Context ...t heir classes) are usually not supported, some languages allow the definition of abstract (parent) classes, i.e. classes with deferred components which can be concreted by heirs, for instance Eiffel =-=[37]-=-, C++ [42] and Java [7], where deferred methods are called pure virtual and abstract , respectively; in other languages deferred methods are implemented by extra-linguistic features (cfr. the method s... |