How to Analyze Graph-Based Models - Www-st.inf.tu-dresden.de ...
How to Analyze Graph-Based Models - Www-st.inf.tu-dresden.de ...
How to Analyze Graph-Based Models - Www-st.inf.tu-dresden.de ...
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Consi<strong>st</strong>ency Checking on UML Class Diagrams<br />
with Description Logic<br />
► Step 1: enco<strong>de</strong> the diagram in<<strong>st</strong>rong>to</<strong>st</strong>rong> a Datalog/DL fact base<br />
► Step 2: specify integrity con<strong>st</strong>raint rules<br />
► Step 3: let the rules run<br />
// Step 1: factbase<br />
teacher(programming,john).<br />
hasCourse(programming, lisp).<br />
hasPupil(programming, mary).<br />
hasModule(lisp,closures).<br />
linksTo(linkA, closures).<br />
linksTo(linkA, lisp).<br />
linksTo(linkA, q).<br />
// Step 2: integrity con<strong>st</strong>raints specification<br />
consi<strong>st</strong>ent(Link,Course,Module,Que<strong>st</strong>ion) :-<br />
linksTo(Link,Course) ||<br />
linksTo(Link, Module) ||<br />
linksTo(Link,Que<strong>st</strong>ion).<br />
// Step 3: consi<strong>st</strong>ency checking query<br />
:- consi<strong>st</strong>ent(linkA,lisp,closures,q)<br />
// answer:<br />
false<br />
Prof. Uwe Aßmann, Softwaretechnologie II<br />
86