Skip to content

add configurable timeout when enumerating states #39

Description

@dave-doty

I often accidentally make the set of producible states infinite. Since I know how it works, when I see that the code is taking a long time to run but there is no feedback from the simulation progress bar in a jupyter notebook, I am able to tell what's going wrong. However, I can imagine someone just thinking it's taking a long time to simulate and not realizing they accidentally make an infinite number of producible states.

A good alternative would be to have a configurable timeout (e.g., 10 seconds) as a parameter in the Simulation constructor, or a perhaps maximum number of states to produce (e.g., 105), and raising an exception if the limit is exceeded that tells the user "We've found XXX producible states so far, are you sure the set of states is finite? ppsim can only handle finite state sets". Then someone can just give a huge number if they really are willing to wait a long time, but otherwise the exception will tell them about a probable mistake in their transition function.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions