{
  "id": "swi-prolog",
  "name": "SWI-Prolog",
  "homepage": "https://www.swi-prolog.org/",
  "description": "A comprehensive implementation of the Prolog programming language.",
  "executables": [
    "swipl"
  ],
  "dotfiles": {
    "paths": [
      "[configHome]/swi-prolog/init.pl",
      "~/.swiplrc"
    ],
    "secret": [],
    "side_effect": false
  },
  "commands": {
    "format": 1,
    "label": "SWI-Prolog",
    "description": "Start swipl with source files, startup goals and resource limits. Compilation (-c, -b), saved states and embedding options are not covered.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": false,
      "short_bundles": false
    },
    "source": [
      {
        "id": "man",
        "kind": "manual",
        "url": "https://manpages.debian.org/unstable/swi-prolog-nox/swipl.1.en.html",
        "revision": "swipl 8.1.29 man page (Debian unstable)",
        "evidence": "swipl [options] prolog-file ... [--] [arg ...]\n--stack_limit=size[bkmg]\nSets the combined stack limit to size bytes.\n-O\nOptimised compilation.\n-f file\nUse file as initialisation file instead of `init.pl'.\n-g goal\nGoal is executed just before entering the top level. This option may appear multiple times.\n--quiet[=bool]\n-q\nOperate silently. This option suppresses all informational messages.\n-t goal\nUse goal as an interactive top level instead of the default goal prolog/0.\n"
      }
    ],
    "field": [
      {
        "id": "files",
        "label": "Prolog files",
        "type": "path",
        "path": {
          "kind": "file",
          "role": "input"
        },
        "position": 0,
        "multiple": true,
        "sources": [
          "man"
        ]
      },
      {
        "id": "goal",
        "label": "Startup goal (-g)",
        "description": "Run just before the toplevel. Quote complex terms.",
        "type": "string",
        "option": [
          "-g"
        ],
        "multiple": true,
        "sources": [
          "man"
        ]
      },
      {
        "id": "toplevel",
        "label": "Toplevel goal (-t)",
        "description": "Use halt to exit after the -g goals.",
        "type": "string",
        "option": [
          "-t"
        ],
        "suggestions": [
          {
            "value": "halt",
            "label": "halt (do not enter interactive mode)"
          }
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "quiet",
        "label": "Quiet",
        "type": "boolean",
        "option": [
          "-q"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "optimise",
        "label": "Optimised compilation",
        "type": "boolean",
        "option": [
          "-O"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "stack_limit",
        "label": "Stack limit",
        "description": "Size with unit, for example 2g.",
        "type": "string",
        "option": [
          "--stack_limit"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "init_file",
        "label": "Init file",
        "description": "Use none to skip the init file.",
        "type": "string",
        "option": [
          "-f"
        ],
        "sources": [
          "man"
        ]
      }
    ],
    "task": [
      {
        "id": "interactive",
        "label": "Load files interactively",
        "fields": [
          "files",
          "quiet",
          "stack_limit"
        ],
        "required": [
          "files"
        ]
      },
      {
        "id": "run_goal",
        "label": "Run a goal and exit",
        "fields": [
          "files",
          "goal",
          "toplevel",
          "quiet"
        ],
        "required": [
          "files",
          "goal"
        ],
        "set": {
          "toplevel": [
            "halt"
          ],
          "quiet": [
            true
          ]
        }
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "files",
          "goal",
          "toplevel",
          "quiet"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "optimise",
          "stack_limit",
          "init_file"
        ]
      }
    ]
  }
}
