Giter Club home page Giter Club logo

Comments (4)

rfindler avatar rfindler commented on July 19, 2024

This isn't a complete program so I'm not entirely sure what you mean, but here are two examples, one where it finishes in the bound and one where it doesn't and I see the expected results.

#lang racket
(require redex/reduction-semantics)
(define-language L
  (n ::= Z (S n)))

(define-judgment-form L
  #:mode (->* I O)
  [-------------
   (->* (S n) n)])

(test-->>∃ #:steps 6 ->*
           (term (S (S (S (S Z)))))
           (term Z))

(test-->>∃ #:steps 2 ->*
           (term (S (S (S (S Z)))))
           (term Z))

(test-results)

namely:

FAILED /Users/robby/tmp.rkt:15.0
term Z not reachable from (S (S (S (S Z)))) (within 2 steps)
1 test failed (out of 2 total).

from redex.

xyzwwwww avatar xyzwwwww commented on July 19, 2024

I should have explained better.

->* is the compatible closure for the language.

My point here is that if the reduction steps are less than the mentioned steps in #:steps, even then
the tests pass.
I understand that it is the default behavior of the tests.

However, my thought was if we could have tests passing when the reduction steps
are exactly equal to #:steps n, where n is the precise number.

from redex.

rfindler avatar rfindler commented on July 19, 2024

Can you supply some working code to better illustrate what you mean, please?

from redex.

rfindler avatar rfindler commented on July 19, 2024

The steps argument is more of an upper-bound to avoid running for a long time than it is to count an exact number of steps. One complexity of adding one is that these relations don't necessarily have exactly one way to reduce each term so we'd have to define something that makes sense for such relations too.

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.