Code Monkey home page Code Monkey logo

Comments (8)

christopherastone avatar christopherastone commented on July 27, 2024

Probably a difference in a hidden type annotation, something like El(unitname) vs. Unit. I've patches this by having exact matches use the built-in equivalence algorithm (without hints or rewrites) instead of alpha-equivalence. #14 also runs.

Unfortunately, this change makes the system noticeably slower. (because running beta-eta equivalence on every subterm to see if it's the term-to-rewrite is at least a constant factor slower than running alpha-equivalence on every subterm to see if it's the term-to-rewrite).

from andromeda.

JasonGross avatar JasonGross commented on July 27, 2024

Do you short-circuit the alpha-equivalence case? Is there a verbosity level that prints out the hidden annotations? (If not, can there be?)

from andromeda.

christopherastone avatar christopherastone commented on July 27, 2024

Sure, but the the short circuit can only make equivalence faster. Inequivalence, which is the likely issue here, doesn't speed up at all. (When alpha-equivalence fails, you still have to do the full beta-eta check to make sure they're not somehow equivalent).

--annotate tells the pretty-printer not to elide the hidden stuff, but do so only if you have a strong stomach.

from andromeda.

JasonGross avatar JasonGross commented on July 27, 2024

Why is inequivalence the issue here?

from andromeda.

christopherastone avatar christopherastone commented on July 27, 2024

It's now working harder to identify subterms that can be rewritten, by
using a more general notion of equivalence.

99% of subterms are not rewritable, but there's no way to identify
them ahead of time...they still have to be checked for equivalence to
verify they're not equivalent to any rewriting hint. This checking has
gotten more expensive.

(Actually we compares types of terms and patterns before comparing the
types and patterns themselves, but the principle still applies)

from andromeda.

JasonGross avatar JasonGross commented on July 27, 2024

You've probably already thought of all of this, but can you store the hints in beta-normal (and eta-long?) form, and beta-(eta-)normalize the things you're checking against? (The beta-normal form, at least, can be computed once-and-forall for the whole term, I think.)

from andromeda.

andrejbauer avatar andrejbauer commented on July 27, 2024

Actually, I think the user should be giving hints in normal form. At least for now.

from andromeda.

andrejbauer avatar andrejbauer commented on July 27, 2024

Obsolete, the hints are gone from the kernel.

from andromeda.

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.