Changes between Version 119 and Version 120 of IR
- Timestamp:
- 12/09/15 15:50:49 (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
IR
v119 v120 302 302 * `call(e0,<e1,...,en>)` : function call 303 303 * a function invocation where `e0` must evaluate to either an abstract or pure system function 304 * `choose_int(e)` : nondeterministic choice of integer305 304 306 305 == The Primitive Statements == … … 539 538 === the basic library `civlc` === 540 539 541 * assertion542 543 `void $assert(_Bool expr, ...);`544 545 It takes an boolean type expression and a number of optional expressions which are used to construct an error message. The optional arguments are similar in form to those used in C’s printf statement: a format string, followed by some number of arguments which are evaluated and substituted for successive codes in the format string.546 547 * assumption548 549 `void $assume(_Bool expr);`550 551 During verification, the given expression is assumed to hold. If this leads to a contradiction on some execution, that execution is simply ignored. It never reports a violation, it only restricts the set of possible executions that will be explored by the verification algorithm.552 553 * wait554 555 `void $wait($proc p);`556 557 `void $waitall($proc *procs, int numProcs);`558 559 When invoked, `$wait` will not return until the process referenced by p has terminated. Similarly, `$waitall` will not return until all the `numProcs` processes referenced by the memory specified by `procs` have terminated.560 561 * abruption562 563 `void $exit(void);`564 565 This function takes no arguments. It causes the calling process to terminate immediately, regardless of the state of its call stack.566 567 540 * non-deterministic choice of integer 568 541 569 ` int $choose_int(int n);`542 `fun[lib="civlc"] $choose_int(n: Integer): Integer;` 570 543 571 544 This function takes as input a positive integer `n` and nondeterministicaly returns an integer in the range `[0, n − 1]`. … … 582 555 583 556 It returns true if and only if the given object of `$proc` type is defined. 584 585 * dynamic allocation and deallocation: `$malloc` and `$free`586 587 `void * $malloc($scope scope, int size);`588 589 `void $free(void *p);`590 591 To allocate an object, one first needs a reference to the dynamic scope to be used. The function `$free` is used to deallocate a heap object; it is just like C’s free: An error is generated if the pointer is not one that was returned by $malloc, or if it was already freed.592 593 557 594 558 === Scope utilities `scope.cvh` ===
