Title: Component Generalization and Instantiation
1Component Generalization and Instantiation
Master Thesis Defense
2Outline
- Software Reuse
- Formal Specifications
- Reuse through Formal Specifications
- Specification Generalization
- Specification Instantiation
- Conclusions
- Future works
31. Software Reuse
- Solve software crisis
- Over budget
- Miss deadline
- Poor quality
- Two reuse problems
- Development for reuse - how to build reusable
components? - Development with reuse - how to use reusable
components?
1. Software Reuse
42. Formal Specifications
- Specification language proof theory
- Higher quality of software
- Increase understandability of software
- Only way to verify the correctness of software
- Early prototyping with executable specifications
2. Formal Specifications
5Algebraic Specifications
- Describe algebraic abstract data types
- ACT ONE
- Part of ISO formal techniques
- Constructing mechanisms
- Sound theories
- Supporting tools
2. Formal Specifications
63. Reuse through Algebraic Specifications
- Development for reuse
- Specification generalization
- Parameterization of ACT ONE
- Development with reuse
- Specification instantiation
- Actualization of ACT ONE
3. Reuse through Formal Specifications
74. Specification Generalization
- Creating generic components from specific ones
- Existence of a morphism between generic component
and specific one - Three Types of Generalizations
- Syntactic Generalization
- Semantic Generalization
- Formal Parameter Generalization
4. Specification Generalization
8Syntactic Generalization
4. Specification Generalization
9Semantic Generalization
4. Specification Generalization
10Formal Parameter Generalization
4. Specification Generalization
11Problem with Generalization
- How to control the level of abstraction?
4. Specification Generalization
12Solution
- Categorized constructors
- Linear order natural
- Container set, queue, list, stack
- Converter record
- Describe constraints of formal parameters
4. Specification Generalization
13Example of Generalization
STACK of NATURAL
Semantic generalization of Linear Order
Semantic generalization of Container
Syntactic generalization
Semantic generalization of Converter
STACK of ELEMENT
GSTACK1 of ITEM
GSTACK2 of CONTAINER
GSTACK3 of RECORDER
Generalize one specific component to several
generic components
4. Specification Generalization
145. Specification Instantiation
- Replacing formal parameter by several actual data
types - Respecting constraints proof obligations
- Types of Instantiation
- Basic Instantiation specific actual data types
- General Instantiation generic actual data types
- Partial Instantiation only some, not all
5. Specification Instantiation
15Benefits of our Instantiation Operations
- Easy Selection of candidate components
- Easy Matching of operations
- Easy Checking and no proof obligations
- Easy Organization for component library
- Easy Development for reusable components
5. Specification Instantiation
16Example of Instantiation
5. Specification Instantiation
176. Conclusions
- Three main contributions
- Define in detail several algorithms for
generalization and instantiation - Propose to use categorized constructors
- Control the abstraction level
- Govern the instantiation
- Applied to any algebraic specification language
PVS, CafeOBJ
6. Conclusions
187. Future works
- Describing algorithms formally
- Designing supporting tools
- Validating generic components
7. Future works
19Questions?