Table of Contents

Sailboat

Demonstrates: a stateful model with real computation in rules, pairwise parameter generation, and state-dependent [Domain] methods.

  • Project: samples/Sailboat
  • Model: Sailboat.Model.SailboatModel

What it covers

Sail(Heading, hours, knots) moves the boat using trigonometry and clamps to the shore; RunAground(atx, aty) and Rescue() model the grounding lifecycle. The Sail domains (hours, knots) and pairwise strategy come from Cord; RunAground's atx/aty use state-dependent [Domain] methods (=> new[]{X} / => new[]{Y}) so the guard atx == X is always satisfiable.

Point-shoot result: 19 states / 46 transitions / 3 accepting.

Run it

dotnet build samples/Sailboat/Model/Sailboat.Model.csproj
sek explore PointAndShoot --project samples/Sailboat

Why it matters

Sailboat shows that rules can run arbitrary C# (here, Math.Cos/Math.Sin), that parameters can be generated pairwise, and that a [Domain] method can depend on the current state — a general capability, not sample-specific.