source: CIVL/examples/analysis/abs.c@ e2570cd

main test-branch
Last change on this file since e2570cd 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: 382 bytes
Line 
1#include <stdlib.h>
2#include <civlc.cvh>
3
4$input int k;
5$input int x;
6$input int y;
7$input int z;
8$assume(x<0);
9$assume(y>0);
10$assume(k!=0);
11void main(){
12 int a = 9;
13
14 a=abs(0);
15 a=abs(x); // x<0
16 a=abs(y); // y>0
17 a=abs(z);
18 a=abs(k); // k!=0
19 a=abs(x*y*z);
20 a=abs(x*y*k);
21 a=abs(x*y);
22 $assert(x*y<=0);
23
24 a=abs(y%2-1);
25 a=abs(y%2-2);
26}
Note: See TracBrowser for help on using the repository browser.