Partial Models: A Position Paper M.Famelis, S.Ben-David, M.Chechik, R.Salay Partial Models: A Position Paper Motivating Example Working with Partial Models Reasoning Michalis Famelis, Shoham Ben-David, Transformation Marsha Chechik and Rick Salay Conclusion University of Toronto October 17, 2011 1 / 28
Partial Models: A Motivating Example Position Paper M.Famelis, S.Ben-David, Bob and Alice are building a network controller: M.Chechik, R.Salay Motivating Example Working with Partial Models Reasoning Transformation Conclusion 2 / 28
Partial Models: A Motivating Example Position Paper M.Famelis, S.Ben-David, Bob and Alice are building a network controller: M.Chechik, R.Salay Motivating Example Working with Partial Models Reasoning Transformation Conclusion 3 / 28
Partial Models: A Bob’s Alternative Fixes Position Paper M.Famelis, 1 Recover back to On : S.Ben-David, M.Chechik, R.Salay Motivating Example Working with Partial Models Reasoning 2 Log an error and turn Off : Transformation Conclusion 3 Get rid of Warning : 4 / 28
Partial Models: A Uncertainty: Which Alternative? Position Paper M.Famelis, S.Ben-David, Bob has a problem: M.Chechik, R.Salay • Requirements are unclear about recovery. Motivating • Any changes to the architectural model must be approved Example Working with by Alice. Partial Models Reasoning Transformation What are his options? Conclusion • Stop and wait for more information. • Make an (informed) guess, risk backtracking. • Work with the entire set of alternatives. • Use Partial Models! :) Note: Inconsistency fixing is merely an example. There could be other sources of uncertainty! 5 / 28
Partial Models: A What Is A Partial Model? Position Paper M.Famelis, S.Ben-David, M.Chechik, R.Salay Motivating Example Working with Partial Models Reasoning Transformation Conclusion 6 / 28
Partial Models: A What Is A Partial Model? Position Paper M.Famelis, S.Ben-David, M.Chechik, R.Salay Motivating Example Working with Partial Models Reasoning Transformation Conclusion 7 / 28
Partial Models: A What Is A Partial Model? Position Paper M.Famelis, S.Ben-David, M.Chechik, R.Salay Motivating Example Working with Partial Models Reasoning Transformation Conclusion 8 / 28
Partial Models: A What Is A Partial Model? Position Paper M.Famelis, S.Ben-David, M.Chechik, R.Salay Motivating Example Working with Partial Models Reasoning Transformation Conclusion 9 / 28
Partial Models: A The Position Position Paper M.Famelis, S.Ben-David, M.Chechik, R.Salay Facilitate decision deferral in the presence of uncertainty Motivating by using Partial Models, that represent sets of alternatives, Example Working with Partial Models as first-class development artifacts. Reasoning Transformation Conclusion What do we mean by “first-class development artifact”? • Checking of properties. • Transformation and refinement. 10 / 28
Partial Models: A Comments On Partial Models Position Paper M.Famelis, S.Ben-David, M.Chechik, R.Salay Other important characteristics: Motivating • Compact and exact representation of a set. Example Working with Partial Models • Metamodel/language independence. Reasoning Transformation Conclusion Status: • Different kinds of partiality, submitted [SCF11]. • May, Abs, Var, OW • Construction algorithm, submitted [FSC11]. • Preliminary implementation with Alloy/KodKod. 11 / 28
1 Motivating Example 2 Working with Partial Models Reasoning Transformation 3 Conclusion
Partial Models: A Checking Properties Position Paper M.Famelis, S.Ben-David, Check C1 (“no sink states”) on the partial model M 1 : M.Chechik, R.Salay Motivating Example Working with Partial Models Reasoning Transformation Conclusion It holds for all concretizations. Result: True . 13 / 28
Partial Models: A Checking Properties Position Paper M.Famelis, S.Ben-David, M.Chechik, Check C2 (“no transitions with identical source and target”): R.Salay Motivating Example Working with Partial Models Reasoning Transformation Conclusion C2 holds for some concretizations. 14 / 28
Partial Models: A Checking Properties Position Paper M.Famelis, S.Ben-David, M.Chechik, But C2 does not hold for others: R.Salay Motivating Example Working with Partial Models Reasoning Transformation Conclusion The result is therefore Maybe . 15 / 28
Partial Models: A How Is Checking Done? Position Paper M.Famelis, S.Ben-David, M.Chechik, • High level algorithm: R.Salay 1 Express the entire partial model as a formula Φ M 1 : Motivating Example Φ M 1 = Φ P ∧ Control ∧ Off . . . ∧ Controller ∧ on() ∧ . . . Working with Partial Models 2 Express the property as a propositional formula Φ C 2 . Reasoning Transformation 3 Check Φ M 1 ∧ Φ C 2 and Φ M 1 ∧ ¬ Φ C 2 for SAT. Conclusion • If SAT, we also get counterexamples for feedback. • We can reason about all concretizations together, with two queries to the SAT solver. • Study of feasibility and scalability, submitted [FSC11]. 16 / 28
1 Motivating Example 2 Working with Partial Models Reasoning Transformation 3 Conclusion
Partial Models: A Two Kinds Of Transformations Position Paper M.Famelis, S.Ben-David, M.Chechik, R.Salay 1 Classical transformations adapted to work for Partial Motivating Example Models. Working with Partial Models Reasoning • “Detail-adding” (DA) refinements, refactoring Transformation Conclusion • Allowing development to continue, even in the presence of uncertainty. 2 Transformations specific to Partial Models. • “Uncertainty-removing” (UR) refinements. • A systematic way to incorporate new information. 18 / 28
Partial Models: A Using Adapted Transformations Position Paper M.Famelis, Bob elaborates Warning by DA refinement. S.Ben-David, M.Chechik, R.Salay Motivating Example Working with Partial Models Reasoning Transformation Conclusion 19 / 28
Partial Models: A Why “Adapt” Transformations? Position Paper M.Famelis, Not all concretizations have a Warning state! S.Ben-David, M.Chechik, R.Salay Motivating Example Working with Partial Models Reasoning Transformation Conclusion 20 / 28
Partial Models: A Some “Just Work” Position Paper M.Famelis, S.Ben-David, M.Chechik, R.Salay Bob can do some kinds of refactoring straightforwardly: Motivating Example Working with Partial Models Reasoning Transformation Conclusion 21 / 28
Partial Models: A Comments On Adapted Position Paper M.Famelis, Transformations S.Ben-David, M.Chechik, R.Salay • Detail-adding refinements should result in models with Motivating Example “more information”, same level of uncertainty. Working with Partial Models Reasoning • Refactoring should not add or remove information and/or Transformation Conclusion uncertainty. • Adapted versions of classical transformations must be total and surjective. • Such transformations preserve True existential and False universal properties. 22 / 28
Partial Models: A Removing Uncertainty Position Paper M.Famelis, S.Ben-David, Once Bob and Alice have negotiated, they can return to M.Chechik, R.Salay classical models: Motivating Example Working with Partial Models Reasoning Transformation Conclusion “Uncertainty-removing” refinements : Transformations specific to Partial Models. 23 / 28
Partial Models: A Comments On UR Refinements Position Paper M.Famelis, S.Ben-David, M.Chechik, R.Salay • For May partiality, optional elements can be kept optional, Motivating Example removed or made mandatory. Working with Partial Models • Completely remove uncertainty: Concretization Reasoning Transformation Conclusion • UR refinement: a generic refinement mechanism, with well understood properties [SCF11]: • True ( False ) properties remain True ( False ). • Maybe properties can be changed into True or False or remain unaffected. 24 / 28
Partial Models: A Summary Position Paper M.Famelis, S.Ben-David, M.Chechik, R.Salay • Goal: Facilitate decision deferral in the presence of Motivating Example uncertainty. Working with Partial Models • Approach: Use Partial Models to represent sets of Reasoning Transformation Conclusion alternatives. • How: Partial Models are first-class development artifacts. • Property checking. • Adapted transformations. • Partial Model-specific transformations. 25 / 28
Partial Models: A Conclusion Position Paper M.Famelis, S.Ben-David, M.Chechik, • Important contributions: R.Salay Motivating • Decision deferral in the presence of uncertainty. Example Working with • Compact and exact representation of a set. Partial Models Reasoning Transformation • Metamodel independence. Conclusion • In the paper: 14 specific Research Questions. • Preliminary work on Representation, Property Checking. • Some prototype tooling. • Main focus now: Transformations. 26 / 28
Recommend
More recommend