# US 2008/0301078 A1 · Method and apparatus to abstract away rule languages

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

- Number: US 2008/0301078 A1
- Document ID: US20080301078A1
- Status: Published application
- Kind: A1
- Application number: 11/809,468
- Filed: 2007-05-31
- Published: 2008-12-04
- Earliest claimed: 2007-05-31
- Assignees: Red Hat, Inc.
- Inventors: Mark Proctor; Edson Tirelli; Robert K. McWhirter
- Web page: https://patentgrep.com/patent/US20080301078A1

## CPC

- G06N 5/022: Knowledge engineering; Knowledge acquisition
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

Some embodiments of a method and an apparatus to abstract away rule languages from a rule engine have been presented. In one embodiment, rules written in a first rule language are parsed into descriptor classes, which are used to model concepts that can be expressed in a rule engine. An intermediate structure is generated from the parsed rules. The intermediate structure is input to a core of the rule engine, which is operable to execute the rules.

## Claims

### Claim 1

A computer-implemented method comprising:
parsing a plurality of rules written in a first rule language into a first plurality of descriptor classes;
generating an intermediate structure using the first plurality of descriptor classes; and
inputting the intermediate structure to a core of a rule engine for execution.

### Claim 2 (depends on 1)

The method of claim 1, wherein parsing the plurality of rules comprises:
parsing the plurality of rules using a plurality of rule patterns.

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
defining a second plurality of descriptor classes to model concepts that can be expressed in the rule engine, wherein the second plurality of descriptor classes include the first plurality of descriptor classes.

### Claim 4 (depends on 1)

The method of claim 1, further comprising:
transforming the first plurality of descriptor classes into a second rule language.

### Claim 5 (depends on 1)

The method of claim 1, wherein the intermediate structure comprises an abstract syntax tree (AST).

### Claim 6 (depends on 1)

The method of claim 1, wherein the first rule language is a C Library Integrated Production System (CLIPS) language.

### Claim 7 (depends on 1)

The method of claim 1, wherein the first rule language is Extensible Markup Language (XML).

### Claim 8

An apparatus comprising:
a descriptor model having a plurality of descriptor classes;
a first driver coupled to the descriptor model to parse a plurality of rules written in a first rule language into one or more of the plurality of descriptor classes to generate an intermediate structure; and
a core of a rule engine coupled to the descriptor model to receive the intermediate structure and to execute the plurality of rules.

### Claim 9 (depends on 8)

The apparatus of claim 8, wherein the first driver is operable to parse the plurality of rules using a plurality of rule patterns.

### Claim 10 (depends on 8)

The apparatus of claim 8, wherein the plurality of descriptor classes are defined to model concepts that can be expressed in the rule engine.

### Claim 11 (depends on 8)

The apparatus of claim 8, further comprising a second driver coupled to the descriptor model, wherein the second driver is operable with the descriptor model to transform the intermediate structure into a second rule language.

### Claim 12 (depends on 8)

The apparatus of claim 8, wherein the intermediate structure comprises an abstract syntax tree (AST).

### Claim 13 (depends on 8)

The apparatus of claim 8, wherein the first driver comprises a C Library Integrated Production System (CLIPS) driver.

### Claim 14 (depends on 8)

The apparatus of claim 8, wherein the first driver comprises an Extensible Markup Language (XML) driver.

### Claim 15

A machine-readable medium that provides instructions that, if executed by a processor, will cause the processor to perform operations comprising:
parsing a plurality of rules written in a first rule language into a first plurality of descriptor classes;
generating an intermediate structure using the first plurality of descriptor classes; and
inputting the intermediate structure to a core of a rule engine for execution.

### Claim 16 (depends on 15)

The machine-readable medium of claim 15, wherein parsing the plurality of rules comprises:
parsing the plurality of rules using a plurality of rule patterns.

### Claim 17 (depends on 15)

The machine-readable medium of claim 15, wherein the operations further comprise:
defining a second plurality of descriptor classes to model concepts that can be expressed in the rule engine, wherein the second plurality of descriptor classes include the first plurality of descriptor classes.

### Claim 18 (depends on 15)

The machine-readable medium of claim 15, wherein the operations further comprise:
transforming the first plurality of descriptor classes into a second rule language.

### Claim 19 (depends on 15)

The machine-readable medium of claim 15, wherein the intermediate structure comprises an abstract syntax tree (AST).

### Claim 20 (depends on 15)

The machine-readable medium of claim 15, wherein the first rule language is a C Library Integrated Production System (CLIPS) language.

### Claim 21 (depends on 15)

The machine-readable medium of claim 15, wherein the first rule language is Extensible Markup Language (XML).
