IP Library › Granted Patent US 9,038,032
Granted Patent B2
US 9,038,032 · App. 13/481,594 · Granted May 19, 2015

Symbolic execution and automatic test case generation for JavaScript programs

Inventors: Guodong Li (San Jose, CA); Praveen K. Murthy (Fremont, CA); Indradeep Ghosh (Cupertino, CA); Sreeranga P. Rajan (Sunnyvale, CA)
Assignee: Fujitsu Limited
G06F11/3684G06F9/45529
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,038,032
App. No.
13/481,594
Granted
May 19, 2015
Kind
B2
Abstract

A method includes, by one or more computing devices, determining JavaScript statements to be evaluated, parsing the JavaScript statements, translating the JavaScript statements into Java bytecodes and JavaScript-specific instructions, executing the Java bytecodes in a Java execution engine, calling a JavaScript run-time engine from the Java execution engine, handling one or more semantic operations associated with the JavaScript-specific instructions through use of the JavaScript run-time engine, and providing return values to the Java execution engine. The statements are configured for execution on a computing device. The set of Java bytecodes and JavaScript-specific instructions is configured to conduct symbolic execution of one or more portions of the JavaScript statements. The symbolic execution is configured to evaluate the JavaScript statements.

Claims (60)

1. A method comprising, by one or more computing devices:

determining JavaScript statements to be evaluated, the JavaScript statements configured for execution on a computing device;

parsing the JavaScript statements;

translating the JavaScript statements into a set of Java bytecodes and JavaScript-specific instructions configured to conduct symbolic execution of one or more portions of the JavaScript statements;

determining a document object model reference in the JavaScript statements;

determining a set of instructions representing the document object model;

modifying the set of instructions to include information from the document object model reference;

executing the Java bytecodes in a Java execution engine;

adding the modified set of instructions to the set of Java bytecodes and JavaScript-specific instructions upon access of the document object model reference by the Java execution engine;

calling a JavaScript run-time engine from the Java execution engine;

handling one or more semantic operations associated with the JavaScript-specific instructions through use of the JavaScript run-time engine; and

providing return values to the Java execution engine;

wherein the symbolic execution includes evaluating the JavaScript statements by maintaining a symbolic value of the translated JavaScript-specific instructions in the translated Java bytecodes while the JavaScript run-time engine handles semantic operations associated with the translated JavaScript specific instructions.

2. The method of claim 1 , further comprising:

determining a web browser object reference in the JavaScript statements;

determining a set of instructions representing the web browser object reference;

modifying the set of instructions to include information from the web browser object reference; and

adding the modified set of instructions to the set of Java bytecodes and JavaScript-specific instructions.

3. The method of claim 1 , wherein calling a JavaScript run-time engine from the Java execution engine is conducted by directly executing one or more portions of the JavaScript run-time engine in the Java execution engine.

4. The method of claim 1 , further comprising interpreting JavaScript statements within the Java execution engine.

5. A system comprising:

a computer-readable medium comprising computer-executable instructions; and

one or more processors coupled to the computer-readable medium and operable to read and execute the instructions, the one or more processors being operable when executing the instructions to:

determine JavaScript statements to be evaluated, the JavaScript statements configured for execution on a computing device;

parse the JavaScript statements;

translate the JavaScript statements into a set of Java bytecodes and JavaScript-specific instructions configured to conduct symbolic execution of one or more portions of the JavaScript statements;

determine a document object model reference in the JavaScript statements;

determine a set of instructions representing the document object model;

modify the set of instructions to include information from the document object model reference;

execute the Java bytecodes in a Java execution engine;

add the modified set of instructions to the set of Java bytecodes and JavaScript-specific instructions upon access of the document object model reference by the Java execution engine;

call a JavaScript run-time engine from the Java execution engine;

handle one or more semantic operations associated with the JavaScript-specific instructions using the JavaScript run-time engine; and

provide return values to the Java execution engine;

wherein the symbolic execution includes evaluating the JavaScript statements by maintaining a symbolic value of the translated JavaScript-specific instructions in the translated Java bytecodes while the JavaScript run-time engine handles semantic operations associated with the translated JavaScript specific instructions.

6. The system of claim 5 , wherein the one or more processors are further operable to:

determine a web browser object reference in the JavaScript statements;

determine a set of instructions representing the web browser object reference;

modify the set of instructions to include information from the web browser object reference; and

add the modified set of instructions to the set of Java bytecodes and JavaScript-specific instructions.

7. The system of claim 5 , wherein calling a JavaScript run-time engine from the Java execution engine is conducted by directly executing one or more portions of the JavaScript run-time engine in the Java execution engine.

8. The system of claim 5 , wherein the Java execution engine is configured to interpret JavaScript statements within the Java execution engine.

9. An article of manufacture comprising:

a non-transitory computer-readable medium; and

computer-executable instructions carried on the non-transitory computer-readable medium, the instructions readable by a processor, the instructions, when read and executed, for causing the processor to:

determine JavaScript statements to be evaluated, the JavaScript statements configured for execution on a computing device;

parse the JavaScript statements;

translate the JavaScript statements into a set of Java bytecodes and JavaScript-specific instructions configured to conduct symbolic execution of one or more portions of the JavaScript statements;

determine a document object model reference in the JavaScript statements;

determine a set of instructions representing the document object model;

modify the set of instructions to include information from the document object model reference;

execute the Java bytecodes in a Java execution engine;

add the modified set of instructions to the set of Java bytecodes and JavaScript-specific instructions upon access of the document object model reference by the Java execution engine;

call a JavaScript run-time engine from the Java execution engine;

handle one or more semantic operations associated with the JavaScript-specific instructions using the JavaScript run-time engine; and

provide return values to the Java execution engine;

wherein the symbolic execution includes evaluating the JavaScript statements by maintaining a symbolic value of the translated JavaScript-specific instructions in the translated Java bytecodes while the JavaScript run-time engine handles semantic operations associated with the translated JavaScript specific instructions.

10. The article of claim 9 , wherein the one or more processors are further operable to maintain a symbolic value in the Java execution engine associated with the JavaScript-specific instructions.

11. The article of claim 9 , wherein calling a JavaScript run-time engine from the Java execution engine is conducted by directly executing one or more portions of the JavaScript run-time engine in the Java execution engine.

12. The article of claim 9 , wherein the Java execution engine is configured to interpret JavaScript statements within the Java execution engine.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 25, 2012
From: LI, GUODONG; MURTHY, PRAVEEN K.; GHOSH, INDRADEEP; RAJAN, SREERANGA P.
To: FUJITSU LIMITED
Reel/Frame 028273/0697 →
Continuity (1)
Related Publication 20130318503A1 · Nov 28, 2013