Mushtaq Raza Mushtaq Raza MAP-i Doctoral MAP-i Doctoral Student, 2011-2012 Student, 2011-2012.

Slides:



Advertisements
Similar presentations
Introducing Formal Methods, Module 1, Version 1.1, Oct., Formal Specification and Analytical Verification L 5.
Advertisements

Chair of Software Engineering OOSC - Summer Semester Object-Oriented Software Construction Bertrand Meyer Lecture 3: Abstract Data Types.
Modeling and simulation of systems Slovak University of Technology Faculty of Material Science and Technology in Trnava.
The Z Specification Language
Engineering Computing I Chapter 1 – Part B A Tutorial Introduction continued.
C. Varela; Adapted w/permission from S. Haridi and P. Van Roy1 Declarative Computation Model Defining practical programming languages Carlos Varela RPI.
Chair of Software Engineering OOSC - Lecture 4 1 Object-Oriented Software Construction Bertrand Meyer.
©Ian Sommerville 2000Software Engineering, 6/e, Chapter 91 Formal Specification l Techniques for the unambiguous specification of software.
Topic ? Course Overview. Guidelines Questions are rated by stars –One Star Question  Easy. Small definition, examples or generic formulas –Two Stars.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 10 Slide 1 Formal Specification.
Chapter 2: Algorithm Discovery and Design
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 10 Slide 1 Formal Specification.
Software Construction and Evolution - CSSE 375 Reverse Engineering and Reengineering Approaches Shawn & Steve In long-term software developments, the “elephant.
Introduction SWE 619. Why Is Building Good Software Hard? Large software systems enormously complex  Millions of “moving parts” People expect software.
Principles of Programming Chapter 1: Introduction  In this chapter you will learn about:  Overview of Computer Component  Overview of Programming 
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 9 Slide 1 Formal Specification l Techniques for the unambiguous specification of software.
1 Phases in Software Development Lecture Software Development Lifecycle Let us review the main steps –Problem Definition –Feasibility Study –Analysis.
Nirmalya Roy School of Electrical Engineering and Computer Science Washington State University Cpt S 122 – Data Structures Recursion Review.
Parser-Driven Games Tool programming © Allan C. Milne Abertay University v
An Introduction to Programming and Algorithms. Course Objectives A basic understanding of engineering problem solving process. A basic understanding of.
Software Engineering Research Group, Graduate School of Engineering Science, Osaka University Analysis and Implementation Method of Program to Detect Inappropriate.
WXGE6103 Software Engineering Process and Practice Formal Specification.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 5 – Sequential Circuits Part 2 – Sequential.
Checking Reachability using Matching Logic Grigore Rosu and Andrei Stefanescu University of Illinois, USA.
Chapter 10 Analysis and Design Discipline. 2 Purpose The purpose is to translate the requirements into a specification that describes how to implement.
Abstract Processes in BPEL4WS Tony Andrews Software Architect Microsoft.
Lyra – A service-oriented and component-based method for the development of communicating systems (by Sari Leppänen, Nokia/NRC) Traditionally, the design,
Social Science Research Proper Methods HHS 4M Mr. Carney.
FDT Foil no 1 On Methodology from Domain to System Descriptions by Rolv Bræk NTNU Workshop on Philosophy and Applicablitiy of Formal Languages Geneve 15.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and.
CS412/413 Introduction to Compilers and Translators Spring ’99 Lecture 3: Introduction to Syntactic Analysis.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 28Slide 1 CO7206 System Reengineering 4.2 Software Reengineering Most slides are Slides.
Formal Methods in Software Engineering Credit Hours: 3+0 By: Qaisar Javaid Assistant Professor.
Requirements Engineering-Based Conceptual Modelling From: Requirements Engineering E. Insfran, O. Pastor and R. Wieringa Presented by Chin-Yi Tsai.
Research Methodology Class.   Your report must contains,  Abstract  Chapter 1 - Introduction  Chapter 2 - Literature Review  Chapter 3 - System.
RE-ENGINEERING AND DOMAIN ANALYSIS BY- NISHANTH TIRUVAIPATI.
SEG 4110 – Advanced Software Design and Reengineering Topic T Introduction to Refactoring.
Types and Programming Languages
Properties as Processes : FORTE slide Properties as Processes: their Specification and Verification Joel Kelso and George Milne School of Computer.
Substituting into expressions.
Duminda WijesekeraSWSE 623: Introduction1 Introduction to Formal and Semi- formal Methods Based on A Specifier's Introduction to Formal Methods (J. Wing)
Simplifying Algebraic Expressions. 1. Evaluate each expression using the given values of the variables (similar to p.72 #37-49)
Andrey Karaulov, Alexander Strabykin Institute for System Programming Russian Academy of Sciences SYRCoSE: Spring Young Researchers Colloquium on Software.
CMPSC 16 Problem Solving with Computers I Spring 2014 Instructor: Tevfik Bultan Lecture 4: Introduction to C: Control Flow.
Course: Software Engineering – Design I IntroductionSlide Number 1 What is a specification Description of a (computer) system, which:  is precise;  defines.
Technical Reports ELEC422 Design II. Objectives To gain experience in the process of generating disseminating and sharing of technical knowledge in electrical.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Extended Prelude to Programming Concepts & Design, 3/e by Stewart Venit and.
Introduction To Software Development Environment.
Notes Over 1.2.
Formal Specification.
Advanced Computer Systems
Functional Programming: Lists, Pattern Matching, Recursive Programming (CTM Sections , 3.2, , 4.7.2) Carlos Varela RPI September 12,
Software Testing.
Sharing lessons through effective modelling
Topic: Introduction to Computing Science and Programming + Algorithm
A lightening tour in 45 minutes
Programming Languages and Compilers (CS 421)
Software Maintenance.
Software Design Methodology
Test Case Purification for Improving Fault Localization
Programming Languages and Compilers (CS 421)
Background In his classic 1972 paper on definitional interpreters, John Reynolds introduced two key techniques: Continuation-passing style - Makes.
Madhusudan Parthasarathy
Paper by D.L Parnas And D.P.Siewiorek Prepared by Xi Chen May 16,2003
Vocabulary Algorithm - A precise sequence of instructions for processes that can be executed by a computer Low level programming language: A programming.
High-Level Programming Language
Stumpf and Teague Object-Oriented Systems Analysis and Design with UML
Software Development Techniques
Stumpf and Teague Object-Oriented Systems Analysis and Design with UML
Software Re-engineering and Reverse Engineering
Presentation transcript:

Mushtaq Raza Mushtaq Raza MAP-i Doctoral MAP-i Doctoral Student, Student,

1. Title 2. Abstract 3. Reification vs. Reverse Specification 4. Code Slicing 5. Word count Example 6. Removing the accumulation parameters 7. Introduction of mutual recursion 8. Conclusion Agenda

Reverse Program Calculation Supported by Code Slicing Title Title

  Reverse Engineering combines formal methods and semi-formal methods.   Reconstruct the formal specification of legacy code   Algebra of programming is applied in reverse order.   Code slicing is used for trimming down the complexity. Abstract

  Reverse calculation is achieved through imploding auxiliary variables.   Introducing mutual recursion   transforming semantic function into generic programming schemata Abstract Contd.

  Source code is translated into an intermediate language, from which equational descriptions of the functionality is calculated. Ref.[11] of the paper.   Reconstruction of specifications from legacy code on pre-/post-condition. Ref.[4,7,8,9] of the paper.   Source code is reconstructed until a recursive version is reached, upon which properties of program can be deduced. Ref.[25] of the paper. Literature Review

 Specification to implementation (one to many)  Software reification (refinement) is the process of converting abstract software specifications into real application. (Forward Engineering)  Higher level abstraction from implementation  Identifying component and behavior of a system in order to create higher level abstraction (Reverse Engineering) Reification vs. Reverse Specification

 Formal description of large piece of code can be overwhelmingly complex and counterproductive to inspect.  Slicing is the syntactic separation of program in its constituent slices.  Find the slices semantics and “re-constitute” the whole program semantics Code Slicing “A semantically sound code-decomposition technique”

Example- Word Count Program NL: New Line NC: New Character NW: New word Simplified version of the Unix wc command which print the no. of bytes, words and lines HASKELL Programming Language is adopted to express the functional semantics of slice of piece of code

Slicing of the Example code Gallagher and Lyle identify the following slice decomposition lattice for this program Clearly there are three maximal slices to be extracted given in the snapshot. Slice S(c) and S(inword) are auxiliary slices The Bottom Slice “C “ and “inword” are not an output variables, so these slices will not become apparent in the specification. “C” role is to unveil the underlying inductive type upon which the whole program is structured and “inword” support the computation of nw Slice S(inword)

Slicing of the Example code(Contd) For semantic extraction the study proceed three slices S(nc), S(nl), S(nw). Study also concluded the semantics for these slices in HASKELL which is given on the next slide Semantics for S(nw) Semantics for S(nc) Semantics for S(nl)

HASKELL’s Semantics for given Slices Slice(nw) Slice(nl) Slice(nc)

 Now remove the accumulators that is, the non- inductive parameters of nc, nl, nw  Concerning nc, study obtained where succ n=n+1 this can be recognized as where succ n=n+1 this can be recognized as HASKELL’s length function i.e HASKELL’s length function i.e  nl which is identified as list cata-morphism list cata-morphism  Exercise 3.45 in [3] of the paper. paper. Removing the accumulation parameters

 The reverse specification is not yet sufficiently abstracted  Final calculation will remove inward (auxiliary) parameter  After applying mutual recursion law (22) in the paper  Variable inward disappeared through out this calculation. Introduction of mutual recursion

 Combined formal with semi-formal to perform reverse specification.  Its constructive approach based on the powerful algebraic laws  Trimming down the complexity of handling all program variables at the same time through slicing.  Imploding auxiliary variables and introducing mutual recursion.  Finally the three slices are independent of each other a result know as banana-split law see (22) of the paper Summary

+  Abstract is clear and concise, having clear topic, hypothesis, method and results.  Overall paper is written in understandable language. -  Final sentence of the introduction doesn't describes the purpose of the study. purpose of the study.  Used “we” instead of study or paper.  Introduction is the repetition of abstract.  Written in very abstract way no enough explanation. Evaluation of the paper!!!

Questions and Answers Questions and Answers