250 likes | 355 Views
Meta-model Search: Using XPath for Searching Domain-Specific Models. Rajesh Sudarsan Department of Computer Science Virginia Tech sudarsar@cs.vt.edu. Dr. Jeff Gray Department of Computer and Information Sciences University of Alabama at Birmingham gray@cis.uab.edu. XMOS.
E N D
Conference on Software Engineering Research and Practice Meta-model Search: Using XPath for Searching Domain-Specific Models Rajesh Sudarsan Department of Computer Science Virginia Tech sudarsar@cs.vt.edu Dr. Jeff Gray Department of Computer and Information Sciences University of Alabama at Birmingham gray@cis.uab.edu
Conference on Software Engineering Research and Practice XMOS "count(/a/b/following::*)" “//d/preceding::*” "name(//attribute::*)" “sum(//b/child::*)“ "//*/comment()" "true()" XPath Search Engine XPath Processor Metamodel and Domain-specific models XPath Expression Search Algorithm GME BON API GME Plug-in Generic Modeling Environment Research Goal
Conference on Software Engineering Research and Practice Outline • Introduction to Searching • Summary • Background • XPath • Domain-specific Modeling and GME • XPath Model Search (XMOS)
Conference on Software Engineering Research and Practice Basics • The keys to successful searchingare: • Choosing the right search tool • Knowing about search strategies and how to use them • Information Retrieval and Data Retrieval
Conference on Software Engineering Research and Practice • Text Processing tools • E.g. Microsoft Word Advanced search options in Google Find/Replace utility in MS Word • World Wide Web • E.g. Google Example Search Domains
Conference on Software Engineering Research and Practice Searching in Application Development Environment • Integrated Development Tools • E.g., MS Visual Studio 6 • Domain Modeling Tools • E.g., GME • Do not support advanced search capabilities
Conference on Software Engineering Research and Practice XPath • W3C standard • Select parts of an XML document • Support for querying • Mainly used in XSLT • XPath syntax is stricter as compared to XQuery • Everything is an expression • Expressions are resolved with respect to current node or root node
Conference on Software Engineering Research and Practice Expressions • Primary Expressions • Literals, Operators, Functions (Node-set, String, Boolean, and Number) • Arithmetic expressions • Location Paths • Axis (self, child, parent, attribute, descendent, ancestor, etc.) • Node tests (Name, *, comment (), text (), node ()) • Predicates • Complex Expressions
Conference on Software Engineering Research and Practice Domain-specific Modeling and GME • What are Models? • Models are an abstract representation of real world systems or process. • Domain-Specific Models (DSM) • Models that address a particular domain
Conference on Software Engineering Research and Practice Model Integrated Computing Architecture Environment Evolution Application Evolution 1 9 2 A1 A2 A3 4 5 3 8 6 7 1. Meta-programming Interface 2. Semi-Formal Specification 5. Model Builder 8. Model Interpretation 3. Meta-level Translation 6. Models 9. Application Domain 4. DSME 7. Model Interpreter
Conference on Software Engineering Research and Practice Metamodeling Layered Architecture Meta-metamodeling Language Language for defining Metamodels E.g. EBNF grammars Meta-metamodel Specify An instance of meta-metamodel. Defines the language for specifying a model E.g. Pascal defined in EBNF MetamodelingLanguage Metamodel Specify An instance of metamodel. Defines the language for describing the information domain E.g. Pascal program Domain modeling Language Model Specify An instance of a model. Defines a specific information domain E.g. Program execution Computer Based System
Conference on Software Engineering Research and Practice Generic Modeling Environment (GME) Metamodel • Meta-programmable toolkit based on the principles of MIC • Configurable toolkit for creating DSM and program synthesis environments • Meta-models specify the modeling paradigm Domain-specific Model
Conference on Software Engineering Research and Practice GME Modeling Concept • Supports hierarchy, multiple views, sets, references, and explicit constraints Root (Model) Atoms Models Sets References Connections
Conference on Software Engineering Research and Practice 9 A3 A1 A2 8 8. Model Interpretation 9. Application Domain GME Builder Object Network (BON) • C++ framework to access and instantiate objects in GME model database
Conference on Software Engineering Research and Practice Motivation: Existing Limitations Screenshot of current implementation of Find utility in GME • The searching is limited to the options provided • Any search involving inequality sign (<, >) cannot be expressed in the current tool • Composition of search conditions is not possible
Conference on Software Engineering Research and Practice XPath Evaluator XPath Expression XPath Parser XPath MOdel Search (XMOS) Plug-in Architecture Translator/Interpreter (Customized Data Structure) Parsed tokens SearchModule GME Builder Object Network Model list C++ API Result
Conference on Software Engineering Research and Practice XMOS Plug-in Screenshot User enters XPath expression Results are displayed
Conference on Software Engineering Research and Practice Supported subset of XPath features in XMOS
Conference on Software Engineering Research and Practice Case Study • Boeing Bold Stroke Mission Computing Avionics framework • Used as experimental platform for several DARPA programs • Three million lines of C++ code across 6000 components • Embedded Systems Modeling Language (ESML) • Models all of the Bold Stroke scenarios in the GME • (Not a contribution of this thesis)
Conference on Software Engineering Research and Practice Bold Stroke components in ESML
Conference on Software Engineering Research and Practice “And” helps in composition of search queries Case 1 Locate all the concurrency elements that have an attribute Lock Type set to “Null Lock”and whose lock strategy is not “Recursive Thread Mutex”. //concurrency[@locktype="Null Lock" and @lockstrategy!= “Recursive Thread Mutex”]
Conference on Software Engineering Research and Practice Case 2 Search for all data elements whose value is set to 5 and all log elements whose logging kind is set to “On Write” //data[@value=5] and //log[@kind="On Write"]
Conference on Software Engineering Research and Practice Key Contribution and Limitations • Key Contribution • Domain-independent customizable search queries for a metamodeling tool • Limitations of current implementation • Modeless Dialog box • Display the component window from the result dialog box.
Conference on Software Engineering Research and Practice Summary • Searching entities through Domain Models in large systems made simpler and efficient. • Properties of similar entities can be modified easily in Computer Based Systems • Every object returned by search algorithm will provide path to the exact location of the object • Future Scope : • Implementation for expressing complex XPath expressions • Generic search plug-in adaptable with all modeling environments
Conference on Software Engineering Research and Practice Thank you