Tips and tricks when running Logtalk using SICStus Prolog as the back-end compiler
Moderator: Paulo Moura
1 post • Page 1 of 1
- Logtalk developer
- Posts: 533
- Joined: Sat May 05, 2007 8:35 am
- Location: Portugal
The new settings files feature in Logtalk 2.36.0 is not supported in SICStus Prolog. This is an unfortunate consequence of the fact that SICStus Prolog open/4 implementation opens a file relative to the loading context instead of relative to the current directory. I.e. even if you change your working directory to the directory containing the file you want to open, the absolute path is still calculated using the loading context of the file containing the open/4 call, not using the path to the current directory. I understand the usefulness of the concept of loading context. Other Prolog compilers such as ECLiPSe use the same concept. However, the impossibility of overriding the loading context by explicitly changing the working directory is a limitation that I classify as buggy behavior. Working around this SICStus Prolog limitation wold imply rewriting Logtalk code that works flawlessly for every other Prolog compiler. The workaround is for users to manually load settings file after Logtalk startup.