Skip to content

add configurable timeout when enumerating states #39

@dave-doty

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions