Using Both Specialisation and Generalisation in a Programming Language: Why and How? Pierre Crescenzo and Philippe Lahire Laboratory I3S – Sophia-Antipolis Workshop MASPEGHI - September 2nd, Montpellier Contents • Overview of our approach • Case study: Generalisation/Specialisation • Conclusion and Perspectives 2 OFL: Open Flexible Languages • Three essential elements – Component-description ≈ Customisable meta classes – Component-relationship ≈ Customisable meta relationship – Component-language ≈ Meta language, composition The OFL model : Overview 3 Semantics customisation : parameters • Each component is mainly described with a set of parameters. • Parameter ≈ part of semantics • Creation of a component by specialisation of a generic component • Under meta programmer responsibility • Control of components with assertion mechanism The OFL model : Overview 4 Semantics customisation : entry points It is necessary to take into account the definition of a component with the valuation of its parameters in order to describe the behaviour of the system. • OFL defines a set of 53 actions (entry points). • Action ≈ algorithm which defines a part of application execution • Each action takes into account the value of the parameters which influences its execution • Examples of actions : • Message sending • Feature lookup (dynamic binding) • Assignment of an object instance to an attribute The OFL model : Overview 5 Architecture of OFL Generic concepts Language components An application ConceptLanguage My-Language Parallelogram ConceptRelationship Specialisation generalisation ConceptDescription Class Rectangle Square One rect. One squ. The OFL model : Overview 6 Some of the 28 parameters of a concept-relationship ( , , , ...) (, ∞, or ...) ( or for sources & targets) ( or ) (, , ...) (, , or ) ( or for attributes & methods) ( , , or for method parameters, function results and attributes) (, or ) The OFL model : overview 7 Why Generalisation and Specialisation relationships ? specialisation Parallelogram Parallelogram Square Rectangle Rectangle Square generalisation Parallelogram Square ! ! Rectangle Parallelogram Square Rectangle Case study Parallelogram ! Rectangle Square 8 Specialisation and Generalisation & # # " $%$ ! ! $%$ Case study 9 Summary of our approach Conclusion and Perspectives 10 Open discussion To study the value of parameters Paper: Markku Sakkinen A basic example To study possible implementation Extension of a language In the framework of our model … Conclusion and Perspectives 11
© Copyright 2024