Skip to main content

Crate delhi_lang

Crate delhi_lang 

Source
Expand description

The delhi surface language: lexer, parser, grounding, and lowering to delhi-mb.

Re-exports§

pub use ask::ask;
pub use ask::modal_literals;
pub use ask::Answer;
pub use ast::Arg;
pub use ast::Ast;
pub use ast::Expr;
pub use ast::Modal;
pub use ast::Term;
pub use attitudes::state_view;
pub use attitudes::AgentView;
pub use attitudes::StateView;
pub use constants::Constants;
pub use expand::expand;
pub use expand::expand_ast;
pub use expand::Defs;
pub use ground::atom_key;
pub use ground::Sig;
pub use init_decl::build_declarative;
pub use init_explicit::build_explicit;
pub use lex::lex;
pub use lex::Tok;
pub use lex::Token;
pub use lower_action::ground_actions;
pub use lower_action::Ctx;
pub use lower_action::GroundAction;
pub use lower_formula::lower_formula;
pub use lower_formula::Bindings;
pub use parse_expr::Parser;
pub use parse_file::parse_file;
pub use print::print_state;
pub use problem::load;
pub use problem::Problem;
pub use span::Diagnostic;
pub use span::Diagnostics;
pub use span::Located;
pub use span::Span;

Modules§

ask
Enumerating the formulas of a given shape that hold, rather than checking one.
ast
Abstract syntax. Types only — no logic lives here.
attitudes
What a state means, as data: every agent’s attitude to every proposition.
constants
Compile-time constants (§7.1). Never atoms; folded to / during lowering.
expand
define — named formulas, expanded before anything is lowered.
ground
The signature: type hierarchy, objects, agents, and the ground atom table (§7.1).
init_decl
The declarative initially construction (§7.3).
init_explicit
The explicit state form (§7.3): worlds and edges written out directly.
lex
Tokeniser. Case of the first letter distinguishes types from objects (§7.1).
lower_action
Grounding action declarations into one ActionDef per parameter assignment.
lower_formula
Lowering surface formulas to delhi-syntax ids, desugaring §7.4 on the way.
parse_expr
Formula expressions. Precedence, loosest first: ->, |, &, prefix !, modality.
parse_file
Section parsing. Sections may appear in any order, at most once each.
print
Rendering a state in the explicit state syntax (§7.3).
problem
The front end assembled: a checked Problem, and load to read one from disk.
rules
rules — Horn clauses over constants, saturated before anything runs.
span
Source spans and rendered diagnostics.