logicaffeine_compile/
lib.rs1#![cfg_attr(docsrs, feature(doc_cfg))]
2#![doc = include_str!("../README.md")]
3
4pub use logicaffeine_base::{Arena, Interner, Symbol, SymbolEq};
6
7pub use logicaffeine_language::{
9 ast, drs, error, lexer, optimization, parser, token,
10 analysis::{TypeRegistry, DiscoveryPass, PolicyRegistry, PolicyCondition},
11 arena_ctx::AstContext,
12 registry::SymbolRegistry,
13 formatter,
14 mwe,
15 Lexer, Parser, ParseError,
16};
17
18pub use logicaffeine_kernel as kernel;
20
21pub mod loader;
23pub use loader::{Loader, ModuleSource};
24
25pub mod analysis;
27
28pub mod concurrency;
31
32#[cfg(feature = "codegen")]
34pub mod codegen;
35
36#[cfg(feature = "codegen")]
40pub(crate) mod loop_shape;
41
42#[cfg(feature = "codegen")]
44pub mod codegen_c;
45
46pub mod codegen_sva;
48
49pub mod compile;
51pub use compile::{CompileOutput, CrateDependency, classify_source, compile_program_full, compile_program_full_deterministic, compile_program_full_with_proven, compile_to_rust, compile_to_rust_deterministic, compile_to_rust_with_proven, first_parallel_block_independent, send_check_source};
52
53pub mod diagnostic;
55
56pub mod sourcemap;
58
59pub mod extraction;
61
62pub mod optimize;
64
65pub mod interpreter;
67
68pub(crate) mod tail_call;
71
72pub(crate) mod resolve_division;
75
76pub mod semantics;
79
80pub mod vm;
82
83pub mod debug;
86
87pub mod ui_bridge;
89
90pub mod repl;
92pub use repl::{ReplOutcome, ReplSession};
93
94#[cfg(feature = "verification")]
95pub mod defeasible;
96
97#[cfg(feature = "verification")]
99pub mod verification;
100#[cfg(feature = "verification")]
101pub use verification::VerificationPass;
102
103pub use ui_bridge::{
105 answer_question, compile_for_ui, compile_for_proof, compile_theorem_for_ui,
106 grounded_grid_problem, solve_grid, SolvedGrid, GridColumn,
107 prove_theorem_trace, theorem_proof_exprs, theorem_dependency_graph, verify_theorem, TheoremTrace,
108 interpret_for_ui, interpret_for_ui_with_args, interpret_for_ui_sync,
109 interpret_for_ui_sync_with_args, interpret_for_ui_baseline,
110 interpret_for_ui_baseline_with_args, interpret_for_ui_baseline_sync_with_args,
111 interpret_streaming, interpret_streaming_with_vfs, interpret_streaming_with_vfs_observer,
112 ObserverCallback, run_vm_concurrent, run_vm_net_async,
113 run_vm_concurrent_seeded, run_treewalker_concurrent_seeded,
114 CompileResult, ProofCompileResult,
115 TheoremCompileResult, AstNode, TokenInfo, TokenCategory,
116 extract_math_rust, extract_math_rust_from_source, extract_logic_rust, parse_math_statements,
117 extract_math_module, extract_math_module_from_source, extract_logic_module, partition_mixed,
118};
119
120#[cfg(not(target_arch = "wasm32"))]
122pub use ui_bridge::run_vm_workstealing_seeded;
123#[cfg(feature = "codegen")]
124pub use ui_bridge::{generate_rust_code, generate_rust_code_with_proven};
125#[cfg(feature = "verification")]
126pub use ui_bridge::{
127 check_theorem_defeasible, check_theorem_defeasible_consistent,
128 check_theorem_premises_consistent, check_theorem_smt,
129};
130
131pub mod intern {
133 pub use logicaffeine_base::{Interner, Symbol, SymbolEq};
134}
135
136pub mod arena {
137 pub use logicaffeine_base::Arena;
138}
139
140pub mod arena_ctx {
141 pub use logicaffeine_language::arena_ctx::*;
142}
143
144pub mod registry {
145 pub use logicaffeine_language::registry::*;
146}
147
148pub mod style {
149 pub use logicaffeine_language::style::*;
150}