I’m using: SWI-Prolog version 8.1.9.
I want to pass around one or more extra variables in my (first) DCG attempt. I’m hoping I don’t have to assert everything to the database instead. The variables will contain lists of items that I will use the DCG direct Prolog call feature, the braces feature (e.g. - { some_fact(Fact) } ) to access from various DCG statements.
What is the correct way to do this that will not interact badly with the hidden difference lists a DCG specification maintains? Do I add them to head of the DCG rule? How to do this? If there is a good example/article on this please leave a link.