Settings files not supported in SICstus Prolog

Tips and tricks when running Logtalk using SICStus Prolog as the back-end compiler

Moderator: Paulo Moura

Post Reply
Paulo Moura
Logtalk developer
Posts: 475
Joined: Sat May 05, 2007 8:35 am
Location: Portugal
Contact:

Settings files not supported in SICstus Prolog

Post by Paulo Moura » Sat Apr 11, 2009 3:49 pm

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.
Paulo Moura
Logtalk developer

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest