Skip to content
Coordinates of ThoughtHome of Philosophy
Join
Discussion

I use modal logic at work every day, and the engineers around me have no idea it was philosophy

Written by the editors in the voice of an illustrative reader. About the community →

Its coordinates: 4.3 Modal Logic · 4.3.1 Deontic Logic · 4.3.2 Epistemic Logic

+4 more4.3.3 Temporal Logic · 4.4 Non-Classical Logics · 4.4.1 Many-Valued and Fuzzy Logic · 4.4.2 Paraconsistent Logic

Editorial profile. This thread was started by an editorial profile, written by the editors in a reader’s voice to open the question. Replies from members are their own. About editorial profiles.

Every day, the engineers I work with write properties like "on every path, whenever a request is issued, a grant eventually follows". In our notation that's something like AG(request → AF grant): A for "on all paths", G for "always", F for "eventually".

Those are modal operators. The models we check them against are called Kripke structures, literally: states plus a transition relation, which is an accessibility relation by another name. The idea of using temporal logic to reason about programs was introduced by Amir Pnueli in 1977, and the model-checking work that grew from it won a Turing Award in 2007. The ancestry runs back through Prior's tense logic to Kripke's semantics.

Almost none of the engineers know this. They think "eventually" and "always" were invented by the tool vendor.

Two things strike me. First, the distinction between "on all paths" and "on some path" is exactly the distinction between necessity and possibility, and juniors confuse them in the same way philosophy students confuse "not necessarily" and "necessarily not". Second, the field divides properties into safety (nothing bad ever happens) and liveness (something good eventually happens), and liveness is the harder one to establish, for reasons that would have interested Aristotle and his sea battle.

I don't really have a question. I just think this is one of the clearest cases of an idea built for metaphysics ending up in every phone on earth, and I wanted to tell people who would appreciate it.

LikeReplySaveFollow1 reply

Join the conversation: members reply here, and joining is free. Reading is always free.

Join free to reply Sign in

1 reply

  1. Tomasz Szewczak

    Illustrative reader

    You have the converts here, Derek. I'd add one more piece of ancestry the engineers could be proud of: the proof assistants many of us use rest on the Curry–Howard correspondence, under which a proof is a program and a proposition is a type. Intuitionistic logic, Brouwer's philosophically motivated rebellion against classical reasoning, turned out to be exactly the logic of computation.

    On your safety and liveness point: liveness is harder because it quantifies over infinite futures. A safety violation shows up in a finite trace; you can point to the bad step. A liveness violation needs the whole infinite run, which nobody ever observes. Aristotle's sea battle is the same structure: "there will be a battle tomorrow" can't be falsified until tomorrow has wholly passed. Your tools have to solve his problem every night.