checker

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analysis

type Analysis struct {
	Types                  map[*ast.Node]ast.TypeInfo
	Functions              map[string]FunctionInfo
	Structs                map[string]ast.TypeInfo
	Bridges                []SchemaBridge
	OptimizationSignatures []OptimizationSignature
	Diagnostics            []Diagnostic
	Private                map[string]bool
}

Analysis contains the inferred type/layout for every visited AST node. The AST nodes are also annotated so later lowering passes can consume the metadata without maintaining a second node-keyed lookup table.

func Analyze

func Analyze(root *ast.Node) *Analysis

Analyze performs the non-fatal semantic pass. Dynamic or unresolved values remain Unknown; diagnostics are emitted only when both sides of a rule are known well enough to prove the program is invalid.

func Check

func Check(node *ast.Node) *Analysis

type Diagnostic

type Diagnostic struct {
	Reason string
	Line   int
	Column int
}

Diagnostic is a semantic error that can be reported without terminating a library caller. The command-line checker converts these into HowlFrame's normal JSON error format in Check.

type FunctionInfo

type FunctionInfo struct {
	Params []ast.TypeInfo
	Return ast.TypeInfo
}

FunctionInfo is the typed signature collected from a defun declaration.

type OptimizationCandidate

type OptimizationCandidate struct {
	Label   string
	Payload string
}

OptimizationCandidate is one labeled prompt or program variant recorded by an optimize_signature declaration.

type OptimizationSignature

type OptimizationSignature struct {
	Name       string
	Metric     string
	Tests      []string
	Candidates []OptimizationCandidate
	Line       int
	Column     int
	BodyType   ast.TypeInfo
}

OptimizationSignature records compile-time optimization intent. Test commands and candidates are metadata only; the compiler never executes them.

type SchemaBridge

type SchemaBridge struct {
	Target     string
	Constraint ast.TypeInfo
}

SchemaBridge records a source expression whose output is constrained to a declared HowlFrame struct at a model or other structured-output boundary.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL