Query Stability in Monotonic Data-aware Business Processes* Ognjen - - PowerPoint PPT Presentation

query stability in monotonic data aware business processes
SMART_READER_LITE
LIVE PREVIEW

Query Stability in Monotonic Data-aware Business Processes* Ognjen - - PowerPoint PPT Presentation

Query Stability in Monotonic Data-aware Business Processes* Ognjen Savkovi - Ogi joint work with Elisa Marengo and Werner Nutt Oxford, 2016 * Supported by the project MAGIC, funded by the Province of Bozen-Bolzano Thesis Scope:


slide-1
SLIDE 1

Query Stability in Monotonic Data-aware Business Processes*

Ognjen Savković - “Ogi” joint work with Elisa Marengo and Werner Nutt

Oxford, 2016

* Supported by the project MAGIC, funded by the Province of Bozen-Bolzano

slide-2
SLIDE 2

Thesis Scope:

  • Query Completeness
  • Query Stability
slide-3
SLIDE 3

Overview

  • Background on

business processes that manipulate data

  • Our approach

query stability in monotonic data-aware business processes

slide-4
SLIDE 4

Business Process (BP)

  • A set of activities that are performed in

coordination in an organizational environment …

  • Standardized languages for BPs
  • graphical format: BPMN
  • executable format: BPEL
  • Popular formalism: (Colored) Petri Nets
slide-5
SLIDE 5

An example of BPMN model

slide-6
SLIDE 6

Data-aware view of BPs

  • Data representation in BPMN/Petri Nets is limited
  • Data-centric approaches
  • Model processes as (infinite) relational transition systems
  • Verifying properties expressed in temporal logics
  • Verification is done using model checking
  • E.g.,

Data-Centric Business Processes [Deutsch, Vianu, et al.], Data-Centric Dynamic Systems (DCDS) [Calvanese, et al.]

slide-7
SLIDE 7

Data Layer

Schema

Customer In Debt Customer Gold Customer Loan

closed

  • wes

peer

Instance

Cust(ann) peer(mark, john) Gold(john)

  • wes(mark, @25)

· · · Process Layer

Actions

GetLoan(x) : 9y.peer(x, y) {owes(x, UInput(x))}, Cust(z) {Cust(z)}, Loan(z) {Loan(z)}, InDebt(z) {InDebt(z)}, Gold(z) {Gold(z)}

Service Calls

UInput(x)

Condition Action Rules

peer(x, y) ^ Gold(y) 7 ! GetLoan(x)

DCDS Example

Examples: LTLFO : ∀x. Customer(x)→ F Gold(x)

These are foundational work that focuses on decidability borders of verification over BPs No fine-grained analysis of sources of complexity. Control-flow is abstracted-away

slide-8
SLIDE 8

Objectives

We want a “simple” process model that captures

  • Actions
  • Reading and writing of data
  • Conditions for executing actions based on data

Over such a model we want to “check” query stability: Does the query answer stay the same while the process executes?

slide-9
SLIDE 9

Students at UNIBZ

  • UNIBZ has around 3,500 students
  • Our former Dean of the Faculty of Computer Science used to say:

“Every student is a precious flower”

slide-10
SLIDE 10

Student Office Reports on Enrolled Students

Faculty(of(Economics % Sum 41,45% Faculty(of(Computer(Science % Sum <15,25% Enrollments 2014(/(2015 Enrollments 2015(/(2016 Bachelor)in)Economics)and)Management

231 279

Bachelor)in)Tourism,)Sport)and)Event)Management

153 267

74,51% Master)in)Entrepreneurship)and)Innovation

42 90

114,29% Bachelor)in)Economics)and)Social)Sciences

87 102

17,24% Bachelor)in)Computer)Science)and)Engineering)

115 150

30,43% Master)in)Economics)and)Management)of)the)public)sector

66 81

22,73%

579 819

Master)of)Science)in)Computer)Science

180 100

<44,44%

295 250

Enrollments 2014(/(2015 Enrollments 2015(/(2016 20,78%

slide-11
SLIDE 11

Of Course! The deadline for international programs is not over. The part of registration process is still running.

What is Wrong with the CS Master?

Why do we have so few students? Keep calm …

Dean of the Faculty Secretary

  • Prof. X
slide-12
SLIDE 12

Can we prevent this in the future?

  • Our process models are in standard language called
  • BPMN. However, BPMN doesn’t describe how the

process manipulates data

  • Checking the code would be too much work
  • Also, when the code changes, the procedure for

getting the flags may become obsolete

Can you code a procedure that will add a reliability/stability flag for each of the figures?

IT Technician Dean of the Faculty

slide-13
SLIDE 13

Our Solution: Query Stability in Monotonic Data- aware Business Processes (MDBPs)

slide-14
SLIDE 14

An example of BPMN model

slide-15
SLIDE 15

MDBP: Process Net (control-flow)

Modeled as directed graph with:

  • States/Places (= vertices)
  • Transitions (= edges)

is intl. app. is reg. app. isn't admitted is admitted

  • reg. ontime

early / reg. late early / intl. late

  • intl. ontime

accept app. approve app. approve cond. complete app. register app. withdraw app. reject app.

end start

stud. decis. acad. check

register directly

slide-16
SLIDE 16

MDBP: Database

StudyPlan course type program compLogic intl mscCS compLogic reg mscCS econ reg mscECO AdmittedIntl student course bob compLogic mary compLogic Deadline registration date noregst 1st Jul pre-enrol 30th Sept reg 31st Oct intl 31st Dec Registered student course bob compLogic alice econ

slide-17
SLIDE 17

MDBP: Input Relation

  • We want to model fresh data brought by the instances

from the external world

  • E.g., a student who wants to register fills into a web form
  • the student name
  • the course
  • The web site records the timestamp
  • We model this by a one-tuple relation In

for each process instance In(alice, compLogic, 1/11/2015)

slide-18
SLIDE 18

MDBP: Execution Conditions

Transition t Execution Condition Et

is reg. app.

𝑱𝒐 𝑻, 𝑫, 𝑼 , 𝑻𝒖𝒗𝒆𝒛𝑸𝒎𝒃𝒐 𝑫, 𝒔𝒇𝒉, 𝑸 , ¬𝑻𝒖𝒗𝒆𝒛𝑸𝒎𝒃𝒐(𝑫, 𝒋𝒐𝒖𝒎, 𝑸)

….

is intl. app. is reg. app. isn't admitted is admitted

  • reg. ontime

early / reg. late early / intl. late

  • intl. ontime

accept app. approve app. approve cond. complete app. register app. withdraw app. reject app.

end start

stud. decis. acad. check

register directly

𝑭𝒖 ∶ 𝑱𝒐 𝒕 9 , 𝑺𝟐 𝒗 <𝟐 , … , 𝑺𝒍 𝒗 <𝒍 , ¬𝑺𝒍?𝟐 𝒗 <𝒍?𝟐 , … , ¬𝑺𝒏 𝒗 <𝒏

slide-19
SLIDE 19

MDBP: Writing Rules

is intl. app. is reg. app. isn't admitted is admitted

  • reg. ontime

early / reg. late early / intl. late

  • intl. ontime

accept app. approve app. approve cond. complete app. register app. withdraw app. reject app.

end start

stud. decis. acad. check

register directly

Transition t Writing Rule Wt

register app. …

….

𝑺𝒇𝒉𝒋𝒕𝒖𝒇𝒔 𝑻, 𝑫 ← 𝑱𝒐 𝑻, 𝑫, 𝑼 , 𝑻𝒖𝒗𝒆𝒛𝑸𝒎𝒃𝒐 𝑻, 𝒁, 𝑸

𝑿𝒖 ∶ 𝑺 𝒗 < ← 𝑱𝒐 𝒕 9 , 𝑺𝟐 𝒗 <𝟐 , … , 𝑺𝒍 𝒗 <𝒍 , ¬𝑺𝒍?𝟐 𝒗 <𝒍?𝟐 , … , ¬𝑺𝒏 𝒗 <𝒏

a writing rule is not a recursive rule

slide-20
SLIDE 20

MDBP: Process Instances

We allow an unbounded number of instances to:

  • execute the process simultaneously
  • interact with each other via the database

The process instances are modeled by a pair I = (O,M) where

  • O is the set of active process ids (objects)
  • M determines input record and current state for each instance

e.g.

process instance MIn MP

  • john

In(john, compLogic, 23/10/2014) start

  • alice

In(nick, econ, 10/10/2014) end

  • bob

In(bob, compLogic, 20/09/2014) end

M = O = = {ojo

john,

, oal

alice, , obo bob}

slide-21
SLIDE 21

Two kinds of execution steps: Introduction and Traversal

MDBP: Execution

The process only combines data from instances and database

  • Introduction of a fresh process instance with fresh In-record

Enabled: always

start start

Inp(John, EMCL, 05/06/2014@14:00

In(alice, compLogic, 12/12/2014)

  • Traversal of transition t by a process instance with record 𝑱𝒐 𝒕

9

Enabled: if D ∪ 𝑱𝒐 𝒕 9 ⊨ 𝑭𝒖 Effect: D += 𝑿𝒖 (D ∪ 𝑱𝒐 𝒕 9 )

cond: Et

action: Wt

cond: Et

action: Wt

Fresh data can be imported

  • nly by starting new instances

Process instances share the same database (excluding input records) Database can only grow

slide-22
SLIDE 22

is intl. app. is reg. app. isn't admitted is admitted

  • reg. ontime

early / reg. late early / intl. late

  • intl. ontime

accept app. approve app. approve cond. complete app. register app. withdraw app. reject app.

end start

stud. decis. acad. check

register directly

Monotonic Data-aware Business Processes (Static Part)

𝑱𝒐 𝑻, 𝑫, 𝑼 , 𝑻𝒖𝒗𝒆𝒛𝑸𝒎𝒃𝒐 𝑫, 𝒔𝒇𝒉, 𝑸 , ¬𝑻𝒖𝒗𝒆𝒛𝑸𝒎𝒃𝒐 𝑫, 𝒋𝒐𝒖𝒎, 𝑸 Execution Condition 𝑺𝒇𝒉𝒋𝒕𝒖𝒇𝒔 𝑻, 𝑫 ← 𝑱𝒐 𝑻, 𝑫, 𝑼 , 𝑻𝒖𝒗𝒆𝒛𝑸𝒎𝒃𝒐 𝑻, 𝒁, 𝑸 Writing Action Process Net

slide-23
SLIDE 23

is intl. app. is reg. app. isn't admitted is admitted

  • reg. ontime

early / reg. late early / intl. late

  • intl. ontime

accept app. approve app. approve cond. complete app. register app. withdraw app. reject app.

end start

stud. decis. acad. check

register directly

Monotonic Data-aware Business Processes (Dynamic Part)

Process Net

ids Instance record place

  • john

In(john, compLogic, 23/10/2014) start

  • alice

In(nick, econ, 10/10/2014)

  • acad. check
  • bob

In(bob, compLogic, 20/09/2014) end

Running Instances Database Tables

slide-24
SLIDE 24

Query Stability: Formally

Query 𝑹 is stable in MDBP B B with initial database instance D if for every execution in B that generates a database instance D’ D’ it holds 𝑹 D = 𝑹 D’ D’ * We analyze stability for (positive) Conjunctive Queries

Faculty(of(Economics % Sum 41,45% Faculty(of(Computer(Science % Sum <15,25% Enrollments 2014(/(2015 Enrollments 2015(/(2016 Bachelor)in)Economics)and)Management

231 279

Bachelor)in)Tourism,)Sport)and)Event)Management

153 267

74,51% Master)in)Entrepreneurship)and)Innovation

42 90

114,29% Bachelor)in)Economics)and)Social)Sciences

87 102

17,24% Bachelor)in)Computer)Science)and)Engineering)

115 150

30,43% Master)in)Economics)and)Management)of)the)public)sector

66 81

22,73%

579 819

Master)of)Science)in)Computer)Science

180 100

<44,44%

295 250

Enrollments 2014(/(2015 Enrollments 2015(/(2016 20,78%

Stable? YES! Stable? NO! YES! NO! YES! YES! YES! YES! YES!

slide-25
SLIDE 25

Restrictions on MDBP model

slide-26
SLIDE 26

Restrictions on MDBP model

  • We investigate how restrictions

and their combinations impact “difficulty” of checking stability

slide-27
SLIDE 27

Restrictions on MDBP model

  • Interaction:
  • general
  • read-only, write-only (rowo):

relations are partitioned into read and write relations

Interaction: general - rowo

slide-28
SLIDE 28

Restrictions on MDBP model

  • Rules:
  • normal:
  • positive:

no negation (no “ ≠ ”, yes “X<5”)

Interaction: general - rowo Rules: normal - positive

slide-29
SLIDE 29

Restrictions on MDBP model

  • Net:
  • cyclic
  • acyclic

Interaction: general - rowo Rules: normal - positive Net: cyclic - acyclic

slide-30
SLIDE 30

Restrictions on MDBP model

  • Configuration:
  • arbitrary:

instances can be arbitrarily distributed in the net

  • fresh:

initially, there are no instances running

Interaction: general - rowo Rules: normal - positive Net: cyclic - acyclic Configuration: arbitrary - fresh

slide-31
SLIDE 31

Restrictions on MDBP model

  • Semantics:
  • open:

new process instances can start

  • closed:
  • nly existing instances can run

Interaction: general - rowo Rules: normal - positive Net: cyclic - acyclic Configuration: arbitrary - fresh Semantics:

  • pen - closed
slide-32
SLIDE 32

Restrictions on MDBP model

  • But how do we check stability?

Interaction: general - rowo Rules: normal - positive Net: cyclic - acyclic Configuration: arbitrary - fresh Semantics:

  • pen - closed
slide-33
SLIDE 33

Principles of Checking Stability (For Decidable Cases)

  • We check stability by encodings into standard variants of Datalog
  • In particular, an encoding program checks stability by:

1. simulating all possible executions of instances 2. extending the db by applying writing rules

  • f simulated executions

3. running the given query on extended dbs, and comparing if new answer appears For a query 𝑹 and MDBP 𝓒 we construct a Datalog program 𝜬𝓒,𝑹 s.t.: 𝑹 is not stable in 𝓒 iff program 𝜬𝓒,𝑹 derives a test fact

slide-34
SLIDE 34

Complexity of Checking Stability

slide-35
SLIDE 35

Complexity of Checking Stability

Defining Restriction Optional Restriction Data Instance Process Query Combined

slide-36
SLIDE 36

Complexity of Checking Stability

Defining Restriction Optional Restriction Data Instance Process Query Combined

There are infinitely many possible executions The database may grow in an unbounded way over time

slide-37
SLIDE 37

Complexity of Checking Stability

Defining Restriction Optional Restriction Data Instance Process Query Combined –– ––

??

slide-38
SLIDE 38

Complexity of Checking Stability

Defining Restriction Optional Restriction Data Instance Process Query Combined –– ––

Undec. Undec.

  • We simulate updates of a tape in TM by versioning the tape
  • We construct arbitrarily long:
  • Sequences of tape indices: 𝒐𝒇𝒚𝒖 𝒃, 𝒄 , 𝒐𝒇𝒚𝒖 𝒄, 𝒅 , 𝒐𝒇𝒚𝒖 𝒅, 𝒆 , …
  • Sequences of version indices: 𝒃𝒈𝒖𝒇𝒔 𝒇, 𝒈 , 𝒃𝒈𝒖𝒇𝒔 𝒈, 𝒉 , …
  • Sequences of versions of index values in {0,1}:

𝒘𝒇𝒔𝒕𝒋𝒑𝒐 𝒃, 𝒇, 𝟏 , 𝒘𝒇𝒔𝒕𝒋𝒑𝒐 𝒃, 𝒈, 𝟏 , … 𝒘𝒇𝒔𝒕𝒋𝒑𝒐 𝒄, 𝒇, 𝟐 , 𝒘𝒇𝒔𝒕𝒋𝒑𝒐 𝒄, 𝒈, 𝟏 , … 𝒘𝒇𝒔𝒕𝒋𝒑𝒐 𝒅, 𝒇, 𝟏 , 𝒘𝒇𝒔𝒕𝒋𝒑𝒐 𝒇, 𝒈, 𝟏 , … … a b c 0 1 0

slide-39
SLIDE 39

Complexity of Checking Stability

Defining Restriction Optional Restriction Data Instance Process Query Combined –– ––

Undec. Undec. Undec. Undec.

  • We simulate updates of a tape in TM by versioning the tape
  • We construct arbitrarily long:
  • Sequences of tape indices: 𝒐𝒇𝒚𝒖 𝒃, 𝒄 , 𝒐𝒇𝒚𝒖 𝒄, 𝒅 , 𝒐𝒇𝒚𝒖 𝒅, 𝒆 , …
  • Sequences of version indices: 𝒃𝒈𝒖𝒇𝒔 𝒇, 𝒈 , 𝒃𝒈𝒖𝒇𝒔 𝒈, 𝒉 , …
  • Sequences of versions of index values in {0,1}:

𝒘𝒇𝒔𝒕𝒋𝒑𝒐 𝒃, 𝒇, 𝟏 , 𝒘𝒇𝒔𝒕𝒋𝒑𝒐 𝒃, 𝒈, 𝟏 , … 𝒘𝒇𝒔𝒕𝒋𝒑𝒐 𝒄, 𝒇, 𝟐 , 𝒘𝒇𝒔𝒕𝒋𝒑𝒐 𝒄, 𝒈, 𝟏 , … 𝒘𝒇𝒔𝒕𝒋𝒑𝒐 𝒅, 𝒇, 𝟏 , 𝒘𝒇𝒔𝒕𝒋𝒑𝒐 𝒇, 𝒈, 𝟏 , … … a b c 0 1 0

slide-40
SLIDE 40

Complexity of Checking Stability

Defining Restriction Optional Restriction Data Instance Process Query Combined –– ––

Undec. Undec. Undec. Undec. Undec.

  • We simulate updates of a tape in TM by versioning the tape
  • We construct arbitrarily long:
  • Sequences of tape indices: 𝒐𝒇𝒚𝒖 𝒃, 𝒄 , 𝒐𝒇𝒚𝒖 𝒄, 𝒅 , 𝒐𝒇𝒚𝒖 𝒅, 𝒆 , …
  • Sequences of version indices: 𝒃𝒈𝒖𝒇𝒔 𝒇, 𝒈 , 𝒃𝒈𝒖𝒇𝒔 𝒈, 𝒉 , …
  • Sequences of versions of index values in {0,1}:

𝒘𝒇𝒔𝒕𝒋𝒑𝒐 𝒃, 𝒇, 𝟏 , 𝒘𝒇𝒔𝒕𝒋𝒑𝒐 𝒃, 𝒈, 𝟏 , … 𝒘𝒇𝒔𝒕𝒋𝒑𝒐 𝒄, 𝒇, 𝟐 , 𝒘𝒇𝒔𝒕𝒋𝒑𝒐 𝒄, 𝒈, 𝟏 , … 𝒘𝒇𝒔𝒕𝒋𝒑𝒐 𝒅, 𝒇, 𝟏 , 𝒘𝒇𝒔𝒕𝒋𝒑𝒐 𝒇, 𝒈, 𝟏 , … … a b c 0 1 0

slide-41
SLIDE 41

Complexity of Checking Stability

Defining Restriction Optional Restriction Data Instance Process Query Combined –– ––

Undec. Undec. Undec. Undec. Undec.

  • We simulate updates of a tape in TM by versioning the tape
  • We construct arbitrarily long:
  • Sequences of tape indices: 𝒐𝒇𝒚𝒖 𝒃, 𝒄 , 𝒐𝒇𝒚𝒖 𝒄, 𝒅 , 𝒐𝒇𝒚𝒖 𝒅, 𝒆 , …
  • Sequences of version indices: 𝒃𝒈𝒖𝒇𝒔 𝒇, 𝒈 , 𝒃𝒈𝒖𝒇𝒔 𝒈, 𝒉 , …
  • Sequences of versions of index values in {0,1}:

𝒘𝒇𝒔𝒕𝒋𝒑𝒐 𝒃, 𝒇, 𝟏 , 𝒘𝒇𝒔𝒕𝒋𝒑𝒐 𝒃, 𝒈, 𝟏 , … 𝒘𝒇𝒔𝒕𝒋𝒑𝒐 𝒄, 𝒇, 𝟐 , 𝒘𝒇𝒔𝒕𝒋𝒑𝒐 𝒄, 𝒈, 𝟏 , … 𝒘𝒇𝒔𝒕𝒋𝒑𝒐 𝒅, 𝒇, 𝟏 , 𝒘𝒇𝒔𝒕𝒋𝒑𝒐 𝒇, 𝒈, 𝟏 , … … a b c 0 1 0

slide-42
SLIDE 42

Complexity of Checking Stability

Defining Restriction Optional Restriction Data Instance Process Query Combined –– fresh, acyclic

Undec. Undec. Undec. Undec. Undec.

  • We simulate updates of a tape in TM by versioning the tape
  • We construct arbitrarily long:
  • Sequences of tape indices: 𝒐𝒇𝒚𝒖 𝒃, 𝒄 , 𝒐𝒇𝒚𝒖 𝒄, 𝒅 , 𝒐𝒇𝒚𝒖 𝒅, 𝒆 , …
  • Sequences of version indices: 𝒃𝒈𝒖𝒇𝒔 𝒇, 𝒈 , 𝒃𝒈𝒖𝒇𝒔 𝒈, 𝒉 , …
  • Sequences of versions of index values in {0,1}:

𝒘𝒇𝒔𝒕𝒋𝒑𝒐 𝒃, 𝒇, 𝟏 , 𝒘𝒇𝒔𝒕𝒋𝒑𝒐 𝒃, 𝒈, 𝟏 , … 𝒘𝒇𝒔𝒕𝒋𝒑𝒐 𝒄, 𝒇, 𝟐 , 𝒘𝒇𝒔𝒕𝒋𝒑𝒐 𝒄, 𝒈, 𝟏 , … 𝒘𝒇𝒔𝒕𝒋𝒑𝒐 𝒅, 𝒇, 𝟏 , 𝒘𝒇𝒔𝒕𝒋𝒑𝒐 𝒇, 𝒈, 𝟏 , … … a b c 0 1 0

slide-43
SLIDE 43

Complexity of Checking Stability

Defining Restriction Optional Restriction Data Instance Process Query Combined –– fresh, acyclic

Undec. Undec. Undec. Undec. Undec.

  • For undecidability we need:
  • Infinite supply of fresh constants (open semantics)
  • Negation in the rules to create sequences (negation)
  • To read what we write (non rowo)
slide-44
SLIDE 44

Complexity of Checking Stability

Defining Restriction Optional Restriction Data Instance Process Query Combined –– fresh, acyclic

Undec. Undec. Undec. Undec. Undec.

  • For undecidability we need:
  • Infinite supply of fresh constants (open semantics)
  • Negation in the rules to create sequences (negation)
  • To read what we write (non rowo)
  • We get decidability by dropping any of those conditions
slide-45
SLIDE 45

Complexity of Checking Stability

Defining Restriction Optional Restriction Data Instance Process Query Combined –– fresh, acyclic

Undec. Undec. Undec. Undec. Undec.

closed ––

  • MDBP generate exponentially many facts => look exponentially long executions
slide-46
SLIDE 46

Complexity of Checking Stability

Defining Restriction Optional Restriction Data Instance Process Query Combined –– fresh, acyclic

Undec. Undec. Undec. Undec. Undec.

closed ––

  • MDBP generate exponentially many facts => look exponentially long executions
  • We encode MDBPs into Datalog with negation

under stable model semantics with brave reasoning

  • Instances are encoded as a set of facts
  • Data are encoded as a set of facts
slide-47
SLIDE 47

Complexity of Checking Stability

Defining Restriction Optional Restriction Data Instance Process Query Combined –– fresh, acyclic

Undec. Undec. Undec. Undec. Undec.

closed ––

co-NP-c co-NP-c co−NExpTime-c co−NExpTime-c

  • MDBP generate exponentially many facts => look exponentially long executions
  • We encode MDBPs into Datalog with negation

under stable model semantics with brave reasoning (co−NExpTime)

  • Instances are encoded as a set of facts (co-NP)
  • Data are encoded as a set of facts (co-NP)
slide-48
SLIDE 48

Complexity of Checking Stability

Defining Restriction Optional Restriction Data Instance Process Query Combined –– fresh, acyclic

Undec. Undec. Undec. Undec. Undec.

closed ––

co-NP-c co-NP-c co−NExpTime-c 𝚸𝟑

𝐐-c

co−NExpTime-c

  • We show: Checking whether Q(D)=Q(D’) is 𝚸𝟑

𝐐-c in query size

(by encoding 3 coloring extension problem for graphs)

slide-49
SLIDE 49

Complexity of Checking Stability

Defining Restriction Optional Restriction Data Instance Process Query Combined –– fresh, acyclic

Undec. Undec. Undec. Undec. Undec.

closed ––

co-NP-c co-NP-c co−NExpTime-c 𝚸𝟑

𝐐-c

co−NExpTime-c

positive ––

slide-50
SLIDE 50

Complexity of Checking Stability

Defining Restriction Optional Restriction Data Instance Process Query Combined –– fresh, acyclic

Undec. Undec. Undec. Undec. Undec.

closed ––

co-NP-c co-NP-c co−NExpTime-c 𝚸𝟑

𝐐-c

co−NExpTime-c

positive ––

Abstraction Principle:

  • Fresh instances can be faithfully abstracted by instances with constants from

𝒃𝒆𝒑𝒏∗ = 𝒃𝒆𝒑𝒏 ∪ 𝒃𝟐, … , 𝒃𝒐

  • 𝒃𝒆𝒑𝒏 is the active domain and
  • 𝒃𝟐, … , 𝒃𝒐 is a set of linearly many fresh constant
slide-51
SLIDE 51

Complexity of Checking Stability

Defining Restriction Optional Restriction Data Instance Process Query Combined –– fresh, acyclic

Undec. Undec. Undec. Undec. Undec.

closed ––

co-NP-c co-NP-c co−NExpTime-c 𝚸𝟑

𝐐-c

co−NExpTime-c

positive ––

  • Still exponentially long executions, but cycles can be modeled via recursion
slide-52
SLIDE 52

Complexity of Checking Stability

Defining Restriction Optional Restriction Data Instance Process Query Combined –– fresh, acyclic

Undec. Undec. Undec. Undec. Undec.

closed ––

co-NP-c co-NP-c co−NExpTime-c 𝚸𝟑

𝐐-c

co−NExpTime-c

positive ––

  • Still exponentially long executions, but cycles can be modeled via recursion
  • We encode MDBPs into recursive Datalog with stratified negation
  • Data is encoded as a set of facts
slide-53
SLIDE 53

Complexity of Checking Stability

Defining Restriction Optional Restriction Data Instance Process Query Combined –– fresh, acyclic

Undec. Undec. Undec. Undec. Undec.

closed ––

co-NP-c co-NP-c co−NExpTime-c 𝚸𝟑

𝐐-c

co−NExpTime-c

positive ––

PTIME-c ExpTime-c 𝚸𝟑

𝐐-c

ExpTime-c

  • Still exponentially long executions, but cycles can be modeled via recursion
  • We encode MDBPs into recursive Datalog with stratified negation (ExpTime)
  • Data is encoded as a set of facts (PTIME)
slide-54
SLIDE 54

Complexity of Checking Stability

Defining Restriction Optional Restriction Data Instance Process Query Combined –– fresh, acyclic

Undec. Undec. Undec. Undec. Undec.

closed ––

co-NP-c co-NP-c co−NExpTime-c 𝚸𝟑

𝐐-c

co−NExpTime-c

positive ––

PTIME-c co-NP-c ExpTime-c 𝚸𝟑

𝐐-c

ExpTime-c

  • Still exponentially long executions, but cycles can be modeled via recursion
  • We encode MDBPs into recursive Datalog with stratified negation (ExpTime)
  • Data is encoded as a set of facts (PTIME)
  • Instances do interact; an instance can read what others write (co-NP)
slide-55
SLIDE 55

Complexity of Checking Stability

Defining Restriction Optional Restriction Data Instance Process Query Combined –– fresh, acyclic

Undec. Undec. Undec. Undec. Undec.

closed ––

co-NP-c co-NP-c co−NExpTime-c 𝚸𝟑

𝐐-c

co−NExpTime-c

positive closed

PTIME-c co-NP-c ExpTime-c 𝚸𝟑

𝐐-c

ExpTime-c

  • Still exponentially long executions, but cycles can be modeled via recursion
  • We encode MDBPs into recursive Datalog with stratified negation (ExpTime)
  • Data is encoded as a set of facts (PTIME)
  • Instances do interact; an instance can read what others write (co-NP)
slide-56
SLIDE 56

Complexity of Checking Stability

Defining Restriction Optional Restriction Data Instance Process Query Combined –– fresh, acyclic

Undec. Undec. Undec. Undec. Undec.

closed ––

co-NP-c co-NP-c co−NExpTime-c 𝚸𝟑

𝐐-c

co−NExpTime-c

positive fresh, acyclic

PTIME-c co-NP-c ExpTime-c 𝚸𝟑

𝐐-c

ExpTime-c

  • Still exponentially long executions, but cycles can be modeled via recursion
  • We encode MDBPs into recursive Datalog with stratified negation (ExpTime)
  • Data is encoded as a set of facts (PTIME)
  • Instances do interact; an instance can read what others write (co-NP)
slide-57
SLIDE 57

Complexity of Checking Stability

Defining Restriction Optional Restriction Data Instance Process Query Combined –– fresh, acyclic

Undec. Undec. Undec. Undec. Undec.

closed ––

co-NP-c co-NP-c co−NExpTime-c 𝚸𝟑

𝐐-c

co−NExpTime-c

positive clos / fr, acyc

PTIME-c co-NP-c ExpTime-c 𝚸𝟑

𝐐-c

ExpTime-c

closed, acyclic ––

  • We have executions of bounded length!
slide-58
SLIDE 58

Complexity of Checking Stability

Defining Restriction Optional Restriction Data Instance Process Query Combined –– fresh, acyclic

Undec. Undec. Undec. Undec. Undec.

closed ––

co-NP-c co-NP-c co−NExpTime-c 𝚸𝟑

𝐐-c

co−NExpTime-c

positive clos / fr, acyc

PTIME-c co-NP-c ExpTime-c 𝚸𝟑

𝐐-c

ExpTime-c

closed, acyclic ––

  • We have executions of bounded length!
  • We encode MDBPs into non-recursive Datalog with negation
  • Data is encoded as a set of facts
  • Instances do interplay; an instance can read what other write
slide-59
SLIDE 59

Complexity of Checking Stability

Defining Restriction Optional Restriction Data Instance Process Query Combined –– fresh, acyclic

Undec. Undec. Undec. Undec. Undec.

closed ––

co-NP-c co-NP-c co−NExpTime-c 𝚸𝟑

𝐐-c

co−NExpTime-c

positive clos / fr, acyc

PTIME-c co-NP-c ExpTime-c 𝚸𝟑

𝐐-c

ExpTime-c

closed, acyclic ––

in AC0 co-NP-c PSpace-c 𝚸𝟑

𝐐-c

PSpace−c

  • We have executions of bounded length!
  • We encode MDBPs into non-recursive Datalog with negation (PSpace)
  • Data is encoded as a set of facts (in AC0)
  • Instances do interplay; an instance can read what other write (co-NP)
slide-60
SLIDE 60

Complexity of Checking Stability

Defining Restriction Optional Restriction Data Instance Process Query Combined –– fresh, acyclic

Undec. Undec. Undec. Undec. Undec.

closed ––

co-NP-c co-NP-c co−NExpTime-c 𝚸𝟑

𝐐-c

co−NExpTime-c

positive clos / fr, acyc

PTIME-c co-NP-c ExpTime-c 𝚸𝟑

𝐐-c

ExpTime-c

closed, acyclic positive

in AC0 co-NP-c PSpace-c 𝚸𝟑

𝐐-c

PSpace−c

  • We have executions of bounded length!
  • We encode MDBPs into non-recursive Datalog with negation (PSpace)
  • Data is encoded as a set of facts (in AC0)
  • Instances do interplay; an instance can read what other write (co-NP)
slide-61
SLIDE 61

Complexity of Checking Stability

Defining Restriction Optional Restriction Data Instance Process Query Combined –– fresh, acyclic

Undec. Undec. Undec. Undec. Undec.

closed ––

co-NP-c co-NP-c co−NExpTime-c 𝚸𝟑

𝐐-c

co−NExpTime-c

positive clos / fr, acyc

PTIME-c co-NP-c ExpTime-c 𝚸𝟑

𝐐-c

ExpTime-c

closed, acyclic positive

in AC0 co-NP-c PSpace-c 𝚸𝟑

𝐐-c

PSpace−c

rowo *

  • We encode rowo MDBPs as non-recursive Datalog rules
  • We encode instances as facts
  • We encode the database as facts
slide-62
SLIDE 62

Complexity of Checking Stability

Defining Restriction Optional Restriction Data Instance Process Query Combined –– fresh, acyclic

Undec. Undec. Undec. Undec. Undec.

closed ––

co-NP-c co-NP-c co−NExpTime-c 𝚸𝟑

𝐐-c

co−NExpTime-c

positive clos / fr, acyc

PTIME-c co-NP-c ExpTime-c 𝚸𝟑

𝐐-c

ExpTime-c

closed, acyclic positive

in AC0 co-NP-c PSpace-c 𝚸𝟑

𝐐-c

PSpace−c

rowo *

in AC0 in AC0 𝚸𝟑

𝐐-c

  • We encode rowo MDBPs as non-recursive Datalog rules (PSpace)
  • We encode instances as facts (in AC0)
  • We encode the database as facts (in AC0)
slide-63
SLIDE 63

Complexity of Checking Stability

Defining Restriction Optional Restriction Data Instance Process Query Combined –– fresh, acyclic

Undec. Undec. Undec. Undec. Undec.

closed ––

co-NP-c co-NP-c co−NExpTime-c 𝚸𝟑

𝐐-c

co−NExpTime-c

positive clos / fr, acyc

PTIME-c co-NP-c ExpTime-c 𝚸𝟑

𝐐-c

ExpTime-c

closed, acyclic positive

in AC0 co-NP-c PSpace-c 𝚸𝟑

𝐐-c

PSpace−c

rowo *

in AC0 in AC0 co-NP-c 𝚸𝟑

𝐐-c

𝚸𝟑

𝐐-c

  • We encode rowo MDBPs as non-recursive Datalog rules (PSpace)
  • We encode instances as facts (in AC0)
  • We encode the database as facts (in AC0)
  • In fact, a rowo process rather corresponds to a set of CQs (co-NP)
slide-64
SLIDE 64

Complexity of Checking Stability

Defining Restriction Optional Restriction Data Instance Process Query Combined –– fresh, acyclic

Undec. Undec. Undec. Undec. Undec.

closed ––

co-NP-c co-NP-c co−NExpTime-c 𝚸𝟑

𝐐-c

co−NExpTime-c

positive clos / fr, acyc

PTIME-c co-NP-c ExpTime-c 𝚸𝟑

𝐐-c

ExpTime-c

closed, acyclic positive

in AC0 co-NP-c PSpace-c 𝚸𝟑

𝐐-c

PSpace-c

rowo *

in AC0 in AC0 co-NP-c 𝚸𝟑

𝐐-c

𝚸𝟑

𝐐−c

  • That’s all folks 🐱
slide-65
SLIDE 65

Summing up

  • MDBPs model insertion of data by a business process
  • Query stability asks about interaction between processes and data
  • Checking stability can be encoded into variants of Datalog
  • In principle, can be executed by Datalog (or SQL) engines
slide-66
SLIDE 66

Possible Future Work

  • Updates and deletions:

We already know that complexity jumps (ExpSpace-h)

  • Analytics-aware BPs:

E.g., how much (min/max) figures can change?

  • Integrity Constraints:
  • 1. Is database consistency stable along the runs?
  • 2. Does database reach a stable consistent state?
  • Implementing stability reasoning