IProgramSynthesizer<T>

Interfaces · AiDotNet.ProgramSynthesis.Interfaces

Represents a program synthesis engine capable of automatically generating programs.

Implements: IFullModel<T, Tensor<T>, Tensor<T>>

Known implementations: NeuralProgramSynthesizer<T>

For Beginners

A program synthesizer is like an AI programmer.

Imagine describing what you want a program to do, and an AI writes the code for you. That’s what a program synthesizer does. You provide:

  • Examples of inputs and desired outputs
  • A description in plain English
  • Or formal specifications

And the synthesizer creates a working program that meets your requirements. This is like having an AI assistant that can code for you!

How It Works

IProgramSynthesizer defines the interface for models that can automatically generate programs from specifications, examples, or natural language descriptions. This is a key component of automated programming and AI-assisted development.

Properties

Property Summary
ProgramLanguage TargetLanguage { get; } Gets the target programming language for synthesis.
SynthesisType SynthesisType { get; } Gets the type of synthesis approach used by this synthesizer.
int MaxProgramLength { get; } Gets the maximum allowed length for synthesized programs.

Methods

Method Summary
Program<T> RefineProgram(Program<T> program, ProgramInput<T> feedback) Refines an existing program to better meet the specification.
Program<T> SynthesizeProgram(ProgramInput<T> input) Synthesizes a program from the given input specification.
bool ValidateProgram(Program<T> program) Validates whether a synthesized program is correct and well-formed.
double EvaluateProgram(Program<T> program, ProgramInput<T> testCases) Evaluates how well a program satisfies the input specification.