Download presentation
Presentation is loading. Please wait.
Published byFarida Pranata Modified over 5 years ago
1
Requirements for better object-oriented design and programming languages
Could be organized better
2
General Requirements Minimize tangling (most important)
tangling of behaviors/issues structure-shyness Do type-checking at adaptive level without knowledge of class graph.
3
Requirements Strategic Automata
Support strategic traversal automata Strategy graph defines 4 kinds of automata: depth-first/breadth-first and class-graph-order/strategy-graph-order If another traversal is needed, use strategic traversal automaton traversal automaton is special case: apply to class graph
4
Requirements: Layers of strategy graphs
Allow multiple layers to define strategies. Allows to protect strategies from details of class graphs Path set is defined by intersection of NDFAs from current strategy to the root
5
Current way of AP G s1 s2 s3 s4 s5
6
Better way of AP G s6 s7 s1 s2 s3 s4 s5
s6, s7 shield s1 through s5 from changes to G
7
Hierarchical development of strategies
s2=[A,B] s3=[A,C] s4=[A,B,D] s5=[A,C,D] G A B s1= [A,D] bypassing ... G C D s1 s2 s5 s3 s4
8
Requirements Composition of strategies
Support intersection, merge, negation and join of strategies. Allow naming of strategies. Class graphs and strategy graphs should have similar syntax
9
Example: Requirements Composition of strategies
support operations join and merge S1 = A=B.B=C.C=. S2 = A=X.X=Y.Y=C. S3 = A=Y.Y=X.X=C. S4 = S1 & (S2 + S3) join and merge help to avoid long specifications
10
Requirements To make strategies even more adaptive, we allow regular expressions in class-valued and relation-valued variables. from Cabinet bypassing ->*,*poison*,* to *
11
Requirements {-> Document {[Ss]ection [Pp]aragraph}}
Does not matter: lower case or upper case Used in the Laurel Query Language: (Abiteboul et al., Journal of Digital Libraries, 1(1), 1997)
12
Requirements Control by strategies
during strategy: during s … restrict visitor to strategy s start strategy: start s … before traversal starts, execute some code finish strategy: finish s ...
13
Requirements: Backward edges
How should they be supported? Pattern for derived edges
14
Derived Edge Pattern Meaning of V<-A: For aV of class V
find aA of class A in aG of class G such that aA.get_s() returns aV. G 1..* A s only 1..* V 1 Strategy Graph
15
Derived Edge Pattern V<-A can be used in strategies.
A -> V to-stop V <- A gives all neighboring adjacencies for a given adjacency. G 1..* A s only 1..* V 1 Strategy Graph
16
Requirements Visitors
visitors can be composed into a tree: a tree expression binds them together a visitor can refer to several next visitors which provide it with inputs: next_visitor.x.result() a visitor has one output
17
Visitors Visitor composition
as part of visitor definition by independent visitor expressions Each visitor is parameterized by one strategy which serves as a strategy type. When instantiated with detailed strategy, behavior is defined (like adaptive method).
18
Requirements Object Manipulation
Insertion and deletion should be done in a structure-shy way. from A to B before B {delete this;} support for exiting from a traversal
19
Requirements Container classes
Support multiple container classes Support parameterized syntax in class dictionary: java.util.Stack(S) Integrate with collection class generator P3?
20
Requirements APPCs Encapsulate class extensions for groups of collaborating classes May be parameterized by multiple strategies
21
Requirements APPCs an APPC can ask about results of other APPCs
the composition structure of APPCs is a dag
22
Requirements Physical Organization
separate files for class dictionaries(*.cd), visitors (*.vis), adjusters (*.adj) and behaviors (*.beh), strategies (*.str).
23
Requirements Coordination: Formally verify small cases
Coordinator defines finite state machine for small parameters. Use model checking techniques. Model checking: temporal logic versus pi-calculus. Use temporal logic.
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.