A software bug is an error, flaw, or fault in computer code that causes it to produce an incorrect or unexpected result, or to behave in unintended ways. Software bug detection tools, such as static and dynamic program analysis tools, are used to find software bugs. Static program analysis is the analysis of a computer program that is performed without actually executing the program, while dynamic analysis is analysis performed on a computer program while it is executing. Typically, the analysis is performed on some version of the source code or some form of the object code.
Various embodiments in accordance with the present disclosure will be described with reference to the drawings, in which:
The present disclosure relates to visualizing dependent relationships in computer program analysis trace elements. According to some embodiments, a computer program analysis trace tool is used to analyze computer code, and the output of the tool is displayed as a tree data structure, rather than as a linear trace. One form of the tree data structure uses line indentations to illustrate dependent relationships between nodes of the tree data structure, where the nodes correspond to locations (e.g., lines) in the computer code. In some embodiments, the computer program analysis trace tool outputs annotations for one or more of the nodes of the tree data structure, where the annotations provide contextual information that helps the user understand the action(s) performed at the locations in the computer code corresponding to the annotated nodes, as well as usage of data types from other parts of the computer code and operations performed on data types. In still further embodiments, the tree data structure uses color coding to distinguish nodes at different levels, which further aids the user's understanding of the dependent relationships between and among nodes in the tree data structure.
A software bug is an error, flaw, or fault in computer code that causes it to produce an incorrect or unexpected result, or to behave in unintended ways. Software bug detection tools, such as static and dynamic program analysis tools, are used to find software bugs. According to prior techniques, the output of such a detection tool is presented to the user by pointing to a specific line of code where an error is found, or as a trace showing a sequence of program statements that results in an error. A trace is the output of a tracing process, and a form of the trace is displayed for a user to view. Performing a tracing process involves receiving, at a computer program analysis tool, input of a program (also referred to as computer code), following possible paths through the program, collecting information about what is happening in the program, producing an output, and displaying a form of the output. Tracing may, for example, involve a specialized use of logging to record information about the program's execution. In simple cases, tracing is just a few print statements, which output the values of variables at certain points of program execution.
A technical problem with traces produced according to prior techniques is user understandability. For example, a trace produced and displayed according to prior techniques might contain information about just a single line of code, or a group of lines of code, where a program error occurs. The trace, however, may omit relevant information pertaining to one or more other parts of the program, such as locations where variables and/or constants are initialized. In another example, a trace may present statements in an unintuitive order, such as in an order that doesn't correspond to the order in which the program executes.
As an example, consider the following simple code snippet (hereinafter Code Snippet A):
//Class2.java
line 8: return “x86”;
//Class1.java
line 2: String a=getA( )//returns string constant “x86”
line 3: int x=a.length( )
line 4: int y=−4
line 5: z=x+y
line 6: assert (z>=0)
In this simple example, a program type is initialized, operations are performed on the program type, and the associated variable flows into operations performed on other program types, e.g., used in another program type. For example, a variable “a” is initialized with string constant “x86,” and the length of the variable “a” is used to initialize a variable “x.” In this program, there is a path where the assertion at line 6 is violated. In particular, there is a path where z=−1, because z=x+y, where x=3 (the length of the variable “a”) and y=−4. This path, which may be referred to as a bug, is a potential program behavior that does not meet the program specification.
Program analysis tools check the program against a correctness specification. In the example above, the correctness specification is the assertion statement at line 6 that checks that, along any program path, z should be greater than or equal to 0. When a program analysis tool finds a potential violation, the output of the tool is sometimes presented to the user (e.g., displayed on a display) in the form of a linear trace. For example, consider the following linear trace output from a computer program analysis tool based on Code Snippet A:
1. Class1.java: line 5
2. Class1.java: line 3
3. Class1.java: line 2
4. Class2.java: line 8
5. Class1.java: line 4
6. Class1.java: line 6
The program analysis tool outputs the above trace because of the order in which it discovers the bug. In particular, the tool analyzes the statement at line 5 (z=x+y), and based on the variables used in that line, it issues a backward query that analyzes (recursively) the statement at line 3 (int x=a.length( )), then the statement at line 2 (String a=getA( )), then the statement at line 8 in Class2.java (return “x86”), then the statement at line 4 (int y=−4), then the statement at line 6 (assert (z>=0)). The above trace illustrates the technical problems with prior program analysis tools. In particular, traces produced using prior program analysis tools may be unintuitive for multiple reasons. For example, the information displayed by the trace is quite limited, because it is nothing more than an ordered list of program types and program line numbers. No contextual information is provided to aid the user's understanding of how the sequence of program line numbers leads to an error. The above trace is relatively short, because it's based on the relatively simple Code Snippet A, but in typical use cases a sequence of statements in a trace may include dozens of program line numbers that span multiple files, which makes such traces much more difficult to understand than the simple example provided above. Further, a trace produced using prior program analysis tools may have interleaved within it data flows from program types defined and used in other parts of the program. And, recursively, these program types may have other data flows interleaved within them. This interleaving of data flows makes the trace even more difficult to follow, particularly considering that no contextual information is provided to aid the user's understanding. In another example, a trace might not follow the same order as that in which the program executes. Further, a set of traces might be related, but the output from the prior program analysis tool does not provide any indication of such relationship, let alone any indication of how the traces are related.
The present embodiments provide technical solutions to these technical problems by capturing dependent relationships between trace elements, and augmenting the trace with contextual information about those relationships. In some embodiments, the contextual information provided in the trace comprises displaying the trace as a tree data structure in which nodes are indented to indicate dependent relationships between and among variables and/or constants defined within the computer code. For example, a first node of the tree data structure may correspond to a location in the computer code at which a first variable is initialized, and a second node of the tree data structure may correspond to a location in the computer code at which a second variable is initialized. If the value of the first variable depends on the value of the second variable, then the tree data structure is presented with the second node (may be referred to as a child node) positioned beneath the first node (may be referred to as a parent node) and the second node indented with respect to the first node. If the value of the second variable depends on a value of a third variable, then the tree data structure is presented with the third node positioned beneath the second node and the third node indented with respect to the second node. This pattern of nested indentations is repeated for however many dependent relationships exist for any number of variables (and/or constants), with each successive node being indented with respect to the node above it in the tree data structure, and a child node signifies that its parent node uses the value defined at the location in the computer code corresponding to the child node. The pattern of indentations thus provides a visual illustration for the user to easily understand the dependent relationships between and among variables and/or constants defined within the computer code, which in turn aids the user's understanding of how and where the error occurs in the computer code.
Also in some embodiments, the tree data structure includes annotations in the displayed form of the output (the trace) that provide further contextual information to enhance understandability. For example, a first annotation corresponding to a first node may indicate that a first variable (or constant) is initialized at a first location in the computer code. The first annotation may further indicate a type of the first variable (or constant), such as an integer variable or a string constant. The annotations thus provide contextual information that aids the user's ability to understand the actions performed at the corresponding locations in the computer code.
Also in some embodiments, the tree data structure includes color coding in the displayed form of the output (the trace) to enhance understandability. For example, a first node may be represented in the trace using a first color, and a second node, which is a child of the first node (or parent node), may be represented in the trace using a second color that is different from the first color. The colors in the tree data structure may be in the form of colored text, or colored highlighting overlying text, or colored bullet points setting off the nodes, or in any other representation that uses different colors to indicate dependent relationships between and among nodes. In some embodiments, nodes at the same level (e.g., having the same amount or degree of indentation) may be represented with the same color.
A provider network (may also be referred to as a cloud provider network) provides users with the ability to use one or more of a variety of types of computing-related resources, such as compute resources (e.g., executing virtual machine (VM) instances and/or containers, executing batch jobs, executing code without provisioning servers), data/storage resources (e.g., object storage, block-level storage, data archival storage, databases and database tables, etc.), network-related resources (e.g., configuring virtual networks including groups of compute resources, content delivery networks (CDNs), Domain Name Service (DNS)), application resources (e.g., databases, application build/deployment services), access policies or roles, identity policies or roles, machine images, routers and other data processing resources, etc. These and other computing resources may be provided as services, such as a hardware virtualization service that can execute compute instances, a storage service that can store data objects, etc. The users (or customers) of provider networks may use one or more user accounts that are associated with a customer account, though these terms may be used somewhat interchangeably depending upon the context of use. Users may interact with a provider network across one or more intermediate networks (e.g., the internet) via one or more network interface(s), such as through use of application programming interface (API) calls, via a console implemented as a website or application, etc. An API refers to an interface and/or communication protocol between a client and a server, such that if the client makes a request in a predefined format, the client should receive a response in a specific format or initiate a defined action. In the cloud provider network context, APIs provide a gateway for customers to access cloud infrastructure by allowing customers to obtain data from, or cause actions within, the cloud provider network, enabling the development of applications that interact with resources and services hosted in the cloud provider network. APIs can also enable different services of the cloud provider network to exchange data with one another. The interface(s) may be part of, or serve as a front-end to, a control plane of the provider network that includes backend services supporting and enabling the services that may be more directly offered to customers.
For example, a cloud provider network (or, simply, cloud) typically refers to a large pool of accessible virtualized computing resources (such as compute, storage, and networking resources, applications, and services). A cloud can provide convenient, on-demand network access to a shared pool of configurable computing resources that can be programmatically provisioned and released in response to customer commands. These resources can be dynamically provisioned and reconfigured to adjust to variable load. Cloud computing can thus be considered as both the applications delivered as services over a publicly accessible network (e.g., the Internet, a cellular communication network), and the hardware and software in cloud provider data centers that provide those services.
Generally, the traffic and operations of a provider network may broadly be subdivided into two categories: control plane operations carried over a logical control plane and data plane operations carried over a logical data plane. While the data plane represents the movement of user data through the distributed computing system, the control plane represents the movement of control signals through the distributed computing system. The control plane generally includes one or more control plane components distributed across and implemented by one or more control servers. Control plane traffic generally includes administrative operations, such as system configuration and management (e.g., resource placement, hardware capacity management, diagnostic monitoring, system state information). The data plane includes customer resources that are implemented on the provider network (e.g., computing instances, containers, block storage volumes, databases, file storage). Data plane traffic generally includes non-administrative operations such as transferring customer data to and from the customer resources. The control plane components are typically implemented on a separate set of servers from the data plane servers, and control plane traffic and data plane traffic may be sent over separate/distinct networks.
To provide these and other computing resource services, provider networks often rely upon virtualization techniques. For example, virtualization technologies may provide users the ability to control or use compute resources (e.g., a compute instance such as a VM using a guest operating system (O/S) that operates using a hypervisor that may or may not further operate on top of an underlying host O/S, a container that may or may not operate in a VM, a compute instance that can execute on bare metal hardware without an underlying hypervisor), where one or multiple compute resources can be implemented using a single electronic device. Thus, a user may directly use a compute resource (e.g., provided by a hardware virtualization service) hosted by the provider network to perform a variety of computing tasks. Additionally, or alternatively, a user may indirectly use a compute resource by submitting code to be executed by the provider network (e.g., via an on-demand code execution service), which in turn uses one or more compute resources to execute the code—typically without the user having any control of or knowledge of the underlying compute instance(s) involved.
For example, in various embodiments, a serverless function may include code provided by a user or other entity—such as the provider network itself—that can be executed on demand. Serverless functions may be maintained within provider network by an on-demand code execution service and may be associated with a particular user or account, or may be generally accessible to multiple users/accounts. A serverless function may be associated with a Uniform Resource Locator (URL), Uniform Resource Identifier (URI), or other reference, which may be used to invoke the serverless function. A serverless function may be executed by a compute resource, such as a virtual machine, container, etc., when triggered or invoked. In some embodiments, a serverless function can be invoked through an application programming interface (API) call or a specially formatted HyperText Transport Protocol (HTTP) request message. Accordingly, users can define serverless functions that can be executed on demand, without requiring the user to maintain dedicated infrastructure to execute the serverless function. Instead, the serverless functions can be executed on demand using resources maintained by the provider network. In some embodiments, these resources may be maintained in a ready state (e.g., having a pre-initialized runtime environment configured to execute the serverless functions), allowing the serverless functions to be executed in near real-time.
In the embodiment illustrated in
With continued reference to
The electronic device 104 also transmits to the code analysis service 102 a request (e.g., a command, data, information, etc.) for the computer code 114 to be analyzed for at least one of errors or policy violations. The request may be transmitted together with the computer code 114 at circle “1,” or in alternative embodiments the request may be transmitted before or after the computer code 114. Subsequent to receiving the computer code 114 and the request for the computer code 114 to be analyzed, the code analysis service 102 executes, at circle “2,” the computer program analysis tool 108 to analyze the computer code 114. Static program analysis is the analysis of computer software that is performed without actually executing programs, in contrast with dynamic analysis, which is analysis performed on programs while they are executing. The analysis may be performed on some version of the source code, or on some form of the object code. In various embodiments, the computer program analysis tool 108 may perform either or both of static and dynamic analysis of computer programs.
In some embodiments, the computer program analysis tool 108 analyzes the computer code 114 by receiving the computer code 114 as input, and tracing the program line-by-line, following at least a subset of the possible paths through the program and checking for errors. An error in a computer program is a difference between the desired performance or behavior, and the actual performance or behavior, of the computer program. For example, the computer program analysis tool 108 may perform data analysis on the computer program, making sure defined data is properly used. As described further below, defined data may be improperly used, for example, when a defined variable leads to an invalid assertion. In another example, the computer program analysis tool 108 may check the computer program against defined coding rules from standards and/or against custom predefined rules or policies. When the computer program analysis tool 108 finds an error or a policy violation, it produces output (e.g., a trace log 116) including identifying information for the location(s) (e.g., line(s)) where the error or policy violation occurs. As used herein, inputs may be signals, information, data, commands, and the like received by a component, module, device, system, and the like, and outputs may be signals, information, data, commands, and the like sent from a component, module, device, system, and the like. The output of the computer program analysis tool 108 is subsequently transmitted to the electronic device 104, which may display some form of the output for review by the user. In alternative embodiments, the tracing may not be performed line-by-line, but rather may follow one or more tracing paths through the program (e.g., using backward and/or forward queries from points in the program of particular interest, such as assertion lines).
As an example, consider again Code Snippet A:
//Class2.java
line 8: return “x86”;
//Class1.java
line 2: String a=getA( )//returns string constant “x86”
line 3: int x=a.length( )
line 4: int y=−4
line 5: z=x+y
line 6: assert (z>=0)
The above computer code 114 is transmitted to the code analysis service 102 at circle “1.” At circle “2,” the computer program analysis tool 108 receives the computer code 114 as input, and, at circle “3,” the computer program analysis tool 108 analyzes the computer code 114 by tracing the program, following one or more possible paths through the program, checking for errors and/or policy violations, and generating output stored in the trace log 116, at circle “4”. In some embodiments, the computer code 114 may be stored at a data store 118 of the code analysis service 102 at circle “2A.” The computer code 114 stored at the data store 118 may be encrypted in some embodiments. Also in some embodiments, the trace log 116 may be stored at the data store 118 at circle “4A.”
In the example Code Snippet A, the computer program analysis tool 108 identifies a first path that leads to an invalid assertion at line 6. In particular, in Class2.java, at line 8, a constant “x86” of type string is defined. In computer programming, a constant is a value that cannot be altered by the program during normal execution, as contrasted with a variable, which is an identifier with a value that can be changed during normal execution.
Continuing to trace the program line-by-line, the computer program analysis tool 108 identifies, in Class1.java, at line 2, a variable “a” of type string is initialized with string constant “x86.” In computer programming, a variable is a storage location (identified by a memory address) paired with an associated symbolic name, which contains some known or unknown quantity of information referred to as a value. The variable name is the usual way to reference the stored value, in addition to referring to the variable itself, depending on the context. This separation of name and content allows the name to be used independently of the exact information it represents. The identifier in computer source code can be bound to a value during run time, and the value of the variable may thus change during program execution.
Continuing to trace the program line-by-line, the computer program analysis tool 108 identifies, in Class1.java, at line 3, a variable “x” of type int is initialized with the length of the variable “a.” Then, at line 4, a variable “y” of type int is initialized with value −4. Then, at line 5, a variable “z” of type int is initialized with value “x+y.” Then, at line 6, a value of the variable “z” is asserted. In particular, line 6 of Class1.java asserts z>=0.
In this program, there is a path where the assertion at line 6 of Class1.java is violated. In particular, there is a path where z=−1, because z=x+y, where x=3 (the length of the variable “a”) and y=−4. This path, which may be referred to as a bug or an error, is a potential program behavior that does not meet the program specification. To identify this error, the computer program analysis tool 108 analyzes the statement at line 5 (z=x+y), and based on the variables used in that line, the computer program analysis tool 108 issues a backward query that analyzes (recursively) the statement at line 3 (int x=a.length( )), then the statement at line 2 (String a=getA( )), then the statement at line 8 in Class2.java (return “x86”), then the statement at line 4 (int y=−4), then the statement at line 6 (assert (z>=0)).
The computer program analysis tool 108 generates output that is stored in the trace log 116. The trace log 116 may be stored in local memory (not shown) accessible to the computer program analysis tool 108 and/or written to the data store 118 of the code analysis service 102. The trace log 116 includes trace elements, each corresponding to a location (e.g., a line) in the source code, and at least a subset of the trace elements together describe the path in the above program that results in the error.
The computer program analysis tool 108 generates further output representative of (e.g., is a binary representation of) a tree data structure, an example of which is illustrated in
In the tree data structure 202, the nodes are arranged as a list, with each node positioned above and/or below the other nodes. The left end of each node may include a dash, as shown, or a bullet, or any other graphical symbol or notation (e.g., numbering or lettering) to demarcate the beginning of a node. Further, each node may be indented with respect to one or more nodes above it, and the indentations illustrate dependent relationships between and among the nodes. For example, the second node 206 is indented with respect to the first node 204, the third node 208 is indented with respect to the second node 206, and the fourth node 210 is indented with respect to the third node 208. This arrangement indicates that the value of the variable initialized at the line of the source code corresponding to the first node 204 (in this case the variable “z”) depends on the value of the variable initialized at the line of the source code corresponding to the second node 206 (in this case the variable “x”), which in turn depends on the value of the variable initialized at the line of the source code corresponding to the third node 208 (in this case the variable “a”), which in turn depends on the value of the constant defined at the line of the source code corresponding to the fourth node 210 (in this case the constant “x86”), and the value of the variable “z” further depends on the value of the variable initialized at the line of the source code corresponding to the fifth node 212 (in this case the variable “y”), because the fifth node 212 is also indented with respect to the first node 204.
The indented arrangement of the nodes in the tree data structure 202 aids the user's comprehension of how the lines of source code lead to an error by providing visual indicators of the dependent relationships between and among the nodes, and in turn between and among the variables and constants initialized and defined at the lines of the source code that correspond to each node. Thus, even though the error in Code Snippet A occurs at Class1.java: line 6, the user very quickly comprehends, from the arrangement of the tree data structure 202, that the value of the variable asserted at Class1.java: line 6 (corresponding to the sixth node 214) relates back to Class1.java: line 5 (corresponding to the first node 204), which relates back to Class1.java: lines 3 and 4 (corresponding to the second and fifth nodes 206, 212), and Class1.java: line 3 relates back to Class1.java: line 2 (corresponding to the third node 208), which relates back to Class2.java: line 8 (corresponding to the fourth node 210).
As illustrated in
The tree data structure 202 illustrates nested dependencies with varying amounts or degrees of indentation for nodes, where nodes at a same level of dependency have the same amount or degree of indentation. For example, the first node 204 has no indentation, and may be labeled as a Level 0 node, indicating that no other variables depend on the variable initialized at the location (e.g., line) in the source code corresponding to the first node 204. The second node 206 is indented by a first amount, and may be labeled as a Level 1 node, indicating that one other variable depends on the variable initialized at the location (e.g., line) in the source code corresponding to the second node 206. The third node 208 is indented by a second amount, which is greater than the first amount, and may be labeled as a Level 2 node, indicating that two other variables depend on the variable initialized at the location (e.g., line) in the source code corresponding to the third node 208. The fourth node 210 is indented by a third amount, which is greater than the second amount, and may be labeled as a Level 3 node, indicating that three other variables depend on the variable initialized at the location (e.g., line) in the source code corresponding to the fourth node 210. Like the second node 206, the fifth node 212 is indented by the first amount, and may also be labeled as a Level 1 node, because only one other variable depends on the variable initialized at the location (e.g., line) in the source code corresponding to the fifth node 212. And, like the first node 204, the sixth node 214 has no indentation, and may be labeled as a Level 0 node.
In some embodiments, at least some of the trace elements output from the computer program analysis tool 108 include annotations, and the annotations are represented in the tree data structure 202 adjacent their respective nodes. The annotations provide contextual information that helps the user understand the action(s) performed at the locations in the computer code 114 corresponding to the annotated nodes. In some instances, the annotations may further provide contextual information about usage of data types from other parts of the computer code 114 and operations performed on data types. For example, as illustrated in
In the embodiment of
In some embodiments, the tree data structure 202 comprises color coding that distinguishes nodes at different levels of the tree data structure 202. For example, the first and sixth nodes 204, 214, which are both Level 0 nodes, may be presented using a first color, while the second and fifth nodes 206, 212, which are both Level 1 nodes, may be presented using a second color different from the first color. Similarly, the third node 208, which is a Level 2 node, may be presented using a third color different from both the first and second colors, and the fourth node 210, which is a Level 3 node, may be presented using a fourth color different from all of the first, second, and third colors. The colors in the tree data structure 202 may be in the form of colored text, or colored highlighting overlying text, or colored bullet points setting off the nodes, or in any other representation that uses different colors to indicate dependent relationships between and among nodes, while nodes at the same level may be represented with the same color.
With reference to
In various embodiments, the rules/policies 122 may be expressed in different ways. For example, one or more rules may capture different incorrect program properties that the computer program analysis tool 108 should flag. One way to express a rule is in the form of a finite state machine, where state transitions capture a sequence of operations in the computer program that could lead to an error state. For example, a state machine may have an initial state, a set of erroneous states, and other intermediate states. The state machine further has a set of transitions, where each transition is defined by a “from” state, a “to” state, and a predicate that, when true, causes the transition. The predicates capture various properties of the computer program, such as a call to a certain API, a call to the API with constant parameters from a set of literals, etc. Another way to express a rule is a set of pre-conditions and a set of post-conditions, both expressed in the form of predicates. The post-conditions, when violated, lead to a potential violation.
With reference to
The operations 300 include, at block 302, receiving, at a code analysis service 102 executed by one or more processors of a cloud provider network 100, input representative of a request to analyze computer code associated with a software application for at least one of errors or policy violations. The request may, for example, be received from a user device via one or more intermediate networks 106. The computer code to be analyzed may also be received from the user device, and may be received together with the request, or may be received before or after the request.
The operations 300 further include, at block 304, generating, by the code analysis service 102 (e.g., by a computer program analysis tool 108), output representative of a trace log 116 identifying a path within the computer code that results in an error or policy violation. The trace log 116 includes a set of trace elements each corresponding to a line of the computer code. The process for identifying the path within the computer code that results in the error or policy violation may include tracing multiple paths within the computer code, such as all possible paths within the computer code. The process for identifying the path within the computer code that results in the error or policy violation may further include identifying, by the code analysis service 102 (e.g., by a computer program analysis tool 108), a first location (e.g., a first line) in the computer code at which a first variable is initialized based at least in part on a second variable, and a second location (e.g., as second line) in the computer code at which the second variable is initialized. The error in the computer code may comprise, for example, an invalid assertion for a value of the first variable.
The operations 300 further include, at block 306, generating, by the code analysis service 102 (e.g., by the computer program analysis tool 108), output representative of a tree data structure 202 based at least in part on the set of trace elements. The tree data structure 202 includes a plurality of nodes, and a subset of the nodes include indentations indicating dependent relationships between and among the nodes.
The operations 300 further include, at block 308, generating, by the code analysis service 102 (e.g., by the computer program analysis tool 108), output representative of a first node 204 of the plurality of nodes corresponding to a first trace element of the set of trace elements. The first trace element corresponds to a first line of the computer code at which the first variable is initialized based at least in part on the second variable.
The operations 300 further include, at block 310, generating, by the code analysis service 102 (e.g., by the computer program analysis tool 108), output representative of a second node 206 of the plurality of nodes corresponding to a second trace element of the set of trace elements. The second trace element corresponds to a second line of the computer code at which the second variable is initialized.
Subsequent to the operations above, a form of the output of the code analysis service 102 (e.g., of the computer program analysis tool 108) may be transmitted to an electronic device 104, and the tree data structure 202 may be displayed on a display 124 of the electronic device 104. In the displayed tree data structure 202, the second node 206 may be positioned beneath the first node 204, and the second node 206 may be indented with respect to the first node 204.
Another technical problem with traces produced according to prior techniques is their inability to alert the user to recurrent instances of the same error in different versions of the same computer code. For example, a user may write computer code, have the computer code analyzed by a computer program analysis tool, review results of the computer program analysis, and then revise the computer code to correct errors that were identified by the computer program analysis tool. The user, however, may fail to correct one of the errors. When the computer program analysis tool analyzes the revised computer code, the error that was not corrected will again appear in the output that's displayed to the user, but the output does not provide any indication that this error was also present in the previous version of the code. The user thus does not appreciate that the error is a recurrent error, and not a new error.
The present embodiments solve this technical problem by comparing different versions of the same computer code 114 to identify recurrent errors, and when recurrent errors are detected the output of the computer program analysis tool 108 provides an indication that an error has recurred. For example, consider the following simple code snippet (hereinafter Code Snippet B), which is a revised version of Code Snippet A:
//Class2.java
line 12: return “x97”;
//Class1.java
line 2: String a=getA( )//returns string constant “x97”
line 5: int x=a.length( )
line 6: int y=−7
line 8: z=x+y
line 10: assert (z>=0)
Comparing Code Snippet B with Code Snippet A, both snippets reference the same variables and constants, but the values of some variables and constants differ between the two snippets, and several line numbers also differ. For example, in Class2.java of Code Snippet B, the value of the string constant has changed from “x86” to “x97,” and the string constant is initialized at line 12 of Code Snippet B, whereas in Code Snippet A the string constant is initialized at line 8. In Class1.java of Code Snippet B, the value of the variable “y” has changed from “−4” to “−7,” and the variable “y” is initialized at line 6 of Code Snippet B, whereas in Code Snippet A the variable “y” is initialized at line 4. In addition, the variable “x” is initialized at line 5 of Code Snippet B, whereas in Code Snippet A the variable “x” is initialized at line 3, the variable “z” is initialized at line 8 of Code Snippet B, whereas in Code Snippet A the variable “z” is initialized at line 5, and the variable “z” is asserted at line 10 of Code Snippet B, whereas in Code Snippet A the variable “z” is asserted at line 6. When the computer program analysis tool 108 according to the present embodiments analyzes Code Snippet B, the form of the tree data structure 202 will be the same as that produced by the analysis of Code Snippet A. The tree data structure 402 produced by the analysis of Code Snippet B is illustrated in
For example, with reference to
The nodes are connected by edges, and are arranged to indicate parent-child relationships between and among the nodes. For example, the second node 606 is positioned beneath the first node 604 and connected thereto by a first edge 605, the third node 608 is positioned beneath the second node 606 and connected thereto by a second edge 607, the fourth node 610 is positioned beneath the third node 608 and connected thereto by a third edge 609, the fifth node 612 is positioned beneath the first node 604 at the same height or level within the tree data structure 602 as the second node 606, and connected to the first node 604 by a fourth edge 611, and the sixth node 614 is positioned beside the first node 604 at the same height or level within the tree data structure 602 as the first node 604, and connected to the first node 604 by a fifth edge 613. This arrangement indicates that the value of the variable initialized at the line of the source code corresponding to the first node 604 (in this case the variable “z”) depends on the value of the variable initialized at the line of the source code corresponding to the second node 606 (in this case the variable “x”), which in turn depends on the value of the variable initialized at the line of the source code corresponding to the third node 608 (in this case the variable “a”), which in turn depends on the value of the constant defined at the line of the source code corresponding to the fourth node 610 (in this case the constant “x86”), and the value of the variable “z” further depends on the value of the variable initialized at the line of the source code corresponding to the fifth node 612 (in this case the variable “y”).
The illustrated arrangement of the nodes in the tree data structure 602 aids the user's comprehension of how the lines of source code lead to an error by providing visual indicators of the dependent relationships between and among the nodes, and in turn between and among the variables and constants initialized and defined at the lines of the source code that correspond to each node. Thus, even though the error in Code Snippet A occurs at Class1.java: line 6, the user very quickly comprehends, from the arrangement of the tree data structure 602, that the value of the variable asserted at Class1.java: line 6 (corresponding to the sixth node 614) relates back to Class1.java: line 5 (corresponding to the first node 604), which relates back to Class1.java: lines 3 and 4 (corresponding to the second and fifth nodes 606, 612), and Class1.java: line 3 relates back to Class1.java: line 2 (corresponding to the third node 608), which relates back to Class2.java: line 8 (corresponding to the fourth node 610).
The tree data structure 602 illustrates nested dependencies with a hierarchical arrangement for the nodes, where nodes that have a dependent relationship are located at different heights or levels and connected, directly or indirectly, by one or more edges. For example, the first node 604 is located at the topmost height or level, with no other nodes positioned above it, indicating that no other variables depend on the variable initialized at the location (e.g., line) in the source code corresponding to the first node 604 (a Level 0 node). The second and fifth nodes 606, 612 (Level 1 nodes) are located one level below the first node 604, and connected thereto by the first edge 605 and the fourth edge 611, respectively, indicating that the value of the variable initialized at the location in the source code corresponding to the first node 604 depends on the values of the variables initialized at the locations in the source code corresponding to the second and fifth nodes 606, 612. The third node 608 (a Level 2 node) is located one level below the second node 606, and connected thereto by the second edge 607, indicating that the value of the variable initialized at the location in the source code corresponding to the second node 606 depends on the value of the variable initialized at the location in the source code corresponding to the third node 608. The fourth node 610 (a Level 3 node) is located one level below the third node 608, and connected thereto by the third edge 609, indicating that the value of the variable initialized at the location in the source code corresponding to the third node 608 depends on the value of the variable initialized at the location in the source code corresponding to the fourth node 610.
The tree data structure 602 illustrated in
In some embodiments, the annotations shown in
The tree data structure 602 illustrated in
In some embodiments, the tree data structure 602 comprises color coding that distinguishes nodes at different levels of the tree data structure 602. For example, the first and sixth nodes 604, 614, which are both Level 0 nodes, may be presented using a first color, while the second and fifth node 606, 612, which are both Level 1 nodes, may be presented using a second color different from the first color. Similarly, the third node 608, which is a Level 2 node, may be presented using a third color different from both the first and second colors, and the fourth node 610, which is a Level 3 node, may be presented using a fourth color different from all of the first, second, and third colors.
Traces produced from a computer program analysis tool may have an erroneous sink for a bug, and the computer program analysis tool may produce different traces that have the same sink. For example, two errors in the computer code may have intermediate sequences of steps along different code paths, but trigger the bug at the same sink. Some of the present embodiments advantageously group these traces together. For example, if multiple traces have intermediate steps on the same type, and have an erroneous sink, the traces are grouped together when displayed to the user. Further, the user is presented a view for these paths in the code, where branch conditions for the code path in each trace are highlighted. In an example, two bugs along different program paths are triggered at the same location in the computer code. The computer program analysis tool 108 generates an on-demand detailed view for the grouped traces for the multiple bugs, where the branch sequence and path conditions for each are highlighted. For example, the first violation at line 25 due to branches: if (a>0) at line 10; if (b<0) at line 22. Path condition at line 25: (a>0 && b<0). Second violation at line 25 due to branches: if (a>0) at line 10; if (b>=0) at line 24. Path condition at line 25: (a>0 && b>=0). Grouping traces in this manner enables the user to better understand relationships between traces that otherwise might seem unrelated. The detailed view explains each trace clearly with path information, further aiding the user's understanding.
Conventionally, the provider network 700, via the virtualization services 710, may allow a customer of the service provider (e.g., a customer that operates one or more customer networks 750A-750C (may also be referred to as client networks) including one or more customer device(s) 752) to dynamically associate at least some public IP addresses 714 assigned or allocated to the customer with particular resource instances 712 assigned to the customer. The provider network 700 may also allow the customer to remap a public IP address 714, previously mapped to one virtualized computing resource instance 712 allocated to the customer, to another virtualized computing resource instance 712 that is also allocated to the customer. Using the virtualized computing resource instances 712 and public IP addresses 714 provided by the service provider, a customer of the service provider such as the operator of the customer network(s) 750A-750C may, for example, implement customer-specific applications and present the customer's applications on an intermediate network 740, such as the Internet. Other network entities 720 on the intermediate network 740 may then generate traffic to a destination public IP address 714 published by the customer network(s) 750A-750C; the traffic is routed to the service provider data center, and at the data center is routed, via a network substrate, to the local IP address 716 of the virtualized computing resource instance 712 currently mapped to the destination public IP address 714. Similarly, response traffic from the virtualized computing resource instance 712 may be routed via the network substrate back onto the intermediate network 740 to the source entity 720.
Local IP addresses, as used herein, refer to the internal or private network addresses, for example, of resource instances in a provider network. Local IP addresses can be within address blocks reserved by Internet Engineering Task Force (IETF) Request for Comments (RFC) 1918 and/or of an address format specified by IETF RFC 4193, and may be mutable within the provider network. Network traffic originating outside the provider network is not directly routed to local IP addresses; instead, the traffic uses public IP addresses that are mapped to the local IP addresses of the resource instances. The provider network may include networking devices or appliances that provide network address translation (NAT) or similar functionality to perform the mapping from public IP addresses to local IP addresses and vice versa.
Public IP addresses are Internet mutable network addresses that are assigned to resource instances, either by the service provider or by the customer. Traffic routed to a public IP address is translated, for example via 1:1 NAT, and forwarded to the respective local IP address of a resource instance.
Some public IP addresses may be assigned by the provider network infrastructure to particular resource instances; these public IP addresses may be referred to as standard public IP addresses, or simply standard IP addresses. In some embodiments, the mapping of a standard IP address to a local IP address of a resource instance is the default launch configuration for all resource instance types.
At least some public IP addresses may be allocated to or obtained by customers of the provider network 700; a customer may then assign their allocated public IP addresses to particular resource instances allocated to the customer. These public IP addresses may be referred to as customer public IP addresses, or simply customer IP addresses. Instead of being assigned by the provider network 700 to resource instances as in the case of standard IP addresses, customer IP addresses may be assigned to resource instances by the customers, for example via an API provided by the service provider. Unlike standard IP addresses, customer IP addresses are allocated to customer accounts and can be remapped to other resource instances by the respective customers as necessary or desired. A customer IP address is associated with a customer's account, not a particular resource instance, and the customer controls that IP address until the customer chooses to release it. Unlike conventional static IP addresses, customer IP addresses allow the customer to mask resource instance or availability zone failures by remapping the customer's public IP addresses to any resource instance associated with the customer's account. The customer IP addresses, for example, enable a customer to engineer around problems with the customer's resource instances or software by remapping customer IP addresses to replacement resource instances.
The provider network 800 may provide the customer network 850, for example coupled to an intermediate network 840 via a local network 856, the ability to implement virtual computing systems 892 via the hardware virtualization service 820 coupled to the intermediate network 840 and to the provider network 800. In some embodiments, the hardware virtualization service 820 may provide one or more APIs 802, for example a web services interface, via which the customer network 850 may access functionality provided by the hardware virtualization service 820, for example via a console 894 (e.g., a web-based application, standalone application, mobile application, etc.) of a customer device 890. In some embodiments, at the provider network 800, each virtual computing system 892 at the customer network 850 may correspond to a computation resource 824 that is leased, rented, or otherwise provided to the customer network 850.
From an instance of the virtual computing system(s) 892 and/or another customer device 890 (e.g., via console 894), the customer may access the functionality of a storage service 810, for example via the one or more APIs 802, to access data from and store data to storage resources 818A-818N of a virtual data store 816 (e.g., a folder or bucket, a virtualized volume, a database, etc.) provided by the provider network 800. In some embodiments, a virtualized data store gateway (not shown) may be provided at the customer network 850 that may locally cache at least some data, for example frequently accessed or critical data, and that may communicate with the storage service 810 via one or more communications channels to upload new or modified data from a local cache so that the primary store of data (the virtualized data store 816) is maintained. In some embodiments, a user, via the virtual computing system 892 and/or another customer device 890, may mount and access virtual data store 816 volumes via the storage service 810 acting as a storage virtualization service, and these volumes may appear to the user as local (virtualized) storage 898.
While not shown in
Illustrative Systems
In some embodiments, a system that implements a portion or all of the techniques described herein may include a general-purpose computer system, such as the computer system 900 illustrated in
In various embodiments, the computer system 900 may be a uniprocessor system including one processor 910, or a multiprocessor system including several processors 910 (e.g., two, four, eight, or another suitable number). The processor(s) 910 may be any suitable processor(s) capable of executing instructions. For example, in various embodiments, the processor(s) 910 may be general-purpose or embedded processors implementing any of a variety of instruction set architectures (ISAs), such as the x86, ARM, PowerPC, SPARC, or MIPS ISAs, or any other suitable ISA. In multiprocessor systems, each of the processors 910 may commonly, but not necessarily, implement the same ISA.
System memory 920 may store instructions and data accessible by the processor(s) 910. In various embodiments, the system memory 920 may be implemented using any suitable memory technology, such as random-access memory (RAM), static RAM (SRAM), synchronous dynamic RAM (SDRAM), nonvolatile/Flash-type memory, or any other type of memory. In the illustrated embodiment, program instructions and data implementing one or more desired functions, such as those methods, techniques, and data described above, are shown stored within the system memory 920 as code analysis service code 925 (e.g., executable to implement, in whole or in part, the code analysis service 102) and data 926.
In one embodiment, the I/O interface 930 may be configured to coordinate I/O traffic between the processor 910, the system memory 920, and any peripheral devices in the device, including the network interface 940 and/or other peripheral interfaces (not shown). In some embodiments, the I/O interface 930 may perform any necessary protocol, timing, or other data transformations to convert data signals from one component (e.g., the system memory 920) into a format suitable for use by another component (e.g., the processor 910). In some embodiments, the I/O interface 930 may include support for devices attached through various types of peripheral buses, such as a variant of the Peripheral Component Interconnect (PCI) bus standard or the Universal Serial Bus (USB) standard, for example. In some embodiments, the function of the I/O interface 930 may be split into two or more separate components, such as a north bridge and a south bridge, for example. Also, in some embodiments, some or all of the functionality of the I/O interface 930, such as an interface to the system memory 920, may be incorporated directly into the processor 910.
The network interface 940 may be configured to allow data to be exchanged between the computer system 900 and other devices 960 attached to a network or networks 950, such as other computer systems or devices as illustrated in
In some embodiments, the computer system 900 includes one or more offload cards 970A or 970B (including one or more processors 975, and possibly including the one or more network interfaces 940) that are connected using the I/O interface 930 (e.g., a bus implementing a version of the Peripheral Component Interconnect-Express (PCI-E) standard, or another interconnect such as a QuickPath interconnect (QPI) or UltraPath interconnect (UPI)). For example, in some embodiments the computer system 900 may act as a host electronic device (e.g., operating as part of a hardware virtualization service) that hosts compute resources such as compute instances, and the one or more offload cards 970A or 970B execute a virtualization manager that can manage compute instances that execute on the host electronic device. As an example, in some embodiments the offload card(s) 970A or 970B can perform compute instance management operations, such as pausing and/or un-pausing compute instances, launching and/or terminating compute instances, performing memory transfer/copying operations, etc. These management operations may, in some embodiments, be performed by the offload card(s) 970A or 970B in coordination with a hypervisor (e.g., upon a request from a hypervisor) that is executed by the other processors 910A-910N of the computer system 900. However, in some embodiments the virtualization manager implemented by the offload card(s) 970A or 970B can accommodate requests from other entities (e.g., from compute instances themselves), and may not coordinate with (or service) any separate hypervisor.
In some embodiments, the system memory 920 may be one embodiment of a computer-accessible medium configured to store program instructions and data as described above. However, in other embodiments, program instructions and/or data may be received, sent, or stored upon different types of computer-accessible media. Generally speaking, a computer-accessible medium may include any non-transitory storage media or memory media such as magnetic or optical media, e.g., disk or DVD/CD coupled to the computer system 900 via the I/O interface 930. A non-transitory computer-accessible storage medium may also include any volatile or non-volatile media such as RAM (e.g., SDRAM, double data rate (DDR) SDRAM, SRAM, etc.), read only memory (ROM), etc., that may be included in some embodiments of the computer system 900 as the system memory 920 or another type of memory. Further, a computer-accessible medium may include transmission media or signals such as electrical, electromagnetic, or digital signals, conveyed via a communication medium such as a network and/or a wireless link, such as may be implemented via the network interface 940.
A computing device 1000 can include some type of display element 1006, such as a touch screen or liquid crystal display (LCD), although many devices such as portable media players might convey information via other means, such as through audio speakers, and other types of devices such as server end stations may not have a display element 1006 at all. As discussed, some computing devices used in some embodiments include at least one input and/or output component(s) 1012 able to receive input from a user. This input component can include, for example, a push button, touch pad, touch screen, wheel, joystick, keyboard, mouse, keypad, or any other such device or element whereby a user is able to input a command to the device. In some embodiments, however, such a device might be controlled through a combination of visual and/or audio commands and use a microphone, camera, sensor, etc., such that a user can control the device without having to be in physical contact with the device.
Various embodiments discussed or suggested herein can be implemented in a wide variety of operating environments, which in some cases can include one or more user computers, computing devices, or processing devices which can be used to operate any of a number of applications. User or client devices can include any of a number of general-purpose personal computers, such as desktop or laptop computers running a standard operating system, as well as cellular, wireless, and handheld devices running mobile software and capable of supporting a number of networking and messaging protocols. Such a system also can include a number of workstations running any of a variety of commercially available operating systems and other known applications for purposes such as development and database management. These devices also can include other electronic devices, such as dummy terminals, thin-clients, gaming systems, and/or other devices capable of communicating via a network.
Most embodiments use at least one network that would be familiar to those skilled in the art for supporting communications using any of a variety of widely-available protocols, such as Transmission Control Protocol/Internet Protocol (TCP/IP), File Transfer Protocol (FTP), Universal Plug and Play (UPnP), Network File System (NFS), Common Internet File System (CIFS), Extensible Messaging and Presence Protocol (XMPP), AppleTalk, etc. The network(s) can include, for example, a local area network (LAN), a wide-area network (WAN), a virtual private network (VPN), the Internet, an intranet, an extranet, a public switched telephone network (PSTN), an infrared network, a wireless network, and any combination thereof.
In embodiments using a web server, the web server can run any of a variety of server or mid-tier applications, including HTTP servers, File Transfer Protocol (FTP) servers, Common Gateway Interface (CGI) servers, data servers, Java servers, business application servers, etc. The server(s) also may be capable of executing programs or scripts in response requests from user devices, such as by executing one or more Web applications that may be implemented as one or more scripts or programs written in any programming language, such as Java®, C, C# or C++, or any scripting language, such as Perl, Python, PHP, or TCL, as well as combinations thereof. The server(s) may also include database servers, including without limitation those commercially available from Oracle®, Microsoft®, Sybase®, IBM®, etc. The database servers may be relational or non-relational (e.g., NoSQL), distributed or non-distributed, etc.
Environments disclosed herein can include a variety of data stores and other memory and storage media as discussed above. These can reside in a variety of locations, such as on a storage medium local to (and/or resident in) one or more of the computers or remote from any or all of the computers across the network. In a particular set of embodiments, the information may reside in a storage-area network (SAN) familiar to those skilled in the art. Similarly, any necessary files for performing the functions attributed to the computers, servers, or other network devices may be stored locally and/or remotely, as appropriate. Where a system includes computerized devices, each such device can include hardware elements that may be electrically coupled via a bus, the elements including, for example, at least one central processing unit (CPU), at least one input device (e.g., a mouse, keyboard, controller, touch screen, or keypad), and/or at least one output device (e.g., a display device, printer, or speaker). Such a system may also include one or more storage devices, such as disk drives, optical storage devices, and solid-state storage devices such as random-access memory (RAM) or read-only memory (ROM), as well as removable media devices, memory cards, flash cards, etc.
Such devices also can include a computer-readable storage media reader, a communications device (e.g., a modem, a network card (wireless or wired), an infrared communication device, etc.), and working memory as described above. The computer-readable storage media reader can be connected with, or configured to receive, a computer-readable storage medium, representing remote, local, fixed, and/or removable storage devices as well as storage media for temporarily and/or more permanently containing, storing, transmitting, and retrieving computer-readable information. The system and various devices also typically will include a number of software applications, modules, services, or other elements located within at least one working memory device, including an operating system and application programs, such as a client application or web browser. It should be appreciated that alternate embodiments may have numerous variations from that described above. For example, customized hardware might also be used and/or particular elements might be implemented in hardware, software (including portable software, such as applets), or both. Further, connection to other computing devices such as network input/output devices may be employed.
Storage media and computer readable media for containing code, or portions of code, can include any appropriate media known or used in the art, including storage media and communication media, such as but not limited to volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage and/or transmission of information such as computer readable instructions, data structures, program modules, or other data, including RAM, ROM, Electrically Erasable Programmable Read-Only Memory (EEPROM), flash memory or other memory technology, Compact Disc-Read Only Memory (CD-ROM), Digital Versatile Disk (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a system device. Based on the disclosure and teachings provided herein, a person of ordinary skill in the art will appreciate other ways and/or methods to implement the various embodiments.
In the preceding description, various embodiments are described. For purposes of explanation, specific configurations and details are set forth in order to provide a thorough understanding of the embodiments. However, it will also be apparent to one skilled in the art that the embodiments may be practiced without the specific details. Furthermore, well-known features may be omitted or simplified in order not to obscure the embodiment being described.
Bracketed text and blocks with dashed borders (e.g., large dashes, small dashes, dot-dash, and dots) are used herein to illustrate optional operations that add additional features to some embodiments. However, such notation should not be taken to mean that these are the only options or optional operations, and/or that blocks with solid borders are not optional in certain embodiments.
Reference numerals with suffix letters (e.g., 818A-818N) may be used to indicate that there can be one or multiple instances of the referenced entity in various embodiments, and when there are multiple instances, each does not need to be identical but may instead share some general traits or act in common ways. Further, the particular suffixes used are not meant to imply that a particular amount of the entity exists unless specifically indicated to the contrary. Thus, two entities using the same or different suffix letters may or may not have the same number of instances in various embodiments.
References to “one embodiment,” “an embodiment,” “an example embodiment,” etc., indicate that the embodiment described may include a particular feature, structure, or characteristic, but every embodiment may not necessarily include the particular feature, structure, or characteristic. Moreover, such phrases are not necessarily referring to the same embodiment. Further, when a particular feature, structure, or characteristic is described in connection with an embodiment, it is submitted that it is within the knowledge of one skilled in the art to affect such feature, structure, or characteristic in connection with other embodiments whether or not explicitly described.
Moreover, in the various embodiments described above, unless specifically noted otherwise, disjunctive language such as the phrase “at least one of A, B, or C” is intended to be understood to mean either A, B, or C, or any combination thereof (e.g., A, B, and/or C). Similarly, language such as “at least one or more of A, B, and C” (or “one or more of A, B, and C”) is intended to be understood to mean A, B, or C, or any combination thereof (e.g., A, B, and/or C). As such, disjunctive language is not intended to, nor should it be understood to, imply that a given embodiment requires at least one of A, at least one of B, and at least one of C to each be present.
Unless otherwise explicitly stated, articles such as “a” or “an” should generally be interpreted to include one or multiple described items. Accordingly, phrases such as “a device configured to” or “a computing device” are intended to include one or multiple recited devices. Such one or more recited devices can be collectively configured to carry out the stated operations. For example, “a processor configured to carry out operations A, B, and C” can include a first processor configured to carry out operation A working in conjunction with a second processor configured to carry out operations B and C.
The specification and drawings are, accordingly, to be regarded in an illustrative rather than a restrictive sense. It will, however, be evident that various modifications and changes may be made thereunto without departing from the broader spirit and scope of the disclosure as set forth in the claims.
Number | Name | Date | Kind |
---|---|---|---|
7975262 | Cozmei | Jul 2011 | B2 |
9529694 | Srivastava | Dec 2016 | B2 |
10379849 | Jasinski | Aug 2019 | B1 |
11036866 | Iyer | Jun 2021 | B2 |
11089000 | Muthusamy | Aug 2021 | B1 |
11269876 | Basavaiah | Mar 2022 | B1 |
20160330219 | Hasan | Nov 2016 | A1 |
Entry |
---|
Javasoft, “Static Code Analysis”, 2018, retrieved from https://docs.parasoft.com/display/CPPDESKV1040/, 26 pages. (Year: 2018). |
IBM, “IBM Tivoli Storage Productivity Center Version 5.1.1—Problem Determination Guide”, 2012, IBM Incorporation, 115 pages. (Year: 2012). |
Farnhill, B, “Tightening application security with Amazon CodeGuru,” AWS DevOps Blog, Dec. 1, 2020, retrieved at https://aws.amazon.com/blogs/devops/tightening-application-security-with-amazon-codeguru/, 8 pages. |