Language Specification

Deterministic Syntax

CNL-PL is a strict subset of English. It reads naturally but parses deterministically. Every valid sentence maps to exactly one Abstract Syntax Tree (AST).

Core Rules (Determinism)

Boolean Grouping

Mixed and/or operators are forbidden without explicit grouping.

✓ If (A and B) or C.

✓ If either A or B.

✗ If A and B or C.

Noun Phrases

Must start with a determiner or quantifier to avoid ambiguity.

The user logs in.

Every server is active.

✗ User logs in.

Typed Predicates

Predicates follow fixed templates.

X is Y (Copula)

X has a capacity of 100 (Attribute)

X depends on Y (Relation)

Commands (Pragmatics)

Standard imperative forms for interacting with the system.

Command Example Pragmatic Mode
Return Return every user. Query
Verify Verify that John is active. Proof
Explain Explain why John is active. Explain
Solve Solve for ?X such that... Solve (CSP)
Maximize/Min Maximize the price of ?item... Optimize
Plan Plan to achieve Goal. Plan
Simulate Simulate 10 steps. Simulate

Naming Conventions

  • Things (Entities): Capitalized or with underscores (Socrates, Server_1).
  • Concepts (Categories): Lowercase, hyphenated (traffic-light, user, admin).
  • Variables: Start with ? (?X, ?truck). Only allowed in Solve/Optimize.

Reference

Defined in DS03 - Syntax and DS07 - Error Handling.