1 research outputs found

    Towards a K Semantics for OCL

    Get PDF
    International audienceWe give a formal definition to a significant subset of the Object Constraint Language (OCL) in the K framework. The chosen subset includes the usual arithmetical, Boolean (including quantifiers), and string expressions; collection expressions (including iterators and navigation); and pre/post conditions for methods. Being executable, our definition provides us, for free, with an interpreter for the chosen subset of OCL. It can be used for free in K definitions of languages having OCL as a component We illustrate some of the advantages of K by comparing our semantical definition of OCL with the official semantics from the language's standard. We also report on a tool implementing our definition that users can try online.Nous donnons une sémantique à un sous-ensemble significatif du langage OCL (Object Constraint Langage) dans le cadre formel K. Le sous-ensemble choisi inclut les expressions habituelles arithmétiques, logiques (y compris avec quantifications), et de type chaîne de caractères; les expressions de type collection (y compris les itérateurs et la navigation); et les pre/post conditions pour les méthodes des classes. Notre définition est exécutable et produit par construction un interpréteur pour le sous-ensemble d'OCL choisi. L'interpréteur peut être inclus comme composante dans d'autre langages définis en K qui incluent OCL en tant que sous-langage. Nous illustrons les avantages de notre sémantique en la comparant avec la sémantique issue de la norme (standard) OCL. Enfin, nous présentons un outil, disponible en ligne, qui implémente notre approche
    corecore