Siena Simplification Library Documentation (v. 1.1.4)

siena Namespace Reference

name space for Siena and related types and modules. More...


Functions

bool conflicting (const constraint &c1, const constraint &c2)
 Procedure to determine if two constraints conflict with each other.
bool covers (const constraint &c1, const constraint &c2)
 Procedure to determine if constraint c1 covers constraint c2.
bool covers (const filter &f1, const filter &f2)
 Procedure to determine if a filter covers another one.
bool covers (const predicate &p1, const predicate &p2)
 Procedure to determine if a predicate covers another one.


Detailed Description

name space for Siena and related types and modules.

Function Documentation

bool siena::conflicting const constraint &  c1,
const constraint &  c2
 

Procedure to determine if two constraints conflict with each other.

Constraints conflict if they can never be true for the same message. Conflicting constraints in the same filter will render the filter unsatisfiable, so the filter can effectively be eliminated from consideration.

Constraints never conflict if:

  • They are they same object (addresses are equal).
  • Their names are not equal.
Otherwise, constraints conflict if:
  • They have different types (since a message attribute only has a single type).
  • According to this table:
      x = b x < b x > b x *= b x =* b x ** b x any any x != b
    x = a if b != a if b <= a if b >= a if !(b *= a) if !(b =* a) if !(b ** a) false if b = a
    x < a if b >= a false if b >= a false false false false false
    x > a if b <= a if b <= a false false false false false false
    x *= a if !(a *= b) false false if !(a *= b)
    &&
    !(b *= a)
    false false false false
    x =* a if !(a =* b) false false false if !(a =* b)
    &&
    !(b =* a)
    false false false
    x ** a if !(a ** b) false false false false false false false
    x any any false false false false false false false false
    x != a if a = b false false false false false false false
  • For example:
     x = 10 conflicts with x = 20
     x = 10 conflicts with x < 10
     x = 10 conflicts with x > 10
     x = ten conflicts with x *= ing but not with x *= n
     x = ten conflicts with x =* anti but not with x =* t
     x = ten conflicts with x ** rst but not with x ** e
     x = 10 conflicts with x != 10

     x < 10 conflicts with x = 10
     x < 10 conflicts with x > 10

     x > 10 conflicts with x = 10
     x > 10 conflicts with x < 10

     x *= ing conflicts with x *= abc, but not with x *= g
     x =* anti conflicts with x =* pre, but not with x =* ant
     

bool siena::covers const predicate &  p1,
const predicate &  p2
 

Procedure to determine if a predicate covers another one.

For p1 to cover p2, every filter in p2 must be covered by some filter in p1.

bool siena::covers const filter &  f1,
const filter &  f2
 

Procedure to determine if a filter covers another one.

For f1 to cover f2, every constraint in f1 must cover a constraint in f2.

For example:

 x < 14 && y > 5 covers x < 11 && y > 12
 x < 10 && y > 10 covers x = 8 && y = 15
 x < 10 && y > 10 && z = 4 does not cover x = 8 && y = 15
 

bool siena::covers const constraint &  c1,
const constraint &  c2
 

Procedure to determine if constraint c1 covers constraint c2.

c1 covers c2 if c2 implies c1.

Constraint c1 always covers c2 if its operator is siena::any_id (regardless of type) or if it is exactly the same as c2.

Otherwise, constraints never cover each other if:

  • They are they same object (addresses are equal).
  • Their names are not equal.
  • Their types are not equal.

Otherwise, c1(rows) covers c2(columns) according to this table:
  x = b x < b x > b x *= b x =* b x ** b x any any x != b
x = a false false false false false false false false
x < a if b < a if b < a false false false false false false
x > a if b > a false if b > a false false false false false
x *= a if a *= b false false false false false false false
x =* a if a =* b false false false false false false false
x ** a if a ** b false false false false false false false
x any any true true true true true true true true
x != a false false false false false false false false

For example:

 x < 14 covers x < 11
 x > 5 covers x > 12
 x < 10 covers x = 8
 x > 10 covers x = 15
 x > 10 does not cover x = 9
 x < 1 does not cover x = 2
 x *= ing covers x = jumping
 x =* anti covers x = antidote
 x ** ym covers x = oxymoron