Query Lineages and Knowledge Compilation
Antoine Amarilli1 November 13, 2019
Query Lineage Definitions
•
Relational database instanceI: set of facts•
Boolean queryQ: take an instance and answer yes/no•
LineageofQonI: aBoolean circuitover the facts ofI accepting exactly thesubsetsofIwhereQis trueExample: queryQ:
∃xyz R(x,y)∧S(y,z) R
a b a0 b
S b c
R(a,b) R(a0,b)
∨ S(b,c)
∧
Query Lineage Definitions
•
Relational database instanceI: set of facts•
Boolean queryQ: take an instance and answer yes/no•
LineageofQonI: aBoolean circuitover the facts ofI accepting exactly thesubsetsofIwhereQis trueExample: queryQ:
∃xyz R(x,y)∧S(y,z)
R a b a0 b
S b c
R(a,b) R(a0,b)
∨ S(b,c)
∧
Query Lineage Definitions
•
Relational database instanceI: set of facts•
Boolean queryQ: take an instance and answer yes/no•
LineageofQonI: aBoolean circuitover the facts ofI accepting exactly thesubsetsofIwhereQis trueExample: queryQ:
∃xyz R(x,y)∧S(y,z)
R S
R(a,b) R(a0,b)
∨ S(b,c)
∧
Query Lineage Definitions
•
Relational database instanceI: set of facts•
Boolean queryQ: take an instance and answer yes/no•
LineageofQonI: aBoolean circuitover the facts ofI accepting exactly thesubsetsofIwhereQis trueExample: queryQ:
∃xyz R(x,y)∧S(y,z)
R S
R(a,b) R(a0,b)
∨ S(b,c)
∧
Query Lineage Definitions
•
Relational database instanceI: set of facts•
Boolean queryQ: take an instance and answer yes/no•
LineageofQonI: aBoolean circuitover the facts ofI accepting exactly thesubsetsofIwhereQis trueExample: queryQ:
∃xyz R(x,y)∧S(y,z)
R S
∨ S(b,c)
∧
Why bother? Applications of query lineages
•
Evaluation:the lineage gives you the query answer•
Counting:• Compute theprobabilitythat the query is true
• Counthow many subinstancessatisfy the query
•
Enumeration:efficientlyenumeratethe subinstances•
Explanation:• Representation ofwhythe query is true
• What-if:is the query still true without these facts?
Why bother? Applications of query lineages
•
Evaluation:the lineage gives you the query answer•
Counting:• Compute theprobabilitythat the query is true
• Counthow many subinstancessatisfy the query
•
Enumeration:efficientlyenumeratethe subinstances•
Explanation:• Representation ofwhythe query is true
• What-if:is the query still true without these facts?
Why bother? Applications of query lineages
•
Evaluation:the lineage gives you the query answer•
Counting:• Compute theprobabilitythat the query is true
• Counthow many subinstancessatisfy the query
•
Enumeration:efficientlyenumeratethe subinstances•
Explanation:• Representation ofwhythe query is true
• What-if:is the query still true without these facts?
Why bother? Applications of query lineages
•
Evaluation:the lineage gives you the query answer•
Counting:• Compute theprobabilitythat the query is true
• Counthow many subinstancessatisfy the query
•
Enumeration:efficientlyenumeratethe subinstances•
Explanation:• Representation ofwhythe query is true
Another application: Query answers
Lineages can also represent theanswerstonon-Boolean queries!
•
Study answers ofnon-Boolean query Q(x,y)on instanceIQ(x,y) :∃z R(x,y)∧S(y,z) I:R(a,b),R(a0,b),S(b,c)
•
Addassignment facts X(v),Y(v)toI for each elementv(linear)X(a),X(a0),X(b),X(c) Y(a),Y(a0),Y(b),Y(c)
•
Consider theBoolean query Q0 :X(x)∧Y(y)∧Q(x,y)X(x)∧Y(y)∧(∃z R(x,y)∧S(y,z))
•
Compute alineageC0 ofQ0onIplus assignment facts
(X(a)∧R(a,b)∨X(a0)∧R(a0,b))
∧Y(b)∧S(b,c)
•
DefineCby replacing all variables by1 except assignment facts(X(a)∨X(a0))∧Y(b)
→ The circuitCrepresents thequery answers (a,b)and(a0,b) We cancountthe answers,enumeratethem, etc.
Another application: Query answers
Lineages can also represent theanswerstonon-Boolean queries!
•
Study answers ofnon-Boolean query Q(x,y)on instanceIQ(x,y) :∃z R(x,y)∧S(y,z) I:R(a,b),R(a0,b),S(b,c)
•
Addassignment facts X(v),Y(v)toI for each elementv(linear)X(a),X(a0),X(b),X(c) Y(a),Y(a0),Y(b),Y(c)
•
Consider theBoolean query Q0 :X(x)∧Y(y)∧Q(x,y)X(x)∧Y(y)∧(∃z R(x,y)∧S(y,z))
•
Compute alineageC0 ofQ0onIplus assignment facts
(X(a)∧R(a,b)∨X(a0)∧R(a0,b))
∧Y(b)∧S(b,c)
•
DefineCby replacing all variables by1 except assignment facts(X(a)∨X(a0))∧Y(b)
→ The circuitCrepresents thequery answers (a,b)and(a0,b) We cancountthe answers,enumeratethem, etc.
Another application: Query answers
Lineages can also represent theanswerstonon-Boolean queries!
•
Study answers ofnon-Boolean query Q(x,y)on instanceIQ(x,y) :∃z R(x,y)∧S(y,z) I:R(a,b),R(a0,b),S(b,c)
•
Addassignment facts X(v),Y(v)toI for each elementv(linear)X(a),X(a0),X(b),X(c) Y(a),Y(a0),Y(b),Y(c)
•
Consider theBoolean query Q0 :X(x)∧Y(y)∧Q(x,y)X(x)∧Y(y)∧(∃z R(x,y)∧S(y,z))
•
Compute alineageC0 ofQ0onIplus assignment facts
(X(a)∧R(a,b)∨X(a0)∧R(a0,b))
∧Y(b)∧S(b,c)
•
DefineCby replacing all variables by1 except assignment facts(X(a)∨X(a0))∧Y(b)
→ The circuitCrepresents thequery answers (a,b)and(a0,b) We cancountthe answers,enumeratethem, etc.
Another application: Query answers
Lineages can also represent theanswerstonon-Boolean queries!
•
Study answers ofnon-Boolean query Q(x,y)on instanceIQ(x,y) :∃z R(x,y)∧S(y,z) I:R(a,b),R(a0,b),S(b,c)
•
Addassignment factsX(v),Y(v)toI for each elementv(linear)X(a),X(a0),X(b),X(c) Y(a),Y(a0),Y(b),Y(c)
•
Consider theBoolean query Q0 :X(x)∧Y(y)∧Q(x,y)X(x)∧Y(y)∧(∃z R(x,y)∧S(y,z))
•
Compute alineageC0 ofQ0onIplus assignment facts
(X(a)∧R(a,b)∨X(a0)∧R(a0,b))
∧Y(b)∧S(b,c)
•
DefineCby replacing all variables by1 except assignment facts(X(a)∨X(a0))∧Y(b)
→ The circuitCrepresents thequery answers (a,b)and(a0,b) We cancountthe answers,enumeratethem, etc.
Another application: Query answers
Lineages can also represent theanswerstonon-Boolean queries!
•
Study answers ofnon-Boolean query Q(x,y)on instanceIQ(x,y) :∃z R(x,y)∧S(y,z) I:R(a,b),R(a0,b),S(b,c)
•
Addassignment factsX(v),Y(v)toI for each elementv(linear)X(a),X(a0),X(b),X(c) Y(a),Y(a0),Y(b),Y(c)
•
Consider theBoolean query Q0 :X(x)∧Y(y)∧Q(x,y)X(x)∧Y(y)∧(∃z R(x,y)∧S(y,z))
•
Compute alineageC0 ofQ0onIplus assignment facts
(X(a)∧R(a,b)∨X(a0)∧R(a0,b))
∧Y(b)∧S(b,c)
•
DefineCby replacing all variables by1 except assignment facts(X(a)∨X(a0))∧Y(b)
→ The circuitCrepresents thequery answers (a,b)and(a0,b) We cancountthe answers,enumeratethem, etc.
Another application: Query answers
Lineages can also represent theanswerstonon-Boolean queries!
•
Study answers ofnon-Boolean query Q(x,y)on instanceIQ(x,y) :∃z R(x,y)∧S(y,z) I:R(a,b),R(a0,b),S(b,c)
•
Addassignment factsX(v),Y(v)toI for each elementv(linear)X(a),X(a0),X(b),X(c) Y(a),Y(a0),Y(b),Y(c)
•
Consider theBoolean query Q0 :X(x)∧Y(y)∧Q(x,y)X(x)∧Y(y)∧(∃z R(x,y)∧S(y,z))
•
Compute alineageC0 ofQ0onIplus assignment facts
(X(a)∧R(a,b)∨X(a0)∧R(a0,b))
∧Y(b)∧S(b,c)
•
DefineCby replacing all variables by1 except assignment facts(X(a)∨X(a0))∧Y(b)
→ The circuitCrepresents thequery answers (a,b)and(a0,b) We cancountthe answers,enumeratethem, etc.
Another application: Query answers
Lineages can also represent theanswerstonon-Boolean queries!
•
Study answers ofnon-Boolean query Q(x,y)on instanceIQ(x,y) :∃z R(x,y)∧S(y,z) I:R(a,b),R(a0,b),S(b,c)
•
Addassignment factsX(v),Y(v)toI for each elementv(linear)X(a),X(a0),X(b),X(c) Y(a),Y(a0),Y(b),Y(c)
•
Consider theBoolean query Q0 :X(x)∧Y(y)∧Q(x,y)X(x)∧Y(y)∧(∃z R(x,y)∧S(y,z))
•
Compute alineageC0 ofQ0onIplus assignment facts
(X(a)∧R(a,b)∨X(a0)∧R(a0,b))
∧Y(b)∧S(b,c)
•
DefineCby replacing all variables by1 except assignment facts(X(a)∨X(a0))∧Y(b)
→ The circuitCrepresents thequery answers (a,b)and(a0,b) We cancountthe answers,enumeratethem, etc.
Another application: Query answers
Lineages can also represent theanswerstonon-Boolean queries!
•
Study answers ofnon-Boolean query Q(x,y)on instanceIQ(x,y) :∃z R(x,y)∧S(y,z) I:R(a,b),R(a0,b),S(b,c)
•
Addassignment factsX(v),Y(v)toI for each elementv(linear)X(a),X(a0),X(b),X(c) Y(a),Y(a0),Y(b),Y(c)
•
Consider theBoolean query Q0 :X(x)∧Y(y)∧Q(x,y)X(x)∧Y(y)∧(∃z R(x,y)∧S(y,z))
•
Compute alineageC0 ofQ0onIplus assignment facts
(X(a)∧R(a,b)∨X(a0)∧R(a0,b))
∧Y(b)∧S(b,c)
•
DefineCby replacing all variables by1 except assignment facts(X(a)∨X(a0))∧Y(b)
→ The circuitCrepresents thequery answers (a,b)and(a0,b) We cancountthe answers,enumeratethem, etc.
Another application: Query answers
Lineages can also represent theanswerstonon-Boolean queries!
•
Study answers ofnon-Boolean query Q(x,y)on instanceIQ(x,y) :∃z R(x,y)∧S(y,z) I:R(a,b),R(a0,b),S(b,c)
•
Addassignment factsX(v),Y(v)toI for each elementv(linear)X(a),X(a0),X(b),X(c) Y(a),Y(a0),Y(b),Y(c)
•
Consider theBoolean query Q0 :X(x)∧Y(y)∧Q(x,y)X(x)∧Y(y)∧(∃z R(x,y)∧S(y,z))
•
Compute alineageC0 ofQ0onIplus assignment facts
(X(a)∧R(a,b)∨X(a0)∧R(a0,b))
∧Y(b)∧S(b,c)
•
DefineCby replacing all variables by1 except assignment facts(X(a)∨X(a0))∧Y(b)
→ The circuitCrepresents thequery answers (a,b)and(a0,b) We cancountthe answers,enumeratethem, etc.
Another application: Query answers
Lineages can also represent theanswerstonon-Boolean queries!
•
Study answers ofnon-Boolean query Q(x,y)on instanceIQ(x,y) :∃z R(x,y)∧S(y,z) I:R(a,b),R(a0,b),S(b,c)
•
Addassignment factsX(v),Y(v)toI for each elementv(linear)X(a),X(a0),X(b),X(c) Y(a),Y(a0),Y(b),Y(c)
•
Consider theBoolean query Q0 :X(x)∧Y(y)∧Q(x,y)X(x)∧Y(y)∧(∃z R(x,y)∧S(y,z))
•
Compute alineageC0 ofQ0onIplus assignment facts
(X(a)∧R(a,b)∨X(a0)∧R(a0,b))
∧Y(b)∧S(b,c)
•
(X(a)∨X(a0))∧Y(b)
→ The circuitCrepresents thequery answers (a,b)and(a0,b) We cancountthe answers,enumeratethem, etc.
Another application: Query answers
Lineages can also represent theanswerstonon-Boolean queries!
•
Study answers ofnon-Boolean query Q(x,y)on instanceIQ(x,y) :∃z R(x,y)∧S(y,z) I:R(a,b),R(a0,b),S(b,c)
•
Addassignment factsX(v),Y(v)toI for each elementv(linear)X(a),X(a0),X(b),X(c) Y(a),Y(a0),Y(b),Y(c)
•
Consider theBoolean query Q0 :X(x)∧Y(y)∧Q(x,y)X(x)∧Y(y)∧(∃z R(x,y)∧S(y,z))
•
Compute alineageC0 ofQ0onIplus assignment facts
(X(a)∧R(a,b)∨X(a0)∧R(a0,b))
∧Y(b)∧S(b,c)
•
→ The circuitCrepresents thequery answers (a,b)and(a0,b) We cancountthe answers,enumeratethem, etc.
Another application: Query answers
Lineages can also represent theanswerstonon-Boolean queries!
•
Study answers ofnon-Boolean query Q(x,y)on instanceIQ(x,y) :∃z R(x,y)∧S(y,z) I:R(a,b),R(a0,b),S(b,c)
•
Addassignment factsX(v),Y(v)toI for each elementv(linear)X(a),X(a0),X(b),X(c) Y(a),Y(a0),Y(b),Y(c)
•
Consider theBoolean query Q0 :X(x)∧Y(y)∧Q(x,y)X(x)∧Y(y)∧(∃z R(x,y)∧S(y,z))
•
Compute alineageC0 ofQ0onIplus assignment facts
(X(a)∧R(a,b)∨X(a0)∧R(a0,b))
∧Y(b)∧S(b,c)
•
(a,b)and(a0,b) We cancountthe answers,enumeratethem, etc.
Another application: Query answers
Lineages can also represent theanswerstonon-Boolean queries!
•
Study answers ofnon-Boolean query Q(x,y)on instanceIQ(x,y) :∃z R(x,y)∧S(y,z) I:R(a,b),R(a0,b),S(b,c)
•
Addassignment factsX(v),Y(v)toI for each elementv(linear)X(a),X(a0),X(b),X(c) Y(a),Y(a0),Y(b),Y(c)
•
Consider theBoolean query Q0 :X(x)∧Y(y)∧Q(x,y)X(x)∧Y(y)∧(∃z R(x,y)∧S(y,z))
•
Compute alineageC0 ofQ0onIplus assignment facts
(X(a)∧R(a,b)∨X(a0)∧R(a0,b))
∧Y(b)∧S(b,c)
•
We cancountthe answers,enumeratethem, etc.
Another application: Query answers
Lineages can also represent theanswerstonon-Boolean queries!
•
Study answers ofnon-Boolean query Q(x,y)on instanceIQ(x,y) :∃z R(x,y)∧S(y,z) I:R(a,b),R(a0,b),S(b,c)
•
Addassignment factsX(v),Y(v)toI for each elementv(linear)X(a),X(a0),X(b),X(c) Y(a),Y(a0),Y(b),Y(c)
•
Consider theBoolean query Q0 :X(x)∧Y(y)∧Q(x,y)X(x)∧Y(y)∧(∃z R(x,y)∧S(y,z))
•
Compute alineageC0 ofQ0onIplus assignment facts
(X(a)∧R(a,b)∨X(a0)∧R(a0,b))
∧Y(b)∧S(b,c)
•
DefineCby replacing all variables by1 (X(a)∨X(a0))∧Y(b)Related work: Semiring provenance
Semiring provenance([Green et al., 2007], PODS ToT award): annotate results of arelational algebraquery with asemiring expression
What is the difference?
•
Lineage= provenance in thesemiring of Boolean functions• Nomultiplicityof facts or derivations
→ Essentially only make sense forrelational algebra
•
Circuit representation:more conciseRelated work: Semiring provenance
Semiring provenance([Green et al., 2007], PODS ToT award): annotate results of arelational algebraquery with asemiring expression
What is the difference?
• Nomultiplicityof facts or derivations
→ Essentially only make sense forrelational algebra
•
Circuit representation:more conciseRelated work: Semiring provenance
Semiring provenance([Green et al., 2007], PODS ToT award): annotate results of arelational algebraquery with asemiring expression
What is the difference?
•
Circuit representation:more conciseRelated work: Semiring provenance
Semiring provenance([Green et al., 2007], PODS ToT award): annotate results of arelational algebraquery with asemiring expression
What is the difference?
•
Computing lineages: theory
•
Unions of Conjunctive Queries(UCQ) TheoremFor anyUCQ, given an instance, we can construct its lineage inpolynomial time.
(disjunction of all matches)
•
Acyclic Conjunctive Queries(ACQ) TheoremFor anyACQ, given an instance, we can construct its lineage
inlinear time. (following a join tree)
•
Monadic Second Order queries(MSO) TheoremFor anyMSO query, given a tree (or word), we can construct
its lineage inlinear time. (automaton product)
•
Datalog:see [Deutch et al., 2014],PTIMEComputing lineages: theory
•
Unions of Conjunctive Queries(UCQ) TheoremFor anyUCQ, given an instance, we can construct its lineage
inpolynomial time. (disjunction of all matches)
•
Acyclic Conjunctive Queries(ACQ) TheoremFor anyACQ, given an instance, we can construct its lineage
inlinear time. (following a join tree)
•
Monadic Second Order queries(MSO) TheoremFor anyMSO query, given a tree (or word), we can construct
its lineage inlinear time. (automaton product)
•
Datalog:see [Deutch et al., 2014],PTIMEComputing lineages: theory
•
Unions of Conjunctive Queries(UCQ) TheoremFor anyUCQ, given an instance, we can construct its lineage
inpolynomial time. (disjunction of all matches)
•
Acyclic Conjunctive Queries(ACQ) TheoremFor anyACQ, given an instance, we can construct its lineage inlinear time.
(following a join tree)
•
Monadic Second Order queries(MSO) TheoremFor anyMSO query, given a tree (or word), we can construct
its lineage inlinear time. (automaton product)
•
Datalog:see [Deutch et al., 2014],PTIMEComputing lineages: theory
•
Unions of Conjunctive Queries(UCQ) TheoremFor anyUCQ, given an instance, we can construct its lineage
inpolynomial time. (disjunction of all matches)
•
Acyclic Conjunctive Queries(ACQ) TheoremFor anyACQ, given an instance, we can construct its lineage
inlinear time. (following a join tree)
•
Monadic Second Order queries(MSO) TheoremFor anyMSO query, given a tree (or word), we can construct
its lineage inlinear time. (automaton product)
•
Datalog:see [Deutch et al., 2014],PTIMEComputing lineages: theory
•
Unions of Conjunctive Queries(UCQ) TheoremFor anyUCQ, given an instance, we can construct its lineage
inpolynomial time. (disjunction of all matches)
•
Acyclic Conjunctive Queries(ACQ) TheoremFor anyACQ, given an instance, we can construct its lineage
inlinear time. (following a join tree)
•
Monadic Second Order queries(MSO) Theorem(automaton product)
•
Datalog:see [Deutch et al., 2014],PTIMEComputing lineages: theory
•
Unions of Conjunctive Queries(UCQ) TheoremFor anyUCQ, given an instance, we can construct its lineage
inpolynomial time. (disjunction of all matches)
•
Acyclic Conjunctive Queries(ACQ) TheoremFor anyACQ, given an instance, we can construct its lineage
inlinear time. (following a join tree)
•
Monadic Second Order queries(MSO) Theorem•
Datalog:see [Deutch et al., 2014],PTIMEComputing lineages: theory
•
Unions of Conjunctive Queries(UCQ) TheoremFor anyUCQ, given an instance, we can construct its lineage
inpolynomial time. (disjunction of all matches)
•
Acyclic Conjunctive Queries(ACQ) TheoremFor anyACQ, given an instance, we can construct its lineage
inlinear time. (following a join tree)
•
Monadic Second Order queries(MSO) TheoremComputing lineages: practice
•
ProvSQL:PostgreSQL extension to compute query lineages•
Keeps track of thelineageof query results as acircuitYou can run it!https://github.com/PierreSenellart/provsql
Computing lineages: practice
•
ProvSQL:PostgreSQL extension to compute query lineages•
Keeps track of thelineageof query results as acircuitKnowledge compilation and tractable circuit classes Knowledge compilation:
•
Translate your problem to acircuit•
Designgeneral-purpose algorithmson the circuits→ Satisfiability, counting, probability computation, enumeration...
Without knowledge compilation: O(n2)algorithms
Setting A Task 1 Task 2
Setting B Task 1 Task 2
With knowledge compilation: O(n)algorithms
Setting A Circuit Setting B Circuit Circuit Task 1 Circuit Task 2
→ Tractability: use tractablecircuit classes
Knowledge compilation and tractable circuit classes Knowledge compilation:
•
Translate your problem to acircuit•
Designgeneral-purpose algorithmson the circuits→ Satisfiability, counting, probability computation, enumeration...
Without knowledge compilation: O(n2)algorithms
Setting A Task 1 Task 2
Setting B Task 1
With knowledge compilation: O(n)algorithms
Setting A Circuit Setting B Circuit Circuit Task 1 Circuit Task 2
→ Tractability: use tractablecircuit classes
Knowledge compilation and tractable circuit classes Knowledge compilation:
•
Translate your problem to acircuit•
Designgeneral-purpose algorithmson the circuits→ Satisfiability, counting, probability computation, enumeration...
Without knowledge compilation: O(n2)algorithms
Setting A Task 1 Task 2
Setting B Task 1
With knowledge compilation:
O(n)algorithms
Setting A Circuit Setting B Circuit
Circuit Task 1 Circuit Task 2
→ Tractability: use tractablecircuit classes
Knowledge compilation and tractable circuit classes Knowledge compilation:
•
Translate your problem to acircuit•
Designgeneral-purpose algorithmson the circuits→ Satisfiability, counting, probability computation, enumeration...
Without knowledge compilation: O(n2)algorithms
Setting A Task 1 Task 2
Setting B Task 1
With knowledge compilation:
O(n)algorithms
Setting A Circuit Setting B Circuit Circuit Task 1
→ Tractability: use tractablecircuit classes
Knowledge compilation and tractable circuit classes Knowledge compilation:
•
Translate your problem to acircuit•
Designgeneral-purpose algorithmson the circuits→ Satisfiability, counting, probability computation, enumeration...
Without knowledge compilation: O(n2)algorithms
Setting A Task 1 Task 2
Setting B Task 1
With knowledge compilation:
O(n)algorithms
Setting A Circuit Setting B Circuit Circuit Task 1
Tractable circuit classes: Theory vs practice There is a wholezooof tractable circuit classes...
But inpracticethere are solvers for arbitrary circuits:
•
Satisfiability (SAT):MapleSAT, Cadical, Glucose, etc.•
Counting:c2d, d4, dsharp, etc.Tractable circuit classes: Theory vs practice There is a wholezooof tractable circuit classes...
But inpracticethere are solvers for arbitrary circuits:
A tractable circuit class: d-SDNNF
∨
∧
x ∧
y ¬
z
∧
∧
¬
x ∧
y z
•
• y z x
•
Negation Normal Form: negations only applied to the leaves•
Decomposable: inputs of∧-gates are independent(no variable has a path to two different inputs of the same∧-gate)
→ efficientsatisfiability
•
Deterministic: inputs of∨-gates are mutually exclusive→ efficientcounting
•
Structured: there is avtreethat structures the∧-gates→ efficientenumeration
A tractable circuit class: d-SDNNF
∨
∧
x ∧
y ¬
z
∧
∧
¬
x ∧
y z
•
• y z x
•
Negation Normal Form: negations only applied to the leaves•
Decomposable: inputs of∧-gates are independent(no variable has a path to two different inputs of the same∧-gate)
→ efficientsatisfiability
•
Deterministic: inputs of∨-gates are mutually exclusive→ efficientcounting
•
Structured: there is avtreethat structures the∧-gates→ efficientenumeration
A tractable circuit class: d-SDNNF
∨
∧
x ∧
y ¬
z
∧
∧
¬
x ∧
y z
•
• y z x
•
Negation Normal Form: negations only applied to the leaves•
Decomposable: inputs of∧-gates are independent(no variable has a path to two different inputs of the same∧-gate)
→ efficientsatisfiability
•
Deterministic: inputs of∨-gates are mutually exclusive→ efficientcounting
•
Structured: there is avtreethat structures the∧-gates→ efficientenumeration
A tractable circuit class: d-SDNNF
∨
∧
x ∧
y ¬
z
∧
∧
¬
x ∧
y z
•
• y z x
•
Negation Normal Form: negations only applied to the leaves•
Decomposable: inputs of∧-gates are independent(no variable has a path to two different inputs of the same∧-gate)
→ efficientsatisfiability
•
Deterministic: inputs of∨-gates are mutually exclusive→ efficientcounting
•
Structured: there is avtreethat structures the∧-gates→ efficientenumeration
A tractable circuit class: d-SDNNF
∨
∧
x ∧
y ¬
z
∧
∧
¬
x ∧
y z
•
• y z x
•
Negation Normal Form: negations only applied to the leaves•
Decomposable: inputs of∧-gates are independent(no variable has a path to two different inputs of the same∧-gate)
→ efficientsatisfiability
•
Deterministic: inputs of∨-gates are mutually exclusive→ efficientcounting
•
Structured: there is avtreethat structures the∧-gates→ efficientenumeration
A tractable circuit class: d-SDNNF
∨
∧
x ∧
y ¬
z
∧
∧
¬
x ∧
y z
•
• y z x
•
Negation Normal Form: negations only applied to the leaves•
Decomposable: inputs of∧-gates are independent(no variable has a path to two different inputs of the same∧-gate)
→ efficientsatisfiability
•
Deterministic: inputs of∨-gates are mutually exclusive→ efficientcounting
•
Structured: there is avtreethat structures the∧-gates→ efficientenumeration
A tractable circuit class: d-SDNNF
∨
∧
x ∧
y ¬
z
∧
∧
¬
x ∧
y z
•
• y z x
•
Negation Normal Form: negations only applied to the leaves•
Decomposable: inputs of∧-gates are independent(no variable has a path to two different inputs of the same∧-gate)
→ efficientsatisfiability
•
Deterministic: inputs of∨-gates are mutually exclusive→ efficientcounting
→ efficientenumeration
A tractable circuit class: d-SDNNF
∨
∧
x ∧
y ¬
z
∧
∧
¬
x ∧
y z
•
• y z x
•
Negation Normal Form: negations only applied to the leaves•
Decomposable: inputs of∧-gates are independent(no variable has a path to two different inputs of the same∧-gate)
→ efficientsatisfiability
•
Deterministic: inputs of∨-gates are mutually exclusive→ efficientcounting
Computing lineages in tractable classes
•
Self-join-Free Conjunctive Queries(SFCQs) Theorem [Jha and Suciu, 2013]For anysafe SFCQ, given an instance, we can construct anOBDD representationof the lineage inpolynomial time.
•
Monadic Second Order queries (MSO) Theorem [Amarilli et al., 2015]For anyMSO query, given a tree (or word), we can construct ad-SDNNF representation(or OBDD) of the lineage inlinear time.
•
Unions of Conjunctive Queries(UCQ) Conjecture (see [Monet, 2020])For anysafe UCQ, given an instance, we can construct ad-Drepresentation of the lineage inpolynomial time.
Thanks for your attention!
Computing lineages in tractable classes
•
Self-join-Free Conjunctive Queries(SFCQs) Theorem [Jha and Suciu, 2013]For anysafe SFCQ, given an instance, we can construct anOBDD representationof the lineage inpolynomial time.
•
Monadic Second Order queries (MSO) Theorem [Amarilli et al., 2015]For anyMSO query, given a tree (or word), we can construct ad-SDNNF representation(or OBDD) of the lineage inlinear time.
•
Unions of Conjunctive Queries(UCQ) Conjecture (see [Monet, 2020])For anysafe UCQ, given an instance, we can construct ad-Drepresentation of the lineage inpolynomial time.
Thanks for your attention!
Computing lineages in tractable classes
•
Self-join-Free Conjunctive Queries(SFCQs) Theorem [Jha and Suciu, 2013]For anysafe SFCQ, given an instance, we can construct anOBDD representationof the lineage inpolynomial time.
•
Monadic Second Order queries (MSO) Theorem [Amarilli et al., 2015]For anyMSO query, given a tree (or word), we can construct ad-SDNNF representation(or OBDD) of the lineage inlinear time.
•
Unions of Conjunctive Queries(UCQ)Thanks for your attention!
Computing lineages in tractable classes
•
Self-join-Free Conjunctive Queries(SFCQs) Theorem [Jha and Suciu, 2013]For anysafe SFCQ, given an instance, we can construct anOBDD representationof the lineage inpolynomial time.
•
Monadic Second Order queries (MSO) Theorem [Amarilli et al., 2015]For anyMSO query, given a tree (or word), we can construct ad-SDNNF representation(or OBDD) of the lineage inlinear time.
•
Unions of Conjunctive Queries(UCQ)References i
Amarilli, A., Bourhis, P., and Senellart, P. (2015).
Provenance Circuits for Trees and Treelike Instances.
InICALP.
Deutch, D., Milo, T., Roy, S., and Tannen, V. (2014).
Circuits for Datalog Provenance.
InICDT.
Green, T. J., Karvounarakis, G., and Tannen, V. (2007).
Provenance semirings.
References ii
Jha, A. and Suciu, D. (2013).
Knowledge compilation meets database theory: compiling queries to decision diagrams.
Theory of Computing Systems, 52(3).
Monet, M. (2020).
Solving a Special Case of the Intensional vs Extensional Conjecture in Probabilistic Databases.
InPODS. To appear.