SlideShare a Scribd company logo
1 of 45
Download to read offline
K. Kie, S. Hallé
Kun Xie and Sylvain Hallé
Université du Québec à Chicoutimi
CANADA
Offline Monitoring of LTL
with Bit Vectors
CRSNG
NSERC
ACM Symposium on Applied Computing, March 24th, 2021
K. Kie, S. Hallé
What is runtime monitoring?
K. Kie, S. Hallé
What is runtime monitoring?
System
K. Kie, S. Hallé
What is runtime monitoring?
System
K. Kie, S. Hallé
What is runtime monitoring?
System
Instrumentation
K. Kie, S. Hallé
What is runtime monitoring?
System
Instrumentation
K. Kie, S. Hallé
What is runtime monitoring?
System
Instrumentation
Trace
K. Kie, S. Hallé
What is runtime monitoring?
System
Instrumentation
Trace
Events
K. Kie, S. Hallé
What is runtime monitoring?
System
Instrumentation
Trace
Events
K. Kie, S. Hallé
What is runtime monitoring?
System
Instrumentation
Trace
Events
Monitoring
K. Kie, S. Hallé
What is runtime monitoring?
Runtime monitoring is the process of observing an
actual run of a system and checking constraints on
its execution
Monitor
Verifies that
sequence of
events follows
specification
System
Event
Event
. . .
}
The execution of
the system
produces events
Specification
Gives conditions on
events and
sequences of events
allowed to happen
K. Kie, S. Hallé
p
p
now
p
p
now
q
G p
F p
X p
p U q
now
now
Semantics of LTL operators
"Globally"
"Eventually"
"Next"
"Until"
K. Kie, S. Hallé
Semantics of LTL operators
A call to next must be followed by a call
to hasNext
No CartCreate request can occur
before a LoginResponse message
A received order must eventually
be shipped
Three successive login attempts should
trigger an alarm
G (next → X hasNext)
¬ CartCreate U hasNext
G (receive → F ship)
G ¬(fail ∧ (X (fail ∧ X fail)))
K. Kie, S. Hallé
M
Classical LTL monitoring
K. Kie, S. Hallé
M
Classical LTL monitoring
K. Kie, S. Hallé
M
Classical LTL monitoring
A
e
K. Kie, S. Hallé
M
Classical LTL monitoring
A
e
S
s
X
K. Kie, S. Hallé
M
Classical LTL monitoring
A
e
S
s
X
s
’
s
’
K. Kie, S. Hallé
M
Classical LTL monitoring
A
e
S
s
X
s
’
s
’
K. Kie, S. Hallé
M
Classical LTL monitoring
A
e
S
s
X
s
’
s
’
2
1
3
4
5
The trace must be read linearly
K. Kie, S. Hallé
Each event is encoded by a set of Boolean
variables; each variable can be either true or false
in each event.
Event sequences as bit vectors
We create one bit vector vx for each Boolean
variable x, with the property that vx[i] = 1 if and
only if x is true in event i.
101001...
va =
001100...
vb =
.
.
.
K. Kie, S. Hallé
Bit vectors for LTL formulas are built by combining
and manipulating bit vectors of simpler formulas.
Bit vector manipulations
101001...
va =
001100...
vb =
va∨b = va ⊕ vb
⊕
=
101101...
va∨b = Boolean
operators
are direct!
Example:
K. Kie, S. Hallé
For a formula φ, vφ[i] = 1 if and only if the
sequence starting at position i satisfies φ.
Intuition
How to deal with temporal operators?
K. Kie, S. Hallé
Bitmap manipulations for LTL operators
K. Kie, S. Hallé
Bitmap manipulations for LTL operators
φ
X φ
K. Kie, S. Hallé
Bitmap manipulations for LTL operators
φ
X φ
START
END
K. Kie, S. Hallé
Bitmap manipulations for LTL operators
φ
X φ
START
END
START
K. Kie, S. Hallé
Bitmap manipulations for LTL operators
φ
X φ
START
END
START
END
0
K. Kie, S. Hallé
Bitmap manipulations for LTL operators
φ
X φ
START
END
START
END
0
φ
F φ
K. Kie, S. Hallé
Bitmap manipulations for LTL operators
φ
X φ
START
END
START
END
0
φ
F φ
1 0
1
START
END
START
K. Kie, S. Hallé
Bitmap manipulations for LTL operators
φ
X φ
START
END
START
END
0
φ
F φ
1 0
1
START
END
START
0
END
K. Kie, S. Hallé
Bitmap manipulations for LTL operators
φ
X φ
START
END
START
END
0
φ
F φ
1 0
1
START
END
START
0
END
φ
G φ
START
END
START
END
K. Kie, S. Hallé
Bitmap manipulations for LTL operators
φ
X φ
START
END
START
END
0
φ
F φ
1 0
1
START
END
START
0
END
φ
G φ
START
END
START
END
0 1
0 1
K. Kie, S. Hallé
Bitmap manipulations for LTL operators
φ
X φ
START
END
START
END
0
φ
F φ
1 0
1
START
END
START
0
END
φ
G φ
START
END
START
END
0 1
0 1
φ
φ U ψ
ψ
K. Kie, S. Hallé
Bitmap manipulations for LTL operators
φ
X φ
START
END
START
END
0
φ
F φ
1 0
1
START
END
START
0
END
φ
G φ
START
END
START
END
0 1
0 1
φ
φ U ψ
ψ
1
1
K. Kie, S. Hallé
Bitmap manipulations for LTL operators
φ
X φ
START
END
START
END
0
φ
F φ
1 0
1
START
END
START
0
END
φ
G φ
START
END
START
END
0 1
0 1
φ
φ U ψ
ψ
1
1
1
K. Kie, S. Hallé
Experimental evaluation
Goal: compare processing speed and memory
consumption between LTL bitmap evaluation and a
baseline
Sample of 50+ LTL formulas
Between 2 and 20 operators
Nesting depth between 2 and 11
Evaluated on traces of 1M events
Reference:
Event stream processing library
Front-end accepting LTL formulas (Polyglot)
Hallé & Khoury, RV 2018
10.1007/978-3-030-03769-7_27
K. Kie, S. Hallé
LTL in BeepBeep
f
→
=?
a
1
2
f
∧
=?
b
1
2
¬
X
f
=?
c
1
U
f
=?
d
1
a → (¬ (b ∧ X c) U d)
S. Hallé. (2018). Event Stream Processing with BeepBeep 3, chapter 5.
ISBN 978-2-7605-5102-2
K. Kie, S. Hallé
1.6x106
1.8x106
2x106
2.2x106
2.4x106
2.6x106
2.8x106
3x106
3.2x106
3.4x106
3.6x106
0 5 10 15 20 25
Throughput
(Hz)
Formula size
0
500000
1x106
1.5x106
2x106
2.5x106
3x106
0 5 10 15 20 25
Throughput
(Hz)
Formula size
Raw bit vectors BeepBeep 3
Throughput comparison
K. Kie, S. Hallé
1.6x106
1.8x106
2x106
2.2x106
2.4x106
2.6x106
2.8x106
3x106
3.2x106
3.4x106
3.6x106
0 5 10 15 20 25
Throughput
(Hz)
Formula size
0
500000
1x106
1.5x106
2x106
2.5x106
3x106
0 5 10 15 20 25
Throughput
(Hz)
Formula size
Raw bit vectors BeepBeep 3
Throughput comparison
K. Kie, S. Hallé
0 5 10 15 20 25
Throughput
(Hz)
Formula size
0
500000
1x106
1.5x106
2x106
2.5x106
3x106
0 5 10 15 20 25
Throughput
(Hz)
Formula size
Raw bit vectors BeepBeep 3
500000
1x106
1.5x106
2x106
2.5x106
3x106
Throughput comparison
K. Kie, S. Hallé
Formula S01 Formula S02
Memory consumption
0
200000
400000
600000
800000
1x106
1.2x106
1.4x106
1.6x106
1.8x106
200000 300000 400000 500000 600000 700000 800000 900000 1x106
Memory
(B)
Trace length
EWAH64
Roaring
Concise
Raw
BeepBeep
EWAH32
WAH
0
2x106
4x106
6x106
8x106
1x107
1.2x107
1.4x107
1.6x107
1.8x107
2x107
2.2x107
200000 300000 400000 500000 600000 700000 800000 900000 1x106
Memory
(B)
Trace length
EWAH64
Roaring
Concise
Raw
BeepBeep
EWAH32
WAH
K. Kie, S. Hallé
Formula S01 Formula S02
Memory consumption
0
200000
400000
600000
800000
1x106
1.2x106
1.4x106
1.6x106
1.8x106
200000 300000 400000 500000 600000 700000 800000 900000 1x106
Memory
(B)
Trace length
EWAH64
Roaring
Concise
Raw
BeepBeep
EWAH32
WAH
0
2x106
4x106
6x106
8x106
1x107
1.2x107
1.4x107
1.6x107
1.8x107
2x107
2.2x107
200000 300000 400000 500000 600000 700000 800000 900000 1x106
Memory
(B)
Trace length
EWAH64
Roaring
Concise
Raw
BeepBeep
EWAH32
WAH
(¬(X (X ((G f) ∧ (X ((!a) ∨ d)))))) → ((X i) ∧ (X (i → e)))
K. Kie, S. Hallé
Formula S01 Formula S02
Memory consumption
0
200000
400000
600000
800000
1x106
1.2x106
1.4x106
1.6x106
1.8x106
200000 300000 400000 500000 600000 700000 800000 900000 1x106
Memory
(B)
Trace length
EWAH64
Roaring
Concise
Raw
BeepBeep
EWAH32
WAH
0
2x106
4x106
6x106
8x106
1x107
1.2x107
1.4x107
1.6x107
1.8x107
2x107
2.2x107
200000 300000 400000 500000 600000 700000 800000 900000 1x106
Memory
(B)
Trace length
EWAH64
Roaring
Concise
Raw
BeepBeep
EWAH32
WAH
(¬(X (X ((G f) ∧ (X ((!a) ∨ d)))))) → ((X i) ∧ (X (i → e)))
((X (g → b)) ∧ ((¬g) → ((¬(X (X (G (F (b ∧ c)))))) → f)))
∨ (F ((G (F (X g))) → ((¬(c ∨ g)) → (e ∨ (G (¬a))))))
K. Kie, S. Hallé
Upsides:
Take-home points
Bit vector manipulations can be done on
multiple bits at a time (32 or 64): parallelism
"for free"
Leverages quasi-random access to vector
elements
Implementation incurs a speed-up over linear
BeepBeep of up to 10x
Future work:
Only works offline
How to deal with more expressive logics (e.g.
LTL-FO+)?

More Related Content

More from Sylvain Hallé

Monitoring Business Process Compliance Across Multiple Executions with Stream...
Monitoring Business Process Compliance Across Multiple Executions with Stream...Monitoring Business Process Compliance Across Multiple Executions with Stream...
Monitoring Business Process Compliance Across Multiple Executions with Stream...Sylvain Hallé
 
A Stream-Based Approach to Intrusion Detection
A Stream-Based Approach to Intrusion DetectionA Stream-Based Approach to Intrusion Detection
A Stream-Based Approach to Intrusion DetectionSylvain Hallé
 
Event Stream Processing with BeepBeep 3
Event Stream Processing with BeepBeep 3Event Stream Processing with BeepBeep 3
Event Stream Processing with BeepBeep 3Sylvain Hallé
 
Smart Contracts-Enabled Simulation for Hyperconnected Logistics
Smart Contracts-Enabled Simulation for Hyperconnected LogisticsSmart Contracts-Enabled Simulation for Hyperconnected Logistics
Smart Contracts-Enabled Simulation for Hyperconnected LogisticsSylvain Hallé
 
Test Suite Generation for Boolean Conditions with Equivalence Class Partitioning
Test Suite Generation for Boolean Conditions with Equivalence Class PartitioningTest Suite Generation for Boolean Conditions with Equivalence Class Partitioning
Test Suite Generation for Boolean Conditions with Equivalence Class PartitioningSylvain Hallé
 
Synthia: a Generic and Flexible Data Structure Generator (Long Version)
Synthia: a Generic and Flexible Data Structure Generator (Long Version)Synthia: a Generic and Flexible Data Structure Generator (Long Version)
Synthia: a Generic and Flexible Data Structure Generator (Long Version)Sylvain Hallé
 
A Generic Explainability Framework for Function Circuits
A Generic Explainability Framework for Function CircuitsA Generic Explainability Framework for Function Circuits
A Generic Explainability Framework for Function CircuitsSylvain Hallé
 
Detecting Responsive Web Design Bugs with Declarative Specifications
Detecting Responsive Web Design Bugs with Declarative SpecificationsDetecting Responsive Web Design Bugs with Declarative Specifications
Detecting Responsive Web Design Bugs with Declarative SpecificationsSylvain Hallé
 
Streamlining the Inclusion of Computer Experiments in Research Papers
Streamlining the Inclusion of Computer Experiments in Research PapersStreamlining the Inclusion of Computer Experiments in Research Papers
Streamlining the Inclusion of Computer Experiments in Research PapersSylvain Hallé
 
Writing Domain-Specific Languages for BeepBeep
Writing Domain-Specific Languages for BeepBeepWriting Domain-Specific Languages for BeepBeep
Writing Domain-Specific Languages for BeepBeepSylvain Hallé
 
Real-Time Data Mining for Event Streams
Real-Time Data Mining for Event StreamsReal-Time Data Mining for Event Streams
Real-Time Data Mining for Event StreamsSylvain Hallé
 
Technologies intelligentes d'aide au développement d'applications web (WAQ 2018)
Technologies intelligentes d'aide au développement d'applications web (WAQ 2018)Technologies intelligentes d'aide au développement d'applications web (WAQ 2018)
Technologies intelligentes d'aide au développement d'applications web (WAQ 2018)Sylvain Hallé
 
Mining event streams with BeepBeep 3
Mining event streams with BeepBeep 3Mining event streams with BeepBeep 3
Mining event streams with BeepBeep 3Sylvain Hallé
 
LabPal: Repeatable Computer Experiments Made Easy (ACM Workshop Talk)
LabPal: Repeatable Computer Experiments Made Easy (ACM Workshop Talk)LabPal: Repeatable Computer Experiments Made Easy (ACM Workshop Talk)
LabPal: Repeatable Computer Experiments Made Easy (ACM Workshop Talk)Sylvain Hallé
 
A "Do-It-Yourself" Specification Language with BeepBeep 3 (Talk @ Dagstuhl 2017)
A "Do-It-Yourself" Specification Language with BeepBeep 3 (Talk @ Dagstuhl 2017)A "Do-It-Yourself" Specification Language with BeepBeep 3 (Talk @ Dagstuhl 2017)
A "Do-It-Yourself" Specification Language with BeepBeep 3 (Talk @ Dagstuhl 2017)Sylvain Hallé
 
Event Stream Processing with Multiple Threads
Event Stream Processing with Multiple ThreadsEvent Stream Processing with Multiple Threads
Event Stream Processing with Multiple ThreadsSylvain Hallé
 
A Few Things We Heard About RV Tools (Position Paper)
A Few Things We Heard About RV Tools (Position Paper)A Few Things We Heard About RV Tools (Position Paper)
A Few Things We Heard About RV Tools (Position Paper)Sylvain Hallé
 
Solving Equations on Words with Morphisms and Antimorphisms
Solving Equations on Words with Morphisms and AntimorphismsSolving Equations on Words with Morphisms and Antimorphisms
Solving Equations on Words with Morphisms and AntimorphismsSylvain Hallé
 
Runtime monitoring de propriétés temporelles par (streaming) XML
Runtime monitoring de propriétés temporelles par (streaming) XMLRuntime monitoring de propriétés temporelles par (streaming) XML
Runtime monitoring de propriétés temporelles par (streaming) XMLSylvain Hallé
 
La quantification du premier ordre en logique temporelle
La quantification du premier ordre en logique temporelleLa quantification du premier ordre en logique temporelle
La quantification du premier ordre en logique temporelleSylvain Hallé
 

More from Sylvain Hallé (20)

Monitoring Business Process Compliance Across Multiple Executions with Stream...
Monitoring Business Process Compliance Across Multiple Executions with Stream...Monitoring Business Process Compliance Across Multiple Executions with Stream...
Monitoring Business Process Compliance Across Multiple Executions with Stream...
 
A Stream-Based Approach to Intrusion Detection
A Stream-Based Approach to Intrusion DetectionA Stream-Based Approach to Intrusion Detection
A Stream-Based Approach to Intrusion Detection
 
Event Stream Processing with BeepBeep 3
Event Stream Processing with BeepBeep 3Event Stream Processing with BeepBeep 3
Event Stream Processing with BeepBeep 3
 
Smart Contracts-Enabled Simulation for Hyperconnected Logistics
Smart Contracts-Enabled Simulation for Hyperconnected LogisticsSmart Contracts-Enabled Simulation for Hyperconnected Logistics
Smart Contracts-Enabled Simulation for Hyperconnected Logistics
 
Test Suite Generation for Boolean Conditions with Equivalence Class Partitioning
Test Suite Generation for Boolean Conditions with Equivalence Class PartitioningTest Suite Generation for Boolean Conditions with Equivalence Class Partitioning
Test Suite Generation for Boolean Conditions with Equivalence Class Partitioning
 
Synthia: a Generic and Flexible Data Structure Generator (Long Version)
Synthia: a Generic and Flexible Data Structure Generator (Long Version)Synthia: a Generic and Flexible Data Structure Generator (Long Version)
Synthia: a Generic and Flexible Data Structure Generator (Long Version)
 
A Generic Explainability Framework for Function Circuits
A Generic Explainability Framework for Function CircuitsA Generic Explainability Framework for Function Circuits
A Generic Explainability Framework for Function Circuits
 
Detecting Responsive Web Design Bugs with Declarative Specifications
Detecting Responsive Web Design Bugs with Declarative SpecificationsDetecting Responsive Web Design Bugs with Declarative Specifications
Detecting Responsive Web Design Bugs with Declarative Specifications
 
Streamlining the Inclusion of Computer Experiments in Research Papers
Streamlining the Inclusion of Computer Experiments in Research PapersStreamlining the Inclusion of Computer Experiments in Research Papers
Streamlining the Inclusion of Computer Experiments in Research Papers
 
Writing Domain-Specific Languages for BeepBeep
Writing Domain-Specific Languages for BeepBeepWriting Domain-Specific Languages for BeepBeep
Writing Domain-Specific Languages for BeepBeep
 
Real-Time Data Mining for Event Streams
Real-Time Data Mining for Event StreamsReal-Time Data Mining for Event Streams
Real-Time Data Mining for Event Streams
 
Technologies intelligentes d'aide au développement d'applications web (WAQ 2018)
Technologies intelligentes d'aide au développement d'applications web (WAQ 2018)Technologies intelligentes d'aide au développement d'applications web (WAQ 2018)
Technologies intelligentes d'aide au développement d'applications web (WAQ 2018)
 
Mining event streams with BeepBeep 3
Mining event streams with BeepBeep 3Mining event streams with BeepBeep 3
Mining event streams with BeepBeep 3
 
LabPal: Repeatable Computer Experiments Made Easy (ACM Workshop Talk)
LabPal: Repeatable Computer Experiments Made Easy (ACM Workshop Talk)LabPal: Repeatable Computer Experiments Made Easy (ACM Workshop Talk)
LabPal: Repeatable Computer Experiments Made Easy (ACM Workshop Talk)
 
A "Do-It-Yourself" Specification Language with BeepBeep 3 (Talk @ Dagstuhl 2017)
A "Do-It-Yourself" Specification Language with BeepBeep 3 (Talk @ Dagstuhl 2017)A "Do-It-Yourself" Specification Language with BeepBeep 3 (Talk @ Dagstuhl 2017)
A "Do-It-Yourself" Specification Language with BeepBeep 3 (Talk @ Dagstuhl 2017)
 
Event Stream Processing with Multiple Threads
Event Stream Processing with Multiple ThreadsEvent Stream Processing with Multiple Threads
Event Stream Processing with Multiple Threads
 
A Few Things We Heard About RV Tools (Position Paper)
A Few Things We Heard About RV Tools (Position Paper)A Few Things We Heard About RV Tools (Position Paper)
A Few Things We Heard About RV Tools (Position Paper)
 
Solving Equations on Words with Morphisms and Antimorphisms
Solving Equations on Words with Morphisms and AntimorphismsSolving Equations on Words with Morphisms and Antimorphisms
Solving Equations on Words with Morphisms and Antimorphisms
 
Runtime monitoring de propriétés temporelles par (streaming) XML
Runtime monitoring de propriétés temporelles par (streaming) XMLRuntime monitoring de propriétés temporelles par (streaming) XML
Runtime monitoring de propriétés temporelles par (streaming) XML
 
La quantification du premier ordre en logique temporelle
La quantification du premier ordre en logique temporelleLa quantification du premier ordre en logique temporelle
La quantification du premier ordre en logique temporelle
 

Recently uploaded

Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 

Recently uploaded (20)

Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 

Efficient Offline Monitoring of LTL with Bit Vectors (Talk at SAC 2021)

  • 1. K. Kie, S. Hallé Kun Xie and Sylvain Hallé Université du Québec à Chicoutimi CANADA Offline Monitoring of LTL with Bit Vectors CRSNG NSERC ACM Symposium on Applied Computing, March 24th, 2021
  • 2. K. Kie, S. Hallé What is runtime monitoring?
  • 3. K. Kie, S. Hallé What is runtime monitoring? System
  • 4. K. Kie, S. Hallé What is runtime monitoring? System
  • 5. K. Kie, S. Hallé What is runtime monitoring? System Instrumentation
  • 6. K. Kie, S. Hallé What is runtime monitoring? System Instrumentation
  • 7. K. Kie, S. Hallé What is runtime monitoring? System Instrumentation Trace
  • 8. K. Kie, S. Hallé What is runtime monitoring? System Instrumentation Trace Events
  • 9. K. Kie, S. Hallé What is runtime monitoring? System Instrumentation Trace Events
  • 10. K. Kie, S. Hallé What is runtime monitoring? System Instrumentation Trace Events Monitoring
  • 11. K. Kie, S. Hallé What is runtime monitoring? Runtime monitoring is the process of observing an actual run of a system and checking constraints on its execution Monitor Verifies that sequence of events follows specification System Event Event . . . } The execution of the system produces events Specification Gives conditions on events and sequences of events allowed to happen
  • 12. K. Kie, S. Hallé p p now p p now q G p F p X p p U q now now Semantics of LTL operators "Globally" "Eventually" "Next" "Until"
  • 13. K. Kie, S. Hallé Semantics of LTL operators A call to next must be followed by a call to hasNext No CartCreate request can occur before a LoginResponse message A received order must eventually be shipped Three successive login attempts should trigger an alarm G (next → X hasNext) ¬ CartCreate U hasNext G (receive → F ship) G ¬(fail ∧ (X (fail ∧ X fail)))
  • 14. K. Kie, S. Hallé M Classical LTL monitoring
  • 15. K. Kie, S. Hallé M Classical LTL monitoring
  • 16. K. Kie, S. Hallé M Classical LTL monitoring A e
  • 17. K. Kie, S. Hallé M Classical LTL monitoring A e S s X
  • 18. K. Kie, S. Hallé M Classical LTL monitoring A e S s X s ’ s ’
  • 19. K. Kie, S. Hallé M Classical LTL monitoring A e S s X s ’ s ’
  • 20. K. Kie, S. Hallé M Classical LTL monitoring A e S s X s ’ s ’ 2 1 3 4 5 The trace must be read linearly
  • 21. K. Kie, S. Hallé Each event is encoded by a set of Boolean variables; each variable can be either true or false in each event. Event sequences as bit vectors We create one bit vector vx for each Boolean variable x, with the property that vx[i] = 1 if and only if x is true in event i. 101001... va = 001100... vb = . . .
  • 22. K. Kie, S. Hallé Bit vectors for LTL formulas are built by combining and manipulating bit vectors of simpler formulas. Bit vector manipulations 101001... va = 001100... vb = va∨b = va ⊕ vb ⊕ = 101101... va∨b = Boolean operators are direct! Example:
  • 23. K. Kie, S. Hallé For a formula φ, vφ[i] = 1 if and only if the sequence starting at position i satisfies φ. Intuition How to deal with temporal operators?
  • 24. K. Kie, S. Hallé Bitmap manipulations for LTL operators
  • 25. K. Kie, S. Hallé Bitmap manipulations for LTL operators φ X φ
  • 26. K. Kie, S. Hallé Bitmap manipulations for LTL operators φ X φ START END
  • 27. K. Kie, S. Hallé Bitmap manipulations for LTL operators φ X φ START END START
  • 28. K. Kie, S. Hallé Bitmap manipulations for LTL operators φ X φ START END START END 0
  • 29. K. Kie, S. Hallé Bitmap manipulations for LTL operators φ X φ START END START END 0 φ F φ
  • 30. K. Kie, S. Hallé Bitmap manipulations for LTL operators φ X φ START END START END 0 φ F φ 1 0 1 START END START
  • 31. K. Kie, S. Hallé Bitmap manipulations for LTL operators φ X φ START END START END 0 φ F φ 1 0 1 START END START 0 END
  • 32. K. Kie, S. Hallé Bitmap manipulations for LTL operators φ X φ START END START END 0 φ F φ 1 0 1 START END START 0 END φ G φ START END START END
  • 33. K. Kie, S. Hallé Bitmap manipulations for LTL operators φ X φ START END START END 0 φ F φ 1 0 1 START END START 0 END φ G φ START END START END 0 1 0 1
  • 34. K. Kie, S. Hallé Bitmap manipulations for LTL operators φ X φ START END START END 0 φ F φ 1 0 1 START END START 0 END φ G φ START END START END 0 1 0 1 φ φ U ψ ψ
  • 35. K. Kie, S. Hallé Bitmap manipulations for LTL operators φ X φ START END START END 0 φ F φ 1 0 1 START END START 0 END φ G φ START END START END 0 1 0 1 φ φ U ψ ψ 1 1
  • 36. K. Kie, S. Hallé Bitmap manipulations for LTL operators φ X φ START END START END 0 φ F φ 1 0 1 START END START 0 END φ G φ START END START END 0 1 0 1 φ φ U ψ ψ 1 1 1
  • 37. K. Kie, S. Hallé Experimental evaluation Goal: compare processing speed and memory consumption between LTL bitmap evaluation and a baseline Sample of 50+ LTL formulas Between 2 and 20 operators Nesting depth between 2 and 11 Evaluated on traces of 1M events Reference: Event stream processing library Front-end accepting LTL formulas (Polyglot) Hallé & Khoury, RV 2018 10.1007/978-3-030-03769-7_27
  • 38. K. Kie, S. Hallé LTL in BeepBeep f → =? a 1 2 f ∧ =? b 1 2 ¬ X f =? c 1 U f =? d 1 a → (¬ (b ∧ X c) U d) S. Hallé. (2018). Event Stream Processing with BeepBeep 3, chapter 5. ISBN 978-2-7605-5102-2
  • 39. K. Kie, S. Hallé 1.6x106 1.8x106 2x106 2.2x106 2.4x106 2.6x106 2.8x106 3x106 3.2x106 3.4x106 3.6x106 0 5 10 15 20 25 Throughput (Hz) Formula size 0 500000 1x106 1.5x106 2x106 2.5x106 3x106 0 5 10 15 20 25 Throughput (Hz) Formula size Raw bit vectors BeepBeep 3 Throughput comparison
  • 40. K. Kie, S. Hallé 1.6x106 1.8x106 2x106 2.2x106 2.4x106 2.6x106 2.8x106 3x106 3.2x106 3.4x106 3.6x106 0 5 10 15 20 25 Throughput (Hz) Formula size 0 500000 1x106 1.5x106 2x106 2.5x106 3x106 0 5 10 15 20 25 Throughput (Hz) Formula size Raw bit vectors BeepBeep 3 Throughput comparison
  • 41. K. Kie, S. Hallé 0 5 10 15 20 25 Throughput (Hz) Formula size 0 500000 1x106 1.5x106 2x106 2.5x106 3x106 0 5 10 15 20 25 Throughput (Hz) Formula size Raw bit vectors BeepBeep 3 500000 1x106 1.5x106 2x106 2.5x106 3x106 Throughput comparison
  • 42. K. Kie, S. Hallé Formula S01 Formula S02 Memory consumption 0 200000 400000 600000 800000 1x106 1.2x106 1.4x106 1.6x106 1.8x106 200000 300000 400000 500000 600000 700000 800000 900000 1x106 Memory (B) Trace length EWAH64 Roaring Concise Raw BeepBeep EWAH32 WAH 0 2x106 4x106 6x106 8x106 1x107 1.2x107 1.4x107 1.6x107 1.8x107 2x107 2.2x107 200000 300000 400000 500000 600000 700000 800000 900000 1x106 Memory (B) Trace length EWAH64 Roaring Concise Raw BeepBeep EWAH32 WAH
  • 43. K. Kie, S. Hallé Formula S01 Formula S02 Memory consumption 0 200000 400000 600000 800000 1x106 1.2x106 1.4x106 1.6x106 1.8x106 200000 300000 400000 500000 600000 700000 800000 900000 1x106 Memory (B) Trace length EWAH64 Roaring Concise Raw BeepBeep EWAH32 WAH 0 2x106 4x106 6x106 8x106 1x107 1.2x107 1.4x107 1.6x107 1.8x107 2x107 2.2x107 200000 300000 400000 500000 600000 700000 800000 900000 1x106 Memory (B) Trace length EWAH64 Roaring Concise Raw BeepBeep EWAH32 WAH (¬(X (X ((G f) ∧ (X ((!a) ∨ d)))))) → ((X i) ∧ (X (i → e)))
  • 44. K. Kie, S. Hallé Formula S01 Formula S02 Memory consumption 0 200000 400000 600000 800000 1x106 1.2x106 1.4x106 1.6x106 1.8x106 200000 300000 400000 500000 600000 700000 800000 900000 1x106 Memory (B) Trace length EWAH64 Roaring Concise Raw BeepBeep EWAH32 WAH 0 2x106 4x106 6x106 8x106 1x107 1.2x107 1.4x107 1.6x107 1.8x107 2x107 2.2x107 200000 300000 400000 500000 600000 700000 800000 900000 1x106 Memory (B) Trace length EWAH64 Roaring Concise Raw BeepBeep EWAH32 WAH (¬(X (X ((G f) ∧ (X ((!a) ∨ d)))))) → ((X i) ∧ (X (i → e))) ((X (g → b)) ∧ ((¬g) → ((¬(X (X (G (F (b ∧ c)))))) → f))) ∨ (F ((G (F (X g))) → ((¬(c ∨ g)) → (e ∨ (G (¬a))))))
  • 45. K. Kie, S. Hallé Upsides: Take-home points Bit vector manipulations can be done on multiple bits at a time (32 or 64): parallelism "for free" Leverages quasi-random access to vector elements Implementation incurs a speed-up over linear BeepBeep of up to 10x Future work: Only works offline How to deal with more expressive logics (e.g. LTL-FO+)?