Wednesday, May 23, 2007

Constraint Discovery: An Example

In my last article I mentioned that the constraint discovery mechanism (CDM) gets its input signals only from sensory cells. Why not the effector cells? The reason is two-fold. First, effector cells are usually linked together to form a deterministic sequence. There is no need to test a sequence that is guaranteed to always execute in a certain order. Second, sensory cells are the dictators that govern the behavior of a program. They make all the decisions and, as you can surmise, the order in which decisions are made is essential to reliability. One more good thing about constraint discovery is that the program designer can use it to troubleshoot potential problems that are external to the program.

I will illustrate the concept with an example. Let's say we have a COSA component (controller) in charge of controlling the temperature of a room using sensory readings from a thermostat. The controller turns on the air conditioning unit if the temperature goes above 80 degrees Fahrenheit and turns it off when it goes below 75. In addition, the heater is turned on when the temperature goes below 65 and turned off when it goes above 70. During testing, the CDM will learn a few things about the way temperature changes. If the temperature goes above 80, the AC is turned on and the CDM expects the temperature to then go down below 75. If the temperature goes below 65, the heat is turned on and the CDM expects the temperature to then go up above 70.

If, for whatever reason, temperature changes do not occur in their expected order, the CDM will sound an alarm. This is an instance where temporal constraints learned by the CDM during testing can be left in the program and used for normal error handling.

PS. Remember that blogger supports rss (syndication). All you need is an rss reader (there are a number of free readers out there) and you can receive the Rebel Science News as they happen.

No comments: