How to model a transition system with SPIN

I am new to spin. I want to check whether a transition system satisfies the given LTL property. But I don't know how to model a transition system in promela. For example, the transition system shown below has two states, and the initial state is s0. How to check whether the LTL property: <>q is satisfied. Does anybody know how to describe this problem in promela? By the way, how to use the next operator of LTL in spin? <img src="https://i.stack.imgur.com/GFrHZ.png" alt="transition system">


You can model your automata by using labels, atomic blocks and gotos:

bool p, q; init { s1: atomic { p = true; q = false; } goto s2; s2: atomic { p = false; q = true; } }

To check your LTL property, place ltl eventually_q { <>q }; at the end of your file and run Spin and the generated executable with -a.

If you place a property that doesn't hold at the end, for example, ltl always_p { []p };, you'll get the message end state in claim reached that indicates that the property has been violated.

About the next-operator: It is in conflict with the partial order reduction algorithm that Spin uses per default. Properties using the next-operator must be stutter invariant, otherwise, partial order reduction must be disabled. Read more at the end of this man page.


  • Display JSON returned from Flask in a neat way
  • Efficient matching of text messages against thousands of regular expressions
  • SSO, using Google Apps user database
  • Multiple Thread Variable Access inside a function
  • Remove Ribbon from Excel
  • Concurrency scenarios with INSERTs
  • Automatic series in gnuplot?
  • Aligning and Inlining components (or icons) in JTextPane
  • Matlab FFT and FFTW
  • About multiple inheritance and ambiguity
  • PHP: Convert single-quoted string into double-quoted
  • Use MongoDB array as stack
  • How atomic are mongoengine's operations
  • draw a B+ tree in latex
  • Neo4j Cypher query performance optimization
  • Neo4j: Legacy Indexes and auto index vs new label bases schema indexes
  • PyQt4 application on Windows is crashing on exit
  • How do I translate LR(1) Parse into a Abstract syntax tree?
  • Running jasmine tests for a component with NgZone dependency
  • Criterion causing memory consumption to explode, no CAFs in sight
  • Activation Function choice for Neural network
  • How do I mock an exported typescript function in a jasmine test?
  • Git describe fails to return most recent annotated tag
  • RxJava debounce by arbitrary value
  • angularjs unit test when to use $rootScope.$new()
  • Running a C# exe file
  • Join two tables and save into third-sql
  • ORA-29908: missing primary invocation for ancillary operator
  • Python: how to group similar lists together in a list of lists?
  • Cant find why the layout is getting smaller
  • How to stop GridView from loading again when I press back button?
  • Bitwise OR returns boolean when one of operands is nil
  • sending mail using smtp is too slow
  • Django query for large number of relationships
  • Busy indicator not showing up in wpf window [duplicate]
  • costura.fody for a dll that references another dll
  • Why is Django giving me: 'first_name' is an invalid keyword argument for this function?
  • Binding checkboxes to object values in AngularJs
  • How can I use `wmic` in a Windows PE script?
  • Converting MP3 duration time