source: CIVL/examples/languageFeatures/commBad.cvl@ 13ac9574

1.23 2.0 main test-branch
Last change on this file since 13ac9574 was 28717d7, checked in by Stephen Siegel <siegel@…>, 12 years ago

Adding test commBad which reveals a defect: it deadlocks but CIVL says it doesn't. Reason: The deadlock predicate checks the guard on the system function $comm_enqueue and sees that it is true. However system guards are determined in a different way.

Adding hybrid example which has similar defect but is more complicated.

Adding NOTES on outline for new version of manual.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@561 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 380 bytes
Line 
1/* Deadlocking use of communicator. Commandline execution:
2 * civl verify commBad.cvl
3 * */
4#include <civlc.h>
5#define TAG 0
6
7$comm comm;
8_Bool start = $false;
9
10void worker(int me) {
11 $when (start);
12 $comm_dequeue(&comm, me, me, TAG);
13}
14
15void main() {
16 $proc worker_proc = $spawn worker(0);
17
18 comm = $comm_create(1, &worker_proc);
19 start = $true;
20 $wait worker_proc;
21}
Note: See TracBrowser for help on using the repository browser.