roadmap icon indicating copy to clipboard operation
roadmap copied to clipboard

Saved state portability

Open erlanger opened this issue 7 years ago • 1 comments

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:

  1. 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.
  2. Saved state depends on foreign (.so) libraries using --foregin=save option
    • 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.

erlanger avatar Nov 18 '18 07:11 erlanger

Part (I) is solved: saved states no longer depend on the word-length of the machine.

JanWielemaker avatar Jun 17 '19 14:06 JanWielemaker