Git Product home page Git Product logo

Comments (2)

j-hui avatar j-hui commented on June 5, 2024 1

Ah gotcha. In terms of type errors, @yc2454 's type checker should come in handy, but I do understand your concern.

I think when I have some spare cycles, I'll write these shrinkers myself to get my hands dirty with the shrinker, and see if it's actually useful. For now, I'll punt on this issue.

from scoria.

Rewbert avatar Rewbert commented on June 5, 2024

Changing the types of things is very difficult, as the program might not (most likely not) be type correct anymore. And furthermore, if the shrinker can change an Int32 to an Int64, it can probably also do the opposite, and thus the shrinker will never terminate. When we are shrinking a program we are not maintaining any state, so there's no way to know that we've not already tried to give a variable a certain type.

Concerning the constants, the shrinker is already trying to do a syntactic reduction of expressions. If only a single constant remain after this step it could probably be shrunk, yes, but I don't personally think it's worth the effort. We're just trading one constant for another. I did prepare the expression shrinker to do this though, so you'd just need to write a function SSMExp -> [SSMExp] where the resulting list contains mutations of the expression under scrutiny. Then that function can be plugged into the rest of the machinery. Empty list = unsuccessful shrinking.

The skips can be pruned out, but keeping them won't change any semantics or anything. It should be easy to add this as a last shrinking step though, if we think it's worth the time.

from scoria.

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.