Code and Pattern Mining in C/C++ Aditya S. Deshpande Namratha Nayak Guides: Dr. A.Serebrenik(TU/e) P.Kourzanov, ir(NXP) Y.Dajsuren, PDEng(Virage Logic)

Slides:



Advertisements
Similar presentations
121/10/06 Using Visual Cues of Contact to Improve Interactive Manipulation of Virtual Objects in Industrial Assembly/Maintenance Simulations Jean Sreng,
Advertisements

Database System Concepts and Architecture
A Process Splitting Transformation for Kahn Process Networks Sjoerd Meijer.
Database Systems: Design, Implementation, and Management Tenth Edition
Dataflow Pattern Mining from ‘C’ Code Guides: Dr. Tom Verhoeff (TU/e) P. Kourzanov, ir (NXP) Y. Dajsuren, PDEng (Virage Logic) Student: Aditya S. Deshpande.
Automated creation of verification models for C-programs Yury Yusupov Saint-Petersburg State Polytechnic University The Second Spring Young Researchers.
James Martin CpE 691, Spring 2010 February 11, 2010.
DATAFLOW PROCESS NETWORKS Edward A. Lee Thomas M. Parks.
Object-Oriented Analysis and Design
Building Enterprise Applications Using Visual Studio ®.NET Enterprise Architect.
SCORE - Stream Computations Organized for Reconfigurable Execution Eylon Caspi, Michael Chu, Randy Huang, Joseph Yeh, Yury Markovskiy Andre DeHon, John.
Visual Web Information Extraction With Lixto Robert Baumgartner Sergio Flesca Georg Gottlob.
Mahapatra-Texas A&M-Fall'001 cosynthesis Introduction to cosynthesis Rabi Mahapatra CPSC498.
Review of “Embedded Software” by E.A. Lee Katherine Barrow Vladimir Jakobac.
Dataflow Process Networks Lee & Parks Synchronous Dataflow Lee & Messerschmitt Abhijit Davare Nathan Kitchen.
Design of Fault Tolerant Data Flow in Ptolemy II Mark McKelvin EE290 N, Fall 2004 Final Project.
A Denotational Semantics For Dataflow with Firing Edward A. Lee Jike Chong Wei Zheng Paper Discussion for.
Penn ESE535 Spring DeHon 1 ESE535: Electronic Design Automation Day 8: February 11, 2009 Dataflow.
System-Level Types for Component-Based Design Paper by: Edward A. Lee and Yuhong Xiong Presentation by: Dan Patterson.
SE-565 Software System Requirements More UML Diagrams.
Course Instructor: Aisha Azeem
Chapter 10: Architectural Design
Strategies to relate the program and problem domains using code instrumentation Mario Marcelo Berón University of Minho Pedro Rangel Henriques University.
SS ZG653Second Semester, Topic Architectural Patterns Pipe and Filter.
1 PH Chapter 1 (pp. 1-10) GoF Composite Pattern (pp ) PH Ch 2 through Fundamentals (pp ) Presentation by Julie Betlach 5/28/2009.
Programming the Cell Multiprocessor Işıl ÖZ. Outline Cell processor – Objectives – Design and architecture Programming the cell – Programming models CellSs.
Introduction 01_intro.ppt
Chapter 10 Architectural Design
Research on cloud computing application in the peer-to-peer based video-on-demand systems Speaker : 吳靖緯 MA0G rd International Workshop.
The Center for Advanced Research In Software Engineering (ARISE) The University of Texas at Austin Reengineering of Large-Scale Polylingual Systems Mark.
Aurora: A Conceptual Model for Web-content Adaptation to Support the Universal Accessibility of Web-based Services Anita W. Huang, Neel Sundaresan Presented.
S. M. Farhad PhD Student Supervisor: Dr. Bernhard Scholz
Composing Models of Computation in Kepler/Ptolemy II
An Introduction to Software Architecture
Architecture-Based Runtime Software Evolution Peyman Oreizy, Nenad Medvidovic & Richard N. Taylor.
Chapter 1 Introduction Dr. Frank Lee. 1.1 Why Study Compiler? To write more efficient code in a high-level language To provide solid foundation in parsing.
CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
Lecture 9: Chapter 9 Architectural Design
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
RELATIONAL FAULT TOLERANT INTERFACE TO HETEROGENEOUS DISTRIBUTED DATABASES Prof. Osama Abulnaja Afraa Khalifah
Cohesion and Coupling CS 4311
C. André, J. Boucaron, A. Coadou, J. DeAntoni,
Pipes & Filters Architecture Pattern Source: Pattern-Oriented Software Architecture, Vol. 1, Buschmann, et al.
SOFTWARE DESIGN. INTRODUCTION There are 3 distinct types of activities in design 1.External design 2.Architectural design 3.Detailed design Architectural.
CS 460/660 Compiler Construction. Class 01 2 Why Study Compilers? Compilers are important – –Responsible for many aspects of system performance Compilers.
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
SE 2310 Seminar DESIGN PATTERN MINING ENHANCED BY MACHINE LEARNING Presented By BHAVIN MODI.
Architecture View Models A model is a complete, simplified description of a system from a particular perspective or viewpoint. There is no single view.
Computer Simulation of Networks ECE/CSC 777: Telecommunications Network Design Fall, 2013, Rudra Dutta.
Reviews Crawler (Detection, Extraction & Analysis) FOSS Practicum By: Syed Ahmed & Rakhi Gupta April 28, 2010.
Architectural Design Introduction Design has been described as a multistep process in which representations of data and program structure,
Concepts and Realization of a Diagram Editor Generator Based on Hypergraph Transformation Author: Mark Minas Presenter: Song Gu.
Connecting Architecture Reconstruction Frameworks Ivan Bowman, Michael Godfrey, Ric Holt Software Architecture Group University of Waterloo CoSET ‘99 May.
Chapter – 8 Software Tools.
High Performance Embedded Computing © 2007 Elsevier Lecture 4: Models of Computation Embedded Computing Systems Mikko Lipasti, adapted from M. Schulte.
Evaluating C++ Design Pattern Miner Tools Lajos Jenő Fülöp 1, Tamás Gyovai 2 and Rudolf Ferenc 1 1 Department of Software Engineering University of Szeged,
VIRTUAL NETWORK PIPELINE PROCESSOR Design and Implementation Department of Communication System Engineering Presented by: Mark Yufit Rami Siadous.
Chapter 9 Architectural Design. Why Architecture? The architecture is not the operational software. Rather, it is a representation that enables a software.
Physical Data Model – step-by-step instructions and template
SOFTWARE DESIGN AND ARCHITECTURE
2. Specification and Modeling
Software Design and Architecture
课程名 编译原理 Compiling Techniques
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Database System Concepts and Architecture.
Computer Simulation of Networks
An Introduction to Software Architecture
Chapter 9 Architectural Design.
Introduction to Data Structure
Software Design Methodologies and Testing
Supporting High-Performance Data Processing on Flat-Files
Presentation transcript:

Code and Pattern Mining in C/C++ Aditya S. Deshpande Namratha Nayak Guides: Dr. A.Serebrenik(TU/e) P.Kourzanov, ir(NXP) Y.Dajsuren, PDEng(Virage Logic)

Agenda Introduction Problem Definition Data flow Design patterns Summary / Faculteit Wiskunde en Informatica PAGE

Introduction Code mining – Process of extracting patterns from source code. Design Patterns – A design pattern is a general reusable solution to a commonly occurring problem in software design. Streaming Data - Data streaming is the transfer of data at a steady high-speed rate sufficient to support such applications as high-definition television or a radio signal. / Faculteit Wiskunde en Informatica PAGE

Problem Definition Lack of synchronisation between models and source code. Significant amount of repetitive code in different modules. Identifying patterns and integrating them in the framework. Objective / Faculteit Wiskunde en Informatica PAGE

Approach Study the Design flow models available. Study the various design pattern matching methods and tools. / Faculteit Wiskunde en Informatica PAGE

Data flow models Kahn Process Networks. Synchronous Data Flow. / Faculteit Wiskunde en Informatica PAGE

Kahn Process Network - Introduction Processes communicate via FIFO. Parallel communication is organized as follows Autonomous computing stations are connected to each other in a network by communication lines. A station computes on data coming on its input lines to produce output on some or all of its output lines. Assumptions Communication lines are the only means of communication. Communication lines transmit info within a finite time. / Faculteit Wiskunde en Informatica PAGE

Kahn Process Network - Introduction Restrictions At any given time a computing station is either computing or waiting for information on one of its input lines. Each computing station follows a sequential program. / Faculteit Wiskunde en Informatica PAGE

Kahn Process Network - Example From Kahn’s original 1974 paper process f(in int u, in int v, out int w) { int i; bool b = true; for (;;) { i = b ? wait(u) : wait(v); printf("%i\n", i); send(i, w); b = !b; } / Faculteit Wiskunde en Informatica PAGE Process alternately reads from u and v, prints the data value, and writes it to w. u v w f f

Kahn Process Network - Example From Kahn’s original 1974 paper process f(in int u, in int v, out int w) { int i; bool b = true; for (;;) { i = b ? wait(u) : wait(v); printf("%i\n", i); send(i, w); b = !b; } / Faculteit Wiskunde en Informatica PAGE Process interface includes FIFO’s. wait() returns the next token in an input FIFO, blocking if it’s empty send() writes a data value on an output FIFO

SDF - Introduction Synchronous data flow graph (SDF) is a network of synchronous nodes (also called blocks). For a synchronous node, the consumptions and productions are known a priori. Homogeneous SDF / Faculteit Wiskunde en Informatica PAGE

SDF - Delay Delay of signal processing Unit delay on arc between A and B, means nth sample consumed by B, is (n-1)th sample produced by A. The arc is initialized with ‘d’ zero samples. / Faculteit Wiskunde en Informatica PAGE A d B

SDF - Implementation Implementation requires: Buffering of the data samples passing between nodes Schedule nodes when inputs are available Dynamic implementation (= runtime) requires Runtime scheduler checks when inputs are available and schedules nodes when a processor is free. / Faculteit Wiskunde en Informatica PAGE

SDF - Implementation Contribution of Lee-87: SDF graphs can be scheduled at compile time No overhead Compiler will: Determine the execution order of the nodes on one or multiple processors or data path units Determine communication buffers between nodes. / Faculteit Wiskunde en Informatica PAGE

Design Patterns Describe solutions for common recurring problems Can be used in a wider context as they are defined informally Documenting them in a software system simplifies maintenance and program understanding Usually it is not documented, so there is a need to discover design patterns from source code / Faculteit Wiskunde en Informatica PAGE

Pattern Mining Structure of design pattern is searched in the source code. Should include the main properties of the design pattern Flexible to describe the slightly distorted pattern occurrences. Helps to understand the relationships between the different parts of a large system / Faculteit Wiskunde en Informatica PAGE

Pattern Mining Reverse Engineering Analysis of a system to −Identify the components and their interrelationships −Create representations of the system in another form Why tools for Reverse Engineering? Existing legacy code High number of participants in code development Tools developed to mine the patterns from the source code / Faculteit Wiskunde en Informatica PAGE

Pattern Mining Tools Aspects in the different mining tools Programming Language : Tools for Java and C++ Method used to discover design patterns : Graph Matching, Constraint Satisfaction Problem, pattern inference Intermediate Representation – Abstract Semantic Graph, Abstract Syntax Tree, Matrix and Vector / Faculteit Wiskunde en Informatica PAGE

Columbus – Design Pattern Mining Tool Reverse engineering framework Developed in cooperation between the Research Group on Artificial Intelligence in Szeged, the Software Technology Laboratory of the Nokia Research Center and FrontEndART Ltd. Analyze large C/C++ projects and extract data according to the Columbus Schema Supports project handling, data extraction, data representation, data storage, filtering and visualization / Faculteit Wiskunde en Informatica PAGE

Columbus - Design Pattern Mining Tool Has a C/C++ extractor plug-in that performs the parsing of the source code Information collected by the plug-in corresponds to the Columbus Schema Schema captures C++ language at low detail(i.e, Abstract Syntax Tree) and has the higher –level elements(i.e., semantics of types) Supports various file formats for exporting the extracted data / Faculteit Wiskunde en Informatica PAGE

Other Pattern Mining Tools Other tools to be studied CPP2XMI Maisa CrocoPat / Faculteit Wiskunde en Informatica PAGE

Issues to be considered Can the tools support NXP source Code? Would it be possible to add proprietary patterns to these tools? Can these tools be extended to support other languages like C? / Faculteit Wiskunde en Informatica PAGE

Summary Overview of the Data flow models Introduced the design pattern mining tool - Columbus Find the patterns present in the NXP source code and check whether these can be mined using the available tools / Faculteit Wiskunde en Informatica PAGE

References E.A.Lee and D.G.Messerschmitt, “Synchronous data flow”,Proc. IEEE, vol. 75, pp , Sept G.Kahn, “The semantics of a simple language for parallel programming”, Proc.IFIP congr., Stockholm, Sweden, Aug.1974, pp Gamma, E., Helm, R., Johnson, R. and Vlissides, J. Design Patterns - Elements of Reusable Object- Oriented Software. Addison-Wesley, / Faculteit Wiskunde en Informatica PAGE

References R. Ferenc, A. Beszedes, M. Tarkiainen, and T. Gyimothy. Columbus – Reverse Engineering Tool and Schema for C++. In Proceedings of the 6 th International Conference on Software Maintenance (ICSM 2002), pages 172–181. IEEE Computer Society, Oct R. Ferenc, and A. Beszedes. Data Exchange with the Columbus Schema for C++. In Proceedings of the 6th European Conference on Software Maintenance and Reengineering (CSMR 2002), pages 59–66. IEEE Computer Society, Mar / Faculteit Wiskunde en Informatica PAGE

References Z. Balanyi, and R. Ferenc. Mining Design Patterns from C++ Source Code. In Proceedings of the 19 th International Conference on Software Maintenance (ICSM 2003), pages 305–314. IEEE Computer Society, Sept / Faculteit Wiskunde en Informatica PAGE

Questions / Faculteit Wiskunde en Informatica PAGE