# US 2009/0222793 A1 · Virtual Machine and Programming Language for Event Processing

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2009/0222793 A1
- Document ID: US20090222793A1
- Status: Published application
- Kind: A1
- Application number: 12/040,485
- Filed: 2008-02-29
- Published: 2009-09-03
- Earliest claimed: 2008-02-29
- Assignees: International Business Machines Corporation
- Inventors: Joachim H. Frank; Wilfred C. Jamison
- Web page: https://patentgrep.com/patent/US20090222793A1

## CPC

- G06F 9/542: {Event management; Broadcasting; Multicasting; Notifications}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A virtual machine supports execution of compiler-generated code and provides an execution environment for code that may correspond to any of several different event-driven or message-driven programming models (such as state machines, rules for complex event processing and event correlation, monitoring contexts, processes, and mediations). The programming models may be used in business monitoring and/or business integration environments. A programming language is defined for execution using the virtual machine, which contains a relatively small number of instructions and which is preferably generated by a compiler from a higher-level, event-driven or message-driven model.

## Claims

### Claim 1

A method for executing a virtual machine, comprising:
executing instructions from a program using the virtual machine on a computer, wherein the instructions comprise at least one of: an event instruction for receiving an inbound event; an assignment instruction for assigning a value; a branch instruction for conditional transfer to a different one of the instructions; an emit instruction for specifying that an outbound event is to be emitted; a terminate instruction for specifying that a current execution context object is to be terminated; and a fan-out instruction for at least one of specifying event correlation and enabling a context switch.

### Claim 2 (depends on 1)

The method according to claim 1, wherein the instructions are generated from an event-driven model specification.

### Claim 3 (depends on 1)

The method according to claim 1, wherein the instructions are generated from a message-driven model specification.

### Claim 4 (depends on 1)

The method according to claim 1, further comprising executing instructions from a plurality of programs using the virtual machine on the computer, the plurality of programs generated from at least two different execution models.

### Claim 5 (depends on 1)

The method according to claim 1, wherein the executing of the event instruction further comprises:
executing the event instruction to receive a particular inbound event;
locating a fan-out instruction associated with the event instruction;
executing the located fan-out instruction to determine, using correlation predicate information associated with the located fan-out instruction, whether any current execution context object is capable of further processing the particular inbound event; and
directing the particular inbound event to each determined capable execution context object, if any, for the further processing therein.

### Claim 6 (depends on 1)

The method according to claim 1, wherein the event instruction for receiving an inbound event also filters the inbound event.

### Claim 7 (depends on 1)

The method according to claim 1, wherein the executing of the instructions using the virtual machine further comprises determining which of a plurality of event instructions from the program to execute, upon receiving a particular inbound event, by comparing a type declared by the particular inbound event to a type specification, when present, in each of the plurality of event instructions.

### Claim 8 (depends on 1)

The method according to claim 1, wherein the executing of the assignment instruction further comprises:
evaluating an expression of the assignment instruction; and
assigning, as the value, a result of the evaluating to a target identified by the assignment instruction.

### Claim 9 (depends on 1)

The method according to claim 1, wherein the executing of the branch instruction further comprises:
evaluating a condition expression of the branch instruction; and
wherein the conditional transfer further comprises next executing the different one of the instructions, as identified by an attribute of the branch instruction, when the evaluation returns a true result, and otherwise next executing a next sequential one of the instructions.

### Claim 10 (depends on 1)

The method according to claim 1, wherein the executing of the emit instruction further comprises emitting, to an event bus, the outbound event.

### Claim 11 (depends on 10)

The method according to claim 10, wherein the executing of the emit instruction further comprises evaluating an expression specified on the emit instruction and reflecting a result of the evaluating in the outbound event prior to the emitting.

### Claim 12 (depends on 1)

The method according to claim 1, wherein the executing of the terminate instruction further comprises terminating the current execution context object.

### Claim 13

A virtual machine for executing a program, comprising:
an instruction executor for executing instructions from the program using a computer, wherein the instructions comprise at least one of: an event instruction for receiving an inbound event; an assignment instruction for assigning a value; a branch instruction for conditional transfer to a different one of the instructions; an emit instruction for specifying that an outbound event is to be emitted; a terminate instruction for specifying that a current execution context object is to be terminated; and a fan-out instruction for at least one of specifying event correlation and enabling a context switch.

### Claim 14 (depends on 13)

The virtual machine according to claim 13, wherein the instructions are generated from an event-driven model specification.

### Claim 15 (depends on 13)

The virtual machine according to claim 13, wherein the instructions are generated from a message-driven model specification.

### Claim 16 (depends on 13)

The virtual machine according to claim 13, wherein the virtual machine is usable for executing a plurality of programs, the plurality of programs generated from at least two different execution models.

### Claim 17 (depends on 13)

The virtual machine according to claim 13, wherein the executing of the event instruction further comprises:
executing the event instruction to receive a particular inbound event;
locating a fan-out instruction associated with the event instruction;
executing the located fan-out instruction to determine, using correlation predicate information associated with the located fan-out instruction, whether any current execution context object is capable of further processing the particular inbound event; and
directing the particular inbound event to each determined capable execution context object, if any, for the further processing therein.

### Claim 18 (depends on 13)

The virtual machine according to claim 13, wherein the event instruction for receiving an inbound event also filters the inbound event.

### Claim 19 (depends on 13)

The virtual machine according to claim 13, wherein the virtual machine instruction executor determines which of a plurality of event instructions from the program to execute, upon receiving a particular inbound event, by comparing a type declared by the particular inbound event to a type specification, when present, in each of the plurality of event instructions.

### Claim 20 (depends on 13)

The virtual machine according to claim 13, wherein the executing of the assignment instruction further comprises:
evaluating an expression of the assignment instruction; and
assigning, as the value, a result of the evaluating to a target identified by the assignment instruction.

### Claim 21 (depends on 13)

The virtual machine according to claim 13, wherein the executing of the branch instruction further comprises:
evaluating a condition expression of the branch instruction; and
wherein the conditional transfer further comprises next executing the different one of the instructions, as identified by an attribute of the branch instruction, when the evaluation returns a true result, and otherwise next executing a next sequential one of the instructions.

### Claim 22 (depends on 13)

The virtual machine according to claim 13, wherein the executing of the emit instruction further comprises emitting, to an event bus, the outbound event.

### Claim 23 (depends on 22)

The virtual machine according to claim 22, wherein the executing of the emit instruction further comprises evaluating an expression specified on the emit instruction and reflecting a result of the evaluating in the outbound event prior to the emitting.

### Claim 24 (depends on 13)

The virtual machine according to claim 13, wherein the executing of the terminate instruction further comprises terminating the current execution context object.

### Claim 25

A computer program product for executing a virtual machine, wherein the computer program product is embodied on one or more computer-readable media and comprises computer-readable instructions for:
executing instructions from a program using the virtual machine on a computer, wherein the instructions comprise at least one of: an event instruction for receiving an inbound event; an assignment instruction for assigning a value; a branch instruction for conditional transfer to a different one of the instructions; an emit instruction for specifying that an outbound event is to be emitted; a terminate instruction for specifying that a current execution context object is to be terminated; and a fan-out instruction for at least one of specifying event correlation and enabling a context switch.

### Claim 26

A computer-readable medium storing source code written in a programming language, wherein:
the programming language comprises:
an event instruction for receiving an inbound event;
an assignment instruction for assigning a value;
a branch instruction for conditional transfer to a different one of the instructions;
an emit instruction for specifying that an outbound event is to be emitted;
a terminate instruction for specifying that a current execution context object is to be terminated; and
a fan-out instruction for at least one of specifying event correlation and enabling a context switch; and
the source code comprises a plurality of the instructions in the programming language.

### Claim 27 (depends on 26)

The computer-readable medium according to claim 26, wherein the source code is generated from an event-driven model specification.

### Claim 28 (depends on 26)

The computer-readable medium according to claim 26, wherein the source code is generated from a message-driven model specification.

### Claim 29

A program of instructions storable on a computer-readable medium for causing a computer to execute, wherein the instructions comprise a plurality of:
an event instruction for receiving an inbound event;
an assignment instruction for assigning a value;
a branch instruction for conditional transfer to a different one of the instructions;
an emit instruction for specifying that an outbound event is to be emitted;
a terminate instruction for specifying that a current execution context object is to be terminated; and
a fan-out instruction for at least one of specifying event correlation and enabling a context switch.

### Claim 30 (depends on 29)

The program of instructions according to claim 29, wherein the instructions are generated from an event-driven model specification.

### Claim 31 (depends on 29)

The program of instructions according to claim 29, wherein the instructions are generated from a message-driven model specification.
