Skip to content

Commit 2c183d1

Browse files
Claude/add academic proofs g3z zu (#7)
Signed-off-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com> Co-authored-by: Claude <noreply@anthropic.com>
1 parent cbfe58f commit 2c183d1

14 files changed

Lines changed: 2065 additions & 23 deletions

File tree

Cargo.lock

Lines changed: 48 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ members = [
88
"crates/anv-syntax",
99
"crates/anv-types",
1010
"crates/anv-semantics",
11+
"crates/anv-ir",
12+
"crates/anv-viz",
1113
"crates/anv-cli",
1214
]
1315

@@ -27,6 +29,8 @@ anv-core = { path = "crates/anv-core" }
2729
anv-syntax = { path = "crates/anv-syntax" }
2830
anv-types = { path = "crates/anv-types" }
2931
anv-semantics = { path = "crates/anv-semantics" }
32+
anv-ir = { path = "crates/anv-ir" }
33+
anv-viz = { path = "crates/anv-viz" }
3034

3135
# Parsing
3236
logos = "0.14"

crates/anv-ir/Cargo.toml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# SPDX-License-Identifier: MIT OR AGPL-3.0-or-later
2+
# SPDX-FileCopyrightText: 2025 hyperpolymath
3+
4+
[package]
5+
name = "anv-ir"
6+
version = "0.1.0"
7+
edition = "2021"
8+
description = "Intermediate representation for the Anvomidav figure skating DSL"
9+
license = "MIT OR AGPL-3.0-or-later"
10+
repository = "https://github.com/hyperpolymath/anvomidav"
11+
keywords = ["figure-skating", "dsl", "compiler", "ir"]
12+
categories = ["compilers"]
13+
14+
[dependencies]
15+
anv-core = { workspace = true }
16+
anv-syntax = { workspace = true }
17+
thiserror = { workspace = true }
18+
ordered-float = { workspace = true }
19+
serde = { workspace = true }
20+
serde_json = { workspace = true }
21+
22+
[dev-dependencies]
23+
pretty_assertions = "1.4"

crates/anv-ir/src/lib.rs

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// SPDX-FileCopyrightText: 2025 hyperpolymath
2+
// SPDX-License-Identifier: MIT OR AGPL-3.0-or-later
3+
4+
//! Intermediate Representation for Anvomidav.
5+
//!
6+
//! The IR provides a flat, timeline-based representation of a skating program
7+
//! suitable for visualization and code generation. It transforms the hierarchical
8+
//! AST into a linear sequence of positioned, timed events.
9+
//!
10+
//! # Architecture
11+
//!
12+
//! ```text
13+
//! AST (hierarchical) → IR (flat timeline) → Output (SVG, etc.)
14+
//! Program Timeline
15+
//! Segment Event[]
16+
//! Sequence - position (x, y)
17+
//! Element - time (start, end)
18+
//! - element data
19+
//! ```
20+
//!
21+
//! # Example
22+
//!
23+
//! ```ignore
24+
//! use anv_ir::{lower, Timeline};
25+
//! use anv_syntax::parse;
26+
//! use anv_core::source::FileId;
27+
//!
28+
//! let source = r#"program test { segment sp: short { sequence s { jump triple axel } } }"#;
29+
//! let ast = parse(source, FileId(0)).unwrap();
30+
//! let timeline = lower(&ast);
31+
//! ```
32+
33+
pub mod lower;
34+
pub mod rink;
35+
pub mod timeline;
36+
pub mod types;
37+
38+
pub use lower::lower;
39+
pub use rink::{Position, RinkDimensions};
40+
pub use timeline::{Event, EventKind, Timeline};
41+
pub use types::{Duration, TimeCode};

0 commit comments

Comments
 (0)