6xxx strlen and 9xxx conclusions.
[libguestfs-talks.git] / 2020-frama-c / 6300-strlen.html
diff --git a/2020-frama-c/6300-strlen.html b/2020-frama-c/6300-strlen.html
new file mode 100644 (file)
index 0000000..73e8964
--- /dev/null
@@ -0,0 +1,17 @@
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+<link rel="stylesheet" href="style.css" type="text/css"/>
+<script src="code.js" type="text/javascript"></script>
+
+<h1>glibc strlen specification</h1>
+
+<pre class="code">
+  /*@
+    requires valid_read_string (str);
+    assigns \nothing;
+    ensures (\forall integer i; 0 <= i < \result ==> str[i] != '\0') &&
+            str[\result] == '\0';
+   */
+  size_t strlen (const char *str)
+  {
+    ...
+</pre>