We have decided that functions no longer accepts a :default argument. In other words, no "non-constructor" functions can no longer be implicitly created. Instead, the user is responsible for initializing functions using set explicitly.
This means the following function (from merge-saturates.egg) is no longer expressible in egglog, because (1) baz should not have a :default and (2) looking up (baz new) in bar's merge expression is not allowed (related: #420).
(function baz (i64) i64 :default 0)
(function bar () i64 :merge (min (baz new) 0))
(set (bar) 1)
(set (bar) 2)
(rule ((= f (baz x)) (< x 50))
((set (bar) (+ x 1))))
We have decided that functions no longer accepts a
:default
argument. In other words, no "non-constructor" functions can no longer be implicitly created. Instead, the user is responsible for initializing functions usingset
explicitly.This means the following function (from
merge-saturates.egg
) is no longer expressible in egglog, because (1) baz should not have a :default and (2) looking up (baz new) in bar's merge expression is not allowed (related: #420).