« Deming: A Theory of a System for Educators and Managers | Main | Getting Data Quality Committee to Leverage Fundamental Accounting Concepts »

Understanding the Importance of PROLOG to Digital Financial Reporting

There are different programming paradigms that exist and can be used: imperative, declarative, object-oriented, functional symbolic, and logic programming.

PROLOG (download here) a general purpose logic programming language that is also declarative.  Prolog is based on first-order logic. The syntax of PROLOG is derived from Horn clauses which is a subset of first-order logic. Because PROLOG is declarative, program logic is expressed represented by facts, relations, and rules. Questions are asked and then answers are provided based on the facts, relations, and rules. 

The name PROLOG is derived from the phrase "PROgramming in LOGic". Academics in computer science community consider PROLOG an important language because it is about executable logic. Academics in philosophy or logic like to teach PROLOG for the same reason.  Academics in business...Well, I have an MBA with an emphasis in information systems and they never mentioned PROLOG in any classes I took but that was 30 years ago.

So, most business professionals have probably never heard of PROLOG.  However, if you have read Knowledge Engineering Basics for Accounting Professionals, you might be like me and get the sense that PROLOG might be very, very important.

The article, Prolog Under the Hood: An Honest Look, examines the inner workings of PROLOG. In the first paragraph of the conclusion of that article the author states:

In the AI [artificial intelligence] industry we have created many neat programming tools, none of which have taken off as we hoped. Quite possibly it is because the languages try too hard to be something they are not.

There is a lot to that statement.  First off, it is unfortunate that the author chose to use the term "AI" or artificial intelligence.  It seems that artificial intelligence and expert systems tends to get grouped together.  This is unfortunate in my view. Personally, I don't like the "artificial" part of artificial intelligence.  The term expert system resonates with me well though.  Expert systems are "neat" ideas.

The "...because the languages try too hard to be something that they are not."  I completely agree with that statement.  Computers cannot think.  They are machines and machines, at least today's machines, cannot think.  The best that machines can do is mimic some things what humans can do.  Machines cannot mimic intuition and creativity.  But they can mimic rudimentary tasks, if give the right knowledge in the right form.

That form is machine-readable metadata.  Facts, relations, rules.  That is what a machine uses to mimic tasks humans perform, successfully automating those tasks.  But if the metadata is nonsense, then the results of the machine automated tasks will likewise be nonsense.

PROLOG is a tool for making sure the important machine-readable metadata is not nonsense.  That is the first step in automating work.  So, am I saying that every accountant needs to go and learn PROLOG?  No.  Not at all.  PROLOG or things like PROLOG such as the Fluent Editor will be buried deeply within the bowels of software.  While the law of conservation of complexity states that complexity can never be removed from a system, the complexity certainly can be moved.

Using techniques that I have outlined in my document Understanding Blocks, Slots, Templates and Exemplars, the "neat" functionality provided by PROLOG and other such tools for making sure facts, relations, and rules are described correctly in taxonomies and ontologies and consistent with those descriptions in something like a digital financial report; machines will effectively mimic humans and perform useful work. 

The alternative?  Nonsense.  Describing the facts, relations, and rules is a basic function of the system.  If the facts, relations, and rules are not described correctly then inconsistencies result.  It really is that straight forward.

But if both the information in something like a digital financial report is correct and consistent with what people believe is a standard machine-readable representation of a financial report; machines can do incredibly useful work for humans because the information does not contain nonsense.

Tools like PROLOG and the Fluent Editor minimize and hopefully eliminate nonsense.

XBRL US and others have created what they call the "Data Quality Committee".  Data quality is the "end".  What they are really doing is creating machine-readable rules necessary to reduce the nonsense.  Those rules are the "means" to the "end", data quality.  Think of what the Data Quality Committee creates as being an extension of the US GAAP XBRL Taxonomy, adding important missing machine-readable business rules.

Ask yourself a question.  How do you know that the machine-readable rules are correct? Tools like PROLOG can help.

If you are ambitious, a great way to understand what I am talking about is to fiddle around with PROLOG. This blog post, Try Logic Programming: A Gentle Introduction to PROLOG, points you to a free downloadable version of a PROLOG implementation, tutorials, examples, and other useful information.

Learn PROLOG Now! has other very useful information.

Really anxious to get started with PROLOG?  Try this online version of PROLOG.

Of course, all this begs the question, "Why would you need PROLOG?  Why can't an XBRL processor and/or XBRL Formula processor handle all these details?"  PROLOG is basically a general purpose reasoner.  Why isn't there a business report reasoner or even better a financial report reasoner?

Stay tuned!

Posted on Thursday, July 23, 2015 at 06:31AM by Registered CommenterCharlie | 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.