摘要:
Embodiments of tree-based directed graph programming structures for a declarative programming language are provided. In various embodiments, complex graph structured data, referred to as "DGraphs" herein in one non-limiting implementation, is authored using a compact, human friendly syntax without the use of explicit identifiers. In one non-limiting aspect, the syntax includes support for conformance relationships, also referred to as factored relationships. In another non-limiting aspect, the semistructured graph data is a tree-based representation and the syntax includes lexical resolution of references or lexical scoping, and/or non local initialization.
摘要:
The subject matter disclosed herein provides methods and apparatus, including computer program products, for navigating abstract syntax trees. In one aspect there is provided a method. The method may include receiving a plurality of nodes, the nodes configured as an abstract syntax tree representing program code. The method may also include identifying at least one node from the plurality of nodes by navigating the plurality of nodes using a path expression. Related systems, apparatus, methods, and/or articles are also described.
摘要:
A method and system detect vulnerabilities in source code. Source code (134) is processed by a parser (136) into an intermediate representation. Models (e.g., in the form of lattices) are derived (138) for the variables in the code and for the variables and/or expressions using in conjunction with routine calls. The models are then analyzed in conjunction with pre-specified rules in a vulnerability database (142), about the routines to determine (140) if the routine call possesses one or more pre-selected vulnerabilities.
摘要:
Techniques and systems for creating a function call graph for a codebase are disclosed. Graph creation includes identifying functions (1001) in the codebase by a function signature and representing a function (1070) as a first node in the call graph. For that function, identifying (1200) call-to functions, call-from functions, and inheritance parents and children, and a base class from the function signature of that function; adding child nodes (1020) to the first node based on the identified call-to and call-from functions; for an interface call (1010) to a base class method in the function, adding child nodes (1020) to the first node based on implementations of an override of the base class method (1090); for an added child node, removing that child node from the first node if a source file that includes an implementation of an override and a source code file that includes the function don't share at least one common binary file (1100)-(1150).
摘要:
Techniques and systems for creating a function call graph for a codebase are disclosed. Graph creation includes identifying functions (1001) in the codebase by a function signature and representing a function (1070) as a first node in the call graph. For that function, identifying (1200) call-to functions, call-from functions, and inheritance parents and children, and a base class from the function signature of that function; adding child nodes (1020) to the first node based on the identified call-to and call-from functions; for an interface call (1010) to a base class method in the function, adding child nodes (1020) to the first node based on implementations of an override of the base class method (1090); for an added child node, removing that child node from the first node if a source file that includes an implementation of an override and a source code file that includes the function don't share at least one common binary file (1100)-(1150).
摘要:
A graph-based program specification includes components corresponding to tasks and directed links between ports of the components, including: a first type of link configuration defined by respective output and input ports of linked components, and a second type of link configuration defined by respective output and input ports of linked components. A compiler recognizes different types of link configurations and provides in a target program specification occurrences of a target primitive for executing a function for each occurrence of a data element flowing over a link of the second type. A computing node initiates execution of the target program specification, and determines at runtime, for components associated with the occurrences of the target primitive, an order in which instances of tasks corresponding to the components are to be invoked, and/or a computing node on which instances of tasks corresponding to the components are to be executed.
摘要:
A graph-based program specification includes components corresponding to tasks and directed links between ports of the components, including: a first type of link configuration defined by respective output and input ports of linked components, and a second type of link configuration defined by respective output and input ports of linked components. A compiler recognizes different types of link configurations and provides in a target program specification occurrences of a target primitive for executing a function for each occurrence of a data element flowing over a link of the second type. A computing node initiates execution of the target program specification, and determines at runtime, for components associated with the occurrences of the target primitive, an order in which instances of tasks corresponding to the components are to be invoked, and/or a computing node on which instances of tasks corresponding to the components are to be executed.
摘要:
The device according to the present invention enables a lexical analyser to generate selective tokens for a syntactic analyser, differentiating ambiguous lexical entities. In particular, the device is used to remove ambiguities in the C language grammar defined in the ISO/ANSI C standard.
摘要:
A method of analyzing target software for security vulnerabilities comprises, with a processor, scanning a codebase of a target software using a static analysis scan to identify a number of security flaws, and calculating a number of code metrics of the codebase of the target software for a number of iterations over a period of time to obtain a number of historical scans.
摘要:
Methods, systems, and apparatus, including computer programs encoded on computer storage media, for matching and attributing code violations. One of the methods includes receiving a snapshot S of a code base of source code and a different snapshot T of the code base. Data representing first violations in the snapshot S and second violations in the snapshot T is received. Pairs of matching violations are determined using performing two or more matching processes, including performing a first matching process, the first matching process determining first pairs of matching violations according to a first matching algorithm and performing a second matching process, the second matching process determining second pairs of matching violations according to a second matching algorithm from violations not matched by the first matching process. The first pairs of matching violations and the second pairs of matching violations are included in the determined pairs of matching violations.