31
A Discussion of: Murphy, Notkin & Sullivan’s Software Reflexion Models: Bridging the Gap between Source and High-Level Models André M. Carrington for CS 846 October 2011. v1.01. David R. Cheriton School of Computer Science University of Waterloo

A Discussion of: Murphy, Notkin & Sullivan’s Software Reflexion Models: Bridging the Gap between Source and High-Level Models André M. Carrington for CS

Embed Size (px)

Citation preview

A Discussion of:

Murphy, Notkin & Sullivan’sSoftware Reflexion Models: Bridging the Gap between

Source and High-Level Models

André M. Carrington for CS 846 October 2011. v1.01.

David R. Cheriton School of Computer ScienceUniversity of Waterloo

2

AgendaContext

The Reflexion method

Contributions claimed, impact award

Motives, applications & extensions

Demo

Note on Reflexion: The old English spelling differentiates [their] use of “reflexion” from the field of reflective computing [Smi84]

3

In the last two classes we covered papers on

Information needsanalysissynthesis (of fragments)

Code search, forreusedebugging, understanding

4

Some points that we discussed are relevant to this

paper:Accurate system information is important

Documentation is often inaccurate

What provides the information sought?

Developers may be under pressure

5

A Typical Scenario*

*from G.C. Murphy’s presentation: Structural Summarization, 1996.This example is also discussed in the paper re: a developer with expertisein UNIX virtual memory but not NetBSD as a specific implementation.

6

Context circa 1995

*from G.C. Murphy’s doctoral dissertation (on the same topic as the paper), 1996.

7

Reflexion bridges the gap between source and

models

1

2

3

4

8

1. Alice creates a High Level Model

9

2. Alice extracts a Source model

She uses FIELD’s xrefdb* and an awk script to obtain “calls relation” tuples:

calling fn called fn

*XREFDB is a relational database whose relations were specifically designed to support queries about programming languages. FIELD is a distributed programming environment/solution.

10

Using general domain knowledge, specific codebase knowledge, or assumptions.

Source entities* are grouped or abstracted using regular expressions, directories, files, classes and functions/methods.

A partial map re scope (subsystems) of interest is allowed.

*from the calls relation, from browsing, or from knowledge or other sources

3. Alice maps the HLM to Source

Source High-Level Model (HLM)

11

4. Alice computes a Reflexion Model

Src HLM

✔ ✔

✔ ✖

✖ ✔

12

1

2

3

4

Alice may iterate by refining the HLM & Map from the

Reflexion

13

How does it work? Want proof?Learn static code in

Z…

14

And computations in Z, or…

15

Read the source. Try it. Read the thesis. Apply it to

itself!An Eclipse plugin for Java (built from source) is

available at: http://sourceforge.net/projects/jrmtool/

One of the web pages said to e-mail Professor Gail Murphy for other versions (e.g. standalone, other languages).

16

Metrics are provided to demonstrate its viability.

17

Contributions claimedReflexion “enables an engineer to produce sufficiently

accurate high-level models in a different way”.

Reflexion “has been applied to aid engineers in performing a variety of software engineering tasks on a number of different software systems that vary in size and implementation language”

Reflexion “permit[s] an engineer to easily explore structural aspects of a large software system”

A benefit of the paper’s “syntactic approach is the ability…to investigate many different kinds of structural interactions in a software system (calls, data dependencies, or event interactions, etc.).

18

Contributions claimed“The declarative maps…enable an engineer to

focus on information of interest”

Reflexion models “bridge the gap between an engineer’s high-level model and a model of the source”

Lastly, they almost suggest their goal was met:“The goal…to produce, at low cost, high-level

models that are ‘good enough’…Three aspects…critical to meeting this goal are the use of syntactic models, the use of expressive declarative maps, and support for querying a reflexion model.”

19

Impact AwardACM’s Special Interest Group on Software

Engineering – SIGSOFT – launched an initiative several years ago to recognize research papers that have been particularly influential in software engineering research. 

This 1995 paper on Reflexion models was selected to receive a 2011 SIGSOFT Retrospective Impact Paper award.

Citations: 422 (Google); 93 (ACM digital library)

The most ideal impact, in my view, would be: widespread use in industry.

20

MotivationI select papers:

that provide value to society; and that are interesting or inspiring.

This paper extended my thinking about what is possible.

I think that many people would use the Reflexion tool if it were marketed (and if the paper was more accessible to a non-academic audience).

21

Applications of this Research

Reengineering Getting acquainted with a codebase to re-engineer a VM Understanding & assessing structure to re-engineer Excel

Conformance Assessing conformance to layered architecture, directly. Assessing conformance to design documentation

System Understanding Getting acquainted with a codebase in general Seeing how others’ work combines & aligns with your own Observing meaningful divergences, e.g. between a

difficult-to-understand compiler and a typical compiler) Finding optimizations in divergences, e.g. VM

22

ChallengesThe RMTool download link does not work.

The link to the no-install plugin approach for the jRMTool does not work.

The jRMTool requires fixes (which I achieved) to get it working on a current version of Eclipse, because ofa deprecated method (requiring changes to code); and deprecated code practices (requiring use of an older

java compiler version and disregard for warnings)

The sourceforge project does not have any recent activity; and thus support for the tool is in question.

23

Research ExtensionsA better survey (and objective measure) of sufficiency and

utility – with a statistically significant sample size.

While the Related Work section appears to be well written, a presentation by the authors of FIELD* at around the same time (1993) that provides a taxonomy of development tools for visualizing abstractions, that might better contextualize and advance this work.

They indicate: Support for typing relations in source models and HLMs Examine the sensitivity of the Map to changes in source Improve querying to assist interpretation of Reflexion models

*FIELD’s xrefdb is used by the paper for source model extraction

24

Reiss’ TaxonomySyntactic:

Call graphClass hierarchy displayDesign language

Semantic:program slicesdata flow graphs library-based (e.g.

threads)potential class groupings

Event:dynamic call graph synchronization vieweralgorithm animation

Data-based:data structure

visualizationmake dependency graph

Reiss, Stephen P. “FIELD: Friendly, Integrated Environment forLearning and Development” (presentation), Brown University, 1993.

25

Demo with a simple program

26

Demo with a simple program

27

Demo with more complexity

28

This concludes the presentation.

29

Trivia with prizes!(or obscure things I learned)The first to correctly answer wins a prize!

1. What formal specification language is used in the paper?

Answer: Z

2. What does the K in AWK stand for? (hint: they co-authored a book on C) Answer: Kernighan (1st reference)

3. What late pop star is mentioned in the paper?

Answer: Michael Jackson (Acknowledgements)

30

Lexical Source Model Extraction*

*from G.C. Murphy’s doctoral dissertation (on the same topic as the paper), 1996.

31

LSME Detail

*from G.C. Murphy’s doctoral dissertation (on the same topic as the paper), 1996.