Transcript Slide 1

June 29, 2005
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
[email protected]
Dr. Jeff Gray
Department of Computer and
Information Sciences
University of Alabama at Birmingham
[email protected]
June 29, 2005
Conference on Software Engineering Research and Practice
Research Goal
"count(/a/b/following::*)"
“//d/preceding::*”
"name(//attribute::*)"
“sum(//b/child::*)“
"//*/comment()"
"true()"
XMOS
XPath Search Engine
XPath
Processor
XPath Expression
Search
Algorithm
GME BON API
GME Plug-in
Generic Modeling
Environment
Metamodel and
Domain-specific
models
June 29, 2005
Conference on Software Engineering Research and Practice
Outline

Introduction to Searching

Background

XPath
 Domain-specific Modeling and GME

XPath Model Search (XMOS)

Summary
June 29, 2005
Conference on Software Engineering Research and Practice
Basics

The keys to successful searching are:

Choosing the right search tool
 Knowing about search strategies and how to
use them

Information Retrieval and Data Retrieval
June 29, 2005
Conference on Software Engineering Research and Practice
Example Search Domains
Text Processing tools
 E.g. Microsoft Word
Advanced search options in Google
Find/Replace utility in MS Word
World Wide Web
 E.g. Google
June 29, 2005
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
June 29, 2005
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
June 29, 2005
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
June 29, 2005
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
June 29, 2005
Conference on Software Engineering Research and Practice
Model Integrated Computing
Architecture
1
2
Environment Application
Evolution
Evolution
9
A1
A2
A3
4
5
3
1. Meta-programming Interface
2. Semi-Formal Specification
6
8
7
3. Meta-level Translation
5. Model Builder
6. Models
4. DSME
7. Model Interpreter
8. Model Interpretation
9. Application Domain
June 29, 2005
Conference on Software Engineering Research and Practice
Metamodeling Layered Architecture
Meta-metamodeling Language
Meta-metamodel
Language for defining Metamodels
E.g. EBNF grammars
Specify
Metamodeling Language
Metamodel
An instance of meta-metamodel. Defines
the language for specifying a model
E.g. Pascal defined in EBNF
Specify
Domain modeling Language
Model
Specify
Computer Based
System
An instance of metamodel. Defines the
language for describing the information
domain
E.g. Pascal program
An instance of a model. Defines a specific
information domain
E.g. Program execution
June 29, 2005
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
June 29, 2005
Conference on Software Engineering Research and Practice
GME Modeling Concept

Supports hierarchy, multiple views, sets,
references, and explicit constraints
Root (Model)
Connections
Atoms
Models
Sets
References
June 29, 2005
Conference on Software Engineering Research and Practice
GME Builder Object Network
(BON)

C++ framework to access and instantiate
objects in GME model database
9
A1
A2
A3
8
8. Model Interpretation
9. Application Domain
June 29, 2005
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
June 29, 2005
Conference on Software Engineering Research and Practice
XPath MOdel Search (XMOS)
Plug-in Architecture
XPath Evaluator
Parsed tokens
XPath Expression
Translator/Interpreter
(Customized
Data Structure)
XPath Parser
Search Module
GME Builder Object
Network
Model list
Result
June 29, 2005
Conference on Software Engineering Research and Practice
XMOS Plug-in Screenshot
User enters
XPath
expression
Results are
displayed
June 29, 2005
Conference on Software Engineering Research and Practice
Supported subset of XPath
features in XMOS
Features
Primary Expressions
Path Expression
Arithmetic Expression
Comparison Expression
Explanation
Literals, variable references
Predicates, Axes, and Location Paths
Addition, subtraction, multiplication and division
Relational operators like >, <, <=, >=, =.
June 29, 2005
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)
June 29, 2005
Conference on Software Engineering Research and Practice
Bold Stroke components in ESML
June 29, 2005
Conference on Software Engineering Research and Practice
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”.
“And” helps in
composition of
search queries
//concurrency[@locktype="Null Lock" and
@lockstrategy!= “Recursive Thread Mutex”]
June 29, 2005
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"]
June 29, 2005
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.
June 29, 2005
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
June 29, 2005
Conference on Software Engineering Research and Practice