Robust software library wrapper method and apparatus
Abstract
A method includes a step of executing a software function using a set of test arguments and obtaining a result corresponding to each of the set of test arguments, each result indicating one of a set of robust and non-robust results, a subset of test arguments corresponding to robust results. The method further includes defining a set of arguments based on the results and the set of test arguments, the set of arguments including the subset of test arguments. Thereafter, arguments of subsequent calls to the software function may thereafter be examined to determine whether they fall within the set of arguments.
Claims
exact text as granted — not AI-modified1 . A method, comprising:
a) executing a software function using a set of test arguments and obtaining a result corresponding to each of the set of test arguments, each result indicating one of a set of non-robust and robust results, a subset of test arguments corresponding to robust results; and b) defining a set of arguments based on the results and the set of test arguments, the set of arguments including the subset of test arguments.
2 . The method of claim 1 , wherein no result indicates a non-robust result.
3 . The method of claim 1 , wherein at least one result indicates a non-robust result, the at least one result corresponding to a first invalid argument, and wherein the set of arguments does not include the first invalid argument.
4 . The method of claim 1 , wherein step a) further comprises:
a1) executing the software function using a plurality of types of test arguments and obtaining a result corresponding to each of the test arguments, each result indicating one of a set of robust and non-robust results; a2) determining at least one subset of valid test arguments, each corresponding to one of the plurality of types of test arguments, the at least one subset of valid test arguments constituting the subset of test arguments corresponding to robust results.
5 . The method of claim 4 , wherein step b) further comprises combining a plurality of subsets of valid test arguments to form the set of arguments.
6 . The method of claim 1 , further comprising:
d) determining if an argument associated with a subsequent call to execute the software function is in the set of arguments.
7 . The method of claim 6 , further comprising:
e) returning an error value if the argument is not one the set of arguments.
8 . The method of claim 7 , further comprising:
e) allowing execution of the software function using the argument if the argument is one of the set of arguments.
9 . The method of claim 1 , further comprising:
c) automatically generating a wrapper function that is executable upon a subsequent call to the software function, the wrapper function operable to determine if an argument within the subsequent call to the software function is in the set of arguments.
10 . The method of claim 9 , wherein the wrapper function is further operable to perform a call to the software function if the argument within the subsequent call is in the set of arguments.
11 . The method of claim 9 , wherein the first wrapper function is further operable to prevent execution of the software function responsive to the subsequent call if the argument within the subsequent call is not in the set of arguments.
12 . A method of performing a library function call in an execution of a software program, the method comprising:
receiving a function call to a library function using at least one argument; and determining if the at least one argument is a robust argument type, a set of robust argument types previously determined by automatically injecting test arguments into the library function to determine a set of argument types that do not cause robustness errors when used as an argument passed to the library function.
13 . The method of claim 12 , further comprising:
performing the function call if the at least one argument is a robust argument type; and returning an error notification if the first argument is not a robust argument type.
14 . The method of claim 12 , wherein receiving the function call further comprises receiving the function call to a first C-library function.
15 . A computer program product that controls a processor to perform a method, the computer program product comprising:
code for executing a software function using a set of test arguments and obtaining a result corresponding to each of the set of test arguments, each result indicating one of a set of robust and non-robust results, a subset of test arguments corresponding to robust results; and code for defining a set of arguments based on the results and the set of test arguments, the set of arguments including the subset of test arguments.
16 . The computer program product of claim 15 , wherein the code for executing the software function using the set of test arguments further comprises:
code for causing execution of the software function using a plurality of types of test arguments and obtaining a result corresponding to each of the test arguments, each result indicating one of a set of robust and non-robust results; and code for determining at least one subset of valid test arguments, each corresponding to one of the plurality of types of test arguments, the at least one subset of valid test arguments constituting the first subset of test arguments corresponding to robust results.
17 . The computer program product of claim 16 , wherein the code for defining the set of arguments further comprises code for combining a plurality of subsets of valid test arguments to form the set of arguments.
18 . The computer program product of claim 15 , further comprising:
code for determining if an argument associated with a subsequent call to execute the software function is one of the set of arguments.
19 . The computer program product of claim 18 , further comprising:
code for returning an error value if the argument is not one of the set of arguments.
20 . The computer program product of claim 18 , further comprising:
code for causing execution of the software function using the argument if the argument is one of the set of arguments.
21 . The computer program product of claim 15 , further comprising:
code for automatically generating a wrapper function that is executable upon a subsequent call to the software function, the wrapper function operable to determine if one or more arguments within the subsequent call to the software function are in the set of arguments.
22 . The computer program product of claim 21 , wherein the wrapper function is further operable to perform a call to the software function if the one or more arguments within the subsequent call are in the set of arguments.
23 . The computer program product of claim 21 , wherein the first wrapper function is further operable to prevent execution of the software function responsive to the subsequent call if the one or more arguments within the subsequent call are not in the set of arguments.
24 . A method for increasing the robustness of software libraries, comprising:
a) automatically extracting the prototype of at least one library function; b) constructing a fault-injection operation for the at least one library function based on the extracted prototype; c) conducting the fault-injection operation to determine robustness errors for the at least one library function; and d) computing the robust argument types for the at least one library function, wherein execution of the at least one library function with an argument that is one of said robust argument types reduces the likelihood of robustness errors.
25 . The method of claim 24 , further comprising extracting the prototype of the at least one library function a header file for the at least one library function.
26 . The method of claim 24 , further comprising using the generated robust argument types to check the function call from an executing program to the at least one library function.Join the waitlist — get patent alerts
Track US2007204261A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.