Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions egglog-experimental/src/fresh_macro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ fn desugar_fresh_rule(
schema: Schema {
input: schema,
output: output_sort,
extra_outputs: vec![],
},
cost: first_opts.cost,
unextractable: first_opts.unextractable,
Expand Down
2 changes: 2 additions & 0 deletions egglog-experimental/src/primitive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ fn required_context(egraph: &mut EGraph, expr: &ResolvedExpr) -> Context {
}
}
ResolvedCall::Primitive(_) => Context::Pure,
// `values` builds/destructures a tuple value; it reads or writes no tables.
ResolvedCall::Values(_) => Context::Pure,
ResolvedCall::Func(func) => match func.subtype {
FunctionSubtype::Constructor => Context::Write,
FunctionSubtype::Custom => Context::Read,
Expand Down
14 changes: 14 additions & 0 deletions egglog/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,20 @@

## [Unreleased] - ReleaseDate

- **Tuple-output functions.** A function may declare more than one output sort, e.g.
`(function interval (Math) (i64 i64) :merge (values (max old0 new0) (min old1 new1)))`. Such a
function stores its outputs as separate value columns; the functional dependency is
`keys -> (value0, value1, ...)`. Outputs are destructured in queries with
`(= (values lo hi) (interval x))`, written with `(set (interval x) (values 0 100))`, and merged
with a `(values ...)` clause whose `i`-th element merges column `i` using the bound variables
`old0`, `new0`, `old1`, `new1`, .... Tuple outputs are only allowed for plain functions (not
constructors, relations, or view tables) and are not supported by the term/proof encoding.
- Built-in keywords (most command, action, and schedule heads such as `function`, `set`, `union`,
`rule`, `run`, ..., plus the tuple constructor `values`) are now reserved and may no longer be
used as user identifiers (function/sort/constructor/relation/variant names or variables). Names
starting with `:` are likewise reserved, since that prefix marks option keywords (`:merge`,
`:cost`, ...). The common-word commands `input` and `output` are only partially reserved: they
remain usable as variables, but not as definition names or as the head of a call expression.
- Add typed `EGraph` extension state that clones with `EGraph` and is restored by `push`/`pop`.
- Report full source file paths in egglog span and error messages.
- Fix seminaive matching after nested containers rebuild in place by propagating dirty container ids through parent containers.
Expand Down
Loading
Loading