ControlFlag: a code debugging tool

Intel has released releasing the significant version of ControlFlag 1.0, which is a software control system allowing detect errors and anomalies in your code source using a machine learning system trained on a large amount of existing code.

Unlike traditional static analyzers, ControlFlag does not apply predefined rules, in which it is difficult to foresee all possible options, but rather part of the statistics of use of all types of constructions language in a large number of existing projects.

According to research, finding and removing bugs in code is most often done manually and takes more than 50% of developers' work time. 

The tool learns how to identify and label these stylistic options and you can customize bug identification and fix recommendations based on your knowledge, minimizing ControlFlag bad code characterizations that may simply be a stylistic deviation between two teams of developers. .

About ControlFlag

The system is trained by building a statistical model from the existing source code matrix open published on GitHub and similar public repositories. In the training stage, the system determines typical templates to build structures in the code and builds a syntactic tree of connections between these templates, reflecting the flow of code execution in the program.

As a result, a reference decision tree is formed, combining the development experience of all analyzed source texts. A similar pattern-setting process is performed for the code under test, which is compared to a reference decision tree. Large discrepancies with adjacent branches indicate an anomaly in the pattern being verified.

Of the characteristics Of the version ControlFlag 1.0, full support for C templates is highlighted and the ability to detect anomalies in conditional "if" statements.

For example, when parsing the code snippet "if (x = 7) y = x;" the system will detect that the construct "variable == number" is generally used in the statement "if" to compare numerical values, so the indication "variable = number" in the statement "if" is probably caused by a typographical error.

El kit provides a script that allows downloading the C repositories available on GitHub and use them to build a model. Ready-to-go models are also available, allowing you to start checking code right away

The system is part of the Machine Programming Research project (MPR) from Intel, whose main objective is to reduce the time required for software development by 1000 times due to automation.

In particular, Intel is currently working to train Controlflag to automatically correct detected errors. Also in 2020, the company released the MISIM tool, developed in conjunction with MIT labs, which can study code snippets to understand what a piece of code is intended to do. The system is intended to be used to provide developers with ways to improve code efficiency.

"Debugging is expected to cause even more damage to developers and the industry as a whole," Intel said. Announcement… "When fully implemented, ControlFlag can help mitigate this challenge by automating the hassle of software development such as testing, monitoring and debugging."

“The main advantage of ControlFlag's unsupervised approach to pattern recognition is that you can essentially learn to adapt to the style of the developer. Because the program has limited input to the control tools you need to evaluate. ControlFlag can identify typographic variations in programming languages ​​in the same way that readers can recognize complete differences between words and use English abbreviations, ”writes Intel.

Finally if you are interested in knowing more about it About ControlFlag, you should know that it is written in C ++ and is open source under the MIT license and its code is hosted on GitHub.


The content of the article adheres to our principles of editorial ethics. To report an error click here!.

Be the first to comment

Leave a Comment

Your email address will not be published.

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.