Giter Club home page Giter Club logo

Comments (7)

deeglaze avatar deeglaze commented on July 19, 2024

Where sufficiently large includes the lambda calculus

#lang racket
(require redex)
(define-language L
  [e x (e e ...) (lambda (x_!_ ...) e)]
  [x variable-not-otherwise-mentioned])
(redex-check L e_chk (redex-match? L e (term e_chk)))

from redex.

rfindler avatar rfindler commented on July 19, 2024

@ianj 's example was fixed in late July, but hasn't made it to a release yet.

from redex.

cgswords avatar cgswords commented on July 19, 2024

While Ian's example works in the nightly build of racket, the larger calculus I linked above still produces lambdas with multiple variables of the same name.

from redex.

rfindler avatar rfindler commented on July 19, 2024

I adjusted the code in the gist by deleting all of the uses of
redex-check and then putting this at the bottom of the file:

(random-seed 0)
(define is-P? (redex-match? ccon P))
(redex-check ccon P is-P? #:attempts 1500)

and I am not seeing any failures. Could you please make some adjustments to
what I've done to clarify the bad behavior you're seeing?

Thanks,
Robby

from redex.

cgswords avatar cgswords commented on July 19, 2024

The following will reproduce the error consistently:

(random-seed 0)
(define is-e? (redex-match? ccon e))
(redex-check ccon e is-e? #:source step #:attempts 3000)

The output is:

redex-check: (predc (if ((lambda (W E W Y) JwX) (thunk (case k D nqF X B)) (thunk (+ t O)) 5 (inr unit)) u L)) does not match e

Notice the two matching arguments in the lambda.

from redex.

rfindler avatar rfindler commented on July 19, 2024

That's because this clause in step:

(in-hole E ((lambda (x ..._1) e) tv ..._1))

generates things that are not es.

I can see how this is confusing, and that there is really not anything you can reasonably do to compensate, so I've pushed a change to Redex so that it just discards such test cases instead of signaling errors.

ba99493

from redex.

cgswords avatar cgswords commented on July 19, 2024

Ah! Thanks so much for all the help with this.

from redex.

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.