« Ontologies, Models, Rules, Facts | Main | Algorithm = Logic + Control »

Answering the Question of which Logic

I think I have all this figured out, then I learn more and I recognize that I still do not have it totally figured out.  I am trying to figure out the best logic to use to process XBRL-based digital financial reports.  This blog post explains where I stand now. 

Figuring out which logic to use is a "dance" between expressivity and tractability, trying to get the right equilibrium for the task being performed.  The logic needs to be as powerful as possible but also as reliable as possible (i.e. controllable).

Nothing has both the maximum expressivity and maximum control. What I do know for certain is that an "ontology" alone is not enough.  You need "ontology + rules".  SQL alone does not seem to be enough but I am not 100% sure.  XBRL Formula alone is not enough, certain specific things are missing. More needs to be added to SQL or XBRL based systems to get them to work effectively.

My confidence is pretty high that all of the following seem to provide enough logic, but most also have specific known control issues associated with them: 

  • Ontology + Rules (knowledge graph):  For example, OWL (or SWRL) + RDF (or N3) + SHACL provide sufficient fragments of first order logic. (Some call this Modern Symbolic AI)
  • Modern Prolog:  Prolog such as SWI Prolog or Scryer Prolog seem to have all of the necessary functionality.  The up side is that there are a lot of Prolog implementations. The down side is that none of these Prologs can call it self "the standard". Each has pros and cons. Prolog interoperates with relational (SQL) databases.
  • ISO Prolog: ISO has created a standard Prolog.  ISO Prolog can be regarded as a subset of Full Prolog.  There is solid motivation for implementations to support ISO Prolog as the international standard Prolog, many already do to one degree or another.
  • Datalog: Datalog, or "function-free Horn Logic", is more tractable than Horn Logic (Pure Prolog) and ISO Prolog (Full Prolog). RuleML.org points out,  “Datalog is the language in the intersection of SQL and Prolog. It can thus be considered as the subset of logic programming needed for representing the information of relational databases, including (recursive) views.” So Datalog interoperates with relational databases. (Then there is Vadalog which is a modern version of Datalog.)
  • PSOA RuleML (multi-paradigm): PSOA (Positional-Slotted Object-Applicative) RuleML is a multi-paradigm, particularly graph-relational, data and rule language. PSOA interoperates with relational databases and graph databases (including labeled property graphs). RuleML.org points out, “PSOA RuleML's databases (fact bases) generalize the instance level of Graph and Relational Databases; its knowledge bases complement facts by rules for deductive retrieval (extending the Datalog-level, function-free expressiveness of Deductive Databases to the Horn-logic expressiveness of Logic Programming), interoperation, and reasoning, as well as for optionally emulating part of the schema level.” Here is a PSOA tutorial.
  • GQL/Cypher (labeled property graph): GQL is an ISO project to create a global standard query language (like SQL) for graph databases, graph query language.  Open Cypher which is based on Cypher which is the query language of Neo4j.
  • XBRL+SBRM+More: XBRL  is an open standard technical syntax published by XBRL International, SBRM  is a forthcoming standard to be published by OMG that formalizes a logical conceptualization of a business report.  While XBRL provides the functionality to represent all that is needed to express knowledge and much of what is necessary to process that knowledge and prove the knowledge is represented correctly.  However, certain specific processing is missing that must be supplemented to create a complete system.  As such, that additional processing logic must be provided.
  • SQL+More (relational database): While it is proven that you can store XBRL-based information in a relational database; you have to add functionality to process the information.  Essentially, you have to construct a rules engine to process the information and prove the system is properly functioning.  This is very possible but tends to not be very effecient.

There are other logics that can be used to process XBRL-based digital financial reports. Other completely different approaches such as the decision model approach could possibly be used but would need to include an ontology-type component.  Any syntax used should be 100% convertible to all other syntaxes and be able to round tripped back into the original syntax.  Then, you could switch between whatever approach.

I can tell you this.  "Rolling your own" system like we did for Pesseract is expedient for many things, but is significantly less powerful and it would be hard to compete with any of the approaches above in terms of power.  The specific pieces missing from XBRL Formula can be added.

For a more comprehensive analysis, please see here.

Taxonomies, Ontologies, Knowledge Graphs

Graph Databases will Change your Freakin' Life

Graph Databases: The best kept secret for effective AI

Posted on Saturday, August 15, 2020 at 09:11AM by Registered CommenterCharlie in | CommentsPost a Comment

PrintView Printer Friendly Version

EmailEmail Article to Friend

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
All HTML will be escaped. Hyperlinks will be created for URLs automatically.