The document discusses identifying design motifs (patterns) in object-oriented program architectures to improve understanding and quality. It proposes using design patterns from the Gang of Four as motifs and the PADL meta-model to model the program architecture and motifs. Motifs would be identified by representing the problem as a constraint satisfaction problem and using constraint programming to find similarities between the architecture and motifs.
The document discusses abstract and precise recovery of UML class diagram constituents from source code. It defines what abstract and precise mean in this context. It studies 36 UML constituents across 4 categories to determine which can be recovered abstractly and precisely from C++, Java and Smalltalk source code. Algorithms are implemented in the Ptidej tool suite to reverse engineer Java source code abstractly and precisely.
This document summarizes a lecture on learning classifier systems. It introduces learning classifier systems and provides examples of their applications in reinforcement learning, supervised learning, and function approximation. Specifically, it discusses XCS and its use in solving maze problems and the mountain car problem. It also provides an example of a learning classifier system solving boolean functions. Finally, it outlines current real-life applications of learning classifier systems in data mining, modeling market traders, autonomous robotics, and modeling artificial ecosystems. It concludes by introducing anticipatory learning classifier systems which can learn condition-action-effect relations.
CCIA'2008: Can Evolution Strategies Improve Learning Guidance in XCS? Design ...Albert Orriols-Puig
This document proposes using evolution strategies (ES) instead of genetic algorithms (GA) in the genetic algorithm component of the XCS learning classifier system. It designs an ES-based XCS with a modified classifier representation and ES-based genetic operators. Experiments on real-world datasets show the ES-based XCS outperforms GA-based XCS with selection and mutation alone, though there is no significant difference when crossover is added. Further research is suggested to determine when different search operators should be used.
On the Semantics of Real-Time Domain Specific Modeling LanguagesJose E. Rivera
This document summarizes Jose E. Rivera's PhD thesis on providing formal semantics for real-time domain specific modeling languages. The thesis defines a framework for specifying the timed behavior of domain specific modeling languages using rewriting logic. It extends in-place model transformations to include time-dependent behavior. Models are formally specified in Maude, enabling simulation and analysis of real-time properties. The work contributes tools and techniques for formally specifying, simulating, and analyzing real-time domain specific modeling languages.
From programming to software engineering: ICSE keynote slides availableCelso Martins
Meyer's blog:
"In response to many requests, I have made available [1] the slides of my education keynote at ICSE earlier this month. The theme was “From programming to software engineering: notes of an accidental teacher”. Some of the material has been presented before, notably at the Informatics Education Europe conference in Venice in 2009. (In research you can give a new talk every month, but in education things move at a more senatorial pace.) Still, part of the content is new. The talk is a summary of my experience teaching programming and software engineering at ETH."
New Challenges in Learning Classifier Systems: Mining Rarities and Evolving F...Albert Orriols-Puig
The document discusses new challenges in learning classifier systems (LCS) when dealing with domains containing rare classes. It proposes using a design decomposition approach to analyze how LCS address rare classes. Specifically, it examines how the extended classifier system (XCS) handles rare classes. It identifies five critical elements of LCS that are important for detecting small niches associated with rare classes: 1) estimating classifier parameters correctly, 2) providing representatives of rare niches during initialization, 3) generating and growing representatives of rare niches, 4) adjusting the genetic algorithm application rate, and 5) ensuring representatives of rare niches dominate their niches. The document focuses on analyzing the first element of estimating classifier parameters for XCS when dealing with domains
A Recommender System for Refining Ekeko/X TransformationCoen De Roover
This document discusses an automated recommender system for refining Ekeko/X transformations. It begins by introducing logic meta-programming and how it allows querying a "database" of program information using logic relations. Templates with meta-variables and directives are used to specify transformations, and formal operators define ways to mutate templates. A genetic search evaluates templates based on precision, recall, partial matches, and directive usage to recommend refinements for better specifying transformations.
This document provides a summary of a lecture on machine learning and decision trees. It recaps the previous lecture and outlines the goals of today's lecture, which will review data classification, decision trees, and the ID3 algorithm. The lecture will also cover how to build decision trees using ID3 and C4.5 and demonstrate running C4.5 on the Weka machine learning software.
The document discusses abstract and precise recovery of UML class diagram constituents from source code. It defines what abstract and precise mean in this context. It studies 36 UML constituents across 4 categories to determine which can be recovered abstractly and precisely from C++, Java and Smalltalk source code. Algorithms are implemented in the Ptidej tool suite to reverse engineer Java source code abstractly and precisely.
This document summarizes a lecture on learning classifier systems. It introduces learning classifier systems and provides examples of their applications in reinforcement learning, supervised learning, and function approximation. Specifically, it discusses XCS and its use in solving maze problems and the mountain car problem. It also provides an example of a learning classifier system solving boolean functions. Finally, it outlines current real-life applications of learning classifier systems in data mining, modeling market traders, autonomous robotics, and modeling artificial ecosystems. It concludes by introducing anticipatory learning classifier systems which can learn condition-action-effect relations.
CCIA'2008: Can Evolution Strategies Improve Learning Guidance in XCS? Design ...Albert Orriols-Puig
This document proposes using evolution strategies (ES) instead of genetic algorithms (GA) in the genetic algorithm component of the XCS learning classifier system. It designs an ES-based XCS with a modified classifier representation and ES-based genetic operators. Experiments on real-world datasets show the ES-based XCS outperforms GA-based XCS with selection and mutation alone, though there is no significant difference when crossover is added. Further research is suggested to determine when different search operators should be used.
On the Semantics of Real-Time Domain Specific Modeling LanguagesJose E. Rivera
This document summarizes Jose E. Rivera's PhD thesis on providing formal semantics for real-time domain specific modeling languages. The thesis defines a framework for specifying the timed behavior of domain specific modeling languages using rewriting logic. It extends in-place model transformations to include time-dependent behavior. Models are formally specified in Maude, enabling simulation and analysis of real-time properties. The work contributes tools and techniques for formally specifying, simulating, and analyzing real-time domain specific modeling languages.
From programming to software engineering: ICSE keynote slides availableCelso Martins
Meyer's blog:
"In response to many requests, I have made available [1] the slides of my education keynote at ICSE earlier this month. The theme was “From programming to software engineering: notes of an accidental teacher”. Some of the material has been presented before, notably at the Informatics Education Europe conference in Venice in 2009. (In research you can give a new talk every month, but in education things move at a more senatorial pace.) Still, part of the content is new. The talk is a summary of my experience teaching programming and software engineering at ETH."
New Challenges in Learning Classifier Systems: Mining Rarities and Evolving F...Albert Orriols-Puig
The document discusses new challenges in learning classifier systems (LCS) when dealing with domains containing rare classes. It proposes using a design decomposition approach to analyze how LCS address rare classes. Specifically, it examines how the extended classifier system (XCS) handles rare classes. It identifies five critical elements of LCS that are important for detecting small niches associated with rare classes: 1) estimating classifier parameters correctly, 2) providing representatives of rare niches during initialization, 3) generating and growing representatives of rare niches, 4) adjusting the genetic algorithm application rate, and 5) ensuring representatives of rare niches dominate their niches. The document focuses on analyzing the first element of estimating classifier parameters for XCS when dealing with domains
A Recommender System for Refining Ekeko/X TransformationCoen De Roover
This document discusses an automated recommender system for refining Ekeko/X transformations. It begins by introducing logic meta-programming and how it allows querying a "database" of program information using logic relations. Templates with meta-variables and directives are used to specify transformations, and formal operators define ways to mutate templates. A genetic search evaluates templates based on precision, recall, partial matches, and directive usage to recommend refinements for better specifying transformations.
This document provides a summary of a lecture on machine learning and decision trees. It recaps the previous lecture and outlines the goals of today's lecture, which will review data classification, decision trees, and the ID3 algorithm. The lecture will also cover how to build decision trees using ID3 and C4.5 and demonstrate running C4.5 on the Weka machine learning software.
C4.5 enhances ID3 by making it more robust to noise, able to handle continuous attributes, deal with missing data, and convert decision trees to rules. It avoids overfitting through pre-pruning and post-pruning techniques. When dealing with continuous attributes, it evaluates all possible split points and chooses the optimal one. It treats missing data as a separate value but this is not always appropriate. It generates rules from trees in a greedy manner by pruning conditions to reduce estimated error. The next topic will be on instance-based classifiers.
This document provides a summary of Lecture 4 of an introduction to machine learning course. It recaps topics from Lecture 3, including different machine learning paradigms and problems that will be studied like classification, regression, clustering, and association analysis. It then discusses classification and prediction problems in more detail. Specific algorithms for classification, regression, clustering and association rule mining are introduced. Finally, it previews that the next class will focus on the C4.5 classification algorithm.
IWLCS'2008: First Approach toward Online Evolution of Association Rules wit...Albert Orriols-Puig
This document proposes using a learning classifier system (LCS) to mine association rules from data streams online by adapting to changes in associations. It describes CSar, an LCS that represents rules with intervals for continuous attributes and uses antecedent or consequent grouping to organize rules into association sets. Experimental results show CSar can extract rules with similar support and confidence as Apriori on discrete data and quantitative association rules on continuous data, though further analysis is needed to compare CSar to other rule miners and test its ability to adapt to changing data streams.
Presentation of the Evolving Distribution Objects FrameworkCaner Candan
The document discusses an evolving distribution objects (EDO) framework for solving hard optimization problems using heuristic optimization algorithms. It provides an overview of the author's work including applying estimation of distribution algorithms and simulated annealing within the EDO framework. It also discusses the theoretical underpinnings of estimation of distribution algorithms and simulated annealing, and how they were combined in the EDO framework using an object-oriented design based on inheritance in C++.
This document provides an overview of neural networks and backpropagation algorithms. It discusses how neural networks are inspired by biological brains and how they can be used to perform complex classification tasks. The key topics covered include perceptrons, Adaline networks, multi-layer perceptrons, backpropagation for training multi-layer networks, and an example of how backpropagation works to minimize error in a simple two-layer network.
The document summarizes key points from Lecture 3 of an introduction to machine learning course. It discusses desired characteristics of machine learning techniques, including the ability to generalize but not too much, being robust, learning high-quality models, being scalable and efficient, being explanatory, and being deterministic. It also provides an overview of machine learning paradigms like inductive learning, explanation-based learning, analogy-based learning, evolutionary learning, and connectionist learning. Finally, it outlines specific problems that will be studied in the course, such as data classification, statistical learning, association analysis, and clustering.
Class diagrams using UML model the static relationships between classes in a system. They show classes, attributes, operations, and relationships like associations and generalizations. Associations describe links between classes, like a customer ordering products. Generalizations define inheritance between superclasses and subclasses, where the subclass inherits structure and behavior from the parent class.
The document discusses Java reflection and its key concepts. Reflection allows a running program to examine itself and its environment. It enables programs to inspect their own structure, behavior, and configuration. The core reflection API includes classes like Class, Method, Constructor, and Field that allow introspecting classes at runtime. Reflection is commonly used for tasks like dependency injection, dynamic proxy generation, and structural analysis of programs.
081016 Social Tagging, Online Communication, and Peircean Semioticsandrea huang
One of the recent Web developments has focused on the opportunities it presents for social tagging through user participation and collaboration. As a result, social tagging has changed the traditional online communication process. The interpretation of tagging between humans and machines may create new problems if essential questions about how social tagging corresponds to online communications, what objects the tags refer to, who the interpreters are, and why they are engaged are not explored systematically. Since all reasoning is an interpretation of social tagging among humans, tags, and machines, it is a complex issue that calls for deep reflection. In this paper, we investigate the relevance of the potential problems raised by social tagging through the framework of C. S. Peirce’s semiotics. We find that general phenomena of social tagging can be well classified by Peirce’s ten classes of signs for reasoning. This suggests that regarding social tagging as a sign and systematically analyzing the interpretation are positively associated with the ten classes of signs. Peircean semiotics can be used to examine the dynamics and determinants of tagging; hence, the various uses of this categorization schema may have implications for the design and development of information systems and Web applications.
Real world DSL - making technical and business people speaking the same languageMario Fusco
This document discusses domain specific languages (DSLs). It defines a DSL as a computer programming language with limited expressiveness focused on a particular domain to improve communication. The document discusses why DSLs are used to improve communication and maintainability. It also covers different types of DSLs, including internal and external DSLs. Examples of DSLs like Hibernate queries, jMock, and lambdaj are provided to illustrate DSL design patterns.
Here are the key points about global, static and local objects:
- Global object constructors are called before main() and destructors after main() returns
- Local automatic objects are constructed when they are declared and destructed when they go out of scope
- Static local objects are constructed before main() and destructed after main() returns
- Objects declared within a function are local to that function
- The order of constructor/destructor calls follows the order of object declarations
So in summary, global and static objects persist for the duration of the program while local objects are temporary with lifetime of the block they are declared in.
The document outlines a framework for machine learning including: 1) the key components of a learning system including input, knowledge base, learner, and output; 2) different perspectives on machine learning such as optimization, concept formation, and pattern recognition; and 3) different approaches to inductive learning including decision trees, evolutionary algorithms, neural networks, and conceptual clustering. Examples are provided to illustrate different inductive learning systems and how they can generate rules from examples.
The document summarizes the Transformer neural network model proposed in the paper "Attention is All You Need". The Transformer uses self-attention mechanisms rather than recurrent or convolutional layers. It achieves state-of-the-art results in machine translation by allowing the model to jointly attend to information from different representation subspaces. The key components of the Transformer include multi-head self-attention layers in the encoder and masked multi-head self-attention layers in the decoder. Self-attention allows the model to learn long-range dependencies in sequence data more effectively than RNNs.
Intelligent Tutoring Systems: The DynaLearn ApproachWouter Beek
The document describes the DynaLearn approach to developing intelligent tutoring systems. It focuses on using conceptual modeling to help students construct knowledge about systems. Students build qualitative models and receive feedback to improve their understanding. The approach includes several interactive learning spaces to provide guidance, diagnosis of errors, and engagement through virtual characters. The goal is to develop an environment that supports open-ended conceptual modeling to address declines in science education.
The document summarizes a presentation about applying and detecting design patterns. It discusses the need for a common description of design patterns to enable both application and detection. It presents a meta-model for describing design patterns and tools developed for applying patterns to source code using JavaXL and detecting patterns using explanation-based constraint programming (e-Constraints). The goal is to enable a "round-trip" process of seamlessly applying and detecting design patterns.
This document discusses using an explanation-based constraint programming (CP) approach to identify the use or misuse of design patterns in software code. It describes how design pattern solutions can be modeled as constraints over classes and relationships in code. The explanation-based CP system called PaLM is used to generate justifications for modifications to code that would transform a misuse into a proper use of a design pattern. Experiments applying this approach to various codebases, including JEdit and JHotDraw, showed promising results. Future work aims to improve the scalability and usability of the system.
This document discusses applying GRASP (General Responsibility Assignment Software Patterns) principles to object-oriented design. It introduces five GRASP patterns: Creator, Information Expert, Controller, Low Coupling and High Cohesion. These patterns provide guidance on assigning responsibilities to classes in a way that promotes qualities like low coupling, high cohesion, and encapsulation. The document uses a board game example to illustrate applying the Creator and Information Expert patterns in UML class diagrams and sequence diagrams.
The document describes a solution to automate design pattern application and detection in order to help implement, understand, and re-engineer object-oriented software systems. The solution includes two assistants: PatternsBox, which applies design patterns and detects complete versions; and Ptidej, which detects distorted versions and transforms source code. The assistants are based on a common formalization language (PDL) and other components. Experimental results show the assistants can accurately detect patterns in frameworks but are limited to Java and PatternsBox does not transform code. Open questions remain around formalization, application, understanding, and re-engineering of design patterns at scale.
C4.5 enhances ID3 by making it more robust to noise, able to handle continuous attributes, deal with missing data, and convert decision trees to rules. It avoids overfitting through pre-pruning and post-pruning techniques. When dealing with continuous attributes, it evaluates all possible split points and chooses the optimal one. It treats missing data as a separate value but this is not always appropriate. It generates rules from trees in a greedy manner by pruning conditions to reduce estimated error. The next topic will be on instance-based classifiers.
This document provides a summary of Lecture 4 of an introduction to machine learning course. It recaps topics from Lecture 3, including different machine learning paradigms and problems that will be studied like classification, regression, clustering, and association analysis. It then discusses classification and prediction problems in more detail. Specific algorithms for classification, regression, clustering and association rule mining are introduced. Finally, it previews that the next class will focus on the C4.5 classification algorithm.
IWLCS'2008: First Approach toward Online Evolution of Association Rules wit...Albert Orriols-Puig
This document proposes using a learning classifier system (LCS) to mine association rules from data streams online by adapting to changes in associations. It describes CSar, an LCS that represents rules with intervals for continuous attributes and uses antecedent or consequent grouping to organize rules into association sets. Experimental results show CSar can extract rules with similar support and confidence as Apriori on discrete data and quantitative association rules on continuous data, though further analysis is needed to compare CSar to other rule miners and test its ability to adapt to changing data streams.
Presentation of the Evolving Distribution Objects FrameworkCaner Candan
The document discusses an evolving distribution objects (EDO) framework for solving hard optimization problems using heuristic optimization algorithms. It provides an overview of the author's work including applying estimation of distribution algorithms and simulated annealing within the EDO framework. It also discusses the theoretical underpinnings of estimation of distribution algorithms and simulated annealing, and how they were combined in the EDO framework using an object-oriented design based on inheritance in C++.
This document provides an overview of neural networks and backpropagation algorithms. It discusses how neural networks are inspired by biological brains and how they can be used to perform complex classification tasks. The key topics covered include perceptrons, Adaline networks, multi-layer perceptrons, backpropagation for training multi-layer networks, and an example of how backpropagation works to minimize error in a simple two-layer network.
The document summarizes key points from Lecture 3 of an introduction to machine learning course. It discusses desired characteristics of machine learning techniques, including the ability to generalize but not too much, being robust, learning high-quality models, being scalable and efficient, being explanatory, and being deterministic. It also provides an overview of machine learning paradigms like inductive learning, explanation-based learning, analogy-based learning, evolutionary learning, and connectionist learning. Finally, it outlines specific problems that will be studied in the course, such as data classification, statistical learning, association analysis, and clustering.
Class diagrams using UML model the static relationships between classes in a system. They show classes, attributes, operations, and relationships like associations and generalizations. Associations describe links between classes, like a customer ordering products. Generalizations define inheritance between superclasses and subclasses, where the subclass inherits structure and behavior from the parent class.
The document discusses Java reflection and its key concepts. Reflection allows a running program to examine itself and its environment. It enables programs to inspect their own structure, behavior, and configuration. The core reflection API includes classes like Class, Method, Constructor, and Field that allow introspecting classes at runtime. Reflection is commonly used for tasks like dependency injection, dynamic proxy generation, and structural analysis of programs.
081016 Social Tagging, Online Communication, and Peircean Semioticsandrea huang
One of the recent Web developments has focused on the opportunities it presents for social tagging through user participation and collaboration. As a result, social tagging has changed the traditional online communication process. The interpretation of tagging between humans and machines may create new problems if essential questions about how social tagging corresponds to online communications, what objects the tags refer to, who the interpreters are, and why they are engaged are not explored systematically. Since all reasoning is an interpretation of social tagging among humans, tags, and machines, it is a complex issue that calls for deep reflection. In this paper, we investigate the relevance of the potential problems raised by social tagging through the framework of C. S. Peirce’s semiotics. We find that general phenomena of social tagging can be well classified by Peirce’s ten classes of signs for reasoning. This suggests that regarding social tagging as a sign and systematically analyzing the interpretation are positively associated with the ten classes of signs. Peircean semiotics can be used to examine the dynamics and determinants of tagging; hence, the various uses of this categorization schema may have implications for the design and development of information systems and Web applications.
Real world DSL - making technical and business people speaking the same languageMario Fusco
This document discusses domain specific languages (DSLs). It defines a DSL as a computer programming language with limited expressiveness focused on a particular domain to improve communication. The document discusses why DSLs are used to improve communication and maintainability. It also covers different types of DSLs, including internal and external DSLs. Examples of DSLs like Hibernate queries, jMock, and lambdaj are provided to illustrate DSL design patterns.
Here are the key points about global, static and local objects:
- Global object constructors are called before main() and destructors after main() returns
- Local automatic objects are constructed when they are declared and destructed when they go out of scope
- Static local objects are constructed before main() and destructed after main() returns
- Objects declared within a function are local to that function
- The order of constructor/destructor calls follows the order of object declarations
So in summary, global and static objects persist for the duration of the program while local objects are temporary with lifetime of the block they are declared in.
The document outlines a framework for machine learning including: 1) the key components of a learning system including input, knowledge base, learner, and output; 2) different perspectives on machine learning such as optimization, concept formation, and pattern recognition; and 3) different approaches to inductive learning including decision trees, evolutionary algorithms, neural networks, and conceptual clustering. Examples are provided to illustrate different inductive learning systems and how they can generate rules from examples.
The document summarizes the Transformer neural network model proposed in the paper "Attention is All You Need". The Transformer uses self-attention mechanisms rather than recurrent or convolutional layers. It achieves state-of-the-art results in machine translation by allowing the model to jointly attend to information from different representation subspaces. The key components of the Transformer include multi-head self-attention layers in the encoder and masked multi-head self-attention layers in the decoder. Self-attention allows the model to learn long-range dependencies in sequence data more effectively than RNNs.
Intelligent Tutoring Systems: The DynaLearn ApproachWouter Beek
The document describes the DynaLearn approach to developing intelligent tutoring systems. It focuses on using conceptual modeling to help students construct knowledge about systems. Students build qualitative models and receive feedback to improve their understanding. The approach includes several interactive learning spaces to provide guidance, diagnosis of errors, and engagement through virtual characters. The goal is to develop an environment that supports open-ended conceptual modeling to address declines in science education.
The document summarizes a presentation about applying and detecting design patterns. It discusses the need for a common description of design patterns to enable both application and detection. It presents a meta-model for describing design patterns and tools developed for applying patterns to source code using JavaXL and detecting patterns using explanation-based constraint programming (e-Constraints). The goal is to enable a "round-trip" process of seamlessly applying and detecting design patterns.
This document discusses using an explanation-based constraint programming (CP) approach to identify the use or misuse of design patterns in software code. It describes how design pattern solutions can be modeled as constraints over classes and relationships in code. The explanation-based CP system called PaLM is used to generate justifications for modifications to code that would transform a misuse into a proper use of a design pattern. Experiments applying this approach to various codebases, including JEdit and JHotDraw, showed promising results. Future work aims to improve the scalability and usability of the system.
This document discusses applying GRASP (General Responsibility Assignment Software Patterns) principles to object-oriented design. It introduces five GRASP patterns: Creator, Information Expert, Controller, Low Coupling and High Cohesion. These patterns provide guidance on assigning responsibilities to classes in a way that promotes qualities like low coupling, high cohesion, and encapsulation. The document uses a board game example to illustrate applying the Creator and Information Expert patterns in UML class diagrams and sequence diagrams.
The document describes a solution to automate design pattern application and detection in order to help implement, understand, and re-engineer object-oriented software systems. The solution includes two assistants: PatternsBox, which applies design patterns and detects complete versions; and Ptidej, which detects distorted versions and transforms source code. The assistants are based on a common formalization language (PDL) and other components. Experimental results show the assistants can accurately detect patterns in frameworks but are limited to Java and PatternsBox does not transform code. Open questions remain around formalization, application, understanding, and re-engineering of design patterns at scale.
The document discusses modular programming, which involves separating a program into independent, interchangeable modules that each contain everything needed to execute one aspect of the desired functionality. Modular programming makes programs easier to understand, manage complexity through smaller blocks of code, encourage code re-use, and allow independent development of code. It provides an example program that defines a function to find the maximum of two numbers and calls that function from the main program. Advantages of modular programming include that modules can be written and tested separately, reused, and allow large projects to be developed in parallel.
Experiments on Design Pattern DiscoveryTim Menzies
The document describes experiments conducted to discover design patterns from source code. It outlines the approach taken by DP-Miner tool, presents experiment data on four Java systems, and evaluates results by calculating precision and recall values. Benchmarks are lacking for accurately evaluating design pattern discovery techniques.
The document discusses several semantic technologies developed at the Knowledge Media Institute including:
1. Knowledge Fusion (KnoFuss) which deals with integrating knowledge from heterogeneous sources by techniques like ontology matching, coreference resolution, and conflict resolution.
2. Ontology Matching (Scarlet) which matches ontologies from different products/domains by leveraging background knowledge from external sources like the Semantic Web.
3. A new ontology matching paradigm is proposed that relies on discovering and combining online ontologies dynamically to derive mappings between terms that lack syntactic overlap or structural context.
1) The presentation discusses Caffeine, a tool for dynamic analysis of Java programs that uses Prolog predicates to model execution events and perform analyses.
2) Caffeine models execution events like field accesses, method calls, and class loads. Queries can be written in Prolog to analyze program behavior, like counting method calls.
3) The implementation has performance issues due to overhead from event generation, requiring instrumentation tricks. Analyzing complex relationships like composition is discussed.
This document discusses using explanation-based constraint programming to identify design patterns in source code. The goal is to improve software architecture quality by identifying both correct uses of design patterns and distortions from the intended pattern solution. The approach models design patterns as constraint satisfaction problems, where classes are variables and relationships between classes define constraints. It generates complete and distorted versions of patterns to explain differences between code and pattern solutions interactively. The approach has been implemented in the PaLM system and tested on examples and real programs. Future work includes adding more patterns, improving constraints, and developing automated identification with user interaction.
This presentation will introduce you to programming languages that support different programming paradigms and to give you the knowledge of basic concepts and techniques that will allow them to differentiate between various programming paradigms.
Boost delivery stream with code discipline engineeringMiro Wengner
Gang Of Four has done an amazing job of summarising and identifying common challenges that business has faced in the past. The evolution of application design has brought their work into a new context, much like the improvements to Java that have been added to the platform in recent years. Such progress leads to the conclusion that design patterns and anti-patterns need to be reconsidered. This presentation reveals how to increase delivery flow and improve the fast-feedback loop while identifying bottlenecks and removing obstacles from the codebase. During the presentation, we will uncover the nature of several anti-patterns and smoothly translate them into design patterns as required by everyday business. Together, we explore similar approaches provide by another JVM languages like Kotlin or Scala to reveal the power and simplicity of Java. This helps increase productivity while improving the quality of daily decisions supported by proper visualisation from Java Flight Recorder
This presentation describes some key features of Scala uses in the creation of machine learning algorithms:
1 Functorial definition of tensors for learning non-linear models (manifolds)
2. Monads to compose of explicit kernel functions in Euclidean space
3. Implicit class to extends Scala standard library
4. Stackable traits and dependency injection to build formal models and dynamic workflows
5. Tail recursion to implementation dynamic programming techniques
6. Streaming to reduce memory consumption for big data
7. Control of back pressure in data flows
http://patricknicolas.blogspot.com
http://bit.ly/12GjRu9
Technical and scientific applications dealing with a high computational load today face the challenge to match the increasingly parallel nature of current and future hardware. The talk shows how the increased complexity of software can be controlled by using generic programming technologies. The process and its advantages are introduced using many concrete examples, starting from simple operations on sequences (like sum/reduce or local filters), then moving into higher-dimensional applications like image processing and finally to particle methods based on dynamic neighborhood graphs.
This document summarizes a workshop on programming paradigms. It defines programming paradigms as fundamental styles of computer programming that serve as patterns or models for programming languages. The workshop covers various programming concepts like eager vs lazy evaluation, procedures vs functions, external vs internal state, concurrency, and static vs dynamic typing. It also uses examples like searching and higher order functions to illustrate differences between paradigms like Java vs Prolog and Java vs Haskell.
This presentation discusses three declarative meta-programming techniques - meta-modelling, meta-logic programming, and explanation-based constraint programming - that are used in the author's research on describing, applying, and detecting design patterns and design defects. Each technique is introduced with examples and discussions of advantages and drawbacks. Finally, the presentation describes how the techniques are combined in the Ptidej tool to load programs, dynamic information, pattern descriptions, and detect patterns.
Learning to Spot and Refactor Inconsistent Method NamesDongsun Kim
To ensure code readability and facilitate software maintenance, program methods must be named properly. In particular, method names must be consistent with the corresponding method implementations. Debugging method names remains an important topic in the literature, where various approaches analyze commonalities among method names in a large dataset to detect inconsistent method names and suggest better ones. We note that the state-of-the-art does not analyze the implemented code itself to assess consistency. We thus propose a novel automated approach to debugging method names based on the analysis of consistency between method names and method code. The approach leverages deep feature representation techniques adapted to the nature of each artifact. Experimental results on over 2.1 million Java methods show that we can achieve up to 15 percentage points improvement over the state-of-the-art, establishing a record performance of 67.9% F1-measure in identifying inconsistent method names. We further demonstrate that our approach yields up to 25% accuracy in suggesting full names, while the state-of-the-art lags far behind at 1.1% accuracy. Finally, we report on our success in fixing 66 inconsistent method names in a live study on projects in the wild.
A Brief Overview of (Static) Program Query LanguagesKim Mens
A brief introduction to some Program Query Languages and tools, part of a larger course on Programming Paradigms, taught at UCLouvain university in Belgium by Prof. Kim Mens.
Some Pitfalls with Python and Their Possible Solutions v1.0Yann-Gaël Guéhéneuc
Python is a very popular programming language that comes with many pitfalls. This presentation describes some of these pitfalls, especially when they could trick unsuspecting object-oriented developers. It proposes solutions to these pitfalls, in particular regarding inheritance, which is easily broken because of the implementation choice of Python for explicit delegation, its method resolution order, and its use of the C3 algorithm. It discusses some advantages of using Python, especially regarding meta-classes.
Advice for writing a NSERC Discovery grant application v0.5Yann-Gaël Guéhéneuc
NSERC Discovery grant applications are judged according to four criteria: (1) Excellence of the researcher, (2) Merit of the proposal, (3) Contribution to the training of HQP, and (4) Cost of research. Each criterion has six possible merit indicators: Exceptional, Outstanding, Very strong, Strong, Moderate, and Insufficient. This presentation describes the process from a candidate's point of view and a reviewer's point of view. It discusses funding decisions, including bins and ER vs. ECR. It gives some advice, including graduating PhD students, having a story, and limiting the number of main objectives.
Ptidej Architecture, Design, and Implementation in Action v2.1Yann-Gaël Guéhéneuc
A set of process, architecture, design, and implementation patterns from a real, large program, the Ptidej Tool Suite. This set shows concrete problems and their solutions in Java. It includes: Be A Profiler, Tests as Documentation, Multi-layered Architecture, Proxy Console, Proxy Disk, Hidden Language, Internal Observer, Run-time Deprecation, String Parsimony, Object Identity, Object Address, Final Construction, StringBuffer as Positioning Element.
Examples of (bad) consequences of a lack of software quality and some solutions. This presentation presents some examples of (bad) consequences of a lack of software quality, in particular how poor software quality led to the direct deaths of 89 people. It then provides some background on software quality, especially the concept of Quality Without a Name. It then discusses many principles, their usefulness, and their positive consequences on software quality. Some of these principles are well-known in object-oriented programming while many others are taken from the book 97 Programmers. They include: abstraction, encapsulation, inheritance, types, polymorphism, SOLID, GRASP, YAGNI, KISS, DRY, Do Not Reinvent the Wheel, Law of Demeter, Beware of Assumptions, Deletable Code, coding with reason, and functional programming. They pertain to dependencies, domains, and tools.
(In details: Beautify is Simplicity, The Boy Scout Rule, You Gotta Care About the Code, The Longevity of Interim Solutions, Beware the Share, Encapsulate Behaviour not Just State, Single Responsibility Principle, WET Dilutes Performance Bottlenecks, Convenience Is Not an -ility, Code in the Language of the Domain, Comment Only What the Code Cannot Say, Distinguish Business Exception from Technical, Prefer Domain-specific Types to Primitive Types, Automate Your Coding Standards, Code Layout Matters, Before You Refactor, Improve Code by Removing It, Put the Mouse Down and Step Away from the Keyboard)
Some Pitfalls with Python and Their Possible Solutions v0.9Yann-Gaël Guéhéneuc
Python is a very popular programming language that comes with many pitfalls. This presentation describes some of these pitfalls, especially when they could trick unsuspecting object-oriented developers. It proposes solutions to these pitfalls, in particular regarding inheritance, which is easily broken because of the implementation choice of Python for explicit delegation, its method resolution order, and its use of the C3 algorithm. It discusses some advantages of using Python, especially regarding meta-classes.
An Explanation of the Unicode, the Text Encoding Standard, Its Usages and Imp...Yann-Gaël Guéhéneuc
Unicode is currently the world standard for encoding text. It supports all of the world's major writing systems. With its version 15.1 of 2023/09/12, it defines 149,813 characters and 161 scripts. This presentation starts with the, seemingly, simple example of the polar bear emoji. It then defines the key terms of any such standard. It then asks how a software system can render orthographic characters into glyphs, i.e., to render characters into (combined) glyphs. It introduces the concept of abstract characters and describes a brief history of encoding standards, from ASCII to Unicode. It shows how, by adding one level of indirection, the Unicode standard answers this question. It then presents code examples to display text written in Unicode: HarfBuzz (for shaping) and FreeType (for rendering).
An Explanation of the Halting Problem and Its ConsequencesYann-Gaël Guéhéneuc
The halting problem is an important, famous, and consequential problem in computer science. It is about writing a program that decides if another problem will stop. There is no general solution to this problem, which shows that such a problem is undecidable, with important consequences: for example, it is not possible to write tests that would exhaustively test entirely an arbitrary program. This presentation was written in collaboration with <a href="https://www.iro.umontreal.ca/~hahn/">Gena Hahn</a>.
A presentation summarising FPGAs, their history, their benefits, and showing how to program them. It provides some historical background on the development of computers, from the Difference Engine to the Intel 4004 to the AMD Ryzen Threadripper PRO 3995WX. It shows how the number of transistors increased dramatically but also how this increase led to more complexity and more bugs. It then introduces Field-programmable gate arrays (FPGA) as an alternative. It then presents how to program such FPGA using data-flow graphs. It discusses some tools (Yosys, NextPnR, and IceStorm) and illustrates them with a typical "Hello World" (i.e., blinking an LED) using Cygwin on Windows 10.
A set of brief presentations of some of the women and men who made the history of computer science and software engineering.
- 1936: Alan Turing
- 1948: Claude Elwood Shannon
- 1950: Grace Murray Hopper
- 1960: John McCarthy
- 1966: Frances E. Allen
- 1967: Ole-Johan Dahl
- 1967: Kristen Nygaard
- 1969: Charles A. R. Hoare
- 1970: Edgar F. Codd
- 1972: Dave Parnas
- 1974: Manny Lehman
- 1975: Frederick Brooks
- 1986: Edward Yourdon
- 1987: Barbara Liskov
- 1994: Erich Gamma
- 1997: Grady Booch
- 2001: Butler Lampson
A tutorial on the history, use, and caveats of Java generics. Using the simple example of an interface for sort algorithms, the tutorial presents the history of generics and describes the problems being solved by generics. It also provides definitions, and examples in Java and C++, and discusses Duck Typing. It then describes two scenarios: (1) Scenario 1: you want to enforce type safety for containers and remove the need for typecasts when using these containers and (2) Scenario 2: you want to build generic algorithms that work on several types of (possibly unrelated) things. It also summarises caveats with generics, in particular type erasure.
A tutorial on reflection, with a particular emphasis on Java, with a comparison with C++, Python, and Smalltalk. It describes different scenarios in which reflection is useful, a brief history of reflection and MOPs, a comparison with C++, Python, and Smalltalk, and some particulars about Java. The source code of the examples in Java (Eclipse project), Smalltalk (Squeak image v3.10.6), Python (Eclipse project), and C++ (Eclipse projects and Visual Studio solution) are available. (C++ Eclipse projects require Mirror.) Big thanks to Matúš Chochlík and Marcus Denker for their kind and precious help with C++ and Smalltalk.
The tutorial focuses on four common problems:
- Avoid using instanceof when code must bypass the compiler and virtual machine’s choice of the method to call.
- Create external, user-defined pieces of code loaded, used, and unloaded at run-time.
- Translate data structures or object states into a format that can be stored (file, network...).
- Monitor the execution of a program to understand its behaviour, and measure its space and time complexity.
It shows working examples of Java, Smalltalk, Python, and C++ code solving the four common problems through four scenarios:
- Scenario 1: invoke an arbitrary method on an object (see the problems with instanceof and plugins).
- Scenario 2: access the complete (including private) state of an object (see the problem with serialisation).
- Scenario 3: count the number of instances of a class created at runtime (see the problem with debugging/profiling).
- Scenario 4: patch the method of a class to change its behaviour (see the problem with patching).
It also discusses the different kinds of interconnections among objects that are available in common programming languages (linking, forking, subclassing, inter-process communication, and dynamic loading/invoking), a bit of theory about reflection, and specifically the class-loading mechanism of Java.
REST APIs are nowadays the de-facto standard for Web applications. However, as more systems and services adopt the REST architectural style, many problems arise regularly. To avoid these repetitive problems, developers should follow good practices and avoid bad practices. Thus, research on good and bad practices and how to design a simple but effective REST API are essential. Yet, to the best of our knowledge, there are only a few concrete solutions to recurring REST API practices, like “API Versioning”. There are works on defining or detecting some practices, but not on solutions to the practices. We present the most up-to-date list of REST API practices and formalize them in the form of REST API (anti)patterns. We validate our design (anti)patterns with a survey and interviews of 55 developers.
Analyzing and Visualizing Projects and their Relations in Software Ecosystems presents an approach to help developers understand and navigate between projects in related software ecosystems. The approach generates word clouds from project documentation to summarize projects. It then maps relationships between word clouds to identify related projects. This allows developers to better understand the scope and connections between projects within software ecosystems.
This document presents an approach for automatically identifying antipatterns in microservice-based systems. It defines a meta-model with 13 components to capture necessary information about a system and its microservices. It also identifies 15 common microservice antipatterns. Detection rules are defined for each antipattern based on analyzing the system's source code, dependencies, configuration and other artifacts. The goal is to develop a tool based on this approach to help developers minimize antipatterns in microservice systems and improve their maintenance and evolution.
The document presents a preliminary study comparing several open-source IoT development frameworks: Eclipse Vorto, ThingML, Node-red, and OpenHab. The researchers designed the study to evaluate the frameworks' ability to support basic IoT application requirements. They implemented examples from three common IoT application categories using each framework and analyzed the results. Overall, Node-red required the least effort while the other frameworks had more limitations. Future work could study how the frameworks complement each other and implement more complex examples.
This document describes a dataset of software engineering problems in video game development extracted from over 200 postmortems published between 1997 and 2019. The dataset contains 1,035 problems across 20 problem types and is intended to summarize developers' experiences and difficulties during game development. It is available on GitHub at the listed URL.
This document summarizes research into software engineering patterns for designing machine learning systems. A survey found that ML developers have little knowledge of applicable architecture and design patterns. A literature review identified 19 scholarly papers and 19 gray documents discussing practices. The research aims to classify ML patterns according to the typical ML pipeline process and software development lifecycle. It identifies 12 architecture patterns, 13 design patterns, and 8 anti-patterns for ML systems. Future work includes documenting the patterns fully and analyzing their impact on ML system quality attributes.
This document describes a type-sensitive service identification approach called ServiceMiner to support the migration of legacy systems to service-oriented architectures. ServiceMiner uses static analysis and detection rules tailored to specific service types to identify services. It was validated on an open-source ERP system, Compiere, where it achieved higher identification accuracy than other approaches and reduced the effort required to identify architecturally significant services. The approach automates service identification, allows prioritizing types, and is extensible to new technologies.
8 Best Automated Android App Testing Tool and Framework in 2024.pdfkalichargn70th171
Regarding mobile operating systems, two major players dominate our thoughts: Android and iPhone. With Android leading the market, software development companies are focused on delivering apps compatible with this OS. Ensuring an app's functionality across various Android devices, OS versions, and hardware specifications is critical, making Android app testing essential.
Odoo releases a new update every year. The latest version, Odoo 17, came out in October 2023. It brought many improvements to the user interface and user experience, along with new features in modules like accounting, marketing, manufacturing, websites, and more.
The Odoo 17 update has been a hot topic among startups, mid-sized businesses, large enterprises, and Odoo developers aiming to grow their businesses. Since it is now already the first quarter of 2024, you must have a clear idea of what Odoo 17 entails and what it can offer your business if you are still not aware of it.
This blog covers the features and functionalities. Explore the entire blog and get in touch with expert Odoo ERP consultants to leverage Odoo 17 and its features for your business too.
An Overview of Odoo ERP
Odoo ERP was first released as OpenERP software in February 2005. It is a suite of business applications used for ERP, CRM, eCommerce, websites, and project management. Ten years ago, the Odoo Enterprise edition was launched to help fund the Odoo Community version.
When you compare Odoo Community and Enterprise, the Enterprise edition offers exclusive features like mobile app access, Odoo Studio customisation, Odoo hosting, and unlimited functional support.
Today, Odoo is a well-known name used by companies of all sizes across various industries, including manufacturing, retail, accounting, marketing, healthcare, IT consulting, and R&D.
The latest version, Odoo 17, has been available since October 2023. Key highlights of this update include:
Enhanced user experience with improvements to the command bar, faster backend page loading, and multiple dashboard views.
Instant report generation, credit limit alerts for sales and invoices, separate OCR settings for invoice creation, and an auto-complete feature for forms in the accounting module.
Improved image handling and global attribute changes for mailing lists in email marketing.
A default auto-signature option and a refuse-to-sign option in HR modules.
Options to divide and merge manufacturing orders, track the status of manufacturing orders, and more in the MRP module.
Dark mode in Odoo 17.
Now that the Odoo 17 announcement is official, let’s look at what’s new in Odoo 17!
What is Odoo ERP 17?
Odoo 17 is the latest version of one of the world’s leading open-source enterprise ERPs. This version has come up with significant improvements explained here in this blog. Also, this new version aims to introduce features that enhance time-saving, efficiency, and productivity for users across various organisations.
Odoo 17, released at the Odoo Experience 2023, brought notable improvements to the user interface and added new functionalities with enhancements in performance, accessibility, data analysis, and management, further expanding its reach in the market.
What to do when you have a perfect model for your software but you are constrained by an imperfect business model?
This talk explores the challenges of bringing modelling rigour to the business and strategy levels, and talking to your non-technical counterparts in the process.
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesQuickdice ERP
Explore the seamless transition to e-invoicing with this comprehensive guide tailored for Saudi Arabian businesses. Navigate the process effortlessly with step-by-step instructions designed to streamline implementation and enhance efficiency.
The Rising Future of CPaaS in the Middle East 2024Yara Milbes
Explore "The Rising Future of CPaaS in the Middle East in 2024" with this comprehensive PPT presentation. Discover how Communication Platforms as a Service (CPaaS) is transforming communication across various sectors in the Middle East.
WWDC 2024 Keynote Review: For CocoaCoders AustinPatrick Weigel
Overview of WWDC 2024 Keynote Address.
Covers: Apple Intelligence, iOS18, macOS Sequoia, iPadOS, watchOS, visionOS, and Apple TV+.
Understandable dialogue on Apple TV+
On-device app controlling AI.
Access to ChatGPT with a guest appearance by Chief Data Thief Sam Altman!
App Locking! iPhone Mirroring! And a Calculator!!
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...kalichargn70th171
In today's fiercely competitive mobile app market, the role of the QA team is pivotal for continuous improvement and sustained success. Effective testing strategies are essential to navigate the challenges confidently and precisely. Ensuring the perfection of mobile apps before they reach end-users requires thoughtful decisions in the testing plan.
Top Benefits of Using Salesforce Healthcare CRM for Patient Management.pdfVALiNTRY360
Salesforce Healthcare CRM, implemented by VALiNTRY360, revolutionizes patient management by enhancing patient engagement, streamlining administrative processes, and improving care coordination. Its advanced analytics, robust security, and seamless integration with telehealth services ensure that healthcare providers can deliver personalized, efficient, and secure patient care. By automating routine tasks and providing actionable insights, Salesforce Healthcare CRM enables healthcare providers to focus on delivering high-quality care, leading to better patient outcomes and higher satisfaction. VALiNTRY360's expertise ensures a tailored solution that meets the unique needs of any healthcare practice, from small clinics to large hospital systems.
For more info visit us https://valintry360.com/solutions/health-life-sciences
Project Management: The Role of Project Dashboards.pdfKarya Keeper
Project management is a crucial aspect of any organization, ensuring that projects are completed efficiently and effectively. One of the key tools used in project management is the project dashboard, which provides a comprehensive view of project progress and performance. In this article, we will explore the role of project dashboards in project management, highlighting their key features and benefits.
Baha Majid WCA4Z IBM Z Customer Council Boston June 2024.pdfBaha Majid
IBM watsonx Code Assistant for Z, our latest Generative AI-assisted mainframe application modernization solution. Mainframe (IBM Z) application modernization is a topic that every mainframe client is addressing to various degrees today, driven largely from digital transformation. With generative AI comes the opportunity to reimagine the mainframe application modernization experience. Infusing generative AI will enable speed and trust, help de-risk, and lower total costs associated with heavy-lifting application modernization initiatives. This document provides an overview of the IBM watsonx Code Assistant for Z which uses the power of generative AI to make it easier for developers to selectively modernize COBOL business services while maintaining mainframe qualities of service.
The Key to Digital Success_ A Comprehensive Guide to Continuous Testing Integ...kalichargn70th171
In today's business landscape, digital integration is ubiquitous, demanding swift innovation as a necessity rather than a luxury. In a fiercely competitive market with heightened customer expectations, the timely launch of flawless digital products is crucial for both acquisition and retention—any delay risks ceding market share to competitors.
Consistent toolbox talks are critical for maintaining workplace safety, as they provide regular opportunities to address specific hazards and reinforce safe practices.
These brief, focused sessions ensure that safety is a continual conversation rather than a one-time event, which helps keep safety protocols fresh in employees' minds. Studies have shown that shorter, more frequent training sessions are more effective for retention and behavior change compared to longer, infrequent sessions.
Engaging workers regularly, toolbox talks promote a culture of safety, empower employees to voice concerns, and ultimately reduce the likelihood of accidents and injuries on site.
The traditional method of conducting safety talks with paper documents and lengthy meetings is not only time-consuming but also less effective. Manual tracking of attendance and compliance is prone to errors and inconsistencies, leading to gaps in safety communication and potential non-compliance with OSHA regulations. Switching to a digital solution like Safelyio offers significant advantages.
Safelyio automates the delivery and documentation of safety talks, ensuring consistency and accessibility. The microlearning approach breaks down complex safety protocols into manageable, bite-sized pieces, making it easier for employees to absorb and retain information.
This method minimizes disruptions to work schedules, eliminates the hassle of paperwork, and ensures that all safety communications are tracked and recorded accurately. Ultimately, using a digital platform like Safelyio enhances engagement, compliance, and overall safety performance on site. https://safelyio.com/
E-commerce Development Services- Hornet DynamicsHornet Dynamics
For any business hoping to succeed in the digital age, having a strong online presence is crucial. We offer Ecommerce Development Services that are customized according to your business requirements and client preferences, enabling you to create a dynamic, safe, and user-friendly online store.
Using Query Store in Azure PostgreSQL to Understand Query PerformanceGrant Fritchey
Microsoft has added an excellent new extension in PostgreSQL on their Azure Platform. This session, presented at Posette 2024, covers what Query Store is and the types of information you can get out of it.
Measures in SQL (SIGMOD 2024, Santiago, Chile)Julian Hyde
SQL has attained widespread adoption, but Business Intelligence tools still use their own higher level languages based upon a multidimensional paradigm. Composable calculations are what is missing from SQL, and we propose a new kind of column, called a measure, that attaches a calculation to a table. Like regular tables, tables with measures are composable and closed when used in queries.
SQL-with-measures has the power, conciseness and reusability of multidimensional languages but retains SQL semantics. Measure invocations can be expanded in place to simple, clear SQL.
To define the evaluation semantics for measures, we introduce context-sensitive expressions (a way to evaluate multidimensional expressions that is consistent with existing SQL semantics), a concept called evaluation context, and several operations for setting and modifying the evaluation context.
A talk at SIGMOD, June 9–15, 2024, Santiago, Chile
Authors: Julian Hyde (Google) and John Fremlin (Google)
https://doi.org/10.1145/3626246.3653374
1. Traceability of patterns for the
understanding and the quality
of object-oriented programs
Yann-Gaël Guéhéneuc
École des Mines
de Nantes, France
Object Technology
International, Inc., Canada
yann-gael@gueheneuc.net
www.yann-gael.gueheneuc.net
4. 3/64
Context
n Quality of object-oriented programs
n Quality of object-oriented program
architectures
5. 4/64
Motivations
n To ease the understanding of a program
architecture to improve its quality
« A style, individual or collective, is a
signature allowing recognition. » [Compagnon02]
22. 11/64
Conclusion on the example
n You identified idioms in the given pieces
of source code
n These idioms are motifs in a program
source code
n These motifs connote a recognized
style of programming
23. 12/64
Motivations
n To ease the understanding of a program
architecture to improve its quality
èTo identify motifs in the program
architecture
24. 13/64
Problems
n What motifs and what model for these
motifs?
n What model for the program
architecture?
n How to perform the identification?
25. 14/64
Our solution
n What motifs and what model for these
motifs?
n What model for the program
architecture?
n How to perform the identification?
26. 14/64
Our solution
n What motifs and what model for these
motifs?
n What model for the program
architecture?
n How to perform the identification?
Design patterns and
the PDL meta-model
27. 14/64
Our solution
n What motifs and what model for these
motifs?
n What model for the program
architecture?
n How to perform the identification?
Design patterns and
the PDL meta-model
Meta-modeling
28. 14/64
Our solution
n What motifs and what model for these
motifs?
n What model for the program
architecture?
n How to perform the identification?
Design patterns and
the PDL meta-model
Meta-modeling
29. 15/64
Our solution
n Design patterns from the Gang of Four
[Gamma94]
n Meta-model PDL [Albin-Amiot03, chapter 3]
– Model of design pattern solutions
– Manual mechanisms
30. 16/64
Our solution
n Meta-model PADL
– Extension of PDL
– Program architecture
• Classes
• Relations among classes
– Automated mechanisms
• Static analyses
• Dynamic Analyses
31. 17/64
Our solution
n Constraint satisfaction problem solved
with explanation-based constraint
programming
èTraceability of patterns for the
understanding and the quality of
object-oriented programs
32. 18/64
Design patterns
n [Alexander77, Gamma94] : sets
〈name, problem, solution, trade-offs〉
n Name a recurring problem, its solution
and the associated trade-offs
èDesign pattern solution
= design motif which connotes an
elegant architecture
33. 18/64
Design patterns
n [Alexander77, Gamma94] : sets
〈name, problem, solution, trade-offs〉
n Name a recurring problem, its solution
and the associated trade-offs
èDesign pattern solution
= design motif which connotes an
elegant architecture
34. 18/64
Design patterns
n [Alexander77, Gamma94] : sets
〈name, problem, solution, trade-offs〉
n Name a recurring problem, its solution
and the associated trade-offs
èDesign pattern solution
= design motif which connotes an
elegant architecture
35. 19/64
The Composite design pattern –
problem [Gamma94]
n To compose objects in a tree-like
structure to describe whole–part
hierarchies
n To let a client uniformly manipulate
objects and compositions of objects
36. 20/64
n Design motif
The Composite design pattern –
solution
Component
operation()
Leaf
operation()
Composite
add(Component)
remove(Component)
getComponent(int)
operation()
ramification
For each components
component.operation()
1..n
Client
37. 21/64
The Composite design pattern –
example
n Micro-architecture (instance of the motif)
Graphics
draw()
Text
draw()
Image
add(Graphics)
remove(Graphics)
getGraphics(int)
draw()
graphicComponents
For each graphicComponents
graphicComponent.draw()
1..n
Line
draw()
Rectangle
draw()
38. 22/64
The JHotDraw program –
example [Gamma98]
n 2D drawing
n Erich Gamma and
Thomas Eggenschwiler
n Design patterns
41. 24/64
Problem
How to identify
in the architecture
of a program
micro-architectures
similar to
design motifs
to explain the
problem solved?
Figure
CompositeFigureAttributeFigure PolyLineFigureDecoratorFigure
To compose objects
in a tree-like structure
to describe whole–part
hierarchies
Frame
DrawingEditor
Tool
Handle
Panel
DrawingView
Drawing
Figure
AbstractFigure
CompositeFigureAttributeFigure PolyLineFigureDecoratorFigure
Component
operation()
Leaf
operation()
Composite
add(Component )
remove(Component )
getComponent (int)
operation()
ramification
For each components
component.operation ()
1..n
Client
42. 24/64
Problem
How to identify
in the architecture
of a program
micro-architectures
similar to
design motifs
to explain the
problem solved?
Figure
CompositeFigureAttributeFigure PolyLineFigureDecoratorFigure
To compose objects
in a tree-like structure
to describe whole–part
hierarchies
Frame
DrawingEditor
Tool
Handle
Panel
DrawingView
Drawing
Figure
AbstractFigure
CompositeFigureAttributeFigure PolyLineFigureDecoratorFigure
Component
operation()
Leaf
operation()
Composite
add(Component )
remove(Component )
getComponent (int)
operation()
ramification
For each components
component.operation ()
1..n
Client
CompositeFigureAttributeFigure PolyLineFigureDecoratorFigure
43. 24/64
Problem
How to identify
in the architecture
of a program
micro-architectures
similar to
design motifs
to explain the
problem solved?
Figure
CompositeFigureAttributeFigure PolyLineFigureDecoratorFigure
To compose objects
in a tree-like structure
to describe whole–part
hierarchies
Frame
DrawingEditor
Tool
Handle
Panel
DrawingView
Drawing
Figure
AbstractFigure
CompositeFigureAttributeFigure PolyLineFigureDecoratorFigure
Component
operation()
Leaf
operation()
Composite
add(Component )
remove(Component )
getComponent (int)
operation()
ramification
For each components
component.operation ()
1..n
Client
CompositeFigureAttributeFigure PolyLineFigureDecoratorFigure
Component
operation()
Leaf
operation()
Composite
add(Component
remove(Component
getComponent
1..
Client
44. 24/64
Problem
How to identify
in the architecture
of a program
micro-architectures
similar to
design motifs
to explain the
problem solved?
Figure
CompositeFigureAttributeFigure PolyLineFigureDecoratorFigure
To compose objects
in a tree-like structure
to describe whole–part
hierarchies
Frame
DrawingEditor
Tool
Handle
Panel
DrawingView
Drawing
Figure
AbstractFigure
CompositeFigureAttributeFigure PolyLineFigureDecoratorFigure
Component
operation()
Leaf
operation()
Composite
add(Component )
remove(Component )
getComponent (int)
operation()
ramification
For each components
component.operation ()
1..n
Client
CompositeFigureAttributeFigure PolyLineFigureDecoratorFigure
Component
operation()
Leaf
operation()
Composite
add(Component
remove(Component
getComponent
1..
Client
operation()
Leaf
operation()
Composite
add(Component )
remove(Component )
getComponent (int)
operation()
ramification
For each components
component.operation ()
45. 25/64
Characteristics
n Hypotheses (for today J)
– Model of the architecture
– Model of the design motif
n Similarities
– Precise ⇒ the architecture is elegant
– Loose ⇒ to explain why and to offer
possible modifications
46. 26/64
Characteristics
èNo a priori descriptions of similarities
èJustification of the identified micro-
architectures
èStrong interaction with the developers
48. 28/64
CSP
n Putting together pieces of a car
V = {top, sides, roof}
C = {top ↔ sides, sides ↔ roof,
top ↔ roof}
D = {〈red, green, blue〉, 〈green, black〉,
〈green, blue, yellow〉}
49. 29/64
n Solution
– Instantiation
• top = 〈green〉
– Propagation
• top ↔ sides ⇒ sides = 〈green〉
• top ↔ roof ⇒ roof = 〈green〉
– Satisfaction
• sides ↔ roof
top
sides
roof
CSP
50. 29/64
n Solution
– Instantiation
• top = 〈green〉
– Propagation
• top ↔ sides ⇒ sides = 〈green〉
• top ↔ roof ⇒ roof = 〈green〉
– Satisfaction
• sides ↔ roof
top
sides
roof
CSP
51. 29/64
n Solution
– Instantiation
• top = 〈green〉
– Propagation
• top ↔ sides ⇒ sides = 〈green〉
• top ↔ roof ⇒ roof = 〈green〉
– Satisfaction
• sides ↔ roof
top
sides
roof
CSP
52. 29/64
n Solution
– Instantiation
• top = 〈green〉
– Propagation
• top ↔ sides ⇒ sides = 〈green〉
• top ↔ roof ⇒ roof = 〈green〉
– Satisfaction
• sides ↔ roof
top
sides
roof
CSP
53. 29/64
n Solution
– Instantiation
• top = 〈green〉
– Propagation
• top ↔ sides ⇒ sides = 〈green〉
• top ↔ roof ⇒ roof = 〈green〉
– Satisfaction
• sides ↔ roof
top
sides
roof
CSP
54. 29/64
n Solution
– Instantiation
• top = 〈green〉
– Propagation
• top ↔ sides ⇒ sides = 〈green〉
• top ↔ roof ⇒ roof = 〈green〉
– Satisfaction
• sides ↔ roof
top
sides
roof
CSP
55. 30/64
CSP
n CSP deducted from
– Model of the design motif
• Participants → variables
• Relations among participants → constraints
– Model of the architecture of the program
• Classes of the program → domain
• Relations among classes of the program →
semantics of the constraints
56. 31/64
CSP
n Model of the Composite design motif
– Three participants ⇒ three variables
• component
• leaf
• composite
Component
operation()
Leaf
operation()
Composite
add(Component)
remove(Component)
getComponent(int)
operation()
ramification
For each components
component.operation()
1..n
Client
57. 32/64
CSP
n Model of the Composite design motif
– Relations among participants ⇒ constraints
• leaf < component
• composite < component
• composite u component
• Differences between classes
Component
operation()
Leaf
operation()
Composite
add(Component)
remove(Component)
getComponent(int)
operation()
ramification
For each components
component.operation()
1..n
Client
58. 32/64
CSP
n Model of the Composite design motif
– Relations among participants ⇒ constraints
• leaf < component
• composite < component
• composite u component
• Differences between classes
Component
operation()
Leaf
operation()
Composite
add(Component)
remove(Component)
getComponent(int)
operation()
ramification
For each components
component.operation()
1..n
Client
Differences between classes
59. 33/64
Relations among
classes, attributes
+
n Model of the architecture of the
JHotDraw program
– Classes of the program ⇒ domain
• DrawingEditor
• DrawingView
• Tool
• Drawing
• …
CSP
Frame
DrawingEditor
Tool
Handle
Panel
DrawingView
Drawing
Figure
AbstractFigure
CompositeFigureAttributeFigure PolyLineFigureDecoratorFigure
60. 33/64
Relations among
classes, attributes
+
n Model of the architecture of the
JHotDraw program
– Classes of the program ⇒ domain
• DrawingEditor
• DrawingView
• Tool
• Drawing
• …
CSP
Frame
DrawingEditor
Tool
Handle
Panel
DrawingView
Drawing
Figure
AbstractFigure
CompositeFigureAttributeFigure PolyLineFigureDecoratorFigure
Relations among
classes, attributes
+
61. 34/64
CSP
n Identification of the micro-architectures
similar to the Composite design motif
V = {component, leaf, composite}
C = {leaf < component, composite <
component, composite u component}
D = {〈DrawingEditor, DrawingView…〉}
62. 35/64
Constraint programming (CP) [Tsang93]
n Paradigm of resolution of CSP
n Resolution = to execute an algorithm to
get the solutions of a CSP
n Chronological backtrack, intelligent
backtrack, retrospective, prospective,
retro-prospective algorithms
63. 36/64
CP
n Solution
– ∃ instantiation of the variables all
constraints are satisfied
– Complete instantiation
– sides = 〈green〉 , roof = 〈green〉, top =
〈green〉
n Contradiction (no solution)
– Domain of a variable empty
64. 37/64
Explanation-based constraint
programming (e-CP) [Jussien01]
n Retro-prospective algorithm
– Reparation
• No more chronological backtrack
• Operations of removals from or restorations in
domains
n Tool : explanations
– Subset of the operations which leads to a
contradiction
– Dynamic management
65. 38/64
e-CP
n Solution
– ∃ operations of removals from or
restorations in domains complete
instantiation
n Contradiction
– Subset of the operations which leads to a
contradiction
– Set of explanations
66. 39/64
e-CP
V = {top, sides, roof}
C = {top ↔ sides, sides ↔ roof,
top ↔ roof}
D = {〈red, green, blue〉, 〈green, black〉,
〈green, blue, yellow〉}
top = 〈green〉 ∧ sides ↔ roof
→ ¬sides = 〈black〉
⇒ removal of black from the domain
67. 39/64
e-CP
V = {top, sides, roof}
C = {top ↔ sides, sides ↔ roof,
top ↔ roof}
D = {〈red, green, blue〉, 〈green, black〉,
〈green, blue, yellow〉}
top = 〈green〉 ∧ sides ↔ roof
→ ¬sides = 〈black〉
⇒ removal of black from the domain
ç
68. 39/64
e-CP
V = {top, sides, roof}
C = {top ↔ sides, sides ↔ roof,
top ↔ roof}
D = {〈red, green, blue〉, 〈green, black〉,
〈green, blue, yellow〉}
top = 〈green〉 ∧ sides ↔ roof
→ ¬sides = 〈black〉
⇒ removal of black from the domain
ç
ç
82. 45/64
Problem relaxation [Petit02]
n To remove the constraint leading to a
contradiction
– composite u component
V = {component, leaf, composite}
C = {leaf < component, composite <
component, composite u component}
D = {〈DrawingEditor, DrawingView…〉}
83. 45/64
Problem relaxation [Petit02]
n To remove the constraint leading to a
contradiction
– composite u component
V = {component, leaf, composite}
C = {leaf < component, composite <
component, composite u component}
D = {〈DrawingEditor, DrawingView…〉}
87. 47/64
Constraint relaxation
n To replace a constraint with a weaker
constraint
– composite u component
– composite w component
V = {component, leaf, composite}
C = {leaf < component, composite <
component, composite u component}
D = {〈DrawingEditor, DrawingView…〉}
88. 47/64
Constraint relaxation
n To replace a constraint with a weaker
constraint
– composite u component
– composite w component
V = {component, leaf, composite}
C = {leaf < component, composite <
component, composite u component}
D = {〈DrawingEditor, DrawingView…〉}
Composition
89. 47/64
Constraint relaxation
n To replace a constraint with a weaker
constraint
– composite u component
– composite w component
V = {component, leaf, composite}
C = {leaf < component, composite <
component, composite u component}
D = {〈DrawingEditor, DrawingView…〉}
Composition
Aggregation
90. 47/64
Constraint relaxation
n To replace a constraint with a weaker
constraint
– composite u component
– composite w component
V = {component, leaf, composite}
C = {leaf < component, composite <
component, composite u component}
D = {〈DrawingEditor, DrawingView…〉}
Composition
Aggregation
w
91. 48/64
n To replace a constraint with a different
constraint
– leaf < component
– leaf < component
V = {component, leaf, composite}
C = {leaf < component, composite <
component, composite u component}
D = {〈DrawingEditor, DrawingView…〉}
Constraint relaxation
<
92. 48/64
n To replace a constraint with a different
constraint
– leaf < component
– leaf < component
V = {component, leaf, composite}
C = {leaf < component, composite <
component, composite u component}
D = {〈DrawingEditor, DrawingView…〉}
Constraint relaxation
<
Direct inheritance
93. 48/64
n To replace a constraint with a different
constraint
– leaf < component
– leaf < component
V = {component, leaf, composite}
C = {leaf < component, composite <
component, composite u component}
D = {〈DrawingEditor, DrawingView…〉}
Constraint relaxation
<
Direct inheritance
Indirect inheritance
94. 48/64
n To replace a constraint with a different
constraint
– leaf < component
– leaf < component
V = {component, leaf, composite}
C = {leaf < component, composite <
component, composite u component}
D = {〈DrawingEditor, DrawingView…〉}
Constraint relaxation
<
Direct inheritance
Indirect inheritance
<< <<
98. 50/64
Constraint weight
n Predefined order of problem relaxation
and constraint relaxation
– Experience of the developers
90 : Composition → aggregation
50 : Direct inheritance → Indirect
inheritance
102. 52/64
Conclusion
n Similarities
– Precise ⇒ the architecture is elegant
– Loose ⇒ to explain why and to offer
possible modifications
èNo a priori descriptions of the
similarities
èJustification of the identified micro-
architectures
èStrong interaction with the developers
103. 52/64
Conclusion
n Similarities
– Precise ⇒ the architecture is elegant
– Loose ⇒ to explain why and to offer
possible modifications
èNo a priori descriptions of the
similarities
èJustification of the identified micro-
architectures
èStrong interaction with the developers
ü
104. 52/64
Conclusion
n Similarities
– Precise ⇒ the architecture is elegant
– Loose ⇒ to explain why and to offer
possible modifications
èNo a priori descriptions of the
similarities
èJustification of the identified micro-
architectures
èStrong interaction with the developers
ü
ü
105. 52/64
Conclusion
n Similarities
– Precise ⇒ the architecture is elegant
– Loose ⇒ to explain why and to offer
possible modifications
èNo a priori descriptions of the
similarities
èJustification of the identified micro-
architectures
èStrong interaction with the developers
ü
ü
ü
107. 54/64
Implementation
n Constraints
– Direct, indirect, strict inheritance
– Knowledge, association, aggregation,
composition, ignorance, creation
– Association distance, depth in the
inheritance tree
n Design motifs
– Composite, Façade, Abstract Factory…
108. 55/64
n Ptidej (Pattern Trace Identification, Detection, and Enhancement in Java) [Guéhéneuc01]
PaLM
Identified micro-architectures
PDL
Java Source code
Model of the architecture
Uses
Produces
Ptidej
Model of the design motifs
Introspector (PDL) JavaXL
Implementation
109. 55/64
n Ptidej (Pattern Trace Identification, Detection, and Enhancement in Java) [Guéhéneuc01]
PaLM
Identified micro-architectures
PDL
Java Source code
Model of the architecture
Uses
Produces
Ptidej
Model of the design motifs
Introspector (PDL) JavaXL
Implementation
PaLM
JavaXL
112. 58/64
Evaluation
n Difficult
– No other existing tools
– Differing semantics
n Need for a methodology [Albin-Amiot03, chapter 6]
– Postulate
– Hypotheses, interpretation of the pattern
– Extent of the motif identification
118. 61/64
Our contributions
n Meta-modeling
– Program architecture (PADL)
• Definitions, automated mechanisms
– Design motifs (PDL) [Albin-Amiot03, chapter 3]
• Manual mechanisms
n Application of CSP to our software
engineering problem
119. 61/64
Our contributions
n Meta-modeling
– Program architecture (PADL)
• Definitions, automated mechanisms
– Design motifs (PDL) [Albin-Amiot03, chapter 3]
• Manual mechanisms
n Application of CSP to our software
engineering problem
120. 62/64
Limitations, perspectives
n Modeling motifs
– Structural design motifs
– Behavioural? Creational?
n Resolution of CSP
– Specialized algorithms
– Automation
– Interactions
– Scaling
121. 63/64
Limitations, perspectives
n Results of the identification
– Micro-architectures
• Weaker forms of a design motif
• Not a design motif (discovery?)
– Visualisation
• Model of the architectures
• Model of the design motifs
• Identified micro-architectures
• Solved problems
122. 64/64
Perspectives
n Design defects
– Program transformation
n Specialized motifs
– Quality characteristics
n Integration in the software development
process of the tool
– Evaluation
123. 65/64
[Albin-Amiot03] Hervé Albin-Amiot ; Idiomes et patterns Java : application à la synthèse de code et à la
détection ; Thèse de doctorat de l’université de Nantes, février 2003
[Alexander77] Christopher Alexander, Sara Ishikawa, Murray Silverstein, Max Jacobson, Ingrid Fiksdahl-King
and Shlomo Angel ; A Pattern Language ; Oxford University Press, 1977, ISBN 0-19-501919-9.
[Caseau96] Yves Caseau and François Laburthe ; Claire: Combining Objects and Rules for Problem Solving ;
Proceedings of JICSLP, workshop on Multi-Paradigm Logic Programming, pages 105–114, TU Berlin,
September 1996.
[Compagnon02] Antoine Compagnon ; La notion de genre – Introduction : forme, style et genre littéraire ;
Décembre 2002, disponible à www.fabula.org/compagnon/genre1.php.
[Gamma94] Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides ; Design Patterns – Elements of
Reusable Object-Oriented Software ; Addison-Wesley, 1994, ISBN 0-201-63361-2.
[Gamma98] Erich Gamma et Thomas Eggenschwiler ; JHotDraw ; Disponible à members.pingnet
.ch/gamma/JHD-5.1.zip et sur sourceforge.net.
[Guéhéneuc01] Yann-Gaël Guéhéneuc and Hervé Albin-Amiot ; Using Design Patterns and Constraints to
Automate the Detection and Correction of Inter-Class Design Defects ; Proceedings of the 39th TOOLS
USA conference, pages 296—305, IEEE Computer Society Press, July 2001.
[Jussien00] Narendra Jussien and Vincent Barichard ; The PaLM System: Explanation-Based Constraint
Programming ; Proceedings of TRICS, pages 118–133, National University of Singapore, September, 2000.
[Jussien01] Narendra Jussien ; Programmation par contraintes avec explications ; actes des 7e JNPC, pages
147–158, ONERA, juin 2001.
[Laburthe00] François Laburthe et le projet OCRE ; Choco : implémentation du noyau d'un système de
contraintes ; actes des 6e JNPC, pages 151–165, ONERA, juin 2000.
[Montanari74] Ugo Montanari ; Networks of constraints fundamental properties and applications to picture
processing ; Information Science, volume 7, number 2, pages 95–132, Elsevier Science, 1974.
[Petit02] Thierry Petit ; Modélisation et Algorithmes de Résolution de Problèmes Sur-Contraints ; Thèse de
doctorat de l’université du Languedoc, novembre 2002.
[OTI-IBM01] Object Technology International, Inc. / IBM ; Éclipse – Un plate-forme d’outillage universelle ;
Disponible à www.eclipse.org.
[Tsang93] Edward Tsang ; Foundations of Constraint Satisfaction ; Academic Press, 1993, ISBN 0-127-01610-4.
125. 67/64
e-CP
n Applications
– Assistance in case of contradiction
– Algorithms de interactive resolution
– New resolution algorithms
• Path-repair [Jussien02]
• Mac-DBT [Jussien00]
[Jussien02] Narendra Jussien and Olivier Lhomme ; Local search with constraint propagation and conflict-based
heuristics ; Journal of Artificial Intelligence, volume 139, number 1, pages 21–45, Elsevier Science,
July 2002.
[Jussien00] Narendra Jussien, Romuald Debruyne, and Patrice Boizumault ; Maintaining Arc-Consistency within
Dynamic Backtracking ; Proceedings of CP, pages 249–261, Springer-Verlag, September 2000.
126. 68/64
Some related work
n Modeling
– First-order logic [Eden00]
– Fragment-based model [Florijn97]
n Application
– Generating scripts [Budinsky96]
– Meta-logic programming [Eden97]
n Identification
– Logic programming (DMP J) [Wuyts98]
– Filters (metrics) [Antoniol98]
127. 69/64
Some related work
[Antoniol98] Giuliano Antoniol, Roberto Fiutem, and L. Cristoforetti ; Design Pattern Recovery in Object-Oriented
Software ; Proceedings of the 6th workshop on Program Comprehension, pages 153–160, IEEE Computer
Society Press, June 1998.
[Budinsky96] Frank J. Budinsky, Marilyn A. Finnie, John M. Vlissides, and Patsy S. Yu ; Automatic Code
Generation from Design Patterns ; IBM Systems Journal 35 (2), pages 151–171, February 1996.
[Eden97] Amnon H. Eden, Amiram Yehudai, and Joseph (Yossi) Gil ; Precise Specification and Automatic
Application of Design Patterns ; Proceedings of the 12th ASE conference, pages 143–152, IEEE Computer
Society Press, November 1997.
[Eden00] Amnon H. Eden ; Precise Specification of Design Patterns and Tool Support in their Application ; Ph.D.
thesis, Tel Aviv University, 2000.
[Florijn97] Gert Florijn, Marco Meijers, and Pieter Van Winsen ; Tool Support for Object-Oriented Patterns ;
Proceedings of the 11th ECOOP conference, Springer-Verlag, June 1997.
[Wuyts98] Roel Wuyts ; Declarative Reasoning About the Structure of Object-Oriented Systems ; Proceedings of
the 26th TOOLS USA conference, pages 112–124, IEEE Computer Society Press, August 1998.