Intentional source-code views

Slides:



Advertisements
Similar presentations
25 February 2009Instructor: Tasneem Darwish1 University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department.
Advertisements

CS 355 – Programming Languages
Software Testing and Quality Assurance
1 Programming for Engineers in Python Autumn Lecture 5: Object Oriented Programming.
Overview of Software Requirements
Sharif University of Technology1 Design and Use-case Realization Software Engineering Laboratory Fall 2006.
Describing Syntax and Semantics
Introduction to Software Design Chapter 1. Chapter 1: Introduction to Software Design2 Chapter Objectives To become familiar with the software challenge.
OBJECT ORIENTED PROGRAMMING IN C++ LECTURE
Computer Architecture Computational Models Ola Flygt V ä xj ö University
A Z Approach in Validating ORA-SS Data Models Scott Uk-Jin Lee Jing Sun Gillian Dobbie Yuan Fang Li.
An Introduction to Design Patterns. Introduction Promote reuse. Use the experiences of software developers. A shared library/lingo used by developers.
What is MOF? The Meta Object Facility (MOF) specification provides a set of CORBA interfaces that can be used to define and manipulate a set of interoperable.
11 Chapter 11 Object-Oriented Databases Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
A Novel Approach to Architectural Recovery in Evolving Object- Oriented Systems PhD thesis Koen De Hondt December 11, 1998.
ISBN Chapter 3 Describing Semantics -Attribute Grammars -Dynamic Semantics.
A language to describe software texture in abstract design models and implementation.
1 Introduction to Software Engineering Lecture 1.
A Logic Meta-Programming Approach to support the Co-Evolution of Object-Oriented Design and Implementation Roel Wuyts , PROG.
3.2 Semantics. 2 Semantics Attribute Grammars The Meanings of Programs: Semantics Sebesta Chapter 3.
Object-Oriented Programming Chapter Chapter
A Formal Model for Object-Oriented Software Reuse Kim Mens Programming Technology Lab Vrije Universiteit Brussel FNRS MeetingMay 6th, 1997.
CSC3315 (Spring 2009)1 CSC 3315 Languages & Compilers Hamid Harroud School of Science and Engineering, Akhawayn University
1 SWE Introduction to Software Engineering Lecture 14 – System Modeling.
1 Declaratively Codifying Software Architectures Using Virtual Software Classifications Kim Mens Kim Mens, Roel Wuyts, Theo D’Hondt Programming Technology.
October 19, 1998Doctoral Symposium OOPSLA’98 Kim Mens Intentional annotations for evolving object-oriented software Kim Mens Programming Technology Lab.
2000 Research Overview Dr. Kim Mens Programming Technology Lab Vrije Universiteit Brussel.
CSCE 240 – Intro to Software Engineering Lecture 3.
Definition and Technologies Knowledge Representation.
Model Checking Early Requirements Specifications in Tropos Presented by Chin-Yi Tsai.
Engineering, 7th edition. Chapter 8 Slide 1 System models.
Databases and DBMSs Todd S. Bacastow January 2005.
Microsoft Foundation Classes MFC
Describing Syntax and Semantics
Algorithms and Problem Solving
Software Engineering Lecture 4 System Modeling The Analysis Stage.
Integrating SysML with OWL (or other logic based formalisms)
Policy-oriented Enterprise Management for SAP Business Modeling
Software Requirements
SysML 2.0 Formalism: Requirement Benefits, Use Cases, and Potential Language Architectures Formalism WG December 6, 2016.
CSCE 548 Secure Software Development Use Cases Misuse Cases
2.3 Collaboration Contracts
XML QUESTIONS AND ANSWERS
Principles of Programming and Software Engineering
C++ Classes & Object Oriented Programming
Business Process Measures
Abstract descriptions of systems whose requirements are being analysed
Daniel Amyot and Jun Biao Yan
HCI in the software process
A Declarative Evolution Framework for Object-Oriented Design Patterns
UML Class Diagrams: Basic Concepts
Chapter 2 Database Environment Pearson Education © 2009.
Data, Databases, and DBMSs
ece 720 intelligent web: ontology and beyond
Electrical and Computer Engineering Department
HCI in the software process
Metadata Framework as the basis for Metadata-driven Architecture
Ontology-Based Approaches to Data Integration
Focus of the Course Object-Oriented Software Development
HCI in the software process
Automated Analysis and Code Generation for Domain-Specific Models
Dr. Jiacun Wang Department of Software Engineering Monmouth University
Human Computer Interaction Lecture 14 HCI in Software Process
Lecture 10 Concepts of Programming Languages
Computer Science 340 Software Design & Testing
Chapter 2 Database Environment Pearson Education © 2009.
Subject Name: SOFTWARE ENGINEERING Subject Code:10IS51
Chapter 2 Database Environment Pearson Education © 2009.
UML  UML stands for Unified Modeling Language. It is a standard which is mainly used for creating object- oriented, meaningful documentation models for.
From Use Cases to Implementation
Presentation transcript:

Intentional source-code views Dear all, In this presentation I want to provide a brief overview of my past research results as well as my current research interests and future research plans. Intentional source-code views Brief overview of past research results current research interests future research plans. Kim Mens (U. Catholique Louvain-la-Neuve) Tom Mens (Vrije U. Brussel) Michel Wermelinger (LabMAC – U. Lisboa) May 19, 2002 IWPSE Kim Mens August 2000

Problem Software evolution and maintenance are hard “Information overload” Difficult to understand and browse large software systems When something breaks upon evolution, it is difficult to find out what, where and why Insufficient support for managing crosscutting concerns “Tyranny of the dominant decomposition” “Intentions” of developers are not documented Difficult to understand relevant concerns, assumptions, intentions, conventions, constraints Hidden or implicit in source code or in heads of developers Should be codified explicitly, e.g., to detect potential inconsistencies and evolution conflicts Models remain in the heads of the software engineer. Consequently, they cannot be shared and distributed. The results of reverse engineering cannot be used in forward engineering activities. This situation decreases productivity. May 19, 2002 IWPSE Kim Mens August 2000

Solution Intentional source-code views Views may crosscut the implementation decomposition Relations among these views Explicitly codify important concerns, assumptions, intentions and conventions … … that can be verified upon evolution Manage structural and semantic inconsistencies May 19, 2002 IWPSE

Source-code views A source-code view A source-code entity Is a set of source-code entities that address a same concern One view can contain many entities Views may crosscut dominant implementation decomposition A source-code entity Can be any tangible language construct: method, class, variable One source-code entity can reside in multiple source-code views Views can be defined Extensionally = by explicit enumeration of their elements Intentionally = by declaratively describing their elements One view can have multiple (mutually consistent) definitions Kinds of views Predefined by language/environment ; Extracted by tools; User-defined May 19, 2002 IWPSE Kim Mens August 2000

Examples of source-code views Logic predicates All predefined logic predicates in SOUL Alternative definitions: Everything stored in one of the subclasses of class LogicRoot Everything in a class belonging to a category named ‘Soul-Logic*’ Explicit enumeration of all relevant classes Test suites All methods for testing the SOUL implementation and predicates Alternative definitions: Every method implemented by a subclass of class LogicTests Everything in a class belonging to a category named ‘*Test’ Explicit enumeration of all relevant classes Case study: SOUL, a logic interpreter implemented in VW Smalltalk May 19, 2002 IWPSE

Intentional view model Intentional views are source-code views that Describe how to compute their elements Are declared as logic predicates over the implementation expressive, readable, concise using primitives from language model Can be used in multiple ways Generative: which entities belong to view? Verificative: does entity belong to this view? Can have alternative definitions All definitions should have the same “extension” This codifies implicit constraints on the elements of a view Can be used to detect evolution conflicts As mentioned, we are interested in codifying high-level software abstractions (and software architectures in particular). We will codify them in terms of logic meta predicates over the implementation, i.e. logic predicates that reason about implementation artefacts and implementation dependencies. The advantage of using logic predicates is that they often provide a quite expressive, concise and readable definition. To be a bit more precise, we will codify abstract concepts in terms of virtual classifications and relations between those concepts in terms of virtual dependencies. These logic meta predicates define a mapping from a high-level abstract description to the implementation, and can be used, amongst others, to check conformance of the implementation to these abstract descriptions. Logic predicates have the advantage that they can be used in multiple ways. For example, if we have a logic predicate that declaratively describes a classification of software artefacts, we can use it for: generating all artefacts that correspond to that classification check whether a certain artefact belongs to a classification May 19, 2002 IWPSE Kim Mens August 2000

Language model May 19, 2002 IWPSE Name Entity startsWith subString contains Entity startsWith subString endsWith meta inherits hasExpression arguments base super Category receiver Namespace meta Class sub Method Variable Expression -isAbstract : Boolean -isAbstract : Boolean -isConstructor : Boolean classInCategory -hasClassScope : Boolean Invocation hasMethod methodInProtocol Self Variable Return hasParameter Parameter Access accesses hasAttribute -isUpdate : Boolean Attribute -toSuper : Boolean -hasClassScope : Boolean May 19, 2002 IWPSE

Example: soulPredicates view(soulPredicates,<byCategory,byHierarchy>). viewComment(soulPredicates, ['This intentional view contains ALL classes that implement SOUL predicates (i.e., Prolog-like predicates that may use Smalltalk code due to language symbiosis).']). default(soulPredicates,byCategory). intention(soulPredicates,byCategory,?class) if category(?category), name(?category,?name), startsWith(?name,['Soul-Logic']), classInCategory(?class,?category). include(soulPredicates,byCategory,[Soul.SoulTests.TestClauses1]). include(soulPredicates,byCategory,[Soul.SoulTests.TestClauses2]). include(soulPredicates,byCategory,[Soul.SoulTests.TestClassifications]). intention(soulPredicates,byHierarchy,?class) if … May 19, 2002 IWPSE

Intention Viewer May 19, 2002 IWPSE

Extension Editor May 19, 2002 IWPSE

Example of relations among views Logic predicates All predefined logic predicates in SOUL Test suites All methods for testing the SOUL implementation and predicates Logic predicates Test suites  Contains corresponding  ArithmeticLayer add(?n,?m,?sum) factorial(?n.?fact) … ArithmeticTest testadd testfactorial … Example: Test-suite completeness of SOUL May 19, 2002 IWPSE

Relations among intentional views Logic predicates Relations Describe important relationships among the elements of source-code views Are declared as logic predicates over source-code views expressive, readable, concise Often simply as a predicate r over source-code entities and a set quantifier (, ) to map it over the views A r B   a  A :  b  B : a r b Can be used in multiple ways (verificative / generative) Can be used to detect interesting evolution conflicts Example: test suite completeness Every logic predicate must have a corresponding test method  Contains corresponding  Test suites May 19, 2002 IWPSE

Generating code Test-suite completeness “Untested predicates” view Every logic predicate must have a corresponding test method “Untested predicates” view Contains all predicates that have no corresponding test method Test-suite is complete if this view is empty Default test methods Can be generated automatically for all predicates in this view So that we have no untested predicates anymore Default test methods always fail So that developer is “forced” to test them May 19, 2002 IWPSE

Contributions A logic meta-programming environment for active and enforceable documentation of object-oriented source-code A model for intentional source-code views language-independent cross-cutting modularisation of implementation entities intuitive and lightweight verifiable declarations codify intentions in software engineers’ heads May 19, 2002 IWPSE

Contributions (2) A proof-of-concept prototype tool adding/removing/modifying views and relations detecting inconsistencies and evolution conflicts When alternative definitions are inconsistent When relations among views become invalid advanced browsing and structuring of source-code code generation Validated on a real-world case study ongoing evolution of SOUL little overhead, effort pays off (?) May 19, 2002 IWPSE