AU2003277250A1 - Hardware accelerated validating parser - Google Patents

Hardware accelerated validating parser Download PDF

Info

Publication number
AU2003277250A1
AU2003277250A1 AU2003277250A AU2003277250A AU2003277250A1 AU 2003277250 A1 AU2003277250 A1 AU 2003277250A1 AU 2003277250 A AU2003277250 A AU 2003277250A AU 2003277250 A AU2003277250 A AU 2003277250A AU 2003277250 A1 AU2003277250 A1 AU 2003277250A1
Authority
AU
Australia
Prior art keywords
data
token
state table
recited
control word
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Abandoned
Application number
AU2003277250A
Inventor
Michael C. Dapp
Eric C. Lett
Sai Lun Ng
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lockheed Martin Corp
Original Assignee
Lockheed Corp
Lockheed Martin Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from US10/334,086 external-priority patent/US7080094B2/en
Application filed by Lockheed Corp, Lockheed Martin Corp filed Critical Lockheed Corp
Publication of AU2003277250A1 publication Critical patent/AU2003277250A1/en
Abandoned legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Artificial Intelligence (AREA)
  • Software Systems (AREA)
  • Document Processing Apparatus (AREA)
  • Devices For Executing Special Programs (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

WO 2004/040447 PCT/US2003/031315 1 HARDWARE ACCELERATED VALIDATING PARSER DESCRIPTION BACKGROUND OF THE INVENTION Field of the Invention 5 The present invention generally relates to validating parser processing for parsing and validating documents, such as XMLTM documents, for use in individual data processors interconnected by a network and, more particularly, to hardware 10 validating processors for acceleration of the validation of such documents. Description of the Prior Art The field of digital communications between computers and the linking of computers into networks 15 has developed rapidly in recent years, similar, in many ways to the proliferation of personal computers of a few years earlier. This increase in interconnectivity and the possibility of remote processing has greatly increased the effective 20 capability and functionality of individual computers in such networked systems. Nevertheless, the variety of uses of individual computers and systems, preferences of their users and the state of the art when computers are placed into service has resulted 25 in a substantial degree of variety of capabilities and configurations of individual machines and their operating systems, collectively referred to as "platforms" which are generally incompatible with WO 2004/040447 PCT/US2003/031315 2 each other to some degree particularly at the level of operating system and programming language. This incompatibility of platform characteristics and the simultaneous requirement for 5 the capability of communication and remote processing and a sufficient degree of compatibility to support it has resulted in the development of object oriented programming (which accommodates the concept of assembling an application as well as data 10 as a group of more or less generalized modules through a referencing system of entities, attributes and relationships) and a number of programming languages to embody it. Extensible Markup Language TM (XMLTM) is such a language which has come into 15 widespread use and can be transmitted as a document over a network of arbitrary construction and architecture. In such a 'language, certain character strings correspond to certain commands or identifications, 20 including special characters and other important data (collectively referred to as control words) which allow data or operations to, in effect, identify themselves so that they may be, thereafter treated as "objects" such that associated data and 25 commands can be translated into the appropriate formats and commands of different applications in different languages in order to engender a degree of compatibility of respective connected platforms sufficient to support the desired processing at a 30 given machine. The detection of these character strings is performed by an operation known as parsing, similar to the more conventional usage of resolving the syntax of an expression, such as a sentence, into its component parts and describing WO 2004/040447 PCT/US2003/031315 3 them grammatically. When parsing an XMLTM document, a large portion and possibly a majority of the central processor unit (CPU) execution time is spent traversing the 5 document searching for control words, special characters and other important data as defined for the particular XML TM specification being processed. This is typically done by software which queries each character and determines if it belongs to the 10 predefined set of strings of interest, for example, a set of character strings comprising the following "<command>", "<data type = dataword>", "</command>", etc. If any of the target strings are detected, a token is saved with a pointer to the location in the 15 document for the start of the token and the length of the token. These tokens are accumulated until the entire document has been parsed. This process must then be followed by processing in order to evaluate the tokens against 20 rules and definitions contained in a "document model" such as the specification of a document type definition (DTD) or an XML TM schema in order to assure that the collection of tokens and the character strings they represent in the document are 25 well-constructed to form an unambiguous and internally consistent document, in its entirety. This processing is known as validation and generally proceeds in much the same fashion as processing for finding character strings of interest discussed 30 above but operating on sixteen-bit (or longer) tokens corresponding to sequences of bytes rather than single eight-bit (or longer) bytes representing characters and checking for consistency between tokens and the content or arguments of other tokens WO 2004/040447 PCT/US2003/031315 4 to accommodate the self-definition characteristics and properties of languages such as XML, SGML T M (of which XML T M is a simplified form) and HTML TM (which is essentially a special case of XML T M ) which support 5 platform independence and interconnectivity. Both the parsing for finding tokens and the parsing for validation are generally implemented using a conceptually table-based finite state machine (FSM) or state table to search for these 10 strings of interest or consistency between elements found and represented by tokens. The state table resides in memory and is designed to search for the specific patterns of characters or tokens in the document. For parsing to find character strings of 15 interest, the current state is used as the base address into the state table and the ASCII representation of the input character or the token is an index into the table. Character strings of interest may be of any of several types such as an 20 element, an attribute/attribute list or data and elements may be simple elements or aggregates and may be nested. The parsing for validation principally looks at the types of character strings presented and the nesting itself to determine which 25 elements or tokens are associated with another specific token(s) and the hierarchical relationship between them. The goal of this processing is not only to determine that the document is a valid document that 30 conforms to the language (e.g. XML
M
) standard and have the correct structure as defined by a DTD or
XML
TM schema in its entirety but to develop a hierarchical data structure such as a tree structured document object in which the structure WO 2004/040447 PCT/US2003/031315 5 will fully represent the informational content of the data. Therefore, while parsing to find character strings of interest is very time consuming and processor intensive, parsing for validation is 5 much more so. That is, since the XMLTM data, for example, are textual and not only the data but the data structure, which may be freely specified to express the informational content, must be extracted from such text, it can be readily appreciated that 10 the required processing is particularly time consuming and processor intensive. At the same time, the potential complexity of the processing needed to properly handle aggregate elements and flexible nesting that may be in 15 multiple hierarchical levels complicates the use of special purpose or hardware processors to reduce the processing load on the CPU of the local computer. That is, while it is generally recognized that special purpose or hardware processors can often 20 provide increased processing speed in comparison with general purpose processors due to the reduced overhead for control of the general purpose processor, itself, it is not assured that a special purpose processor will be feasible or provide any 25 significant advantage in performance as the processing function becomes more complex or with increased requirements for flexibility. In general, increased complexity and/or requirements for flexibility of function can only be accommodated by 30 much increased hardware requirements which may not be economically justified for many applications or for the performance gain that may be possible. It is for this reason that validation parsing has been performed on programmed general purpose computers WO 2004/040447 PCT/US2003/031315 6 despite the processing time required. SUMMARY OF THE INVENTION The present invention to provide a hardware accelerator for validation processing in which 5 substantial performance gains are derived with limited hardware. In order to accomplish these and other objects of the invention, method of accelerating validation parsing and a hardware accelerated validation parser 10 for a tokenized text document in a computer language supporting platform independence and interoperability is provided comprising, an arrangement for retrieving data from both a data dictionary and a state table in accordance with a 15 token, and adder for merging the data from the state table and the data dictionary to form a transition control word, and adder for merging part of the transition control word with another token to retrieve further data from the state table, and 20 logic for forming a tree structured data object corresponding to the tokenized text document under control of part of the transition control word.
WO 2004/040447 PCT/US2003/031315 7 BRIEF DESCRIPTION OF THE DRAWINGS The foregoing and other objects, aspects and advantages will be better understood from the following detailed description of a preferred 5 embodiment of the invention with reference to the drawings, in which: Figure 1 is a high level schematic diagram of the hardware validating parser accelerator in accordance with the invention, 10 Figure 1A is a diagram of an exemplary tree structured document object illustrative of formation thereof, Figure 2 is a diagram of a preferred logical layout of state tables in accordance with the 15 invention, Figure 3 is a diagram illustrating a preferred format of a state table entry, Figure 4 is a diagram illustrating a preferred logical layout of the element and attribute buffer 20 of Figure 1 in accordance with the invention, Figure 5 is a diagram of a preferred exemplary data dictionary entry format, Figure 6 is a diagram illustrating a preferred logical layout of transition control words (TCW) in 25 accordance with the invention, Figure 7 is a flow chart illustrating an overview of the operation of the validating parser accelerator illustrated schematically in Figure 1, Figure 8 is a flow chart illustrating operation 30 of the invention to implement TCW update rules, and Figures 9, 10 and 11A - 11E are flow charts illustrating TCW operations.
WO 2004/040447 PCT/US2003/031315 8 DETAILED DESCRIPTION OF A PREFERRED EMBODIMENT OF THE INVENTION Referring now to the drawings, and more particularly to Figure 1, there is shown in high 5 level schematic form, an overview of the hardware validating parser accelerator system in accordance with the invention. It is to be understood that the invention operates on a document which has already been parsed for provision or setting of tokens 10 corresponding to character strings of interest in an original document which is generally in textual form, as is typical of XML" M documents. (While the invention will be described in connection with the preferred application to parsing of XMLTM documents, 15 it is to be understood that the principles of the invention as will be evident from the following description are also applicable to parsing of files embodied in any programming language and, particularly, to object-oriented programming 20 language with respect to which it is desirable to identify objects and their structure in accordance with fixed or user-definable rules.) This tokenized document is stored in memory/buffer 110 which is accessed in accordance with registers 112, 114 and 25 116 containing the document base address, the document limit address and the document next address, respectively. Tokens are fetched in sequence and stored in token buffer 120. Portions of the token are then 30 used to provide a portion of an address to adder 130 (which provides an address into state table 160), an address into the data dictionary 150 and to a namespace mapping memory (an incident of XMLTM to WO 2004/040447 PCT/US2003/031315 9 avoid problems which could be engendered by different developers using the same element names in regard to different documents which is well understood by those skilled in the art and need not 5 be discussed further) 140. In regard to the namespace mapping memory 140 which provides a base address into the data dictionary 150 through register 152, a default address is provided from register 142. 10 Considering the remainder of Figure 1 at a very high level of abstraction, adder 170, transition control word (TCW) register 180, stack 190, adder 130 and state table 160 form a loop, generally indicated by arrow A which allows the state table to 15 advance from one state to another. Stack 190 is basically for the purpose of interchanging order of tokens as they are considered in order to accommodate evaluation of nested tokens and to determine if the associations or relationships 20 between parent and child elements is correct and well-constructed. Control of the stack is derived from a combination of information from the state table 160 and the data dictionary 150 which is derived in parallel based on the current token. 25 Therefore, stack 190 may be considered as accommodating particular features (e.g. aggregates) of XMLTM syntax and further discussion deferred until the detailed discussion below. Thus, the gross function of loop A is to derive 30 information from the state tables including a next state, add further data at adder 170, derive data, stack commands, interrupts and control signals for developing the final tree structured data object (TSDO) from the combined signals in the TCW register WO 2004/040447 PCT/US2003/031315 10 180 and add the next state and/or the base address in registers 192 and 194, respectively to the next token. The extraction of a control signal for providing an addition of a node to the TSDO 5 corresponds to a validation of the current token and a detected error will be represented by the issuance of an interrupt. The TCW is basically a combination of control flags and state transition controls from the state table 160 and data dictionary 150 with 10 certain update and interrupt and stack rules applied. The TCW register thus functions to merge and redirect control signals and data retrieved from among the contents of the state table 160 and the 15 data dictionary 150 which represents the permissible syntax of tokens such that the effect of progress through the state table is controlled in a manner to detect errors and, while no error has yet been detected, to properly construct the TSDO 300 with 20 data buffered at element and attribute buffer 200 in accordance with base and limit addresses supplied from registers 302, 304 respectively. This architecture supports standard and established types of document definitions being used as a data 25 dictionary by virtue of accommodation by the state table contents which can be arranged at will to do so. The accelerator processing unit 100 is responsible for orchestrating the operations of the invention which will be described below and to 30 construct the TSDO. A host processor 400 which interfaces with the accelerator processing unit is also provided and used to control initiation of operation of the hardware accelerator in accordance with the WO 2004/040447 PCT/US2003/031315 11 invention. It will be appreciated from the following that the role of the host processor 400 in the validation parsing process is reduced, by virtue of the hardware accelerator of the invention, 5 operations requiring only simple memory accesses and to provide interrupt servicing. In essence, substantially all validation processing overhead corresponding to the following of document syntax and element nesting and aggregate elements is 10 removed to the validation parsing accelerator and the processor operations are limited to simple responses to processing calls, as needed, from the hardware accelerator 100. A support processor can also be provided to handle some or all of the 15 processing calls from the hardware accelerator 100. With the above overview as background, it will be helpful to an understanding of the hardware accelerated validating parser of the invention to discuss an exemplary TSDO 300 which is the goal of 20 the validation parsing process performed by the invention with reference to Figure 1A which illustrates formation of an exemplary TSDO. The TSDO is preferably constructed in memory as a doubly linked list data structure having seven elements 25 (e.g. sibling element, child element, attribute list, name length, name pointer, value length and value pointer) per member/node as illustrated in the TSDO member layout. The eight rows of elements depicted, each corresponding to the TSDO member 30 layout, thus correspond to eight individual members of the TSDO and are offset horizontally to indicate sibling and parent/child relationships. To form a doubly linked list, several elements each contain two pointers p, n, to the previous and WO 2004/040447 PCT/US2003/031315 12 next member containing the previous and next element of the specified or same type. Thus a "next sibling element pointer" points to the next member equally indented with the current member. Similarly, 5 pointers are provided to and from attribute list elements and the attributes of members. The "previous child element" points to the parent member. As shown in the third through fifth rows and second, sixth and seventh rows, previous and 10 next pointers form chains among sibling members. The remaining elements are lengths and locations of actual data. From this information five controls are preferably provided in correspondence with a current member/node (e.g. the parent node, the 15 current element node, the current attribute node, the element parent and the first attribute), as illustrated. These controls basically track whether the current member is an element or an attribute and the nodes on which they exist, the first attribute 20 of the attribute list of an element, the immediate parent member and the root node. Following these controls allows traversing of the tree to locate any desired information while the nature of each piece of information is fully and unambiguously defined in 25 the structure of the TSDO. Similarly, it may be helpful in understanding the invention to review the characteristics of the data files operated upon. In the exemplary case of
XML
TM
, the elements and data will be embodied in a 30 file which is essentially text but following rules which can be freely structured for different classes of documents. The rules embodied in the text document are, in effect, summarized in a file called "document model" which is used to validate the text WO 2004/040447 PCT/US2003/031315 13 document and which may be considered as separate from the text file although it need not be. The rules may be freely defined by a developer but some standardized sets of rules exist and which are often 5 utilized as a matter of convenience. The file defining the rules followed by an XML TM document or document in any other interoperable language, at the current time, is referred to as a document model which generally follows one of 10 several forms although others are currently under development. A document model defines the elements which can appear within the document along with attributes that can be associated with a given element and also defines structural information 15 about the document such as child-parent relationships of elements, the sequence in which the child elements can appear and the number of child elements as well as whether an element is empty or can include text as well as default values for 20 attributes. Document type definitions (DTDs) are a well-known example of a description of XMLTM document models. The DTD language was developed specifically for defining validation rules for SGML T M documents. As 25 alluded to above, XML TM is a simplified sub-set of
SGML
TM and DTDs can also be used to define XMLT M validation rules. It should be recognized, however, that since the information required for validation of a particular document or class of documents must 30 be the same regardless of the form in which it is transmitted or utilized, conversion between types of expressions of the validation information (e.g. DTDs and XML TM schema) should, in theory, be substantially trivial and discussion in terms of DTDs should be WO 2004/040447 PCT/US2003/031315 14 equally applicable to any other form of the same information. By the same token, details of DTD syntax, which is very complex with heavy reliance on typographical symbols, is not of importance to the 5 principles of the invention and need not be discussed in detail. It should also be understood that XML T M documents (and documents in other languages supporting platform independence and 10 interoperability) principally provide a data structure and use of that data structure requires the ability to programmatically traverse the data structure to selectively access the data. A software module capable of reading XML m documents 15 and providing access to their content and structure is referred to as an XMLTM processor or XML API which may also be freely implemented by developers although it is the common and recommended practice to use accepted, commercially available and industry 20 standard APIs generally as a matter of being able to run under any compliant implementation of the same API. There are currently two principal API specifications that may be currently regarded as 25 industry standards: the Document Object Model (DOM) and the Simple API for XML TM (SAX). The invention will be described hereinafter with reference to the DOM since it is more generalized and those skilled in the art will be enabled thereby to practice the 30 invention using SAX.
-
' The DOM is based on an in memory tree representation of the XMLTM document. When an XMLTM document is loaded into a processor, the processor must build an in-memory tree structure which properly represents the document.
WO 2004/040447 PCT/US2003/031315 15 (Conversely, validation is essentially the construction of the tree structure which follows a properly constructed document.) The DOM also defines the programmatic interface (including the 5 names of the methods and properties) that should be used to programmatically traverse an XMLTM tree and manipulate its elements, values and attributes. In other words, the TSDO data structure developed in the course of validation supports the DOM APIs or 10 other similar APIs and implementations allowing use of the content of the document. With the foregoing as background, it can be readily understood that processing for validation parsing of an XMLTM or other document in a language 15 supporting interoperability using software on a general purpose computer can be extremely processor intensive and is slowed by the need for many memory accesses for multiple comparisons in regard to the content, structure and syntax specified for each 20 element of a DTD or the like. The number of elements in a DTD or the like is theoretically unlimited and can run into the thousands in relatively simple data structures while the number of attributes child elements and sibling elements 25 may be as large as necessary and the data document may easily contain millions of instances of any given element or attribute. In other words, the very generality which must be accommodated in software on a general purpose processor imposes 30 major processing complexities and burdens. In comparison, it will be seen from the following discussion that the hardware accelerated validation parser in accordance with the invention handles data in a relatively simple and consistent pipelined WO 2004/040447 PCT/US2003/031315 16 manner which can be performed at very high speed with a relatively small amount of hardware since the comparisons and the rules with which the comparisons are performed are embodied in the DTD embodied in 5 the data dictionary and the signals present in the state table entries which can be rapidly merged and redirected to control parallel operations of the processor concurrent with the rapid sequential evaluation of tokens in loop A of Figure 1. 10 Referring now to Figure 2, The logical layout of the state table 160 is schematically shown. The state tables are built in accordance with a particular DTD or the like and accommodates all permissible elements. It should also be understood 15 that the token effectively contains the next state since the next state is specified in respective state table entries (as shown in Figure 3 and discussed below) which are, in part, indexed by the sixteen bit token values. As depicted in Figure 1, 20 the value in the token buffer 120 (or a portion of the value) is combined at adder 130 with the state table base address and the next state offset address to access an entry in the state table. Specifically, it is preferred to provide the 25 state table in sections indexed by the state table base address to reduce high speed storage requirements and then to index a column of the state table section using the token (which can be optimized through use of a pallette mechanism) and 30 to index rows by the next state offset. In such a case, the three portions of the address can be simply concatenated to form the full address as can be done, for example, by simply loading different portions of a register from the respective address WO 2004/040447 PCT/US2003/031315 17 portion sources. The preferred format of the state table entries is illustrated in Figure 3. Each state table entry is preferably of sixty-four bits in length and 5 divided into two thirty-two bit words. Of course, other formats could be used as will be apparent to those skilled in the art. The lower address word is, in turn, divided into a sixteen bit token value and two eight bit 10 flag fields for the token flags and the control flags, respectively. (The tokens are preferably defined in a manner consistent with a hardware parser accelerator described in concurrently filed U. S. Provisional Patent Application 60/ ,_ 15 (Attorney's docket No FS-00766/02890051PR), hereby fully incorporated by reference and their form is otherwise not of particular importance to the practice of the invention in accordance with its basic principles. It should, however, be noted in 20 this regard that the sixteen-bit token value field is somewhat redundant for the present invention since the token value is already being used for indexing the state table columns and thus could be designated as a reserved field.) The token flags 25 are principally provided to track nesting, whether or not a given element is an aggregate, and the type of element represented by the token. Individual flags represented by each of the eight bits of the field are preferably: Increment nesting, element is 30 an aggregate, new element name, element value, attribute name, attribute value, end of element and decrement nesting, respectively. Similarly, the individual flags represented by individual bits of the control flag field are preferably: set end WO 2004/040447 PCT/US2003/031315 18 interrupt to host/main processor, set special interrupt to host/main processor, (Reserved), stop state table engine processing (these control flags are copied into the TCW as shown in Figures 9 and 5 10), save element or attribute name, save element or attribute value, character palette skip enable which is largely redundant but included to correspond to the hardware processor accelerator described in the above-incorporated application and could be a 10 reserved field here), and end current token. This data from the state table is merged with data from the data dictionary (corresponding to a DTD, XML TM schema or the like) at adder 170, preferably as a concatenation thereof and portions 15 of the combined result are provided to the element and attribute buffer; the preferred logical layout of which is illustrated schematically in Figure 4. The preferred format of the data dictionary entry is illustrated in Figure 5. 20 The data dictionary is preferably structured as a hash table; the hash key being derived at 125 from the token. The preferred format of the data dictionary entry is one hundred twenty-eight bits in length. The entries are derived from the DTD, XML' M 25 schema or the like describing the rules which are (to be) followed by the data document in XML TM or other language supporting interoperability. (An external component will translate the textual information within a DTD, XML TM schema or the like 30 into the data dictionary format, as will be understood by those skilled in the art. The actual mechanics to perform the translation thus need not be further discussed.) Sixteen bits hold a token value corresponding to the current token from WO 2004/040447 PCT/US2003/031315 19 register 120 and are used to compare to the token value information derived from the state table as an internal check of the proper operation of validation parser, particularly for synchronism between the 5 state table and the data dictionary. (That is, this comparison is not necessary in normal operation but may be valuable for testing or debugging.) Four bits are provided for the stack command flags; of which three are used (e.g. for push, pop and pass 10 through, respectively) and one reserved. The stack command flags indicate, for example, nesting and aggregation of elements required by a given element. Four further bits completing a byte are also reserved. Eight bits are provided for type flags. 15 These bits are used to identify the data type (e.g. Boolean, binary, decimal, etc.) associated with the element. With eight bits, 256 different data types can be identified using the type flags field. It should be noted that the type flags field is not 20 necessary to the operation of the invention in accordance with its basic principle but allows for upgrading to allow validation of value to match against the element data type. These fields are followed by three thirty-two bit words providing the 25 state table base address, and two pointers to the data pattern and range reference and attribute rule reference, respectively. Of the above fields, the stack command flags, the type flags and the state table base address associated with the current token 30 are directed to the TCW register 180 while the remainder are used for comparisons with the token and/or the associated test of the (e.g. XML T M ) document, preferably in special purpose logic circuits which may be free-running and which respond WO 2004/040447 PCT/US2003/031315 20 very quickly. The preferred logical layout of the transition control word (TCW) and the register 180 provided to buffer it is illustrated in Figure 6. Use of a 5 buffer register is, in theory, not necessary but is considered desirable and thus preferable as a simple and inexpensive expedient to assure synchronism as data and control signals are redirected, as alluded to above. It is important to an understanding of 10 the invention to observe the sources of signals applied to the TCW and the respective portions of the validating parser architecture of Figure 1 to which they are directed. Details of the source/sink for each field is shown in Figures 8 - 10. 15 The preferred logical layout of the TCW as shown in Figure 6 comprises three thirty-two bit words including the state table base address received from the data dictionary and forwarded to register 194 and the next state offset received from 20 the state table and forwarded to register 192. The remaining thirty-two bits include a four bit stack command field received from the data dictionary and used to control operation of the stack 190, a four bit aggregate status flag field (of which only two 25 bits are preferably used to indicate whether the current token and/or the previous token are aggregates since aggregates can include elements at different levels of a tree structure), a eight-bit type flag field received from the data dictionary 30 (the derivation being shown in Figure 8 and their usage shown in Figure 10, as noted above), and two eight-bit fields for the token flags and control flags received from the state table and used to control EAB and TSDO operations as shown in Figure WO 2004/040447 PCT/US2003/031315 21 10. The data dictionary token value field is not carried over from either the data dictionary or the state table since (assuming these values compare favorably) the token value is readily available in 5 the token buffer. It should be noted that the complete definition of a token is shown in Figure 3A. The hash value of a token text string associated with certain tokens (with token flags set to new element names) is used 10 to index the data dictionary. The token value is a special numeric value assigned to the token and is used to look up the columns of the state table. Sometimes it is a generic value indicating that the token is representing a character string literal or 15 an integer value. Other times it is an encoded number of an element name or a tag name. Referring again to Figure 4, the element and attribute buffer (EAB) will now be discussed in greater detail. It will be appreciated by those 20 skilled in the art that the above described portions of the architecture will have made data available from which all fields of the EAB can be filled by an operation essentially comprising a memory access and a comparison which is simple, straightforward and 25 rapidly executed by the accelerator processing unit while syntax, nesting and aggregate tracking and operations are handled entirely by the finite state machine and the associated accelerator registers in accordance with the invention. 30 Specifically, a given parsed element can be any one of an element type, and attribute type or a value type; each of which must be treated differently in the TSDO 300. The EAB collects and holds structure-specifying pointers to point to WO 2004/040447 PCT/US2003/031315 22 attributes or data around a specific node (not yet placed in the TSDO) to develop, when complete, the doubly linked structure TSDO as alluded to above with reference to Figure 1A. With reference to 5 specific fields of the EAB, element nesting starting and ending counts may be counted/accumulated directly from the token flags (e.g. first and eighth bits) discussed above in connection with Figure 3 while the name base addresses and lengths for 10 elements and attributes and their values corresponding to each token are readily available from the token buffer 120. The parent/child and aggregate relationship and type and control information for the current node of the TSDO 300 is 15 directly available from the TCW as illustrated in Figure 6, allowing a new node to be added to the TSDO as each element/token of the tokenized document is validated. Referring now to Figure 7, the overall 20 operation and function of the hardware validation parsing accelerator 100 in accordance with the invention will be summarized. The operation of the hardware accelerator is started by initialization through loading the state table 160 and data 25 dictionary 150 with data (705, 710) corresponding to the document to be parsed and validated in a format such as the preferred format discussed above. The tokenized document to be validated is then loaded (715) into memory 110, the stack control registers 30 and state table base address are initialized (720, 725) and the next state offset is set to the initial state (730). Processing of the tokenized document begins with extracting (735) the first (or next) token into WO 2004/040447 PCT/US2003/031315 23 the token buffer 120. The token is hashed into a hash key which is used for data dictionary look up operations. A look-up operation 740 is then performed in memory 140 to update the data 5 dictionary base address with which a look-up operation 745 can be performed in the data dictionary 150 corresponding to the data dictionary base address. The state table may be concurrently accessed 750 using the new token and current 10 contents of the state table registers 192 and 194 provided through adder 130. Next, through adder 170, the TCW register is updated 755 with the data derived from the data dictionary 150 and the state table 160 in accordance with rules which will be 15 discussed in detail below in connection with Figures 8 and 9. The EAB 200 is then updated 760 according to rules based on the flag settings in the TCW. An interrupt can concurrently be sent to host/main processor if the interrupt flag is set in the TCW in 20 accordance with a control flag contained the state table entry. If an interrupt is not issued, the information gathered in the EAB is added 765 to the TSDO in accordance with rules based on token and control flag settings, checked at 770 for issuing an 25 interrupt, in the TCW which are also derived from the accessed state table entry. Concurrently, a push, pop or pass-through operation 775 is performed in stack 190 to support multi-level aggregates (e.g. XMLTM elements which are made up of other XMLTM 30 elements). Unless data is pushed onto the stack, new base address and next state offset data will be output from the stack and registers 192 and 194 are updated 780. The hardware accelerator has now, by the above processes, validated a token and added a WO 2004/040447 PCT/US2003/031315 24 node to the TSDO and is now reset (for proper evaluation of syntax, nesting and aggregate elements at registers 192, 194) of the next token through repetition of the above processes. 5 The TCW update rules are quite simple and are illustrated in Figure,8. First, the token flags, control flags and next state offset fields are copied 805 to the TCW register/buffer 180 from the state table entry. Then, within the aggregate 10 status flags field, the "current element is an aggregate" flag is copied 810 into the "previous element is an aggregate" flag. If (815) the "new element name" flag is set in the token flags field, the "stack command", "type flags" and "state table 15 base address" fields are copied 820 from the data dictionary output into the TCW and, if (825) the "element is an aggregate" in the token flags field is set, the "current element is an aggregate" flag bit in the "aggregate status flags" field is set 20 830. Otherwise, the "current element is an aggregate" flag is reset 835. If the "new element name" flag in the token flags field is not set, and the "end of an element" flag bit and the "element is an aggregate" flag bit in the token flags field are 25 set, as determined at 840, the stack command field "pop" flag bit is set and the type flags and state table base address fields are cleared 845, as shown in Figure 9. Otherwise, the stack command field "pass-through" flag bit is set and the type flags 30 and state table base address fields are cleared 850. As illustrated in Figure 9, for issuance of interrupts, the control flag bits derived directly from the state machine output for entry corresponding to the current token are simply WO 2004/040447 PCT/US2003/031315 25 followed (as indicated by dashed arrows) or tested in parallel to provide an end interrupt or special interrupt to the host/main processor as indicated at 910 or 920. Similarly, if the stack command 5 (derived directly from the data dictionary 150 output) is "push", the state table base address and the next state offset are pushed onto the stack 190 and the state table base address register 192 and next state offset register 194 are updated from the 10 corresponding TCW fields as indicated at 930. If the stack command flag corresponds to a"pop" command, the state table base address and next state offset values are popped off of the stack and used to update registers 192, 194 respectively, as 15 indicated at 940. If the "pass-through" stack command field flag is set, registers 192, 194 are updated from the respective TCW fields with no operation being performed on the stack 190, as indicated at 950. 20 Similarly, the operations in the EAB and TSDO are also preferably controlled by flags in the TCW as illustrated in Figure 10. If the "end of an element" token flag is set and the "element is an aggregate" token flag is also set the TSDO operation 25 to complete a child element, as will be discussed below, is triggered, as shown at 1010. Otherwise, the "save element of attribute name" flag is used in operations 1020 and 1030 (and will be assumed to be set in the following discussion) in combination with 30 other flags to trigger appropriate operations based on the element type as may be reflected in those flags. If (1021) the "new element name" flag is additionally set the element name base address and element name length fields in the EAB are updated WO 2004/040447 PCT/US2003/031315 26 1022 from the token buffer 120 and the element value base address and length fields are cleared 1023 in the EAB. If (1024) the "attribute name" flag is set, the attribute base address and length fields 5 are reset 1025 in the EAB from the token buffer 120 and the attribute value base address and length fields are cleared 1026 in the EAB. If (1031) the "element value" flag is set, the element value base address and length fields are updated 1032, 1033 10 from the token buffer. If (1034) the "attribute value" flag is set, the attribute value base address and length fields are updated 1035, 1036 from the token buffer 120. In summary, chosen fields in EAB 200 are updated and cleared based on element type. 15 If the "save element or attribute name and the "new element name" are both set, as described above, and the "previous element is an aggregate" flag in the aggregate status flags field of the TCW is also set, the additional operation of starting the "add 20 child element" operation, as will be described below, is triggered and the EAB "element nesting start count" field is incremented. Otherwise, if the "previous element is an aggregate" flag is not set, the "add sibling element" operation in the TSDO 25 is triggered. If, on the other hand, the combination of "save element or attribute" and "element value" flags are set, the "update element value" operation, described below, is triggered in the TSDO. Similarly, the 30 combination of "save element or attribute" and "attribute value" flags trigger the TSDO to start the "add attribute" operation. The five TSDO operations alluded to above may be performed autonomously under control of the WO 2004/040447 PCT/US2003/031315 27 accelerator processing unit 400 once initiated, as described above, by the hardware validation parser accelerator in accordance with the invention. Such processing may be performed concurrently with the 5 validation parsing operation, further supporting the acceleration of processing by the invention. All of these operations are very simple, short and straightforward and thus may be executed quickly with little, if any, host processor burden. 10 The "add sibling element" operation illustrated in Figure 11A comprises allocation of a new TSDO entry, setting the "next" pointer of the current node to the newly allocated entry address, setting the "previous" pointer of the new entry to the 15 current node address, copying the EAB element name base address and length fields to the corresponding fields (see Figure 1A) in the new entry, and setting the "current element node" and the "element first attribute" of the TSDO controls (Figure 3) to the 20 new entry and null, respectively. The operation of "add child element" illustrated in Figure 11B is identical to the "add sibling element" operation except for performing the additional step 1110 of incrementing the EAB "nesting level start count" 25 field. The "complete child element" operation illustrated in Figure 11C is performed by traversing the TSDO structure formed to that point starting with the entry pointed to by "current element node" 30 TSDO control field and using the sibling element "p" pointer to move up the tree hierarchy until a sibling element "p" pointer becomes null. Then copy the pointer in the "child entry" "p" pointer of that TSDO entry to the "current element node" TSDO WO 2004/040447 PCT/US2003/031315 28 control field. Then the "nesting entry start count" TSDO control field is copied to the "nesting level end count" TSDO control field and the "nesting entry start count" TSDO control field is decremented. The 5 "update element value" TSDO operation illustrated in Figure 11D involves only the copying of the element value base address and length EAB fields to the "value" pointer" and "value length" fields of the TSDO entry pointed to by the "current element node" 10 TSDO control field. The "add attribute" TSDO operation begins with allocation of a new TSDO entry and copying the attribute name base address and length and attribute value base address and length pointers to the new 15 entry. Then, if (1120) the "element first attribute" TSDO control register is null, the "current attribute node" TSDO control is set to point to the new TSDO entry and the "n" and "p" pointers of the current node and the new entry are 20 linked as discussed above while "element first attribute" of the current node is set to the new entry (e.g. before the "p" pointer is added to the new entry). If the element first attribute is not null, the "n" and "p" pointers of the current node 25 and the new entry are linked and the "current attribute node" TSDO control is set to the new TSDO entry. In view of the foregoing, it is seen that the invention provides an apparatus and method to 30 provide extremely rapid validation parsing of an XML or other language document supporting interoperability while removing such processing operations and complex supporting overhead from a host processor; resulting in substantial WO 2004/040447 PCT/US2003/031315 29 acceleration of the validation parsing process. The acceleration is particularly supported by the potentially and preferably autonomous operation of forming a TSDO in parallel with the parsing for 5 validation and parallel retrieval of data dictionary and state table information. The hardware required to provide such acceleration is very simple and very limited in quantity and, hence, inexpensive and highly cost-effective. 10 While the invention has been described in terms of a single preferred embodiment, those skilled in the art will recognize that the invention can be practiced with modification within the spirit and scope of the appended claims.

Claims (11)

CLAIMSHaving thus described my invention, what I claim as new and desire to secure by Letters Patent is as follows:
1. A hardware accelerated validation parser for a tokenized text document in a computer language supporting platform independence and interoperability, said validation parser comprising, means for retrieving data from both a data dictionary and a state table in accordance with a token, means for merging said data from said state table and said data dictionary to form a transition control word, means for merging part of said transition control word with another token to retrieve further data from said state table, and means for forming a tree structured data object corresponding to said tokenized text document under control of part of said transition control word.
2. The hardware accelerated validation parser as recited in claim 1, further including means for controlling operation of a stack with said transition control word to derive the next transition state in supporting nested data structures defined in a supported language.
3. The hardware accelerated validation parser as recited in claim 2, further including means for forming a data construct from the tokenized text document.
4. The hardware accelerated validation parser as recited in claim 3, wherein said means for forming a data construct includes an element and attribute buffer.
5. The hardware accelerated validation parser as recited in claim 1, further including means for forming a data construct from the tokenized text document.
6. The hardware accelerated validation parser as recited in claim 5, wherein said means for forming a data construct includes an element and attribute buffer.
7. A method of accelerating validation parsing of a tokenized file, said method comprising steps of retrieving data from both a data dictionary and a state table in accordance with a token, merging said data from said state table and said data dictionary to form a transition control word, and merging part of said transition control word with another token to retrieve further data from said state table.
8. The method as recited in claim 7, including a further step of operating a stack with said transition control word to derive the next transition state.
9. The method as recited in claim 7, including a further step of verifying that an input stream conforms to one of a set of valid input sequences.
10. The method as recited in claim 9, including a further step of producing a notification when an input stream deviates from a set of valid, allowable input sequences .
11. The method as recited in claim 7, including a further step of producing a notification when an input stream deviates from a set of valid, allowable input sequences .
AU2003277250A 2002-10-29 2003-10-03 Hardware accelerated validating parser Abandoned AU2003277250A1 (en)

Applications Claiming Priority (9)

Application Number Priority Date Filing Date Title
US42177502P 2002-10-29 2002-10-29
US42177302P 2002-10-29 2002-10-29
US42177402P 2002-10-29 2002-10-29
US60/421,773 2002-10-29
US60/421,774 2002-10-29
US60/421,775 2002-10-29
US10/334,086 2002-12-31
US10/334,086 US7080094B2 (en) 2002-10-29 2002-12-31 Hardware accelerated validating parser
PCT/US2003/031315 WO2004040447A2 (en) 2002-10-29 2003-10-03 Hardware accelerated validating parser

Publications (1)

Publication Number Publication Date
AU2003277250A1 true AU2003277250A1 (en) 2004-05-25

Family

ID=32234360

Family Applications (1)

Application Number Title Priority Date Filing Date
AU2003277250A Abandoned AU2003277250A1 (en) 2002-10-29 2003-10-03 Hardware accelerated validating parser

Country Status (6)

Country Link
EP (1) EP1579321A2 (en)
JP (1) JP2006505044A (en)
KR (1) KR20050072777A (en)
AU (1) AU2003277250A1 (en)
CA (1) CA2504491A1 (en)
WO (1) WO2004040447A2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050138542A1 (en) * 2003-12-18 2005-06-23 Roe Bryan Y. Efficient small footprint XML parsing
US8117347B2 (en) 2008-02-14 2012-02-14 International Business Machines Corporation Providing indirect data addressing for a control block at a channel subsystem of an I/O processing system
US9411853B1 (en) 2012-08-03 2016-08-09 Healthstudio, LLC In-memory aggregation system and method of multidimensional data processing for enhancing speed and scalability

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5995963A (en) * 1996-06-27 1999-11-30 Fujitsu Limited Apparatus and method of multi-string matching based on sparse state transition list
JP3368883B2 (en) * 2000-02-04 2003-01-20 インターナショナル・ビジネス・マシーンズ・コーポレーション Data compression device, database system, data communication system, data compression method, storage medium, and program transmission device
AUPQ849500A0 (en) * 2000-06-30 2000-07-27 Canon Kabushiki Kaisha Hash compact xml parser
US20020099734A1 (en) * 2000-11-29 2002-07-25 Philips Electronics North America Corp. Scalable parser for extensible mark-up language

Also Published As

Publication number Publication date
CA2504491A1 (en) 2004-05-13
WO2004040447A2 (en) 2004-05-13
JP2006505044A (en) 2006-02-09
WO2004040447A3 (en) 2004-09-30
KR20050072777A (en) 2005-07-12
EP1579321A2 (en) 2005-09-28

Similar Documents

Publication Publication Date Title
US7080094B2 (en) Hardware accelerated validating parser
US7458022B2 (en) Hardware/software partition for high performance structured data transformation
US7437666B2 (en) Expression grouping and evaluation
US7328403B2 (en) Device for structured data transformation
Evert The CQP query language tutorial
US6859810B2 (en) Declarative specification and engine for non-isomorphic data mapping
US20040172234A1 (en) Hardware accelerator personality compiler
WO2006116649A2 (en) Parser for structured document
WO2004017166A2 (en) Xml streaming transformer
US7752212B2 (en) Orthogonal Integration of de-serialization into an interpretive validating XML parser
US20080184103A1 (en) Generation of Application Specific XML Parsers Using Jar Files with Package Paths that Match the SML XPaths
US7143101B2 (en) Method and apparatus for self-describing externally defined data structures
AU2003277250A1 (en) Hardware accelerated validating parser
Cameron Rex: Xml shallow parsing with regular expressions
Møller Document Structure Description 2.0
US20080313620A1 (en) System and method for saving and restoring a self-describing data structure in various formats
CN100380322C (en) Hardware accelerated validating parser
JP2006505043A (en) Hardware parser accelerator
Zhang Efficient XML stream processing and searching
Neumüller Compression of XML data
Weiss et al. ScmToCpp: A configurable, intelligent back end for SuchThat
Bernstein et al. 5.4. CIFtbx: Fortran tools for manipulating CIFs
Libes The NIST EXPRESS Toolkit
Team et al. In the name of Allah, the Merciful, the Compassionate… Before indulging into the technical details of our project, we would like to start by thanking our dear supervisor, Prof. Dr. Mohammad Saeed Ghoneimy, for his continuous support, endless trust, and encouraging appreciation of our work. He indeed was a very important factor in the success of this project, as he smoothed away
Van Dijk An Estelle compiler

Legal Events

Date Code Title Description
MK5 Application lapsed section 142(2)(e) - patent request and compl. specification not accepted