Top Banner
1 Multi-level Configuration Management with Fine- grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University
39

1 Multi-level Configuration Management with Fine-grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University.

Jan 29, 2016

Download

Documents

Alberta Pitts
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 1 Multi-level Configuration Management with Fine-grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University.

1

Multi-level Configuration Management with Fine-grained Logical Units

Tien N. NguyenElectrical and Computer Engineering Department

Iowa State University

Page 2: 1 Multi-level Configuration Management with Fine-grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University.

2

Design and Implementation

Class----------------------------

Function--------------------

-------------------------------------------------------------------------------------------------------------------------------------------------------------------========================

Design/Implementation

Design spec 1:------------------------------------

----------Design spec 2:------------------------------------

-------------------------------------------------------------------------------------------------------------------------------------

Page 3: 1 Multi-level Configuration Management with Fine-grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University.

3

File-oriented SCM

Class----------------------------

Function--------------------

-------------------------------------------------------------------------------------------------------------------------------------------------------------------========================

Design/Implementation

Design spec 1:------------------------------------

----------Design spec 2:------------------------------------

-------------------------------------------------------------------------------------------------------------------------------------

FILES/DIRECTORIES

File-based SCM

system

Primary targets of SCM are files/directories.

Configuration Management

Page 4: 1 Multi-level Configuration Management with Fine-grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University.

4

Mismatch between two domainsClass,

function, statement,…

Design/Implementation Configuration Management

Files and Directories

Developers work with logical units, but manage versions and configurations of files and directories.

Page 5: 1 Multi-level Configuration Management with Fine-grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University.

5

Logical and structural problems SCM systems have little or no knowledge of

file contents. Logical structure of a program is not preserved in a SCM repository.

Some SCM systems are based on a line-oriented model of internal changes of files.

Extensive analyses are required to recover structural changes between different versions of a sub-file program unit.

=> SCM systems should provide fine-grained version control for logical units

Page 6: 1 Multi-level Configuration Management with Fine-grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University.

6

Existing fine-grained SCM models

Predefined set of versionable units

Page 7: 1 Multi-level Configuration Management with Fine-grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University.

7

Versioning for composite units

Create versions of a composite unit via structure versioning mechanisms

Page 8: 1 Multi-level Configuration Management with Fine-grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University.

8

Structure versioning mechanism

Selection of the right versions of atomic units to be included in a version of a composite unit

composite unit D

a

b c

Page 9: 1 Multi-level Configuration Management with Fine-grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University.

9

Labeling (tagging) approach

Assigning the same labels to unit versions that belong to the same version of a composite.

Makefile and similar ones

composite unit D

a1

b1 c1

Page 10: 1 Multi-level Configuration Management with Fine-grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University.

10

Composition versioning approach

Revision Selection Rules (RSRs)

Page 11: 1 Multi-level Configuration Management with Fine-grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University.

11

Total versioning approach

All levels of hierarchy are versioned.

Page 12: 1 Multi-level Configuration Management with Fine-grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University.

12

Product versioning approach

A version is global across entire software project

Page 13: 1 Multi-level Configuration Management with Fine-grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University.

13

Multi-level logical units

…… … …

projectfile

classmethod

stmt

char

token

Page 14: 1 Multi-level Configuration Management with Fine-grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University.

14

Multi-level logical units (2)

…… … …

projectsection

subsectionparagraph

sentence

char

word

Page 15: 1 Multi-level Configuration Management with Fine-grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University.

15

All levels of structural hierarchy are important.

For documentation, SCM tools should not impose a predefined set of structural units. inflexible, inextensible, and fixed There is no basic set of units that can

accommodate all structural levels. Cost to maintain mapping between versions

of logical units and versions of files

Analyses

Page 16: 1 Multi-level Configuration Management with Fine-grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University.

16

Existing fine-grained version control systems inflexible, inextensible, and fixed There is no basic set of units that can

accommodate all structural levels. Cost to maintain mapping between versions

of logical units and versions of files

Analyses

Page 17: 1 Multi-level Configuration Management with Fine-grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University.

17

Combination approach structure-oriented representation model and product versioning model

Multiple structural levels are controllable. SCM handled via one uniform mechanism Efficient structural differencing tools:

neither tree differencing algorithm nor extensive analyses are required

Structure-oriented Product versioning model

Page 18: 1 Multi-level Configuration Management with Fine-grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University.

18

Structure-oriented representation Each software document is represented by a

XML-like document tree. Each node in a tree has a unique identifier

and can be associated with multiple attributes in any data type.

An attribute value is a location that stores a value of any data

type, possibly a reference. can be either versioned or non-versioned.

Page 19: 1 Multi-level Configuration Management with Fine-grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University.

19

Example <use-case author =“John Boyland” no = 654>

<name> First floor scenario </name>

<cond>

<pre-cond> Person is on the 1st floor </pre-cond>…

“operator” “children” “parent” “content” “author”

n1 Intop(“use-case”) [n2,n4] null null “John…”

n2 Intop(“name”) [n3] n1 null Undefined

n3 textop null n2 “First …” Undefined

n4 Intop(“cond”) [n5] n1 null Undefined

n5 Intop(“pre-cond”) [n6] n4 null Undefined

n6 textop null n5 “Person...” Undefined

Attribute table…

Page 20: 1 Multi-level Configuration Management with Fine-grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University.

20

Example <use-case author =“John Boyland” no = 654>

<name> First floor scenario </name>

<cond>

<pre-cond> Person is on the 1st floor </pre-cond>…

“operator” “children” “parent” “content” “author”

n1 Intop(“use-case”) [n2,n4] null null “John…”

n2 Intop(“name”) [n3] n1 null Undefined

n3 textop null n2 “First …” Undefined

n4 Intop(“cond”) [n5] n1 null Undefined

n5 Intop(“pre-cond”) [n6] n4 null Undefined

n6 textop null n5 “Person...” Undefined

Attribute table

version

Page 21: 1 Multi-level Configuration Management with Fine-grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University.

21

Benefits Allow the modeling of any structural levels

in a software document No hard-code or predefined set of

versionable units Structural levels are controllable

New XML element can be added. Also via the use of Document Type

Definition (DTD) and XML Schema => accommodate any document type

Page 22: 1 Multi-level Configuration Management with Fine-grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University.

22

Tree-structured discrete timeProject V1.0

Project V2.0

Project V3.0

Project V3.1 Project V3.2

A version is a point in the project’s lifetime.

Product versioning model

Page 23: 1 Multi-level Configuration Management with Fine-grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University.

23

Tree-structured discrete timeProject V1.0

Project V2.0

Project V3.0

Project V3.1 Project V3.2

One global version space across entire project

Product versioning model (2)

Page 24: 1 Multi-level Configuration Management with Fine-grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University.

24

Users select a current version to work on.

Tree-structured discrete timeProject V1.0

current => Project V2.0

Project V3.0

Project V3.1 Project V3.2

Unnamed, temporary version

Editing and versions

Page 25: 1 Multi-level Configuration Management with Fine-grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University.

25

Structure versioning scheme

Class()------------------------

Function ()-------------------------------------

--------------------------------------------------------------------------------------------------------------------------------------------========================

Structured editors

Attributed trees

Page 26: 1 Multi-level Configuration Management with Fine-grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University.

26

1

2 3

4 5

1

2 3

Version v1 Version v2

(content is modified)

Content Children Parent

n1 “” [n2,n3] null

n2 “” [n4,n5] n1

n3 “” null n1

n4 “” null n2

n5 “old” null n2

Content Children Parent

n1 “” [n2,n3] null

n2 “” [n5] n1

n3 “” null n1

n4 “” null null

n5 “new” null n2

5

Fine-grained structure versioning

Page 27: 1 Multi-level Configuration Management with Fine-grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University.

27

Benefits of this scheme Common structure shared among versions Nodes can participate in many trees. One version mechanism for all information Fine-grained version control for all

structural levels in source code and documentation

Page 28: 1 Multi-level Configuration Management with Fine-grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University.

28

Configuration Management A software system is more than a simple

collection of documents. How to maintain consistent configurations

among document trees? SCM tasks are handled by Molhado,

An object-oriented SCM infrastructure [Nguyen et al, ICSE 2005]

Provide SCM and transaction support, operation model, collaborative support, etc.

Page 29: 1 Multi-level Configuration Management with Fine-grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University.

29

The structure-oriented product versioning model was integrated into the Software Concordance (SC) environment.

SC is a complete environment Supporting structured editing for Java, XML

and HTML documentation, SVG graphics, UML diagrams,

Supporting program analysis, and Supporting hyperlinks.

Implementation

Page 30: 1 Multi-level Configuration Management with Fine-grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University.

30

Select the current working version

Page 31: 1 Multi-level Configuration Management with Fine-grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University.

31

Structured editor

Page 32: 1 Multi-level Configuration Management with Fine-grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University.

32

Fine-grained version control

Page 33: 1 Multi-level Configuration Management with Fine-grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University.

33

Fine-grained version control (2)

Page 34: 1 Multi-level Configuration Management with Fine-grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University.

34

Fine-grained version control (3)

Page 35: 1 Multi-level Configuration Management with Fine-grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University.

35

Project structure comparison

Page 36: 1 Multi-level Configuration Management with Fine-grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University.

36

Java program comparison

Page 37: 1 Multi-level Configuration Management with Fine-grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University.

37

UML diagrams

Page 38: 1 Multi-level Configuration Management with Fine-grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University.

38

Version control for SVG graphics

Page 39: 1 Multi-level Configuration Management with Fine-grained Logical Units Tien N. Nguyen Electrical and Computer Engineering Department Iowa State University.

39

Existing fine-grained SCM systems Manage basic versionable units as files, then create

versions of larger units via structure versioning. Inflexible, inextensible, fixed, and file-based

Combination approach of product versioning and structure-oriented representation Multiple structural levels SCM handled via one uniform mechanism Efficient structural differencing tools

Conclusions