IP Library Granted Patent US 7,406,592
Granted Patent B1
US 7,406,592 · App. 10/948,733 · Granted Jul 29, 2008

Method, system, and apparatus for efficient evaluation of boolean expressions

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 7,406,592
App. No.
10/948,733
Granted
Jul 29, 2008
Kind
B1
Abstract

Methods, systems, and computer-readable media are provided for efficiently evaluation Boolean expressions. According to the method, the Boolean expression is expressed using pre-fix notation. Each element in the pre-fix expression is then parsed. For each first operand for a Boolean operation, the value of the operand is determined. This may include evaluating a GUID. When an operator and a second operand are encountered, a decision is made as to whether the second operand should be evaluated. The determination as to whether the second operand should be evaluated is made based upon the value of the first operand and the type of operator. If the second operand need not be evaluated, no evaluation is performed thereby saving time and memory space. The evaluation of the Boolean expression continues in this manner until the entire expression has been evaluated. If the Boolean expression is evaluated as true, the program module associated with the Boolean expression may be loaded. Otherwise, the program module will not be loaded.

Claims (29)

1. A method for efficiently evaluating a Boolean expression comprising two or more operands and one or more operators, the method comprising:

(a) parsing a first operator from the Boolean expression, wherein the Boolean expression is associated with a program module;

(b) in response to parsing the first operator, storing on a stack a state value indicating that an operand is expected for the first operator;

(c) repeating operations (a)-(b) for each of the operators in the Boolean expression;

(d) evaluating a first operand from the Boolean expression to determine a value of the first operand;

(e) in response to determining the value of the first operand, retrieving a state value from the stack;

(f) determining whether to evaluate a second operand from the Boolean expression based on the value of the first operand and the state value retrieved from the stack;

(g) in response to determining that the second operand should not be evaluated, skipping the evaluation of the second operand;

(h) repeating operations (d)-(g) for each of the operands in the Boolean expression to evaluate the Boolean expression as true or false;

(i) loading the program module via an extensible firmware interface if the Boolean expression is evaluated as true, the extensible firmware interface providing an interface between an operating system and system firmware; and

(j) terminating operation (h) and returning an error if an error is encountered during the evaluation of the first operand or the second operand.

2. The method of claim 1 , wherein determining whether to evaluate a second operand from the Boolean expression based on the value of the first operand and the state value retrieved from the stack comprises skipping the second operand in response to determining that the value of the first operand is false and that the state value corresponds to an AND operator.

3. The method of claim 2 , wherein determining whether to evaluate a second operand from the Boolean expression based on the value of the first operand and the state value retrieved from the stack comprises skipping the second operand in response to determining that the value of the first operand is true and that the state value corresponds to an OR operator.

4. A computer storage medium having computer-executable instructions stored thereon which, when executed by a computer, cause the computer to perform the method of claim 1 .

5. A method for determining whether a program module should be loaded within an extensible firmware interface environment, the method comprising:

(a) associating a Boolean expression with the program module, the Boolean expression comprising one or more operands and one or more operators and indicating that the program module may be loaded when the Boolean expression is evaluated as true;

(b) parsing the Boolean expression for the one or more operators until encountering the one or more operands;

(c) in response to encountering an operator during parsing, storing a state value indicating that a first operand for the operator is expected on a stack;

(d) parsing a first operand from the Boolean expression in response to encountering the one or more operands;

(e) evaluating the first operand to obtain a true or false value for the first operand;

(f) in response to obtaining the true or false value for the first operand, retrieving a state value from the stack;

(g) determining whether to evaluate the second operand or to skip the evaluation of the second operand based upon the state value retrieved from the stack and the true or false value for the first operand;

(h) in response to determining that evaluation of the second operand should be skipped, not performing an evaluation of the second operand;

(i) in response to determining that the second operand should be evaluated, evaluating the second operand within the Boolean expression to obtain a true or false value for the second operand;

(j) repeating the operations (d)-(i) until the entire Boolean expression has been evaluated as true or false; and

(k) loading the program module via an extensible firmware interface in response to determining that the Boolean expression has been evaluated as true, the extensible firmware interface providing an interface between an operating system and system firmware; and

(l) terminating operation (j) and returning an error if an error is encountered during the evaluation of the first operand or the second operand.

6. A computer storage medium having computer-executable instructions stored thereon which, when executed by a computer, cause the computer to perform the method of claim 5 .

7. The method of claim 1 , wherein the Boolean expression is arranged according to pre-fix notation.

Assignments (5)
PATENT SECURITY AGREEMENT Recorded Oct 23, 2024
From: AMERICAN MEGATRENDS INTERNATIONAL, LLC
To: BAIN CAPITAL CREDIT, LP, AS ADMINISTRATIVE AGENT AND COLLATERAL AGENT
Reel/Frame 069229/0834 →
RELEASE OF SECURITY INTEREST Recorded Oct 17, 2024
From: MIDCAP FINANCIAL TRUST
To: AMERICAN MEGATRENDS INTERNATIONAL, LLC
Reel/Frame 069205/0795 →
SECURITY INTEREST Recorded May 6, 2019
From: AMERICAN MEGATRENDS INTERNATIONAL, LLC
To: MIDCAP FINANCIAL TRUST, AS COLLATERAL AGENT
Reel/Frame 049087/0266 →
ENTITY CONVERSION Recorded Apr 15, 2019
From: AMERICAN MEGATRENDS, INC.
To: AMERICAN MEGATRENDS INTERNATIONAL, LLC
Reel/Frame 049091/0973 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 23, 2004
From: POLYDOV, FELIKS
To: AMERICAN MEGATRENDS, INC.
Reel/Frame 015830/0639 →