Skip to main content

crashtest.hxsmith.features.functions

Static helper functions (default, optional and rest arguments, bounded recursion) and every call site.

This feature is the one place that turns g.fns into calls. A feature that generates bodies under restrictions (see classes) publishes g.state["calls"] = {"allow": Fn -> bool, "note": Fn -> None}.

class Functions(Feature)​

name​

name = 'functions'

summary​

summary = 'static helpers with default/optional/rest args and bounded recursion; all call sites'

covers​

covers = ('ECall', 'ETernary', 'APublic', 'AStatic', 'AInline')

order​

order = 60

declare​

def declare(g: Gen) -> None

exprs​

def exprs(g: Gen, ty: Ty)

stmts​

def stmts(g: Gen)