Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Conformance suite

简体中文

The language specification is the normative definition of Puddi. The conformance suite, in conformance/ of the compiler repository, checks a pud binary against it from the outside:

  • every case names the spec sections it verifies;
  • every normative section (chapters 2 to 10) has at least one passing case, and CI fails if one does not;
  • cases marked xfail record where the compiler still differs from the spec. A known gap that gets fixed makes the run fail until the marker is removed, so the list stays accurate.

Every normative section has passing coverage in v0.1.2. The release workflow runs the suite on every native release binary before publishing.

Running it

The suite needs Node.js 22 or newer and runs against any pud, including an installed release:

git clone https://github.com/puddi-lang/puddi
cd puddi
node conformance/run.mjs --pud ~/.pud/bin/pud --coverage
OptionEffect
--pud <path>the binary to test (default: target/release/pud, then target/debug/pud, then pud)
--filter <text>only cases for a section such as 3.7, or whose path contains the text
--coverageprint a per-section report
--strict-coveragefail when a normative section has no passing case
--json <file>write a machine-readable report
--listlist the cases without running them
--jobs <n>limit the number of cases running at once
--timeout <seconds>set the time limit per case

Known gaps in 0.1

The following gaps apply to v0.1.0 and v0.1.1. Their conformance cases pass in v0.1.2.

SectionGap
2.4no warnings for naming-convention violations
2.4struct literals need an uppercase type name
3.7U8 + 0.5 does not default the literal to Float
3.12Self.Item does not resolve inside an impl
3.12a duplicate impl is accepted
4.6let inc = |x| x + 1 needs a parameter annotation
8.3exports that use WIT records, variants, enums or flags fail to compile

Writing cases

A case is a .pud file (or a small package) with a header of // comments that names the sections it covers and how to run it, and //> lines with the expected output. The format is described in the suite’s README. A change to the specification’s normative text should come with cases for it; see Contributing.