25.07.2014 Views

pdf download - Software and Computer Technology - TU Delft

pdf download - Software and Computer Technology - TU Delft

pdf download - Software and Computer Technology - TU Delft

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

4.2 Model-Based Diagnosis with LYDIA Model-Based Fault Diagnosis<br />

Thus, {A, B} <strong>and</strong> {B, C} are conflict sets. Then, finding the minimal conflicts can be achieved by<br />

applying an algorithm for the Hitting Set problem. This also results in the sets {B} <strong>and</strong> {A, C}.<br />

This method is used in [11], <strong>and</strong> is based upon the extraction of conflicts <strong>and</strong> c<strong>and</strong>idates from a<br />

lattice in order to produce the diagnoses. Results using this method yield exactly the same results,<br />

as when writing the propositional model to DNF-form.<br />

In summary, MBD of combinational systems means solving a model for h using propositional<br />

logic. The next section describes the MBD implementation that is used in this thesis. It uses the<br />

first method, writing the model to DNF-form, for solving the model for h.<br />

4.2 Model-Based Diagnosis with LYDIA<br />

This section introduces the system modeling language LYDIA (Language for sYstem DIAgnosis),<br />

<strong>and</strong> the corresponding LYDIA toolkit. Other diagnostic systems are GDE by de Kleer <strong>and</strong> Williams<br />

[11], Sherlock by de Kleer <strong>and</strong> Williams [12], <strong>and</strong> Livingston by Williams <strong>and</strong> Nayak [30]. See<br />

[28] for a comprehensive introduction to LYDIA. The LYDIA toolkit consists of tools enabling the<br />

diagnosis of systems; the diagnostic engine. The language LYDIA is able to describe structure <strong>and</strong><br />

behavior of a wide range of phenomena. It is compositional, which means that it can be used to build<br />

up a system from previously defined constituents. These constituents can be hardware components,<br />

processes <strong>and</strong> even software subsystems. The following is - like in the previous section - split up<br />

into the two artifacts MBD requires: the modeling language LYDIA <strong>and</strong> the diagnostic engine that<br />

operates on a LYDIA model.<br />

LYDIA Language<br />

Lydia is a declarative language. Each LYDIA statement is a proposition. All statements are true, <strong>and</strong><br />

apply concurrently. Recall the example of the 3 inverters, as shown in Figure 4.1. Its propositional<br />

system of equations of 4.2 can easily be translated to LYDIA. The behavioral rule for one inverter (in<br />

proposition logic: h ⇒ (i ⇔ ¬o)) is defined in LYDIA as follows:<br />

system inverter(bool i, h, o) {<br />

//declaration health variable<br />

attribute health(h) = true;<br />

attribute probability(h) = h ? 0.99 : 0.01;<br />

}<br />

//behavioral rule<br />

h => (i = !o); // If healthy, output equals inverse of the input<br />

Then, 3 of such inverters can be connected by the following structural description:<br />

#include inverter.sys<br />

// Include the definition of one inverter<br />

system inverters3 (<br />

bool w,<br />

//input<br />

bool hA, hB, hC, //healths<br />

bool y, z<br />

//outputs<br />

) {<br />

// Declaration internal variable<br />

36

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!