The present disclosure relates to rules based data processing systems and methods for using the same.
There have been recent developments in data collection, storage, access, and organization in cloud-based systems that have made possible an explosion in the amount of data attached to individuals and corporations throughout the world. When data sets grow so large that they become awkward to work with using traditional database management tools, they are termed “big data”. Big data is presently a macro, but growing issue, affecting larger corporations, which have enormous exposure to transactional data on a continuous basis, and other organizations attempting to process large amounts of data from disparate sources, such as a large metropolitan government attempting to process data from cars, sensors, cameras and many other sources to manage traffic flow on metropolitan roadways. As social networks, cloud services, and media services expand, the magnitude of data per person is already starting to grow to an unmanageable level by both computer systems and the individuals to which the data is directly or loosely coupled.
There are efforts currently underway that are focused on allowing individuals to easily query these enormous data sets that surround them, known as personal search engines. Personal search engines will be important to enable individuals to better search and organize their own very large collective data sets, however, there will still be a point at which the magnitude of the collective data sets become unmanageable from an individual's capacity and willingness to devote time and effort to the querying process.
Likewise, existing communication technologies, such as E-mail and text, have become overrun by marketing messages, a mix of personal and work correspondence, and other clutter. There has been a failure to adapt to the nature of modern individuals' communication styles which have evolved from short, single messages between a few recipients to a more fluid communication style among dozens of participants in different geographic locations wishing to share a plethora of content types in a highly contextual format. Incoming e-mail communications, for example, lack an effective ability to offer a user contextual relevance to the messages, i.e., every piece of communication coming in is fundamentally handled the same way with minor filtering capabilities. The result of increased magnitudes of collective datasets surrounding individuals and inadequate communication, organization software tools is massive inefficiency. Again, E-mail, which was once a clear, clean channel with which to communicate for personal and business reasons, has become cluttered and inefficient.
Many years ago Japan's Ministry of International Trade and Industry launched a 10-year project to develop the “Fifth Generation Computer”, which was supposed to boost performance by using massively parallel processors operating on large databases, such as big data. The software was to be based on logic programming (i.e. the Prolog family of languages) for two reasons: at the knowledge-representation level automated reasoning would be based on logic, and at the hardware level the declarative nature of logic would make it possible to automatically schedule computations among the huge number of processing units within a machine.
The fifth generation computer project was terminated in 1992 for a number of reasons; including the fact that conventional “off-the-shelf” computers had improved so significantly that they soon outperformed the parallel machines, and the committed-choice feature in the logic programming languages destroyed their declarative semantics. From a hardware perspective, the project was simply ahead of its time. As of April 2012, 8-core processors were standard “off-the-shelf” products, and mobile phones were equipped with 4-core processors. Computers with 16 or 32 processor cores will be the new normal in a few years. From a software perspective, the declarative semantics problem remains an issue today that is only magnified when declarative programming is run concurrently over multiple cores.
Systems and methods are described for processing rules and associated bags of facts generated by an application in communication with a processing engine, database and rule engine that process the bags of facts in view of the rules and generate one or more rule-dependent responses to the application which performs one or more work flows based on the responses. The rule engine may apply forward-chaining, backward-chaining or a combination of forward-chaining and backward-chaining to process the rules and facts. An embodiment of a combination of a backward-chaining rule with a forward-chaining rule within the rule engine may include the steps of utilizing a fact inferred from a forward-chaining rule as a goal for a backward-chaining rule, unless the forward-chaining rule contains a condition that depends on negation of another forward-chaining inference, in which case execution of the forward-chaining rule is suspended, the dependency of the rule-predicate for the problematic fact is recorded in a table, and execution of the forward-chaining rule skips to the next untried fact to select a new rule to execute. Numerous novel applications that work in conjunction with the processing engine, database and rule engine are also described.
An embodiment of a rule engine may contain the foundation of various application embodiments capable of enabling intelligent processing of data through processes and workflows in a way that context and relevance in the data is achieved regardless of size or complexity of the datasets. Accordingly, this description will start with a description of an embodiment of the rule engine and then describe various possible application embodiments involving the rule engine as a central element.
Embodiments of the present rule engine may comprise a computer readable medium having stored thereon instructions that when executed on a processor cause a processor to perform various functions, steps, algorithms, processes and the like. Further, the rule engine may be stored on non-transitory, non-transient, or computer readable storage media. As used herein computer readable storage media may comprise any disk or drive configured for the storage of machine readable information and may include floppy disks, CDs, DVDs, optical storage, magnetic drives, solid state drives, hard drives, or any other memory device known in the art.
Embodiments may offer several new possibilities to bring intelligent processing of data into workflows to the masses that is unique for each actor within the system and highly contextually relevant. In one embodiment, a process engine may use a rule engine's rules to control a process and rule facts to represent a process state. In this configuration, the programming may become pure logic and mathematically sound with little to no unwanted side effects or dead end process states. Process state-transitions may be based on conditions, not static flows, which make the system very good at handling highly complex datasets. The system processes may use asynchronous message passing that add fault-tolerance capabilities into the system and is well suited for scalability. Rule semantics can be made independent of execution order, allowing for parallel execution on multi-core CPUs.
An example of a rule engine in accordance with an embodiment, as compared to an existing rule engine, follows. The point behind comparing the present embodiment to an existing rule engine is to highlight the pure logic, declarative aspects of the present embodiment. The existing rule engine is called DROOLS; it is a popular open-source rule engine written in Java, sponsored by JBOSS (since 2006 a division of RED HAT). It is not purely declarative, and it is not quite as succinct as the present rule engine, as the following example illustrates: To code a rule that says “if the parent of X is Z, and the parent of Z is Y, then the grandparent of X is Y”. The corresponding DROOL code may be written as follows:
The corresponding code for a present embodiment of the rule engine may be written as follows:
Both of these code examples are purely declarative, but DROOLS allows code to be written using a different, non-declarative rule, such as follows:
In the later DROOLS code, when the condition is triggered, the code first retracts the first parent-relation fact $p1 from the knowledge base (thus leaving the grandparent inference intact in the knowledge base while invalidating its logical support at the same time), and then the rule engine either turns off the computer, halts the virtual server (if the rule engine is operating in a cloud server environment), or causes some other fault to occur; all of which may be problematic for an application employing such a rule engine as any such fault may cause the application to hang and not complete a requested operation.
The same may not be the case with the corresponding code of the present rule engine embodiment because the declarative semantics cannot be destroyed. Further, by simplifying the code, the speed of the rule engine may be improved. A simple benchmark between a rule written using both rule engines illustrates such a performance increase. The benchmark rule measures only one specific function, the intersection between two sets of facts (known as an “inner join”) so as to avoid an apple to orange comparison. The DROOLS code may be written as follows:
The same rule expressed with the forward-chaining code of the present rule engine may be written as follows:
DROOLS is a pure forward-chaining rule engine, but in embodiments of the present rule engine, this rule may also be written using a backward-chaining function, as follows:
In the benchmark tests, operating on the same computer with all other conditions equalized, the forward-chaining version was 41% faster for 200,000 facts and 2.8% faster for 400,000 facts. The backward-chaining version was 61% faster for 200,000 facts and 16.9% faster for 400,000 facts. The core operation of the present rule engine may be the same for both forward and backward chaining: the matching of facts; it is only the disposition of the inferences that differs.
The underlying structure of a rule engine may be comprised of one or more algorithms that drive the engine. Referring to DROOLS example again, DROOLS is based on RETE, a matching algorithm developed by Charles Forgy. RETE operates by building a tree from the rules established by the user. Facts enter the tree at the top-level nodes as parameters to the rules and work their way down the tree until they reach the leaf nodes, i.e., the rule consequences. More specifically, the tree includes a network of nodes, where each node (except the root) corresponds to a pattern occurring in the left-hand-side (the condition part) of a rule. The path from the root node to a leaf node defines a complete rule left-hand-side. Each node has a memory of facts which satisfy that pattern. As new facts are asserted or modified, they propagate along the network, causing nodes to be annotated when that fact matches that pattern. When a fact or combination of facts causes all of the patterns for a given rule to be satisfied, a leaf node is reached and the corresponding rule is triggered.
The present rule engine has a number of features, some of which are algorithmic, that may make it well suited for developing applications that can take advantage of its pure logic programming. These features (further described below) include:
With respect to feature A, a “side effect” refers to a non-logical element, such as reading files, writing files, etc., where the rule engine could get hung up. In order for a rule engine to be mathematical pure, it is necessary to remove such side effects. If a rule engine has no side effects, it only has logical elements, which means that when an embodiment of the present rule engine produces an output given an input, the result is consistent with the declarative semantics (the mathematical-logical interpretation) of the logic rules.
In contrast, for example, in PROLOG, side effects are handled within the rule engine itself, which is generally the case for parallel processing rule engines as well. In such rule engines, all process-state changes are done as database transactions. There are also rule engines, such as those used by certain insurance companies, where all data is structured in the form of process states so that all data is available to the rule engine without database transactions. Such rule engines do not permit, however, data to be partitioned and isolated so many different processes using the same data may be run in parallel, which impacts the efficiency of the rule engine and corresponding applications.
For rule engines with database transactions, collisions are always possible because different processes may, at the same time, attempt to request transactions, i.e., read/write all or part of the same data. A database transaction has the following property: at any point in time, from the point of view of any agent not directly involved in the transaction, either all or none of the changes associated with the transaction have occurred. This property guarantees that the system or systems that store the process state are always in a consistent state. All non-trivial database applications depend heavily on this property of transactions.
In order to guarantee this transactional property, databases use one of two schemes for concurrency control when multiple agents request transactions at the same time in a way that causes resource contention: pessimistic concurrency control; or optimistic concurrency control. Pessimistic concurrency control acquires exclusive locks on all resources that will be involved in the transaction, while optimistic concurrency control is free from locking, but detects update collisions only at the final commit operation, after all of the processing has been done. When a collision is detected, the current transaction is rolled back and re-tried, until it can be completed.
Optimistic concurrency control is the standard scheme for scalable web applications because it is more efficient for scalable applications with low levels of resource contention, i.e., it is optimized for the most common case, which is the assumption that there will be no resource contention. Any application using optimistic concurrency control needs to be able to re-try any transaction that failed due to an update collision. In very simple applications, this is easy—just encode the database update logic within a loop that repeats until the transaction can be committed successfully. However, this requires the database update logic operation to be an idempotent operation (i.e., an operation that remains unchanged when multiplied by itself), otherwise the semantics of the transaction will depend on whether a collision occurred or not, i.e., on physically random factors.
While the database transactions could be moved to a process engine working in conjunction with the rule engine to avoid collisions impacting the rule engine itself, in such a case, the rule engine would no longer be able to roll back the transaction that resulted in a collision resulting in hang ups as described above.
By having no side effects, computations by embodiments of the present rule engine are idempotent by definition—there are no side effects and there are not external inputs except those that are explicitly controlled by an embedding application. This is not the case for other programming languages, and while it is possible to write idempotent programs in any programming language, there is no guarantee that any give application will be idempotent. Hence, using an idempotent programming language as an embodiment of the present rule engine to compute process-state transitions may make it much easier to product transactional state transitions that are governed by completely general (i.e., Turing-complete) transition functions.
Feature A also enables algebraic tools to be used to prove the correctness of a set of rules, and to prove/derive properties that are implicit in that set of rules. For example, rules may be tested in isolation, in a “clean” lab environment. Any situation that can happen in a production environment may also be simulated (with little effort) in an isolated test. Feature A also has security benefits in that is internally consistent and requires no outside input to resolve a problem. Hence, the rules are self-authorizing. This feature makes it is safe to allow untrusted external parties to provide their own rules and to run whatever code they like in order to produce a result, e.g., personalized configurations within an application.
Feature B allows negative conditions to be used in a declarative way. For example, an embodiment of the present rule engine may use this feature to provide if-then-else rules in backward-chaining. Other backward-chaining languages (e.g., PROLOG) have if-then-else, but lack declarative semantics. Forward-chaining languages (i.e., most rule engines, such as the insurance companies' rule engines described above) do not have if-then-else rules due to the nature of the forward-chaining algorithm. The present rule engine can also use explicit negative conditions in forward-chaining, which relies upon the unique way forward and backward chaining are combined in the present rule engine, as further described below.
Feature C, the combining of forward-chaining with backward-chaining, provides more expressive power than either forward or backward chaining alone. Not only in the trivial sense of having both options, but also by combining them by having a forward-chaining rule produce a set of inferences that is reduced by a backward-chaining filter/search rule to provide a single answer, or by using a backward-chaining query as a part of a forward-chaining rule's condition.
Feature D makes the present rule engine more powerful than less succinct alternatives.
Feature E is a useful implementation feature that enables control of distribution of the rule engine without harming the performance of applications that rely on network implementations.
Feature F allows for a traditional Finite State Machine to be implemented in a trivial way, and for several concurrent Finite State Machines to be implemented in an equally trivial ways within the same process, and for any contextual data used by the process state-transition rules to be stored in the same bag together with the process state. Feature F also adds succinctness to stored process-specific data. The data is immediately available as facts to be used in rule conditions. No extra code to perform database retrieval is needed. Feature F guarantees that any formal analysis of the process state needs to take into account only this specific bag of facts.
Feature G simplifies the modeling of complex concurrent processes and Feature H is good for scalability and fault-tolerance.
Feature F may be particularly important in that by treating the process state as a “bag of facts” rather than as a finite state machine, procedural execution may be isolated from logical execution. Without the isolation of logic, there is no concept of logical rule-driven state transitions. And without distinct state transitions, the process state is (or could as well be) just a bunch of randomly updated database records. Hence, the group or
The features set forth above give embodiments of the present rule engine a number of advantages over existing rule engines. For example, the ability to test rules in isolation makes applications written to use the present rule engine easier to test, debug, and maintain rules. The security benefits, robust handling of negation, combined forward and backward chaining, and the succinct rule syntax gives the rule programmer more expressive power than with existing rule engines. The fact that the process engine represents each process state as a bag of facts, that process state transitions are based on conditions, and that processes use asynchronous message-parsing makes it easier to model complex concurrent processes, thereby making the applications that use the rule engine less expensive to produce and maintain. The ability to use algebraic tools to prove the correctness of a set of rules and the fact that any formal analysis of the process state only needs to account for the fact that a bag of facts is true for the current state, enables applications to use automated reasoning and proofs about rules to optimize processes and avoid errors. And, while other programming languages use pure mathematical logic, are succinct, and can be implemented in a network configuration, they are not rule engines.
As noted with respect to Feature C, the combination of forward-chaining and backward-chaining, as well as how negation is handled in forward-chaining rules, may be very powerful. Forward-chaining is “supply-driven”. It starts with individual given facts, and figures out what can be inferred from them via rules. A flight selection application based on an embodiment of the present rule engine may include a basic algorithm for implementing forward-chaining. For example:
This rule needs some facts to work with, so assume the following facts:
It should be noted in the example of rules provided herein, spaces have been added to make the rules easier to read. An explanation of the proper syntax for writing such rules is further provided below.
The forward-chaining rule set forth above may now infer the new fact candidate (“BA-0777”). The intended meaning of this inference is that flight number BA-0777 is a possible flight candidate for the request since it satisfies the conditions of the request.
A simplified embodiment of the present rule engine incorporated into a flight selection application may handle this forward-chaining rule as follows: For each fact in the give set of facts, i.e., request (“Stockholm”, “London”), the rule engine may look at each rule that contains some variation of request (X,Y) in the condition part of the rule (the antecedent), then may match this against the fact and may create an instantiation of the rule by constraining two of the variables, From=“Stockholm” and To=“London”. The rule instantiation may look like this:
The rule engine may then inspect any remaining parts of the condition, in this case nonstop (“BA-0777”, “Stockholm”, “London”), for matches to the set of facts. In this case, one match is found since the given fact nonstop (“BA-0777”, “Stockholm”, “London”) matches. This match makes the rule condition true, and the inferred fact candidate (“BA-0777”) may be added to the set of facts. All inferred facts may also be tried against the rules in the same way as the given set of facts, so inferences and combinations of inferences may produce further inferences, and so on, and the algorithm may continue until there are no more untried facts to feed it with.
The flight selection application that invoked the rule engine may now inspect the final set of facts and look for any interesting inferences, or it may let the rule engine do the looking by running a backward-chaining query. Backward chaining is “demand-driven”. It starts from a hypothetical statement and figures out if the statement is a consequence of the rules. The statement may contain logic variables, and in that case, the statement might be true only for some particular values of those variables. The backward-chaining algorithm may then calculate those values. This makes backward-chaining suitable for querying a knowledge base.
In accordance with an embodiment of the present rule engine, backward-chaining rules may have a more complex structure than the forward-chaining rules. Instead of a number of separate “if-then” clauses, the “if-then” clauses in backward-chaining may be connected to each other via an “else” operator. This provides backward-chaining with a committed-choice feature with pure declarative semantics, which is distinguishable from existing logic programming languages that utilize non-logical commit and pruning operators.
Continuing with the flight selection example from above, if there had not been a nonstop flight that would take the user to the desired destination; it may still be possible to get there via a connecting flight. Backward-chaining may let us query the rule engine about possible connections, such as follows:
Again, certain facts may be assumed for the example, such as:
If the backward-chaining engine is give the query possible_flight (“Stockholm”, “San Diego”, X), it may try to find a logical proof of this statement and provide one or more value for X. The backward-chaining algorithm may precede by instantiating the appropriate rule, using the goal parameters to bind variables in the rule, which may result in:
The next step may be to evaluate the condition of the first “if-then” clause, which may be done by invoking the backward-chaining algorithm using the condition as the goal, in this case nonstop (Code, “Stockholm”, “San Diego”). Since nonstop is an elementary fact predicate, the goal can be matched directly against the fact store. Since there is no nonstop flight from Stockholm to San Diego, no match can be found so the condition fails. The next alternative clause may then be tried (the one following the else). This condition is a conjunction of two elementary fact predicates. First nonstop (Code1, “Stockholm”, Stop) is matched in the same way as the first clause, and in this case two matches are found, giving the following corresponding variable bindings:
Then nonstop (Code2, Stop, “San Diego”) is matched, non-deterministically since there are two values for stop from the first nonstop goal. One match is found for each of the stop values, and the total solution set for the conjunction is:
At this point, the “if-then” clause is committed since its condition is true. This means that no more alternative “if-then” clauses may be considered for the goal. In this case there weren't any alternatives left anyway, but if there had been they may have been pruned. The original goal is now replaced with the subgoals in the “then” clause, and the backward-chaining algorithm may start again. This process may keep on until there are no more goals left to solve, or until one of the goals fail (causing the whole proof to fail). There is also a third possibility; a suspended proof due to one of several possible reasons, most notably conditions on values of variables that are never bound.
In the example of backward-chaining provided above, backward-chaining finished quickly since the subgoals that replace the original goal consist of the single goal X=[Code1, Code2]. This goal is not broken down further into subgoals since “=” is a built-in predicate that is evaluated by a procedure in the rule engine. The backward-chaining algorithm terminates successfully with two solutions sets for the original query:
Each of the X values corresponds to a different acceptable possible route from Stockholm to San Diego.
Ignoring non-determinism, naïve sequential backward-chaining (e.g., PROLOG) is very similar to the familiar stack-based execution model used to implement traditional procedural languages.
In accordance with an embodiment of the present rule engine, in the forward-chaining example above, the rule may be replaced with a rule that allows not only nonstop flights, but also connecting flights, such as:
Inclusion of forward-chaining inferences within a backward-chaining rule is almost as simple as the above. A backward-chaining goal may consist of any elementary fact, including any fact inferred from forward-chaining, hence it would appear that there would be nothing special about referring to the result of a forward-chaining rule from a backward-chaining rule, but this is not the case. There are issues that arise when a forward-chaining rule contains a condition that depends on the negation of another forward-chaining inference. To understand this, take the previous example rule, but add the extra condition of the flight not being cancelled, such as:
The issue in the context of the embodiment is how and when to evaluate cancelled (Flight) so that it can be determined whether candidate (Flight) is true or false. An example of how this can be problematic is as follows: Assume that flight BA-0777 is not unsafe. Logically, this means that cancelled (“BA-0777”) would be false, since no rule implies that it is true and the rule engine works under a closed-world assumption. Therefore not cancelled (“BA-0777”) is true, which implies the fact candidate (“BA-0777”). The problem with this implied fact is that the truth-value of cancelled (“BA-0777”) cannot be computed until all possible applications of forward-chaining rules having cancelled (Flight) as the consequent, have been exhausted. It is not possible to know when all such rule applications have been exhausted, however, until the forward-chaining algorithm has completed.
The cause of the problem in the above example is the negative condition not cancelled (Flight). If all conditions depend only on positive facts, without negations, then the execution order of the rules is unimportant. Negations, however, make the forward-chaining algorithm order-sensitive. Hence, the seemingly simple forward-chaining algorithm has to be modified to handle the problematic rules in the correct dependency order.
An embodiment of the present rule engine, in runtime, detects attempts to use inferred facts in negations, and in fact any attempts to use them anywhere inside a backward-chaining rule, since the negation problem may also appear if the reference to the inferred facts is dynamically nested somewhere inside a negated goal. When this situation is detected, the current forward-chaining rule execution is suspended, the dependency of the rule-predicate on the problematic fact is recorded in a table, and the forward-chaining algorithm skips to the next untried fact to select a new rule to execute. An example of an order-dependency table may appear as follows:
There can be more than one dependency for a single predicate, but in this case candidate/1 has only the single dependency cancelled/l. Use of the term “/1” means a single-argument predicate. Predicates with the same name that have two, three or more arguments are considered separate predicates.
When all non-suspended forward-chaining has finished, the order-dependency table is scanned and all predicates that occur as dependencies, but don't have any dependencies themselves, are marked for closure, which in this context means that the closed-world assumption is now valid for these predicates, and they can be safely used in negations. Forward-chaining is then resumed for the rule executions that were previously suspended. Then the whole procedure may be repeated until one of two situations arises:
A more complicated example involves the rule for cancelled being replaced with:
In this table, only approved/1 occurs in the table without having any dependencies itself. When the table is interpreted as a graph (mathematically a directed graph), approved/1 is the only leaf node. Thus, only approved/1 is closed before the suspended rule executions are resumed in a new forward-chaining run. Whereas cancelled/1 cannot be closed until it is known if any new cancelled/1 facts could be inferred by negations of conditions that contain approved/1. The second run will therefore suspend candidate/1 once again, but this time cancelled/1 is free of dependencies and can be closed. The third run will finish without suspensions and the forward-chaining algorithm will be completed.
As long as no cycles occur in the dependency graph, this forward-chaining algorithm will always handle negations successfully, i.e., it will never end up in situation 2 above. And, if cyclic dependencies do occur, situation 2 may still result in success, but it may also result in failure (aborted proof) since inferences might still be made that contradict the speculative assumption that the corresponding predicate could be closed earlier.
A flow chart illustrating forward-chaining rules with negation, or combined backward-chaining and forward-chaining rules with negation, as handled by a process engine working in conjunction with a rule engine, is illustrated in
While the combined forward-chaining and backward-chaining rule (with negation), may appear fairly simplistic, this particular combination is not insignificant. As noted above, the insurance company solutions only used forward-chaining, while the Fifth Generation Computer project only used backward-chaining. Forward-chaining is data or event driven while backward-chaining is good for calculations where you have a goal and need a solution. Forward-chaining preprocesses facts to produce inferences, while backward-chaining seeks to find the best solution given the facts. Combining the rules allows the powers of both rules to be harnessed. For example, with the combined rules, facts can be applied to a backward-chaining rule or a forward-chaining rule without otherwise using a backward-chaining rule or forward-chaining rule itself. Combining the rules in this manner through a process engine that handles the negation issue discussed above, has not been done, and the result is extremely powerful, yielding many of the desirable features noted above.
In order to utilize embodiments of the rule engine described above, it is now necessary to understand more about its semantic details and how it can be used. In the construction of rules and facts, facts are represented formally as predicate symbols together with zero or more arguments. Examples include:
The meaning of such formalized facts depends on the intended human interpretation. This interpretation involves decisions about formal or informal vocabularies and local or global conventions for how to abstract relational expressions into predicate symbols. Using the examples above:
“holiday” could mean: today is a holiday
“amount (170)” could mean: the order amounts to 170 units of currency
“service (takeout)” could mean: the customer picks up a prepared meal for consumption elsewhere
“location (“Sundbyberg”)” could mean: Sundbyberg is the location where the customer wants the ordered item delivered
“depends (margherita, basil)” could mean: pizza margherita depends on the availability of fresh basil.
Predicate symbols are not restricted to strings of letters. More descriptive strings can be used, either by using underscore characters that separate words, or by enclosing the whole strings in either single or double quotes:
This can sometimes contribute to increased clarity, but the extra code bloat and loss of abstraction can easily negate all positive effects. In the end it's a judgment call for which the programmer is ultimately responsible.
The arguments of a predicate represent the objects that the corresponding fact is “talking about”. For example, the fact amount(170) says something about the number 170, i.e., it is the amount of the order. And, the fact depends(margherita,basil) says something about the pizza type margherita and the herb basil. Formal logic doesn't really care about what the symbols margherita or basil means, and in its most pure form logic doesn't even care about what 170 means. The idea that it is an ordinary number is just one of many possible interpretations. The only thing that matters in pure formal logic is how various expressions of truth are related to other expressions of truth, where the fundamental truths are taken for granted as axioms or as contingent truths describing empirical observations. Therefore all objects are simply represented as abstract symbols, either as symbolic constants (atomic terms) or as functions of other object representations. This abstract representation of objects is known as “Herbrand terms” after the French mathematician Jacques Herbrand who invented them in the 1920s.
The set of Herbrand terms is defined recursively:
1. Any constant symbol is a Herbrand term. Examples: foo, x, 42, −3.14, “I am the walrus”.
2. A function symbol applied to a list of Herbrand terms is also a Herbrand term. Examples: foo(bar), f(a,b,c), f(g(a,f(b)),c).
Function symbols and constant symbols have the same syntax as predicate symbols (as described in the previous section). Please note that symbols that begin with an upper case letter or underscore are interpreted as logic variables, so such names cannot be used for constant symbols, function symbols, or predicate symbols, unless they are quoted.
From a programming perspective, compound Herbrand terms with arguments may be viewed as constructors for generic data structures, a type of isomorphism that is common in other types of languages. It should also be noted that a zero-argument predicate is just an atomic proposition from a logical perspective. Even though such propositions generally talk about objects in some semantic interpretation, this circumstance is completely invisible in a formal context, and in this context the propositions are for all intents and purposes opaque. Predicate logic that involves only zero-argument predicates and nothing else, is in all respects equivalent to propositional calculus.
Some facts, rules, and terms may be written with operator notation instead of the normal functional notation, e.g. as x op y instead of op(x,y), or op x instead of op(x). This is pure syntactic sugar which has no relevance whatsoever as far as the semantics are concerned. For example, the Herbrand term sqrt(3**2+4**2) is in all respects except superficial syntax completely equivalent to the Herbrand term sqrt(‘+’(‘**’(3,2),‘**’(4,2))).
All operator symbols are predefined, and their names and precedence relationships can be found below. Built-in operator symbols make it easy to write arithmetic formulas in the way they are normally expressed. However, in pure predicate logic there is no automatic interpretation of such formulas. Evaluation of arithmetic formulas only occurs in a specific set of “arithmetic aware” built-in predicates: eval, <, etc. And, the unification predicate ‘=’ is only concerned with the structure of Herbrand terms, so for example 2+2=4 is actually false since ‘+’(2,2) and 4 are two distinctly different Herbrand terms. However, eval(2+2,4) is true, since eval maps arithmetic expressions to numeric values.
Rules are expressed using pure predicate-logic. Technically speaking, rules are represented by a form of logic sentences called first-order Horn clauses over the domain of Herbrand terms. This means that each and every rule has a logical interpretation that is well-defined and independent of any specific rule engine implementation or any particular encoding. It also means that invocation of the rule engine can never have any side-effects, and that all expressions within the rules have referential transparency.
The reasons for using first-order logic and Horn clauses are that this combination makes rule resolution mathematically and computationally tractable. There are efficient proof algorithms for first-order Horn clauses, and it is known that purely propositional Horn clauses can be proven in polynomial time. The pure Horn clause model is extended with negation-as-failure together with if-else-logic, and there are also a number of built-in predicates whose first-order interpretation can only be understood as infinite axiom schemas. However, none of these extensions have semantics that deviate from pure logic in any way.
There are two general reasoning methods used by embodiments of the present rule engine: forward-chaining and backward-chaining, as described above. In forward-chaining, the rule engine starts with a set of base facts, then finds the rules that have conditions matching those facts, and makes inferences from the rules. These inferences are then taken as new facts, and the process is repeated until no new inferences are made, or until some rule infers false, which signifies a logical contradiction. In backward-chaining, the rule engine starts with a query, expressed as a predicate which may contain variables. This predicate is assumed to be either a base fact or an inference from a rule, and the rule engine then finds out under what conditions this predicate is true. If the predicate matches one or more facts, these facts constitute the answer to the query. If the predicate matches an inference from a rule, each condition for that rule is treated as a backward-chaining query, and the answer to the query that invoked the rule will be the set of solutions that is common to all the conditions. The language described herein provides support for both forward and backward-chaining, by using notation that specifies which method to use for a particular predicate. Each predicate is specified either by forward-chaining rules or by backward-chaining rules, and these are syntactically distinct. There is also a third type of predicate: fact predicates that are specified by a set of base facts.
Forward-chaining rules are written with the predicate-to-be-defined on the right and the conditions on the left, as follows:
If the above definition of fish/1 (i.e. the predicate named fish with one argument) is in a context where the base facts aquatic(nemo) and hasGills(nemo) are true, forward-chaining will infer the fact fish(nemo) and add it to the set of proven facts. This new fact is then treated as if it were a base fact, triggering all forward-chaining rules that contain fish(X) in their conditions, if any such rules are present.
Forward-chaining is very useful for taxonomy (classification) of something that can be described by a relatively small set of facts. The above example shows only two inference rules, but in a more complex scenario there could be many thousands of classification rules. In such a case, forward chaining guarantees execution times proportional to the number of rules whose conditions contain only those predicates that are present in the small set of facts, rather than the total number of rules. This is quite different from backward-chaining, which is described below.
Backward-chaining rules are written with the predicate-to-be-defined on the left and the conditions on the right, as follows:
Alternatively, the same predicate definition can be written using two long-arrow (“-->”) clauses, as follows:
The predicate connected/1 is true for all nodes in a network that are connected to the node named roma. Direct links between nodes are given as base facts, as follows:
To answer the query connected(milano), referencing back to the clauses above, backward-chaining will start by matching the query against the definition of connected/1. The first clause does not match because roma and milano are two distinct constant symbols. But, the second clause matches with A=milano, producing two new queries link(milano,B) and connected(B). The first of these queries determines the possible values of B, which in this case are B=genova and B=torino. This leads to two alternatives for the remaining query: connected(genova) and connected(torino). Backward-chaining is applied to both of these alternative queries, and the first one produces connected(Firenze) which in turn produces connected(roma) which matches the first clause in the definition of connected/1, producing the query true, which ends the chain of proof.
Backward-chaining is very useful for searches and decision-making, and it is especially efficient when the rules have relatively few cases and the number of facts is large. In the above example, adding a couple of million extra link/2 facts would not affect the execution time at all for the original query, as long as none of these extra facts are needed for the proof of the query. This is quite different from forward-chaining, where all facts are matched against the rules, regardless of whether they are needed or not.
For backward-chaining rules, the defining clauses are always mutually exclusive. This is by design: for each clause, all choice conditions for all the previous clauses are implicitly negated. This restricts the semantics compared to languages that use arbitrary Horn clauses for backward-chaining. The benefits of this design are explained below relative to the description of “deterministic-choice logic”.
Backward-chaining definitions are also useful for computing values. For example, if the link facts listed above were extended to include the distance between the linked nodes, such as:
The distance to roma from another node can then be computed by the following predicate:
The answer to the query distance(milano,X) will be computed via backward-chaining to be distance(milano,150+270+300+0). As discussed above, X=Y+Z does not perform any arithmetic, it just unifies Herbrand terms. Accordingly, the solved value for X is the compound term 150+270+300+0 rather than the symbolic constant 720. In order to calculate the latter, the definition must use eval/2 to evaluate the sum:
It is not possible to mix the different types of definitions for the same predicate. For example, if foo/3 has a backward-chaining rule, there cannot also be a forward-chaining rule that has foo/3 as its consequent.
However, it is possible to use a forward-chaining predicate in a backward-chaining query, and it is also possible to use a backward-chaining predicate as a condition in a forward-chaining rule. The first case is fairly straight-forward: when all forward-chaining inferences have been made, the forward-chaining predicates look just like base facts in a backward-chaining context, and may be used in the same way as base facts are used.
The second case is slightly more complicated. A backward-chaining query may be mixed among the conditions in a forward-chaining rule, for example as follows:
Assuming the base fact departure(milano) and a backward-chaining definition of distance/2, this rule will calculate Y via backward-chaining, giving, e.g., 720, and then make the forward-chaining inference travel(720) as described above regarding the combination of forward-chaining and backward-chaining.
Non-determinism is when a single invocation of a rule can produce more than one possible answer. For example, assume the following base facts:
The query depends(X,Y) will produce three combinations of values for X and Y:
The ability to do non-deterministic queries is both powerful and dangerous. It is powerful since it makes it easy to express conditions that depend on a match between two or more facts. Take for example the rule:
This rule matches all licensed sellers of goods with all buyers of the goods offered, according to the fact predicates in the condition part of the rule. For all matches found, a set of trade/3 facts are produced as inferences. All of this is done by a single line of code. The dangerous part is that it is very easy to write deceptively simple rules that require intractable amounts of work to resolve due to unexpected non-determinism—getting multiple sub-query answers each of which is matched against more multiple answers, causing a combinatorial explosion. The remedy for this non-determinism is deterministic-choice logic, which is further explained below.
Negation makes a true sentence from a false sentence, and a false sentence from a true one. Negation is only supported herein in a limited format, due to restrictions in the underlying resolution procedure. Most notably, base facts and inferences can never be negated. They must always be positive. E.g. it is not legal syntax to write:
The other limitation is that the proof of a negation can never assign values to variables, for which there is a good reason. For example, assume that some condition contains as one of its parts “not depends(margherita,X)”. This could theoretically be proven true with an infinite number of solutions for X:
But doing so is clearly impractical, so the only situations where the negation not depends(margherita,X) can be resolved are the following:
In all other cases the proof of the negation will be suspended. The condition that contains the negation may still be proven false due to some other part of the condition being false, but any proof that depends on the condition being true will be suspended also, possibly resulting in a suspended proof for the top-level query.
It should be noted that negative facts can sometimes be “emulated” by introducing a few extra predicates and rules. For example, if a rule uses a fact predicate accepted(X), another fact predicate not_accepted(X) can be introduced to represent the negated case. Since this is formally a positive fact, it can be used in rules without restrictions. To avoid inconsistencies in the interpretation, rules of the following form may be added:
Whenever “false” is inferred, the proof is aborted and the detection of a contradiction is signaled to the embedding application.
The same technique can be extended to handle any set of facts which are collectively exclusive, e.g.,
Deterministic-choice logic is when a predicate is defined by several clauses in such a way that at most one of the conditions can be true simultaneously. For example, if something is to be categorized into one of the categories standard, gold, or platinum, depending on the truth-values of the facts good, better, and best. One might try the following approach:
However, this will not work as expected if, for example, both good and better are simultaneously true, since two facts will then be inferred: category(standard) and category(gold). Since only the second of these is desired, the conditions need to be made more precise, as follows:
This shows the logical meaning of “else”: it is a connective that implicitly negates the previous condition. All backward-chaining predicate definitions set forth herein use deterministic-choice logic via “else”. This applies to predicates defined by the “-->” syntax as well. The above example looks like this in the arrow syntax:
If the predicate arguments contain pattern-matching terms, this pattern matching is technically also part of the guard. If no colon-delimited condition is present, the guard consists only of argument pattern-matching.
The proof of a guard can never assign values to variables that are external to the guard. For example, assume the following clauses and base facts:
In some cases, the limitation that guards cannot assign values to external variables can be overcome by introducing an extra variable which is free within the guard of the first clause:
The benefit of always using deterministic-choice logic in backward-chaining is that it guarantees that non-determinism is never introduced by trying clauses during backward-chaining. Non-determinism may still occur via fact queries, but those cases are much easier to predict and recognize. Using fact queries is also the recommended way of writing backward-chaining rules where non-determinism is explicitly desired. Forward chaining does not use deterministic-choice logic. It would make no sense since the clause conditions are not tested in any predictable order during forward chaining.
In theory, if-then-else is not the only possible way to accomplish deterministic choices. Another possibility is N-way exclusive-or, and there are many other ones. However, if-then-else is familiar to everyone, and it has the advantage that the proof algorithm can be implemented very efficiently.
The “closed-world assumption” is the assumption that anything that is not known or proven is false. This assumption is reasonable in formal contexts where rules and data are by definition “complete” for the purpose at hand. For example, a company may have records of debtors that owe the company money. It is reasonable to treat everyone formally as a non-debtor who is not found in the company's records of debtors, even if there is a possibility that people may exist who owe money, but who haven't been recorded as debtors. In present embodiments, the closed-world assumption is necessary for proving a negation true, and (equivalently) for proving a guard false. Other than that, the closed-world assumption makes no difference.
Since negation and deterministic-choice logic such and powerful tools, the closed-world assumption is implicitly made for all predicates the opposite assumption is specified. The opposite is called the “open-world assumption” and present embodiments have a special declaration for it, which can be used for predicates that are exempt from the closed-world assumption. For example:
Only facts and forward-chaining predicates may be declared as open-world. Backward-chaining predicates are always closed-world, since they use deterministic-choice logic, where predicate definitions are always complete. Syntactically, the open-world declaration is tagged by a meta statement, as shown in the example. The complete list of meta statements can be found below.
In order to make it easier to build complex systems from simple parts, the rule syntax of the present rule engine has built-in support for namespaces. Each symbol really consists of two parts: a namespace prefix, and a local name. For example:
This implicit namespace can be changed by adding a namespace declaration to the code:
Any mention of bar after this declaration will be interpreted as foo::bar. And the same goes for any other symbol, e.g. baz, mentioned after the namespace declaration.
But it is also possible to change the implicit namespace for just one particular symbol. This is done through an “import” declaration:
These four namespace tags should be avoided when naming private namespace. It should be noted that imports are just instructions to the parser that certain symbols shall be renamed. If a user what wants to use a symbol such as eval for a predicate definition, despite the fact that eval is normally pre-imported from the core namespace, then the user can simply write:
All software based on logic has its own idiosyncratic limitations, which are due to design considerations and implementation-related cost/benefit tradeoffs. But there are also other limits, which are inherent in logic itself. These limits are non-negotiable from an engineering point of view, in the sense that any tool that uses logic will be affected by these limits, since they follow from theorems of mathematical logic, including:
In explanation of the above, the first limit simply means that first-order predicate logic is so expressive that it can be used to state problems that are impossible to solve. A famous example is Alan Turing's halting problem: it is possible to write a logic formula that is true if a computer halts after executing a program, and false if the program loops forever. But no algorithm exists that can decide whether that formula is true or false. The second limit means that given a bunch of variable-free formulas, deciding whether a proposition is true or false is always possible in principle, but has a cost that as far as we know is exponential in the size of the problem (i.e. the total size of the facts and rules involved). The third limit says that even though variable-free Horn clauses can in fact be solved with reasonable efficiency; they are not as expressive as full first-order predicate logic.
Predicate logic is about propositions that make claims about “all” or “some”, e.g., “some cats are black” or “all Cretans are liars”. This later phrase is attributed to the Cretan philosopher Epimenides around 600 B.C. Since Epimenides was himself a Cretan, this is considered to be one of the earliest examples of a logical paradox. Formally, a predicate is a relation between n objects (the predicate arguments), where n can be 0, 1, 2, . . . and the predicate is true when the relation exists, otherwise it is false. A proposition in predicate logic normally contains quantified variables, which means variables that are introduced by saying “for all X . . . ” or “there exists an X such that . . . ” and then using the variable X in the proposition that follows.
First-order predicate logic (FOL) is predicate logic where the quantified variables can be used only as predicate arguments, never as predicates themselves. So in first-order logic you can express “all cats are black”, but not “all logical relations are true”. Predicate logic is extremely expressive, but predicate logic sentences are in general very hard to solve. It has been proven that there cannot exist any algorithm that is able to prove every true (tautological) proposition in FOL, unless all predicates are restricted to only one argument, i.e. where no multilateral relations are allowed.
Embodiments of the present rule engine use a subset of FOL that has an efficient proof procedure. The subset is known as “Horn clauses” and the proof procedure is known as “Robinson resolution”. Every program written for the present rule engine that returns an answer is guaranteed to have logical semantics, i.e., it can be proven from first principles that any answer or conclusion from any such program is always logically correct. There are however situations when no answer will be returned at all.
Operators used in embodiments of the present rule engine are listed in the table below, in descending order of precedence. Right-associative operators are shown as X•Y, while left-associative operators are shown as Y•X. Prefix operators are shown as either •X or •Y; both mean the same thing since no associativity is involved.
Right-associative operators are nested like this:
Embodiments of the present rule engine also contain a few built-in predicates. Such predicates are evaluated by the rule engine itself rather than by being proved by applying the resolution algorithm to facts and rules. Most built-ins use one or more arguments as input data, and optionally another argument that is unified with some computed output data. If the input data is an unbound variable, the built-in suspends until it gets a definite value. It is pretty obvious for most predicates which argument is input and which is output, so it is not explicitly stated here which one is which.
Arithmetic predicates can use different evaluators depending on the application. The default is an evaluator based on “java.math.BigDecimal”. This means that all numeric values are represented as arbitrary-precision decimal numbers of finite length. Rounding and extending the precision during calculations is done according to the rules of “java.math.BigDecimal”, unless otherwise noted.
These predicates evaluate arithmetic expressions:
Arithmetic expressions are just Herbrand terms with a special interpretation. A numerical constant is interpreted as the corresponding numeric value. Other terms are interpreted according to the following tables.
Pi 3.141592653589793, which is the value of # to 16 digits accuracy.
E 2.718281828459045, which is the value of e to 16 digits accuracy.
Embodiments of the present rule engine have syntactic sugar for writing terms that contain external parameters. If a variable begins with a $ sign it is interpreted as an external parameter, which is accessed via the built-in predicate sys::param. For example:
The exact semantics of sys::param varies depending on the application. In the process engine for example, there is an external parameter generated by the timer named TIME which has the value of java.lang.System.getCurrentTimeMillis( ) at the point in time when a process state-transition is initiated. In the standalone rule-engine on the other hand, sys::param is simply defined as:
The following is a list of builtins that test or extract symbolic information about terms, and construct new terms from such information.
A simple reflective “call” primitive has been added to embodiments of the present rule engine for practical reasons. In theory this is a second-order extension to first-order logic, but in practice it is just a limited tool for reflective programming. It is only for convenience—it does not provide any functionality that cannot be obtained in a straightforward but more elaborate way using regular first-order constructs. The main purpose is to provide a simple way to express negation. Another use is to allow for callbacks into the runtime symbol table from a rule that was defined elsewhere.
The two-argument call(X,Y) is a sort of “uncurrying” version of the single-argument call(X). For example, call(p(A,B,C),[X,Y,Z]) is equivalent to call(p(A,B,C,X,Y,Z)).
As can be seen from its definition, the predicate not makes a reflective call from within a guard. This means that e.g., not(hasFeathers(X)) can never produce solutions like X=garfield or X=fido. Instead it will suspend until X gets a value that can be tested.
As previously noted, negations are to be understood with a closed-world assumption. This assumption means that a predicate is considered false if all of its clauses fail to solve it. There can be no additional clauses outside of the current rule-set that might solve the predicate.
The built-in definition of or is just an application of De Morgan's theorem, using the built-in limited version of not. This is useful in the context of simple tests, but it won't handle disjunction that introduces full-blown non-determinism. A disjunction predicate that handles the general case could be defined like this:
Syntactic sugar for existential quantification is for convenience, i.e., one could do entirely without this by introducing extra “helper” clauses whenever existential quantification is needed. Note that there is no syntax for universal quantification (V). Universal quantification is implicit at the outermost level of a Horn clause, for all of the variables contained inside it. Since the antecedent part of a Horn clause is formally contained within a negative formula, this universal quantification is completely equivalent to existential quantification for variables that are present only in the antecedent.
This would not make sense since the scope of the existentially quantified variable Y is lexical.
A typical use of this clause is when there is a need to express something like: “if there is a dancer who does not have a partner, then . . . ” One would naively expect something like this to work for the conditional part:
The problem is fixed by using existential quantification:
This is semantically equivalent to the following solution where an extra “helper” predicate is introduced:
In embodiments, the fundamental time coordinate is Java's “timeMillis”, which is approximately the number of milliseconds since 00:00:00 UTC on Jan. 1, 1970. It is approximate for two reasons: the computer's clock may not be perfectly synchronized with UTC, and UTC uses leap seconds which are not accounted for in the time coordinate. As of 2009, exactly 24 leap seconds have been inserted since 1970, so the true number of elapsed milliseconds is 24000 higher than the nominal time coordinate. Atomic time (TAI) can be derived by offsetting the UTC date with the extra leap seconds, and then adding 10 more to account for the initial offset between UTC and TAI.
The arguments of the sys::date compound term have the same values as the following Java fields:
ISO—8601_week_number is the week number as defined by ISO 8601, where week 1 is the week that contains January 4, and the week number changes between Sunday and Monday.
These could have been defined within the language, but are provided for convenience.
The general syntax for a meta statement is:
Implementation of an embodiment of a system for operating the present rule engine can be accomplished in a number of different manners. The main functional components for implementation of such a system may include a JAVA EE server, which contains the rule engine, a file repository, which serves the rule definitions and configuration files, a SQL database, an optional SSL reverse proxy, and a load balancer. In a development environment, no load balancer was used and all remaining components of the system were run on the same server, but the different components have been moved to separate machines and operated successfully. It is to be noted that the file repository is not necessarily a homogenous service. Different types of files could be served from different sources, e.g., mounted file systems, SQL databases, web services (WebDAV or plain HTTP), DROPBOX, etc. For purposes of the present disclosure, however, the file server will be assumed to be an SQL-based web server.
OR-parallelism in backward-chaining is illustrated in
While extremely powerful, the logical programming language and syntax of embodiments of the present rule engine and the logical construct of a process engine, generally regardless of the type of engines utilized, are complicated and difficult for many people to readily understand. While some people can learn how to use a rule engine and process engine to write the lines of code necessary to effectively utilize the power of the rule engine and process engine to create useful and adaptable application programs, doing so takes considerable time and tends to generate highly varied results. Rather than attempt to teach most users the language and syntax of the rule engine and the most effective manner of taking advantage of the process engine, an embodiment, illustrated in
The rule writer may make it possible to leverage standard rule templates generated by the rule writer with pre-defined process states, actions, input types and output types that are relevant for specific end use applications, to enhance the usefulness and processing of data. The type of applications may include business workflows for colleague collaboration, a mobile personal assistance application, and other applications as further described below.
To further understand the overall logic application system of the embodiment, reference is made to
The configurator 614 may receive input data from users in a variety of different ways, as illustrated in
Option one, which includes the instructions for writing one or more rules in the form of input 702, state 704, output 706 and actions 708, is intended for users that have a very clear understanding of what they want an application written using the rule engine and process engine to perform. Under option one, the user may be required to be able to identify a number of different process states 704 that they can anticipate the application entering during its operation, the one or more inputs 702 that may be received at each of those states 704, the one or more expected outputs 706 of each state 702 and the one or more actions 708 to be performed at each state 702. Option one may also require that the user be able to identify some logical aspect of each of the actions 708, such as forward-chaining or backward-chaining or a combination of both as described above.
For example, if an application related to the processing of information about a newly hired employee, a first state might involve the evaluation of data received as an input, such as an employee name, and action to determine if all of the required data regarding the name had been received, such as a family name, a given name and either a middle name or a null entry indicating that the employee has no middle name. If all of the required data had been received by the first state, then an action to be performed may involve approving the name and forwarding that name to one or more other states that perform additional actions, such as creating a record for the employee in a human resources system, as long as one or more other necessary inputs are also received, etc. Likewise, if the name had not been approved, the action taken may involve returning the name to the input source for correction.
As noted, a single state may have multiple inputs, multiple outputs and multiple actions associated with that state. Within option one, a user may be capable of defining, at least to some degree, the nature of the action to be performed in such a way as to make it easier for the rule writer to craft an appropriate rule or rules for the specified state. For example, if the user is able to recognize that the input is a fact that can be used in a forward-chaining process, the user could identify the action in this manner. Likewise, if the user is able to recognize that the input is a query that can be used in a backward-chaining process, the user could identify the action in that manner. Some actions lend themselves to both forward-chaining and backward-chaining processes, which a user may not recognize, so the rule writer 110 includes the ability to assess the user input instructions and develop appropriately efficient rules based on those input instructions.
Option two is designed for the user that does not want to identify all of the necessary instructions, or is not capable of doing so, and is willing to make some compromises regarding what the user would prefer in favor of standardized instructions 710 that do most of what a user might want. The standard instructions may be incorporated into a form that is populated with data, where each entry corresponds to a standard action that may be taken based on that data. Returning to the new employee processing example discussed above, with regard to option one, a form may already exist in a form library 712 that includes most if not all of the instructions that the user would want to use to process its own employees. If the user is completely willing to compromise on what the user wants from the form, the user could accept the standard form exactly as it is. On the other hand, if there were some instructions that the user wanted to delete, because those instructions were not needed, or the user wanted to change the name or type of data input at certain locations on the form, the user could use the basic editing element 714 to make modest changes to the standard form, such as those changes noted above.
Option three is designed to be similar to option two except in this case the form to be utilized is a user generated form that has been dropped (electronically) by the user into the form depository 616 illustrated in
While some of the first forms to be produced for receiving instructions for the system 600 may be limited to forms developed by the operator of the system 600, over time, users will develop certain forms (Option four) that they may reuse themselves or be willing to share with other parties, either for free in an open source type environment 724 or in exchange for some small fee in a shareware type of environment. Designed forms could also be purchased in the same manner as applications for mobile devices, where developers are encouraged to develop unique, custom forms 726 (Option five) that are sold for modest prices, ideally, and are rewarded through a volume of purchases.
Other embodiments for inputting data to the rule writer are obviously possible, so the few embodiments described herein are not intended to be and are not the limit of all possible embodiments for having rules written for people without rule writing skills. For example, rules could be written in plain English and rule code could be translated automatically from the plain English text to rule code. In an embodiment, a translator of Domain-Specific Languages (DSL) for rule execution is utilized. DSL includes any type of coding scheme used for controlling a computer, where this coding scheme is not a general-purpose programming language. For the purpose of generating rule code for the rule engine from a rule-authoring system (using another language, such as English text), a DSL may be defined by a custom XML file that has the following general format:
The above format consists of a sequence of <symbol> elements followed by a sequence of <macro> elements. Each symbol element consists of a word or phrase together with an attribute that specifies the symbol's class. For example:
Each macro element consists of a <template> element and a <rules> element. The relationship between these templates and rules is best explained through an example, as follows:
To illustrate how the above-described macro translator would work on a couple of rules expressed in plain English, consider the following sentences:
Since the verb “must be” in the English text (a macro template) is logically a deontic operator, it cannot be expressed directly in standard first-order logic. Instead, the macro translates the verb into a negative condition in the rule antecedent that implies a “fail” consequent. The presence of such an inferred “fail” means that the corresponding compliance rule has been violated. It should also be noted that the rule engine code contains two logical variables, Index and X, which have no direct counterparts in the macro template. Index is in the case actually part of a hidden data model that assigns an index to each vehicle. This lets the rule engine rules handle multiple cars at the same time. The index is repeated in the “fail” consequent so it is possible to identify exactly which car or cars violated a rule. X is just a placeholder for the vehicle state (e.g., “moving” or “still”), which in this case needs its own variable in order for the negation to work as intended. If there was no index variable, it would be possible to simplify
A special syntax allows more than one instance of a symbol class in the same macro template. For example:
Applying this macro to:
This rule is a bit weak since it is hardwired for Oprah, instead of containing variables that could make it applicable to anyone, but it conveys the basic idea of the translation. Logic variables are generated as follows:
By convention, template parameters that start with an uppercase letter will be treated as logic variables in rule generation. In this example, “X1”-“X6” will be treated as variables.
Applying the above macro to some English text as follows:
The same macro can be used for a different rule, such as:
Applying this macro to these two input:
From an implementation perspective, the XML files that contain the symbol and macro definitions may need to be hand-coded by human programmers, at least for now. These XML files may then be combined as “building blocks” that together define a domain-specific language. This may be done in a GUI where different building blocks are enabled for inclusion. The same GUI may then let the rule author compose rules in the domain-specific language by selecting and coming templates and symbols from various menus and text-input fields. The resulting DSL rules are then processed as input by the rule generator to produce executable rule engine rules as the output.
The processing proceeds by taking one input DSL rule at a time and matching it against the template of each macro until a match is made. Matched template parameters are then substituted in the rules section of the macro according to the principles described above. If at least one successful match is found, the rules corresponding to the last match found are added to the output. Optionally, a warning is also presented if more than one successful match was found. If no successful match is found at all, an error message is presented for that DSL rule, and the translation is aborted. The matching processing uses a conventional backtracking algorithm that searches for the template as a pattern in the input, while keeping track of the resulting bindings of the template parameters.
Although some examples of applications are referenced above, there is theoretically no limit to the manner in which the rule engine could be implemented in an application environment. As illustrated in
One example of an application for use with the processing section 606 involves duty time control. Many different occupations regulate the amount of time certain types of people can be on duty at one time, or over the course of a number of days, or per week or month, etc. Duty time control applications may be employed by hospitals to regulate the hours of doctors, nurses and other patient care providers, by government entities to regulate the amount of time that certain employees may work at one time, such as in the military, air traffic control, etc., or other industries, such as the airline industry, where it is necessary to control the amount of flying time (or other occupations) that different crew can put in over some period of time. When there are only a few individuals subject to such regulations, determining schedules for crew can be relatively easy, but when there are many thousands of crew members in many different time zones flying all over the world in different planes twenty-four hours a day, scheduling and properly controlling the duty time of crew can get very complicated; which is where the power of a rule engine in accordance with present embodiments can be fully realized.
A duty time control application for the airline industry is described below that helps to illustrate how embodiments of the present rule engine can be utilized for data-entry, screen configuration, authorization and other purposes. For example, a simple data-entry validation rule for use in conjunction with a graphical user interface (GUI) and that depends on the data model may be written as follows:
Another data-entry validation rule that fires in the sign-off phase, after all data have been entered is as follows:
A screen configuration example is described next. In this example, a copy button in the same GUI data entry screen fills in default values for the departure and arrival airports for the return flight, using these rules:
An authorization rule example might be written as follows:
More sophisticated GUI applications that could be implemented using embodiments of the present rule engine include processes that react on individual user clicks and reconfigure GUI screens based on rules, the current process state, and optional messages from other processes.
A further example of an integration/configuration tool is illustrated below. The illustrative example describes a loan agreement application where the incoming message “generate_draft” causes the rule engine process to configure a draft generator service (a plugin application to the loan agreement application) to create the requested document. The configuration is performed by sending a message to a non-rule engine process “application”, which in this case may be part of the plugin. The rule code is as follows:
Another example that demonstrates the power that comes from the rule engine's succinctness is more like a systems programming example than it is about configuration or integration. In this example, the rule engine rules implement a time scheduler, which is used in the duty time application described above to periodically update the current accumulated duty time and flight duty time hours for each crew member:
An embodiment of a document analysis application that utilizes the rule engine will now be described. This application runs on rule code for the rule engine and gives a user the ability to set up a DROPBOX type account where documents can be deposited in a cloud environment, and then analyzed to determine how each document should be processed based on the rule code. The documents could be of any type that have information associated with them, such as word processing documents, photos, emails, text messages, expense report, etc., but no instructions on how that information should be processed.
A workflow of logical rules would be established for processing the information included in a document once that document was placed in a location that associates the work flow with the document. A learning function may also be added so that user actions are studied over time and the work flow is modified, or the user is presented with options for modifying the work flow, so as to adapt to the user action. This type of document analysis application could be implemented mobile applications, business applications, or to simply automate everyday activities, such as dinner with friends, travel plans, etc. The application effectively adopts the concept of an Inbox/Outbox at the office and/or home that replaces the inefficient use of email to “get things done”. Rather than describe the rule code that would be required to implement the application, the work flow of the application will be described, with the understanding that a person of ordinary skill in the art would be able to implement the rule code using the syntax provided above, based on the logical construct of the work flow described herein.
With reference now to
For example, an email from a friend suggesting dinner on a particular date and time could be dropped by a user into a particular desktop folder for processing in accordance with various rule sets and work flows generated by the rule sets for creating a calendar event on the user's calendar for dinner on that date at that time, while a separate work flow accesses the website for a favorite restaurant and attempts to schedule a reservation for two on that date and time. When the reservation is made, the confirmation could be processed by a different rule set and a work flow could be generated so a copy is sent to the friend and a copy is stored in a folder created for the user with an appropriate identifier so the user can later find the confirmation if necessary. Depending on the set of rules, other work flows could be generated, such as the reservation of a car or sedan service for that evening, a message could be sent to the user as to whether any other special requests are needed for that evening, such as flowers to be ordered, a suit to be picked up from the cleaners, etc. The number and types of rules and work flows that could be established are endless, but would likely have some practical limitations for most people, and if the user did not want the same process to be followed, the user would not drop the email in the desktop folder to begin with or perhaps drop it into a different folder that would automatically apply a different set of rules.
The same type of process illustrated in
An example of an embodiment of a handler process that may be followed is a synchronous control flow where a JAVA program makes a call to a wrapper for the rule engine library that accepts a process channel designator P and a set of input data terms (facts). P is resolved to a database entry that contains a reference to some rule code (rules and facts) and a set of terms that represent the current process state. The latter terms are merged with the first input data terms, and then top level control flow, further described below, is performed, with the following additions: For every C,X for which output(C,X) is true, the message input(P,X) is sent to the process engine process designated by C. For every Y for which occlude(Y) is true, the term Y is deleted from the process state. Then for every Z for which persist(Z) is true, the term Z is added to the process state. The message sending and database update (if any) is done as a single JAVA EE transaction.
In another instance, an asynchronous control flow may be implemented in a manner similar to that described above for synchronous control flow, except that the channel designator and the input data terms (facts) are sent in a message to an asynchronous JAVA EE bean that handles the call, and performs the resulting transaction in the same transaction as the message reception. Any results from output(default,X) are discarded in this case.
The top-level control flow process involves a JAVA program making a call to the rule engine library, providing as arguments a text string containing rule code (rules and facts), and a set of input data terms (facts). The output is a set of terms containing X such that output(default,X) is true. If no exception occurs, this set is guaranteed to contain the largest such set that is entailed by the given rules and facts and input-term facts. The rule code text string can contain instructions to include other rule code modules, which are cached to increase efficiency. The rule code consists of three kinds of statements that are handled differently:
Forward-chaining rules are applied by making a list of all the given facts (both those contained in the code and those supplied as input). Each fact is then removed from the list and applies to every forward-chaining rule that contains a condition matching that fact. The rule is then executed. If the rule produces an inference that was not already contained in the set of facts, that inference is added to the set of facts and to the end of the list. As described above with respect to
Backward-chaining control flow involves a goal-term, possibly containing logic variables, being provided as input. If there is a backward-chaining rule that matches this goal-term, then backward-chaining deterministic control flow is applied. If the backward-chaining deterministic control flow algorithm terminates without leaving any choices in the proof tree, then a single solution for the goal-term is returned. Otherwise backward-chaining non-deterministic control flow is performed.
Backward-chaining deterministic control flow involves, as an initial step, creating an environment record with a slot for each logic variable present in the rule. Unify all variables in the rule head with the corresponding terms in the goal. If any unification results in the binding of any variable external to the newly created environment record, execution of this goal is suspended and the next goal is tried on the goal stack instead. If unification succeeds without suspension, all conditions in the rule guard (if any) are pushed onto the goal stack and the initial step is applied to them.
If a fact instead of a backward-chaining rule matches, the goal is solved if only one possible fact matched. Otherwise the goal is marked as an unresolved non-deterministic choice in the proof tree, and the goal is suspend as in the initial step.
If a built-in predicate matches, the corresponding JAVA code is invoked.
If unification fails, the current environment record is dropped and the next candidate (if any) is found from an if-then-else rule and the initial step is repeated.
When the rule guard has been solved (an empty guard is always solved), the rule body is committed by:
Any time a logical variable that belongs to a suspended goal is unified again (due to being present in multiple places), the suspended goal is placed on a “wake list” in the proof tree so it can be retried again at initial step.
Backward-chaining non-deterministic control flow involves finding the first unresolved choice in the proof tree (depth-first), and splitting the whole proof tree into T containing the first alternative of that choice and T′ containing a continuation choice-object that represents the remaining alternatives. The process then continues with the initial step of the deterministic control flow in T, and then in T′ (which can also be done in parallel).
With regard to the description above, the word “matching” has the specific meaning of Robinson-unification of Herbrand terms (possibly containing variables). The “occur check” of Robinson-unification is not done, for performance reasons. Instead, a limit is imposed on the depth of nested Herbrand terms so that attempts to unify too deeply nested terms cause an exception. Any situation that would have involved unification failure due to occur check will instead give rise to an exception.
Another type of application that may operate in conjunction with a processing section (i.e., process engine, database and rule engine) as described herein may involve various stages associated with the core radio frequency management, development, testing, performance analysis, and certification of a product. For example, during the development of certain types of electronic products, there are certain known steps that have to be followed regardless of the design or perhaps even certain features associated with the product. The known rules may have sets of rules established in association with them and work flows that are to be followed based on the rule-dependent outputs of the rule engine. These sets of rules and work flows may then be programmed into a company's internal product development system, or that system could be programmed to make calls or requests to a separate system that receives documents or data for processing by the processing section. For example, during design or conceptualization of a product, an engineer may upload simulation data associated with some aspect of the product being developed, and when the processing section receives this data, a workflow may be generated that causes a report to be generated based on the simulation data and a copy of the report to be sent to a manager for approval. If in processing the simulation data, it was determined that the simulation data was not correlating well with specification data or measured data, then different work flows may be generated that alert the manager, query the available schedules of the design team, and automatically sets up a meeting in conference room Z at time W.
Once the design/concept phase has been completed and the product moves into product development, different sets of rules and work flows may be applied. For example, sets of rules programmed into an application associated with the processing section may be used for early detection of potential problems. If the product is a new type of cellular phone, it may be necessary to send to the phone under development to a third party laboratory for certain testing. Such tests may take many weeks and cost a significant amount of money to complete. Measurement data generated during the tests may be sent to the application so that data can be analyzed in accordance with the rules in real-time or near real-time, and specific workflows may be generated as a result. If test number 10 out of some 600 tests generates measurement data that is strange, out of specification, indicates a failure, or even indicates something that will likely lead to a subsequent failure of other tests, in accordance with work flows, the testing may be stopped, or the customer requesting the tests may be sent a message and/or report alerting them to the issues and allowing them to stop the testing or to take some other action.
Once an electronic product to be sold in the United States, and many other countries, has been completed, it still has to pass certain standards requirements and regulatory rules, such as FCC regulations associated with radio frequency (RF) transmissions, before it can be sold to the public. These regulatory rules may be programmed into an application such that when raw measurement data is received, it is parsed, packaged and sent to a web service running in front of the processing section, which then checks the packaged data against its rules developed from the regulatory rules and responds with the appropriate work flow(s) to be followed. In an example of an embodiment, rule-dependent responses may be “pass” “fail” or “missing”, where “pass” means that of all the packaged parsed data passed the FCC regulations. The responses of “fail” or “missing” may be more complex, with a “fail” response also indication which of one or more parts that failed, or a “missing” response indicating which data was missing. Each of these responses may also have associated work flow, such that a “pass” response generates a report suitable for submission to the FCC, while the “failed” or “missing” response may generate different reports, including a listing of the failed or missing parts, the degree by which a part failed, computer generated information indicating where the failed part is located or the missing part should be located, such as by coloring text or part of a drawing of the parts or drawing a box around a failed or missing part in a certain color, etc.
In an embodiment, a system for constructing a set of rule code for use in a rule engine comprises a configurator configured to receive input data from a user without requiring the user to write the set of rule code and to format the input data to create formatted data, the input data including one or more process states of an application, one or more inputs that may be received at each of the one or more process states, one or more expected outputs of each of the one or more process states, and one or more actions to be performed at each of the one or more process states; and a rule writer configured to receive the formatted data and to generate the set of rule code that can be performed by the rule engine operating in conjunction with the application.
In the embodiment, the system further comprises a tester configured to receive the set of rule code from the rule writer and to perform a series of logical tests on the set of rules to verify that the set of rules will be capable of being performed by the rule engine, and configured to instruct the rule writer of any errors in the set of rules requiring correction.
In the embodiment, the system further comprises a form depository configured to receive a form from the user and to output the form to a data extractor configured to extract information from the form to develop the input data for the configurator.
In the embodiment, wherein the information extracted from the form includes one or more graphic objects and other information associated with the one or more graphic objects that identify the one or more process states, the one or more inputs, the one or more expected outputs, and the one or more actions.
In an embodiment, a method for performing a function of an application comprises the steps of receiving input to the application regarding the function from a user, one or more other sources or a combination of the user and the one or more other sources; determining one or more rules to apply to the function and a bag of facts associated with the one or more rules based on the input; sending a message to a rule engine containing the one or more rules and the bag of facts; processing the one or more rules and the bag of facts within the rule engine to develop a rule-dependent response associated with the function, wherein such processing includes combining a forward-chaining rule with a backward-chaining rule by creating a condition within the forward-chaining rule that contains a backward-chaining query; sending the rule-dependent response to the application; and performing one or more work flows within the application based on the rule-dependent response that result in performance of the function.
In an embodiment, a method for combining a backward-chaining rule with a forward-chaining rule within a rule engine comprises the steps of utilizing a fact inferred from the forward-chaining rule as a goal for the backward-chaining rule, unless the forward-chaining rule contains a condition that depends on negation of another forward-chaining inference, in which case execution of the forward-chaining rule is suspended, the dependency of the rule-predicate for the problematic fact is recorded in a table, and execution of the forward-chaining rule skips to the next untried fact to select a new rule to execute.
In an embodiment, a method for performing a function of an application comprises the steps of receiving input to the application regarding the function from a user, one or more other sources or a combination of the user and the one or more other sources; determining one or more rules to apply to the function and a bag of facts associated with the one or more rules based on the input; sending a message to a rule engine containing the one or more rules and the bag of facts; processing the one or more rules and the bag of facts within the rule engine to develop a rule-dependent response associated with the function, wherein such processing includes combining a backward-chaining rule with a forward-chaining rule by utilizing a fact inferred from the forward-chaining rule as a goal for the backward-chaining rule, unless the forward-chaining rule contains a condition that depends on negation of another forward-chaining inference, in which case execution of the forward-chaining rule is suspended, the dependency of the rule-predicate for the problematic fact is recorded in a table, and execution of the forward-chaining rule skips to the next untried fact to select a new rule to execute; sending the rule-dependent response to the application; and performing one or more work flows within the application based on the rule-dependent response that result in performance of the function.
In an embodiment, a method for processing a document for a user comprises the steps of receiving a document from a user in a document processing application; sending a message containing data from the document to a rule engine to initiate an identification process for the document; analyzing the document based on a first set of rules operated within the rule engine to produce a first rule-dependent response that identifies a document type and document content for the document; based on the first rule-dependent response, sending a message to the rule engine to initiate a handler process for the document based on the document type; analyzing the document content based on a second set of rules corresponding to the handler process to produce a second rule-dependent response; and based on the second rule-dependent response, performing one or more work flows within the document processing application to process the document.
In the embodiment, wherein the step of analyzing the document and the step of analyzing the document content includes combining a forward-chaining rule with a backward-chaining rule by creating a condition within the forward-chaining rule that contains a backward-chaining query.
In the embodiment, wherein the step of analyzing the document and the step of analyzing the document content includes combining a backward-chaining rule with a forward-chaining rule by utilizing a fact inferred from the forward-chaining rule as a goal for the backward-chaining rule, unless the forward-chaining rule contains a condition that depends on negation of another forward-chaining inference, in which case execution of the forward-chaining rule is suspended, the dependency of the rule-predicate for the problematic fact is recorded in a table, and execution of the forward-chaining rule skips to the next untried fact to select a new rule to execute.
In the embodiment, wherein the one or more work flows improve productivity of the user.
In the embodiment, wherein the document relates to a loan application, and wherein the second rule-dependent response approves the loan application, denies the loan application, or indicates additional documents or information is required to assess the loan application.
In an embodiment, a method for developing, testing and analyzing a product comprises the steps of receiving data regarding the product in an application; sending a message containing the data to a rule engine to initiate a process for analyzing the data; analyzing the data based on a set of rules operated within the rule engine to produce a rule-dependent response based on the data; and based on the rule-dependent response, performing one or more work flows within the application related to the development, testing or analysis of the product.
In the embodiment, wherein the step of analyzing the data includes combining a forward-chaining rule with a backward-chaining rule by creating a condition within the forward-chaining rule that contains a backward-chaining query.
In the embodiment, wherein the step of analyzing the data includes combining a backward-chaining rule with a forward-chaining rule by utilizing a fact inferred from the forward-chaining rule as a goal for the backward-chaining rule, unless the forward-chaining rule contains a condition that depends on negation of another forward-chaining inference, in which case execution of the forward-chaining rule is suspended, the dependency of the rule-predicate for the problematic fact is recorded in a table, and execution of the forward-chaining rule skips to the next untried fact to select a new rule to execute.
In the embodiment, wherein the data is simulation data associated with an aspect of the product being developed, wherein the rule-dependent response indicates a problem with the simulation data, and wherein the one or more work flows include alerting one or more persons regarding the problem.
In the embodiment, wherein the data is testing data associated with a prototype of the product being developed, wherein the rule-dependent response indicates a problem with the testing data, and wherein the one or more work flows include alerting one or more persons regarding the problem.
In the embodiment, wherein the data is analysis data associated with the product that has been developed, wherein the rule-dependent response indicates the product passes a certification, fails a certification, or is missing a part necessary to certifying the product in accordance with a standard or a regulation, and wherein the one or more work flows include alerting one or more persons regarding the product passing the certification, failing the certification or missing the part.
In the embodiment, wherein one or more work flows include generating a report suitable for submission to a standard body or regulatory authority.
In the embodiment, wherein one or more work flows include generating a report indicating why the product failed the certification.
In the embodiment, wherein one or more work flows include generating a report indicating at least one part the product was missing and an indication of where the part could be located within the product.
In an embodiment, a method for assisting a user in selecting an airplane flight comprises the steps of receiving data within an application from the user regarding the user's preferences for the airplane flight; sending a message containing the data to a rule engine to initiate a process for analyzing the data; analyzing the data based on a set of rules operated within the rule engine to produce a rule-dependent response based on the data; and based on the rule-dependent response, performing one or more work flows within the application related to identifying one or more airplane flights that meet the user's preferences.
In the embodiment, wherein the step of analyzing the data includes combining a forward-chaining rule with a backward-chaining rule by creating a condition within the forward-chaining rule that contains a backward-chaining query.
In the embodiment, wherein the step of analyzing the data includes combining a backward-chaining rule with a forward-chaining rule by utilizing a fact inferred from the forward-chaining rule as a goal for the backward-chaining rule, unless the forward-chaining rule contains a condition that depends on negation of another forward-chaining inference, in which case execution of the forward-chaining rule is suspended, the dependency of the rule-predicate for the problematic fact is recorded in a table, and execution of the forward-chaining rule skips to the next untried fact to select a new rule to execute.
In an embodiment, a method for monitoring crew members associated with an airline comprises the steps of receiving data within an application regarding each crew member; sending a message containing the data to a rule engine to initiate a process for analyzing the data; analyzing the data based on a set of rules operated within the rule engine to produce a rule-dependent response based on the data; and based on the rule-dependent response, performing one or more work flows within the application related to identifying one or more airplane flights that meet duty time requirements for the crew member.
In the embodiment, wherein the step of analyzing the data includes combining a forward-chaining rule with a backward-chaining rule by creating a condition within the forward-chaining rule that contains a backward-chaining query.
In the embodiment, wherein the step of analyzing the data includes combining a backward-chaining rule with a forward-chaining rule by utilizing a fact inferred from the forward-chaining rule as a goal for the backward-chaining rule, unless the forward-chaining rule contains a condition that depends on negation of another forward-chaining inference, in which case execution of the forward-chaining rule is suspended, the dependency of the rule-predicate for the problematic fact is recorded in a table, and execution of the forward-chaining rule skips to the next untried fact to select a new rule to execute.
In the embodiment, wherein the one or more work flows identify a work schedule for the crew member.
A number of computing systems have been described throughout this disclosure. The descriptions of these systems are not intended to limit the teachings or applicability of this disclosure. Further, the processing of the various components of the illustrated systems may be distributed across multiple machines, networks, and other computing resources. For example, components of the rule engine, process engine, database and corresponding applications may be implemented as separate devices or on separate computing systems, or alternatively as one device or one computing system. In addition, two or more components of a system may be combined into fewer components. Further, various components of the illustrated systems may be implemented in one or more virtual machines, rather than in dedicated computer hardware systems. Likewise, the databases and other storage locations shown may represent physical and/or logical data storage, including, for example, storage area networks or other distributed storage systems. Moreover, in some embodiments the connections between the components shown represent possible paths of data flow, rather than actual connections between hardware. While some examples of possible connections are shown, any of the subset of the components shown may communicate with any other subset of components in various implementations.
Depending on the embodiment, certain acts, events, or functions of any of the algorithms described herein may be performed in a different sequence, may be added, merged, or left out altogether (e.g., not all described acts or events are necessary for the practice of the algorithms). Moreover, in certain embodiments, acts or events may be performed concurrently, e.g., through multi-threaded processing, interrupt processing, or multiple processors or processor cores or on other parallel architectures, rather than sequentially.
As further discussed below with respect to
One or more processors 1806 includes any suitable programmable circuits including one or more systems and microcontrollers, microprocessors, reduced instruction set circuits (RISC), application specific integrated circuits (ASIC), programmable logic circuits (PLC), field programmable gate arrays (FPGA), and any other circuit capable of executing the functions described herein. The above example embodiments are not intended to limit in any way the definition and/or meaning of the term “processor.”
Memory 1808 and storage devices 1816 include non-transitory computer readable storage mediums such as, without limitation but excluding signals per se, random access memory (RAM), flash memory, a hard disk drive, a solid state drive, a diskette, a flash drive, a compact disc, a digital video disc, and/or any suitable memory. In the exemplary implementation, memory 1808 and storage device 1816 may include data and/or instructions embodying aspects of the disclosure that are executable by processors 1806 (e.g., processor 1806 may be programmed by the instructions) to enable processors 1806 to perform the functions described herein. Additionally, memory 1808 and storage devices 1816 may comprise an operation system 1802, basic input-output system (“BIOS”) 1804, and various applications.
Display 1810 includes at least one output component for presenting information to a user of the computing device and may incorporate a user interface 1811 for providing interactivity through the display 1810. Display 1810 may be any component capable of conveying information to a user of the computing device. In some implementations, display 1810 includes an output adapter such as a video adapter and/or an audio adapter or the like. An output adapter is operatively coupled to processor 1806 and is configured to be operatively coupled to an output device such as a display device (e.g., a liquid crystal display (LCD), organic light emitting diode (OLED) display, cathode ray tube (CRT), “electronic ink” display, or the like) or an audio output device (e.g., a speaker, headphones, or the like).
Input Devices 1812 includes at least one input component for receiving input from a user. Input component 1812 may include, for example, a keyboard, a pointing device, a mouse, a stylus, a touch sensitive panel (e.g., a touch pad or a touch screen incorporated into the display 1810), a gyroscope, an accelerometer, a position detector, an audio input device, or the like. A single component such as a touch screen may function as both an input device 1812 and a display 1810.
Network interfaces 1814 may comprise one or more devices configured to transmit and receive control signals and data signals over wired or wireless networks. In various embodiments, one or more of network interfaces 1814 may transmit in a radio frequency spectrum and operate using a time-division multiple access (“TDMA”) communication protocol, wideband code division multiple access (“W-CDMA”), and so forth. In various embodiments, network interfaces 1814 may transmit and receive data and control signals over wired or wireless networks using Ethernet, 802.11, internet protocol (“IP”) transmission, and so forth. Wired or wireless networks may comprise various network components such as gateways, switches, hubs, routers, firewalls, proxies, and so forth.
Conditional language used herein, such as, among others, “may,” “might,” “may,” “e.g.,” and the like, unless specifically stated otherwise, or otherwise understood within the context as used, is generally intended to convey that certain embodiments include, while other embodiments do not include, certain features, elements and/or states. Thus, such conditional language is not generally intended to imply that features, elements and/or states are in any way required for one or more embodiments or that one or more embodiments necessarily include logic for deciding, with or without author input or prompting, whether these features, elements and/or states are included or are to be performed in any particular embodiment.
While the above detailed description has shown, described, and pointed out novel features as applied to various embodiments, it will be understood that various omissions, substitutions, and changes in the form and details of the devices or algorithms illustrated may be made without departing from the spirit of the disclosure. As will be recognized, the processes described herein may be embodied within a form that does not provide all of the features and benefits set forth herein, as some features may be used or practiced separately from others. The scope of protection is defined 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.
This application claims the benefit of U.S. Provisional Patent Application No. 61/735,501, filed Dec. 10, 2012.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/US2013/073815 | 12/9/2013 | WO | 00 |
Number | Date | Country | |
---|---|---|---|
61735501 | Dec 2012 | US |