diff options
author | Cristian Cadar <cristic@cs.stanford.edu> | 2011-09-27 11:08:04 +0000 |
---|---|---|
committer | Cristian Cadar <cristic@cs.stanford.edu> | 2011-09-27 11:08:04 +0000 |
commit | d151d06a875cbbaa0696e3c2d58158c2e2195995 (patch) | |
tree | 2349cbde83a0f35757bdf82d615d3bb13f740f1e /www/resources | |
parent | 9702b978795d8e0518e211bc0a3789363157fb16 (diff) | |
download | klee-d151d06a875cbbaa0696e3c2d58158c2e2195995.tar.gz |
Changed Tutorial 1, which was causing confusion due to differences in
LLVM code generation before and after LLVM 2.8. git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@140602 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'www/resources')
-rw-r--r-- | www/resources/get_sign.c.html | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/www/resources/get_sign.c.html b/www/resources/get_sign.c.html new file mode 100644 index 00000000..58c28d01 --- /dev/null +++ b/www/resources/get_sign.c.html @@ -0,0 +1,37 @@ +<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN"> +<HTML> +<HEAD> +<TITLE>Enscript Output</TITLE> +</HEAD> +<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#1F00FF" ALINK="#FF0000" VLINK="#9900DD"> +<A NAME="top"> +<A NAME="file1"> +<H1>get_sign.c</H1> + +<PRE> +<I><FONT COLOR="#B22222">/* + * First KLEE tutorial: testing a small function + */</FONT></I> + + +<B><FONT COLOR="#228B22">int</FONT></B> <B><FONT COLOR="#0000FF">get_sign</FONT></B>(<B><FONT COLOR="#228B22">int</FONT></B> x) { + <B><FONT COLOR="#A020F0">if</FONT></B> (x == 0) + <B><FONT COLOR="#A020F0">return</FONT></B> 0; + + <B><FONT COLOR="#A020F0">if</FONT></B> (x < 0) + <B><FONT COLOR="#A020F0">return</FONT></B> -1; + <B><FONT COLOR="#A020F0">else</FONT></B> + <B><FONT COLOR="#A020F0">return</FONT></B> 1; +} + +<B><FONT COLOR="#228B22">int</FONT></B> <B><FONT COLOR="#0000FF">main</FONT></B>() { + <B><FONT COLOR="#228B22">int</FONT></B> a; + klee_make_symbolic(&a, <B><FONT COLOR="#A020F0">sizeof</FONT></B>(a), <B><FONT COLOR="#BC8F8F">"a"</FONT></B>); + <B><FONT COLOR="#A020F0">return</FONT></B> get_sign(a); +} +</PRE> +<HR> +<ADDRESS>Generated by <A HREF="http://www.iki.fi/~mtr/genscript/">GNU Enscript 1.6.5.2</A>.</ADDRESS> +<I>enscript -Ec --color -w html get_sign.c -o get_sign.c.html</I> +</BODY> +</HTML> |