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

Matchig variables - duplicated rule #48

Open
h0nzZik opened this issue Feb 25, 2020 · 0 comments
Open

Matchig variables - duplicated rule #48

h0nzZik opened this issue Feb 25, 2020 · 0 comments

Comments

@h0nzZik
Copy link
Collaborator

h0nzZik commented Feb 25, 2020

In strategies/matching.md, there are two rules for the same case:

// ground variable: mismatched
  rule #matchAssoc( terms:     T, Ts
                  , pattern:   P:Variable, Ps
                  , variables: Vs
                  , subst:     SUBST
                  , rest:      REST
                  )
    => #matchFailure("Variable does not match"), .MatchResults
    requires T =/=K P
     andBool notBool P in Vs

and

// ground variable: non-identical
  rule #matchAssoc( terms:     T, Ts
                  , pattern:   P:Variable, Ps
                  , variables: Vs
                  , subst:     _
                  , rest:      REST
                  )
    => #matchFailure( "No valid substitution" ), .MatchResults
    requires T =/=K P
     andBool notBool P in Vs

. Since syntacticMatch from utils/syntactic-match.md originated as a copy of #matchAssoc, the duplication is also there.

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