Giter Site home page Giter Site logo

Comments (1)

jespercockx avatar jespercockx commented on July 21, 2024 2

Thank you for reporting. The problem here is that the confluence checker assumes there are no metavariables in any of the rewrite rules it gets. This is true for normal rewrite rules, since the REWRITE pragma makes sure that the rule is fully instantiated before adding it to the signature. However, the confluence checker also takes into account the clauses of regular pattern-matching definitions, and THOSE might contain unsolved metas, as is the case for myrefl. Possible solutions:

  • Refuse to add any rewrite rules to a function if there are still unsolved metas in the definition of that symbol and the confluence checker is on (the simplest but crudest solution).
  • Postpone the confluence check by adding it as a new constraint (@liesnikov is gonna love this) and retrying the check once all the metas have been resolved.
  • Actually do something smart with metavariables in the confluence checker, which would likely adding a constraint for syntactic equality of terms (up to instantiation of metavariables).
  • Or we could even make the confluence checker instantiate the metavariables to the correct solution that makes the rewriting system confluent. In the example here that would mean the ? would be instantiated to refl (at least when you would put the whole thing in a mutual block).

I think the first option is what I'll implement for now, but the others are certainly interesting to think about.

from agda.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.