{"id":101737,"date":"2021-10-24T22:22:41","date_gmt":"2021-10-24T20:22:41","guid":{"rendered":"https:\/\/prohoster.info\/blog\/novosti-interneta\/intel-otkryl-kod-sistemy-mashinnogo-obucheniya-controlflag-dlya-vyyavleniya-oshibok-v-kode"},"modified":"2021-10-24T22:22:41","modified_gmt":"2021-10-24T20:22:41","slug":"intel-otkryl-kod-sistemy-mashinnogo-obucheniya-controlflag-dlya-vyyavleniya-oshibok-v-kode","status":"publish","type":"post","link":"https:\/\/prohoster.info\/en\/blog\/news\/intel-otkryl-kod-sistemy-mashinnogo-obucheniya-controlflag-dlya-vyyavleniya-oshibok-v-kode","title":{"rendered":"Intel has opened the source code of the ControlFlag machine learning system for identifying errors in code.","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>Intel has released developments related to the research project ControlFlag, aimed at creating a machine learning system to improve code quality. The toolkit prepared by the project allows for identifying various errors and anomalies in source texts written in high-level languages, such as C\/C++, based on a model trained on a large volume of existing code. The system is suitable for detecting different types of issues in the code, from spotting typos and incorrect type combinations to identifying missing NULL value checks in pointers and memory management problems. The ControlFlag code is written in C++ and is open under the MIT license.      <\/p>\n<p>The system self-trains by building a statistical model from the existing codebase of open projects published on GitHub and similar public repositories. During the training phase, the system identifies typical patterns in code constructions and builds a syntax tree of relationships between these patterns, reflecting the execution flow of the code in the program. As a result, a reference decision tree is formed, consolidating the development experience of all analyzed source texts.     <\/p>\n<p>A similar process of pattern identification is performed for the code being examined, which is compared against a reference decision tree. Significant discrepancies with neighboring branches indicate the presence of an anomaly in the inspected template. The system not only allows for the detection of errors in the template but also suggests corrections. For example, in the OpenSSL code, a construct was identified as \u2018(s1 == NULL) \u2227 (s2 == NULL)\u2019, which appeared only 8 times in the syntax tree, whereas the nearest branch with the value \u2018(s1 == NULL) || (s2 == NULL)\u2019 appeared around 7,000 times. The system also identified the anomaly \u2018(s1 == NULL) | (s2 == NULL)\u2019, which appeared in the tree 32 times.      <center><img decoding=\"async\" alt=\"Intel has opened the source code of the ControlFlag machine learning system for identifying errors in code. \" src=\"\/wp-content\/uploads\/2021\/10\/f59e59e606a113aac675d44fd97845bd.jpg\" style=\"display:block;margin: 0 auto;\" \/><\/center>    <\/p>\n<p>When analyzing the code fragment \u2018if (x = 7) y = x;\u2019, the system determined that typically in an \u2018if\u2019 statement, the construct \u2018variable == number\u2019 is used for comparing numerical values. Therefore, the presence of \u2018variable = number\u2019 in the \u2018if\u2019 expression is likely due to a typographical error. Such mistakes would also be caught by traditional static analyzers, but unlike them, ControlFlag does not apply fixed rules that struggle to account for all possible scenarios, but rather relies on statistics from the usage of various constructs across a large number of projects.     <\/p>\n<p>As an experiment, using ControlFlag on the source code of the cURL utility, which is often cited as an example of high-quality and verified code, an unnoticed error was discovered by static analyzers related to the use of the structure element \u2018s-&gt;keepon\u2019, which had a numerical type but was compared to a boolean value TRUE. In the OpenSSL code, apart from the previously mentioned issue with \u2018(s1 == NULL) \u2227 (s2 == NULL)\u2019, anomalies were also found in the expressions \u2018(-2 == rv)\u2019 (the minus was a typographical error) and \u2018BIO_puts(bp, \u2018:\u2019)\u2019.<br \/>\n<br \/>Source: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/www.opennet.ru\/opennews\/art.shtml?num=56018\">opennet.ru<\/a> <\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Intel \u043e\u0442\u043a\u0440\u044b\u043b\u0430 \u043d\u0430\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c ControlFlag, \u043d\u0430\u0446\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043a\u043e\u0434\u0430. \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043c\u043e\u0434\u0435\u043b\u0438, \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u043e\u043c \u043e\u0431\u044a\u0451\u043c\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u043a\u043e\u0434\u0430, \u0432\u044b\u044f\u0432\u043b\u044f\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u0430\u043d\u043e\u043c\u0430\u043b\u0438\u0438 \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0445 \u0442\u0435\u043a\u0441\u0442\u0430\u0445, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0432\u044b\u0441\u043e\u043a\u043e\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u044b\u0445 \u044f\u0437\u044b\u043a\u0430\u0445, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a C\/C++. \u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u0434\u0435 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0432\u0438\u0434\u043e\u0432 [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":101738,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[702],"tags":[],"class_list":["post-101737","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.1.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Intel \u043e\u0442\u043a\u0440\u044b\u043b\u0430 \u043d\u0430\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c ControlFlag, \u043d\u0430\u0446\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043a\u043e\u0434\u0430.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/en\/blog\/news\/intel-otkryl-kod-sistemy-mashinnogo-obucheniya-controlflag-dlya-vyyavleniya-oshibok-v-kode\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.1.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47Intel \u043e\u0442\u043a\u0440\u044b\u043b \u043a\u043e\u0434 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f ControlFlag \u0434\u043b\u044f \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u043a\u043e\u0434\u0435 | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Intel \u043e\u0442\u043a\u0440\u044b\u043b\u0430 \u043d\u0430\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c ControlFlag, \u043d\u0430\u0446\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043a\u043e\u0434\u0430.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/en\/blog\/news\/intel-otkryl-kod-sistemy-mashinnogo-obucheniya-controlflag-dlya-vyyavleniya-oshibok-v-kode\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2021-10-24T20:22:41+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2021-10-24T20:22:41+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Intel has opened the machine learning system ControlFlag code for detecting errors in code | ProHoster","description":"Intel has unveiled the developments related to the research project ControlFlag, aimed at creating a machine learning system to improve code quality.","canonical_url":"https:\/\/prohoster.info\/en\/blog\/news\/intel-otkryl-kod-sistemy-mashinnogo-obucheniya-controlflag-dlya-vyyavleniya-oshibok-v-kode","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"en_US","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47Intel \u043e\u0442\u043a\u0440\u044b\u043b \u043a\u043e\u0434 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f ControlFlag \u0434\u043b\u044f \u0432\u044b\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0448\u0438\u0431\u043e\u043a \u0432 \u043a\u043e\u0434\u0435 | ProHoster","og:description":"\u041a\u043e\u043c\u043f\u0430\u043d\u0438\u044f Intel \u043e\u0442\u043a\u0440\u044b\u043b\u0430 \u043d\u0430\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0441 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c ControlFlag, \u043d\u0430\u0446\u0435\u043b\u0435\u043d\u043d\u044b\u043c \u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u043a\u043e\u0434\u0430.","og:url":"https:\/\/prohoster.info\/en\/blog\/news\/intel-otkryl-kod-sistemy-mashinnogo-obucheniya-controlflag-dlya-vyyavleniya-oshibok-v-kode","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2021-10-24T20:22:41+00:00","article:modified_time":"2021-10-24T20:22:41+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"101737","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":null,"breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-10-24 20:24:32","updated":"2022-10-04 22:00:53","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/101737","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/comments?post=101737"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/101737\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media\/101738"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media?parent=101737"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/categories?post=101737"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/tags?post=101737"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}