862 research outputs found
Semantic subtyping for objects and classes
In this paper we propose an integration of structural subtyping with boolean
connectives and semantic subtyping to define a Java-like programming language
that exploits the benefits of both techniques. Semantic subtyping is an approach
for defining subtyping relation based on set-theoretic models, rather than syntactic
rules. On the one hand, this approach involves some non trivial mathematical
machinery in the background. On the other hand, final users of the language need
not know this machinery and the resulting subtyping relation is very powerful and
intuitive. While semantic subtyping is naturally linked to the structural one, we
show how our framework can also accommodate the nominal subtyping. Several
examples show the expressivity and the practical advantages of our proposal
Generic Model Refactorings
Many modeling languages share some common concepts and principles. For example, Java, MOF, and UML share some aspects of the concepts\ud
of classes, methods, attributes, and inheritance. However, model\ud
transformations such as refactorings specified for a given language\ud
cannot be readily reused for another language because their related\ud
metamodels may be structurally different. Our aim is to enable a\ud
flexible reuse of model transformations across various metamodels.\ud
Thus, in this paper, we present an approach allowing the specification\ud
of generic model transformations, in particular refactorings, so\ud
that they can be applied to different metamodels. Our approach relies\ud
on two mechanisms: (1) an adaptation based mainly on the weaving\ud
of aspects; (2) the notion of model typing, an extension of object\ud
typing in the model-oriented context. We validated our approach by\ud
performing some experiments that consisted of specifying three well\ud
known refactorings (Encapsulate Field, Move Method, and Pull Up Method)\ud
and applying each of them onto three different metamodels (Java,\ud
MOF, and UML)
Object-oriented Programming Laws for Annotated Java Programs
Object-oriented programming laws have been proposed in the context of
languages that are not combined with a behavioral interface specification
language (BISL). The strong dependence between source-code and interface
specifications may cause a number of difficulties when transforming programs.
In this paper we introduce a set of programming laws for object-oriented
languages like Java combined with the Java Modeling Language (JML). The set of
laws deals with object-oriented features taking into account their
specifications. Some laws deal only with features of the specification
language. These laws constitute a set of small transformations for the
development of more elaborate ones like refactorings
- …