Introduction Connecting Architecture There is a wealth of - - PowerPoint PPT Presentation

introduction
SMART_READER_LITE
LIVE PREVIEW

Introduction Connecting Architecture There is a wealth of - - PowerPoint PPT Presentation

Introduction Introduction Connecting Architecture There is a wealth of re-engineering tools Reconstruction Frameworks Often, we would like to combine these Differences in tool storage formats and Ivan Bowman, Michael Godfrey, Ric


slide-1
SLIDE 1

Connecting Architecture Reconstruction Frameworks

Ivan Bowman, Michael Godfrey, Ric Holt

Software Architecture Group University of Waterloo CoSET ‘99

May 17, 1999

CoSET 1999

2

Introduction

  • There is a wealth of re-engineering tools
  • Often, we would like to combine these
  • Differences in tool storage formats and

semantics makes reuse difficult

  • We defined an exchange format that can be

used to combine several tools:

– CIAO, Dali, Datrix, PBS, and Rigi

Introduction

CoSET 1999

3

Background

  • Recent work within CSER has identified
  • pportunities for re-use between tools
  • We identified two levels of tools:

– Code-Level tools provide detailed support – Architecture-Level tools identify high-level abstractions

  • We describe a format for connecting

architecture-level tools

Introduction

CoSET 1999

4

Architectural Reconstruction

Introduction

Source Code Executing System Source Control

System Artifacts

Scanning Parsing Profiling Change Reporting

Extractors

Extracted Facts

Repository View Generation

Visualization Manipulation Architecture

slide-2
SLIDE 2

CoSET 1999

5

Entity-Relational Model

  • Entities represent source code elements

such as functions, variables, or types

  • Relations represent associations in source

code such as calls or inheritance

  • Attributes such as line-number record

additional information

  • A Schema defines the allowed entities,

relations, and attributes

Model

CoSET 1999

6

Example Schema

Model

Function

line number

Variable

line number references line number calls line number

Module

  • wner

contains contains

CoSET 1999

7

Connection Format Requirements

  • Support multiple source languages
  • Scale to large systems (e.g. 10 MLOC)
  • Provide mapping to source code
  • Support static and dynamic dependencies
  • Incremental approach
  • Must be extensible, allowing new schemes

to be defined as needed

Requirements

CoSET 1999

8

The Naming Problem

  • Each entity must have unique ID
  • Source languages may allow two code

elements to have the same name

– typedef int T; – struct T { ... };

  • To combine facts, we need a common naming scheme
  • We have defined a scheme for Java, and we

are discussing possible solutions for C,C++

Problems

slide-3
SLIDE 3

CoSET 1999

9

The Line-Number Problem

  • We require a mechanism to get from an

entity back to source code

  • An obvious solution is to store file + line #

– We want same file name on different machines – Some entities are defined on a range of lines, or non-contiguous ranges of lines (for example, namespaces)

Problems

CoSET 1999

10

The Resolution Problem

  • For each reference in source code, we can

determine the reference target

  • Several resolution strategies are used:

– No resolution - each reference is an entity – Resolved to declaration (in a header file) – Resolved to static definition (entity body) – Resolved to dynamic definition (virtual functions, pointers)

Problems

CoSET 1999

11

TAXForm

  • Idea: provide converters between tool-

specific formats and a common format

  • There are two parts to an exchange format:

– Syntax of data (representation in files) – Semantic structure (schemas)

  • We chose TA syntax (others are attractive)
  • We allow tool developers to define their
  • wn schemas as needed

TAXForm

CoSET 1999

12

Transforming Between Schemas

TAXForm

Universal High-Level Procedural PL/I C Object-Oriented C++ Java Dali C Rigi C PBS C

slide-4
SLIDE 4

CoSET 1999

13

Implementing TAXForm

  • We evaluated TAXForm by implementing

converters for several existing re- engineering tools

  • The syntactic transformation was trivial
  • We used Tarski relational algebra to specify

transformations, and executed them with grok, a relational calculator

Evaluation

CoSET 1999

14

Evaluation of TAXForm

  • Writing schema transformations required

careful study of semantics used by each tool

  • Tools used different terminology with

different underlying assumptions

  • By defining transforms between models, we

formally document all of these assumptions and provide a dictionary for terminology

Evaluation

CoSET 1999

15

Systems Modeled

Evaluation

System Size Language Tool Jikes 77 KLOC C++ CIAO Linux 800 KLOC C Dali, PBS Mozilla 904 KLOC C Rigi Nachos 10 KLOC C++ CIAO

CoSET 1999

16

Summary and Future Work

  • We defined TAXForm as an exchange

format between architecture-level tools

  • We validated our format by implementing

converters from existing tool formats

  • We need to further describe the semantics
  • f each model

Conclusion