Model Intelligence: An Approach to Reducing Modeling Complexity with Prolog - PowerPoint PPT Presentation

1 / 23
About This Presentation
Title:

Model Intelligence: An Approach to Reducing Modeling Complexity with Prolog

Description:

The ABS component must be 1.5 meters from the outside of the car ... The ABS component must have 100 CPU units. Domain-Specific Modeling Challenges ... – PowerPoint PPT presentation

Number of Views:61
Avg rating:3.0/5.0
Slides: 24
Provided by: nanb150
Category:

less

Transcript and Presenter's Notes

Title: Model Intelligence: An Approach to Reducing Modeling Complexity with Prolog


1
Model Intelligence An Approach to Reducing
Modeling Complexity with Prolog
Jules White jules_at_dre.vanderbilt.edu Institute
for Software Integrated Systems (ISIS) Vanderbilt
University, Nashville, TN Anderey
Nechypurenkoand Egon Wuchner Siemens Corporate
Technology
2
Domain-Specific Modeling Challenges
Domain-specific modeling attempts to provide
domain experts with a graphical tool that allows
them to express a solution in a notation familiar
to the domain and reduce development complexity.
DSMLs raise the level of abstraction. Challenge
For many highly combinatorial domains, such as
deploying software components to Electronic
Control Units (ECUs) in a car, manual approaches
are not feasible.
3
Domain-Specific Modeling Challenges
The ABS component must be 1.5 meters from the
outside of the car
Domain-specific modeling attempts to provide
domain experts with a graphical tool that allows
them to express a solution in a notation familiar
to the domain and reduce development complexity.
DSMLs raise the level of abstraction. Challenge
For many highly combinatorial domains, such as
deploying software components to Electronic
Control Units (ECUs) in a car, manual approaches
are not feasible.
4
Domain-Specific Modeling Challenges
The ABS component must be 1.5 meters from the
outside of the car
Domain-specific modeling attempts to provide
domain experts with a graphical tool that allows
them to express a solution in a notation familiar
to the domain and reduce development complexity.
DSMLs raise the level of abstraction. Challenge
For many highly combinatorial domains, such as
deploying software components to Electronic
Control Units (ECUs) in a car, manual approaches
are not feasible.
The ABS component must have 100 CPU units
5
Domain-Specific Modeling Challenges
The ABS component must be 1.5 meters from the
outside of the car
Domain-specific modeling attempts to provide
domain experts with a graphical tool that allows
them to express a solution in a notation familiar
to the domain and reduce development complexity.
DSMLs raise the level of abstraction. Challenge
For many highly combinatorial domains, such as
deploying software components to Electronic
Control Units (ECUs) in a car, manual approaches
are not feasible.
The ABS component must have 100 CPU units
The ABS component must have 100 Memory units
6
Domain-Specific Modeling Challenges
The ABS component must be 1.5 meters from the
outside of the car
Domain-specific modeling attempts to provide
domain experts with a graphical tool that allows
them to express a solution in a notation familiar
to the domain and reduce development complexity.
DSMLs raise the level of abstraction. Challenge
For many highly combinatorial domains, such as
deploying software components to Electronic
Control Units (ECUs) in a car, manual approaches
are not feasible.
The ABS component must have 100 CPU units
And you have 300 other components with just as
many requirements.
The ABS component must have 100 Memory units
Large and globally constrained models are too
complex for manual modeling techniques
7
Domain-Specific Modeling Challenges
Why dont manual modeling approaches work in
these domains?
  • When there are tens of thousands of possible
    combinations and few correct ones, finding a
    valid solution is hard.
  • A valid solution may not be a good solution.
  • For large models, pointing and clicking to
    intricately connect hundreds or more component is
    tedious and error prone.
  • Often, global constraints rely on so much
    information that it is infeasible for a modeler
    to see it all at once.

Example Consider a group of 10 components that
need to be deployed to one of 10 nodes. There are
1010 10 billion unique deployments that could
be tried. Clearly, this type of problem cannot be
solved manually.
8
Modeling Challenges
Challenge Constraints and DSML tools can help
improve the quality of a solution but finding the
solution must still be done manually. In highly
combinatorial domains with global constraints
finding a valid or good solution is the hard part
not generating an implementation. To be really
useful, a tool in these domains must provide
solvers to aid the modeler in finding the
solution.
9
What Does a Modeler Need Model Intelligence
Put the Airbag here.
GOAL The modeling tool should use visual queues
to show the modeler where to place the air bag
based on the constraints they have entered.
10
Solution Approach Model Intelligence
Challenge To provide model intelligence, the
modeling tool must be able to reason using the
domain constraints. For example, the tool should
not suggest deploying a component to a particular
ECU if it does not have enough free
memory. Possible Approach One approach would be
to apply each rule against each model element to
try and determine the set of elements that
satisfy a constraint. -gt This however is
extremely inefficient and not scalable.
Model
Check
Constraints
Current model constraint checking does not
provide a way to find solutions.
11
Prolog Approach
Automobile Model
Deployment Constraints
Solution Constraints are specified as Prolog
rules and the model is converted to a Prolog
knowledge base. Advantages Prolog is highly
optimized for finding sets of facts that satisfy
a set of constraints. Prolog is far more
efficient than an OCL approach and more flexible
than a hard-coded Java approach. Furthermore, any
constraint can always be queried for the elements
that satisfy it.
Convert
Prolog Knowledge Base For Automobile
Derive
Reason about the model using the knowledge base.
Valid ABS Locations
12
Prolog Approach
Example A constraint to check if a node is a
valid host of a component isValidHost(Component,
Node) can be used to both check a Component-Node
combination isValidHost(ABS,Node_23) and
to find valid Nodes isValidHost(ABS,Nodes) No
des will be assigned all valid nodes for the ABS
component.
Model
Constraints
Solution Constraints are specified as Prolog
rules and the model is converted to a Prolog
knowledge base. Advantages Prolog is highly
optimized for finding sets of facts that satisfy
a set of constraints. Prolog is far more
efficient than an OCL approach and more flexible
than a hard-coded Java approach. Furthermore, any
constraint can always be queried for the elements
that satisfy it.
Convert
Prolog Knowledge Base
13
The Generic Eclipse Model System (GEMS)
The Generic Eclipse Modeling System (GEMS) is a
tool for visually specifying a metamodel and
automatically generating an implementation that
uses EMF, Draw2d, GMF, etc. We have used GEMS
as the basis for our Model Intelligence
implementation.
Metamodel
Draw2d, GEF, GMF, XML Plug-in Descriptors, etc..
14
How GEMS Model Intelligence Works
self_type(1,component). self_name(1,foo). self_tar
gethost(2,1,2). self_requiredcpu(2,100).
Metamodel
Parameterizes
Prolog Knowledge Base
15
How GEMS Model Intelligence Works
Constraints
Metamodel
Parameterizes
Prolog Knowledge Base
16
How GEMS Model Intelligence Works
GEMS-based DSML Editor
Prolog Knowledge Base
Invokes Constraint Solvers
17
How GEMS Model Intelligence Works
Constraints
Elements satisfying the relationship constraints
Prolog Knowledge Base
Which elements satisfy the relationship
18
Guide Local Decisions
19
Guide Local Decisions
20
Constraint-Compliant Batch Processing
Assign All
Model Intelligence can also operate in a batch
mode and perform more complex tasks such as
assigning a Host for EVERY Component.
21
But How Hard is it to Write Prolog Rules?
comparevalue(V1,V2,'gt') - V1 gt
V2. comparevalue(V1,V2,'lt') - V1 lt
V2. comparevalue(V1,V2,'') - V1
V2. comparevalue(V1,V2,'-') - V1 gt
V2. matchesResouce(Req,Resources) -
member(Res,Resources), self_name(Req,RName),
self_name(Res,RName), self_type(Req,Type),
self_value(Req,Rqv), self_value(Res,Rsv),
comparevalue(Rsv,Rqv,Type). is_a_valid_compon
ent_targethost( Comp, Host) -
self_requires(Comp,Requirements),
self_provides(Host,Resources), forall(
member(Req,Requirements),
matchesResource(Req,Resources) )
Is it feasible to write Prolog rules for a model
and if so, how much code does it take?
22
But How Hard is it to Write Prolog Rules?
comparevalue(V1,V2,'gt') - V1 gt
V2. comparevalue(V1,V2,'lt') - V1 lt
V2. comparevalue(V1,V2,'') - V1
V2. comparevalue(V1,V2,'-') - V1 gt
V2. matchesResource(Req,Resources) -
member(Res,Resources), self_name(Req,RName),
self_name(Res,RName), self_type(Req,Type),
self_value(Req,Rqv), self_value(Res,Rsv),
comparevalue(Rsv,Rqv,Type). is_a_valid_compon
ent_targethost( Comp, Host) -
self_requires(Comp,Requirements),
self_provides(Host,Resources), forall(
member(Req,Requirements),
matchesResource(Req,Resources) )
This is the complete listing of the Prolog code
required to solve the configuration portion of
our deployment problem.
23
Conclusion
  • The Model Intelligence provided by GEMS works for
    any DSML not just deployment. It is a general
    solution.
  • GEMS provides templatized solvers for some
    constraint types but more solvers are needed.
  • Model Intelligence can quickly be incorporated
    into models to solve certain types of constraints
    but not all.
  • The difficult constraint problems, such as
    bin-packing, can still be solved by Prolog Model
    Intelligence code but require more effort.
    Outside solvers can also be plugged in for these
    difficult constraint types.

GEMS with Model Intelligence is available from
http//www.sf.net/projects/gems
Write a Comment
User Comments (0)
About PowerShow.com