Logic programming is a quest to expand what is known to be true. Given certain facts, it is possible to establish new facts using rules, mathematics or whatever system is trusted to separate truth and falsehood. For example, given the fact "All politicians are liars" and "Joe is a politician", we are happy to deduce "Joe is a liar". Expression Pattern Language provides an original and practical approach to logic programming targeted at Java developers.
The mechanism used by the eXPL engine to create new facts is a two-step process, unification followed by evaluation. Unification works on two sets of terms, an axiom (known facts) containing constant terms and a template containing constant and variable terms. Unification attempts to pair an axiom to a template so they end up equivalent to each other. If this succeeds then evaluation of the template terms determines whether a solution has been found and what are the final values of the solution.
An expression pattern is a solution to a query stated as a sequence of unification terms which may contain expressions to define relationships or perform transformations.
Here is example of a simple eXPL query:
{"bilene", 1718}
{"addis ababa", 8000}
{"denver", 5280}
{"flagstaff", 6970}
{jacksonville", 8}
{"leadville", 10200}
{"madrid", 1305}
{"richmond",19}
{"spokane", 1909}
{"wichita", 1305};
template high_city(name ? altitude > 5000, altitude);
query high_cities (city : high_city);
