Template-Axiom-Query (TAQ)

Template-Axiom-Query (TAQ)

TAQ is organized around the 3 elements that make up it's name. A query is a declaration that is expressed by combining axioms with templates. An axiom is a structure consisting of a sequence of terms which represents a fact. A template is also a structure that unifies with axioms that are logically equivalent. Successful unification results an axiom being created by the template that is passed to the query solution. The query format also indicates how the solution is to be returned, but this is normally specified to be an axiom list.

Here is a simple query which takes a list of axioms named "city_altitude" to be presented to a template named "high_city" which only unifies with the incoming axioms that have an elevation above a certain value. The query returns an axiom list named "high_cities"

query<axiom> high_cities (city_altitude : high_city)

You can find the complete program in the TAQ Language Introduction. To run the query, you will need to follow the instructions in Getting Started.

To learn the TAQ language and and it's many features, go to the TAQ Reference which has many topics along with a large number of examples.

TAQ's structures provide direct access to the data they contain, but no cause for alarm as logic deals with facts and these become secrets if hidden.

Spreadsheet

TAQ has some resonance with spreadsheets. Rows are similar to axioms and templates are like the column headers which apply formulas to the cells below.

TAQ was inspired by a logic programming language called "Logikus" from the book "Building Parsers with Java"[1] which was published to demonstrate that "you can create computer languages that differ radically from Java" using a parser written in Java. Logikus is modeled on Prolog which originates from the academic world. It's terse, mathematical notation is a radical departure from languages like Java which are expressive, pragmatic and attempt some semblance to human language.

TAQ has at it's core, like Logikus, a query engine which works with structures to compute solutions by logic deduction. However, TAQ also mixes in features to allow the developer to form the solution partly, or completely, using procedures. TAQ is a logic-declarative paradigm hybrid.

Building Parsers with Java

1. Metsker, Steven John (2001).

Building Parsers with Java.

Addison-Wesley