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

strategy for built-in rules #25

Open
lzace817 opened this issue Oct 10, 2023 · 0 comments
Open

strategy for built-in rules #25

lzace817 opened this issue Oct 10, 2023 · 0 comments

Comments

@lzace817
Copy link

I suppose built-in rules should match with same semantic as user defined rules.
but there is no check for built-in corresponding to line 135.

built-in:

Noq/src/engine/rule.rs

Lines 155 to 157 in 716fae3

if let Some(bindings) = Expr::replace_head().pattern_match(expr) {
*match_count += 1;
let meta_rule = Rule::User {

user:

Noq/src/engine/rule.rs

Lines 134 to 136 in 716fae3

if let Some(bindings) = head.pattern_match(expr) {
let resolution = strategy.matched(*match_count);
*match_count += 1;

but I guess this feature is not released yet.

test case:

noq> test :: apply_rule(deep, b, c, apply_rule(deep, a, pair(b,b), a)) {
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

No branches or pull requests

1 participant