• Aucun résultat trouvé

Query Lineages and Knowledge Compilation

N/A
N/A
Protected

Academic year: 2022

Partager "Query Lineages and Knowledge Compilation"

Copied!
58
0
0

Texte intégral

(1)

Query Lineages and Knowledge Compilation

Antoine Amarilli1 November 13, 2019

(2)

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 true

Example: 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)

(3)

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 true

Example: 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)

(4)

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 true

Example: queryQ:

∃xyz R(x,y)S(y,z)

R S

R(a,b) R(a0,b)

S(b,c)

(5)

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 true

Example: queryQ:

∃xyz R(x,y)S(y,z)

R S

R(a,b) R(a0,b)

S(b,c)

(6)

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 true

Example: queryQ:

∃xyz R(x,y)S(y,z)

R S

S(b,c)

(7)

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?

(8)

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?

(9)

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?

(10)

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

(11)

Another application: Query answers

Lineages can also represent theanswerstonon-Boolean queries!

Study answers ofnon-Boolean query Q(x,y)on instanceI

Q(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 ofQ0

onIplus 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.

(12)

Another application: Query answers

Lineages can also represent theanswerstonon-Boolean queries!

Study answers ofnon-Boolean query Q(x,y)on instanceI

Q(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 ofQ0

onIplus 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.

(13)

Another application: Query answers

Lineages can also represent theanswerstonon-Boolean queries!

Study answers ofnon-Boolean query Q(x,y)on instanceI

Q(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 ofQ0

onIplus 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.

(14)

Another application: Query answers

Lineages can also represent theanswerstonon-Boolean queries!

Study answers ofnon-Boolean query Q(x,y)on instanceI

Q(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 ofQ0

onIplus 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.

(15)

Another application: Query answers

Lineages can also represent theanswerstonon-Boolean queries!

Study answers ofnon-Boolean query Q(x,y)on instanceI

Q(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 ofQ0

onIplus 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.

(16)

Another application: Query answers

Lineages can also represent theanswerstonon-Boolean queries!

Study answers ofnon-Boolean query Q(x,y)on instanceI

Q(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 ofQ0

onIplus 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.

(17)

Another application: Query answers

Lineages can also represent theanswerstonon-Boolean queries!

Study answers ofnon-Boolean query Q(x,y)on instanceI

Q(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 ofQ0

onIplus 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.

(18)

Another application: Query answers

Lineages can also represent theanswerstonon-Boolean queries!

Study answers ofnon-Boolean query Q(x,y)on instanceI

Q(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 ofQ0

onIplus 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.

(19)

Another application: Query answers

Lineages can also represent theanswerstonon-Boolean queries!

Study answers ofnon-Boolean query Q(x,y)on instanceI

Q(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 ofQ0

onIplus 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.

(20)

Another application: Query answers

Lineages can also represent theanswerstonon-Boolean queries!

Study answers ofnon-Boolean query Q(x,y)on instanceI

Q(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 ofQ0

onIplus 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.

(21)

Another application: Query answers

Lineages can also represent theanswerstonon-Boolean queries!

Study answers ofnon-Boolean query Q(x,y)on instanceI

Q(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 ofQ0

onIplus 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.

(22)

Another application: Query answers

Lineages can also represent theanswerstonon-Boolean queries!

Study answers ofnon-Boolean query Q(x,y)on instanceI

Q(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 ofQ0

onIplus 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.

(23)

Another application: Query answers

Lineages can also represent theanswerstonon-Boolean queries!

Study answers ofnon-Boolean query Q(x,y)on instanceI

Q(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 ofQ0

onIplus assignment facts

(X(a)∧R(a,b)X(a0)∧R(a0,b))

∧Y(b)∧S(b,c)

We cancountthe answers,enumeratethem, etc.

(24)

Another application: Query answers

Lineages can also represent theanswerstonon-Boolean queries!

Study answers ofnon-Boolean query Q(x,y)on instanceI

Q(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 ofQ0

onIplus 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)

(25)

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 concise

(26)

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?

• Nomultiplicityof facts or derivations

Essentially only make sense forrelational algebra

Circuit representation:more concise

(27)

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?

Circuit representation:more concise

(28)

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?

(29)

Computing lineages: theory

Unions of Conjunctive Queries(UCQ) Theorem

For anyUCQ, given an instance, we can construct its lineage inpolynomial time.

(disjunction of all matches)

Acyclic Conjunctive Queries(ACQ) Theorem

For anyACQ, given an instance, we can construct its lineage

inlinear time. (following a join tree)

Monadic Second Order queries(MSO) Theorem

For anyMSO query, given a tree (or word), we can construct

its lineage inlinear time. (automaton product)

Datalog:see [Deutch et al., 2014],PTIME

(30)

Computing lineages: theory

Unions of Conjunctive Queries(UCQ) Theorem

For anyUCQ, given an instance, we can construct its lineage

inpolynomial time. (disjunction of all matches)

Acyclic Conjunctive Queries(ACQ) Theorem

For anyACQ, given an instance, we can construct its lineage

inlinear time. (following a join tree)

Monadic Second Order queries(MSO) Theorem

For anyMSO query, given a tree (or word), we can construct

its lineage inlinear time. (automaton product)

Datalog:see [Deutch et al., 2014],PTIME

(31)

Computing lineages: theory

Unions of Conjunctive Queries(UCQ) Theorem

For anyUCQ, given an instance, we can construct its lineage

inpolynomial time. (disjunction of all matches)

Acyclic Conjunctive Queries(ACQ) Theorem

For anyACQ, given an instance, we can construct its lineage inlinear time.

(following a join tree)

Monadic Second Order queries(MSO) Theorem

For anyMSO query, given a tree (or word), we can construct

its lineage inlinear time. (automaton product)

Datalog:see [Deutch et al., 2014],PTIME

(32)

Computing lineages: theory

Unions of Conjunctive Queries(UCQ) Theorem

For anyUCQ, given an instance, we can construct its lineage

inpolynomial time. (disjunction of all matches)

Acyclic Conjunctive Queries(ACQ) Theorem

For anyACQ, given an instance, we can construct its lineage

inlinear time. (following a join tree)

Monadic Second Order queries(MSO) Theorem

For anyMSO query, given a tree (or word), we can construct

its lineage inlinear time. (automaton product)

Datalog:see [Deutch et al., 2014],PTIME

(33)

Computing lineages: theory

Unions of Conjunctive Queries(UCQ) Theorem

For anyUCQ, given an instance, we can construct its lineage

inpolynomial time. (disjunction of all matches)

Acyclic Conjunctive Queries(ACQ) Theorem

For 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],PTIME

(34)

Computing lineages: theory

Unions of Conjunctive Queries(UCQ) Theorem

For anyUCQ, given an instance, we can construct its lineage

inpolynomial time. (disjunction of all matches)

Acyclic Conjunctive Queries(ACQ) Theorem

For 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],PTIME

(35)

Computing lineages: theory

Unions of Conjunctive Queries(UCQ) Theorem

For anyUCQ, given an instance, we can construct its lineage

inpolynomial time. (disjunction of all matches)

Acyclic Conjunctive Queries(ACQ) Theorem

For anyACQ, given an instance, we can construct its lineage

inlinear time. (following a join tree)

Monadic Second Order queries(MSO) Theorem

(36)

Computing lineages: practice

ProvSQL:PostgreSQL extension to compute query lineages

Keeps track of thelineageof query results as acircuit

You can run it!https://github.com/PierreSenellart/provsql

(37)

Computing lineages: practice

ProvSQL:PostgreSQL extension to compute query lineages

Keeps track of thelineageof query results as acircuit

(38)

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 Task 2

With knowledge compilation: O(n)algorithms

Setting A Circuit Setting B Circuit Circuit Task 1 Circuit Task 2

→ Tractability: use tractablecircuit classes

(39)

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

(40)

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

(41)

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

(42)

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

(43)

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.

(44)

Tractable circuit classes: Theory vs practice There is a wholezooof tractable circuit classes...

But inpracticethere are solvers for arbitrary circuits:

(45)

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

(46)

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

(47)

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

(48)

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

(49)

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

(50)

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

(51)

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

(52)

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

(53)

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!

(54)

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!

(55)

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!

(56)

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)

(57)

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.

(58)

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.

Références

Documents relatifs

Next we want to capture when two states of a single transition system or more generally of two transition systems, possibly obtained by applying different processes to

We consider stan- dard decision problems associated to logic-based abduction: (i) existence of an expla- nation, (ii) recognition of a given ABox as being an explanation, and

We then provide a way of “collapsing” such forest quasi-models back into real models that still have a kind of forest shape, called forest model, but which have a possibly infinite

In contrast to OWL2-EL, the design goal of both OWL2-QL and OWL2-RL is to enable the use of database technology for query answering over OWL in- stance data: many applications

In this paper, we show that, in SHIQ without inverse roles (and with- out transitive roles in the query), conjunctive query answering is only ExpTime -complete and thus not harder

For NDL-rewritings, we show that polynomial-size rewritings always exist for tree-shaped queries with a bounded number of leaves (and arbitrary TBoxes), and for bounded

Due to the large number of named entity queries – especially in the cultural domain - the automatic language detection has to deal with ambiguous terms or even terms

EN_BM25_Phrases(6)_title: phrases, IPC, title, cutoff = 6 terms In Table 2, the results of the post runs are provided.. Therefore, we might summarize that longer phrases tend