ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
Loading...
Searching...
No Matches
Boolean.h File Reference

Boolean semiring ({false, true}, ∨, ∧, false, true). More...

#include <algorithm>
#include <vector>
#include "Semiring.h"
Include dependency graph for Boolean.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  semiring::Boolean
 The Boolean semiring over bool. More...
 

Namespaces

namespace  semiring
 

Detailed Description

Boolean semiring ({false, true}, ∨, ∧, false, true).

The Boolean semiring is the simplest semiring supported by ProvSQL. Provenance evaluates to true if at least one derivation of the tuple exists in the current database instance (i.e., the query answer is "certain"), and false otherwise.

The semiring is absorptive (∨ is idempotent), so the circuit evaluator can safely deduplicate children of OR gates.

Operations:

  • zero()false
  • one()true
  • plus() → logical OR (any_of)
  • times() → logical AND (all_of)
  • monus() → \(x \;\&\; \lnot y\)
  • delta() → identity

Definition in file Boolean.h.