{"id":216749,"date":"2021-05-09T10:44:17","date_gmt":"2021-05-09T02:44:17","guid":{"rendered":"https:\/\/gulass.cn\/?p=216749"},"modified":"2021-04-25T09:45:03","modified_gmt":"2021-04-25T01:45:03","slug":"klee-symbol-execution-engine","status":"publish","type":"post","link":"https:\/\/gulass.cn\/klee-symbol-execution-engine.html","title":{"rendered":"\u5982\u4f55\u5229\u7528 KLEE \u7b26\u53f7\u6267\u884c\u5f15\u64ce\u6316\u6398\u8f6f\u4ef6\u6f0f\u6d1e"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u5c06\u7b26\u53f7\u6267\u884c\u5e94\u7528\u4e8e\u4efb\u610f\u771f\u5b9e\u7a0b\u5e8f\u5f88\u96be\uff0c\u4f60\u901a\u5e38\u5fc5\u987b\u5bf9\u6267\u884c\u73af\u5883\u5efa\u6a21\uff0c\u5e76\u627e\u5230\u6709\u6548\u7684\u65b9\u6cd5\u6765\u5e94\u5bf9\u4e0d\u786e\u5b9a\u6027\u548c\u8def\u5f84\u7206\u70b8\u3002\u52a8\u6001\u7b26\u53f7\u6267\u884c\u7684\u60f3\u6cd5\u662f\u5728\u4efb\u4f55\u8f93\u5165\u4e0a\u6267\u884c\u4e00\u4e2a\u8f6f\u4ef6\uff0c\u540c\u65f6\u63a2\u7d22\u6240\u6709\u53ef\u80fd\u7684\u6267\u884c\u8def\u5f84\uff0c\u800c\u65e0\u9700\u6307\u5b9a\u5177\u4f53\u503c\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

\u5177\u4f53\u793a\u4f8b\u5982\u4e0b\uff0c\u5176\u4e2d\u8f93\u5165x\u672a\u77e5\uff0c\u5373\u7b26\u53f7\uff1a<\/p>\n

\"\"<\/p>\n

\u7b26\u53f7\u6267\u884c\u5728\u6240\u6709\u4e09\u4e2a\u6267\u884c\u8def\u5f84(x < 0, x > 100, 0 < = x < =100)\u5e76\u751f\u6210\u4e09\u4e2a\u5177\u4f53\u7684\u6d4b\u8bd5\u7528\u4f8b\uff1ax=-1, x=101\u548cx=23\u5728\u51fb\u4e2d\u65ad\u8a00\u4e4b\u540e\u3002<\/p>\n

\u4f60\u4e0d\u518d\u9700\u8981\u624b\u52a8\u7f16\u5199\u6d4b\u8bd5\u7528\u4f8b\uff0c\u4f60\u4f1a\u6cbf\u6267\u884c\u8def\u5f84\u6355\u83b7\u65ad\u8a00\u5931\u8d25\u548c\u5185\u5b58\u5b89\u5168\u6f0f\u6d1e\u3002\u4ee5\u4e0a\u8bf4\u7684\u53ef\u4e0d\u662f\u7406\u8bba\u5c42\u9762\u4e0a\u7684\u4e8b\u60c5\uff0c\u54ea\u8fd9\u79cd\u65b9\u6cd5\u53ef\u4ee5\u5728\u5b9e\u8df5\u4e2d\u7528\u4e8e\u5b9e\u9645\u7a0b\u5e8f\u5417?<\/p>\n

KLEE<\/strong><\/div>\n

KLEE\u662f\u4e00\u4e2a\u7b26\u53f7\u6267\u884c\u5f15\u64ce\uff0c\u53ef\u5bf9\u4efb\u4f55\u8f93\u5165\u6267\u884c\u672a\u4fee\u6539\u7684\u771f\u5b9e\u7a0b\u5e8f\u3002\u4f60\u5c06\u7a0b\u5e8f\u7f16\u8bd1\u4e3aLLVM\u4f4d\u7801\uff0c\u5c06\u67d0\u4e9b\u8f93\u5165\u6807\u8bb0\u4e3a\u7b26\u53f7\uff0c\u7136\u540e\u542f\u52a8KLEE\u3002 KLEE\u4f7f\u7528\u7ea6\u675f\u89e3\u51b3\u65b9\u6848\u63a2\u7d22\u53ef\u80fd\u7684\u6267\u884c\u8def\u5f84\uff0c\u5e76\u4e3a\u6bcf\u4e2a\u8def\u5f84\u751f\u6210\u5177\u4f53\u7684\u6d4b\u8bd5\u7528\u4f8b\u3002\u5982\u679c\u53d1\u751f\u6f0f\u6d1e\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u89e6\u53d1\u5b83\u7684\u8f93\u5165\u6765\u91cd\u64ad\u7a0b\u5e8f\u3002<\/p>\n

2019\u5e7411\u6708\uff0c\u5173\u4e8eKLEE\u7684OSDI 2008\u5f00\u521b\u6027\u8bba\u6587\u88ab\u9009\u5165ACM SIGOPS\u540d\u4eba\u5802\u3002\u5728\u8fc7\u53bb\u7684\u5341\u5e74\u91cc\uff0cKLEE\u7684\u7814\u7a76\u548c\u5e94\u7528\u4ea7\u751f\u4e86\u8d85\u8fc7150\u7bc7\u79d1\u5b66\u51fa\u7248\u7269\u3001\u6570\u5341\u7bc7\u535a\u58eb\u8bba\u6587\u3001\u7814\u7a76\u8d44\u52a9\u3001\u5de5\u5177\u548c\u5b89\u5168\u521d\u521b\u516c\u53f8\u3002<\/p>\n

\u4f7f\u7528KLEE\u6d4b\u8bd5\u7f51\u7edc\u534f\u8bae<\/strong><\/div>\n

\u57282007\u5e74\uff0c\u6211\u4e00\u76f4\u52aa\u529b\u5bfb\u627e\u81ea\u5df1\u7684\u7814\u7a76\u8bba\u6587\uff0c\u76f4\u5230\u9047\u5230Cristian Cadar\u7684\u8bba\u6587\u201cEXE: Automatically Generating Inputs of Death\u201cEXE: Automatically Generating Inputs of Death\u201d\u3002\u53d7\u5230\u7b26\u53f7\u6267\u884c\u601d\u60f3\u7684\u542f\u53d1\uff0c\u5728\u5c06\u4f20\u5165\u7684\u7f51\u7edc\u6570\u636e\u5305\u4f20\u9012\u5230\u7f51\u7edc\u5806\u6808\u4e4b\u524d\uff0c\u53ef\u4ee5\u6807\u8bb0\u5b83\u7684\u534f\u8bae\u62a5\u5934\u5417?\u5982\u679c\u662f\u8fd9\u6837\uff0c\u6211\u53ef\u4ee5\u7528\u8fd9\u79cd\u6280\u672f\u627e\u5230\u534f\u8bae\u89c4\u8303\u548c\u5b9e\u73b0\u6f0f\u6d1e\u5417?<\/p>\n

\u4e8e\u662f\u7814\u7a76\u4eba\u5458\u5199\u4e86\u4e00\u5c01\u7535\u5b50\u90ae\u4ef6\u7ed9Cristian Cadar\uff0c\u5e76\u8fc5\u901f\u6536\u5230\u4e86\u7b54\u590d\u3002\u800c\u4e14\uff0cCristian\u548cDaniel Dunbar\u6177\u6168\u5730\u5411\u5b83\u53d1\u9001\u4e86KLEE\u7684\u6e90\u4ee3\u7801\uff0c\u8fd9\u662f\u4ed6\u4eec\u6b63\u5728\u4f7f\u7528\u7684\u65b0\u5de5\u5177\uff0c\u76ee\u524d\u8fd8\u5c1a\u672a\u5bf9\u5916\u516c\u5e03\u3002<\/p>\n

\u63a5\u4e0b\u6765\u6211\u6269\u5c55\u4e86KLEE\u4ee5\u6267\u884c\u76f8\u4e92\u901a\u4fe1\u7684\u591a\u4e2a\u534f\u8bae\u6808\u3002\u6211\u5c06\u6b64\u6280\u672f\u7528\u4e8e\u6d4b\u8bd5\u4f20\u611f\u5668\u7f51\u7edc\uff0c\u5e76\u5728\u6211\u7684IPSN 2010\u8bba\u6587\u4e2d\u63cf\u8ff0\u7684Contiki OS\u4e2d\u53d1\u73b0\u4e86\u4e24\u4e2a\u6709\u8da3\u7684\u6f0f\u6d1e\u3002\u5176\u4e2d\u4e00\u4e2a\u5bfc\u81f4\u4e86TCP\/IP\u5806\u6808\u5185\u7684\u4f20\u611f\u5668\u8282\u70b9\u7684\u6b7b\u9501\uff0c\u9700\u8981\u91cd\u65b0\u8bbe\u7f6e\u786c\u4ef6\uff0c\u8fd9\u662f\u5728\u4f20\u611f\u5668\u7f51\u7edc\u90e8\u7f72\u4e2d\u89c2\u5bdf\u5230\u7684\u771f\u6b63\u6f0f\u6d1e\u3002\u6b7b\u9501\u662f\u6307\u4e24\u4e2a\u6216\u4e24\u4e2a\u4ee5\u4e0a\u7684\u8fdb\u7a0b\u5728\u6267\u884c\u8fc7\u7a0b\u4e2d\uff0c\u7531\u4e8e\u7ade\u4e89\u8d44\u6e90\u6216\u8005\u7531\u4e8e\u5f7c\u6b64\u901a\u4fe1\u800c\u9020\u6210\u7684\u4e00\u79cd\u963b\u585e\u7684\u73b0\u8c61\uff0c\u82e5\u65e0\u5916\u529b\u4f5c\u7528\uff0c\u5b83\u4eec\u90fd\u5c06\u65e0\u6cd5\u63a8\u8fdb\u4e0b\u53bb\u3002\u6b64\u65f6\u79f0\u7cfb\u7edf\u5904\u4e8e\u6b7b\u9501\u72b6\u6001\u6216\u7cfb\u7edf\u4ea7\u751f\u4e86\u6b7b\u9501\uff0c\u8fd9\u4e9b\u6c38\u8fdc\u5728\u4e92\u76f8\u7b49\u5f85\u7684\u8fdb\u7a0b\u79f0\u4e3a\u6b7b\u9501\u8fdb\u7a0b\u3002<\/p>\n

\u81ea2015\u5e74\u4ee5\u6765\uff0c\u6211\u4e00\u76f4\u6ca1\u6709\u8fc7\u591a\u4f7f\u7528\u8fc7KLEE\uff0c\u5e76\u4e14\u60f3\u518d\u6b21\u5c1d\u8bd5\u4e00\u4e0b\u3002\u540c\u65f6\uff0cContiki OS\u5df2\u62f7\u8d1d\u5230Contiki-NG\u3002\u6211\u590d\u5236\u4e86\u5b58\u50a8\u5e93\uff0c\u5e76\u5c06\u79f0\u4e3a20-packet-parsing\u7684\u6d4b\u8bd5\u7528\u4f8b\u7f16\u8bd1\u4e3aLLVM\u4f4d\u7801\u3002\u5728\u6d4b\u8bd5\u7528\u4f8b\u4e2d\uff0c\u6211\u4f7f\u7528KLEE\u7684klee_make_symbolic\u51fd\u6570\u6807\u8bb0\u4e86\u6d4b\u8bd5\u6570\u636e\u5305\u7f13\u51b2\u533a(\u301c1KB)\u7684\u7b26\u53f7\u3002Contiki-NG\u662f\u4e00\u5957\u7528\u4e8e\u4e0b\u4e00\u4ee3IoT(\u7269\u8054\u7f51)\u8bbe\u5907\u7684\u5f00\u6e90\u8de8\u5e73\u53f0\u64cd\u4f5c\u7cfb\u7edf\uff0c\u53ef\u9002\u7528\u4e8e\u72ec\u7acb\u9ad8\u9632\u670d\u52a1\u5668\u3002<\/p>\n

\u5728\u6211\u7684\u65e7Mac\u4e0a\u8fd0\u884c\u4e86\u51e0\u5206\u949f\u540e\uff0cKLEE\u5728\u89e3\u6790\u67d0\u4e9b\u534f\u8bae\u7684\u6807\u5934\u65f6\u53d1\u73b0\u4e86\u4e24\u4e2a\u5185\u5b58\u6f0f\u6d1e(\u6307\u9488\u8d85\u51fa\u8303\u56f4)\u3002\u6211\u5c06\u8fd9\u4e9b\u53d1\u73b0\u4e0e\u5177\u4f53\u7684\u6d4b\u8bd5\u6848\u4f8b\u4e00\u8d77\u62a5\u544a\u7ed9Contiki-NG\u7684\u5b89\u5168\u56e2\u961f\uff0c\u4ee5\u8fdb\u884c\u8fdb\u4e00\u6b65\u7684\u5206\u6790\u3002\u5bf9\u6211\u6765\u8bf4\uff0c\u8fd9\u4e2a\u5c0f\u6d4b\u8bd5\u662fKLEE\u4ecd\u7136\u662f\u6709\u7528\u7684\u7814\u7a76\u548c\u6d4b\u8bd5\u6848\u4f8b\u751f\u6210\u5de5\u5177\u7684\u53c8\u4e00\u4e2a\u8bc1\u636e\u3002<\/p>\n

\u5f00\u653e\u7684\u6311\u6218\u548c\u673a\u9047<\/strong><\/div>\n

\u5c06\u7b26\u53f7\u6267\u884c\u5e94\u7528\u4e8e\u4efb\u610f\u771f\u5b9e\u7a0b\u5e8f\u5f88\u96be\uff0c\u4f60\u901a\u5e38\u5fc5\u987b\u5bf9\u6267\u884c\u73af\u5883\u5efa\u6a21\uff0c\u5e76\u627e\u5230\u6709\u6548\u7684\u65b9\u6cd5\u6765\u5e94\u5bf9\u4e0d\u786e\u5b9a\u6027\u548c\u8def\u5f84\u7206\u70b8\u3002 \u800c\u4e14\uff0c\u8bb8\u591a\u8def\u5f84\u7ea6\u675f\u5f88\u96be\u89e3\u51b3\uff0c\u4f46\u662f\u5bf9\u4e8e\u5f53\u4eca\u7684\u6c42\u89e3\u5668\u800c\u8a00\u96be\u4ee5\u53ca\u65f6\u89e3\u51b3\u3002<\/p>\n

\u5c3d\u7ba1\u5982\u6b64\uff0c\u7814\u7a76\u548c\u5e94\u7528\u7b26\u53f7\u6267\u884c(\u4f7f\u7528KLEE)\u4ecd\u4f1a\u5e26\u6765\u8bb8\u591a\u673a\u4f1a\u3002\u4f60\u5c06\u4e86\u89e3\u7a0b\u5e8f\u7ed3\u6784\uff0c\u7f16\u8bd1\u5668\uff0cSAT \/ SMT\u6c42\u89e3\u5668\uff0c\u4ee5\u53ca\u5982\u4f55\u7f16\u5199\u5176\u4ed6\u7c7b\u578b\u7684\u6d4b\u8bd5\u5de5\u5177\u3002\u57fa\u4e8e\u8fd9\u4e9b\u77e5\u8bc6\uff0c\u6211\u7f16\u5199\u4e86\u6a21\u7ccaAndroid\u5e94\u7528\u7a0b\u5e8f\u7684\u5de5\u5177\uff0c\u8d85\u7ea7\u4f18\u5316LLVM IR\uff0c\u4ee5\u53ca\u6700\u8fd1\u5728\u5de5\u4f5c\u4e2d\u4f7f\u7528\u62fc\u5199\u7f16\u5199\u7684\u6a21\u7cca\u536b\u661f\u63a7\u5236\u7a0b\u5e8f\u7684\u5de5\u5177\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u5177\u4f53\u793a\u4f8b\u5982\u4e0b\uff0c\u5176\u4e2d\u8f93\u5165x\u672a\u77e5\uff0c\u5373\u7b26\u53f7\uff1a \u7b26\u53f7\u6267\u884c\u5728\u6240\u6709\u4e09\u4e2a\u6267\u884c\u8def\u5f84(x < 0, x > 100, […]<\/p>\n","protected":false},"author":1920,"featured_media":216751,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-216749","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/216749","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/users\/1920"}],"replies":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/comments?post=216749"}],"version-history":[{"count":7,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/216749\/revisions"}],"predecessor-version":[{"id":217289,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/216749\/revisions\/217289"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media\/216751"}],"wp:attachment":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media?parent=216749"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/categories?post=216749"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/tags?post=216749"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}