GrADS:   Experimental results with various rulebases for detecting contract violations

These rulebases focus on detecting contract violations based on measured versus required flops.   Several different fuzzy logic rulebases are presented, each with corresponding plots showing the graphical representation of the fuzzy variables in the rulebase as well as the output of the decision procedure (the contract value) for a range of measured and required flops.  The last rulebase, Rulebase 6, provides the best features to date.


Rulebase 1:

Rulebase and graphical representations of fuzzy variables:

var requiredFlops(-20,60)
{
	set triangle low    (  0, 20, 20 );
	set triangle medium ( 20, 20, 20 );
	set triangle high   ( 40, 20, 20 );
}
requiredFlops1.gif (6530 bytes)
var measuredFlops(-20,60) 
{
	set triangle low    (  0, 20, 20 );
	set triangle medium ( 20, 20, 20 );
	set triangle high   ( 40, 20, 20 );
}
measuredFlops1.gif (6449 bytes)
var contract(-0.5,1.5)
{
	set triangle violated ( 0, 0.5, 0.5 );
	set triangle ok       ( 1, 0.5, 0.5 );
}
contract1.gif (5499 bytes)
if (requiredFlops == low    && measuredFlops == low)    { contract = ok; }
if (requiredFlops == low    && measuredFlops == medium) { contract = ok; }
if (requiredFlops == low    && measuredFlops == high)   { contract = ok; }
if (requiredFlops == medium && measuredFlops == low)    { contract = violated; }
if (requiredFlops == medium && measuredFlops == medium) { contract = ok; }
if (requiredFlops == medium && measuredFlops == high)   { contract = ok; }
if (requiredFlops == high   && measuredFlops == low)    { contract = violated; }
if (requiredFlops == high   && measuredFlops == medium) { contract = violated; }
if (requiredFlops == high   && measuredFlops == high)   { contract = ok; }

Graphical representation of contract output for a range of required and measured FLOPS values:

rulebase1.gif (7707 bytes)


Rulebase 2:

Rulebase and graphical representations of fuzzy variables:

var requiredFlops(0,40)
{
	set triangle low    (  0, 20, 20 );
	set triangle medium ( 20, 20, 20 );
	set triangle high   ( 40, 20, 20 );
}
requiredFlops2.gif (5782 bytes)
var measuredFlops(0,40) 
{
	set trapez lt_medium  ( -20,  0,  0, 20 );
	set trapez gte_medium (  20, 60, 20,  0 );
	set trapez lt_high    ( -20, 20,  0, 20 );
	set trapez gte_high   (  40, 60, 20,  0 );
}
measuredFlops2.gif (6446 bytes)
var contract(-0.5,1.5)
{
	set triangle violated ( 0, 0.5, 0.5 );
	set triangle ok       ( 1, 0.5, 0.5 );
}
contract2.gif (5494 bytes)
var def(-0.5,1.5) {
	set triangle false ( 0, 0.5, 0.5 );
	set triangle true  ( 1, 0.5, 0.5 );
}
if (requiredFlops == low)                                   { contract = ok; }
if (requiredFlops == medium && measuredFlops == lt_medium)  { contract = violated; }
if (requiredFlops == medium && measuredFlops == gte_medium) { contract = ok; }
if (requiredFlops == high   && measuredFlops == lt_high)    { contract = violated; }
if (requiredFlops == high   && measuredFlops == gte_high)   { contract = ok; }

Graphical representation of contract output for a range of required and measured FLOPS values:

rulebase2.gif (7566 bytes)


Rulebase 3:

Rulebase and graphical representations of fuzzy variables:

var requiredFlops(-20,60)
{
	set trapez lt_medium    (   0,   0,   0, 20 );
	set trapez gte_medium   (  20,  40,  20,  0 );
	set trapez lt_high      (   0,  20,   0, 20 );
	set trapez gte_high     (  40,  40,  20,  0 );
}
requiredFlops3.gif (7215 bytes)

 

var measuredFlops(-20,60) 
{
	set trapez lt_medium    (   0,   0,   0, 20 );
	set trapez gte_medium   (  20,  40,  20,  0 );
	set trapez lt_high      (   0,  20,   0, 20 );
	set trapez gte_high     (  40,  40,  20,  0 );
}
measuredFlops3.gif (7356 bytes)
var contract(-0.5,1.5)
{
	set triangle violated ( 0, 0.5, 0.5 );
	set triangle ok       ( 1, 0.5, 0.5 );
}
contract3.gif (5502 bytes)
var def(-0.5,1.5) {
	set triangle false ( 0, 0.5, 0.5 );
	set triangle true  ( 1, 0.5, 0.5 );
}
def3.gif (5454 bytes)
if (def == true) { contract = ok; certainty = 0.01; }
if (requiredFlops == lt_medium  && measuredFlops == gte_medium)   { contract = ok; }
if (requiredFlops == lt_high    && measuredFlops == gte_high)     { contract = ok; }
if (requiredFlops == gte_medium && measuredFlops == lt_medium)   { contract = violated; }
if (requiredFlops == gte_high   && measuredFlops == lt_high)     { contract = violated; }

Graphical representation of contract output for a range of required and measured FLOPS values:

rulebase3.gif (8351 bytes)


Rulebase 4:

Rulebase and graphical representations of fuzzy variables:

var requiredFlops(0,40)
{
	set trapez lt_low       ( -10, -10,   0, 20 );
	set trapez gte_low      (  10,  40,  20,  0 );
	set trapez lt_medium    (   0,   0,   0, 20 );
	set trapez gte_medium   (  20,  40,  20,  0 );
	set trapez lt_high      (   0,  10,   0, 20 );
	set trapez gte_high     (  30,  40,  20,  0 );
	set trapez lt_veryhigh  (   0,  20,   0, 20 );
	set trapez gte_veryhigh (  40,  40,  20,  0 );
}
requiredFlops4.gif (8238 bytes)
var measuredFlops(0,40) 
{
	set trapez lt_low       ( -10, -10,   0, 20 );
	set trapez gte_low      (  10,  40,  20,  0 );
	set trapez lt_medium    (   0,   0,   0, 20 );
	set trapez gte_medium   (  20,  40,  20,  0 );
	set trapez lt_high      (   0,  10,   0, 20 );
	set trapez gte_high     (  30,  40,  20,  0 );
	set trapez lt_veryhigh  (   0,  20,   0, 20 );
	set trapez gte_veryhigh (  40,  40,  20,  0 );
}
measuredFlops4.gif (8189 bytes)
var contract(0,1)
{
	set triangle violated ( 0, 0.5, 0.5 );
	set triangle ok       ( 1, 0.5, 0.5 );
}
contract4.gif (4959 bytes)
var def(0,1) {
	set triangle false ( 0, 0.5, 0.5 );
	set triangle true  ( 1, 0.5, 0.5 );
}
def4.gif (4898 bytes)
if (def == true) { contract = ok; certainty = 0.01; }
if (requiredFlops == gte_low      && measuredFlops == lt_low)      { contract = violated; }
if (requiredFlops == gte_medium   && measuredFlops == lt_medium)   { contract = violated; }
if (requiredFlops == gte_high     && measuredFlops == lt_high)     { contract = violated; }
if (requiredFlops == gte_veryhigh && measuredFlops == lt_veryhigh) { contract = violated; }
if (requiredFlops == lt_low      && measuredFlops == gte_low)      { contract = ok; }
if (requiredFlops == lt_medium   && measuredFlops == gte_medium)   { contract = ok; }
if (requiredFlops == lt_high     && measuredFlops == gte_high)     { contract = ok; }
if (requiredFlops == lt_veryhigh && measuredFlops == gte_veryhigh) { contract = ok; }

Graphical representation of contract output for a range of required and measured FLOPS values:

rulebase4.gif (8546 bytes)

 


Rulebase 5:

Rulebase and graphical representations of fuzzy variables:

var requiredFlops( 0, 60 )
{
	set trapez lt_low     ( -20,   0,   0, 20 );
	set trapez gte_low    (  20,  80,  20,  0 );
	set trapez lt_medium  ( -20,  20,   0, 20 );
	set trapez gte_medium (  40,  80,  20,  0 );
	set trapez lt_high    ( -20,  40,   0, 20 );
	set trapez gte_high   (  60,  80,  20,  0 );
}
requiredFlops5.gif (7529 bytes)

var measuredFlops( 0 ,60 ) 
{
	set trapez lt_low     ( -20,   0,   0, 20 );
	set trapez gte_low    (  20,  80,  20,  0 );
	set trapez lt_medium  ( -20,  20,   0, 20 );
	set trapez gte_medium (  40,  80,  20,  0 );
	set trapez lt_high    ( -20,  40,   0, 20 );
	set trapez gte_high   (  60,  80,  20,  0 );
}
measuredFlops5.gif (7556 bytes)

var contract( -0.5, 1.5 )
{
	set triangle violated ( 0, 0.5, 0.5 );
	set triangle ok       ( 1, 0.5, 0.5 );
}
contract5.gif (5541 bytes)

var def( -0.5, 1.5 ) {
	set triangle false ( 0, 0.5, 0.5 );
	set triangle true  ( 1, 0.5, 0.5 );
}
def5.gif (5457 bytes)

if (def == true) { contract = ok; certainty = 0.01; }
if (requiredFlops == gte_low    && measuredFlops == lt_low)     { contract = violated; }
if (requiredFlops == lt_low     && measuredFlops == gte_low)    { contract = ok; }
if (requiredFlops == gte_medium && measuredFlops == lt_medium)  { contract = violated; }
if (requiredFlops == lt_medium  && measuredFlops == gte_medium) { contract = ok; }
if (requiredFlops == gte_high   && measuredFlops == lt_high)    { contract = violated; }
if (requiredFlops == lt_high    && measuredFlops == gte_high)   { contract = ok; }

Graphical representation of contract output for a range of required and measured FLOPS values:


rulebase5.gif (8329 bytes)


Rulebase 6:

Rulebase and graphical representations of fuzzy variables:

var flopsRatio(0,2)
{
	set trapez bad  ( 0.0, 0.5, 0.0, 0.5 );
	set trapez good ( 1.0, 2.0, 0.5, 0.0 );
}
flopsRatio6.gif (5003 bytes)
var contract(-0.5,1.5)
{
	set triangle violated ( 0, 0.5, 0.5 );
	set triangle ok       ( 1, 0.5, 0.5 );
}
contract6.gif (5489 bytes)
if ( flopsRatio == bad )  { contract = violated; }
if ( flopsRatio == good ) { contract = ok; }

Graphical representation of contract output for a range of required and measured FLOPS values:

rulebase6.gif (8119 bytes)


This material is based upon work supported by the National Science Foundation under Grant No. 9975020.

Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.


 

Department of Computer Science
University of Illinois at Urbana-Champaign

webmaster@renci.org

Last modified: Tuesday, July 03, 2001 03:20 PM