{
  "content": {
    "icon": "bi-code-square",
    "id": "pag-keywords-priority-queue",
    "intro": "Every PAG keyword record, with what grounds it and how it is checked.",
    "subsections": [
      {
        "blocks": [
          {
            "entries": [
              {
                "description": "Queue declaration · makes a ranking explicit, and the branch ranking a worth gate emits is one",
                "term": "Meaning"
              },
              {
                "description": "PRIORITY_QUEUE branches:",
                "term": "Example"
              },
              {
                "description": "[node:tel-priority](/records/reasoning/node-tel-priority)",
                "term": "Grounds"
              }
            ],
            "kind": "glossary"
          },
          {
            "kind": "text",
            "text": "How it is checked"
          },
          {
            "entries": [
              {
                "description": "a structured-document validator that parses each document against the grammar and reports every defect by its shape",
                "term": "Checked by"
              },
              {
                "description": "Every agent and template document the validator walks, and every occurrence of the keyword in them",
                "term": "Population"
              },
              {
                "description": "A verdict stands until the grammar data or a document that uses the keyword changes",
                "term": "Freshness"
              },
              {
                "description": "The validation stage fails the gate on any defect code, so a document with a malformed keyword does not ship",
                "term": "Refusal"
              },
              {
                "description": "None, because a keyword is static text in a document, and nothing observes it while a run executes",
                "term": "Observation"
              },
              {
                "description": "Watched to fire and to accept: a suite plants a retired head in a real template and validates every agent and template on disk clean",
                "term": "Evidence"
              },
              {
                "description": "The grammar data, which every keyword in a document conforms to",
                "term": "Authoritative side"
              },
              {
                "description": "Not answered",
                "term": "Depends on"
              },
              {
                "description": "Not answered",
                "term": "Shape it refuses"
              }
            ],
            "kind": "glossary"
          }
        ],
        "id": "pag-keyword-priority-queue",
        "title": "PRIORITY_QUEUE"
      },
      {
        "blocks": [
          {
            "entries": [
              {
                "description": "priority_queue",
                "term": "Category"
              },
              {
                "description": "Priority value · utility minus cost",
                "term": "Meaning"
              },
              {
                "description": "PRIORITY = 10",
                "term": "Example"
              },
              {
                "description": "[node:tel-utility](/records/reasoning/node-tel-utility), [node:tel-cost](/records/reasoning/node-tel-cost)",
                "term": "Grounds"
              },
              {
                "description": "meta",
                "term": "Category"
              },
              {
                "description": "The authority tiers · which source grounds which, highest first",
                "term": "Meaning"
              },
              {
                "description": "priority: <governing document> > <ontology> > <template> > <task>",
                "term": "Example"
              },
              {
                "description": "[invariant:epi-weakest-link](/records/reasoning/invariant-epi-weakest-link)",
                "term": "Grounds"
              }
            ],
            "kind": "glossary"
          },
          {
            "kind": "text",
            "text": "How it is checked"
          },
          {
            "entries": [
              {
                "description": "a structured-document validator that parses each document against the grammar and reports every defect by its shape",
                "term": "Checked by"
              },
              {
                "description": "Every agent and template document the validator walks, and every occurrence of the keyword in them",
                "term": "Population"
              },
              {
                "description": "A verdict stands until the grammar data or a document that uses the keyword changes",
                "term": "Freshness"
              },
              {
                "description": "The validation stage fails the gate on any defect code, so a document with a malformed keyword does not ship",
                "term": "Refusal"
              },
              {
                "description": "None, because a keyword is static text in a document, and nothing observes it while a run executes",
                "term": "Observation"
              },
              {
                "description": "Watched to fire and to accept: a suite plants a retired head in a real template and validates every agent and template on disk clean",
                "term": "Evidence"
              },
              {
                "description": "The grammar data, which every keyword in a document conforms to",
                "term": "Authoritative side"
              },
              {
                "description": "Not answered",
                "term": "Depends on"
              },
              {
                "description": "Not answered",
                "term": "Shape it refuses"
              }
            ],
            "kind": "glossary"
          }
        ],
        "id": "pag-keyword-priority",
        "title": "PRIORITY"
      },
      {
        "blocks": [
          {
            "entries": [
              {
                "description": "Add to queue",
                "term": "Meaning"
              },
              {
                "description": "ENQUEUE task TO q",
                "term": "Example"
              },
              {
                "description": "[pattern-type:combinatorics](/records/reasoning/pattern-type-combinatorics)",
                "term": "Grounds"
              }
            ],
            "kind": "glossary"
          },
          {
            "kind": "text",
            "text": "How it is checked"
          },
          {
            "entries": [
              {
                "description": "a structured-document validator that parses each document against the grammar and reports every defect by its shape",
                "term": "Checked by"
              },
              {
                "description": "Every agent and template document the validator walks, and every occurrence of the keyword in them",
                "term": "Population"
              },
              {
                "description": "A verdict stands until the grammar data or a document that uses the keyword changes",
                "term": "Freshness"
              },
              {
                "description": "The validation stage fails the gate on any defect code, so a document with a malformed keyword does not ship",
                "term": "Refusal"
              },
              {
                "description": "None, because a keyword is static text in a document, and nothing observes it while a run executes",
                "term": "Observation"
              },
              {
                "description": "Watched to fire and to accept: a suite plants a retired head in a real template and validates every agent and template on disk clean",
                "term": "Evidence"
              },
              {
                "description": "The grammar data, which every keyword in a document conforms to",
                "term": "Authoritative side"
              },
              {
                "description": "Not answered",
                "term": "Depends on"
              },
              {
                "description": "Not answered",
                "term": "Shape it refuses"
              }
            ],
            "kind": "glossary"
          }
        ],
        "id": "pag-keyword-enqueue",
        "title": "ENQUEUE"
      },
      {
        "blocks": [
          {
            "entries": [
              {
                "description": "Remove from queue",
                "term": "Meaning"
              },
              {
                "description": "DEQUEUE FROM q",
                "term": "Example"
              },
              {
                "description": "[pattern-type:combinatorics](/records/reasoning/pattern-type-combinatorics)",
                "term": "Grounds"
              }
            ],
            "kind": "glossary"
          },
          {
            "kind": "text",
            "text": "How it is checked"
          },
          {
            "entries": [
              {
                "description": "a structured-document validator that parses each document against the grammar and reports every defect by its shape",
                "term": "Checked by"
              },
              {
                "description": "Every agent and template document the validator walks, and every occurrence of the keyword in them",
                "term": "Population"
              },
              {
                "description": "A verdict stands until the grammar data or a document that uses the keyword changes",
                "term": "Freshness"
              },
              {
                "description": "The validation stage fails the gate on any defect code, so a document with a malformed keyword does not ship",
                "term": "Refusal"
              },
              {
                "description": "None, because a keyword is static text in a document, and nothing observes it while a run executes",
                "term": "Observation"
              },
              {
                "description": "Watched to fire and to accept: a suite plants a retired head in a real template and validates every agent and template on disk clean",
                "term": "Evidence"
              },
              {
                "description": "The grammar data, which every keyword in a document conforms to",
                "term": "Authoritative side"
              },
              {
                "description": "Not answered",
                "term": "Depends on"
              },
              {
                "description": "Not answered",
                "term": "Shape it refuses"
              }
            ],
            "kind": "glossary"
          }
        ],
        "id": "pag-keyword-dequeue",
        "title": "DEQUEUE"
      },
      {
        "blocks": [
          {
            "entries": [
              {
                "description": "View top item · the selected branch",
                "term": "Meaning"
              },
              {
                "description": "PEEK queue",
                "term": "Example"
              },
              {
                "description": "[node:tel-priority](/records/reasoning/node-tel-priority)",
                "term": "Grounds"
              }
            ],
            "kind": "glossary"
          },
          {
            "kind": "text",
            "text": "How it is checked"
          },
          {
            "entries": [
              {
                "description": "a structured-document validator that parses each document against the grammar and reports every defect by its shape",
                "term": "Checked by"
              },
              {
                "description": "Every agent and template document the validator walks, and every occurrence of the keyword in them",
                "term": "Population"
              },
              {
                "description": "A verdict stands until the grammar data or a document that uses the keyword changes",
                "term": "Freshness"
              },
              {
                "description": "The validation stage fails the gate on any defect code, so a document with a malformed keyword does not ship",
                "term": "Refusal"
              },
              {
                "description": "None, because a keyword is static text in a document, and nothing observes it while a run executes",
                "term": "Observation"
              },
              {
                "description": "Watched to fire and to accept: a suite plants a retired head in a real template and validates every agent and template on disk clean",
                "term": "Evidence"
              },
              {
                "description": "The grammar data, which every keyword in a document conforms to",
                "term": "Authoritative side"
              },
              {
                "description": "Not answered",
                "term": "Depends on"
              },
              {
                "description": "Not answered",
                "term": "Shape it refuses"
              }
            ],
            "kind": "glossary"
          }
        ],
        "id": "pag-keyword-peek",
        "title": "PEEK"
      },
      {
        "blocks": [
          {
            "entries": [
              {
                "description": "Reorder queue",
                "term": "Meaning"
              },
              {
                "description": "HEAPIFY queue",
                "term": "Example"
              },
              {
                "description": "[pattern-type:combinatorics](/records/reasoning/pattern-type-combinatorics)",
                "term": "Grounds"
              }
            ],
            "kind": "glossary"
          },
          {
            "kind": "text",
            "text": "How it is checked"
          },
          {
            "entries": [
              {
                "description": "a structured-document validator that parses each document against the grammar and reports every defect by its shape",
                "term": "Checked by"
              },
              {
                "description": "Every agent and template document the validator walks, and every occurrence of the keyword in them",
                "term": "Population"
              },
              {
                "description": "A verdict stands until the grammar data or a document that uses the keyword changes",
                "term": "Freshness"
              },
              {
                "description": "The validation stage fails the gate on any defect code, so a document with a malformed keyword does not ship",
                "term": "Refusal"
              },
              {
                "description": "None, because a keyword is static text in a document, and nothing observes it while a run executes",
                "term": "Observation"
              },
              {
                "description": "Watched to fire and to accept: a suite plants a retired head in a real template and validates every agent and template on disk clean",
                "term": "Evidence"
              },
              {
                "description": "The grammar data, which every keyword in a document conforms to",
                "term": "Authoritative side"
              },
              {
                "description": "Not answered",
                "term": "Depends on"
              },
              {
                "description": "Not answered",
                "term": "Shape it refuses"
              }
            ],
            "kind": "glossary"
          }
        ],
        "id": "pag-keyword-heapify",
        "title": "HEAPIFY"
      },
      {
        "blocks": [
          {
            "entries": [
              {
                "description": "Comparison function",
                "term": "Meaning"
              },
              {
                "description": "COMPARE_BY priority",
                "term": "Example"
              },
              {
                "description": "[pattern-type:combinatorics](/records/reasoning/pattern-type-combinatorics)",
                "term": "Grounds"
              }
            ],
            "kind": "glossary"
          },
          {
            "kind": "text",
            "text": "How it is checked"
          },
          {
            "entries": [
              {
                "description": "a structured-document validator that parses each document against the grammar and reports every defect by its shape",
                "term": "Checked by"
              },
              {
                "description": "Every agent and template document the validator walks, and every occurrence of the keyword in them",
                "term": "Population"
              },
              {
                "description": "A verdict stands until the grammar data or a document that uses the keyword changes",
                "term": "Freshness"
              },
              {
                "description": "The validation stage fails the gate on any defect code, so a document with a malformed keyword does not ship",
                "term": "Refusal"
              },
              {
                "description": "None, because a keyword is static text in a document, and nothing observes it while a run executes",
                "term": "Observation"
              },
              {
                "description": "Watched to fire and to accept: a suite plants a retired head in a real template and validates every agent and template on disk clean",
                "term": "Evidence"
              },
              {
                "description": "The grammar data, which every keyword in a document conforms to",
                "term": "Authoritative side"
              },
              {
                "description": "Not answered",
                "term": "Depends on"
              },
              {
                "description": "Not answered",
                "term": "Shape it refuses"
              }
            ],
            "kind": "glossary"
          }
        ],
        "id": "pag-keyword-compare-by",
        "title": "COMPARE_BY"
      }
    ],
    "title": "priority_queue",
    "kind": "keywords"
  },
  "graph": {
    "narrative": true,
    "requires": [],
    "teaches": [],
    "traces": []
  },
  "href": "https://banes-lab.com/ontology/grammar#pag-keywords-priority-queue",
  "number": "223",
  "page": "ontology",
  "ref": "chapter:/ontology/grammar#pag-keywords-priority-queue",
  "relations": [
    {
      "links": [
        {
          "href": "https://banes-lab.com/ontology/reasoning#reasoning-node-tel-priority",
          "json": "https://banes-lab.com/json/records/reasoning/node-tel-priority",
          "label": "Branch Priority",
          "markdown": "https://banes-lab.com/records/reasoning/node-tel-priority.md",
          "ref": "reasoning:node-tel-priority"
        },
        {
          "href": "https://banes-lab.com/ontology/reasoning#reasoning-node-tel-utility",
          "json": "https://banes-lab.com/json/records/reasoning/node-tel-utility",
          "label": "Branch Utility",
          "markdown": "https://banes-lab.com/records/reasoning/node-tel-utility.md",
          "ref": "reasoning:node-tel-utility"
        },
        {
          "href": "https://banes-lab.com/ontology/reasoning#reasoning-node-tel-cost",
          "json": "https://banes-lab.com/json/records/reasoning/node-tel-cost",
          "label": "Branch Cost",
          "markdown": "https://banes-lab.com/records/reasoning/node-tel-cost.md",
          "ref": "reasoning:node-tel-cost"
        },
        {
          "href": "https://banes-lab.com/ontology/reasoning#reasoning-invariant-epi-weakest-link",
          "json": "https://banes-lab.com/json/records/reasoning/invariant-epi-weakest-link",
          "label": "Weakest Link",
          "markdown": "https://banes-lab.com/records/reasoning/invariant-epi-weakest-link.md",
          "ref": "reasoning:invariant-epi-weakest-link"
        },
        {
          "href": "https://banes-lab.com/ontology/reasoning#reasoning-pattern-type-combinatorics",
          "json": "https://banes-lab.com/json/records/reasoning/pattern-type-combinatorics",
          "label": "Combinatorics",
          "markdown": "https://banes-lab.com/records/reasoning/pattern-type-combinatorics.md",
          "ref": "reasoning:pattern-type-combinatorics"
        }
      ],
      "relation": "links-to"
    }
  ],
  "route": null,
  "section": "pag-keywords-priority-queue",
  "summary": "Every PAG keyword record, with what grounds it and how it is checked.",
  "tab": "grammar",
  "title": "priority_queue",
  "siblings": {
    "next": {
      "href": "https://banes-lab.com/ontology/grammar#pag-keywords-flowchart",
      "json": "https://banes-lab.com/json/ontology/grammar/pag-keywords-flowchart",
      "label": "flowchart",
      "markdown": "https://banes-lab.com/ontology/grammar/pag-keywords-flowchart.md",
      "ref": "chapter:/ontology/grammar#pag-keywords-flowchart"
    },
    "previous": {
      "href": "https://banes-lab.com/ontology/grammar#pag-keywords-dag",
      "json": "https://banes-lab.com/json/ontology/grammar/pag-keywords-dag",
      "label": "dag",
      "markdown": "https://banes-lab.com/ontology/grammar/pag-keywords-dag.md",
      "ref": "chapter:/ontology/grammar#pag-keywords-dag"
    }
  },
  "up": {
    "href": "https://banes-lab.com/ontology/grammar",
    "json": "https://banes-lab.com/json/api/pages/ontology/grammar",
    "label": "Ontology · Grammar",
    "markdown": "https://banes-lab.com/api/pages/ontology/grammar.md",
    "ref": "api:/ontology/grammar"
  }
}
