Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InfiniteSequence not found in transys_detailed_examples.py #248

Open
mengyuest opened this issue Jan 31, 2022 · 4 comments
Open

InfiniteSequence not found in transys_detailed_examples.py #248

mengyuest opened this issue Jan 31, 2022 · 4 comments
Assignees

Comments

@mengyuest
Copy link

Hi, I tried to run the code in examples/developer/transys/transys_detailed_examples.py but it failed because there was no InfiniteSequence. I also cannot find this class in the repo. Is it in a previous version and could you please point it out? Thanks.

@slivingston
Copy link
Member

@mengyuest Does this issue still exist for you?

@slivingston slivingston self-assigned this Jun 23, 2022
@slivingston
Copy link
Member

I can reproduce the error. That example code is out-of-date. We warn about the directory developer/ in examples/README as an "unstable directory". In practice this manifests as files in that directory not being maintained as carefully as other examples in the directory examples/.

@johnyf
Copy link
Member

johnyf commented Jun 23, 2022

Thank you for reporting this error. The class InfiniteSequence currently used in the module examples/developer/transys/transys_detailed_examples.py was defined at tulip.transys.executions.InfiniteSequence. The module tulip.transys.executions was removed in commit 3a244a4.

The definition of the class InfiniteSequence can be found at: 3a244a4#diff-9e3044f0a224f38f0a928662c8df3ee497a2d21354d707b0f22f5e20dca91576L52.

The example function sims_demo that used the removed module tulip.transys.executions, used also the class FiniteTransitionSystemSimulation. Reading the computations of the code that I wrote (and deleted in commit 3a244a4), and considering the issue mentioned in the commit message, it seems to me that the example function sims_demo, which depends on the deleted module tulip.transys.executions.InfiniteSequence, can be removed without loss of functionality (the function sims_demo involves infinite sequences with periodic tail, represented by a prefix and suffix).

@johnyf
Copy link
Member

johnyf commented Jun 23, 2022

I now removed the function sims_demo. Functionality for simulating state machines can currently be found in the module tulip.transys.machines. For example, the functions guided_run and random_run (also, direct simulation using a for loop may be useful too, because it enables direct access to how the state of the simulation changes).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants