From the hub, tagged: "dcg"
A longstanding collaboration with @triska, applying Prolog to the specification and analysis of oncology dose-escalation trial designs, has yielded some interesting progress that I'd like to share. It seems to me that the current thrust of this work employs Prolog — and indeed some new techniques like if_/3 (Neumerkel & Kral 2017) — in a manner that is somehow essential to our successful attack on certain problems in this field. As such, I think our collaboration reflects in some interesting ways on Prolog itself. I'll try to get across the main gist of the application without belaboring the details. The work I'll describe here is contained in this self-contained file from the precautionary package. Author: David C. Norris
An example of using Prolog's definite clause grammar to write a compiler for a Pascal-like programing language. The example is taken from the open access textbook: "The Art of Prolog".