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

LTL2BA parser has problem parsing skip #219

Open
mhtb32 opened this issue Jan 21, 2020 · 2 comments
Open

LTL2BA parser has problem parsing skip #219

mhtb32 opened this issue Jan 21, 2020 · 2 comments
Assignees

Comments

@mhtb32
Copy link

mhtb32 commented Jan 21, 2020

Hi!

The module ltl2ba.py cannot parse skip, which is equivalent to true. Did you not include the parsing rule for skip on purpose?
I can make a pull request if you mind.

@slivingston slivingston self-assigned this Jan 29, 2020
@slivingston
Copy link
Member

I do not understand. @mhtb32 can you give an example to illustrate?

Also, can you tell me which version of Tulip that you are using? You can find it via

python -c 'import tulip; print(tulip.__version__)'

@mhtb32
Copy link
Author

mhtb32 commented Feb 26, 2020

I was using ltl2ba.py file separately like:

python ltl2ba.py

and I replaced the default formula

f = '[] !s && <> (a || c) && <> (b U c)'

with

f = 'p1 <> p2'

Then I received this error:

ERROR:__main__:Syntax error at skip

, Since ltl2ba command produces skip in the output.

I have a fork of your code using sly package(a successor to ply), in which I have a parsing rule for skip to create a self transition like this:

    @_('state ":" SKIP')
    def clause(self, p):
        u = p.state
        self.automaton.add_transition({(u, u, '1')})
        return u, p.SKIP

I wish this help.

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

2 participants