Giter VIP home page Giter VIP logo

Comments (2)

eschkufz avatar eschkufz commented on May 24, 2024

This is tough. The hanging you see is a spurious instance of a zero-time loop (combinational logic which feeds back into itself). I say spurious because cascade treats arrays as monolithic entities rather than as collections of individually nameable objects.

Test case 1 doesn't look like a zero time loop, but cascade thinks that whenever grid[1] changes, that means that every other element in grid (grid[0] included) has changed as well. The same is true of test case 2. It's just a quirk of the way that cascade evaluates changes to combinational logic that it doesn't fall into an infinite loop in this case as well.

So there's a couple of things that need to be fixed here:

  1. One way or another, cascade's evaluation logic should be changed so that it doesn't fall into an infinite loop for non-zero-time loops.
  2. We may also want to update the typechecker to detect zero time loops and either emit an error, or emit a warning and treat zero-time loops as undefined and replace them with terminating logic somewhere downstream.

from cascade.

eschkufz avatar eschkufz commented on May 24, 2024

Fixed in issue-138.

Actually not all that difficult. In sw_logic, all that's necessary is to notify a variable's monitor only when a call to a call to assign_value produces a change in value.

from cascade.

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.