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
- Enter operatorPath, suppliedModalOperators. Keep parallel arrays aligned. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read modalDepth, pathLength. Use the output convention below.
Count operatorPath tokens that occur in suppliedModalOperators into modalDepth and return pathLength=operatorPath.length.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| operatorPath | Operator Path | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
| suppliedModalOperators | Supplied Modal Operators | Required. Array of text; maximum UTF-16 length 8192; maximum items 256. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| modalDepth | Modal Depth | Required. Safe integer. |
| pathLength | Path Length | Required. Safe integer. |
{
"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
Similar or alternative tools
- Argument Assumption Scope Depth
Audit explicit opening/closing assumption-scope actions without evaluating argument validity.
- Modal Accessibility Edge Flag
Inspect explicitly listed directed accessibility edges without assuming modal frame axioms.