Modular Analysis of Formal Design Models Yuanfang Cai




![Emerging New Approach l “Design Rule: the Power of Modularity” [Baldwin 00] u Design Emerging New Approach l “Design Rule: the Power of Modularity” [Baldwin 00] u Design](https://slidetodoc.com/presentation_image_h2/03556026147e82f3cf3ab331ca473051/image-5.jpg)


![New Approach Summary l General u u Object-Oriented (OO), Aspect-Oriented (AO) [SGSC 05] Generalized New Approach Summary l General u u Object-Oriented (OO), Aspect-Oriented (AO) [SGSC 05] Generalized](https://slidetodoc.com/presentation_image_h2/03556026147e82f3cf3ab331ca473051/image-8.jpg)


















![Generalizability--- Winery. Locator [Lopes 05] (1) Missing Transitive Dependences (2) Ambiguities (3) Potential Problems Generalizability--- Winery. Locator [Lopes 05] (1) Missing Transitive Dependences (2) Ambiguities (3) Potential Problems](https://slidetodoc.com/presentation_image_h2/03556026147e82f3cf3ab331ca473051/image-27.jpg)

![Generalizability--- Hyper. Cast [SGSC 05] (1) (2) Missing Transitive Dependences Potential Problems in Quantitative Generalizability--- Hyper. Cast [SGSC 05] (1) (2) Missing Transitive Dependences Potential Problems in Quantitative](https://slidetodoc.com/presentation_image_h2/03556026147e82f3cf3ab331ca473051/image-29.jpg)

![Related Work l Constraint Network Decomposition u Choueiry and Noubir [CN 98] u Dechter Related Work l Constraint Network Decomposition u Choueiry and Noubir [CN 98] u Dechter](https://slidetodoc.com/presentation_image_h2/03556026147e82f3cf3ab331ca473051/image-31.jpg)
![Related Work l Alloy u Jackson [J 06] l DSM u Mac. Cormack, Rusnak, Related Work l Alloy u Jackson [J 06] l DSM u Mac. Cormack, Rusnak,](https://slidetodoc.com/presentation_image_h2/03556026147e82f3cf3ab331ca473051/image-32.jpg)


- Slides: 34

Modular Analysis of Formal Design Models Yuanfang Cai 12/12/2021 Kevin Sullivan 1

Problem Analysis A Real Story Reasoning Design Structure l l Change Impact Change Options Refactor or not … Economic-Oriented Properties Current Design Representations are not Designed for this Purpose 12/12/2021 2

Modularity in Design: Formal Modeling and Automated Analysis l Value-oriented Decision-Making: Theory and Tool l Analyzable Design Modeling Framework Traditional Design Representations u Emerging New Approach u Formal Models and Analysis Tool (CS 05) u l Scalability Issue of Formal Techniques 12/12/2021 3

Traditional Design Representations (A) (B) Choose which? “information hiding”? “memory size”, “input size”? l l l 12/12/2021 Environment condition? Implicit design decisions? Design structure reasoning? Evolvability analysis? Quantitative analysis? 4
![Emerging New Approach l Design Rule the Power of Modularity Baldwin 00 u Design Emerging New Approach l “Design Rule: the Power of Modularity” [Baldwin 00] u Design](https://slidetodoc.com/presentation_image_h2/03556026147e82f3cf3ab331ca473051/image-5.jpg)
Emerging New Approach l “Design Rule: the Power of Modularity” [Baldwin 00] u Design Rules u Modeling: Design Structure Matrix (DSM) [Steward 81, Eppinger 91] u Economic Analysis: Net Option Value (NOV) l “The Structure and Value of Modularity” [SWC 01] 12/12/2021 5

Design Structure Matrix (DSM) Input l l l Design Variables Dependences Design Rule Proto-Modules Reorder 12/12/2021 Alphabetizing Circular Shift Output Master Control 6

Design Structure Matrix (DSM) (A) Sequential Design 12/12/2021 (B) Information Hiding Design 7
![New Approach Summary l General u u ObjectOriented OO AspectOriented AO SGSC 05 Generalized New Approach Summary l General u u Object-Oriented (OO), Aspect-Oriented (AO) [SGSC 05] Generalized](https://slidetodoc.com/presentation_image_h2/03556026147e82f3cf3ab331ca473051/image-8.jpg)
New Approach Summary l General u u Object-Oriented (OO), Aspect-Oriented (AO) [SGSC 05] Generalized Information Hiding Interface l Represent Software Coupling Structure u u Constantine, Stevens, Brooks…. Call Graph, Reflexion Model [Murphy 95], Lattix l Make Information Hiding Criterion Precise u Design Rules are Invariant to Environment Change l Analyze Software Quantitatively l Connections to Existing Methods around DSMs 12/12/2021 8

DSM Limitations - Very hard to build - Can’t represent possible choices - Input Condition? - Core Size? - Design Impact Analysis? - What if x changes from x 1 to x 2? - How many ways? - Ambiguous - What is “dependence? ” - a b c - c d e 12/12/2021 9

Constraint Network Variables 1. l Design Dimensions Values 2. l Possible Choices Constraints 3. l Relations Among Decisions input_ds: {core 4, disk, core 0, other}; envr_input_size: {small, medium, large}; input_ds = disk => envr_input_size = large; 12/12/2021 10

Augmented Constraint Network (ACN) Constraint Network Dominance Relation 1. 2. l l Design Rules Environment (input_impl, input_ADT) (input_impl, input_format) 3. Clustering Environment: {envr_input_format, envr_core, …} Design Rules: {input_ADT, circ_ADT…} 12/12/2021 11

Analyzable Models 1. Constraint Network Analyses l u u Design Change Impacts Precise DSM Analyses Design Automaton l u u u Change Dynamics Design Space Design Evolution Design. Space matrix{ client: {dense, sparse}; ds: {list_ds, array_ds, other_ds}; alg: {array_alg, list_alg, other_alg}; ds = array_ds => client = dense; ds = list_ds => client = sparse; alg = array_alg => ds = array_ds; alg = list_alg => ds = list_ds; } 2. Dominance Relation {(ds, client), (alg, client)} 3. Clustering Environment Cluster: {client} Design Cluster: {ds, alg} 12/12/2021 12

Design Automaton l. Design client = dense ds = array_ds alg = array_alg Impact Analysis client = sparse S 1 client = sparse S 6 ds = list_ds alg = list_alg ds = list_ds alg = other_alg client = sparse ds = other_ds client = sparse S 2 client = sparse ds = other_ds alg = other_alg S 3 client = dense ds = other_ds alg = other_alg 12/12/2021 client = dense S 5 ds = array_ds alg = other_alg S 4 client = sparse l 1. Non-deterministic; l 2. Minimal Perturbation; ds = list_ds alg = other_alg l 3. Respect Dominance Relation 13

Design Automaton l. Precise Definition of Pair-wise Dependence – DSM Derivation client = sparse client = dense ds = array_ds alg = array_alg client = sparse S 6 ds = list_ds alg = list_alg S 1 alg = other_alg client = sparse ds = other_ds client = sparse S 2 client = sparse ds = other_ds alg = other_alg S 3 client = dense ds = other_ds alg = other_alg 12/12/2021 client = dense S 5 ds = array_ds alg = other_alg S 4 client = sparse ds = list_ds alg = other_alg 1 1. client 2. ds 3. alg 2 3 . x x 14

Our Tool: Simon User Input Augmented Constraint Network (ACN) Dominance Relation Constraint Network Design Automaton Derive Modeling A Cluster Derive Cluster Set Pair-wise Dependence Analysis 12/12/2021 15

KWIC Regenerated Sequential Design 12/12/2021 Information Hiding Design 16

Design Impact Analysis (A) Sequential Design 12/12/2021 (B) Information Hiding Design 17

Scalability Issue l Constraint Solving l Explicit Solution Enumeration l Intolerable Performance 12/12/2021 18

Model Decomposition (1) Construct CNF Graph (2) Cut Edges According to the Dominance Relation of the ACN (3) Create Condensation Graph (4) Compose Sub-ACN 1: linestorage_impl = orig => linestorage_ADT = orig && linestorage_ds = core 4; 2: linestorage_ds = core 4 => envr_input_size = medium || envr_input_size = small; 3: linestorage_ds = core 0 => envr_input_size = small && envr_core_size = large; 4: linestorage_ds = disk => envr_input_size = large; 5: circ_ds 12/12/2021= copy => envr_input_size = small || envr_core_size = 19 large;

Construct CNF Graph (¬linestorage impl = orig linestorage ADT = orig) (¬linestorage impl = orig linestorage ds = core 4) (¬linestorage ds = core 4 envr input size = medium || envr input size = small) (¬linestorage ds = core 0 envr core size = large) (¬linestorage ds = disk envr input size = large) (¬circ ds = copy envr input size = small envr core size = large) (¬circ impl = orig circ ADT = orig) (¬circ impl = orig circ ds = index) (¬circ impl = orig linestorage ADT = orig) 12/12/2021 20

Construct CNF Graph (1)(¬circ_ds Construct Graph= small envr_core_size = large) = copy CNF envr_input_size (2)(¬linestorage_ds Cut Edges= core 0 According Relation envr inputto size. Dominance = small) envr_input_size envr_core_size linestorage_ds circ_ADT linestorage_impl circ_impl linestorage_ADT 12/12/2021 21

Construct Condensation Graph envr_input_size envr_core_size linestorage_ADT linestorage_ds linestorage_impl envr_core_size linestorage_ADT circ_ds, circ_impl envr_input_size envr_core_size linestorage_ADT linestorage_ds linestorage_impl circ_ADT circ_ds circ_impl Line Storage Function 12/12/2021 Circular Shift Function 22

KWIC Decomposed Information Hiding (20 ACN Variables) Sequential Design (18 ACN Variables) 12/12/2021 23

1: Result Integration 2: ---1. Design Impact Analysis 3: 1: Design Impact 2: Analysis Input 1: Original Design 3: 1: envr_input_size = 4: medium 5: 2: envr_core_size = small 3: linestorage_ADT = orig 4: linestorage_ds = core 4 5: linestorage_impl = orig Input 2: A Change 6: circ_ADT = orig 7: circ_ds = index = envr_input_size 8: circ_impl large= orig 12/12/2021 1: 2: 3: 6: 7: 8: C 0 envr_input_si ze = large L 3 envr_input_si ze = large 4: 5: L 2 C 1 1: 2: 3: 4: 5: 1: 2: 3: 6: 7: 8: Output 1: envr_input_size = large 2: envr_core_size = small 3: linestorage_ADT = orig 4: linestorage_ds = other 5: linestorage_impl = other 6: circ_ADT = orig 1: 7: envr_input_size circ_ds = core 4 = large 8: circ_impl = orig 2: envr_core_size = small 3: linestorage_ADT = orig 4: linestorage_ds = disk 5: linestorage_impl = other 24 6: circ_ADT = orig

Result Integration--- 2. DSM Generation Pair-wise Dependence Relation 12/12/2021 25

Generalizability--Winery. Locator 12/12/2021 26
![Generalizability Winery Locator Lopes 05 1 Missing Transitive Dependences 2 Ambiguities 3 Potential Problems Generalizability--- Winery. Locator [Lopes 05] (1) Missing Transitive Dependences (2) Ambiguities (3) Potential Problems](https://slidetodoc.com/presentation_image_h2/03556026147e82f3cf3ab331ca473051/image-27.jpg)
Generalizability--- Winery. Locator [Lopes 05] (1) Missing Transitive Dependences (2) Ambiguities (3) Potential Problems in Quantitative Analysis 12/12/2021 27

Generalizability--Hyper. Cast 6 Main Functions No Crosscutting 5 “Crosscutting” Functions 12/12/2021 28
![Generalizability Hyper Cast SGSC 05 1 2 Missing Transitive Dependences Potential Problems in Quantitative Generalizability--- Hyper. Cast [SGSC 05] (1) (2) Missing Transitive Dependences Potential Problems in Quantitative](https://slidetodoc.com/presentation_image_h2/03556026147e82f3cf3ab331ca473051/image-29.jpg)
Generalizability--- Hyper. Cast [SGSC 05] (1) (2) Missing Transitive Dependences Potential Problems in Quantitative Analysis 12/12/2021 29

In Summary l Evolvability and Modularity Analysis From Formal Models l Reasonable Performance l Confirm or Reveal Errors in Previous Work l Architectural Slicing 12/12/2021 30
![Related Work l Constraint Network Decomposition u Choueiry and Noubir CN 98 u Dechter Related Work l Constraint Network Decomposition u Choueiry and Noubir [CN 98] u Dechter](https://slidetodoc.com/presentation_image_h2/03556026147e82f3cf3ab331ca473051/image-31.jpg)
Related Work l Constraint Network Decomposition u Choueiry and Noubir [CN 98] u Dechter and Peal [DP 89] u Freuder and Hubbe [FH 93] l Bottom-up Clustering u Hutchens and Basili [HB 95] u Schwanke [S 91] u Mancoridis [MMRC 98] 12/12/2021 31
![Related Work l Alloy u Jackson J 06 l DSM u Mac Cormack Rusnak Related Work l Alloy u Jackson [J 06] l DSM u Mac. Cormack, Rusnak,](https://slidetodoc.com/presentation_image_h2/03556026147e82f3cf3ab331ca473051/image-32.jpg)
Related Work l Alloy u Jackson [J 06] l DSM u Mac. Cormack, Rusnak, and Baldwin [MRB 05] l Lattix—A Commercial Tool u Sangal, Jordan, Sinha, and Jackson [SJSJ 05] l Traditional Design Impact Analysis u Robert Arnold and Shawn Bohner [AB 96] 12/12/2021 32

Future Work l Improve Language Notation l Direct SAT Solver l Empirical Study l Integrate Design with: u Code: Combine with recovered design u Specification: Specification provides an environment u Value: A Real Story 12/12/2021 33

Questions? 12/12/2021 34