Claude/phronesis network grammar bqtim#14
Merged
hyperpolymath merged 7 commits intomainfrom Dec 17, 2025
Merged
Conversation
CLI/REPL (lib/phronesis/cli.ex): - `phronesis run <file>` - Execute policy files - `phronesis parse <file>` - Show AST - `phronesis check <file>` - Validate syntax - `phronesis repl` - Interactive REPL with state management - Build with `mix escript.build` Safety Proofs (docs/safety_proofs.md): - Sandbox Isolation: Policies cannot escape execution environment - Capability Enforcement: Operations require explicit grants - Byzantine Fault Tolerance: Safety with N >= 3f + 1 agents - Combined security analysis and attack surface review TLA+ Consensus Model (formal/PhronesisConsensus.tla): - Formal specification of PBFT-style consensus protocol - Safety properties: Agreement, Validity, Non-repudiation - Liveness properties: EventualDecision, Progress - Configuration for TLC model checker included Also updates mix.exs with escript configuration.
- Add IRTF Internet-Draft document for standards submission - Update StdConsensus to use Raft when available with simple voting fallback - Update StdRPKI with real validator integration and local ROA fallback - Add comprehensive mock ROA database for testing
…ting framework Roadmap: - Version timeline from v0.1.x to v1.0.0 - Language evolution phases - Lexer/Parser/Interpreter roadmaps - REPL and CLI tooling plans - IDE support (LSP) roadmap - Framework and library ecosystem - Security and performance targets Wiki Documentation (20 pages): - Home and navigation structure - Installation guide - Quick Start tutorial - Language Overview and Syntax Reference - Types reference - Standard Library docs (RPKI, BGP, Consensus, Temporal) - Architecture Overview and Lexer architecture - CLI Reference - Tutorial: BGP Security - Testing guide - Contributing guide - FAQ - Formal Semantics specification - Grammar Reference (EBNF) Property-Based Testing Framework (Echidna-inspired): - Invariant testing for safety properties - Property-based tests with shrinking - Fuzz testing for robustness - Generators for network policy testing - Integration with ExUnit
- Add hex (0xFF), binary (0b1010), and octal (0o755) integer literals
- Add scientific notation for floats (1.5e10, 3e-5)
- Add raw strings r"..." (no escape sequences)
- Add multi-line strings """..."""
- Add comprehensive IPv6 address literal support
- Add string interpolation with ${expr} syntax
- Add modulo operator (%), optional chaining (?.), null coalescing (??)
- Add null keyword and brackets/braces tokens
- Fix Bitwise import in RPKI modules
- Add comprehensive v0.2.x lexer test suite (49 tests)
- Add enhanced error module with contextual messages and suggestions - Add support for new v0.2.x literal types (hex/binary/octal integers, IPv6 addresses, raw strings, multiline strings, interpolated strings) - Add null literal support - Enhanced error messages include: - What was expected vs what was found - Parse context (policy, condition, action, etc.) - Suggestions for common mistakes - Details map for IDE integration - Update AST with interpolated_string constructor - Update tests for new error format
- Add optional chaining parser support: record?.field?.nested - Add field access and optional access AST nodes - Add interpreter support for field_access, optional_access - Add interpreter support for interpolated string evaluation - Add lexer tests for optional chaining tokens - All 140 tests passing
Signed-off-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com>
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.
No description provided.