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.
Searching with Datalog or DLQueries on UML<br />
Class Diagrams<br />
// Step1: con<strong>st</strong>ruct fact base: the UML class diagram<br />
// in Datalog fact syntax.<br />
teacher(programming,john).<br />
hasCourse(programming, lisp).<br />
hasPupil(programming,mary).<br />
hasModule(lisp,closures).<br />
// Step 2: con<strong>st</strong>ruct integrity con<strong>st</strong>raint rules<br />
reads(Person,Module) :-<br />
hasPupil(P,A), hasCourse(P,C), hasModule(C,M).<br />
// Step 3: let rules run: form and execute a query<br />
:- reads(mary, Module)<br />
// the answer<br />
Module = closures<br />
Prof. Uwe Aßmann, Softwaretechnologie II<br />
58