about summary refs log tree commit diff homepage
path: root/www/code-examples/demo.c
diff options
context:
space:
mode:
authorCristian Cadar <cristic@cs.stanford.edu>2009-05-21 06:55:54 +0000
committerCristian Cadar <cristic@cs.stanford.edu>2009-05-21 06:55:54 +0000
commit467108ce9b81a4f57f2fb52d1a35759d4bd053a1 (patch)
tree0855e04be2e0125e9d64cfe441c166906faf544d /www/code-examples/demo.c
parentcd95368ea4f74b09e30725ba04cc84ede6b24fcf (diff)
downloadklee-467108ce9b81a4f57f2fb52d1a35759d4bd053a1.tar.gz
Added a first KLEE tutorial.
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@72207 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'www/code-examples/demo.c')
-rw-r--r--www/code-examples/demo.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/www/code-examples/demo.c b/www/code-examples/demo.c
new file mode 100644
index 00000000..69e0715a
--- /dev/null
+++ b/www/code-examples/demo.c
@@ -0,0 +1,11 @@
+int my_islower(int x) {
+  if (x >= 'a' && x <= 'z')
+    return 1;
+  else return 0;
+}
+
+int main() {
+  char c;
+  klee_make_symbolic_name(&c, sizeof(c), "input");
+  return my_islower(c);
+}