about summary refs log tree commit diff homepage
path: root/www/resources/islower.c.html
blob: 524f2093fb64552d6232768b1d712f833d35d3b2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<!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>islower.c</H1>

<PRE>
<I><FONT COLOR="#B22222">/*
 * First KLEE tutorial: testing a small function
 */</FONT></I>

#<B><FONT COLOR="#5F9EA0">include</FONT></B> <B><FONT COLOR="#BC8F8F">&lt;klee/klee.h&gt;</FONT></B>

<B><FONT COLOR="#228B22">int</FONT></B> <B><FONT COLOR="#0000FF">my_islower</FONT></B>(<B><FONT COLOR="#228B22">int</FONT></B> x) {
  <B><FONT COLOR="#A020F0">if</FONT></B> (x &gt;= <B><FONT COLOR="#BC8F8F">'a'</FONT></B> &amp;&amp; x &lt;= <B><FONT COLOR="#BC8F8F">'z'</FONT></B>)
    <B><FONT COLOR="#A020F0">return</FONT></B> 1;
  <B><FONT COLOR="#A020F0">else</FONT></B> <B><FONT COLOR="#A020F0">return</FONT></B> 0;
}

<B><FONT COLOR="#228B22">int</FONT></B> <B><FONT COLOR="#0000FF">main</FONT></B>() {
  <B><FONT COLOR="#228B22">char</FONT></B> c;
  klee_make_symbolic(&amp;c, <B><FONT COLOR="#A020F0">sizeof</FONT></B>(c), <B><FONT COLOR="#BC8F8F">&quot;input&quot;</FONT></B>);
  <B><FONT COLOR="#A020F0">return</FONT></B> my_islower(c);
}
</PRE>
<HR>
<ADDRESS>Generated by <A HREF="http://www.iki.fi/~mtr/genscript/">GNU enscript 1.6.4</A>.</ADDRESS>
</BODY>
</HTML>