Skip to main content

Compiler

Trait Compiler 

Source
pub trait Compiler<T>: Execute<T> { }
Expand description

A prompt compiler that translates natural-language text into one SPARQL query.

The query is intended for an Adapter; compiling it does not execute it. The program documents its assumptions about the target dataset, vocabulary, and adapter capabilities. Syntactic validity alone does not guarantee that a query captures the author’s intent.

§Command-line contract

PROGRAM [OPTIONS] [INPUT-FILE]

The natural-language input file defaults to - (stdin). On success, stdout contains a syntactically valid SPARQL query as UTF-8, without Markdown fences or explanatory prose outside the query. The query must produce a graph or use a form for which the intended adapter’s profile defines an RDF mapping. There are no standard pattern-specific options or output-file operand.

T is the implementation’s query representation. See crate::programs for links to concrete execution behavior and the compiler specification.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§