Skip to content

strategy for built-in rules #25

@lzace817

Description

@lzace817

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)) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions