monitoringbusinessmetaconstraints basedonltl ... filemonitoringbusinessmetaconstraints...
TRANSCRIPT
![Page 1: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/1.jpg)
Monitoring Business MetaconstraintsBased on LTL & LDL for Finite Traces
Marco Montali
KRDB Research Centre for Knowledge and DataFree University of Bozen-Bolzano
Joint work with: G. De Giacomo, R. De Masellis, M. Grasso, F.M. Maggi
BPM 2014Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 1 / 26
![Page 2: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/2.jpg)
Process Mining
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 2 / 26
![Page 3: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/3.jpg)
Process Mining
Classicaly applied to post-mortem data.
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 3 / 26
![Page 4: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/4.jpg)
Operational Decision SupportExtension of classical process mining to current, live data.
Refined process mining framework
PAGE 3
information system(s)
current data
“world”people
machines
organizationsbusiness
processes documents
historic data
resources/organization
data/rules
control-flow
de jure models
resources/organization
data/rules
control-flow
de facto models
provenance
expl
ore
pred
ict
reco
mm
end
dete
ct
chec
k
com
pare
prom
ote
disc
over
enha
nce
diag
nose
cartographynavigation auditing
event logs
models
“pre mortem”
“post mortem”
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 4 / 26
![Page 5: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/5.jpg)
Detecting DeviationsAuditing: find deviations between observed and expected behaviors.Auditing
• Detect. Compares de jure models with current “pre mortem” data. The moment a predefined rule is violated, an alert is generated (online).
• Check. The goal of this activity is to pinpoint deviations and quantify the level of compliance (offline).
• Compare. De facto models can be compared with de jure models to see in what way reality deviates from what was planned or expected.
• Promote. Promote parts of the de facto model to a new de jure model.
PAGE 8
current data
historic data
resources/organization
data/rules
control-flow
de jure models
resources/organization
data/rules
control-flow
de facto models
dete
ct
chec
k
com
pare
prom
ote
auditing
event logs
models
“pre mortem”
“post mortem”
Our setting:
ModelDeclarative business constraints.
• E.g., Declare.
Monitoring• Online, evolving observations.• Prompt deviation detection.
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 5 / 26
![Page 6: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/6.jpg)
Detecting DeviationsAuditing: find deviations between observed and expected behaviors.Auditing
• Detect. Compares de jure models with current “pre mortem” data. The moment a predefined rule is violated, an alert is generated (online).
• Check. The goal of this activity is to pinpoint deviations and quantify the level of compliance (offline).
• Compare. De facto models can be compared with de jure models to see in what way reality deviates from what was planned or expected.
• Promote. Promote parts of the de facto model to a new de jure model.
PAGE 8
current data
historic data
resources/organization
data/rules
control-flow
de jure models
resources/organization
data/rules
control-flow
de facto models
dete
ct
chec
k
com
pare
prom
ote
auditing
event logs
models
“pre mortem”
“post mortem” Our setting:
ModelDeclarative business constraints.
• E.g., Declare.
Monitoring• Online, evolving observations.• Prompt deviation detection.
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 5 / 26
![Page 7: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/7.jpg)
On Promptness
Flight routes (thanks Claudio!)• When the airplane takes off, it must eventually reach the destination airport.• When the airplane is re-routed, it cannot reach the destination airport anymore.• If a dangerous situation is detected at the destination, airplane must be re-routed.
take-off reach re-route danger
QuestionConsider trace:
take-off danger
Is there any deviation?
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 6 / 26
![Page 8: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/8.jpg)
Boring Answer: Apparently Not
Reactive Monitor• Checks the partial traceobserved so far.
• Suspends the judgment if noconclusive answer can be given.
take-off reach re-route danger
take-off danger
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 7 / 26
![Page 9: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/9.jpg)
Boring Answer: Apparently Not
Reactive Monitor• Checks the partial traceobserved so far.
• Suspends the judgment if noconclusive answer can be given.
take-off reach re-route danger
take-off danger
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 7 / 26
![Page 10: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/10.jpg)
Prophetic Answer: YESProactive Monitor
• Checks the partial trace observed so far.• Looks into the future(s).
Ciao
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 4 / 4
take-off reach re-route danger
take-off danger
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 8 / 26
![Page 11: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/11.jpg)
Prophetic Answer: YESProactive Monitor
• Checks the partial trace observed so far.• Looks into the future(s).
Ciao
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 4 / 4
take-off reach re-route danger
take-off danger
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 8 / 26
![Page 12: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/12.jpg)
Prophetic Answer: YESProactive Monitor
• Checks the partial trace observed so far.• Looks into the future(s).
Ciao
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 4 / 4
take-off reach re-route danger
take-off danger
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 8 / 26
![Page 13: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/13.jpg)
Prophetic Answer: YESProactive Monitor
• Checks the partial trace observed so far.• Looks into the future(s).
Ciao
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 4 / 4
2(take-off → 3reach) ∧ ¬(3(reach) ∧ 3(re-route)) ∧ 2(danger → 3re-route)
take-off danger
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 8 / 26
![Page 14: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/14.jpg)
Logics on Finite Traces
GoalReasoning on finite partial traces and their finite suffixes.
Typical Solution: ltlf
Adopt LTL on finite traces and corresponding techniques based onFinite-State Automata.a
aNot Büchi automata!
Huge difference, often neglected, between LTL on finite and infinite traces!See [AAAI2014]
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 9 / 26
![Page 15: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/15.jpg)
Logics on Finite Traces
GoalReasoning on finite partial traces and their finite suffixes.
Typical Solution: ltlf
Adopt LTL on finite traces and corresponding techniques based onFinite-State Automata.a
aNot Büchi automata!
Huge difference, often neglected, between LTL on finite and infinite traces!See [AAAI2014]
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 9 / 26
![Page 16: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/16.jpg)
Problem #1: Monitoring
Proactive monitoring requires to refine the standard ltlf semantics.
RV-LTLGiven an LTL formula ϕ:
• [ϕ]RV = true ; OK;• [ϕ]RV = false ; BAD;• [ϕ]RV = temp_true ; OK now, could become BAD in the future;• [ϕ]RV = temp_false ; BAD now, could become OK in the future.
However. . .• Typically studied on infinite traces: detour to Büchi automata.• Only ad-hoc techniques on finite traces [BPM2011].
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 10 / 26
![Page 17: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/17.jpg)
Problem #1: Monitoring
Proactive monitoring requires to refine the standard ltlf semantics.
RV-LTLGiven an LTL formula ϕ:
• [ϕ]RV = true ; OK;• [ϕ]RV = false ; BAD;• [ϕ]RV = temp_true ; OK now, could become BAD in the future;• [ϕ]RV = temp_false ; BAD now, could become OK in the future.
However. . .• Typically studied on infinite traces: detour to Büchi automata.• Only ad-hoc techniques on finite traces [BPM2011].
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 10 / 26
![Page 18: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/18.jpg)
Problem #2: Contextual Business Constraints
Need for monitoring constraints only when specific circumstances hold.• Compensation constraints.• Contrary-do-duty expectations.• . . .
However. . .• Cannot be systematically captured at the level of constraintspecification.
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 11 / 26
![Page 19: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/19.jpg)
Problem #2: Contextual Business Constraints
Need for monitoring constraints only when specific circumstances hold.• Compensation constraints.• Contrary-do-duty expectations.• . . .
However. . .• Cannot be systematically captured at the level of constraintspecification.
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 11 / 26
![Page 20: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/20.jpg)
Suitability of the Constraint Specification Language
ldlfLinear Dynamic
Logic overfinite traces
ltlfFOL overfinite traces
Star-freeregular
expressions
pspacecomplexity
Nondet.finite-stateautomata(nfa)
• ltlf : declarative, but lacking expressiveness.• Regular expressions: rich formalism, but low-level.
(t)ake-off (r)each ((r|other)∗(t(t|other)∗r)(r|other)∗)∗
• ldlf : combines the best of the two!
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 12 / 26
![Page 21: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/21.jpg)
Suitability of the Constraint Specification Language
ldlfLinear Dynamic
Logic overfinite traces
ltlf
MSOL overfinite traces
FOL overfinite traces
Regularexpressions
Star-freeregular
expressions
pspacecomplexity
Nondet.finite-stateautomata(nfa)
• ltlf : declarative, but lacking expressiveness.• Regular expressions: rich formalism, but low-level.
(t)ake-off (r)each ((r|other)∗(t(t|other)∗r)(r|other)∗)∗
• ldlf : combines the best of the two!
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 12 / 26
![Page 22: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/22.jpg)
Suitability of the Constraint Specification Language
ldlfLinear Dynamic
Logic overfinite traces
ltlf
MSOL overfinite traces
FOL overfinite traces
Regularexpressions
Star-freeregular
expressions
pspacecomplexity
Nondet.finite-stateautomata(nfa)
• ltlf : declarative, but lacking expressiveness.• Regular expressions: rich formalism, but low-level.
(t)ake-off (r)each ((r|other)∗(t(t|other)∗r)(r|other)∗)∗
• ldlf : combines the best of the two!
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 12 / 26
![Page 23: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/23.jpg)
Suitability of the Constraint Specification Language
ldlfLinear Dynamic
Logic overfinite traces
ltlf
MSOL overfinite traces
FOL overfinite traces
Regularexpressions
Star-freeregular
expressions
pspacecomplexity
Nondet.finite-stateautomata(nfa)
• ltlf : declarative, but lacking expressiveness.• Regular expressions: rich formalism, but low-level.
(t)ake-off (r)each ((r|other)∗(t(t|other)∗r)(r|other)∗)∗
• ldlf : combines the best of the two!Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 12 / 26
![Page 24: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/24.jpg)
The Logic ldlf [De Giacomo&Vardi,IJCAI13]Merges ltlf with regular expressions, through the syntax of PropositionalDynamic Logic (PDL):
ϕ ::= φ | tt | ff | ¬ϕ | ϕ1 ∧ ϕ2 | 〈ρ〉ϕ | [ρ]ϕρ ::= φ | ϕ? | ρ1 + ρ2 | ρ1; ρ2 | ρ∗
ϕ: ltlf part; ρ: regular expression part.They mutually refer to each other:
• 〈ρ〉ϕ states that, from the current step in the trace, there is anexecution satisfying ρ such that its last step satisfies ϕ.
• [ρ]ϕ states that, from the current step in the trace, all executionsatisfying ρ are such that their last step satisfies ϕ.
• ϕ? checks whether ϕ is true in the current step and, if so, continuesto evaluate the remaining execution.
Of special interest is end = [true?]ff , to check whether the trace has beencompleted (the remaining trace is the empty one).
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 13 / 26
![Page 25: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/25.jpg)
Runtime ldlf MonitorsCheck partial trace π = e1, . . . , en against formula ϕ.
From ad-hoc techniques . . .
e1 . . . en |=[ϕ
]RV =
temp_truetemp_falsetruefalse
. . . To standard techniques
e1 . . . en |=
ϕtemp_trueϕtemp_falseϕtrueϕfalse
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 14 / 26
![Page 26: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/26.jpg)
Runtime ldlf MonitorsCheck partial trace π = e1, . . . , en against formula ϕ.
From ad-hoc techniques . . .
e1 . . . en |=[ϕ
]RV =
temp_truetemp_falsetruefalse
. . . To standard techniques
e1 . . . en |=
ϕtemp_trueϕtemp_falseϕtrueϕfalse
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 14 / 26
![Page 27: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/27.jpg)
How is This Magic Possible?
Starting point: ldlf formula ϕ and its RV semantics.
1. Good and bad prefixes• Lposs_good(ϕ) = {π | ∃π′.ππ′ ∈ L(ϕ)}• Lnec_good(ϕ) = {π | ∀π′.ππ′ ∈ L(ϕ)}• Lnec_bad(ϕ) = Lnec_good(¬ϕ) = {π | ∀π′.ππ′ 6∈ L(ϕ)}
2. RV-LTL values as prefixes• π |= [ϕ]RV = true iff π ∈ Lnec_good(ϕ);• π |= [ϕ]RV = false iff π ∈ Lnec_bad(ϕ);• π |= [ϕ]RV = temp_true iff π ∈ L(ϕ) \ Lnec_good(ϕ);• π |= [ϕ]RV = temp_false iff π ∈ L(¬ϕ) \ Lnec_bad(ϕ).
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 15 / 26
![Page 28: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/28.jpg)
How is This Magic Possible?
Starting point: ldlf formula ϕ and its RV semantics.
1. Good and bad prefixes• Lposs_good(ϕ) = {π | ∃π′.ππ′ ∈ L(ϕ)}• Lnec_good(ϕ) = {π | ∀π′.ππ′ ∈ L(ϕ)}• Lnec_bad(ϕ) = Lnec_good(¬ϕ) = {π | ∀π′.ππ′ 6∈ L(ϕ)}
2. RV-LTL values as prefixes• π |= [ϕ]RV = true iff π ∈ Lnec_good(ϕ);• π |= [ϕ]RV = false iff π ∈ Lnec_bad(ϕ);• π |= [ϕ]RV = temp_true iff π ∈ L(ϕ) \ Lnec_good(ϕ);• π |= [ϕ]RV = temp_false iff π ∈ L(¬ϕ) \ Lnec_bad(ϕ).
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 15 / 26
![Page 29: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/29.jpg)
How is This Magic Possible?
Starting point: ldlf formula ϕ and its RV semantics.
1. Good and bad prefixes• Lposs_good(ϕ) = {π | ∃π′.ππ′ ∈ L(ϕ)}• Lnec_good(ϕ) = {π | ∀π′.ππ′ ∈ L(ϕ)}• Lnec_bad(ϕ) = Lnec_good(¬ϕ) = {π | ∀π′.ππ′ 6∈ L(ϕ)}
2. RV-LTL values as prefixes• π |= [ϕ]RV = true iff π ∈ Lnec_good(ϕ);• π |= [ϕ]RV = false iff π ∈ Lnec_bad(ϕ);• π |= [ϕ]RV = temp_true iff π ∈ L(ϕ) \ Lnec_good(ϕ);• π |= [ϕ]RV = temp_false iff π ∈ L(¬ϕ) \ Lnec_bad(ϕ).
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 15 / 26
![Page 30: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/30.jpg)
How is This Black Magic Possible?3. Prefixes as regular expressionsEvery nfa can be expressed as a regular expression.; We can build regular expression prefϕ s.t. L(prefϕ) = Lposs_good(ϕ).
4. Regular expressions can be immersed into ldlf
Hence: π ∈ Lposs_good(ϕ) iff π |= 〈prefϕ〉endπ ∈ Lnec_good(ϕ) iff π |= 〈prefϕ〉end ∧ ¬〈pref¬ϕ〉end
5. RV-LTL can be immersed into ldlf !• π |= [ϕ]RV = true iff 〈prefϕ〉end ∧ ¬〈pref¬ϕ〉end;• π |= [ϕ]RV = false iff 〈pref¬ϕ〉end ∧ ¬〈prefϕ〉end;• π |= [ϕ]RV = temp_true iff π |= ϕ ∧ 〈pref¬ϕ〉end;• π |= [ϕ]RV = temp_false iff π |= ¬ϕ ∧ 〈prefϕ〉end.
Ending point: 4 ldlf monitor formulae under standard semantics.
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 16 / 26
![Page 31: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/31.jpg)
How is This Black Magic Possible?3. Prefixes as regular expressionsEvery nfa can be expressed as a regular expression.; We can build regular expression prefϕ s.t. L(prefϕ) = Lposs_good(ϕ).
4. Regular expressions can be immersed into ldlf
Hence: π ∈ Lposs_good(ϕ) iff π |= 〈prefϕ〉endπ ∈ Lnec_good(ϕ) iff π |= 〈prefϕ〉end ∧ ¬〈pref¬ϕ〉end
5. RV-LTL can be immersed into ldlf !• π |= [ϕ]RV = true iff 〈prefϕ〉end ∧ ¬〈pref¬ϕ〉end;• π |= [ϕ]RV = false iff 〈pref¬ϕ〉end ∧ ¬〈prefϕ〉end;• π |= [ϕ]RV = temp_true iff π |= ϕ ∧ 〈pref¬ϕ〉end;• π |= [ϕ]RV = temp_false iff π |= ¬ϕ ∧ 〈prefϕ〉end.
Ending point: 4 ldlf monitor formulae under standard semantics.
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 16 / 26
![Page 32: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/32.jpg)
How is This Black Magic Possible?3. Prefixes as regular expressionsEvery nfa can be expressed as a regular expression.; We can build regular expression prefϕ s.t. L(prefϕ) = Lposs_good(ϕ).
4. Regular expressions can be immersed into ldlf
Hence: π ∈ Lposs_good(ϕ) iff π |= 〈prefϕ〉endπ ∈ Lnec_good(ϕ) iff π |= 〈prefϕ〉end ∧ ¬〈pref¬ϕ〉end
5. RV-LTL can be immersed into ldlf !• π |= [ϕ]RV = true iff 〈prefϕ〉end ∧ ¬〈pref¬ϕ〉end;• π |= [ϕ]RV = false iff 〈pref¬ϕ〉end ∧ ¬〈prefϕ〉end;• π |= [ϕ]RV = temp_true iff π |= ϕ ∧ 〈pref¬ϕ〉end;• π |= [ϕ]RV = temp_false iff π |= ¬ϕ ∧ 〈prefϕ〉end.
Ending point: 4 ldlf monitor formulae under standard semantics.Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 16 / 26
![Page 33: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/33.jpg)
Monitoring declare with ldlfStep 1. Good prefixes of declare patterns.
name notation pref possible RV states
exis
tenc
e
Existence1..∗
a (a + o)∗ temp_false, true
Absence 20..1
a o∗ + (o∗; a; o∗) temp_true, false
choi
ce Choice a −− ♦−− b (a + b + o)∗ temp_false, true
Exclusive Choice a −− �−− b (a + o)∗ + (b + o)∗ temp_false, temp_true, false
rela
tion
Resp. existence a •−−−− b (a + b + o)∗ temp_true, temp_false, true
Response a •−−−I b (a + b + o)∗ temp_true, temp_false
Precedence a −−−I• b o∗; (a; (a + b + o)∗)∗ temp_true, true, false
nega
tion Not Coexistence a •−−−•‖ b (a + o)∗ + (b + o)∗ temp_true, false
Neg. Succession a •−−I•‖ b (b + o)∗; (a + o)∗ temp_true, false
Step 2. Generate ldlf monitors.• Local monitors: 1 formula for possible RV constraint state.• Global monitors: 4 RV formulae for the conjunction of all constraints.
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 17 / 26
![Page 34: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/34.jpg)
Monitoring declare with ldlfStep 1. Good prefixes of declare patterns.
name notation pref possible RV states
exis
tenc
e
Existence1..∗
a (a + o)∗ temp_false, true
Absence 20..1
a o∗ + (o∗; a; o∗) temp_true, false
choi
ce Choice a −− ♦−− b (a + b + o)∗ temp_false, true
Exclusive Choice a −− �−− b (a + o)∗ + (b + o)∗ temp_false, temp_true, false
rela
tion
Resp. existence a •−−−− b (a + b + o)∗ temp_true, temp_false, true
Response a •−−−I b (a + b + o)∗ temp_true, temp_false
Precedence a −−−I• b o∗; (a; (a + b + o)∗)∗ temp_true, true, false
nega
tion Not Coexistence a •−−−•‖ b (a + o)∗ + (b + o)∗ temp_true, false
Neg. Succession a •−−I•‖ b (b + o)∗; (a + o)∗ temp_true, false
Step 2. Generate ldlf monitors.• Local monitors: 1 formula for possible RV constraint state.• Global monitors: 4 RV formulae for the conjunction of all constraints.
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 17 / 26
![Page 35: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/35.jpg)
One Step Beyond: Metaconstraintsldlf monitors are simply ldlf formulae.They can be combined into more complex ldlf formulae!
• E.g., expressing conditional/contextual monitoring.
Business metaconstraintAn ldlf formula of the form Φpre→Ψexp
• Φpre combines membership assertions of business constraints to theirRV truth values.
• Ψexp combines business constraints to be checked when Φpre holds.
ldlf metaconstraint monitors• Φpre→Ψexp is a standard ldlf formula.• Hence, just reapply our technique and get the 4 ldlf monitors.
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 18 / 26
![Page 36: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/36.jpg)
Compensation Constraints
• An order cannot be canceled anymore if it is closed.
ϕcanc = close order •−−I•‖ cancel order
• If this happens, then the customer has to pay a supplement:
ϕdopay =1..∗
pay supplement
• Formally: {[ϕcanc]RV = false}→ ϕdopay
• In ldlf : (〈pref¬ϕcanc〉end ∧ ¬〈prefϕcanc〉end)→ ϕdopay
ObservationWhen the violation occurs, the compensation is monitored from thebeginning of the trace: OK to “compensate in advance”.
• Trace close order→ pay supplement→ cancel order is OK.
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 19 / 26
![Page 37: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/37.jpg)
Compensation Constraints
• An order cannot be canceled anymore if it is closed.
ϕcanc = close order •−−I•‖ cancel order
• If this happens, then the customer has to pay a supplement:
ϕdopay =1..∗
pay supplement
• Formally: {[ϕcanc]RV = false}→ ϕdopay
• In ldlf : (〈pref¬ϕcanc〉end ∧ ¬〈prefϕcanc〉end)→ ϕdopay
ObservationWhen the violation occurs, the compensation is monitored from thebeginning of the trace: OK to “compensate in advance”.
• Trace close order→ pay supplement→ cancel order is OK.
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 19 / 26
![Page 38: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/38.jpg)
Metaconstraints Revisited
Business metaconstraint with temporal consequence1. Take Φpre and Ψexp as before.2. Compute ρ: regular expression denoting those paths that satisfy Φpre
3. Make ρ part of the compensation:
Φpre→ [ρ] Ψexp
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 20 / 26
![Page 39: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/39.jpg)
Metaconstraints Revisited
Business metaconstraint with temporal consequence1. Take Φpre and Ψexp as before.2. Compute ρ: regular expression denoting those paths that satisfy Φpre
3. Make ρ part of the compensation:
Φpre→ [ρ] Ψexp
Ψexp has now to be enforced after Φpre becomes true.
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 20 / 26
![Page 40: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/40.jpg)
Compensation Revisited
• An order cannot be canceled anymore if it is closed.
ϕcanc = close order •−−I•‖ cancel order
• After this happens, then the customer has to pay a supplement:
ϕdopay =1..∗
pay supplement
• Formally:
{[ϕcanc]RV = false}→ [re{[ϕcanc]RV =false}] ϕdopay
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 21 / 26
![Page 41: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/41.jpg)
Compensation Revisited
• An order cannot be canceled anymore if it is closed.
ϕcanc = close order •−−I•‖ cancel order
• After this happens, then the customer has to pay a supplement:
ϕdopay =1..∗
pay supplement
• Formally:
{[ϕcanc]RV = false}→ [re{[ϕcanc]RV =false}] ϕdopay
All traces violating ϕcanc
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 21 / 26
![Page 42: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/42.jpg)
From ldlf to nfaDirect calculation of nfa corresponding to ldlf formula ϕ
Algorithm1: algorithm ldlf 2nfa()2: input ltlf formula ϕ3: output nfa Aϕ = (2P ,S, {s0}, %, {sf })4: s0 ← {"ϕ"} . single initial state5: sf ← ∅ . single final state6: S ← {s0, sf }, %← ∅7: while (S or % change) do8: if (q ∈ S and q′ |=
∧("ψ"∈q) δ("ψ",Θ))
9: S ← S ∪ {q′} . update set of states10: %← % ∪ {(q,Θ, q′)} . update transition relation
Note• Standard nfa.• No detour to Büchi automata.• Easy to code.• Implemented!
Auxiliary rules
δ("tt",Π) = trueδ("ff ",Π) = false
δ("φ",Π) ={
true if Π |= φfalse if Π 6|= φ
(φ propositional)
δ("ϕ1 ∧ ϕ2",Π) = δ("ϕ1",Π) ∧ δ("ϕ2",Π)δ("ϕ1 ∨ ϕ2",Π) = δ("ϕ1",Π) ∨ δ("ϕ2",Π)
δ("〈φ〉ϕ",Π) =
"ϕ" if last 6∈ Π and Π |= φ (φ propositional)δ("ϕ", ε) if last ∈ Π and Π |= φfalse if Π 6|= φ
δ("〈ψ?〉ϕ",Π) = δ("ψ",Π) ∧ δ("ϕ",Π)δ("〈ρ1 + ρ2〉ϕ",Π) = δ("〈ρ1〉ϕ",Π) ∨ δ("〈ρ2〉ϕ",Π)δ("〈ρ1; ρ2〉ϕ",Π) = δ("〈ρ1〉〈ρ2〉ϕ",Π)
δ("〈ρ∗〉ϕ",Π) ={δ("ϕ",Π) if ρ is test-onlyδ("ϕ",Π) ∨ δ("〈ρ〉〈ρ∗〉ϕ",Π) o/w
δ("[φ]ϕ",Π) =
"ϕ" if last 6∈ Π and Π |= φ (φ propositional)δ("ϕ", ε) if last ∈ Π and Π |= φ (φ propositional)true if Π 6|= φ
δ("[ψ?]ϕ",Π) = δ("nnf (¬ψ)",Π) ∨ δ("ϕ",Π)δ("[ρ1 + ρ2]ϕ",Π) = δ("[ρ1]ϕ",Π) ∧ δ("[ρ2]ϕ",Π)δ("[ρ1; ρ2]ϕ",Π) = δ("[ρ1][ρ2]ϕ",Π)
δ("[ρ∗]ϕ",Π) ={δ("ϕ",Π) if ρ is test-onlyδ("ϕ",Π) ∧ δ("[ρ][ρ∗]ϕ",Π) o/w
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 22 / 26
![Page 43: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/43.jpg)
Implemented in ProM!
Approach1. Input ltlf /ldlf constraints and metaconstraints.2. Produce the corresponding RV ldlf monitoring formulae.3. Apply the direct algorithm and get the corresponding nfas.4. (Incrementally) run nfas the monitored trace.
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 23 / 26
![Page 44: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/44.jpg)
Connection with Colored AutomataColored Automata [BPM2011]Ad-hoc technique for monitoring ltlf formulae according to RV-LTL.
1. Color states of each local automaton accordingto the 4 RV-LTL truth values.
2. Combine colored automata into a globalcolored automaton.
000(N)(P)(R)
001(N)(P)r
M
010(N)(R)
C
202(N)(P)R
E
320(N)P(R)
S
011(N)r
C
E
321(N)Pr
S
M
212(N)R
E
310(N)(R)
S
E
311(N)r
S
112R
122PR
S
C
S
EM
E
E
M E
Why is step 1 correct?1. Take the ltlf formula ϕ of a constraint.2. Produce the 4 corresponding ldlf monitoring formulae.3. Generate the 4 corresponding nfas.4. Determinize them ; they are identical but with 6= acceptance states!5. Hence they can be combined into a unique colored local dfa.
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 24 / 26
![Page 45: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/45.jpg)
Conclusion
• Focus on finite traces.• Avoid unneeded detour to infinite traces.• ldlf : essentially, the maximal expressive logic for finite traces withgood computational properties (≡ MSO).
• Monitoring is a key problem.• ldlf goes far beyond declare.• ldlf captures monitors directly as formulae.
I Clean.I Meta-constraints.
• Implemented in ProM!
Future work: declarative, data-aware processes.
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 25 / 26
![Page 46: MonitoringBusinessMetaconstraints BasedonLTL ... fileMonitoringBusinessMetaconstraints BasedonLTL&LDLforFiniteTraces MarcoMontali KRDB Research Centre for Knowledge and Data Free University](https://reader031.vdocuments.net/reader031/viewer/2022041219/5e0818dd699cdf28af759a91/html5/thumbnails/46.jpg)
Marco Montali (unibz) Monitoring Business Metaconstraints BPM 2014 26 / 26