Skip to content

Type Alias: FunctionBodyDto

@kortexya/reasoninglayer


@kortexya/reasoninglayer / Functions / FunctionBodyDto

Type Alias: 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:43

Function body — what a clause computes.

Type Declaration

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

type

type: "Value"

value

value: FunctionValueDto

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

expr

expr: ExpressionDto

type

type: "Expression"

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

arguments

arguments: ExpressionDto[]

functionName

functionName: string

type

type: "FunctionCall"

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

codomain

codomain: FunctionValueDto[]

The admissible output values the program’s prediction is projected onto.

conformalTau?

optional conformalTau: number | null

Conformal calibration threshold tau; null when uncalibrated.

coverageThreshold

coverageThreshold: number

Minimum coverage the conformal prediction set must attain.

program

program: string

The neural program to execute.

type

type: "Neural"

Remarks

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.