Method and apparatus for managing effectiveness of information processing task
US-2020026552-A1 · Jan 23, 2020 · US
US11226815B2 · US · B2
| Field | Value |
|---|---|
| Publication number | US-11226815-B2 |
| Application number | US-202016842191-A |
| Country | US |
| Kind code | B2 |
| Filing date | Apr 7, 2020 |
| Priority date | Apr 7, 2020 |
| Publication date | Jan 18, 2022 |
| Grant date | Jan 18, 2022 |
A practical reading order for non-experts. Skip the full description unless you need deep technical detail.
What the patent document calls the invention.
A short plain-language summary of the technical disclosure.
Who owns or filed the patent and who is credited as inventor.
Filing, priority, publication, and grant dates set the timeline.
The legal scope of protection — read this for what is actually claimed.
Technology tags used to group this patent with similar filings.
Prior art links and similar publications in this corpus.
Official abstract text for this publication.
A method of analyzing code is provided. The method includes generating an abstract representation of the code, identifying conditional statements in the abstract representation, populating a truth table for each conditional statement that has been identified with all possible outcomes of the conditional statement and assessing the truth table for each conditional statement to identify issues.
Opening claim text (preview).
What is claimed is: 1. A method of analyzing redundancies in code in an operational setting in which multiple programmers are responsible for generating the code, the method comprising: receiving, in a processor, sections of the code from a first portion of each of the multiple programmers in parallel and from a second portion of each of the multiple programmers in series; and analyzing the code, by the processor, the executing comprising: generating an abstract representation of the code; identifying conditional statements in the abstract representation; populating a truth table for each conditional statement that has been identified with all possible outcomes of the conditional statement; and assessing, in a prediction unit of the processor, the truth table for each conditional statement to identify issues, wherein: the issues that are identified in the truth table for each conditional statement by the prediction unit of the processor comprise instances in which unreachable code regions are present in the code, the unreachable code regions are defined as the regions of the code that will never run based on a logical construction of earlier and later conditional statements, the analyzing the code, by the processor, further comprises issuing signals comprising proposed changes to the code to address and correct an issue separately to the first portion of each of the multiple programmers and the second portion of each of the multiple programmers to highlight the issue, and the populating of the truth table comprises populating a first column with an identifier of the earlier conditional statement and possible outcomes of the earlier conditional statement, populating a second column with an identifier of the later conditional statement and possible outcomes of the later conditional statement and populating a third column with an identifier of a combination of the earlier and later conditional statements and possible outcomes of the combination of the earlier and later conditional statements. 2. The method according to claim 1 , wherein the generating of the abstract representation comprises: parsing the code to generate tokens; representing the tokens in a concrete representation; and replacing the tokens with abstract terms in the concrete representation to create the abstract representation. 3. The method according to claim 2 , wherein each token comprises a language-specific token and each abstract term comprises a generic value. 4. The method according to claim 2 , wherein the replacing of the tokens with the abstract terms comprises traversing the concrete representation in an order of instructions of a stream of the code. 5. The method according to claim 1 , wherein each conditional statement comprises one or more of an if-else statement, a select statement, a switch statement and a ternary operator. 6. The method according to claim 1 , wherein the identifying of the conditional statements in the abstract representation comprises traversing the abstract representation in an order of instructions of the code, and the assessing of the truth table for each conditional statement comprises: determining, given the order of the instructions of the code, whether a later conditional statement overlaps with an earlier conditional statement as evidenced by corresponding entries in the first, second and third columns; and flagging at least one of the later conditional statement and the earlier conditional statement as an issue if the later conditional statement and the earlier conditional statement are both true such that the later conditional statement is one of the unreachable code regions in the code. 7. The method according to claim 6 , further comprising identifying additional issues in the code with similar overlapping conditional statements. 8. A system for analyzing redundancies in code in an operational setting in which multiple programmers are responsible for generating the code, the computer program product comprising: a processor, which is receptive of sections of the code from a first portion of each of the multiple programmers in parallel and from a second portion of each of the programmers in series; and a memory, the memory having executable instructions stored thereon, which, when executed, cause the processor to execute a method of analyzing the code comprising: generating an abstract syntax tree (AST) to represent the code; identifying conditional statements in the AST; populating a truth table for each conditional statement that has been identified with all possible outcomes of the conditional statement; and assessing, by the processor in a prediction unit of the processor, the truth table for each conditional statement to identify issues in the code, wherein: the issues in the code that are identified in the truth table for each conditional statement by the prediction unit of the processor comprise instances in which unreachable code regions are present in the code, the unreachable code regions are defined as the regions of the code that will never run based on a logical construction of earlier and later conditional statements, the method of analyzing the code, by the processor, further comprises issuing signals comprising proposed changes to the code to address and correct the issues separately to the first portion of each of the multiple programmers and the second portion of each of the multiple programmers to highlight the issue, and the populating of the truth table comprises populating a first column with an identifier of the earlier conditional statement and possible outcomes of the earlier conditional statement, populating a second column with an identifier of the later conditional statement and possible outcomes of the later conditional statement and populating a third column with an identifier of a combination of the earlier and later conditional statements and possible outcomes of the combination of the earlier and later conditional statements. 9. The system according to claim 8 , wherein the method further comprises receiving the code as an input by the processor and the processor comprises: a lexicography unit configured to parse the code to generate tokens and to validate the code; a parsing unit configured to represent the tokens in a concrete syntax tree (CST); an AST creating unit to configured to replace the tokens with abstract terms in the CST to create the AST; an output unit configured to identify the conditional statements in the AST and to populate the truth table for each conditional statement that has been identified with all the possible outcomes of the conditional statement; and the prediction unit configured to assess the truth table for each conditional statement to identify the issues in the code. 10. The system according to claim 8 , wherein the generating of the AST comprises: parsing the code to generate tokens; representing the tokens in a concrete syntax tree (CST); and replacing the tokens with abstract terms in the CST to create the AST. 11. The system according to claim 10 , wherein each token comprises a language-specific token and each abstract term comprises a generic value. 12. The system according to claim 10 , wherein the replacing of the tokens with the abstract terms comprises traversing the CST in an order of instructions of the code. 13. The system according to claim 8 , wherein each conditional statement comprises one or more of an if-else statement, a select statement, a switch statement and a ternary operator. 14. The system according to claim 8 , wherein: the identifying of the conditional statements in the AST comprises traver
Syntactic analysis · CPC title
Structural analysis for program understanding · CPC title
Program code verification, e.g. Java bytecode verification, proof-carrying code (high-level semantic checks G06F8/43; prevention of errors by analysis, debugging or testing of software G06F11/36) · CPC title
Related publications grouped by family.
Answers are generated from the same data shown on this page.