GraphBLAS / LAGraph-Working-Group

Public document and planning repository for the LAGraph Working Group
Other
3 stars 2 forks source link

Property checking levels #8

Open jim22k opened 4 years ago

jim22k commented 4 years ago

In the 2020-04-22 meeting, property checking levels were discussed. I want to expand on that idea a bit more.

First, let's separate formal properties from informal properties.

Formal properties

Informal properties

LAGraph algorithms can indicate required property values (both formal and informal) in their description. Descriptor bits control property checking. There is one descriptor bit for formal properties and a separate one for informal properties.

Formal property checking levels

  1. No checking performed. Property values ignored.
  2. Raise an error if the property is not satisfied. Unknown is assumed to be a satisfied property.
  3. Raise an error if the property is not satisfied or Unknown.
  4. If property is Unknown, calculate the property. Raise an error if the property is not satisfied.
  5. Recalculate the property. Raise an error if the property is not satisfied.
  6. Recalculate the property. Raise an error if the property is not satisfied or if the property changes and was not originally Unknown.

Informal property checking levels

  1. No checking performed.
  2. Calculate the property. Raise an error if the property is not satisfied.

While all levels are useful in different situations, I think the two most common modes will be Run Fast (formal=0, informal=0) and Check as Needed (formal=3, informal=1).