Skip to content

Main content

Modal Operator Nesting Depth Tool

Count modal operators along one caller-supplied syntax-tree path; does not parse a complete modal formula.

Loading tool…

Description

Count modal operators along one caller-supplied syntax-tree path; does not parse a complete modal formula.

A logical calculation operates on a stated representation: truth values, token lists, counts, or an explicitly supplied relation. Checking one assignment, pair, trace, or witness is different from proving a formula or validating an entire argument. Empty domains, duplicate tokens, and scope conventions can change the result.

Count modal operators along one caller-supplied syntax-tree path; does not parse a complete modal formula.

When to use this tool

Use Modal Operator Nesting Depth when you need this exact local truth, count, token, relation, or witness check within a larger logic workflow.

How to use the tool and how it works

  1. Enter operatorPath, suppliedModalOperators. Keep parallel arrays aligned. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read modalDepth, pathLength. Use the output convention below.

Count operatorPath tokens that occur in suppliedModalOperators into modalDepth and return pathLength=operatorPath.length.1

Input fieldMeaning and unitsAccepted input
operatorPathOperator PathRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
suppliedModalOperatorsSupplied Modal OperatorsRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
Output fieldInterpretationReturned shape
modalDepthModal DepthRequired. Safe integer.
pathLengthPath LengthRequired. Safe integer.
json
{
  "input": {
    "operatorPath": [
      "box",
      "not",
      "diamond"
    ],
    "suppliedModalOperators": [
      "box",
      "diamond"
    ]
  },
  "output": {
    "modalDepth": 2,
    "pathLength": 3
  }
}

Limitations and assumptions

  • The path and operator vocabulary are supplied, with exact token matching. This is depth along one path, not a parsed formula's maximum modal nesting depth.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.

Alternative or Complementary methods

Use a parser, scope-aware representation, model checker, or proof procedure when the supplied token or witness representation is insufficient. A local passing check should not be promoted to global validity.

References

  1. Calculation and input contract: philosophy/modal-operator-nesting-depth — tool.io

Similar or alternative tools