1460892532-195f5b2e-e1ee-4c82-b230-3362c48814dd

1. An automated method of detection of software vulnerabilities by applying a rule set to test for vulnerabilities in computer software, the rule set comprising at least one vulnerability characterisation rule, the method incorporating the steps of:
a) providing a training data set of computer software incorporating positive and negative vulnerability examples and expressed as programs flagged to indicate either presence or absence of vulnerability, the programs comprising instructions each incorporating an identifier to indicate its associated program, the instruction’s address, an instruction operator and a list of instruction operands,
b) defining a rule generalisation, the rule generalisation being processable to transform it into the at least one vulnerability characterisation rule, and
c) using computer apparatus to execute the steps of:
i) receiving the training data set and the rule generalisation,
ii) processing the rule generalisation to transform it into a more specific rule generalisation by employing logic of at least First-Order and adding to the rule generalisation at least one of a condition, a variable, a constant, a unification of variables and a function based on the training data set and background knowledge relating to attributes of the training data set and consisting of at least one of concepts, facts of interest and functions for calculating values of interest from items of data,
iii) evaluating the more specific rule generalisation by applying it to the training data set to identify vulnerabilities, and
iv) incorporating the more specific rule generalisation in the rule set if it classifies vulnerabilities in the training data set adequately in terms of covering at least some of the positive vulnerability examples,
v) applying the rule set to a test program for vulnerability detection therein, and
vi) providing an alert or a report to a user regarding vulnerability detection in the test program resulting from operation of the method in order to enable corrective action to be taken.
2. An automated method of detection of software vulnerabilities according to claim 1 wherein the background knowledge includes at least one of the following tests:
a) a copying loop test,
b) a length loop test,
c) a test for one block following another,
d) a test for making a call to a string length function at a specified index,
e) a test for tests that precede conditional jumps in an instruction list,
f) a test for whether or not a given list is empty,
g) a test for whether or not a given list has a single jump test (conditional), and if it is, to return a tested register, and
h) a test for whether or not a given list modifies a given register.
3. An automated method of detection of software vulnerabilities according to claim 1 wherein the rule set incorporates a rule which classifies a program as vulnerable if there is a copying loop preceded by a call to a string length function, with no conditional jumps therebetween.
4. An automated method of detection of software vulnerabilities according to claim 1 wherein the rule set incorporates a rule which classifies a program as vulnerable if there is a copying loop defined as a portion of code that copies to a register from a source pointer, changes the source pointer, copies from the register into a destination pointer, changes that destination pointer, and has a control flow path from the code portion’s end back to the code portion’s beginning thus forming a loop.
5. An automated method of detection of software vulnerabilities according to claim 1 wherein the rule set incorporates a rule which classifies a program as vulnerable if there is a copying loop with a test for zero, and one other test, but a register referenced by the other test is not used during the loop.
6. A system for computer-implemented detection software vulnerabilities by applying a rule set to test for vulnerabilities in computer software, the rule set comprising at least one vulnerability characterisation rule, the system incorporating computer apparatus incorporating a computer program stored in a hardware recording medium and being programmed by such computer program to carry out the steps of:
a) receiving a training data set of computer software incorporating positive and negative vulnerability examples and expressed as programs flagged to indicate either presence or absence of vulnerability, the programs comprising instructions each incorporating an identifier to indicate its associated program, the instruction’s address, an instruction operator and a list of instruction operands,
b) receiving a rule generalisation which is processable to transform it into the at least one vulnerability characterisation rule, and
c) processing the rule generalisation to transform it into a more specific rule generalisation by employing logic of at least First-Order and adding to the rule generalisation at least one of a condition, a variable, a constant, a unification of variables and a function based on the training data set and background knowledge relating to attributes of the training data set and consisting of at least one of concepts, facts of interest and functions for calculating values of interest from items of data,
d) evaluating the more specific rule generalisation by applying it to the training data set to identify vulnerabilities, and
e) incorporating the more specific rule generalisation in the rule set if it classifies vulnerabilities in the training data set adequately in terms of covering at least some of the positive vulnerability examples,
f) applying the rule set to a test program for vulnerability detection therein, and
g) providing an alert or a report to a user regarding vulnerability detection in the test program resulting from operation of the method in order to enable corrective action to be taken.
7. A system for detection of software vulnerabilities according to claim 6 wherein the background knowledge includes at least one of the following tests:
a) a copying loop test,
b) a length loop test,
c) a test for one block following another,
d) a test for making a call to a string length function at a specified index,
e) a test for tests that precede conditional jumps in an instruction list,
f) a test for whether or not a given list is empty,
g) a test for whether or not a given list has a single jump test (conditional), and if it is, to return a tested register, and
h) a test for whether or not a given list modifies a given register.
8. A system for detection of software vulnerabilities according to claim 6 wherein the rule set incorporates a rule which classifies a program as vulnerable if there is a copying loop preceded by a call to a string length function, with no conditional jumps therebetween.
9. A system for detection of software vulnerabilities according to claim 6 wherein the rule set incorporates a rule which classifies a program as vulnerable if there is a copying loop defined as a portion of code that copies to a register from a source pointer, changes the source pointer, copies from the register into a destination pointer, changes that destination pointer, and has a control flow path from the code portion’s end back to the code portion’s beginning thus forming a loop.
10. A system for detection of software vulnerabilities according to claim 6 wherein the rule set incorporates a rule which classifies a program as vulnerable if there is a copying loop with a test for zero, and one other test, but a register referenced by the other test is not used during the loop.
11. A computer readable hardware medium which embodies computer readable instructions for controlling operation of computer apparatus to implement detection of software vulnerabilities by applying a rule set to test for vulnerabilities in computer software, the rule set comprising at least one vulnerability characterisation rule, wherein the instructions provide for control of the computer apparatus to carry out the steps of:
a) receiving a training data set of computer software incorporating positive and negative vulnerability examples and expressed as programs flagged to indicate either presence or absence of vulnerability, the programs comprising instructions each incorporating an identifier to indicate its associated program, the instruction’s address, an instruction operator and a list of instruction operands,
b) receiving a rule generalisation which is processable to transform it into the at least one vulnerability characterisation rule, and
c) processing the rule generalisation to transform it into a more specific rule generalisation by employing logic of at least First-Order and adding to the rule generalisation at least one of a condition, a variable, a constant, a unification of variables and a function based on the training data set and background knowledge relating to attributes of the training data set and consisting of at least one of concepts, facts of interest and functions for calculating values of interest from items of data,
d) evaluating the more specific rule generalisation by applying it to the training data set to identify vulnerabilities, and
e) incorporating the more specific rule generalisation in the rule set if it classifies vulnerabilities in the training data set adequately in terms of covering at least some of the positive vulnerability examples,
f) applying the rule set to a test program for vulnerability detection therein, and
g) providing an alert or a report to a user regarding vulnerability detection in the test program resulting from operation of the method in order to enable corrective action to be taken.
12. A computer readable hardware medium according to claim 11 wherein the background knowledge includes at least one of the following tests:
a) a copying loop test,
b) a length loop test,
c) a test for one block following another,
d) a test for making a call to a string length function at a specified index,
e) a test for tests that precede conditional jumps in an instruction list,
f) a test for whether or not a given list is empty,
g) a test for whether or not a given list has a single jump test (conditional), and if it is, to return a tested register, and
h) a test for whether or not a given list modifies a given register.
13. A computer readable hardware medium according to claim 11 wherein the rule set incorporates a rule which classifies a program as vulnerable if there is a copying loop preceded by a call to a string length function, with no conditional jumps therebetween.
14. A computer readable hardware medium according to claim 11 wherein the rule set incorporates a rule which classifies a program as vulnerable if there is a copying loop defined as a portion of code that copies to a register from a source pointer, changes the source pointer, copies from the register into a destination pointer, changes that destination pointer, and has a control flow path from the code portion’s end back to the code portion’s beginning thus forming a loop.
15. A computer readable hardware medium according to claim 11 wherein the rule set incorporates a rule which classifies a program as vulnerable if there is a copying loop with a test for zero, and one other test, but a register referenced by the other test is not used during the loop.

The claims below are in addition to those above.
All refrences to claim(s) which appear below refer to the numbering after this setence.

1. A liquid discharging apparatus comprising:
a grounding line;
a first discharger configured to discharge, by driving of a first drive element, a liquid in a first cavity through a first nozzle communicating with the first cavity;
a first grounding terminal connecting the first drive element to the grounding line;
a second discharger configured to discharge, by driving of a second drive element, a liquid in a second cavity through a second nozzle communicating with the second cavity;
a second grounding terminal connecting the second drive element to the grounding line;
a shared circuit selectively connectable to the first drive element and the second drive element via respective analog switches;
a drive control unit configured to control the driving of each of the first drive element and the second drive element via the shared circuit;
a switch unit configured to electrically disconnect the first grounding terminal from the second grounding terminal and the grounding line;
a detector configured to detect an electric signal from the first drive element via the first grounding terminal when the first grounding terminal is electrically disconnected from the second grounding terminal and the grounding line, the detector being arranged to be electrically connected to the first ground terminal and to the second ground terminal; and
an inspector unit configured to inspect the first discharger based on the electric signal,
the switch unit having a first switch, a second switch, and a third switch, the first switch disposed between the first grounding terminal and the grounding line, the second switch disposed between the second grounding terminal and the grounding line, the third switch being disposed between the first grounding terminal and the detector, and between the second grounding terminal and the detector,
the detector detecting the electric signal from the first drive element via the first grounding terminal while the first switch disconnects the first grounding terminal from the grounding line, the second switch disconnects the second grounding terminal from the grounding line, the third switch connects the first grounding terminal and the detector, and the third switch disconnects the second grounding terminal from the detector.
2. The liquid discharging apparatus according to claim 1, further comprising
a third discharger configured to discharge, by driving of a third drive element, a liquid in a third cavity through a third nozzle communicating with the third cavity; and
a fourth discharger configured to discharge, by driving of a fourth drive element, a liquid in a fourth cavity through a fourth nozzle communicating with the fourth cavity; wherein
the third drive element is connected to the grounding line along with the first drive element via the first grounding terminal; and
the fourth drive element is connected to the grounding line along with the second drive element via the second grounding terminal.
3. The liquid discharging apparatus according to claim 2, wherein
the first discharger and the third discharger are incorporated in a first unit in which the first grounding terminal is formed; and
the second discharger and the fourth discharger are incorporated in a second unit in which the second grounding terminal is formed.
4. The liquid discharging apparatus according to claim 2, wherein the liquid is discharged at different timings by the first and third dischargers, and the second and fourth dischargers, respectively.
5. A liquid discharging apparatus according to claim 1, wherein
the third switch electrically connects the first grounding terminal to the detector and electrically disconnects the second grounding terminal from the detector prior to the disconnection performed by the first switch and the second switch.
6. A liquid discharging apparatus according to claim 1, wherein
the third switch electrically connects the first grounding terminal to a detection circuit electrically connected to the detector and the grounding line and electrically disconnecting the second grounding terminal from the detection circuit prior to the disconnection performed by the first switch and the second switch, and the switch unit further includes a fourth switch configured to electrically disconnect the detection circuit from the grounding line after the disconnection performed by the first switch and the second switch when the electric signal is detected by the detector.
7. The liquid discharging apparatus according to claim 1, wherein the drive control unit drives the first drive element and the second drive element at a level such that liquid is not discharged, and then drives the first drive element at a level such that residual vibration by the driving of the first drive element is generated.
8. An inspection method for inspecting a liquid discharging apparatus, comprising:
controlling driving of each of a first drive element of a first discharger and a second drive element of a second discharger via a shared circuit selectively connectable to the first drive element and the second drive element, the first drive element being driven such that the first discharger discharges a liquid in a first cavity through a first nozzle communicating with the first cavity, the first drive element being connected to a grounding line via a first grounding terminal, the second drive element being driven such that the second discharger discharges a liquid in a second cavity through a second nozzle communicating with the second cavity, the second drive element being connected to the grounding line via a second grounding terminal;
detecting an electric signal from the first drive element via the first grounding terminal by a detector arranged to be electrically connected to the first ground terminal and to the second ground terminal while the first grounding terminal is in a state of being electrically disconnected from the second grounding terminal and the grounding line; and
inspecting the first discharger on the basis of the electric signal,
the detecting of the electric signal including detecting the electric signal from the first drive element via the first grounding terminal while disconnecting the first grounding terminal from the grounding line by a first switch, disconnecting the second grounding terminal from the grounding line by a second switch, connecting the first grounding terminal and the detector by a third switch, and disconnecting the second grounding terminal from the detector by the third switch, the first being disposed between the first grounding terminal and the grounding line, the second switch being disposed between the second grounding terminal and the grounding line, the third switch being disposed between the first grounding terminal and the detector, and between the second grounding terminal and the detector.
9. A non-transitory computer readable medium having recorded program for causing a computer to execute a function of inspecting a liquid discharging apparatus, the program being adapted for executing functions of:
controlling driving of each of a first drive element of a first discharger and a second drive element of a second discharger via a shared circuit selectively connectable to the first drive element and the second drive element, the first drive element being driven such that the first discharger discharges a liquid in a first cavity through a first nozzle communicating with the first cavity, the first drive element being connected to a grounding line via a first grounding terminal, the second drive element being driven such that the second discharger discharges a liquid in a second cavity through a second nozzle communicating with the second cavity, the second drive element being connected to the grounding line via a second grounding terminal;
detecting an electric signal from the first drive element via the first grounding terminal by a detector arranged to be electrically connected to the first ground terminal and to the second ground terminal while the first grounding terminal is in a state of being electrically disconnected from the second grounding terminal and the grounding line; and
inspecting the first discharger based on the electric signal;
the medium being accessible by the computer;
the detecting of the electric signal including detecting the electric signal from the first drive element via the first grounding terminal while disconnecting the first grounding terminal from the grounding line by a first switch, disconnecting the second grounding terminal from the grounding line by a second switch, connecting the first grounding terminal and the detector by a third switch, and disconnecting the second grounding terminal from the detector by the third switch, the first being disposed between the first grounding terminal and the grounding line, the second switch being disposed between the second grounding terminal and the grounding line, the third switch being disposed between the first grounding terminal and the detector, and between the second grounding terminal and the detector.