main
|
Last change
on this file was ea777aa, checked in by Alex Wilton <awilton@…>, 3 years ago |
|
Moved examples, include, build_default.properties, common.xml, and README out from dev.civl.com into the root of the repo.
git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5704 fb995dde-84ed-4084-dfe6-e5aef3e2452c
|
-
Property mode
set to
100644
|
|
File size:
688 bytes
|
| Line | |
|---|
| 1 | /* CIVL v1.18 will crash on this example (when z3 or cvc4 is used)
|
|---|
| 2 | because in CIVL model, the conditional expression has an int type
|
|---|
| 3 | true branch and an bool type false branch. The type inconsistency
|
|---|
| 4 | is due to the fact that an implicit cast on the conditional
|
|---|
| 5 | expression doesn't get applied to branches. So we decided that a
|
|---|
| 6 | normal form of a cast on a conditional expression will be that the
|
|---|
| 7 | cast will recursively applied to its branches. */
|
|---|
| 8 | $input int N;
|
|---|
| 9 | $input int M;
|
|---|
| 10 | $input int a[N];
|
|---|
| 11 | $input int b[N];
|
|---|
| 12 | $assume($forall (int i : 0 .. N-1) a[i] == b[i]);
|
|---|
| 13 |
|
|---|
| 14 | int main() {
|
|---|
| 15 | $assert($forall (int i : 0 .. N-1)
|
|---|
| 16 | i < M ? a[i] == b[i] : i >= M ? 1 : a[i] != b[i] + 1
|
|---|
| 17 | );
|
|---|
| 18 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.