Re: pining for the good old days of yore
"Richard A. O'Keefe" <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <3A207973-C2B0-47B5-882B-B502793642E3__15040.4028980576$1396523054$gmane$org@cs.otago.ac.nz> |
On 31/03/2014, at 8:30 PM, Jan Wielemaker wrote: > > I'm not so sure. Typically, you'd like your program to evolve a bit > more independently > from your data and you want only some of your data to be persistent. > Classical > saved states also provide no safety against failure of Prolog or the > computer it > runs on. Even if you wanted it, it is more or less not doable on modern > systems ... > That indeed, is a pity :-( Classical saved states in DEC-10 Prolog - only worked on the same kind of machine - did not work in the presence of Address Space Layout Randomisation - could not be read by human beings. A real classical saved state includes a snapshot of the state of the running code, so that when you restored one, it resumed execution where it was when it was saved. That's actually a *wonderful* thing to have (think checkpoint/restart) but it has major semantic problems if open files have changed (which didn't actually work) and especially with things like open network connections (which DEC-10 Prolog did not support). The first major blow against classical saved states was the Apollo DOMAIN operating system, where you could not rely on a program being loaded at the same address twice running. These days this is done to protect against malware; Apollo had other reasons back in the early 80s. Changes to the underlying Prolog system could also be a problem. Saving stuff out as readable text has a lot of advantages. I once developed what I fondly hoped might become a "portable Prolog term binary format", only to discover that plain text with minimal spaces was nearly as good. Never underestimate the power and debuggability of plain text.