This past week, I discovered that ChatGPT can do a pretty good job of converting lengthy standards into SWI-Prolog. In particular, it quickly converted the USPAP (Uniform Standards Of Professional Appraisal Practice) into Prolog. I downloaded the USPAP standard as a PDF and then fed it to ChatGPT, which provided the source code to validate whether an appraisal (e.g., an appraisal for a residence) conformed to USPAP. ChatGPT said that it can also do this in Python, but that Prolog is very significantly superior to Python as a standards language.
So, with AI, I can see a ton of work coming for Prolog programmers — after all these years. There are numerous government regulations and standards. They will need to be codified into language that is readable by non-programmers — and Prolog comes close to that (as long as the logic doesn’t become too complex, which it inevitably will from time to time). I had to review the Prolog code generated by ChatGPT and refine it. However, I was surprised that it ran with just some minor changes. A domain specialist must review the code and test it to ensure it works. I am sure that will always be the case. And somehow, they will have to hope that they can find an experienced Prolog programmer - or train a new one - a no easy task.
I plan to publish the code on GitHub, with documentation, in the next week.
By the way, the code ChatGPT generated was R with Prolog. In some cases, it generated R code that then generated Prolog, and in other cases, ChatGPT generated pure Prolog code, mostly consisting of facts and requirement rules.