Functions for Operations on Database Objects¶
Operations to begin analyses with
-
class
VyPRAnalysis.orm.operations.
ObservationCollection
(observations) A collection of observation objects. Defines methods for transformation to a
PathCollection
object.-
to_paths
(scfg) Based on the relevant Symbolic Control-Flow Graph for the current collection of observations, reconstruct the paths up to each observation through the Symbolic Control-Flow Graph and return a
PathCollection
.
-
-
class
VyPRAnalysis.orm.operations.
ParametricPath
(parametric_parse_tree) Models a program path with a hole that can be filled by taking one of multiple possible paths.
-
get_parameter_value
(parameter) Get the subpath taken by the current path at
parameter
.
-
-
class
VyPRAnalysis.orm.operations.
ParametricPathCollection
(paths, original_paths, path_parameters, scfg, function_name) Models a collection of paths, all of which diverge at the same point in the source code and start at the beginning of the monitored function.
-
class
VyPRAnalysis.orm.operations.
PartialParametricPathCollection
(paths, original_paths, path_parameters, scfg, function_name) Models a collection of paths which all diverge at the same point in the source code, and do not start at the beginning of the monitored function.
-
get_path_parameters
() Get the list of path parameters, which are objects that can be used internally to determine which subpath was taken by a given program path at a specific point in the program.
-
get_subpaths_from_parameter
(path_parameter) Given a
PathParameter
object inpath_parameter
, get the subpath given to it by this parametric path.
-
intersection
() Perform intersection, but such that the parse trees used are generated starting from the beginning of each path (we assume the paths start in the same place).
-
-
class
VyPRAnalysis.orm.operations.
PartialPathCollection
(paths, scfg, function_name, parametric=False) Models a collection of paths which do not start from the starting vertex of the Symbolic Control-Flow Graph.
-
intersection
() Perform intersection, but such that the parse trees used are generated starting from the beginning of each path (we assume the paths start in the same place).
-
-
class
VyPRAnalysis.orm.operations.
Path
(edge_list) Models a program path, which internally is a list of edges in a Symbolic Control-Flow Graph.
-
class
VyPRAnalysis.orm.operations.
PathCollection
(paths, scfg, function_name, parametric=False) Models a set of paths, obtained by direct reconstruction or modification of already reconstructed paths.
-
critical_points_in_code
() Based on the intersection of the paths held by the current collection, determine the points of divergence in the relevant source code.
-
intersection
(starting_vertex=None) Return a
ParametricPathCollection
instance containing the single path resulting from the intersection of all paths in the current collection.
-
merge
(other_path_collection) Add
other_path_collection
to the current list of paths.
-
show_critical_points_in_file
(filename=None, verbose=False) Write out a version of a monitored file with markers to show instructions where paths diverged that lead to observations that VyPR recorded diverged.
-
-
class
VyPRAnalysis.orm.operations.
PathParameter
(path, function_name) Internal wrapper class for path parameters, so users don’t have to deal with the lists of parse tree edges that are actually used in the implementation of path parameters.
-
VyPRAnalysis.orm.operations.
get_paths_from_observations
(function_name, obs_id_list, inst_point=None) returns a list of paths taken before each of the given observations
-
VyPRAnalysis.orm.operations.
list_functions
() Get a list of all existing functions from the server.
-
VyPRAnalysis.orm.operations.
list_test_data
() Get a list of all existing test cases from the server.