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

Using stepper on template #168

Open
chgus0202 opened this issue Feb 19, 2022 · 8 comments
Open

Using stepper on template #168

chgus0202 opened this issue Feb 19, 2022 · 8 comments
Assignees
Labels

Comments

@chgus0202
Copy link

chgus0202 commented Feb 19, 2022

Hi, I am a student taking BSL language at school and I would like to report a problem using stepper on a template.

It seems like ... in the template confusing the stepper which is supposed to be part of the infrastructure and I wonder if you can look into this problem

error

(eg,

(define (fn-for-function f)
(cond [ (false? f) (....) ] )
[else (... f)] ))

Thank you!

@AlexKnauth
Copy link
Member

I believe this issue should be transferred to the htdp repository: https://github.com/racket/htdp

@mfelleisen mfelleisen transferred this issue from racket/racket Feb 19, 2022
@sorawee
Copy link
Contributor

sorawee commented Jul 11, 2022

Seems like (quote-syntax ... #:local) is not handled. I thought I saw this kind of issue fixed already, but that's clearly not the case.

@sorawee
Copy link
Contributor

sorawee commented Jul 11, 2022

Ah, it was #159, which fixes the problem for that program, but the issue persists for more complicated programs.

(...) ;; OK

(cond [#t (...)]
      [else 1])
;; annotate-inner: nothing expands into begin! : (cons 'begin (cons (cons 'quote (cons 1 '())) '()))

(cond [#t (...)])
;; recon-source: no matching clause for syntax: (quote-syntax () #:local)

Regardless of fixes elsewhere, I think (quote-syntax ... #:local) should be handled in places like https://github.com/racket/htdp/blob/master/htdp-lib/stepper/private/annotate.rkt#L843

@jbclements jbclements self-assigned this Jul 11, 2022
@jbclements
Copy link
Contributor

Okay, yeah, I see the problem. I had tests with dots in parens, but only at the top level of lambdas where the inserted "begin" gets vacuumed away.

@jbclements
Copy link
Contributor

well, that's the issue with the first example, anyway....

@jbclements
Copy link
Contributor

Whoa... I've now spent about 10 hours debugging (okay actually probably 15 or 20) and I'm finding all kinds of interesting stuff. One or two serious bugs that have been lurking for a long long time. Yikes.

@mfelleisen
Copy link
Contributor

My guess is that the stepper is exercised in minimal ways, which is one possibility why these bugs have been around forever. Nobody besides me uses it beyond the first two weeks or so around here.

@jbclements
Copy link
Contributor

I think I'm going to take the next 10 students that come through my door looking for a senior project and tell them to fuzz-test the stepper.

samth added a commit to samth/htdp that referenced this issue Oct 11, 2022
jbclements pushed a commit that referenced this issue Oct 18, 2022
Fixes #178. Related to #168.

(cherry picked from commit d2aa76a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants