Skip to content
0:00 / 0:00

#alloy#modelchecking#formalmethods

"Finding bugs without running or even looking at code" by Jay Parlar

Strange Loop Conference

88K subscribers • 114 videos on Hallway • Conference channel

YouTube
  • Recommended by 5 people: 4 on Hacker News and 1 on Lobsters.
  • A classic. People kept recommending it from 2019 to 2023.
  • Presented by Jay Parlar

Intermediate. Assumes working knowledge.

41K views7 years ago5 recommendations

Software designSystems programmingFormal methods and verificationSoftware architectureDesign patterns

Jay Parlar explains how to use the Alloy model checker to find complex architectural bugs without running or reading code.

What if you could find complex bugs in systems without ever having looked at any of the code, without running the code, without cloning the code, or even knowing what language the code is written in or where its git repo lives? What if you could validate the correctness of an architectural proposal before writing code? While this might sound impossible, it's in fact quite doable, and happening every day! Tools called "model checkers" can be used to model and analyze the architecture/design of a system. Model checkers can simulate every possible sequence of operations your system might ever encounter, and check if desired properties always hold. And if a property doesn't hold, the model checker will show you an exact sequences of operations that violates it. Benefit can be had both in the early design stages of a project, or if you're a newcomer trying to get up-to-speed on an existing system. Examples of both will be shown. This talk will describe the model checker Alloy (alloytools.org). I'll show how we used it to invalidate a large amount of work by one group (before multiple teams started to try integrating with that work). I'll also show how we employed it to find a highly subtle security flaw in another group's project, without ever looking at a single line of code from either group. In both cases, we did this simply by talking to teams about the architecture of their systems, and translating those designs into formal specifications. Jay Parlar Okta @parlar Jay Parlar has been a software developer for ~20 years, and holds a PhD in Software Engineering. His major focus the past ~3 years has been on the application of formal methods to real industry problems. This has resulted in interesting successes with Alloy, TLA+, and in writing a custom model checker in Z3. But he’d also love to talk to you about Python, running and fountain pens!

Why it's here

5 people recommend this

What people say. Recommended as an excellent, practical introduction to using Alloy for modeling and finding system design bugs.

hwayneon Hacker News • Recommends

On “Alloy is a language for describing structures and a tool for exploring them”

There was a fantastic talk at strangeloop this year on Alloy: link to this video . The speaker used it to find a serious security bug in their live code and a feature interaction bug in their UI that had meant they had been writing broken code for the past _year_. (full disclosure I'm referenced towards the end)

ParetoOptimalon Hacker News • Recommends

On “Modeling Git Internals in Alloy, Part 2: Commits and Tags”

I was exposed to alloy by this wonderful video: "Finding bugs without running or even looking at code" by Jay Parlar link to this video I believe the general idea could be applicable in practice for core parts of most businesses software. So now I'm very interested in real world accounts of using alloy like this. Anyone have other posts like this one or experiences to share along these lines?

calvinon Lobsters • Recommends

Finding bugs without running or even looking at code

kilotarason Hacker News • Recommends

On “Show HN: A basketball hoop to maximize shots that go in [video]”

There's a great talk from StrangeLoop0 where a presenter uses Alloy modelling in exactly the same manner: - generate a couple examples - see something wrong - add a rule - repeat 0 link to this video

_andrei_on Hacker News • Recommends

On “Modeling CRDTs in Alloy – the importance of idempotence”

There is a talk that gives a good overview on Alloy and how useful using something like this is: "Finding bugs without running or even looking at code" by Jay Parlar link to this video

u/Tatricsin r/emacs • Mentions

What model checking tool are you using? After watching this video about model checking I wonder which tool can be comfortably used within Emacs if any. So please share your experience in the field!