Phronesis core grammar network configuration#1
Merged
hyperpolymath merged 1 commit intomainfrom Dec 16, 2025
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
Standard library stubs (Std.*):
Also includes:
The implementation follows the formal operational semantics document, ensuring: