Formal Methods and Systems
David Cock, ETH Zürich
18/01/16
Formal Methods and Systems David Cock, ETH Zrich 18/01/16 - - PowerPoint PPT Presentation
Formal Methods and Systems David Cock, ETH Zrich 18/01/16 Overview Correctness challenges in Barrelfish. System configuration using SAT. Tracing and online invariant checking. Better languages for Systems. 18 January 2016
18/01/16
18 January 2016 Industry Retreat 2016 2
18 January 2016 Industry Retreat 2016 3
ARMv7/GEM5, X-Gene 1, ARMv8/GEM5, Xeon Phi, x86-64, x86-32
This is no longer a small research project! We're starting to see the engineering challenges of a large system.
18 January 2016 Industry Retreat 2016 4
A lesson from history: It's easier to prove code correct, if it actually is correct!
18 January 2016 Industry Retreat 2016 5
18 January 2016 Industry Retreat 2016 6
CLP solver (Prolog + constraints) CLP solver (Prolog + constraints)
– Hardware info – Runtime state
– Represent the hardware – Reason about it – Embed policy choices
Hardware data and specifjcation Runtime system information
18 January 2016 Industry Retreat 2016 7
– E.g. PCI enumeration, ACPI, CPUID…
– Inter-core all-pairs latency, cache measurements…
– Locks, process placement, etc.
– SoC specs, assertions from data sheets, etc.
CLP solver (Prolog + constraints) CLP solver (Prolog + constraints)
18 January 2016 Industry Retreat 2016 8
– Driver startup / hotplug
– A surprisingly hard CSAT problem!
– Efficient multicast tree construction
– Used by e.g. databases for query planning
CLP solver (Prolog + constraints) CLP solver (Prolog + constraints)
18 January 2016 Industry Retreat 2016 9
PCI, is better expressed in terms of bits.
18 January 2016 Industry Retreat 2016 10
18 January 2016 Industry Retreat 2016 11
unmap(pa); cleanDCache(); flushTLB();
Are HW operatjons right?
5Gb/s Filter at line rate Check temporal assertjons Log & process offmine
18 January 2016 Industry Retreat 2016 12
5Gb/s Filter at line rate Log & process offmine
12
URPC[0]= x; URPC[1]= 1; while(!URPC[1]); x= URPC[0];
1 2
x 1 x
Core 0 Core 1
Cache 0 Cache 1
INVAL(0) READ(1) …
Is URPC optjmal?
‐ The HW knows!
18 January 2016 Industry Retreat 2016 13
eventually visible on core 2.
streams.
automaton.
look for violations.
18 January 2016 Industry Retreat 2016 14
image systems.
consensus algorithms.
noninvasively.
very feasible.
essential at this scale and up.
– First-class messaging (Go) – Specifying layout (Rust)
The hard part about reasoning about “C”, is that we keep stepping
– No runtime, high performance (C) – Predictable resource usage (C, Rust) – Clear and clean semantics (Haskell, Rust?)
– Enough expressive power: Can you enable the MMU, or
thread switch without breaking the language rules?
Clang/LLVM, drop the ugly parts?
18 January 2016 Industry Retreat 2016 18