US 7,502,788 B2
Method for retrieving constant values using regular expressions
Srinivasan Balasubramanian, Madurai (India)
Assigned to International Business Machines Corporation, Armonk, N.Y. (US)
Filed on Nov. 08, 2005, as Appl. No. 11/269,486.
Prior Publication US 2007/0112731 A1, May 17, 2007
Int. Cl. G06F 17/30 (2006.01); G06F 15/16 (2006.01)
U.S. Cl. 707—6  [707/3; 707/4; 707/5; 707/10] 2 Claims
OG exemplary drawing
 
1. A computer-implemented method of retrieving constant values, in an associative memory array, said method comprising:
providing a plurality of key-value pairs for said associative memory array, wherein each key-value pair comprises a particular key and a constant value associated with that particular key;
compiling said key-value pairs to form a unified regular expression, said compiling comprising:
writing said unified regular expression with each of said key-value pairs having a marker between said particular key and said value for said particular key such that, for each one of said key-value pairs, said marker and said constant value form a unique tag;
further writing said unified regular expression with an “OR” logical connective between each of said key-value pairs;
determining lengths for each said particular key; and
incorporating each said particular key into said unified regular expression based on a descending order of said lengths;
forming a single liked tag by concatenating each said unique tag from all of said key-value pairs;
receiving an input string;
transforming said input string into a transformed input string by linking said input string to said single linked tag;
evaluating said transformed input string against said unified regular expression to identify a match between a single particular key located in said unified regular expression and in said transformed input string; and
retrieving, from said associative memory array, a single constant value associated with said single particular key that is located in said unified regular expression in said transformed input string; and
after identifying said match, storing said transformed input string and said single constant value.