kframework / matching-logic-prover

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Matchig variables - duplicated rule

h0nzZik opened this issue · comments

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.