roadmap
roadmap copied to clipboard
Saved state portability
Saved state portability
Following a discussion about a port to Android (in SWI-Prolog/swipl-devel#358), there was a concern about creating saved states on one platform and moving them to another platform, especially from a native platform to a different platform (like android). Two cases were observed:
- Saved state does not use foreign libraries (e.g. only prolog code)
- In this case the saved state will work on any other platform with the same pointer size (e.g. 32-bit or 64-bit)
- We can then embed pointer size information in the saved state, and use this saved state on the target platform if the pointer size matches.
- Saved state depends on foreign (.so) libraries using
--foregin=saveoption- In this case, the saved sate depends not only on the pointer size, but also on the architecture and the operating system being used.
- We can embed architecture information in the saved state, and decide --at runtime-- if the target architecture is compatible with the one embedded in the saved state. This will be a best effort approach.
Part (I) is solved: saved states no longer depend on the word-length of the machine.