Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
Spot
Spot
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 117
    • Issues 117
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 1
    • Merge Requests 1
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Spot
  • SpotSpot
  • Issues
  • #152

Closed
Open
Opened Feb 16, 2016 by toogy@viovene

iPython kernel crash, modelcheck function

The following code makes an iPython kernel crash:


# coding: utf-8

# In[3]:

import spot


# In[4]:

import spot.ltsmin
spot.setup()


# In[5]:

get_ipython().run_cell_magic('dve', 'm', 'int f = 3;\nprocess R {\n    int p = 1, found = 0;\n    state i, e;\n    init i;\n    trans\n        i -> i {guard p != f; effect p = p + 1;},\n        i -> e {guard p == f; effect found = 1;},\n        e -> e {};\n}\nsystem async;')


# In[6]:

m


# In[7]:

k = m.kripke(['R.found']); k


# In[8]:

a = spot.translate('!(F (G "R.found"))', 'ba'); a


# In[9]:

p = spot.otf_product(k, a); p


# In[10]:

p.is_empty()


# In[11]:

def modelcheck(ltl_formula, model):
    a = spot.translate(ltl_formula)
    k = m.kripke([ap.ap_name() for ap in a.ap()])
    p = spot.otf_product(k, a)
    return p.is_empty()


# In[12]:

p = modelcheck('X "R.found"', m)

However, when modelcheck returns p instead of p.is_empty() and we then call p.is_empty() outside the modelcheck function, it doesn't crash.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: spot/spot#152