10 research outputs found

    Systematic adaptation of dynamically generated source code via domain-specific examples

    Get PDF
    In modern web-based applications, an increasing amount of source code is generated dynamically at runtime. Web applications commonly execute dynamically generated code (DGC) emitted by third-party, black-box generators, run at remote sites. Web developers often need to adapt DGC before it can be executed: embedded HTML can be vulnerable to cross-site scripting attacks; an API may be incompatible with some browsers; and the program\u27s state created by DGC may not be persisting. Lacking any systematic approaches for adapting DGC, web developers resort to ad-hoc techniques that are unsafe and error-prone. This study presents an approach for adapting DGC systematically that follows the program-transformation-byexample paradigm. The proposed approach provides predefined, domain-specific before/after examples that capture the variability of commonly used adaptations. By approving or rejecting these examples, web developers determine the required adaptation transformations, which are encoded in an adaptation script operating on the generated code\u27s abstract syntax tree. The proposed approach is a suite of practical JavaScript program adaptations and their corresponding before/after examples. The authors have successfully applied the approach to real web applications to adapt third-party generated JavaScript code for security, browser compatibility, and persistence

    Constraint programming for type inference in flexible model-driven engineering

    Get PDF
    Domain experts typically have detailed knowledge of the concepts that are used in their domain; however they often lack the technical skills needed to translate that knowledge into model-driven engineering (MDE) idioms and technologies. Flexible or bottom-up modelling has been introduced to assist with the involvement of domain experts by promoting the use of simple drawing tools. In traditional MDE the engineering process starts with the definition of a metamodel which is used for the instantiation of models. In bottom-up MDE example models are defined at the beginning, letting the domain experts and language engineers focus on expressing the concepts rather than spending time on technical details of the metamodelling infrastructure. The metamodel is then created manually or inferred automatically. The flexibility that bottom-up MDE offers comes with the cost of having nodes in the example models left untyped. As a result, concepts that might be important for the definition of the domain will be ignored while the example models cannot be adequately re-used in future iterations of the language definition process. In this paper, we propose a novel approach that assists in the inference of the types of untyped model elements using Constraint Programming. We evaluate the proposed approach in a number of example models to identify the performance of the prediction mechanism and the benefits it offers. The reduction in the effort needed to complete the missing types reaches up to 91.45% compared to the scenario where the language engineers had to identify and complete the types without guidance

    A GUI For Defining Inductive Logic Programming Tasks For Novice Users

    Get PDF
    University of Minnesota M.S. thesis. March 2017. Major: Computer Science. Advisor: Richard Maclin. 1 computer file (PDF); vii, 64 pages.Inductive logic programming, which involves learning a solution to a problem where data is more naturally viewed as multiple tables with relationships between the tables, is an extremely powerful learning method. But these methods have suffered from the fact that very few are written in languages other than Prolog and because describing such problems is difficult. To describe an inductive logic programming problem the user needs to designate many tables and relationships and often provide some knowledge about the relationships in order for the techniques to work well. The goal of this thesis is to develop a Java-based Graphical User Interface (GUI) for novice users that will allow them to define ILP problems by connecting to an existing database and allowing users to define such a problem in an understandable way, perhaps with the assistance of data exploration techniques from the GUI

    Transformation by example

    Get PDF
    La transformation de modèles consiste à transformer un modèle source en un modèle cible conformément à des méta-modèles source et cible. Nous distinguons deux types de transformations. La première est exogène où les méta-modèles source et cible représentent des formalismes différents et où tous les éléments du modèle source sont transformés. Quand elle concerne un même formalisme, la transformation est endogène. Ce type de transformation nécessite généralement deux étapes : l’identification des éléments du modèle source à transformer, puis la transformation de ces éléments. Dans le cadre de cette thèse, nous proposons trois principales contributions liées à ces problèmes de transformation. La première contribution est l’automatisation des transformations des modèles. Nous proposons de considérer le problème de transformation comme un problème d'optimisation combinatoire où un modèle cible peut être automatiquement généré à partir d'un nombre réduit d'exemples de transformations. Cette première contribution peut être appliquée aux transformations exogènes ou endogènes (après la détection des éléments à transformer). La deuxième contribution est liée à la transformation endogène où les éléments à transformer du modèle source doivent être détectés. Nous proposons une approche pour la détection des défauts de conception comme étape préalable au refactoring. Cette approche est inspirée du principe de la détection des virus par le système immunitaire humain, appelée sélection négative. L’idée consiste à utiliser de bonnes pratiques d’implémentation pour détecter les parties du code à risque. La troisième contribution vise à tester un mécanisme de transformation en utilisant une fonction oracle pour détecter les erreurs. Nous avons adapté le mécanisme de sélection négative qui consiste à considérer comme une erreur toute déviation entre les traces de transformation à évaluer et une base d’exemples contenant des traces de transformation de bonne qualité. La fonction oracle calcule cette dissimilarité et les erreurs sont ordonnées selon ce score. Les différentes contributions ont été évaluées sur d’importants projets et les résultats obtenus montrent leurs efficacités.Model transformations take as input a source model and generate as output a target model. The source and target models conform to given meta-models. We distinguish between two transformation categories. Exogenous transformations are transformations between models expressed using different languages, and the whole source model is transformed. Endogenous transformations are transformations between models expressed in the same language. For endogenous transformations, two steps are needed: identifying the source model elements to transform and then applying the transformation on them. In this thesis, we propose three principal contributions. The first contribution aims to automate model transformations. The process is seen as an optimization problem where different transformation possibilities are evaluated and, for each possibility, a quality is associated depending on its conformity with a reference set of examples. This first contribution can be applied to exogenous as well as endogenous transformation (after determining the source model elements to transform). The second contribution is related precisely to the detection of elements concerned with endogenous transformations. In this context, we present a new technique for design defect detection. The detection is based on the notion that the more a code deviates from good practice, the more likely it is bad. Taking inspiration from artificial immune systems, we generate a set of detectors that characterize the ways in which a code can diverge from good practices. We then use these detectors to determine how far the code in the assessed systems deviates from normality. The third contribution concerns transformation mechanism testing. The proposed oracle function compares target test cases with a base of examples containing good quality transformation traces, and assigns a risk level based on the dissimilarity between the two. The traces help the tester understand the origin of an error. The three contributions are evaluated with real software projects and the obtained results confirm their efficiencies

    Automating model transformation by example using inductive logic programming

    No full text

    Solving heterogeneity for a successful service market

    Get PDF
    Diese Dissertation ist im Kontext eines neuen Paradigmas im Software Engineering mit dem Namen On-The-Fly Computing entstanden. OTF Computing basiert auf der Idee von spezialisierten On-The-Fly Märkten. OTF Märkte haben unterschiedliche Eigenschaften und die Marktakteure in diesen Märkten benutzen verschiedene Modellierungstechniken für das Service Engineering. Diese Unterschiede resultieren in Heterogenität und erschweren deshalb die Ausführung von automatisierten Marktoperationen, da Servicebeschreibungen nicht automatisch miteinander verglichen werden können. Für das beschriebene Problem bietet diese Dissertation eine Lösung um einen erfolgreichen OTF Markt zu ermöglichen. Für die Vergleichbarkeit von Servicebeschreibungen in einem OTF Markt wird eine formale Zwischenrepräsentation (Kernsprache) eingeführt. Die Marktoperationen werden auf Basis der Kernsprache definiert, die die optimale Ausführung der automatisierten Marktoperationen in einem OTF Markt unterstützt. Der erste Beitrag dieser Dissertation ist der Ansatz Language Optimizer (LOpt). LOpt nutzt als Basis eine Kernsprache, die strukturelle, verhaltensbezogene und nicht-funktionale Serviceeigenschaften beinhaltet. LOpt konfiguriert diese Sprache basierend auf formalisierten Markteigenschaften und einer Wissensbasis mit Konfigurationsexpertise, um eine optimale Kernsprache zur Servicespezifikation im jeweiligen OTF Markt zu erstellen. Der zweite Beitrag dieser Dissertation ist die Anwendung des Model Transformation By-Example Ansatzes um den Marktakteuren ohne Expertise im Sprachdesign Transformationen von ihren proprietären Sprachen in die optimale Kernsprache zu ermöglichen. Der beschriebene Ansatz generiert Transformationen auf Basis von Beispielabbildungen zwischen Servicebeschreibungen zweier Sprachen. Dabei wird die Idee genetischer Algorithmen angewendet.This PhD thesis is written in the context of a new software development paradigm called On-The-Fly Computing. It is based on the idea of specialized service markets called On-The-Fly (OTF) markets. OTF markets have different properties and their participants use different modeling techniques to perform the activity of service engineering. Such differences result in heterogeneity in OTF markets and complicate the execution of automated market operations like service matching as service specifications cannot be automatically compared with each other. This PhD thesis proposes a solution to cope with the mentioned heterogeneity to foster the success of OTF markets and the OTF Computing paradigm. In order to achieve the comparability of specifications in an OTF market, a formal intermediate representation called core language is introduced. Automated market operations are defined on a core language that optimally supports the execution of these operations in this market. The first contribution of this PhD thesis is the approach language Optimizer (LOpt), which supports the systematic design of a service specification language optimal for the execution of automated market operations in an OTF market. LOpt uses a comprehensive core language covering various structural, behavioral, and non-functional service properties. LOpt performs a configuration of this language based on formalized market properties and a knowledge base containing the configuration expertise. The second contribution of this PhD thesis is the application of the Model Transformations By-Example technique to define transformations from proprietary specification languages of market actors to the optimal core language. The approach generates transformations based on example mappings between concrete specifications in both languages given by market actors. ...by Svetlana Arifulina, M.Sc. ; Thesis Supervisors: Prof. Dr. Gregor Engels and Jun. Prof. Dr. Heiko HamannTag der Verteidigung: 08.12.2016Universität Paderborn, Univ., Dissertation, 201

    A NEW ILP SYSTEM FOR MODEL TRANSFORMATION BY EXAMPLES

    Get PDF

    A NEW ILP SYSTEM FOR MODEL TRANSFORMATION BY EXAMPLES

    Get PDF
    corecore