Skip to content

Comments

Phronesis core grammar network configuration#1

Merged
hyperpolymath merged 1 commit intomainfrom
claude/phronesis-network-grammar-BQTIM
Dec 16, 2025
Merged

Phronesis core grammar network configuration#1
hyperpolymath merged 1 commit intomainfrom
claude/phronesis-network-grammar-BQTIM

Conversation

@hyperpolymath
Copy link
Owner

Add complete implementation of the Phronesis DSL based on the formal grammar specification. This is a minimal, decidable policy language for network configuration with consensus-gated execution.

Core components:

  • Lexer: Hand-written tokenizer supporting 15 keywords, operators, IP addresses, datetimes, and all language literals
  • Parser: LL(1) recursive descent parser following the EBNF grammar
  • AST: Type-safe AST node definitions
  • Interpreter: Implements operational semantics with consensus checking
  • State: State model per formal spec (PolicyTable, ConsensusLog, Environment, PendingActions)

Standard library stubs (Std.*):

  • RPKI: Route validation against RPKI ROAs
  • BGP: AS path analysis and manipulation
  • Consensus: Distributed voting protocol interface
  • Temporal: Bounded temporal logic operators

Also includes:

  • Example policy files for BGP security, consensus routing, and traffic engineering
  • Comprehensive test suite (86 tests, all passing)

The implementation follows the formal operational semantics document, ensuring:

  • Termination: No loops, guaranteed halt
  • Consensus safety: Actions require distributed agreement
  • Non-repudiation: All executions logged immutably
  • Type safety: Progress + preservation guarantees

Add complete implementation of the Phronesis DSL based on the
formal grammar specification. This is a minimal, decidable policy
language for network configuration with consensus-gated execution.

Core components:
- Lexer: Hand-written tokenizer supporting 15 keywords, operators,
  IP addresses, datetimes, and all language literals
- Parser: LL(1) recursive descent parser following the EBNF grammar
- AST: Type-safe AST node definitions
- Interpreter: Implements operational semantics with consensus checking
- State: State model per formal spec (PolicyTable, ConsensusLog,
  Environment, PendingActions)

Standard library stubs (Std.*):
- RPKI: Route validation against RPKI ROAs
- BGP: AS path analysis and manipulation
- Consensus: Distributed voting protocol interface
- Temporal: Bounded temporal logic operators

Also includes:
- Example policy files for BGP security, consensus routing, and
  traffic engineering
- Comprehensive test suite (86 tests, all passing)

The implementation follows the formal operational semantics document,
ensuring:
- Termination: No loops, guaranteed halt
- Consensus safety: Actions require distributed agreement
- Non-repudiation: All executions logged immutably
- Type safety: Progress + preservation guarantees
@hyperpolymath hyperpolymath merged commit 7b4e6cd into main Dec 16, 2025
1 check failed
@hyperpolymath hyperpolymath deleted the claude/phronesis-network-grammar-BQTIM branch December 16, 2025 03:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants