Claude/add academic proofs g3z zu#7
Merged
Conversation
This commit adds exhaustive academic documentation covering the theoretical foundations of the Anvomidav DSL for figure skating choreography notation. ## Formal Specification - grammar.adoc: Complete EBNF grammar, lexical specification, parsing complexity - semantics.adoc: Operational, denotational, and axiomatic semantics - automata-theory.adoc: DFAs, PDAs, timed automata, tree automata ## Type Theory - type-system.adoc: Dependent types, refinement types, effect system, linear types - category-theory-foundations.adoc: CCCs, monads, adjunctions, fibred categories ## Domain Mathematics - rink-geometry.adoc: Coordinate systems, paths, collision detection, topology - temporal-specification.adoc: LTL, MTL, duration calculus, timed CSP - skating-physics.adoc: Mechanics, dynamics, biomechanics - numerical-analysis.adoc: Integration, error analysis, constraint handling ## Verification - rules-specification.adoc: Formal ISU rule encoding - verification-methodology.adoc: Theorem proving, model checking, runtime verification - abstract-interpretation.adoc: Abstract domains, Galois connections, static analysis - computational-complexity.adoc: Time/space bounds, decision problems, FPT ## Proofs - soundness-completeness.adoc: Type soundness, semantic correctness, compiler correctness ## White Papers - anvomidav-overview.adoc: Technical white paper summarizing the language Each document includes theorems, proofs (or proof sketches), definitions, and clearly marked TODO sections for areas requiring further development.
Comprehensive architecture document covering: - 14 crate workspace structure - Dependency graph between crates - Key Rust crate selections (logos, chumsky, z3, tower-lsp, etc.) - API sketches for each component - 6-phase development roadmap - Testing strategy (unit, property-based, snapshot, integration) - Error handling approach with miette
Add complete workspace structure with four crates: - anv-core: Domain types (Time, Position, Edge, JumpKind, Rotations, SpinPosition, Level, Diagnostics) for figure skating semantics - anv-syntax: Lexer using logos with figure skating-specific tokens (edges, jumps, spins, levels) and parser using chumsky producing a typed AST - anv-types: Hindley-Milner type checker with domain-specific types (Jump, Spin, StepSequence, etc.) and skating rule validation - anv-cli: Command-line interface with check, parse, lex, fmt, and new commands using clap and miette for error reporting The language supports: - Program structure with segments (short/free/pattern) - Element sequences with jumps, spins, step sequences - Timing constraints and position tracking - ISU-compliant element validation
- Add 22 new tests covering parser and type checker (68 total) - Fix clippy warnings (enum_variant_names, while_let_on_iterator, etc.) - Use #[default] derive macro for RotationDirection and Level enums - Document safety invariant in switch_foot with expect() - Box recursive expression parser components to reduce stack usage - Use is_some_and instead of deprecated map_or pattern - Fix token naming consistency (toe_loop not toe) - Update ignored test message with accurate chumsky 0.9 limitation note All 68 tests pass with 2 ignored for known issues: - Function definition requires chumsky 0.10+ upgrade - Doc-test skipped due to expression parsing
- Add anv-semantics crate with ISU rules validation engine - Discipline-specific rules (singles, pairs, ice dance) - Element count validation per segment type - Constraint checking (no pairs elements in singles, etc.) - Extend parser for pairs and ice dance elements: - Lifts (Gr1-Gr5) with levels - Throws with rotation counts - Twists with rotation and level - Death spirals with edge and level - Choreographic elements (spiral, spread, ina, hydroblading, pivot) - Add rhythm and exhibition segment types - Update README.adoc with: - Architecture diagram - Complete syntax documentation - CLI command reference - Examples for all disciplines - Current implementation status - Update ROADMAP.adoc with: - Visual progress indicator - Detailed task completion tracking - Test coverage summary (90+ tests) - Technical debt section
Replace manual Default impl with #[derive(Default)] for cleaner code.
New crate providing a flat, timeline-based IR for skating programs: - types.rs: TimeCode and Duration types with arithmetic - rink.rs: Position, RinkDimensions, Heading for rink geometry - ISU Olympic rink dimensions (60m x 30m) - Named positions (center, corners, judges side) - timeline.rs: Event-based timeline with ISU code generation - All element types (jumps, spins, steps, pairs, dance) - JSON export support - Event filtering and querying - lower.rs: AST to IR lowering with position estimation 14 new tests, all passing. Total test count now 104+.
New crate for generating visual representations of skating programs: - rink_svg.rs: SVG rink diagram renderer - Olympic rink dimensions with ice markings - Element position markers with ISU codes - Color-coded element types (jumps=red, spins=blue, etc.) - Skating path traces - Configurable options (size, labels, markings) - timeline_svg.rs: SVG timeline chart renderer - Horizontal timeline with time axis - Segment markers - Element bars with duration - Color-coded by element type Rendering functions: - render_to_svg(timeline) -> String - render_to_file(timeline, path) -> Result 4 new tests, all passing. Total test count now 108+.
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.