MPD

1 program Added 2026-02-23T10:00:00Z Agent: claude-codeModel: claude-sonnet-4-6WebSearch: enabled Evidence Report issue View issues
Aliases: Multithreaded Parallel and Distributed Programming
Provenance: commit 36a78e4e5d · authored 2026-02-23T11:24:05+01:00 · agent claude-code · model claude-sonnet-4-6

Sources mentioning this language

3 sources · pl_id: pl/mpd
LLM (this repo) · 1WikipediaWikidata · Q840761

Related languages

Distributed Processes (0.21)Flow-based programming (0.20)ZZT-OOP (0.19)ASP (0.19)DSSP (0.19)

Real programs from Software Heritage

No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)

Programs collected by LLM agents experimental · unverified

Gathered by LLM agents during the experiment that started this catalogue. They are not verified: the agent names an origin, but a program can be altered or invented — an audit found one attributed to a file that does not exist, in a syntax the language does not have. Prefer the programs archived by Software Heritage above. The catalogue's goal is the languages themselves, grounded in sources (PLDB, Wikipedia, Rosetta Code, …), with real archived programs; these examples may be dropped.

Quicksort

Provenance: commit 36a78e4e5d · authored 2026-02-23T11:24:05+01:00 · agent claude-code · model claude-sonnet-4-6 · WebSearch enabled
code.mpd · added: 2026-02-23T10:00:00Z
# recursive quicksort program in MPD

# reads an input file, sorts the lines, then writes data to stdout
# assumes that lines are at most 120 characters and
#         that the file contains at most 10,000 lines

# usage:  a.out filename

resource quick()

  int MAXLINE = 120, MAXFILE = 10000;

  op sort(var string[*] a[1:*])  # forward declaration for sort()

  # read input file name, then open the file
  string[20] fname; getarg(1,fname);
  file fd = open(fname, READ);
  if (fd == null)
    { write("cannot open file", fname); stop(1); }

  # declare input array and read input file
  int size = 1;
  string[MAXLINE] data[MAXFILE];
  while(size <= MAXFILE & read(fd, data[size]) != EOF) { size++ }
  if (size > 10000)
    { write("input file is longer than", MAXFILE, "lines"); stop(1); }
  size--;

  # sort the file, then print the result
  sort(data[1:size]);
  for [i = 1 to size] {
    write(data[i]);
  }

  # the quicksort procedure itself
  proc sort(a) {
    if (ub(a) <= 1) { return; }   # base case
    string[MAXLINE] pivot = a[1];
    int lx = 2, rx = ub(a);
    while(lx <= rx) {    # partition the array based on the pivot
      if (a[lx] <= pivot) { lx++ }
      else { a[lx] :=: a[rx]; rx-- }
    }
    a[rx] :=: a[1];      # swap pivot line into place
    sort(a[1:rx-1]);     # sort "left" half
    sort(a[lx:ub(a)]);   # sort "right" half
  }

end quick

Contribute — propose a file extension

Tell us where to find evidence about MPD (mapped to pl/mpd). 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/MPD/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← MPASM MPEL →