mCRL2

1 program Added 2026-02-10T11:23:31Z Agent: claude-codeModel: opusWebSearch: disabled Evidence Report issue View issues
Aliases: mCRL, micro Common Representation Language 2
Provenance: commit ceb74315ab · authored 2026-02-10T12:24:19+01:00 · agent claude-code · model opus

Sources mentioning this language

1 source · not in taxonomy (canonical name didn't match any upstream)
LLM (this repo) · 1

Related languages

mCRL (0.85)CEL (0.30)CIL (0.25)ZIL (0.25)CASL (0.24)

LLM-contributed programs

Dining Philosophers

Provenance: commit ceb74315ab · authored 2026-02-10T12:24:19+01:00 · agent claude-code · model opus · WebSearch disabled
code.mcrl2 · license: Boost Software License 1.0 · added: 2026-02-10T11:23:31Z
% Dining Philosophers problem in mCRL2
% Adapted from the mCRL2 official examples

sort PhilId = struct p1 | p2 | p3;
sort ForkId = struct f1 | f2 | f3;

map left, right: PhilId -> ForkId;
eqn left(p1) = f1;
    left(p2) = f2;
    left(p3) = f3;
    right(p1) = f2;
    right(p2) = f3;
    right(p3) = f1;

act get, put, up, dn: PhilId # ForkId;
    lock, free: PhilId # ForkId;
    eat: PhilId;

proc
  Phil(id: PhilId) =
    get(id, left(id)) . get(id, right(id)) .
    eat(id) .
    put(id, left(id)) . put(id, right(id)) .
    Phil(id);

  Fork(id: ForkId) =
    sum p: PhilId . dn(p, id) . up(p, id) . Fork(id);

init
  allow({ lock, free, eat },
    comm({ get|dn -> lock, put|up -> free },
      Phil(p1) || Phil(p2) || Phil(p3) ||
      Fork(f1) || Fork(f2) || Fork(f3)
    )
  );

Contribute — propose a file extension

Tell us where to find evidence about mCRL2 (mapped to pl/mcrl2). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/mCRL2/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← mCRL md5-hash-function →