Changes between Version 10 and Version 11 of Introduction


Ignore:
Timestamp:
12/29/18 09:55:53 (7 years ago)
Author:
siegel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Introduction

    v10 v11  
    9090The `$parfor` statement is a combination of `$for` and `$spawn`. The latter is very similar to a function call. The main difference is that the function called is invoked in a new process which runs concurrently with the existing processes.
    9191
    92 The program may be verified for an upper bound of 5 by typing the following at the command line:
     92The program may be verified for an upper bound of 5 by typing
    9393
    9494{{{
     
    9696}}}
    9797
    98 which results in the following output (excerpted):
    99 
    100 {{{
     98which results in the following output:
     99
     100{{{
     101CIVL v1.18+ of 2018-12-28 -- http://vsl.cis.udel.edu/civl
     102
     103Violation 0 encountered at depth 21:
     104CIVL execution violation (kind: DEADLOCK, certainty: PROVEABLE)
     105at diningBad.cvl:20.32-32
     106  $parfor(int i: 0..n-1) dine(i);
     107                                ^
     108
     109A deadlock is possible:
     110  Path condition: true
     111  Enabling predicate: false
     112process p0 (id=0): false
     113process p1 (id=1): false
     114process p2 (id=2): false
     115
     116Call stacks:
     117process 0:
     118  main at diningBad.cvl:20.32 ";"
     119process 1:
     120  dine at diningBad.cvl:12.4-8 "$when" called from
     121  _par_proc0 at diningBad.cvl:20.25-28 "dine"
     122process 2:
     123  dine at diningBad.cvl:12.4-8 "$when" called from
     124  _par_proc0 at diningBad.cvl:20.25-28 "dine"
     125
     126Logging new entry 0, writing trace to CIVLREP/diningBad_0.trace
     127Terminating search after finding 1 violation.
     128
     129=== Source files ===
     130diningBad.cvl  (diningBad.cvl)
     131
     132
     133=== Command ===
     134civl verify -inputB=5 diningBad.cvl
     135
     136=== Stats ===
     137   time (s)            : 1.43
     138   memory (bytes)      : 163053568
     139   max process count   : 3
     140   states              : 32
     141   states saved        : 26
     142   state matches       : 1
     143   transitions         : 30
     144   trace steps         : 21
     145   valid calls         : 106
     146   provers             : cvc4, z3
     147   prover calls        : 4
    101148
    102149=== Result ===
    103150The program MAY NOT be correct.  See CIVLREP/diningBad_log.txt
    104 
    105151}}}
    106152