Masterarbeit: Design of Data Model for Description of Timed … · 2012-10-11 · Masterarbeit:...
Transcript of Masterarbeit: Design of Data Model for Description of Timed … · 2012-10-11 · Masterarbeit:...
Masterarbeit:Design of Data Model for Description of Timed
Automata and Algorithms for Their Retrieval in LogData
Yu Zhang
Technische Universität DresdenDepartment of Computer ScienceInstitut für Angewandte Informatik
April 17th, 2008
Yu Zhang (TUD) Masterarbeit April 17th, 2008 1 / 73
Outline
1 MotivationIntroductionTask Description
2 Design and ImplementationData ModelStorage of AutomataSearch Mechanism
3 Results and PerformanceTest CasesPerformance EvaluationPerformance Comparison
4 Conclusion and Future WorkConclusionFuture Work
Yu Zhang (TUD) Masterarbeit April 17th, 2008 2 / 73
Motivation Introduction
Outline
1 MotivationIntroductionTask Description
2 Design and ImplementationData ModelStorage of AutomataSearch Mechanism
3 Results and PerformanceTest CasesPerformance EvaluationPerformance Comparison
4 Conclusion and Future WorkConclusionFuture Work
Yu Zhang (TUD) Masterarbeit April 17th, 2008 3 / 73
Motivation Introduction
Timed Automata
Modern automation systems are mostly discrete events basedSystems can be described via hierarchical modelTimed automata can be used to describe such systemsTimed automaton: finite-state machine with clocks
Yu Zhang (TUD) Masterarbeit April 17th, 2008 4 / 73
Motivation Introduction
Timed Automata
Modern automation systems are mostly discrete events basedSystems can be described via hierarchical modelTimed automata can be used to describe such systemsTimed automaton: finite-state machine with clocks
Yu Zhang (TUD) Masterarbeit April 17th, 2008 5 / 73
Motivation Introduction
Timed Automata
Modern automation systems are mostly discrete events basedSystems can be described via hierarchical modelTimed automata can be used to describe such systemsTimed automaton: finite-state machine with clocks
Yu Zhang (TUD) Masterarbeit April 17th, 2008 6 / 73
Motivation Task Description
Outline
1 MotivationIntroductionTask Description
2 Design and ImplementationData ModelStorage of AutomataSearch Mechanism
3 Results and PerformanceTest CasesPerformance EvaluationPerformance Comparison
4 Conclusion and Future WorkConclusionFuture Work
Yu Zhang (TUD) Masterarbeit April 17th, 2008 7 / 73
Motivation Task Description
My TasksPart of a Trace Analysis System for Failure Diagnosis
1.Design and develop a datamodel2.Mechanism to store automata3.Search mechanism that searches the known automata in trace
Search mechanism for small automataSearch mechanism for big automata
4. A trace generator
Yu Zhang (TUD) Masterarbeit April 17th, 2008 8 / 73
Motivation Task Description
Part of Components in a Trace Analysis System
Yu Zhang (TUD) Masterarbeit April 17th, 2008 9 / 73
Motivation Task Description
Part of Components in a Trace Analysis System
Yu Zhang (TUD) Masterarbeit April 17th, 2008 10 / 73
Design and Implementation Data Model
Outline
1 MotivationIntroductionTask Description
2 Design and ImplementationData ModelStorage of AutomataSearch Mechanism
3 Results and PerformanceTest CasesPerformance EvaluationPerformance Comparison
4 Conclusion and Future WorkConclusionFuture Work
Yu Zhang (TUD) Masterarbeit April 17th, 2008 11 / 73
Design and Implementation Data Model
Design of the DatamodelConcept of the Datamodel
Generic, extensible and flexibleComposite Pattern used for purpose of complicated modelStrategy Pattern used for purpose of making analysis
Yu Zhang (TUD) Masterarbeit April 17th, 2008 12 / 73
Design and Implementation Data Model
Design of the DatamodelConcept of the Datamodel
Generic, extensible and flexibleComposite Pattern used for purpose of complicated modelStrategy Pattern used for purpose of making analysis
Yu Zhang (TUD) Masterarbeit April 17th, 2008 12 / 73
Design and Implementation Data Model
Design of the DatamodelConcept of the Datamodel
Generic, extensible and flexibleComposite Pattern used for purpose of complicated modelStrategy Pattern used for purpose of making analysis
Yu Zhang (TUD) Masterarbeit April 17th, 2008 12 / 73
Design and Implementation Data Model
Design of the DatamodelConcept of the Datamodel
Generic, extensible and flexibleComposite Pattern used for purpose of complicated modelStrategy Pattern used for purpose of making analysis
Yu Zhang (TUD) Masterarbeit April 17th, 2008 13 / 73
Design and Implementation Data Model
Design of the DatamodelConcept of the Datamodel
Generic, extensible and flexibleComposite Pattern used for purpose of complicated modelStrategy Pattern used for purpose of making analysis
Yu Zhang (TUD) Masterarbeit April 17th, 2008 14 / 73
Design and Implementation Data Model
Design the DatamodelUML of the Datamodel
Yu Zhang (TUD) Masterarbeit April 17th, 2008 15 / 73
Design and Implementation Data Model
Design the DatamodelUML of the Datamodel
Yu Zhang (TUD) Masterarbeit April 17th, 2008 16 / 73
Design and Implementation Storage of Automata
Outline
1 MotivationIntroductionTask Description
2 Design and ImplementationData ModelStorage of AutomataSearch Mechanism
3 Results and PerformanceTest CasesPerformance EvaluationPerformance Comparison
4 Conclusion and Future WorkConclusionFuture Work
Yu Zhang (TUD) Masterarbeit April 17th, 2008 17 / 73
Design and Implementation Storage of Automata
Problem of PersistenceObject/Relational Mapping (ORM)
Best solution to solve the problem of object persistenceAutomated and transparent persistence of objects in a Javaapplication to the tables in a relational database
An Object/Relational Mapping (ORM) Solution
API for performing basic CRUD(create, retrieve, update, delete)Language for specifying queriesFacility for specifying mapping metadataTechnique for the ORM implementation to interact withtransactional objects
Yu Zhang (TUD) Masterarbeit April 17th, 2008 18 / 73
Design and Implementation Storage of Automata
Problem of PersistenceHibernate
A full object/relational mapping toolA solution to the problem of persistence data in JavaMediates the application’s interaction with a relational databaseAllows to develop persistent classes following object-orientedidiom
Yu Zhang (TUD) Masterarbeit April 17th, 2008 19 / 73
Design and Implementation Storage of Automata
Problem of PersistenceSolving Persistence Problem with Hibernate
Developing ScenariosTop-down:start with existing domain model
Implement the domain model in JavaCreate mapping metadata for each persistent classConfigure Hibernate tool and start upStore and load objects
Bottom-up:start with an existing database schema and the domainmodel
Yu Zhang (TUD) Masterarbeit April 17th, 2008 20 / 73
Design and Implementation Storage of Automata
Problem of PersistenceAn Example of Mapping Metadata
Yu Zhang (TUD) Masterarbeit April 17th, 2008 21 / 73
Design and Implementation Storage of Automata
Problem of PersistenceEntity Relationship of the datamodel
Yu Zhang (TUD) Masterarbeit April 17th, 2008 22 / 73
Design and Implementation Search Mechanism
Outline
1 MotivationIntroductionTask Description
2 Design and ImplementationData ModelStorage of AutomataSearch Mechanism
3 Results and PerformanceTest CasesPerformance EvaluationPerformance Comparison
4 Conclusion and Future WorkConclusionFuture Work
Yu Zhang (TUD) Masterarbeit April 17th, 2008 23 / 73
Design and Implementation Search Mechanism
Trace and Trace Generator
Reads in a list of XML filesGenerates a random event trace including errors for each XML fileby calling a threadStarts all the threads in parallelWaits for each thread to finish
Yu Zhang (TUD) Masterarbeit April 17th, 2008 24 / 73
Design and Implementation Search Mechanism
Trace and Trace Generator
Reads in a list of XML filesGenerates a random event trace including errors for each XML fileby calling a threadStarts all the threads in parallelWaits for each thread to finish
Yu Zhang (TUD) Masterarbeit April 17th, 2008 25 / 73
Design and Implementation Search Mechanism
Trace and Trace Generator
Reads in a list of XML filesGenerates a random event trace including errors for each XML fileby calling a threadStarts all the threads in parallelWaits for each thread to finish
Yu Zhang (TUD) Masterarbeit April 17th, 2008 26 / 73
Design and Implementation Search Mechanism
Search Mechanism
Takes a list of XML files and a trace as parametersSearch mechanism for small automata with less than four states
Search for the event sequenceSearch mechanism for big automata with more than four states
Search for the next transition
Yu Zhang (TUD) Masterarbeit April 17th, 2008 27 / 73
Design and Implementation Search Mechanism
Search Mechanism for Small AutomataWork Flow
Yu Zhang (TUD) Masterarbeit April 17th, 2008 28 / 73
Design and Implementation Search Mechanism
Search Mechanism for Small AutomataWork Flow
Yu Zhang (TUD) Masterarbeit April 17th, 2008 29 / 73
Design and Implementation Search Mechanism
Search Mechanism for Small AutomataWork Flow
Yu Zhang (TUD) Masterarbeit April 17th, 2008 30 / 73
Design and Implementation Search Mechanism
Search Mechanism for Small AutomataWork Flow
Yu Zhang (TUD) Masterarbeit April 17th, 2008 31 / 73
Design and Implementation Search Mechanism
Search Mechanism for Small AutomataWork Flow
Yu Zhang (TUD) Masterarbeit April 17th, 2008 32 / 73
Design and Implementation Search Mechanism
Search Mechanism for Small AutomataWork Flow
Yu Zhang (TUD) Masterarbeit April 17th, 2008 33 / 73
Design and Implementation Search Mechanism
Search Mechanism for Small AutomataWork Flow
Yu Zhang (TUD) Masterarbeit April 17th, 2008 34 / 73
Design and Implementation Search Mechanism
Search Mechanism for Small AutomataWork Flow
Yu Zhang (TUD) Masterarbeit April 17th, 2008 35 / 73
Design and Implementation Search Mechanism
Search Mechanism for Small AutomataWork Flow
Yu Zhang (TUD) Masterarbeit April 17th, 2008 36 / 73
Design and Implementation Search Mechanism
Search Mechanism for Small AutomataWork Flow
Yu Zhang (TUD) Masterarbeit April 17th, 2008 37 / 73
Design and Implementation Search Mechanism
Search Mechanism for Small AutomataWork Flow
Yu Zhang (TUD) Masterarbeit April 17th, 2008 38 / 73
Design and Implementation Search Mechanism
Search Mechanism for Small AutomataWork Flow
Yu Zhang (TUD) Masterarbeit April 17th, 2008 39 / 73
Design and Implementation Search Mechanism
Search Mechanism for Small AutomataWork Flow
Yu Zhang (TUD) Masterarbeit April 17th, 2008 40 / 73
Design and Implementation Search Mechanism
Search Mechanism for Small AutomataWork Flow
Yu Zhang (TUD) Masterarbeit April 17th, 2008 41 / 73
Design and Implementation Search Mechanism
Search Mechanism for Small AutomataWork Flow
Yu Zhang (TUD) Masterarbeit April 17th, 2008 42 / 73
Design and Implementation Search Mechanism
Search Mechanism for Small AutomataWork Flow
Yu Zhang (TUD) Masterarbeit April 17th, 2008 43 / 73
Design and Implementation Search Mechanism
Search Mechanism for Big AutomataWork Flow
Yu Zhang (TUD) Masterarbeit April 17th, 2008 44 / 73
Design and Implementation Search Mechanism
Search Mechanism for Big AutomataWork Flow
Yu Zhang (TUD) Masterarbeit April 17th, 2008 45 / 73
Design and Implementation Search Mechanism
Search Mechanism for Big AutomataWork Flow
Yu Zhang (TUD) Masterarbeit April 17th, 2008 46 / 73
Design and Implementation Search Mechanism
Search Mechanism for Big AutomataWork Flow
Yu Zhang (TUD) Masterarbeit April 17th, 2008 47 / 73
Design and Implementation Search Mechanism
Search Mechanism for Big AutomataWork Flow
Yu Zhang (TUD) Masterarbeit April 17th, 2008 48 / 73
Design and Implementation Search Mechanism
Search Mechanism for Big AutomataWork Flow
Yu Zhang (TUD) Masterarbeit April 17th, 2008 49 / 73
Design and Implementation Search Mechanism
Search Mechanism for Big AutomataWork Flow
Yu Zhang (TUD) Masterarbeit April 17th, 2008 50 / 73
Design and Implementation Search Mechanism
Search Mechanism for Big AutomataWork Flow
Yu Zhang (TUD) Masterarbeit April 17th, 2008 51 / 73
Design and Implementation Search Mechanism
Search Mechanism for Big AutomataWork Flow
Yu Zhang (TUD) Masterarbeit April 17th, 2008 52 / 73
Design and Implementation Search Mechanism
Search Mechanism for Big AutomataWork Flow
Yu Zhang (TUD) Masterarbeit April 17th, 2008 53 / 73
Design and Implementation Search Mechanism
Search Mechanism for Big AutomataWork Flow
Yu Zhang (TUD) Masterarbeit April 17th, 2008 54 / 73
Design and Implementation Search Mechanism
Search Mechanism for Big AutomataWork Flow
Yu Zhang (TUD) Masterarbeit April 17th, 2008 55 / 73
Design and Implementation Search Mechanism
Search Mechanism for Big AutomataWork Flow
Yu Zhang (TUD) Masterarbeit April 17th, 2008 56 / 73
Design and Implementation Search Mechanism
Search Mechanism for Big AutomataWork Flow
Yu Zhang (TUD) Masterarbeit April 17th, 2008 57 / 73
Design and Implementation Search Mechanism
Search Mechanism for Big AutomataWork Flow
Yu Zhang (TUD) Masterarbeit April 17th, 2008 58 / 73
Design and Implementation Search Mechanism
Search Mechanism for Big AutomataWork Flow
Yu Zhang (TUD) Masterarbeit April 17th, 2008 59 / 73
Design and Implementation Search Mechanism
Search Mechanism for Big AutomataWork Flow
Yu Zhang (TUD) Masterarbeit April 17th, 2008 60 / 73
Design and Implementation Search Mechanism
Search Mechanism for Big AutomataSupplement
Event corresponds a proper transition without Guard
Set current transition for further search
Event corresponds a proper transition with a Guard
Checks if the Guard is satisfiedIn case of satisfaction, set current transitionIn case of violation, reports time-out error
Yu Zhang (TUD) Masterarbeit April 17th, 2008 61 / 73
Results and Performance Test Cases
Outline
1 MotivationIntroductionTask Description
2 Design and ImplementationData ModelStorage of AutomataSearch Mechanism
3 Results and PerformanceTest CasesPerformance EvaluationPerformance Comparison
4 Conclusion and Future WorkConclusionFuture Work
Yu Zhang (TUD) Masterarbeit April 17th, 2008 62 / 73
Results and Performance Test Cases
Performance Test Cases to Test the Functionality ofthe Search MechanismTest Cases for Search Mechanism of Small Automata
Various small automataSmall automata with cyclesSmall timed-automataHybrid small automata
Yu Zhang (TUD) Masterarbeit April 17th, 2008 63 / 73
Results and Performance Test Cases
Test Cases to Test the Functionality of the SearchMechanismTest Cases for Search Mechanism of Big Automata
Various big automataBig automata with cyclesBig timed-automata
Yu Zhang (TUD) Masterarbeit April 17th, 2008 64 / 73
Results and Performance Performance Evaluation
Outline
1 MotivationIntroductionTask Description
2 Design and ImplementationData ModelStorage of AutomataSearch Mechanism
3 Results and PerformanceTest CasesPerformance EvaluationPerformance Comparison
4 Conclusion and Future WorkConclusionFuture Work
Yu Zhang (TUD) Masterarbeit April 17th, 2008 65 / 73
Results and Performance Performance Evaluation
Performance of the Two Search Mechanism
Yu Zhang (TUD) Masterarbeit April 17th, 2008 66 / 73
Results and Performance Performance Comparison
Outline
1 MotivationIntroductionTask Description
2 Design and ImplementationData ModelStorage of AutomataSearch Mechanism
3 Results and PerformanceTest CasesPerformance EvaluationPerformance Comparison
4 Conclusion and Future WorkConclusionFuture Work
Yu Zhang (TUD) Masterarbeit April 17th, 2008 67 / 73
Results and Performance Performance Comparison
Search Time Comparison and Possible Reasons
Small: Compares the events in trace with the event sequenceAn automaton has several event sequences
Big:Compares the events in trace directly with the automaton
Yu Zhang (TUD) Masterarbeit April 17th, 2008 68 / 73
Conclusion and Future Work Conclusion
Outline
1 MotivationIntroductionTask Description
2 Design and ImplementationData ModelStorage of AutomataSearch Mechanism
3 Results and PerformanceTest CasesPerformance EvaluationPerformance Comparison
4 Conclusion and Future WorkConclusionFuture Work
Yu Zhang (TUD) Masterarbeit April 17th, 2008 69 / 73
Conclusion and Future Work Conclusion
Conclusion
Datamodel:
An extensible mechanism to store and load timed automata in andfrom databaseAutomata analysis also included with analysis reslut savedAnalysis result dynamically added as automaton attribute
Search Mechanism:Searches known automata in a trace
Found automata and their information savedErrors during search also saved for purpose of diagnosis
Yu Zhang (TUD) Masterarbeit April 17th, 2008 70 / 73
Conclusion and Future Work Future Work
Outline
1 MotivationIntroductionTask Description
2 Design and ImplementationData ModelStorage of AutomataSearch Mechanism
3 Results and PerformanceTest CasesPerformance EvaluationPerformance Comparison
4 Conclusion and Future WorkConclusionFuture Work
Yu Zhang (TUD) Masterarbeit April 17th, 2008 71 / 73
Conclusion and Future Work Future Work
Future Work
Apply more powerful databases (e.g.Oracle) to support parallelstorage and loadApply type-safe annotations embedded directly in Java sourcecode when mapping metadata to avoid XML filesMapping before deploy to real worldOptimization of search mechanism for various user requirments
Search a great number of automata in parallel
Yu Zhang (TUD) Masterarbeit April 17th, 2008 72 / 73
Conclusion and Future Work Future Work
End
Thanks for your attention and time for questions.
Yu Zhang (TUD) Masterarbeit April 17th, 2008 73 / 73