Cairn · module

Cairn.Fuzz.Target

lean/Cairn/Fuzz/Target.lean

What the fuzzer knows about an app

A Target bundles a machine (and the App built from it, if any) with what the claims say about it. fuzz_targets% (Cairn.Fuzz.Collect) builds one per machine in the app's modules (and its dependencies') at compile time, so an app needs no fuzz code of its own.

Imports Cairn.Fuzz.Rng, Cairn.Claims.Core

Order

Structures 2

structure

Cairn.Fuzz.InvCheck

lean/Cairn/Fuzz/Target.lean:15
InvCheck (S : Type) : Type

An invariant, with its runnable check if it has one (invariant generates check when its statement is decidable).

Fields
info : ClaimInfo
decl : String

The invariant's declaration, relative to the app's namespace (for printed flows).

check : Option (S → Bool)
structure

Cairn.Fuzz.Target

lean/Cairn/Fuzz/Target.lean:21
Target : Type 1
Fields
name : String

Fixture: what lake exe fuzz is given. A dependency's has its package in front, cairn_atproto/Claims.

module : String

Fixture, the machine's module.

package : String

The machine's Lake package (fixture), or "" if Lake named none.

dependency : Bool

Whether the machine is a dependency's rather than the fuzz executable's own package's: run only when named, or with --deps.

ns : String

The namespace the claims live in, for printed flows.

machineDecl : String

The machine's and the app's declarations, relative to ns.

appDecl : Option String
S : Type
machine : Claims.Machine self.S
app : Option (App self.S)
keyed : List ClaimId

Claim ids of the keyed moves (^N#k).

invariants : List (InvCheck self.S)
claims : List ClaimInfo

Every claim the app's module declares, retired ones included.

custom : Custom self.S

Definitions 2

def

Cairn.Fuzz.Target.srv

lean/Cairn/Fuzz/Target.lean:48
srv (t : Target) : Server t.S

The app's server, or Server.empty (no world, nothing handled).

abbrev

Cairn.Fuzz.Target.W

lean/Cairn/Fuzz/Target.lean:51
W (t : Target) : Type

What the app's server holds (Unit without one).