Questions tagged [promela]

Process/Protocol Meta Language is a verification modelling language used to verify the logic of parallel systems.

PROMELA is a process modeling language whose intended use is to verify the logic of parallel systems. Given a program in PROMELA, Spin can verify the model for correctness by performing random or iterative simulations of the modeled system's execution, or it can generate a C program that performs a fast exhaustive verification of the system state space. During simulations and verifications SPIN checks for the absence of deadlocks, unspecified receptions, and unexecutable code. The verifier can also be used to prove the correctness of system invariants and it can find non-progress execution cycles. Finally, it supports the verification of linear time temporal constraints; either with Promela never-claims or by directly formulating the constraints in temporal logic. Each model can be verified with Spin under different types of assumptions about the environment. Once the correctness of a model has been established with Spin, that fact can be used in the construction and verification of all subsequent models.

PROMELA programs consist of processes, message channels, and variables. Processes are global objects that represent the concurrent entities of the distributed system. Message channels and variables can be declared either globally or locally within a process. Processes specify behavior, channels and global variables define the environment in which the processes run.

via: Wikipedia

159 questions
2
votes
1 answer

how to make a non-initialised variable in Spin?

It seems that Promela initialises each variable (by default, to 0, or to the value that is given in the declaration). How can I declare a variable that is initialised by an unknown value? The documentation suggests if :: p = 0 :: p = 1 fi but I…
d8d0d65b3f7cf42
  • 2,597
  • 15
  • 28
2
votes
1 answer

Promela SPIN unreached in proctype error

I'm pretty new to SPIN and Promela and I came across this error when I'm trying to verify the liveness property in my models. Error code: unreached in proctype P (0 of 29 states) unreached in proctype monitor mutex_assert.pml:39,…
firearian
  • 65
  • 1
  • 7
2
votes
1 answer

Is it impossible to select a nondeterministic value of an array element in Promela?

Following is the Promela code that I am writing. 491 byte api1[5]; 492 byte api2[5]; 493 byte api3[5]; 494 byte reftask1[5] 495 byte reftask2[5]; 496 byte reftask3[5]; 497 byte rid1[5]; 498 byte rid2[5]; 499 …
jungyh0218
  • 558
  • 1
  • 4
  • 17
2
votes
1 answer

How to transform LTL into Automato in Promela - SPIN?

How can I transform LTL into Automata in PROMELA? I know that with the command SPIN -f "ltl x" it is possible transform the LTL into a never claim, but I want the automata of the LTL and not the negation one. It is correct If I negate the LTL…
Georgia
  • 43
  • 3
2
votes
2 answers

Never claim does not work in promela model

Consider this simple PROMELA model: #define p (x!=4) int x = 0; init { do :: x < 10 -> x++; od } I wanted to verify this model with this simple claim, which was generated by using spin -f: never { /* []p…
K. Huber
  • 33
  • 4
2
votes
1 answer

How do you check if all values in array are equal in Promela?

How do you check in Promela if all values of an array are equal? I want this piece of code to atomic and and executable if they are (busy waiting until all are equal). Is there any way to use a for loop? (The length of the array is given as a…
niczka
  • 351
  • 1
  • 12
1
vote
1 answer

Interleaving possibilities in Promela

I am new to Promela and I'm having some difficulties understanding how to calculate the interleaving possibilities of a model. Which one of the statements is counted in the calculation (how do I know which one to take)? Does process P have 5, as…
melisa
  • 95
  • 5
1
vote
0 answers

mcrl2 problem with traffic light changing color

Im trying to make a traffic lights problem with mcrl2. I don't know if my code is 100% correct, but it compiles. Basically i have 3 colors and 3 traffic lighters and with this code i can switch their colors, however i want to make restritions like,…
tbotl
  • 23
  • 6
1
vote
1 answer

How should I do that the two receiving processes not to be twice in a row in Promela model?

I am a beginner in the spin. I am trying that the model runs the two receiving processes (function called consumer in the model) alternatively, ie. (consumer 1, consumer 2, consumer 1, consumer 2,...). But when I run this code, my output for 2…
user8287082
1
vote
0 answers

Bash variable expansion that includes single or double quotes

I have a script that I'm writing to automate running specific tests with a promela model. The user must supply the promela model and another file with the ltl properties they wish to run against the model. I read in the file line by line using the…
washa3
  • 11
  • 3
1
vote
1 answer

Will the output always be greater than 0 ? PROMELA program

I'm a bit boggled by this question, when I ran this program I got results greater than 0 but I'm not sure if that would always be the case since the program could execute x++ or x-- first in theory. How can I definitively confirm that the results…
Roland
  • 61
  • 7
1
vote
1 answer

How to generate a Buchi Automaton from a LTL formula?

How can I generate a Buchi Automaton starting from an LTL formula? e.g. [] (a <-> ! b) That is, At all times in the future if a is true b is false if b is true a is false
Patrick Trentin
  • 7,126
  • 3
  • 23
  • 40
1
vote
1 answer

Promela: Errors with parameters in proctypes, and using 'end' label

I'm new to Promela, and I'm not sure what the issue with my code is: proctype frogJump(int frogNum, int frogDirection) { printf("FROG%d STARTS AT %d", frogNum, frogs[frogNum]); int temp; end: do :: lock(mutex) -> if …
NukPan
  • 249
  • 2
  • 8
1
vote
3 answers

Trying to match to a typedef value in a receive statement causes "bad node type 44" error message

When I try to match a message in a receive statement I get a "bad node type 44" error message. This happens when the message's type is a typedef. The error message is rather cryptic and doesn't give much insight. typedef t { int i } init { …
tgonzalez89
  • 621
  • 1
  • 6
  • 26
1
vote
1 answer

permission denied to execute '/usr/bin/spin' in WSL (ubuntu 18.04)

I have been using the Windows Subsytem for Linux for SPIN(Promela) for quite some time. However, without any changes in the setup, suddenly since 28 Oct 2019, I am getting error 'Permission denied' error for '/usr/bin/spin'. Other commands in the…