Skip to main content

Crate probl_sema

Crate probl_sema 

Source
Expand description

The middle of the Probl pipeline: name resolution, lowering to IR and liveness analysis.

Re-exports§

pub use builtins::Builtin;
pub use builtins::Constant;
pub use liveness::Liveness;
pub use liveness::SlotSet;
pub use liveness::analyze;
pub use lower::lower;
pub use lower::lower_with_symbols;

Modules§

builtins
The built-in functions: names, arities and how they treat distributions.
coercions
Recognize numeric literals for early contextual conversion and diagnostics.
conjugate
Exact updates for conjugate priors, when sampling (docs/semantics.md, section 14).
data
Reading data: the rules that the compiler, the loader and probl schema share (docs/data-input.md).
docs
Documentation of the built-in functions and the keywords: what an editor shows on hover and when completing, and the playground’s reference.
effects
What functions do besides computing a result, and the rule that no observe may run after a report (docs/semantics.md, sections 6 and 7).
ir
The intermediate representation run by the engine.
liveness
Which variables may still be read after each statement.
lower
Name resolution and lowering from the AST to the IR.
pretty
A readable rendering of the IR, for tests and debugging.
symbols
Where a program’s names are declared and used, recorded as the program is lowered, so they’re resolved exactly as the compiler resolves them. It’s what an editor needs to go to a name’s definition, describe it, and complete names (docs/playground.md).

Constants§

MAX_SOURCE
The largest source text compile accepts, in bytes.

Functions§

compile
Parse and lower a program. The IR is only returned when there are no errors; warnings are returned either way.
compile_with_symbols
Parse and lower a program, and say where its names are declared and used. The symbols are there if it parses, even with other errors.