Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete -naive flag and disallow lookup actions in rules #461

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

FTRobbin
Copy link
Collaborator

@FTRobbin FTRobbin commented Nov 6, 2024

This PR fixes Issue #420. Lookup actions in rules will now cause a type error LookupInRuleDisallowed.

Move specifically, this PR:

  1. Removes -naive flag and related desugaring code due to being replaced by this change.

  2. Fixes 'fail' failing due to not being identified as global in the remove_global rewrite pass.

  3. Adds new positive and negative tests for this type error.

  4. Rewrites the existing tests for compatibility with the new type error.

@FTRobbin FTRobbin requested a review from a team as a code owner November 6, 2024 23:35
@FTRobbin FTRobbin requested review from mwillsey and removed request for a team November 6, 2024 23:35
Copy link

codspeed-hq bot commented Nov 6, 2024

CodSpeed Performance Report

Merging #461 will improve performances by ×43

Comparing haobinni-0904 (dc42cd3) with main (2c8d947)

Summary

⚡ 4 improvements
✅ 4 untouched benchmarks

🆕 1 new benchmarks

Benchmarks breakdown

Benchmark main haobinni-0904 Change
eggcc-extraction 4,469.1 ms 103.7 ms ×43
herbie 308.7 ms 289.4 ms +6.66%
lambda 159.2 ms 126.4 ms +25.98%
🆕 looking_up_global N/A 314.3 µs N/A
python_array_optimize 6.9 s 6.1 s +13.84%

// for the later atoms, we consider everything
let mut timestamp_ranges =
vec![0..u32::MAX; cq.query.funcs().collect::<Vec<_>>().len()];
if do_seminaive {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we still want to keep the -naive flag as well as the code here, so the user can still do naive evaluation (useful for debugging, also have a different semantics than semi-naive for "unsafe" egglog).

@saulshanabrook
Copy link
Member

I'm a little worried about the time improvements, especially for lambda... That one is so dramatic I worry that maybe the semantics of the example changed?

Seeing all the changes, I also worry about the degradation for UX, it seems just more unwieldy with this change.

I know you said that automated desuguring had some issues, but I am wondering if that could be used to at least addressost of these cases? Where there particular issues with it for some cases or just in general?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants