Moostrap(ID:1646/)


Philippe Mulet and Pierre Cointe, Ecole des Mines de Nantes

Moostrap, a language based on behavioral reflection and concatenation, implemented in Scheme



References:
  • Mulet, Philippe "Reflexion et Langages a Prototypes" thesis 1995, Universite de Nantes, Ecole des Mines de Nantes view details Abstract: Cette thèse a pour objectif de proposer un modèle réflexif pour des langages à objets dits "prototypiques"'.

    La réflexion dans les langages regroupe l'ensemble des concepts et techniques qui permettent à ces langages de raisonner sur eux-mêmes, tant du point de vue de la représentation des entités du langage (réflexion de structure), que du point de vue de l'exécution du langage (réflexion de comportement).

    Nous voulons dégager notre modèle d'un schéma organisationnel particulier, c'est pourquoi nous nous intéresserons aux langages dits "à  prototypes", souvent présentés comme étant une alternative aux langages à classes, afin de ne pas être tributaire d'une organisation préalable de métaobjets structuraux que sont les classes.

    Nous montrerons qu'en fait les langages à prototypes peuvent être considérés comme des langages à objets élémentaires, qui présentent un champ d'investigation plus large que le modèle à classes, de par l'absence de contraintes qu'ils imposent a priori.

    Ce document se divise en trois parties, introduisant successivement les concepts et mécanismes des langages à prototypes,  l'intégration de la réflexion dans un nouveau modèle de langage à prototypes (Moostrap) et finalement l'étude des aspects méthodologiques liés à sa mise en Oeuvre et à son utilisation.

    Nous présentons d'abord les concepts de ces langages, par comparaison aux langages à classes. Nous en présenterons ensuite les mécanismes internes au travers de l'implémentation de deux langages à prototypes.

    L'un est à vocation pédagogique. Il est réalisé à partir d'une analogie entre les environnements de Scheme et les prototypes de Self. Il nous servira à illustrer par l'exemple certains des principes à la base des langages à prototypes, déjà énoncés au premier chapitre. L'autre est plus ambitieux et doit nous servir à investiguer le champ de la programmation réflexive en présence de prototypes.

    Pour terminer cette la partie dédiée aux prototypes, nous nous intéressons à la modélisation de l'héritage entre classes au moyen de prototypes et de la délégation. Nous parvenons ainsi à modéliser un noyau complet de classes et métaclasses inspiré d'Objvlisp, qui allie la flexibilité et le pouvoir d'expression des prototypes à la cohérence et l'abstraction des classes. Cette étude montre que les langages à prototypes peuvent être considérés comme des "assembleurs" de langages à objets.

    Nous nous penchons ensuite sur la réflexion, dont nous marions l'étude avec celle des langages à prototypes, qui se libèrent des classes (et des métaclasses) et permettent d'invetiguer la réflexion de structure et de comportement sans a priori.

    Nous présentons en premier lieu le modèle réflexif destiné à Moostrap.  Dans la tradition des micro-interprètes à la Microplasma, Objvlisp, Classtalk ou Actalk, Moostrap est construit à partir d'un noyau primitif définissant une sémantique ``minimale'' mais paramétrable de manière générique. Ce noyau a pour vocation d'être étendu pour étudier et modéliser des variations sur la sémantique de résolution des envois de messages.. Cette sémantique repose sur un protocole de métaobjets (MOP) permettant  de d'en contrôler dynamiquement la teneur.

    Nous illustrons les apports de Moostrap au travers d'applications simples, avant de nous consacrer à une extension plus profonde: la délégation, i.e. une forme d'héritage de propriétés entre objets.  Le noyau initial de notre langage n'intègre pas la notion de délégation comme un mécanisme de base prédéfini dans le langage de support. En effet, ce mécanisme, au demeurant nécessaire, peut être entièrement  décrit depuis le langage Moostrap, et à ce titre nous pourrons envisager des variations sur sa réalisation.

    A ce point de la discussion, nous étudions des problèmes de méthodologie d'utilisation de notre langage réflexif, i.e. des problèmes dans les méta-niveaux relevant du génie logiciel. En effet, l'implantation de la délégation a mis en exergue des problèmes préoccupants de conception et d'utilisation de métaobjets.  Nous voulons introduire des mécanismes de composition génériques permettant de composer les sémantiques de différents métaobjets, et ce de manière incrémentale.  Nous posons les jalons de l'étude d'un tel mécanisme, lui-même réflexif, qui garantit de manière automatique la monotonie du système.

    En second lieu, nous proposons une nouvelle réorganisation du système en terme de classes. Ayant fait abstraction des classes dans l'élaboration de notre noyau réflexif, nous envisageons maintenant leur réintroduction sous la forme de métaobjets étendus , i.e. le lien d'instanciation sera figuré par le  lien méta.  Nous définissons ainsi un noyau encore inspiré d'Objvlisp, alliant à  la fois son protocole homogène de réflexion structurelle à la possibilité de contrôler la sémantique de l'envoi de message.

    Pour finir, nous montrons comment le noyau de base de Moostrap peut être étendu pour prendre en compte réflexivement les primitives en tant que méthodes particulières, élargissant ainsi le champ de contrôle vers des directions nouvelles.

    External link: Online copy Extract: English version of Abstract
    This thesis aims to propose a reflexive model for object-oriented languages known as "prototypic".  

    The reflexion in the languages gathers the whole of the concepts and techniques which make it possible these languages to reason on themselves, so much from the point of view of the representation of the entities of the language (reflexion of structure), which from the point of view of the execution of the language (reflexion of behavior).  


    We want to release our model of a particular organisational diagram, this is why we will be interested in the languages called "to prototypes", often presented as being an alternative to the languages to classes, in order not to be tributary of an organization preliminary of metaobjects structural which are the classes.  Us will show that makes the languages with prototypes of them can be regarded as object-oriented languages elementary, which present a field of investigation broader than the model at classes, from the absence of constraints which they impose a priori.  This document is divided into three parts, successively introducing the concepts and mechanisms of the languages with prototypes, the integration of the reflexion in a new model of language to prototypes (Moostrap) and finally the study of the methodological aspects related to its implementation and its use.  We present initially the concepts of these languages, by comparison with the languages with classes.  We will present of them then the internal mechanisms through the implementation of two languages at prototypes.  

    One is with teaching vocation.  It is carried out starting from an analogy between the environments of Scheme and the prototypes of Coil.  It will be used to us to illustrate for the example some of the principles at the base of the languages with prototypes, already stated in the first chapter.  The other is more ambitious and must be used to us for investigator the field of the reflexive programming in the presence of prototypes.  To finish the this part dedicated to the prototypes, we are interested in modeling of the heritage between classes by means of prototypes and the delegation.  We thus manage to model a complete core of classes and metaclasses inspired of Objvlisp, which combines the flexibility and the capacity of form of the prototypes to coherence and the abstraction of the classes.  This study shows that the languages with prototypes can be regarded as "assemblers" of object-oriented languages.  We lean then on the reflexion, of which we marry the study with that of the languages with prototypes, which are released from the classes (and the metaclasses) and allow investigator the reflexion of structure and behavior without a priori.  We initially present the reflexive model intended for Moostrap.  In the tradition of the microphone-interpreters to the Microplasma, Objvlisp, Classtalk or Actalk, Moostrap are built starting from a primitive core defining minimal but "skeletal semantics" in a generic way.  This core has the role to be wide to study and model variations on the semantics of resolution of the messaging.  This semantics rests on a protocol of metaobjects (MOP) making it possible of to control the content dynamically of it.  We illustrate the contributions of Moostrap through simple applications, before devoting us to a major extension:  the delegation, i.e. the shape of heritage of properties between objects.  

    The initial core of our language does not integrate the concept of delegation like a preset basic mechanism in the language of support.  Indeed, this mechanism, moreover necessary, can be entirely described since the Moostrap language, and for this reason we will be able to consider variations on its realization.  This point of the discussion, we study problems of methodology of use of our reflexive language, i.e. of the problems in the meta-levels concerned with the software genius.  Indeed, the establishment of the delegation put forward alarming problems of design and use of metaobjects.  We want to introduce generic mechanisms of composition allowing to compose semantic different metaobjects, and this in an incremental way.  We pose the stakes of the study of such a mechanism, itself reflexive, which guarantees in an automatic way monotony of the system.  In the second place, we propose a new reorganization of the system in term of classes.  Having disregarded class in the development of our reflexive core, we now consider their reintroduction in the form of metaobjects extended, i.e. the bond of instantiation will be illustrated by the metabond.  We thus define a core still inspired of Objvlisp, combining at the same time its homogeneous protocol of structural reflexion to the possibility of controlling the semantics of the sending of message.  To finish, we show how the basic core of Moostrap can be widely reflexively to take into account the primitives as particular methods, thus widening the field of control towards new directions.
  • Mulet, Philippe and Cointe, Pierre "Definition of a Reflective Kernel for a Prototype-Based Language" view details Abstract: Moostraps meta-object protocol is determined by the (fixed) decomposition of message sending into a lookup and an apply phase. Meta-objects are also used to associate atomic objects with their methods, which enables one to change even their behavior.
  • Mulet, Philippe; Malenfant, J. and Cointe, Pierre "Towards a methodology for explicit composition of metaobjects" view details
          in SIGPLAN Notices 30(10) ACM Press, October 1995 (Proceedings of the 10th Annual Conference on Object-Oriented Programming: Systems, Languages and Applications (OOPSLA'95)) view details