|
|
|
|
|
by z5h
612 days ago
|
|
> What is some of your most hard-earned knowledge? 1. If you find yourself straying too often from coding in relations, and instead coding in instructive steps, you're going to end up with problems. 2. Use DCGs to create a DSL for any high level operations performed on data structures. The bi-directionality of Prolog's clauses means you can use this DSL to generate an audit trail of "commands executed" when Prolog solves a problem for you, but you can also use the audit trail and modify it to execute those commands on other data. |
|
Also DCGs for high level operations? Do you mean "use DCGs to parse strings that contain instructions" or do you parse things other than strings with DCGs? I'm assuming you take the parsed instructions and run them through some kind of interpreter that does the execution and audit trail.