Using TLA+ to Understand Xen Vchan
roscidus.com
Using TLA+ to Understand Xen Vchan
1–10 of 13 posts
Re: Using TLA+ to Understand Xen Vchan
#2> The technologies provided by VMMs for communication between VMs have a critical impact on VM isolation properties, on the confidence components can have in the delivery of data and in the integrity of the data that is received. The video below identifies aspects of inter-VM communication system architecture that support important properties that are valuable for building secure systems. Terminology is introduced to enable classification of the existing body of art and survey relevant communication technologies in modern hypervisor, OS and microkernel systems. An example is presented — Argo, an inter-VM communication mechanism developed for the Xen hypervisor — and how it is distinguished from other communication channels on the Xen platform and elsewhere.
Re: Using TLA+ to Understand Xen Vchan
#3Re: Using TLA+ to Understand Xen Vchan
#4> One really nice feature of TLC is that (unlike a fuzz tester) it does a breadth-first search and therefore finds minimal counter-examples for invariants.
It's worth noting that many fuzzers go to great lengths to produce examples that are as small as possible, but it's true that this just comes naturally with TLC.
Re: Using TLA+ to Understand Xen Vchan
#5Always love seeing more examples of TLA+ in action! > One really nice feature of TLC is that (unlike a fuzz tester) it does a breadth-first search and therefore finds minimal counter-examples for invariants. It's worth noting that many fuzzers go to great lengths to produce examples that are as small as possible, but it's true that this just comes naturally with TLC.
Making even moderately complex TLA+ models or minor iterations on a simple model's depth of representation often results in exploding the search space for TLC and consequently the time to perform checking.
Both classes of tools are useful, but the comparison seemed odd since you wouldn't use TLA+ like a fuzzer, nor vice versa.
Re: Using TLA+ to Understand Xen Vchan
#6Always love seeing more examples of TLA+ in action! > One really nice feature of TLC is that (unlike a fuzz tester) it does a breadth-first search and therefore finds minimal counter-examples for invariants. It's worth noting that many fuzzers go to great lengths to produce examples that are as small as possible, but it's true that this just comes naturally with TLC.
It seems like an odd comparison though. Considering that TLC is exercising a very, very coarse model and a fuzzer is usually exercising a real interface/implementation. The former is dealing with an idealized simplification and the latter is dealing with a shape of real domain coverage when searching for counter-examples. Making even moderately complex TLA+ models or minor iterations on a simple model's depth of repr…
TLC checks the TLA+ specification, however detailed it is. In practice, it's true that it is usually much more useful to specify at a level well above the code, but it could be at the same abstraction level as the code (the specification could even be mechanically generated from the code), or even, in principle, much finer: you can refine the TLA+ specification to an arbitrary level, including down to the level of electronics in the CPU. However, very fine specifications are far less practical.
> Making even moderately complex TLA+ models or minor iterations on a simple model's depth of representation often results in exploding the search space for TLC and consequently the time to perform checking.
You can avoid the explosion by asking TLC to sample the behaviors in the same way a fuzzer does, but then you'll lose the exhaustiveness and the proof of absence of errors.
Re: Using TLA+ to Understand Xen Vchan
#7I've written a somewhat lengthy discussion of this point on the TLA+ subreddit: https://www.reddit.com/r/tlaplus/comments/abi3oz/using_tla_t...
Re: Using TLA+ to Understand Xen Vchan
#8> Writing formal proofs is a little tedious, largely because TLA is an untyped language. I've written a somewhat lengthy discussion of this point on the TLA+ subreddit: https://www.reddit.com/r/tlaplus/comments/abi3oz/using_tla_t...
Re: Using TLA+ to Understand Xen Vchan
#9> Writing formal proofs is a little tedious, largely because TLA is an untyped language. I've written a somewhat lengthy discussion of this point on the TLA+ subreddit: https://www.reddit.com/r/tlaplus/comments/abi3oz/using_tla_t...
I agree with a lot of that, but in practice some syntactic sugar around types in TLA+ (or at least canned type invariant macros) would make it easier to write concise readable specs. Think "x is a natural number", "y is a member of set x", etc. It wouldn't satisfy the type theory folks, but would be nice for TLA+ users. In practice, it seems like everybody (including me) ends up re-writing a whole lot of type invaria…
VARIABLE x ∈ Nat
but I haven't considered all the implications of doing that. May be worth a discussion on the mailing list or at the conference in September.As to "satisfying the type theory folks," I'm not sure what it means. Type theory studies the features of typed formalisms; it makes no claims as to when working in a typed formalism is preferable to working in untyped ones (although different people have different opinions). There are implementations of TLA in typed formalisms (in particular, Isabelle and Coq). Lamport explains why he designed TLA+ as an untyped language.
Re: Using TLA+ to Understand Xen Vchan
#10Earlier quoted context omitted.
I agree with a lot of that, but in practice some syntactic sugar around types in TLA+ (or at least canned type invariant macros) would make it easier to write concise readable specs. Think "x is a natural number", "y is a member of set x", etc. It wouldn't satisfy the type theory folks, but would be nice for TLA+ users. In practice, it seems like everybody (including me) ends up re-writing a whole lot of type invaria…
It may be worthwhile to allow declarations of the form VARIABLE x ∈ Nat but I haven't considered all the implications of doing that. May be worth a discussion on the mailing list or at the conference in September. As to "satisfying the type theory folks," I'm not sure what it means. Type theory studies the features of typed formalisms; it makes no claims as to when working in a typed formalism is preferable to workin…
I simply meant that adding simple macros wouldn't make TLA+ typed, and so wouldn't make the people who think TLA+ should be typed any happier than they are today.