backupRoswaal has moved to roswaal.app. These pages are a backup copy.Go to roswaal.app

13 Conformance✎

How an implementation shows it follows the specification: fixtures for each level and profile, and a checker to run them.

NormativeDraft 0.1Pending review

Planned, not yet released

Draft 0.1 defines the levels (§1.3) but publishes no fixtures and no checker. Until it does, an implementation can only claim to follow the text. This chapter says what is coming, so it can be argued with before it is built.

13.1 Levels and fixtures

Each level of §1.3 is checked against fixtures: small inputs with the output a conforming implementation gives for them. An implementation conforms at a level when it gives that output for every fixture of the level.

LevelA fixture isPasses when
1 · FormatA graph file, and what reading it gives.Reading, then writing, gives the canonical file (§9.8); an old file reads as its migrated form (§9.7); a file from a newer version is refused.
2 · CompileA graph, and its problems or its program's behaviour.The same problems are reported on the same nodes and pins, and the program does what the fixture says, by running it where the profile can be run.
3 · RenderA graph, and every node's box and every pin's centre.Each box and centre is within half a unit of the fixture's (§5.2).
4 · InteractA graph, a sequence of actions, and the graph after them.The graph after is the same, and so is the number of undo steps (§4.9).

Rendering is checked by geometry rather than by pictures, so that fonts, antialiasing and themes do not decide whether an implementation conforms.

13.2 Per-profile fixtures

Levels 1, 3 and 4 hold in every profile, so their fixtures are written once, with a small library of nodes of their own. Level 2's are per profile:

sh
fixtures/
  format/            level 1
  render/            level 3
  interact/          level 4
  compile/
    roblox/          level 2, Luau for Roblox
    lune/            level 2, Luau for Lune

13.3 The checker

A command that runs the fixtures against an implementation and reports, per level and profile, which pass. Roswaal's will be roswaal conform; an implementation is driven through a small adapter that reads a graph and answers for it, so the checker does not need to know how it is built.

Not reviewed yet