Skip to content

The first programming language for choreographers of figure skating

License

Unknown, Unknown licenses found

Licenses found

Unknown
LICENSE
Unknown
LICENSE.txt
Notifications You must be signed in to change notification settings

hyperpolymath/anvomidav

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

License: PMPL-1.0 Palimpsest

Anvomidav

Rust 1.75+ Tests

The first programming language for choreographers of figure skating.

Status

Note

✅ Green Tick Complete (2026-01-31)

Anvomidav has achieved Green Tick status with 3 of 4 core language features: - ✅ Record field access (domain-specific types) - ✅ Stdlib integration (ISU rules validator) - ✅ Enhanced error messages with helpful hints - ❌ Workers N/A (choreography DSL, sequential execution)

Overall Completion: 100% of core language features

What’s Working

Component Description Status

Lexer

Tokenizes Anvomidav source using logos

✓ Complete

Parser

Builds AST using chumsky 0.9 combinators

✓ Complete

Type System

Basic type checking for programs

✓ Complete

ISU Rules

Validates programs against ISU regulations

✓ Complete

CLI

Command-line interface (anv)

✓ Complete

All Disciplines

Singles, Pairs, Ice Dance support

✓ Complete

Error Hints

Helpful hints for ISU rule violations

✓ Complete

Enhanced Error Messages

Anvomidav provides context-aware error hints for ISU rule violations:

error[E0201]: Too many jump elements: found 8, maximum 7
  --> program.anv:12:5
   |
12 |         jump quad lutz
   |         ^^^^^^^^^^^^^^
   |
help: ISU rules limit jump elements to 7 in this segment.
      Consider removing some or moving to a different sequence.

All semantic errors include helpful hints that: - Explain the ISU rule being violated - Suggest specific fixes - Reference discipline-specific requirements

Architecture

┌─────────────────────────────────────────────────────────────────┐
│                         anv-cli                                 │
│                    (Command Line Interface)                     │
│         check · parse · lex · fmt · new                         │
└────────────────────────┬────────────────────────────────────────┘
                         │
         ┌───────────────┼───────────────┐
         │               │               │
         ▼               ▼               ▼
┌─────────────┐  ┌─────────────┐  ┌─────────────┐
│ anv-syntax  │  │ anv-types   │  │anv-semantics│
│   Lexer     │  │   Type      │  │  ISU Rules  │
│   Parser    │  │   Checker   │  │  Validation │
│   AST       │  │             │  │             │
└──────┬──────┘  └──────┬──────┘  └──────┬──────┘
       │                │                │
       └────────────────┼────────────────┘
                        │
                        ▼
               ┌─────────────────┐
               │    anv-core     │
               │  Skating Types  │
               │  Source Spans   │
               │  Diagnostics    │
               └─────────────────┘

Quick Start

Building from Source

# Clone the repository
git clone https://github.com/hyperpolymath/anvomidav.git
cd anvomidav

# Build all crates
cargo build --release

# Run tests (90+ passing)
cargo test

# Install the CLI
cargo install --path crates/anv-cli

Creating Your First Program

# Create a new singles program
anv new my_program --template singles

# Check for errors
anv check my_program/main.anv

# View the AST
anv parse my_program/main.anv

Language Syntax

Basic Program Structure

program competition_2025 {
    segment sp: short {
        sequence opening {
            jump triple axel
            spin camel L3
            step circular L4
        }
    }

    segment fs: free {
        sequence jumps {
            jump quad lutz
            jump triple flip
            jump triple loop
        }
    }
}

Jump Elements

Anvomidav supports all ISU-recognized jumps with rotation counts:

jump single toe_loop    // 1T
jump double salchow     // 2S
jump triple axel        // 3A
jump quad lutz          // 4Lz
jump triple flip        // 3F
jump double loop        // 2Lo

Spin Elements

Spins include position and level designation:

spin upright L2         // USp2
spin sit L3             // SSp3
spin camel L4           // CSp4
spin layback L3         // LSp3
spin biellmann L4       // BSp4

Step Sequences

step straight L3        // SlSt3
step circular L4        // CiSt4
step serpentine L2      // SeSt2

Pairs Elements

For pairs skating, additional elements are available:

lift Gr3 L4            // Group 3 lift, Level 4
lift Gr5 L3            // Group 5 (hand-to-hand) lift
throw triple axel      // 3ATh
twist double L3        // 2Tw3
death_spiral LBI L4    // Left Backward Inside death spiral

Ice Dance Elements

choreographic spiral   // ChSp
choreographic spread   // ChSl (spread eagle)
choreographic ina      // ChSl (Ina Bauer)
pattern waltz         // Pattern dance

Segment Types

segment sp: short      // Short Program
segment fs: free       // Free Skate
segment rd: rhythm     // Rhythm Dance (Ice Dance)
segment fd: free       // Free Dance (Ice Dance)
segment pd: pattern    // Pattern Dance
segment gala: exhibition  // Exhibition/Gala

ISU Rules Validation

The semantic analyzer validates programs against ISU Technical Panel guidelines:

Singles (Men’s/Ladies')

  • Short Program: Max 3 jumps, 2 spins, 1 step sequence

  • Free Skate: Max 7 jumps, 3 spins, 1 step sequence

  • No pairs elements allowed (lifts, throws, twists, death spirals)

Pairs

  • Short Program: 1 required lift, 1 throw, 1 twist, 1 death spiral

  • Free Skate: Multiple lifts, throws permitted

  • Side-by-side and synchronized elements supported

Ice Dance

  • Only single jumps permitted

  • No throws, twists, or death spirals

  • Pattern dances follow specific step patterns

  • Rhythm and Free Dance segments supported

CLI Commands

anv check <files>       # Check files for errors
anv parse <file>        # Parse and display AST
anv lex <file>          # Tokenize and display tokens
anv fmt <files>         # Format source files (WIP)
anv new <name>          # Create new project
    --template singles|pairs|ice-dance

Crate Documentation

Crate Description Lines

anv-core

Core skating types (Edge, JumpKind, SpinPosition, Level, etc.)

~500

anv-syntax

Lexer (logos) and Parser (chumsky), AST definitions

~1500

anv-types

Type checking and inference

~400

anv-semantics

ISU rules validation engine

~500

anv-cli

Command-line interface

~400

Technology Stack

Component Technology

Language

Rust (1.75+)

Lexer

logos 0.14

Parser

chumsky 0.9

Error Reporting

miette 7 (fancy diagnostics)

CLI Framework

clap 4

Serialization

serde/serde_json

Examples

Men’s Short Program

program mens_short_2025 {
    segment sp: short {
        sequence elements {
            // Required jump element
            jump triple axel

            // Jump combination
            jump triple lutz
            jump triple toe_loop

            // Flying spin
            spin camel L3

            // Spin with only one change of foot
            spin sit L3

            // Step sequence
            step circular L4
        }
    }
}

Pairs Free Skate

program pairs_free_2025 {
    segment fs: free {
        sequence opening {
            lift Gr5 L4
            throw triple salchow
        }

        sequence middle {
            twist triple L3
            death_spiral LBO L4

            sync {
                jump triple toe_loop
            }
        }

        sequence closing {
            spin camel L4
            step circular L4
            choreographic spiral
        }
    }
}

Documentation

License

Dual-licensed under PMPL-1.0 OR PMPL-1.0-or-later. Choose the license that best fits your use case.

Contributing

Contributions welcome! We’re looking for:

  • Figure skating domain experts — Help refine element definitions

  • Compiler engineers — Work on optimization and codegen

  • UI/UX designers — Design visualization outputs

  • Documentation writers — Improve tutorials and guides

See CONTRIBUTING.adoc for workflow details.

Sponsor this project

Packages

No packages published

Contributors 2

  •  
  •