Skip to content

Type Alias: FunctionBodyDto

@kortexya/reasoninglayer


@kortexya/reasoninglayer / FunctionBodyDto

FunctionBodyDto = { type: "Value"; value: FunctionValueDto; } | { expr: ExpressionDto; type: "Expression"; } | { arguments: ExpressionDto[]; functionName: string; type: "FunctionCall"; } | { codomain: FunctionValueDto[]; conformalTau?: number | null; coverageThreshold: number; program: string; type: "Neural"; }

Defined in: src/types/functions.ts:91

Function body — what a clause computes.

{ type: "Value"; value: FunctionValueDto; }


{ expr: ExpressionDto; type: "Expression"; }


{ arguments: ExpressionDto[]; functionName: string; type: "FunctionCall"; }


{ codomain: FunctionValueDto[]; conformalTau?: number | null; coverageThreshold: number; program: string; type: "Neural"; }

codomain: FunctionValueDto[]

The admissible output labels the program’s prediction is projected onto. Must be non-empty, and every entry a non-blank string label distinct from the others; otherwise the write is refused with 422 (function_codomain_empty, function_codomain_non_string_label, function_codomain_blank_label, function_codomain_repeats_label).

optional conformalTau?: number | null

Conformal calibration threshold tau; null when uncalibrated.

coverageThreshold: number

Minimum coverage the conformal prediction set must attain.

program: string

The neural program to execute.

type: "Neural"

Tagged union discriminated by type. Value returns a literal, Expression evaluates an arithmetic/logical expression, FunctionCall delegates to another function, and Neural evaluates a neural/fuzzy program whose output is conformalized against codomain.