CHROME-REF CHR v Online Model-driven Engine with Reasoning Explanation Facilities INRIA / UFPE Rafael Oliveira – Jacques Robin - Pierre Deransart - Rocquencourt, France October 28, 2009
Agenda Separation of concerns (CHROME-REF Project) ▫ Engine, Extraction, Driver and Analyzer Generic CHR v Trace Schema for Debugging Trace Driver Trace Analyzer Conclusion Future Works
Separation of Concerns CHR ECLiPSe Prolog CHR ECLiPSe Prolog CHR SWI Prolog CHR SWI Prolog CHR SICStus Prolog CHR SICStus Prolog Debugging Tool …… At present, there exists a number of useful debugging tools for CHR Tools were designed and implemented in a specific way for each solver Each implementation results in a set of one-to-one specialized connections between a solver and its tools
Separation of Concerns CHR Trace Schema CHR Trace Schema CHR Trace CHR Trace Analyzer Trace Meta-Theory... Flexible Portable Extraction CHR ECLiPSe Prolog CHR ECLiPSe Prolog CHR SWI Prolog CHR SWI Prolog CHR SICStus Prolog CHR SICStus Prolog … Extraction query Driver
CHROME-REF Project Engine CHROME engine a compiler that take a CHR base into imperative Java objects MDE approach during its process of compilation by means of ATL transformations. Extraction Theoretical Operational Semantics ω t Integration (ω t + CHROME) Generic CHRv Trace Schema for Debugging Driver A processor, on the fly, of traces events according to the query requested by the analyzer. Analyzer Debugging Tool
CHROME-REF Project Engine CHROME engine a compiler that take a CHR base into imperative Java objects MDE approach during its process of compilation by means of ATL transformations. Extraction Theoretical Operational Semantics ω t Integration (ω t + CHROME) Generic CHRv Trace Schema for Debugging Driver A processor, on the fly, of traces events according to the query requested by the analyzer. Analyzer Debugging Tool
Generic CHR v Trace Schema for Debugging A generic trace enables any tool to be defined almost independently The trace syntax is represented using an XML Schema A trace instance is encoded in an XML format according to this XML Schema and follows the described semantics.
EIntroduce Etrace label:String Etrace label:String EApply ESolve EFail EInitialState Goal BIC UDC * Rule Built-ins * Generic CHR v Trace Schema for Debugging Class Diagram
<xs:schema xmlns:xs=" targetNamespace=" xmlns=" elementFormDefault="qualified">... Generic CHR v Trace Schema for Debugging XML Schema
Trace Driver A processor, on the fly, of traces events according to the query requested by the analyzer. 3 Services ▫ Register Analyzer ▫ Notify Analyzer ▫ Update Filter
Trace Driver A processor, on the fly, of traces events according to the query requested by the analyzer. 3 Services ▫ Register Analyzer ▫ Notify Analyzer ▫ Update Filter CHROME sends trace events register, filter and notify analyzers
Trace Driver
context TraceDriver::registerAnalyzer(a:Analyzer) post: analyzer->includes(d) context TraceDriver::notifyDriver(eTrace:ETrace) post: analyzers->forAll(a | a^notification(filterTrace(a.request, eTrace))) context TraceDriver::updateFilter(a:Analyzer, request:Request) post: a.request = request Trace Driver
Trace Analyzer Requirements ▫ A graphical environment component for writing and analyzing CHR v programs ▫ User may ask for more information about the current event ▫ The execution can be blocked until the analyzer notify it that it can proceed
Trace Analyzer
Conclusion
Any questions?
References 1.V ITORINO, J. Model-Driven Engineering a Versatile, Extensible, Scalable Rule Engine through Component Assembly and Model Transformations. Universidade Federal de Pernambuco. CIn. Ciência da Computação, D UCK, G., S TUCKEY, P., D E L A B ANDA, M., and H OLZABAUR, C. The refined operational semantics of Constraint Handling Rules. Lecture notes in computer science (2004), 90–104.