Title: Metamodel Search: Using XPath for Searching DomainSpecific Models
1Meta-model Search Using XPath for Searching
Domain-Specific Models
Thesis Proposal
- Rajesh Sudarsan
- Department of Computer and Information Science
- University of Alabama at Birmingham
- sudarsar_at_cis.uab.edu
- Advisor Dr. Jeff Gray
2Research Goal
3Outline
- Introduction to Searching
- Existing Search utilities
- Domain-specific Modeling and GME
- Motivation and Proposed research
4Basics
- 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
5Example Search Domains
- Text Processing tools
- E.g. Microsoft Word
- World Wide Web
- E.g. Google
- Software Development tools
- E.g. Microsoft Visual C, Eclipse
6Search utility in MS Word, Google
Advanced search options in Google
Find/Replace utility in MS Word
7Searching in Domain Application modeling
Environment
- Domain
- Group of entities that share the same
characteristics or exhibit similar functionality
- Product Line Architecture
- Do not support advanced search capabilities
8Outline
- Introduction to Searching
- Existing Search utilities
- Domain-specific Modeling and GME
- Motivation and Proposed research
9Existing Search Utilities
10JQuery
- Developed by Software Practices Lab at the
University of British Columbia
- Eclipse Plug-in
- Set of TyRuBa predicates
11JQuery in Eclipse
User can edit exiting Queries or write his own
queries
12XQuery
- W3C standard for querying XML documents
- Each query is an expression
- Data model is based on XPath and XML Schema
13Types of XQuery expressions
- Path Expressions
- document(ATM.xml)//activitytitleDeposit//a
mount _at_value
- Element Constructors
name
job deptno
NETspecialist100000
14Types (contd.)
- FLWOR- For-Let-Where-Order-Return
for d in document("depts.xml")//deptno
let e document("emps.xml")//employeedeptno
d where count(e) 10 order by avg(e/salary
) descending return d,
count(e),
avg(e/salary)
- Operators and Functions
- (e.g. Sum, Avg)
15Types (contd.)
for b in document("bib.xml")//book
where some p in b//paragraph satisfies
(contains(p,"sailing") AND contains(p,"windsur
fing")) return b/title
- Test or modify data
- (e.g. instance-of, typeswitch/case)
16XPath
- 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 a expression
- Expressions are resolved with respect current
node or root node
17XML document Tree Structure
? pin"id2345" Depositing Moneytle 12323.92 osit Withdrawing Money 34234.
33
Types of XPath nodes 1) Root 2) Element 3) Tex
t 4) Attribute 5) Comment 6) Processing Instr
uction
7) Namespaces
Kind of Nodes
Element
Root
Attribute
Text
Transaction
Root
date
Deposit
Withdraw
title
comment
amount
pin
title
comment
amount
pin
.
18Expressions
- Primary Expressions
- Literals, Operators, Functions (Node-set, String,
Boolean, and Number)
- Arithmetic expressions
- Location Paths
- Axis
- Node tests
- Predicates
- Complex Expressions
19Location Path
- Axes
- Relationship between the context node and
- the nodes selected by the location step
- self, child, descendent-or-self, parent,
- attribute, descendent, ancestor, ancestor-or-
- self, preceding, preceding-sibling, following,
- following-sibling, and namespace
20Location Path (contd.)
- Node tests
- Specifies the types of the nodes that will be
- selected
- Name, , comment (), text (), node (),
- processing-instruction (), and processing-
- instruction (value)
- Predicates
- Specific conditions enclosed in
21Additional Operators
22Example
XPath Expressions
XML Document
-
-
-
- The Wall
- Pink Floyd
- 10.90
-
-
- Patience
- George Michael
- 9.90
-
-
- The Very Best Of Rod Stewart
- Rod Stewart
- 9.90
-
1. To display the price of all CDs. Expres
sion /catalog/cd/price 2. List the title, arti
st and price of all CDs. Expression /catalog
/cd/ 3. List all information about everything
in the catalogue Expression // 4.
Select the CD whose price is 10.90
Expression /catalog/cdprice10.90
5. List those CDs that have some informatio
n associated with it Expression //cd_at_
23Domain-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
24Model Integrated Computing (MIC)
- Definition
- Model Integrated Computing (MIC) is a
model-based approach to software development,
facilitating the synthesis of application
programs from models created using customized,
domain-specific program synthesis environments
25MIC Architecture
1
9
Environment
Application
2
A3
A1
A2
4
5
3
8
6
7
1. Meta-programming
2. Formal Specification
5. Model Builder
8. Model Interpretation
3. Meta-level Translation
6. Models
9. Application Domain
4. MIPS Environment
7. Model Interpreter
26Modeling Concepts
- Metamodel
- A metamodel for a domain is defined as the
modeling paradigm captured in the form of a
formal modeling language.
- Modeling Paradigm
- The modeling paradigm is a set of requirements
that specifies the ontology of the domain.
27Meta Object Facility (MOF)
Metamodeling Language
Language for defining Metamodels
Meta-metamodel
Specify
Metamodeling Language
An instance of meta-metamodel. Defines the
language for specifying a model
Metamodel
Specify
Domain modeling Language
An instance of metamodel. Defines the language
for describing the information domain
Model
Specify
Computer Based System
An instance of a model. Defines a specific
information domain
28Metamodel and Constraints
Constraint based Metamodel for FSM
Finite State Machine Metamodel
29Generic 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
30GME Modeling Concept
- Supports hierarchy, multiple aspects, sets,
- references, and explicit constraints
Root (Model)
Atoms
References
Sets
Models
Connections
31GME Builder Object Network (BON)
- C framework to access and instantiate objects
in GME model database
32Outline
- Introduction to Searching
- Existing Search utilities
- Domain-specific Modeling and GME
- Motivation and Proposed research
33Motivation
- The capability to efficiently search an artifact
that is being created is absent in GME
- Serious disadvantage as the size of a model
increases to hundreds of modeling elements.
(1000 modeling elements)
- Example Automobile manufacturing industry,
Aviation design center
34Existing Feature
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
35Proposed Research
- Develop a search plug-in in C using XPath for
writing search predicates
- Current implementation will be part of GME.
- Use GME Builder Object Network (BON) to search
model database instead of XML file.
36XPath MOdel Search Plug-in Architecture
XPath Evaluator
Parse tree
Translator (Customized Data Structure)
XPath Expression
XPath Parser
Search Algorithm
GME Builder Object Network
Model list
C API
Output
37GME hierarchy in XPath
- XPath uses the tree hierarchy in GME to express
search queries
- The XPath search engine traverses the internal
GME representation for the domain model and
returns those model entities that match the
search predicate - The expression attribute will be matched with the
kind value of the artifact being searched
38XMOS Plug-in Screenshot
User enters XPath expression
39Supported XPath features in XMOS
40Outline
- Introduction to Searching
- Existing Search utilities
- Domain-specific Modeling and GME
- Motivation and Proposed research
41Timeline
- Main Tasks
- Development of the XPath engine
- Search Algorithm and User Interface
- Testing
42Progress Chart
43Outline
- Introduction to Searching
- Existing Search utilities
- Domain-specific Modeling and GME
- Motivation and Proposed research
44Summary
- Searching entities through Domain Models in large
systems made simpler and efficient.
- Properties of similar entities can be modified
easily in CBS
- Every model returned by search algorithm will be
a link to exact location of the model
- Future Scope
- Generic search plug-in adaptable with all
- modeling environments
45Questions?
46(No Transcript)