about summary refs log tree commit diff homepage
path: root/examples
diff options
context:
space:
mode:
authorCristian Cadar <cristic@cs.stanford.edu>2009-05-28 04:44:50 +0000
committerCristian Cadar <cristic@cs.stanford.edu>2009-05-28 04:44:50 +0000
commitd5e3206198cb3c7489a2ba817dfdd4fe6587e143 (patch)
tree1a86bcf568e4a13b2fdf91bd70bcde48dc56f718 /examples
parent14f53fcc478fe46e76240ce3ee920adda74ddcd5 (diff)
downloadklee-d5e3206198cb3c7489a2ba817dfdd4fe6587e143.tar.gz
Changes to webpage to make both tutorials use the same template.
git-svn-id: https://llvm.org/svn/llvm-project/klee/trunk@72515 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'examples')
-rw-r--r--examples/islower/islower.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/examples/islower/islower.c b/examples/islower/islower.c
new file mode 100644
index 00000000..ab85d072
--- /dev/null
+++ b/examples/islower/islower.c
@@ -0,0 +1,17 @@
+/*
+ * First KLEE tutorial: testing a small function
+ */
+
+#include <klee/klee.h>
+
+int my_islower(int x) {
+  if (x >= 'a' && x <= 'z')
+    return 1;
+  else return 0;
+}
+
+int main() {
+  char c;
+  klee_make_symbolic(&c, sizeof(c), "input");
+  return my_islower(c);
+}