Expand description
§egglog
egglog is a language specialized for writing equality saturation applications. It is the successor to the rust library egg. egglog is faster and more general than egg.
§Documentation
Documentation for the egglog language can be found here: Command.
§Tutorial
We have a text tutorial on egglog and how to use it. We also have a slightly outdated video tutorial.
Re-exports§
pub use ast::ResolvedExpr;pub use ast::ResolvedFact;pub use ast::ResolvedVar;
Modules§
- ast
- constraint
- extract
- prelude
- This module makes it easier to use
egglogfrom Rust. It is intended to be imported fully. - scheduler
- sort
- util
Macros§
- action
- actions
- add_
literal_ prim - This macro lets the user declare literal primitives with automatic validator generation. It automatically generates validators by converting between Rust values and Literal types.
- add_
primitive - This macro lets the user declare custom egglog primitives. It supports a few special features:
- add_
primitive_ with_ validator - This macro lets the user declare custom egglog primitives with explicit validators.
It combines primitive registration with a custom validator function.
See [
PrimitiveValidator] for details on the validator function signature. - call
- datatype
- Adds sorts and constructor tables to the database.
- expr
- fact
- facts
- lit
- match_
term_ app - sort
- span
- var
- vars
Structs§
- Command
Macro Registry - A registry of command macros
- EGraph
- The main interface for an e-graph in egglog.
- Execution
State - A handle on a database that may be in the process of running a rule.
- Function
- A function in the e-graph.
- Function
Row - A struct representing the content of a row in a function table
- NotFound
Error - Resolved
Schema - Serialize
Config - Serialize
Output - Output of serializing an e-graph, including values that were omitted if any.
- Specialized
Primitive - TermDag
- A hashconsing arena for
Terms. - Type
Info - Stores resolved typechecking information.
- Value
- A generic identifier representing an egglog value
Enums§
- Command
Output - Output from a command.
- Error
- Resolved
Call - RunMode
- Serialized
Node - A node in the serialized egraph.
- Term
- Like
Exprs but with sharing and deduplication. - Type
Error
Constants§
Traits§
- Base
Value - A simple data type that can be interned in a database.
- Command
Macro - A command macro that can transform commands during desugaring
- Container
Value - A trait implemented by container types.
- Primitive
- A trait for implementing custom primitive operations in egglog.
- User
Defined Command - A user-defined command allows users to inject custom command that can be called in an egglog program.
- User
Defined Command Output - A user-defined command output trait.
Functions§
- cli
- Start a command-line interface for the E-graph.
- file_
supports_ proofs - Reads a file and checks that its commands support the proof encoding.
- program_
supports_ proofs - Checks whether a desugared program supports proof encoding.
Type Aliases§
- ArcSort
- Atom
- Atom
Term - Primitive
Validator - Validators take a termdag and arguments (as TermIds) and return a newly computed TermId if the primitive application is valid, or None if it is invalid.
- TermId