摘要:
This document describes techniques for contextually intelligent code editing. In at least some embodiments, the techniques are network-based and can use client-server interactions to develop programming code. For example, input to a local programming environment of a client can be transmitted to a server. A functionality at the server can inspect the input and determine programming options (e.g., programming terms and/or phrases) that are contextually valid in the local programming environment. A list of the programming options can then be transmitted to the client and presented via a user interface. In some embodiments, a selection of one of the programming options can cause the programming option to be populated to the local programming environment, e.g., as part of a user interface associated with the local programming environment. In at least some embodiments, the list of programming options can be cached locally on the client for quick retrieval.
摘要:
A computerized method receives an implementation comprising a modifier method and an observer method of a class implementing an abstract data type. The method symbolically executes the modifier method to obtain constrained states, and applies the observer method in constrained states to obtain specialized axioms. The method then creates a specification from the obtained specialized axioms based on generalizing, merging and simplifying the specialized axioms.
摘要:
Described herein are methods and systems for interactively configuring and producing a data domain for various data structure elements of a computer program. A domain configuration manager is described which interactively receives domain configuration information corresponding to a data structure element, reads a reflection of the program and produces a data domain according to domain configuration information. The domain configuration manager is capable of producing a data domain for a data structure element according to such domain configuration information such as an explicit expression, inheritance or domain generation technique. The reflection of the computer program exposes the methods and functions of the program to be used in the explicit expression regardless of the visibility rules. Also, predicates and conditions can be used with domain generation techniques to further narrowly configure the data domains.
摘要:
In one embodiment a computer system automatically generates unit tests. The computer system accesses a parameterized unit test that provides a base outline from which one or more unit tests are automatically generated, generates input parameter values for a unit of software code, automatically generates a unit test configured to assess the functionality of the unit of software code, and receives test results from a software testing program and provides feedback to a user. In other embodiments, a computer system automatically maintains a unit test database. The computer system receives a unit test at a unit test database, assigns a test identity to the received unit test, determines that the test identity assigned to the received unit test is unique when compared to other unit tests, determines that the received unit test has different functionality coverage characteristics, and adds the received unit test to the unit test database.
摘要:
In one embodiment, a computer system determines that a previously run test scenario configured to test a software program has failed to produce an expected result due to one or more semantic errors, generates error trace code configured to monitor the called component, processes the test scenario using the error trace code, and analyzes error trace information to determine the point at which the semantic error occurs in the called component. In an alternative embodiment, a computer system detects a semantic error in a software component of a software program, constructs an error condition that may include source code representing a minimum condition under which the error occurs, generates an object invariant based on the error condition that represents an opposite condition to that represented by the error condition, and automatically generates source code change recommendations using the object invariant that prevent the semantic error from reoccurring in subsequent test scenarios.
摘要:
A test domain configuration module generates graphical user interfaces for identifying information about desired tests such as data types and domain configurations, and collects information used by other modules to generate tests. The identified information may include, for example, an abstract syntax, a static semantic, max counts on instances of data types, or costs of field accesses or data types for max path costs or max expression costs. A test input generator, generates test input for the identified and configured data types. In one case, the generated test inputs are generated as tree data structures. A predicate determines whether a generated test input follows semantic conditions. A test input evaluator counts instances of data types in, sums paths through, or sums total costs of, the generated test inputs. A test acceptance module saves test inputs acceptable to the predicate and the test input evaluator.
摘要:
The technology contributes the inference of formal specifications automatically, which can increase the acceptance of specifications. The technology introduces the symbolic execution of a modifier method to explore its behavior and then summarizing the results of the exploration using observer methods. This often results in concise, understandable specifications, which are a prerequisite for human analysis. Optionally, a generated specification is deemed sound and or complete. The specifications are presented as traditional pre-/post-condition specifications or parameterized unit tests. The former often serve as inputs to a program verification system, whereas the latter often provide inputs for tools that generate test cases.
摘要:
Symbolic execution identifies possible execution paths of a computer program or method, each having certain constraints over the input values. The symbolic execution also records updates of memory locations, e.g. updates of the fields of symbolic objects in the heap of an object oriented program, involving a description of the previous heap, the updated symbolic object, a field identification, and a newly assigned symbolic value. The symbolic execution can also record calls to summarized methods, involving a description of previous calls, an identification of the summarized methods, and its symbolic arguments. The behavior of summarized methods can be expressed by axioms. Axioms describe the relationship between summarized methods under certain conditions. Axioms can be generated from parameterized unit tests. A parameterized unit test is a method with parameters which executes a sequence of calls to methods of an implementation under test; it asserts constraints over the inputs and outputs of the calls. A software testing program receives a parameterized unit test of an implementation under test, and symbolically executes the parameterized unit test. It can re-use axioms generated from other parameterized unit tests, and use them to emulate summarized methods.
摘要:
A computer system provides a test program and one or more unit tests, such as a traditional unit test and or a parameterized unit test. The system also includes a constraint solver, a theorem prover, an implementation under test, a symbolic executor, a generalizor, and generated test cases. The generalizor receives a traditional unit tests as input, and modifies the traditional unit test into a parameterized unit test. The modification includes replacing plural concrete values in the traditional unit test with symbols, and exporting the symbols into a signature of the parameterized unit test. A symbolic executor identifies constraints while symbolically executing the created parameterized unit test of the implementation under test. A constraint solver and or theorem prover generates a set of test cases by solving for values that satisfy the series of constraints. The test program executes the automatically generated test cases.
摘要:
Constraints are defined in view of a program implementation. Constraints check program state or variables to maintain data consistency. A constraint component determines a constraint's scope and variables upon which a constraint depends. Program flow is altered so constraints are checked whenever a variable upon which a constraint depends is updated. Optionally, program flow is altered dynamically to re-establish constraints whenever a variable upon which a constraint depends is updated. Re-establishing constraints provides efficiency, since a program flow is altered for a minimum cost based on a present evolving minimum set of active constraint-variable relationships.