WO2010039348A2 - Modular forest automata - Google Patents

Modular forest automata Download PDF

Info

Publication number
WO2010039348A2
WO2010039348A2 PCT/US2009/054457 US2009054457W WO2010039348A2 WO 2010039348 A2 WO2010039348 A2 WO 2010039348A2 US 2009054457 W US2009054457 W US 2009054457W WO 2010039348 A2 WO2010039348 A2 WO 2010039348A2
Authority
WO
WIPO (PCT)
Prior art keywords
labeled
nest
pattern
computer
determining
Prior art date
Application number
PCT/US2009/054457
Other languages
French (fr)
Other versions
WO2010039348A3 (en
Inventor
Giovanni M. Della-Libera
Steven E . Lucco
Original Assignee
Microsoft Corporation
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
Application filed by Microsoft Corporation filed Critical Microsoft Corporation
Priority to JP2011530081A priority Critical patent/JP5530449B2/en
Priority to EP09818172A priority patent/EP2332068A4/en
Priority to CN200980139411.6A priority patent/CN102165434B/en
Publication of WO2010039348A2 publication Critical patent/WO2010039348A2/en
Publication of WO2010039348A3 publication Critical patent/WO2010039348A3/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4498Finite state machines

Definitions

  • the patterns in this example serve two purposes. First, they distinguish among input cases. Second, they enable concise value deconstruction through the use of pattern variables and type inference.
  • Structural type systems such as XML schema languages, define categories of values. Programming languages often use structural type systems to statically check program safety properties. SQL databases also use a type system that is primarily focused on structure. Tables that result from joins, for example, contain tuples that can be described as having an anonymous structural type. Database management systems require that a variety of programs can interpret the data stored in the system. Structural type systems help database management systems meet this requirement.
  • Distributed systems also induce a requirement for structural types. Due to latency, messages exchanged among distributed program components are often larger and more complex than method parameters exchanged among objects.
  • PFAs pushdown forest automata
  • Embodiments of the present invention relate to modular forest automata (MFA).
  • Modular forest automata described herein, can be used to describe and analyze regular tree patterns and modular forest transducers (MFTs) can be created that can concisely express the transformation of labeled directed graphs.
  • Graph transformation is a basic ingredient in the implementation of logics, process models, and programming languages.
  • Implementations of modular forest automata may be used to support high-performance, strongly typed graph transformation.
  • Modular forest automata are a mechanism for defining, reorganizing, and transforming collections of partially-ordered, finite, unranked trees.
  • MFAs support the analysis and composition of MFA hierarchies.
  • MFAs provide a unified treatment of ordered and unordered tree patterns.
  • Embodiments described herein include methods, systems, and computer program products for analyzing regular tree patterns. Particular embodiments allow for data being received which can be determined or rewritten as modules (machines) describing both sequences and sets. A union may be created from the modules which are determined from the received data. Determined modules and unions of modules may comprise labeled acceptance states. From the labeled acceptance states, sub-type relationships may be determined for the modules. [0013] Other embodiments described herein also include methods, systems, and computer program products for expressing a transformation of regular tree patterns. A regular tree pattern may be received and particular instance data may be received. A transducer may be compiled from the received regular tree pattern. Transducer transitions may be augmented with instructions which correspond to a desired transformation.
  • Figure 1 illustrates a computing environment in which embodiments of the principles of the present invention may operate;
  • Figure 2 illustrates a permutation modular forest automata for Nest contents of a pattern;
  • Figure 3 illustrates a determinized translation of a particular pattern Expr
  • Figure 4 illustrates an optimized modular forest automata for nest contents of a pattern Pond
  • Figure 5 illustrates a graphical representation of the various sub-types determined in sub-type analysis
  • a sub-type relationship may be one of equivalent, sub-type, super-type, disjoint, and intersecting. If two modules, Mi and M 2 , have the same acceptance states, then they are equivalent. If Mi contains all the acceptance states of M 2 but not vice-versa, then Mi is a super-type of M 2 and M 2 is a sub-type of Mi. If Mi and M 2 have no acceptance states in common, the Mi and M 2 are disjoint. If Mi and M 2 share some acceptance states but each of Mi and M 2 have acceptance state not shared by the other, then they are intersecting.
  • the sub-type relationships are discussed in more detail below and in conjunction with Fig. 5.
  • Embodiments also include determining a root level machine (module) which comprises at least one transition to a labeled nest.
  • a labeled nest as described more fully herein, may have the form of Label[ — ] or Label ⁇ — ⁇ .
  • a module may be created corresponding to the labeled nest.
  • a continuation state which corresponds to a return from the labeled nest may be placed upon a stack. After placing the continuation state onto the stack, actions may be performed which correspond to the labeled nest. When an acceptance state is reached for the labeled nest, the continuation state is popped from the stack and processing is resumed for the root level machine.
  • Embodiments described herein may be employed wherein received data corresponds to XML schema. Such data may be analyzed by the techniques described herein to determine if the XML schema are equivalent, or have some any of the other sub-type relationships. [0041] The embodiments described herein may be employed to determine structural and logical relationships corresponding to the determined sub-type relationships and applied for purposes of optimization, efficiency, and data translation for data structures in programming languages, databases, objects, and the like. [0042] Embodiments described herein also include methods for expressing the transformation of a regular tree pattern.
  • Figure 9 illustrates a method 900 for expressing the transformation of a regular tree pattern. The method includes receiving first data 910 which corresponds to a regular tree pattern.
  • the method also includes receiving second data 920 corresponding to an actual instance.
  • data comprising a regular tree pattern may comprise an XML schema, may comprise a database schema, may comprise structural types for a programming language or object definitions.
  • Data corresponding to an actual instance may comprise data within a database, may comprise a serial data input stream, or may comprise data embodied within object-oriented objects or structural types defined within a programming language.
  • the method 900 includes compiling the regular tree pattern into a transducer. Compiling a tree pattern is described in more detail in later sections of this description. Once compiled, the transducer transitions are augmented 940 with instructions corresponding to a desired transformation. After the transitions have been augmented with instructions, it may then be determined 950 from the augmented transitions and from the data corresponding to an actual instance a correspondence between elements of the instance and elements of the regular tree pattern.
  • actions may be performed such as, for example, action: Root[A, B, C] ⁇ Root[A, C]. Once bindings are determined, the example action may be thought of as the "delete B" action.
  • the method 900 may be employed in an environment for variable binding. Such variable binding may determine a correspondence between structural types in a programming language, a database schema, an XML schema, or the like, and actual values which correspond to the variables defined within the types or schema.
  • the instructions of method 900 may also comprise matching conditions and may comprise semantic actions.
  • the instance data of method 900 may comprise XML schema instances, may comprise instances of data contained within a database according to a particular database schema, or may comprise data defined or stored in accordance with structural types defined within a programming language.
  • the method 900 may also include compiling query expressions and determining the result of the query expression corresponding to the regular tree pattern and the actual instance data.
  • queries may be data base queries such as SQL and may be authorization queries such as data access or the like.
  • queries may be data base queries such as SQL and may be authorization queries such as data access or the like.
  • Listing 1 describes a syntax that may be used for regular tree patterns.
  • Action is a parameter that refers to a language for semantic actions.
  • Name, Variable, and Label are parameters that each provide a set of symbols called an alphabet. As described herein, it may be assumed that variable, pattern name, and label symbols come from distinct alphabets. In addition to these symbols, patterns may refer to base symbols which may include nonpattern types or literal values.
  • Regular Tree Pattern Syntax [0052] Regular tree pattern definitions only allow recursive pattern references within the context of the nest operator (as described below). Such a restriction on regular tree grammars is employed to prevent regular tree grammars from inducing the full power of context-free string grammars.
  • ? denotes the minimum and maximum number of occurrences permitted for the Tree it modifies.
  • the maximum number of occurrences may be unbounded.
  • the operators *, +, and ? are interpreted as [0.. ⁇ ], [l.. ⁇ ], and [0..1] respectively.
  • A* is read as zero or more As (i.e., [0.. ⁇ ]); B+ is read as one or more Bs (i.e., [l..oo]); and C? is read as zero or one Cs (i.e., [0..I]).
  • This construct supports patterns that specify unranked tree nodes. An unranked tree node may have any number of children.
  • the nest operator L[Forest?] defines an ordered, unranked tree node with label L. Such ordered items are also referred to as sequences.
  • the nest operator L ⁇ Forest? ⁇ defines an unordered, unranked tree node with label L. Unordered items are also referred to as sets (or multisets).
  • multiset pattern to refer to patterns of the form L ⁇ c ⁇ because c matches zero or more multisets of tree nodes.
  • We use the term partially-ordered tree pattern to refer to tree patterns that may specify both ordered and unordered subtrees.
  • Partially-ordered tree patterns enable programmers to concisely express ideas that are tedious or impossible to express using strictly ordered or unordered tree patterns.
  • the multiset pattern with label par models a collection of processes executing in parallel.
  • Each node labeled choice models a process that will continue by choosing among a set of alternatives.
  • Each node labeled seq indicates a sequence of processes.
  • send[x] and receive[x] correspond to sending and receiving a message of type x.
  • the rule models an interaction among a pair of processes (bound to variables sender and receiver in the pattern).
  • the sender process sends a message of type x and the receiver process receives this message.
  • the collection of parallel processes contains the continuation of sender (CS), the continuation of receiver (CR) and the collection of processes that did not participate in the interaction (procs).
  • Multiset patterns offer more than conciseness. They also enable implementations and particular embodiments to use inherently unordered representations of input collections. Direct use of unordered representations, such as search trees or hash tables, enables transformation engines to avoid building separate indices for input collections.
  • an authorization logic implementation described below is evaluated that checks that an access request meets an authorization policy by matching the request against a database of assertions and a set of rules.
  • the authorization policy application may use a multiset pattern that works directly against an unordered representation of an assertions database.
  • a regular tree type system is arrived at which, as may be appreciated, is similar to a functional programming language for XML tree transformation.
  • Such a system may be employed to generate an algorithm for determining a sub-type relation over nested regular expressions.
  • Such an algorithm uses a top-down approach to compare pattern expressions.
  • the algorithm expands upon and extends previous theoretical work on regular tree expressions.
  • the project reports that it initially used determinization of bottom-up tree automata to decide inclusion, but found that this was not a scalable approach.
  • the determinization algorithm for bottom-up tree automata does not take into account left context when applying its subset construction.
  • the ambient calculus operator, n[] has a strong correspondence to the regular tree pattern operator Label ⁇ Forest? ⁇ . It may be demonstrated that the ambient calculus parallel composition operator may be interpreted as a tree composition operator that joins a pair of trees at their roots. It may be proposed that ambient logic may be used as a basis for describing and querying tree structures. Ambient logic is a temporal spatial logic for reasoning about processes. Unlike the regular tree grammar of Listing 1, ambient logic considers only unordered nests. In ambient logic, deciding a sub-type relation is equivalent to deciding implication. This is tractable for some variants of the logic.
  • a Modular forest automata (MFA) implementation is described herein that may successfully be imported and determine sub-type relations for instances of the W3C XML Schema Language.
  • An XSD complex type assigns a name to a structural formula.
  • Structural formulae in XSD are called content models.
  • Content models contain element declarations, an unordered nest pattern called an attribute inventory, and particle compositors. There are three compositors: all, choice and sequence.
  • the regular tree grammar union and concatenation constructors correspond to the choice and sequence compositors, respectively.
  • the all compositor corresponds to an unordered nest operator which is described herein. XSD places some restrictions on its use of the all compositor. For example, this may require that items within an all compositor have a finite multiplicity. [0066] XML element declarations are isomorphic to the ordered tree constructor, Label[Forest?], of regular tree grammars, with the operator name Label playing the role of the element qname.
  • Partially ordered regular tree patterns may be transformed into MFAs. Because the intersection and complementation methods include a determinization step, details of a method for determinization of non-deterministic MFA (NMFA) is provided first.
  • Construction procedures for building NMFAs from tree patterns differ from other known construction procedures. First, tree patterns include nest operators. Second, tree patterns may contain actions and variable bindings. A pattern compiler in a particular implementation can translate variable bindings to actions. Correspondingly, variable bindings are not treated specially.
  • Input to an MFA may be a well-formed forest of tree values.
  • a well-formed input forest ends with the end-of-forest symbol, "]".
  • the translation procedure adds to every generated MFA state s a return transition on ].
  • M 2 Mo U Mi of two NMFAs is computed using the known classic method which is augmented by making adjustments to tags and preprocessors. In the construction, it is assumed that M 0 has tags of length k 0 while Mi has tags of length Ic 1 . M 2 would then have tags of length k 0 + Ic 1 . When a state s of M 2 has a final state of M 0 , then a string of ki zeros is appended to its tag.
  • Nest operators may be translated whether they are ordered or un-ordered. Given a nest operator with label L and contents c, first create an NMFA for c, called M c , with start state s c . Then create an NMFA, called Mnest with start state s, final state f, and transitions (s, L, ⁇ ) ⁇ (s c , s) (call Mc) and (s, ⁇ , tagc) ⁇ (f, ⁇ ) (continue from call). Finally, incorporate the states of Mc into Mnest, assigning to each final state fc of Mc tag tagc and changing fc to a non-final state with a return transition (fc, ], s) —> (s; tagc).
  • the states of Mc become a module of Mnest.
  • Multiset patterns are first transformed to eliminate arbitrary occurrence constraints. Given a multiset pattern P specified as above, a pattern compiler may transform P to an equivalent unit multiset pattern P' as follows.
  • Figure 3 labels each node with its tag.
  • Figure 3 contains two modules, depicted 300 and 310, which are called Expr 300 and PlusNest 310.
  • Expr 300 has a tag length 2 because it matches a union.
  • PlusNest 310 has a tag length 1.
  • Module Expr 300 which includes the start state for the MFA, matches the Expr pattern by either matching a c or by calling PlusNest 310 and then continuing to the final state tagged 10 upon return of tag 1 from PlusNest.
  • PlusNest 310 matches the pattern fragment [Expr, Expr] by concatenating two inlined instances of the pattern Expr. These inline expansions of Expr yield recursive calls to PlusNest. Return transitions or paths that lead to non-final states are not shown.
  • step 2.c uses the CombineNests method to combine the call targets of nest transitions from state t.
  • step 4 updates the tags for each final state in the determinized MFA' s set of final states F'.
  • step 4 sets the tag for f to the bitwise OR over the tags of the
  • NMFA states that are members of f .
  • the determinization method uses as a subroutine the ⁇ -closure operator E(s).
  • E(s) is the set of states reachable from s by a path containing only ⁇ transitions.
  • Listing 6 omits the details related to handling wildcard transitions.
  • the move set for the wildcard transition is combined with the move set of each non- wildcard transition emanating from t.
  • a key idea is that the determinization procedure keeps track, through tags on final states, of whether M 0 and Mi may ever be accepted simultaneously and whether M 0 or Ml or both may ever be accepted independently of each other.
  • Table lxxxx can be used to map to a comparison outcome the set C of tag values present on final states in the determinized union of M 0 and M 1 .
  • Figure 5 is a graphical illustration of the possible sub-type relationships listed in Table 1.
  • Figure 5 depicts each of the equivalent 500 relationship; the sub-type 510 relationship; the super-type 520 relationship; the disjoint 530 relationship; and the intersecting 540 relationship.
  • Tags may be used to implement procedures for complementation, intersection, and difference of MFAs.
  • a similar construction may be used to compute Mo - M 1 . To do so the tag 01 is substituted for tag 11 in the above intersection construction. To compute Mi - Mo, the tag 10 is used in the construction.
  • One benefit of particular embodiments of the present invention is to enable a pattern compiler to place a semantic action on any NMFA transition.
  • a method is required for preserving the order of semantic actions during determinization. It is beneficial to preserve the property that, for all paths [Ir 1 , tr 2 , . . . , tr n ] of an NMFA M, Action (Ir 1 ) is executed before Action(tr,) if and only if i ⁇ j.
  • the paths of M are associated with the transitions of Determinize(M).
  • the start state of M' is considered to have an implicit incoming transition.
  • npathj path a , ntr, pathb
  • path a has the following properties.
  • path a is made entirely of ⁇ transitions whose beginning and ending states are in q ⁇
  • the first state of path a has no predecessor in qi.
  • the last state of path a is the beginning state of transition ntr.
  • path b is made entirely of ⁇ transitions whose beginning and ending states are in q 1+1 , and pathb begins with the ending state of ntr.
  • Figure 7 illustrates a technique for representing return transitions that simplifies the ordering of semantic actions. Return transitions may be viewed as local transitions on end-of-forest(]). These local transitions can then become placeholders for semantic actions.
  • the pattern compiler described herein makes use of this technique.
  • permutation MFAs may have a large number of transitions.
  • a pattern compiler can assign a partial order, called the tag order, to the tags of the corresponding element MFA.
  • the compiler can then remove from the permutation MFA paths that are out of order, anticipating that the runtime system will match an input forest using one of two strategies.
  • a runtime system can use can index over the input collection to extract items that will match required pattern elements.
  • the runtime system can use the element MFA to preprocess the input forest and then sort the result according to the element MFA' s tag order.
  • the Exec instruction pops the top collection from r's collection stack. For each frame in the popped collection, the Exec instruction executes the rewriting action associated with r. For each result, the Exec instruction executes the frame update instruction i which updates some variable target.x. In recursive cases, target may be the same rule as r.
  • the Push instruction pushes a new rule collection onto the rule collection stack for r.
  • the Par instruction executes a set of action blocks in parallel. For each action block in the set, the par instruction starts with the current input node. Each action block in the set must advance the input pointer the same amount.
  • the transformation engine does not always execute each member of a parallel block. Each parallel block member may be marked with a rule identifier. The transducer will only execute parallel block members that are marked with an identifier for a rule that the transducer is currently rewriting.
  • ImpliesConditionMet prove [ context ⁇ typedTerm[proofl :andy, a:any], typedTerm[proof2:any, implies[a:any, b:any]], restany* ⁇ , goal: any]
  • the engine uses the indexing and tag order sorting previously described herein to achieve a substantial throughput (measured in one instance as 23,000 claims per second). This has a possible benefit of preventing claims processing from being a rate-limiting step of an overall authorization service.
  • Another application is a process model-checker.
  • Such a model-checker may be applied to protocols ranging from simple alternating-bit protocols to a model of TCP (transmission control protocol).
  • the model-checker may check deadlock-freedom for such protocols.
  • the model-checker uses patterns, such as the interaction pattern of Listing 2, that produce many results. In such cases, the transducer may buffer several frames worth of variable bindings for each rewrite.
  • Another embodiment applies an application which imports, validates, and subtypes XML schemas. This embodiment imports XML schemas into partially-ordered tree patterns.
  • Such an application may operate in both batch mode and in interactive mode. In interactive mode, the application may be employed as part of an authoring system for incorporating patterns into computer applications.
  • a compiler component for query expressions.
  • Such a component may be used as a front-end for database query applications such as SQL and the like.
  • the component uses a set of rules to translate a query expression Q into a comprehension algebra and then optimizes Q by using a second set of rules that transform the algebraic representation to a fixed point.
  • a pattern compiler may recognize dependencies among bound variables and use those dependencies to drive matching. The compiler may use this optimization on the pattern for implication given above. By first extracting from the input forest input items that match the pattern element typedTerm[proof2:any, implies[a:any, b:any]], a generated transducer could constrain the possible matches for the pattern element typedTerm[proofl :andy, a:any].
  • Modular forest automata provide a unified description of partially-ordered regular tree patterns. MFAs also provide simple algorithms for determinization, sub-typing, intersection, and complementation of these patterns. In practice, modular forest automata support high-performance pattern analysis and matching.
  • Modular forest transducers enable compilers to place semantic actions on any state transition while supporting efficient transformation of labeled, directed graphs.
  • the present invention may be embodied in other specific forms without departing from its spirit or essential characteristics.
  • the described embodiments are to be considered in all respects only as illustrative and not restrictive.
  • the scope of the invention is, therefore, indicated by the appended claims rather than by the foregoing description. All changes which come within the meaning and range of equivalency of the claims are to be embraced within their scope.

Abstract

Modular forest automata (MFA) provide a unified description of partially-ordered regular tree patterns. MFAs provide simple methods for determinization, sub-typing, intersection, and complementation of these patterns. MFAs support high-performance pattern analysis and matching. Modular forest transducers, in conjunction with modular forest automata, enable compilers to place semantic actions on any state transition while supporting efficient transformation of labeled, directed graphs.

Description

MODULAR FOREST AUTOMATA
BACKGROUND
[0001] Programming languages can use patterns to distinguish among classes of values. For example, the following two lines of pseudo-code define a function that computes the sum of a list of integers. Sum(nil) = 0;
Sum(cons[head,tail]) = head+Sum(tail);
[0002] The patterns in this example serve two purposes. First, they distinguish among input cases. Second, they enable concise value deconstruction through the use of pattern variables and type inference.
[0003] Patterns are closely related to structural types. The regular tree patterns described herein are regular tree types that may also include variable bindings. A tree pattern coupled with a semantic action is called a tree transformation rule.
[0004] Structural type systems, such as XML schema languages, define categories of values. Programming languages often use structural type systems to statically check program safety properties. SQL databases also use a type system that is primarily focused on structure. Tables that result from joins, for example, contain tuples that can be described as having an anonymous structural type. Database management systems require that a variety of programs can interpret the data stored in the system. Structural type systems help database management systems meet this requirement. [0005] Distributed systems also induce a requirement for structural types. Due to latency, messages exchanged among distributed program components are often larger and more complex than method parameters exchanged among objects.
[0006] The values stored in databases and exchanged among distributed components are intermediate in complexity between the simple values manipulated by program expressions and the complexity of a Turing Machine. Described herein, regular tree patterns are used to define these intermediate levels of structural complexity. [0007] Expressing and analyzing both ordered and unordered regular tree patterns would be useful and beneficial abilities. Examples of domains in which analysis would beneficially be improved include model checking and authorization logic which uses partially-ordered tree patterns. Certain existing languages, such as XML schema, may use partially ordered regular trees but currently lack a means for sub-typing. Further, such languages may impose semantic restrictions in order to support efficient implementation under currently known methods.
[0008] Some work on greedy regular expression matching and the programming language XStatic has explored how to incorporate regular ordered tree types into object-oriented languages. Like XDuce, XStatic uses a uniform representation for sequences. Such work maps regular ordered tree types to objects, but uses flattening to support the natural semantics of regular language inclusion. Finally, trx explores regular ordered tree types in the context of Scheme.
[0009] Some work has also been accomplished on pushdown forest automata (PFAs). However, PFAs do not provide a sub-typing algorithm or a mechanism for addressing unordered nests (multisets). BRIEF SUMMARY
[0010] Embodiments of the present invention relate to modular forest automata (MFA). Modular forest automata, described herein, can be used to describe and analyze regular tree patterns and modular forest transducers (MFTs) can be created that can concisely express the transformation of labeled directed graphs. Graph transformation is a basic ingredient in the implementation of logics, process models, and programming languages. Implementations of modular forest automata may be used to support high-performance, strongly typed graph transformation. [0011] Modular forest automata are a mechanism for defining, reorganizing, and transforming collections of partially-ordered, finite, unranked trees. MFAs support the analysis and composition of MFA hierarchies. MFAs provide a unified treatment of ordered and unordered tree patterns.
[0012] Embodiments described herein include methods, systems, and computer program products for analyzing regular tree patterns. Particular embodiments allow for data being received which can be determined or rewritten as modules (machines) describing both sequences and sets. A union may be created from the modules which are determined from the received data. Determined modules and unions of modules may comprise labeled acceptance states. From the labeled acceptance states, sub-type relationships may be determined for the modules. [0013] Other embodiments described herein also include methods, systems, and computer program products for expressing a transformation of regular tree patterns. A regular tree pattern may be received and particular instance data may be received. A transducer may be compiled from the received regular tree pattern. Transducer transitions may be augmented with instructions which correspond to a desired transformation. From the augmented transducer transitions and the instance data, a correspondence between elements of the regular tree pattern and elements of the instance data may be determined. [0014] This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used as an aid in determining the scope of the claimed subject matter. [0015] Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the invention. The features and advantages of the invention may be realized and obtained by means of the instruments and combinations particularly pointed out in the appended claims. These and other features of the present invention will become more fully apparent from the following description and appended claims, or may be learned by the practice of the invention as set forth hereinafter.
BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to describe the manner in which the above-recited and other advantages and features of the invention can be obtained, a more particular description of the invention briefly described above will be rendered by reference to specific embodiments thereof which are illustrated in the appended drawings. Understanding that these drawings depict only typical embodiments of the invention and are not therefore to be considered to be limiting of its scope, the invention will be described and explained with additional specificity and detail through the use of the accompanying drawings in which:
[0017] Figure 1 illustrates a computing environment in which embodiments of the principles of the present invention may operate; [0018] Figure 2 illustrates a permutation modular forest automata for Nest contents of a pattern;
[0019] Figure 3 illustrates a determinized translation of a particular pattern Expr;
[0020] Figure 4 illustrates an optimized modular forest automata for nest contents of a pattern Pond;
[0021] Figure 5 illustrates a graphical representation of the various sub-types determined in sub-type analysis;
[0022] Figure 6 illustrates a non-deterministic modular forest automata for the nest contents of a pattern GTE; [0023] Figure 7 illustrates a determinized modular forest automata for the nest contents of a pattern GTE;
[0024] Figure 8 illustrates a flowchart of a method for analyzing a regular tree pattern in accordance with particular embodiments of the present invention;
[0025] Figure 9 illustrates a flowchart of a method for expressing the transformation of a regular tree pattern in accordance with particular embodiments of the present invention.
DETAILED DESCRIPTION
[0026] Embodiments described herein relate to methods, systems, and computer program products for analyzing regular tree patterns. Additional embodiments described herein relate to methods, systems, and computer program products for expressing a transformation or transformations of regular tree patterns. The embodiments of the present invention may comprise a special purpose or general-purpose computer including various computer hardware, as discussed in greater detail below. [0027] Figure 1 describes an example computing environment 100 in which the embodiments described herein may be practiced. The computing environment 100 includes one or more computer processors 110. The computing environment 100 also includes one or more instances of computer memory 120.
The computer memory 120 may be any computer-readable memory as known to be suitable and includes (but is not limited to) RAM, SRAM, and flash. Computer memory may also be persistent storage 130 such as a hard disc, solid state disc drives, CD ROM, DVDs, and the like. The computer memory 120 and storage 130 may, as may be suitable in any particular embodiment, be read only, such as ROM or a CD or DVD, or it may be both readable and writeable such as RAM, flash, and common disc drives. [0028] The computing environment 100 also includes input and output 140. The input and output 140 may comprise any suitable format or media such as data stored on magnetic disc, data accessible via a network, or otherwise. The computing environment 100 also includes external persistent storage 150 to which and from which data may be transferred. Similar to storage 130, the external persistent storage 150 may take any suitable form such as magnetic disc, tape, CD-R/W, or otherwise. [0029] Embodiments within the scope of the present invention also include computer- readable media for carrying or having computer-executable instructions or data structures stored thereon. Such computer-readable media can be any available media that can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, such computer-readable media can comprise storage media such as RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to carry or store desired program code means in the form of computer-executable instructions or data structures and which can be accessed by a general purpose or special purpose computer. When information is transferred or provided over a network or another communications connection (either hardwired, wireless, or a combination of hardwired or wireless) to a computer, the computer properly views the connection as a computer-readable medium. Such networks or communications connections are termed and referred to herein as communications media. Thus, any such connection is properly termed a computer-readable medium. Combinations of the above - including both storage media and communications media - should also be included within the scope of computer-readable media.
[0030] Computer-executable instructions comprise, for example, instructions and data which cause a general purpose computer, special purpose computer, or special purpose processing device to perform a certain function or group of functions. Such computer- executable instructions may be stored in computer memory 120, persistent storage 130, on any input or output media or device 140 or on external storage 150. Computer-executable instructions may also be transferred to a suitable computing environment via any suitable communications medium.
[0031] Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.
[0032] Embodiments described herein relate to methods, systems, and computer program products for analyzing regular tree patterns. Additional embodiments described herein relate to methods, systems, and computer program products for expressing a transformation of regular tree patterns. The embodiments of the present invention may comprise a special purpose or general-purpose computer including various computer hardware, as discussed in greater detail below. [0033] For example, Figure 8 illustrates a method for analyzing a regular tree pattern. The method includes receiving data 810 comprising a regular tree pattern comprising at least one of a sequence and a set. When the tree pattern comprises a sequence, a machine is determined 820 which corresponds to the sequence. The determined machines are sometimes termed "modules." A sequence, as its name implies, is a set of elements which has a particular order. [0034] When the tree pattern comprises a set, a machine is determined 830 which corresponds to the set. In contrast to a sequence which has a particular order, a set may be a collection of elements for which no particular order is specified.
[0035] A union is created 840 of the determined machines. From the union of the determined machines (modules), a set of labeled acceptance states is determined 850. Finally, a sub-type relationship is determined 860 from the labeled acceptance states.
[0036] As described more fully herein, a sub-type relationship may be one of equivalent, sub-type, super-type, disjoint, and intersecting. If two modules, Mi and M2, have the same acceptance states, then they are equivalent. If Mi contains all the acceptance states of M2 but not vice-versa, then Mi is a super-type of M2 and M2 is a sub-type of Mi. If Mi and M2 have no acceptance states in common, the Mi and M2 are disjoint. If Mi and M2 share some acceptance states but each of Mi and M2 have acceptance state not shared by the other, then they are intersecting. The sub-type relationships are discussed in more detail below and in conjunction with Fig. 5. [0037] Embodiments also include determining a root level machine (module) which comprises at least one transition to a labeled nest. A labeled nest, as described more fully herein, may have the form of Label[ — ] or Label {—}. A module may be created corresponding to the labeled nest. A continuation state which corresponds to a return from the labeled nest may be placed upon a stack. After placing the continuation state onto the stack, actions may be performed which correspond to the labeled nest. When an acceptance state is reached for the labeled nest, the continuation state is popped from the stack and processing is resumed for the root level machine.
[0038] Embodiments described herein may be employed wherein received data corresponds to data defining structural types in a programming language. Such data may be analyzed by the techniques described herein to determine if the structural types are equivalent, or have any of the other sub-type relationships as discussed herein. [0039] Embodiments described herein may be employed wherein received data corresponds to data comprising schema and/or schema definitions for a database. Such data may be analyzed by the techniques described herein to determine if the schema and schema definitions are equivalent, or have some any of the other sub-type relationships.
[0040] Embodiments described herein may be employed wherein received data corresponds to XML schema. Such data may be analyzed by the techniques described herein to determine if the XML schema are equivalent, or have some any of the other sub-type relationships. [0041] The embodiments described herein may be employed to determine structural and logical relationships corresponding to the determined sub-type relationships and applied for purposes of optimization, efficiency, and data translation for data structures in programming languages, databases, objects, and the like. [0042] Embodiments described herein also include methods for expressing the transformation of a regular tree pattern. Figure 9 illustrates a method 900 for expressing the transformation of a regular tree pattern. The method includes receiving first data 910 which corresponds to a regular tree pattern. The method also includes receiving second data 920 corresponding to an actual instance. [0043] For example, data comprising a regular tree pattern may comprise an XML schema, may comprise a database schema, may comprise structural types for a programming language or object definitions. Data corresponding to an actual instance may comprise data within a database, may comprise a serial data input stream, or may comprise data embodied within object-oriented objects or structural types defined within a programming language. [0044] The method 900 includes compiling the regular tree pattern into a transducer. Compiling a tree pattern is described in more detail in later sections of this description. Once compiled, the transducer transitions are augmented 940 with instructions corresponding to a desired transformation. After the transitions have been augmented with instructions, it may then be determined 950 from the augmented transitions and from the data corresponding to an actual instance a correspondence between elements of the instance and elements of the regular tree pattern.
[0045] For instance, there may be a pattern such as Root[A+, B*, C?] and actual instance data (given within an environment) of [aaa, bbb, -]. From this example, the method 900 may determine a particular binding such that A='aaa', B='bbb', and C='-'. Further, actions may be performed such as, for example, action: Root[A, B, C] → Root[A, C]. Once bindings are determined, the example action may be thought of as the "delete B" action.
[0046] The method 900 may be employed in an environment for variable binding. Such variable binding may determine a correspondence between structural types in a programming language, a database schema, an XML schema, or the like, and actual values which correspond to the variables defined within the types or schema. [0047] The instructions of method 900 may also comprise matching conditions and may comprise semantic actions. The instance data of method 900 may comprise XML schema instances, may comprise instances of data contained within a database according to a particular database schema, or may comprise data defined or stored in accordance with structural types defined within a programming language. [0048] The method 900 may also include compiling query expressions and determining the result of the query expression corresponding to the regular tree pattern and the actual instance data. For example, such queries may be data base queries such as SQL and may be authorization queries such as data access or the like. [0049] It should be noted that all the methods and techniques described herein may be realized in various embodiments which may comprise (but are not limited to) methods executing within computing environments, computer program products which comprise computer-executable code for performing the methods and techniques described herein, and computing systems comprising computer processors and computer-executable code for performing the methods and techniques described herein.
[0050] A more detailed and thorough discussion of methods and techniques of embodiments described herein will now follow.
Regular Tree Patterns
[0051] Listing 1 describes a syntax that may be used for regular tree patterns. In the grammar of Listing 1 , the term Action is a parameter that refers to a language for semantic actions. The terms Name, Variable, and Label are parameters that each provide a set of symbols called an alphabet. As described herein, it may be assumed that variable, pattern name, and label symbols come from distinct alphabets. In addition to these symbols, patterns may refer to base symbols which may include nonpattern types or literal values.
Definition — > Name '=' Pattern
Pattern — > Union
Λ Variable. Pattern ε
Union → Rule ('1' RuIe)*
Rule — > Tree Action?
Tree — > Label[Forest?]
Label {Forest?} Binding Tree Tree Repetition
Tree Λ Tree
^Tree
(Tree) any
Reference
Forest — > Tree | Forest, Tree
Repetition — > * I + I ?
[Min . . . Max]
Reference — > Symbol TypeParam? TypeParam — > (Union) Binding →_ Variable :
Listing 1. Regular Tree Pattern Syntax [0052] Regular tree pattern definitions only allow recursive pattern references within the context of the nest operator (as described below). Such a restriction on regular tree grammars is employed to prevent regular tree grammars from inducing the full power of context-free string grammars.
[0053] The repetition construct, * | + | ?, denotes the minimum and maximum number of occurrences permitted for the Tree it modifies. The maximum number of occurrences may be unbounded. The operators *, +, and ? are interpreted as [0..∞], [l..∞], and [0..1] respectively. In other words, A* is read as zero or more As (i.e., [0..∞]); B+ is read as one or more Bs (i.e., [l..oo]); and C? is read as zero or one Cs (i.e., [0..I]). This construct supports patterns that specify unranked tree nodes. An unranked tree node may have any number of children.
[0054] The any wildcard matches any value. The "■ operator complements a tree pattern. The Λ operator denotes the intersection of a pair of tree patterns. The | operator denotes the union of a pair of tree patterns. Finally, the Λ P . b operator denotes a polymorphic pattern with body b and with pattern parameter P.
[0055] The nest operator L[Forest?] defines an ordered, unranked tree node with label L. Such ordered items are also referred to as sequences. The nest operator L {Forest?} defines an unordered, unranked tree node with label L. Unordered items are also referred to as sets (or multisets). We use the term multiset pattern to refer to patterns of the form L{c} because c matches zero or more multisets of tree nodes. We use the term partially-ordered tree pattern to refer to tree patterns that may specify both ordered and unordered subtrees. [0056] Partially-ordered tree patterns enable programmers to concisely express ideas that are tedious or impossible to express using strictly ordered or unordered tree patterns. For example, a process model checking application is described below that includes the transformation rule defined in Listing 2. par{sender:choice{seq[send[x:any],CS:any],any*}, receiver:choice{seq[recv[x:any],CR:any],any*}, procs:any*} par{CS,CR,procs| Listing 2. A Process Interaction Rule
The multiset pattern with label par models a collection of processes executing in parallel. Each node labeled choice models a process that will continue by choosing among a set of alternatives. Each node labeled seq indicates a sequence of processes. Finally, send[x] and receive[x] correspond to sending and receiving a message of type x.
[0057] The rule models an interaction among a pair of processes (bound to variables sender and receiver in the pattern). The sender process sends a message of type x and the receiver process receives this message. After the interaction the collection of parallel processes contains the continuation of sender (CS), the continuation of receiver (CR) and the collection of processes that did not participate in the interaction (procs).
[0058] Within a set of parallel processes, there may be multiple pairs of potentially interacting processes and therefore multiple possible outcomes when matching the interaction pattern. The MFA mechanism described below may be used to generate one or more of these outcomes.
[0059] Multiset patterns offer more than conciseness. They also enable implementations and particular embodiments to use inherently unordered representations of input collections. Direct use of unordered representations, such as search trees or hash tables, enables transformation engines to avoid building separate indices for input collections.
[0060] For example, an authorization logic implementation described below is evaluated that checks that an access request meets an authorization policy by matching the request against a database of assertions and a set of rules. The authorization policy application may use a multiset pattern that works directly against an unordered representation of an assertions database.
[0061] If multiset patterns and polymorphism are removed from a regular tree grammar, a regular tree type system is arrived at which, as may be appreciated, is similar to a functional programming language for XML tree transformation. Such a system may be employed to generate an algorithm for determining a sub-type relation over nested regular expressions. Such an algorithm uses a top-down approach to compare pattern expressions. The algorithm expands upon and extends previous theoretical work on regular tree expressions. The project reports that it initially used determinization of bottom-up tree automata to decide inclusion, but found that this was not a scalable approach. The determinization algorithm for bottom-up tree automata does not take into account left context when applying its subset construction. This may cause exponential blowup to be far more common than if context were heeded. It will be shown below how modular forest automata use left context to avoid such a pitfall while preserving the simplicity of a direct approach to determinization and sub-typing. [0062] Another embodiment extends the above system with polymorphism, function types, and records. Records require a uniqueness constraint over labels. The MFA implementation described below supports uniqueness constraints, in addition to equality constraints over pattern variables.
[0063] As may be appreciated, the ambient calculus operator, n[], has a strong correspondence to the regular tree pattern operator Label {Forest?}. It may be demonstrated that the ambient calculus parallel composition operator may be interpreted as a tree composition operator that joins a pair of trees at their roots. It may be proposed that ambient logic may be used as a basis for describing and querying tree structures. Ambient logic is a temporal spatial logic for reasoning about processes. Unlike the regular tree grammar of Listing 1, ambient logic considers only unordered nests. In ambient logic, deciding a sub-type relation is equivalent to deciding implication. This is tractable for some variants of the logic.
XML Schema Language
[0064] A Modular forest automata (MFA) implementation is described herein that may successfully be imported and determine sub-type relations for instances of the W3C XML Schema Language. An XSD complex type assigns a name to a structural formula. Structural formulae in XSD are called content models. Content models contain element declarations, an unordered nest pattern called an attribute inventory, and particle compositors. There are three compositors: all, choice and sequence. The regular tree grammar union and concatenation constructors correspond to the choice and sequence compositors, respectively.
[0065] The all compositor corresponds to an unordered nest operator which is described herein. XSD places some restrictions on its use of the all compositor. For example, this may require that items within an all compositor have a finite multiplicity. [0066] XML element declarations are isomorphic to the ordered tree constructor, Label[Forest?], of regular tree grammars, with the operator name Label playing the role of the element qname. However, the XML schema language requires that, for any union of two content particles a and b, a parser must be able to perform single lookahead unique particle attribution: reading only one token, a parser must be able to identify whether an instance corresponds to branch a or b of the choice.
Modular Forest Automata
[0067] Partially-ordered regular tree patterns have been described, supra. [0068] Modular Forest Automata (MFA) provide a mechanism which provides a unified treatment of ordered and unordered regular tree patterns - of sequences and sets. Such ordered and unordered regular tree patterns are sometimes termed sequences and sets. Each MFA implements a contract that supports analysis and composition of MFA hierarchies. The contract enables MFAs to take advantage of left context during determinization as will be discussed herein. The use of left context in MFAs avoids a possible state blowup which may be found in certain previous methods for determinization of bottom-up tree automata. [0069] Modular forest automata (MFAs) are visibly pushdown automata (VPA). Visibly pushdown automata are a class of pushdown automata as are known to those of skill in the art. For MFAs, a pushdown automaton is defined as a tuple: M = (K, Σ, T, Δ, S, F) where
K is a finite set of states Σ is an alphabet (the input symbols) r is an alphabet (the stack symbols) s e K is the initial state F c K is the set of final states, and Δ, the transition relation, is a finite subset of (K x ∑* x F*) x ( K x F*) The transition relation maps triples (current state, input symbols, stack symbol to pop) to pairs (new state, stack symbol to push).
[0070] To support analysis, MFAs adopt the stack use restrictions of visibly pushdown languages (VPLs). This class of languages are defined using pushdown automata that restrict their transition relation to conform to one of the three pushdown transition categories in Listing 3 :
Local (qo, a e E1, ε) → (qls ε)
Call (callSite, a e ∑c, ε) → (callTarget, callSite) Return (returnSite, a e E1, callSite) — > (continuation, ε)
Listing 3. MFA Transition Categories
These categories partition Σ into three disjoint sets: ∑c, E1, E1, corresponding to symbols that can cause call, return, and local transitions, respectively. Local transitions are identical to transitions in regular finite automata. A call transition from a state qo in MFA M0 reads a symbol a, saves callSite on the stack and transfers control to a state callTarget. A return transition pops callSite from the stack and makes continuation the current state. [0071] The stack discipline described above enables a VPL to remain closed under intersection and complementation in addition to the union, renaming, Kleene star, and concatenation closure properties of pushdown automata. Unlike for general non- deterministic context-free languages, the class of non-deterministic VPLs is equivalent to the class of deterministic VPLs.
[0072] Each MFA M has a set T of call target states. M's start state s is in T as is any state reachable from s by a path that ends with a call transition. M can be viewed as a hierarchy of disjoint sets of states called modules. M has one module for each state t e T. Given a call target state t, the corresponding module Module(T) is the set of states reachable from t using only local transitions.
[0073] It is required that a module contain only one call target state t. The call target state t is called the entry point of the module. Correspondingly, MFAs cannot contain call transitions whose target state is reachable by local transitions from another call target state. The module containing an MFA's start state is called the MFA's top-level module. In order to maintain the stack discipline, MFAs do not allow inter-module ε-transitions. [0074] Finite additional bookkeeping is used with MFAs to apply the call/return strategy of VPA to unordered nest patterns and to obtain a single sub-typing method that can apply to both ordered and unordered nest patterns .
[0075] Each MFA state is labeled with a bit vector that indicates that zero or more pattern equivalence classes are accepted by the state. This label is called a tag. Each MFA includes a mapping Tag: K — » B, where B is a string of k bits. For a given module M, k is constant and k is called the tag-length of the module M. For each final state f in F, Tag(f) must contain at least one non-zero bit.
[0076] The purpose of tags is to guide how a calling MFA continues upon return from a call. In MFAs, return transitions do not have a fixed target state. Instead, a return transition from MFA state s pops the calling state from the stack, pushes onto the stack Tag(s), and changes the current state to the calling state. The calling state then executes a continuation transition that pops the tag from the stack and transfers control to a continuation state.
[0077] The addition of continuation transitions to the MFA mechanism does not change the fundamental properties of MFAs because the continuation transitions of MFA with continuation transitions can be eliminated. To eliminate the continuation transitions of an MFA having continuation transitions is done as follows. First, a copy is made for each call site c with call target state t, of the states in Module(t). This copy is called the target module. Then, for each return transition (r; α e ∑r, c) —> (c, tag) in the target module, the corresponding continuation transition (c, ε, tag) — > (continuation; ε) is found in the calling module and both transitions are removed. Finally, a return transition (r; α e ∑r; c) — » (continuation; ε) is added to the target module. Because it is possible to remove the continuations transitions as described above, is may be assumed that MFAs may have continuation transitions.
[0078] It may also be assumed that an MFA has access to a stack, called the input stack of forests. Execution of an MFA begins at the MFA' s start state with the input stack containing the original input forest. An MFA includes the notion of a current tree. The current tree is some tree in the forest at the top of the input stack. These concepts can be used to map to particular implementations of MFAs. A call pushes the children of a current tree onto the input stack. A return pops the children off the stack. [0079] If only local transitions of a module M are considered, then M is a regular string automaton that recognizes the contents of a forest. As may be appreciated, this may be used to define the class of pushdown forest automata (PFAs). Pushdown forest automata have two sets of states: the forest states QF and the tree states QT. Pushdown forest automata have Entry and Exit transitions that connect disjoint sets of forest states. Pushdown forest automata also have a transition relation Comb that incorporates information from an exit transition and transfers control from a tree state to a forest state.
[0080] If tags are removed from MFAs, then PFAs are isomorphic to MFAs. A given PFA P can be converted to the equivalent MFA Mp as follows: For each forest state of P, create a state in Mp. Fore each tree state in P, create a state in Mp. Copy the entry, exit, combination and local transitions of P directly to Mp. These correspond to call, return, continuation, and local transitions, respectively. By splitting each call state c into a forest state and a tree state t and adapting the continuation transition of c to be a combination transition whose initial state is t, then a tagless MFA may be converted to an equivalent PFA. [0081] A preprocessor, Prep(s), may be associated with any MFA state s. Prep(s) must either be set to a valid MFA or to ±. Within a given module all states must share the same preprocessor value. A module whose states have a preprocessor other than ± is called a preprocessing module. Given an input forest i, a preprocessing module will call its preprocessor on each element of i before processing that element. A preprocessor is used to discriminate among equivalence classes of input. Preprocessors can not be called recursively. Specifically, no state within a preprocessing module prep can initiate a path that contains a transition with target state t such that Prep(t) = prep. Preprocessors may be used to construct an MFA that can match a multiset pattern.
[0082] The addition of preprocessing modules does not change the fundamental properties of MFAs. A preprocessing module may be thought of as operating by transforming each of its inputs i to Ψ[i] where Ψ is a reserved label. Preprocessing steps can then be encoded as call transitions on nests labeled Ψ.
[0083] Also, a semantic action, Action(tr), may be added to any local MFA transition tr. A transition augmented in this way is called an action transition. An MFA with one or more action transitions is called a modular forest transducer (MFT). The ordering of semantic actions may be preserved during MFT determinization.
Translation of Tree Patterns to MFAs
Partially ordered regular tree patterns may be transformed into MFAs. Because the intersection and complementation methods include a determinization step, details of a method for determinization of non-deterministic MFA (NMFA) is provided first. [0084] Construction procedures for building NMFAs from tree patterns differ from other known construction procedures. First, tree patterns include nest operators. Second, tree patterns may contain actions and variable bindings. A pattern compiler in a particular implementation can translate variable bindings to actions. Correspondingly, variable bindings are not treated specially.
[0085] Input to an MFA may be a well-formed forest of tree values. A well-formed input forest ends with the end-of-forest symbol, "]". The translation procedure adds to every generated MFA state s a return transition on ]. [0086] A union, M2 = Mo U Mi of two NMFAs is computed using the known classic method which is augmented by making adjustments to tags and preprocessors. In the construction, it is assumed that M0 has tags of length k0 while Mi has tags of length Ic1. M2 would then have tags of length k0 + Ic1. When a state s of M2 has a final state of M0, then a string of ki zeros is appended to its tag. Otherwise, when s is a final state of Mi, then its tag is shifted left k0 places, filling it with zeros. [0087] To support combination of preprocessing modules, the union construction is modified as follows: When computing M2 = Mo U M1, when the top-level module of Mo has a preprocessor prepo ≠ -L and the top-level module Mi has a preprocessor prepi ≠ ±, then assign to each state in M2 's top-level module the preprocessor prepo U prepi. [0088] To combine a preprocessing module with a regular module, a preprocessor is synthesized for the regular module. Suppose prep0 ≠ _L and prepi = ±. A preprocessor for Ml is synthesized by first setting prepi to the union of the set of MFAs recognizing the transition symbols for local transitions of Ml. Next, for each call transition (c, L, ε) —> (callTarget, c) in Mi's transition relation, then set prepi = prepi U N where N is an MFA recognizing a tree labeled L with children recognized by the module whose start state is callTarget. Nests
[0089] Nest operators may be translated whether they are ordered or un-ordered. Given a nest operator with label L and contents c, first create an NMFA for c, called Mc, with start state sc. Then create an NMFA, called Mnest with start state s, final state f, and transitions (s, L, ε) → (sc, s) (call Mc) and (s, ε, tagc) → (f, ε) (continue from call). Finally, incorporate the states of Mc into Mnest, assigning to each final state fc of Mc tag tagc and changing fc to a non-final state with a return transition (fc, ], s) —> (s; tagc). In this construction, the states of Mc become a module of Mnest. [0090] The concatenation operator may be used to translate the contents of ordered nests. Given a pair of NMFAs Mo and Mi, the method builds M2 = Mo, Mi by creating a new start state s for M2, creating an ε transition from s to M0 's start state by creating ε transitions from each final state of Mo to Mi's start state and finally by adopting as M2's final states the final states of Mi.
Multiset Nest Contents
[0091] The following strategy may be used to generate an MFA that recognizes the contents of an unordered nest.
[0092] In general, a multiset pattern may be viewed as having the form Label {pi[1i'hi], p2 [1Λ], . . . , pn [1n'hn]}
This notation specifies that, for the contents of a multiset nest operator to match an input collection, each pattern element P1 must match at least I1 input elements and may match at most h; input elements. [0093] Multiset patterns are first transformed to eliminate arbitrary occurrence constraints. Given a multiset pattern P specified as above, a pattern compiler may transform P to an equivalent unit multiset pattern P' as follows.
For each element pattern pΛ'Vin P, a) Add to P' I1 copies OfP1.
Call these copies required pattern elements of P'. b) If Ii1 is infinite, add P1* to P'.
Call the added pattern an unbounded pattern element of P'. Otherwise add h - 11 copies of P1? to P'. Call these copies optional pattern elements of P ' .
Listing 4. Transform Multiset Patterns
The pattern compiler next builds a preprocessing MFA called the element MFA which
matches the union of the pattern elements LJ1P1. Third, the pattern compiler builds a permutation MFA. The permutation MFA calls the element MFA as a preprocessor on its inputs. On each call, the element MFA returns a tag indicating which of the P1 matches the current input. The permutation MFA changes state when it encounters an input that matches a required or optional pattern. The state change counts the required or optional pattern.
When the permutation MFA encounters an unbounded pattern, it loops back to its current state.
[0094] It may be recognized that permutation MFAs are a form of counting automata.
Permutation MFAs differ from other counting automata in their use of a preprocessor step.
Figure 2 illustrates how permutation MFAs count their inputs. The MFA 200 illustrated in
Figure 2 matches the nest contents of the following pattern: Pond = Pondfwater, frog+ , canoe*, bridge?}
Repetition, References and Type Parameters [0095] To translate the repetition constructs of Listing 1 , a pattern compiler uses well- known techniques. This construction may be augmented to implement variable bindings that accumulate input items matching a repeated pattern.
[0096] To translate symbol references, a pattern compiler must distinguish among several classes of symbols. A base type or literal symbol sym translated as a single local transition on sym A reference to a type parameter par am translated as a formal transition on par am. Formal transitions are not executable. A compiler may generate a parameterized module containing a formal transition, but to create an executable module it must instantiate the parameterized module by supplying actual patterns for the module's formal transitions. During instantiation, the compiler substitutes for each formal transition the translation of the corresponding actual pattern.
[0097] A pattern compiler translates a reference to a pattern P by substituting the translation of P into the context that referenced P. As may be known, regular tree grammars do not permit recursive references outside the context of a next operator. A pattern compiler can combine this property with the invariant that nests are compiled as calls to ensure that all inline expansions will reach a base case, such as a nest operator or a pattern that does not contain a pattern reference.
[0098] For example, Figure 3 illustrates the translation for the recursive pattern
Expr = c I plus[Expr, Expr]. Figure 3 labels each node with its tag. Figure 3 contains two modules, depicted 300 and 310, which are called Expr 300 and PlusNest 310. Expr 300 has a tag length 2 because it matches a union. PlusNest 310 has a tag length 1. Module Expr 300, which includes the start state for the MFA, matches the Expr pattern by either matching a c or by calling PlusNest 310 and then continuing to the final state tagged 10 upon return of tag 1 from PlusNest. PlusNest 310 matches the pattern fragment [Expr, Expr] by concatenating two inlined instances of the pattern Expr. These inline expansions of Expr yield recursive calls to PlusNest. Return transitions or paths that lead to non-final states are not shown.
Determinization [0099]
0. Given NMFA M = ( K, Σ , T, A, s, F), compute deterministic MFA
M' = (K' c 2K, Σ' , T, Δ, S, F').
1. s' = E(s);
Q = []; Enqueue(Q, s');
2. while Q ≠ [] a) t = Dequeue(Q); b) for each sym in E1 i. moveSet = the set of all states r such that Ξx e t: (x, sym, ε) arrow (r, ε) in Δ; ii. u = E(moveSet); iii. if u £ K' then Enqueue(Q, u); K' = K' U {u}; iv. add(t, sym, ε) → (u, ε) to Δ'; c) for each L in Labels(t) i. combineNests( t, L, K', Q, Δ, Δ);
3. for each state st e K' a) if st n F ≠ 0 then F' = F' u st;
4. for each state f e F', Tag(f ) = U+xef Tag(x).
(The operator U+ computes the bitwise OR of a set of tags.) Listing 6. Determinization of NMFAs
[00100] Listing 6 provides a construction for determinizing an MFA. To simplify determinization, represent the combination of a call transition
(c, Label, ε) — > (callTarget, c) and its associated continuation transition (c, ε, tag) → (cont, ε) as an intra-module transition called a nest transition: (c, (Label, callTarget, tag), ε) — > (cont, ε).
This representation enables the determinization method to process transitions uniformly because both local and nest transitions are intra-module transitions. For use in the determinization method of Listing 6, the function Labels(s) is introduced which yields the set of labels used in nest transitions emanating from s.
[00101] For a given top-level module M, the determinization method adds the following two steps to the class method for determinization of an NFA. First, step 2.c uses the CombineNests method to combine the call targets of nest transitions from state t. Second, step 4 updates the tags for each final state in the determinized MFA' s set of final states F'.
For a given final state f , step 4 sets the tag for f to the bitwise OR over the tags of the
NMFA states that are members of f .
[00102] The determinization method uses as a subroutine the ε-closure operator E(s).
Given a state s, E(s) is the set of states reachable from s by a path containing only ε transitions. For clarity, Listing 6 omits the details related to handling wildcard transitions.
For implementing wildcard transitions emanating from a state t, the move set for the wildcard transition is combined with the move set of each non- wildcard transition emanating from t.
Sub-typing
[00103] Having invested in extra bookkeeping during determinization to keep track of tags, a benefit of the extra bookkeeping may be reaped in comparing a pair of MFAs M0 and M1. A procedure for comparing the MFAs is given in Listing 7.
0. Given a pair of MFAs M0 and M1, determine the inclusion relationship between the sets of values recognized by Mo and Mi . 1. for each state q in Mo or M1, if Tag (q) ≠ O then set Tag(q) = 1 ; otherwise set Tag(q) = O;
2. Set M2 = M0 u M1.
(e.g., The union construction assigns to final states of Mo the tag 01 and assigns to final states of Mi the tag 10)
3. Set C to the set of distinct tags on final states of Determinize(M2).
Find the relationship between Mo and Mi by looking up the value of C in Table 1. Listing 7. MFA Comparison Algorithm.
[00104] A key idea is that the determinization procedure keeps track, through tags on final states, of whether M0 and Mi may ever be accepted simultaneously and whether M0 or Ml or both may ever be accepted independently of each other. Table lxxxx can be used to map to a comparison outcome the set C of tag values present on final states in the determinized union of M0 and M1. Figure 5 is a graphical illustration of the possible sub-type relationships listed in Table 1.
Figure imgf000029_0001
Table 1. Using Tags to Compare MFAs
Figure 5 depicts each of the equivalent 500 relationship; the sub-type 510 relationship; the super-type 520 relationship; the disjoint 530 relationship; and the intersecting 540 relationship.
Complementation, Intersection, and Difference [00105] Additional benefits may be reaped from the tag bookkeeping described above. Tags may be used to implement procedures for complementation, intersection, and difference of MFAs. To construct the intersection M0 Λ M1, the intersection construction first computes the determinized union I = Determinize(Mo U Mi) and then eliminates from I each state t from which a final state with tag 11 is not reachable.
[00106] When this computation results in an MFA I with no states, a single non-accepting start state is added to I so that I is the MFA that accepts no input.
[00107] A similar construction may be used to compute Mo - M1. To do so the tag 01 is substituted for tag 11 in the above intersection construction. To compute Mi - Mo, the tag 10 is used in the construction.
[00108] To build -1M, the complement of M, the complementation construction first computes M' = Determinize(M). Then, for each final state f in M', the construction sets the tag of f to 0 and marks f non- final. For each non- final state nf of the original M', the construction sets the tag of nf to 1 and marks nf final. The tag-adjusted M' accepts -1M. [00109] An important aspect of this construction is that transitions on zero tags returned by called modules may lead to final states. An MFA implementation that saves space by using implicit transitions on zero tags must have a way to convert these transitions to explicit transitions upon complementation.
Ordering of Semantic Actions
[00110] One benefit of particular embodiments of the present invention is to enable a pattern compiler to place a semantic action on any NMFA transition. To support this flexibility, a method is required for preserving the order of semantic actions during determinization. It is beneficial to preserve the property that, for all paths [Ir1 , tr2, . . . , trn] of an NMFA M, Action (Ir1) is executed before Action(tr,) if and only if i<j. To preserve this property, the paths of M are associated with the transitions of Determinize(M).
[00111] To accomplish this, a basic path of a deterministic MFA
M' = Determinize(M) is defined as a sequence of local or nest transitions [trls tr2, . . . , trn] such that for each transition Ir1 = (ql5 sym, ε) → (q1+1, ε), either q1+1 has only one incoming transition, i = 0, or i + 1 = n. For purposes of this definition, the start state of M' is considered to have an implicit incoming transition.
[00112] The basic paths of M' may start and finish with a state that has multiple incoming transitions. However, any intermediate states along a basic path must have exactly one incoming transition. A consequence of this property is that the final transition trn of a basic path uniquely identified that path.
[00113] This consequence is made use of by assigning to the final transition trn of each basic path bp a set A of sequences of semantic actions gathered in order from the set np of NMFA paths that correspond to bp. When an MFT executes transition trn of bp, it also executes each member of A.
[00114] For a given basic path bp of M', the corresponding set of paths np from M are found using the following method. First, find, for each transition Ir1 in bp the NMFA transitions that correspond to \xx. A NMFA transition ntr = (T1, sym, ε) → (r2, ε) corresponds to Ir1 if and only if T1 e qi and r2 e q1+1.
[00115] For each NMFA transition corresponding to trl5 an NMFA path may be built npathj = patha, ntr, pathb where patha has the following properties. First, patha is made entirely of ε transitions whose beginning and ending states are in q^ Second, the first state of patha has no predecessor in qi. Finally, the last state of patha is the beginning state of transition ntr. Similarly, pathb is made entirely of ε transitions whose beginning and ending states are in q1+1, and pathb begins with the ending state of ntr.
[00116] In turn, the NMFA paths are built corresponding to basic path bp by stringing together all of the sub-paths that correspond to some transition in bp. If each transition of bp has only one corresponding NMFA transition, these sub-paths will form a single NMFA path. However, if some transitions of bp have more than one corresponding NMFA transition, then the sub-paths are combined by joining pairs (npatha, npathb) of NMFA sub-paths for which the last state of npatha is the first state of npathb. A given NMFA sub-path may participate in more than one such pair; therefore several of the NMFA paths corresponding to a given basic path may share a common prefix.
[00117] Figures 6 and 7 show the correspondences between the constructed NMFA 600 for the nest contents of the pattern
GTE = GTE[any, 0] | GTE[O, S[any]] and its determinized equivalent 700, respectively. The MFAs in these figures include the shift and accept actions described in Table 2. Figure 6 uses the symbol e to represent an ε transition. Figure 7 illustrates how the action sequences 700 from each of the NMFA paths have been gathered and assigned to transitions that finish basic paths of the determinized MFA. These transitions are also labeled with the NMFA paths assigned to them. [00118] Figure 7 also gives a view of the translation for the wildcard any. The determinized MFA for GTE uses a transition labeled otherwise to translate the wildcard. This translation is called a default transition because it will be executed if no other transition applies. The target state t of a wildcard transition starting from state s is added to the move set for default transition from s. In addition, t is added to the move set of any non- wildcard transition from s. [00119] Finally, Figure 7 illustrates a technique for representing return transitions that simplifies the ordering of semantic actions. Return transitions may be viewed as local transitions on end-of-forest(]). These local transitions can then become placeholders for semantic actions. The pattern compiler described herein makes use of this technique.
Optimization of Permutation MFAs
[00120] To account for differing input orders, permutation MFAs may have a large number of transitions. To reduce the number of transitions in a permutation MFA, a pattern compiler can assign a partial order, called the tag order, to the tags of the corresponding element MFA. The compiler can then remove from the permutation MFA paths that are out of order, anticipating that the runtime system will match an input forest using one of two strategies. First, a runtime system can use can index over the input collection to extract items that will match required pattern elements. Second, the runtime system can use the element MFA to preprocess the input forest and then sort the result according to the element MFA' s tag order.
[00121] The first strategy works well when one of the pattern elements is the wildcard any* . In this scenario, the runtime system can "cherry pick" the required pattern elements in tag order using an index and then assign the remaining input forest items to the wildcard pattern element. [00122] The second strategy trades reduced memory use for potentially increased matching time due to sorting. When used to transform labeled, directed graphs, permutation MFAs may typically bind to variables large chunks of an input forest. Further, a user of multiset patterns may expect multiple sets of variable bindings to emerge from a matching operation. In these scenarios, a runtime system must retain a copy of an input forest and therefore supports sorting. [00123] Given a set P of pattern elements, a total order for the tags of the corresponding preprocessor MFA may be derived as follows. First, order the pattern elements. Given a pair of pattern elements (pl5 p,) both in P, define P1 < p, if P1 is required and p, is not, or if P1 is optional and p, is unbounded, or if P1 has a higher priority than p,. If no priorities are assigned then assign priorities lexicographically, so that there is a total order among the pattern elements.
[00124] Upon Determinization, a preprocessor MFA will have tags that indicate acceptance of a set of one or more pattern elements. Given a pair of such tags (tl5 1,), tλ < tj if min^) < min(t,). If I1 and t, have the same minimum element, the U < t, if It1I > |t,|. This last rule ensures that permutation MFAs consider first inputs that may match several pattern elements. Figure 4 illustrates the effect of tag order optimization on the MFA 400 for Pond pattern
Pond = Pondfwater, frog+ , canoe*, bridge?}.
MFA Implementation
[00125] In one particular implementation of MFAs and MFTs, there is a runtime system that implements instances of these automata called transducers. In another embodiment, a pattern compiler transforms regular tree patterns to transducers, augmenting transducer transitions with instructions that implement variable binding, matching conditions and semantic actions. Particular embodiments may be applied to at least four applications: claims-based authorization service, a protocol model-checking application, a system for importing, subtyping, and matching XML schema instances, and a compiler for query expressions. [00126] An actual evaluation of a particular implementation resulted in a transducer runtime matching labeled, directed graphs at a rate between 2.4 and 8.9 million nodes per second. Further, the transducer runtime was able to transform labeled, directed graphs at a rate between 0.6 and 2.1 million nodes per second.
Runtime
[00127] For each transformation rule rule = pattern, action a pattern compiler creates a frame template. The frame template specifies a slot for each variable bound in rule, plus an additional slot to hold the result of applying action. At runtime, the transducer mechanism may allocate for each rule r a stack of frame collections. A frame collection for rule r contains zero or more frames whose layout is described by the frame template for f. Frame collections may contain more than one frame because a multiset pattern can match its input in more than one way, yielding multiple sets of variable bindings. Frame collections may be stacked to handle recursion.
Transducer Instructions
[00128]
Figure imgf000035_0001
Figure imgf000036_0001
Table 2. Transducer Instructions
[00129] Transducer state transitions may refer to action blocks which are sequences of transducer instructions. The transducer instruction set includes the instructions given in Table 2. In Table 2, operands labeled r reference grammar rules. Operands labeled r.x reference the slot for variable x within the rule frames on top of r's rule collection stack. Operands labeled i refer to instructions. Operands labeled t refer to tags indicating sets of accepted rules. Operands labeled b refer to a set of action blocks.
[00130] In addition to the explicit operands, instructions may also contain a shift type and a shifted rule. The shift type indicates how the transformation engine should move to the next item in the forest. If the shift type is SHIFT NEST, then the transformation engine will rewrite the successors of the current tree node before moving on to the next tree node. The shifted rule indicates which rule to rewrite (among several that the nest pattern may have matched). [00131] The first four instructions in Table 2 are called the frame update instructions because for some rule r, they update for each frame on r's collection stack, the slot for variable r.x.
[00132] The Exec instruction pops the top collection from r's collection stack. For each frame in the popped collection, the Exec instruction executes the rewriting action associated with r. For each result, the Exec instruction executes the frame update instruction i which updates some variable target.x. In recursive cases, target may be the same rule as r. [00133] The Push instruction pushes a new rule collection onto the rule collection stack for r. The Par instruction executes a set of action blocks in parallel. For each action block in the set, the par instruction starts with the current input node. Each action block in the set must advance the input pointer the same amount. The transformation engine does not always execute each member of a parallel block. Each parallel block member may be marked with a rule identifier. The transducer will only execute parallel block members that are marked with an identifier for a rule that the transducer is currently rewriting.
[00134] The Shift instruction advances the transducer to the next input item. The pattern compiler generates this instruction when there is no variable binding associated with the current pattern position. When a pattern position does have a variable binding, the compiler instead supplies the shift information as part of a frame update instruction.
Applications
[00135] One particular authorization policy engine (called Thor) uses an authorization logic that supports claims-based authorization of data access requests. Thor comprises a large database of claims, expressed in logic such as claim: a/dns=?x->b/dns=?x, which denotes that if a claims that the property dns has the value bound to variable x, then b makes the same claim. The claim a/dns="LocalHost" denotes that a claims that the property dns is assigned the value "LocalHost." All such claims are represented in the claims database as an unordered table, indexed by principals and properties.
[00136] The authorization policy engine uses a structural contract to represent its claims database as an unordered forest. To process a claim, it first converts the claim into a tree of the form prove[context {database}, goal]. Then the engine uses a set of rules to repeatedly transform the claim until it reaches a fixed point. If the engine can prove the claim, the claim will then be transformed into a proof tree that identifies the steps in the proof. [00137] The pattern compiler may translate the engine's rules into a transducer. The search procedure calls this transducer to execute each transformation step. The rules implement a sequent calculus for constructive logic, augmented with distribution rules for the delegation operator. A typical rule in this logic is the following: ImpliesConditionMet = prove [ context {typedTerm[proofl :andy, a:any], typedTerm[proof2:any, implies[a:any, b:any]], restany*}, goal: any]
==> prove [ context {rest, typedTerm[proofl :any, a:any], typedTerm[apply[proof2:any, proofl :any], b:any]}, goal: any];
[00138] The engine uses the indexing and tag order sorting previously described herein to achieve a substantial throughput (measured in one instance as 23,000 claims per second). This has a possible benefit of preventing claims processing from being a rate-limiting step of an overall authorization service.
[00139] Another application is a process model-checker. Such a model-checker may be applied to protocols ranging from simple alternating-bit protocols to a model of TCP (transmission control protocol). The model-checker may check deadlock-freedom for such protocols. The model-checker uses patterns, such as the interaction pattern of Listing 2, that produce many results. In such cases, the transducer may buffer several frames worth of variable bindings for each rewrite. [00140] Another embodiment applies an application which imports, validates, and subtypes XML schemas. This embodiment imports XML schemas into partially-ordered tree patterns. Such an application may operate in both batch mode and in interactive mode. In interactive mode, the application may be employed as part of an authoring system for incorporating patterns into computer applications.
[00141] Yet another embodiment was applied in a compiler component for query expressions. Such a component may be used as a front-end for database query applications such as SQL and the like. The component uses a set of rules to translate a query expression Q into a comprehension algebra and then optimizes Q by using a second set of rules that transform the algebraic representation to a fixed point.
[00142] Optimizations of the embodiments described herein are also possible. For example, a pattern compiler may recognize dependencies among bound variables and use those dependencies to drive matching. The compiler may use this optimization on the pattern for implication given above. By first extracting from the input forest input items that match the pattern element typedTerm[proof2:any, implies[a:any, b:any]], a generated transducer could constrain the possible matches for the pattern element typedTerm[proofl :andy, a:any]. [00143] Modular forest automata provide a unified description of partially-ordered regular tree patterns. MFAs also provide simple algorithms for determinization, sub-typing, intersection, and complementation of these patterns. In practice, modular forest automata support high-performance pattern analysis and matching. Modular forest transducers enable compilers to place semantic actions on any state transition while supporting efficient transformation of labeled, directed graphs. [00144] The present invention may be embodied in other specific forms without departing from its spirit or essential characteristics. The described embodiments are to be considered in all respects only as illustrative and not restrictive. The scope of the invention is, therefore, indicated by the appended claims rather than by the foregoing description. All changes which come within the meaning and range of equivalency of the claims are to be embraced within their scope.

Claims

CLAIMS What is claimed is:
1. A method in a computer environment (100) for analyzing a regular tree pattern (200), the computer environment comprising at least one computer processor and computer- readable memory, the method comprising: receiving data comprising a regular tree pattern comprising at least one of a sequence and a set (810); when the tree pattern comprises a sequence, determining a first machine corresponding to the sequence (820); when the tree pattern comprises a set, determining a second machine corresponding to the set (830); creating a union of the first and second machines (840); determining a set of labeled acceptance states for the union of the machines (850); determining from the labeled acceptance states a sub-type relationship for the first and second machine (860).
2. The method of claim 1 further comprising determining a root level machine comprising at least one transition to a labeled nest; creating a module corresponding to the labeled nest; placing a continuation state corresponding to the return of the labeled nest onto a stack; performing actions corresponding to the labeled nest; and when reaching an acceptance state for the labeled nest, popping the continuation state from the stack and resuming processing for the root level machine.
3. The method of claim 1 wherein the received data corresponds to data defining structural types in a programming language.
4. The method of claim 1 wherein the received data corresponds to data comprising a schema for a database.
5. The method of claim 1 wherein the received data corresponds to an XML schema.
6. A computer program product comprising a computer-readable medium (150) having encoded thereon computer-executable instructions for analyzing a regular tree pattern (200), the computer-executable instructions, when performed in a computing environment (100), perform a method comprising: receiving data comprising a regular tree pattern comprising at least one of a sequence and a set (810); when the tree pattern comprises a sequence, determining a first machine corresponding to the sequence (820); when the tree pattern comprises a set, determining a second machine corresponding to the set (830); creating a union of the first and second machines (840); determining a set of labeled acceptance states for the union of the machines (850); determining from the labeled acceptance states a sub-type relationship for the first and second machine (860).
7. The computer program product of claim 8 further comprising determining a root level machine comprising at least one transition to a labeled nest; creating a module corresponding to the labeled nest; placing a continuation state corresponding to the return of the labeled nest onto a stack; performing actions corresponding to the labeled nest; and when reaching an acceptance state for the labeled nest, popping the continuation state from the stack and resuming processing for the root level machine.
8. The computer program product of claim 8 wherein the received data corresponds to data defining structural types in a programming language.
9. The computer program product of claim 8 wherein the received data corresponds to data comprising a schema for a database.
10. The computer program product of claim 8 wherein the received data corresponds to an XML schema.
11. A method in a computing environment (100) for expressing the transformation of a regular tree pattern (200), the computer environment comprising at least one computer processor (110) and computer-readable memory (120), the method comprising: receiving first data corresponding to a regular tree pattern (910); receiving second data corresponding to an actual instance (920); compiling the regular tree pattern into a transducer (930); augmenting the transducer transitions with instructions corresponding to a desired transformation (940); and determining from the augmented transducer transitions and the second data, a correspondence between elements of the second data and elements of the regular tree pattern (950).
12. The method of claim 15 wherein the instructions comprise variable binding.
13. The method of claim 15 wherein the instructions comprise matching conditions.
14. The method of claim 15 wherein the instructions comprise semantic actions.
15. The method of claim 15 wherein the second data comprises XML schema instances.
PCT/US2009/054457 2008-09-30 2009-08-20 Modular forest automata WO2010039348A2 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2011530081A JP5530449B2 (en) 2008-09-30 2009-08-20 Modular forest automaton
EP09818172A EP2332068A4 (en) 2008-09-30 2009-08-20 Modular forest automata
CN200980139411.6A CN102165434B (en) 2008-09-30 2009-08-20 Modular forest automata

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US12/242,322 2008-09-30
US12/242,322 US8176085B2 (en) 2008-09-30 2008-09-30 Modular forest automata

Publications (2)

Publication Number Publication Date
WO2010039348A2 true WO2010039348A2 (en) 2010-04-08
WO2010039348A3 WO2010039348A3 (en) 2010-06-03

Family

ID=42074085

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/US2009/054457 WO2010039348A2 (en) 2008-09-30 2009-08-20 Modular forest automata

Country Status (5)

Country Link
US (1) US8176085B2 (en)
EP (1) EP2332068A4 (en)
JP (1) JP5530449B2 (en)
CN (2) CN102165434B (en)
WO (1) WO2010039348A2 (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080271000A1 (en) * 2007-04-25 2008-10-30 Microsoft Corporation Predicting Conflicts in a Pervasive System
JP5224953B2 (en) * 2008-07-17 2013-07-03 インターナショナル・ビジネス・マシーンズ・コーポレーション Information processing apparatus, information processing method, and program
US8996439B2 (en) 2010-11-02 2015-03-31 Empire Technology Development Llc Scalable reasoning using a polarity-based module
US8856764B2 (en) * 2011-01-25 2014-10-07 International Business Machines Corporation Distributed static analysis of computer software applications
US9858051B2 (en) * 2011-06-24 2018-01-02 Cavium, Inc. Regex compiler
US8990259B2 (en) * 2011-06-24 2015-03-24 Cavium, Inc. Anchored patterns
CN103858386B (en) 2011-08-02 2017-08-25 凯为公司 For performing the method and apparatus for wrapping classification by the decision tree of optimization
JP6073482B2 (en) 2012-10-19 2017-02-01 マカフィー, インコーポレイテッド Secure disk access control
US9275336B2 (en) 2013-12-31 2016-03-01 Cavium, Inc. Method and system for skipping over group(s) of rules based on skip group rule
US9544402B2 (en) 2013-12-31 2017-01-10 Cavium, Inc. Multi-rule approach to encoding a group of rules
US9667446B2 (en) 2014-01-08 2017-05-30 Cavium, Inc. Condition code approach for comparing rule and packet data that are provided in portions
US9996328B1 (en) * 2017-06-22 2018-06-12 Archeo Futurus, Inc. Compiling and optimizing a computer code by minimizing a number of states in a finite machine corresponding to the computer code
US10481881B2 (en) * 2017-06-22 2019-11-19 Archeo Futurus, Inc. Mapping a computer code to wires and gates
CN111026377B (en) * 2019-11-21 2023-03-14 中国航空工业集团公司西安航空计算技术研究所 Calling display list pre-decoding method based on finite-state machine
CN113254755B (en) * 2021-07-19 2021-10-08 南京烽火星空通信发展有限公司 Public opinion parallel association mining method based on distributed framework

Family Cites Families (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5317509A (en) 1992-01-21 1994-05-31 Hewlett-Packard Company Regular expression factoring for scanning multibyte character sets with a single byte automata machine
US5915259A (en) 1996-03-20 1999-06-22 Xerox Corporation Document schema transformation by patterns and contextual conditions
US5946490A (en) 1996-03-22 1999-08-31 Northeastern University Automata-theoretic approach compiler for adaptive software
JP2003084987A (en) 2001-09-11 2003-03-20 Internatl Business Mach Corp <Ibm> Generation method for automaton for verifying validity of xml document, validity verifying method for xml document, generation system for automaton for verifying validity of xml document, and system and program for verifying validity of xml document
US6785643B2 (en) 2001-10-15 2004-08-31 Motorola, Inc. Chart parsing using compacted grammar representations
US6826568B2 (en) * 2001-12-20 2004-11-30 Microsoft Corporation Methods and system for model matching
US7058937B2 (en) 2002-04-12 2006-06-06 Intel Corporation Methods and systems for integrated scheduling and resource management for a compiler
US7240048B2 (en) 2002-08-05 2007-07-03 Ben Pontius System and method of parallel pattern matching
JP2004318809A (en) * 2003-02-24 2004-11-11 Fuji Xerox Co Ltd Information extraction rule generating apparatus and method
US7093231B2 (en) 2003-05-06 2006-08-15 David H. Alderson Grammer for regular expressions
US20040260683A1 (en) * 2003-06-20 2004-12-23 Chee-Yong Chan Techniques for information dissemination using tree pattern subscriptions and aggregation thereof
US7607099B2 (en) 2003-11-03 2009-10-20 Intentional Software Corporation Method and system for reversible design tree transformations
US7685637B2 (en) * 2004-06-14 2010-03-23 Lionic Corporation System security approaches using sub-expression automata
GB2422450A (en) 2005-01-21 2006-07-26 3Com Corp Pattern-matching using a deterministic finite state machine
US20060242197A1 (en) 2005-04-22 2006-10-26 Igor Tsyganskiy Methods of transforming application layer structure as objects
US8762949B2 (en) 2005-05-31 2014-06-24 Alcatel Lucent Method and apparatus for incremental analysis of one or more properties of a program
US8145627B2 (en) 2005-06-10 2012-03-27 Hewlett-Packard Development Company, L.P. Use of connectivity analysis to assist rule-based optimizers
US8201106B2 (en) 2005-07-01 2012-06-12 Alcatel Lucent Method for transforming a tree structure into a more human-comprehensible document
US7624075B2 (en) * 2006-09-15 2009-11-24 Microsoft Corporation Transformation of modular finite state transducers
US7627541B2 (en) * 2006-09-15 2009-12-01 Microsoft Corporation Transformation of modular finite state transducers

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See references of EP2332068A4 *

Also Published As

Publication number Publication date
EP2332068A2 (en) 2011-06-15
WO2010039348A3 (en) 2010-06-03
CN102165434B (en) 2014-12-17
JP5530449B2 (en) 2014-06-25
CN103345464A (en) 2013-10-09
US8176085B2 (en) 2012-05-08
CN102165434A (en) 2011-08-24
US20100094906A1 (en) 2010-04-15
JP2012513046A (en) 2012-06-07
EP2332068A4 (en) 2013-03-06
CN103345464B (en) 2016-10-05

Similar Documents

Publication Publication Date Title
US8176085B2 (en) Modular forest automata
US7519577B2 (en) Query intermediate language method and system
JP5496772B2 (en) Method for building code executable for component-based application, computer-readable storage medium including program for executing the method, and compiler
US7823139B2 (en) Method and system for translating programming languages
US20090144229A1 (en) Static query optimization for linq
US20080281580A1 (en) Dynamic parser
Benzaken et al. Static and dynamic semantics of NoSQL languages
JP6377739B2 (en) Parser generation
US20050091589A1 (en) Hardware/software partition for high performance structured data transformation
WO2005041072A1 (en) Expression grouping and evaluation
WO2006054959A1 (en) Device for structured data transformation
US11262988B2 (en) Method and system for using subroutine graphs for formal language processing
Odersky Scala by example
US5701490A (en) Method and apparatus for compiler symbol table organization with no lookup in semantic analysis
Pusch Verification of compiler correctness for the WAM
Vukmirović et al. Extending a high-performance prover to higher-order logic
WO2023138078A1 (en) Method and apparatus for parsing programming language, and non-volatile storage medium
Odersky et al. Programming in Scala
Šaikunas Parsing with Earley Virtual Machines
Hjort Blindell et al. Tree Covering
Odersky Scala by example
Rohloff Analysis and implementation of hierarchical mutually recursive first class modules
Sabourin Computation over partial information: a principled approach to accurate partial evaluation
Lämmel et al. Foundations of Textual Concrete Syntax
CN116018581A (en) Transforming operations of a computer program for execution at a database

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 200980139411.6

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 09818172

Country of ref document: EP

Kind code of ref document: A2

WWE Wipo information: entry into national phase

Ref document number: 2009818172

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2011530081

Country of ref document: JP