boot from prolog

This commit is contained in:
vscosta 2016-04-05 02:24:09 +01:00
parent 079ed60248
commit abe5953da7

View File

@ -100,17 +100,20 @@ static void exec_top_level(int BootMode, YAP_init_args *iap) {
if (BootMode == YAP_BOOT_FROM_SAVED_STACKS) {
/* continue executing from the frozen stacks */
YAP_ContinueGoal();
livegoal = YAP_FullLookupAtom("$live");
} else {
livegoal = YAP_FullLookupAtom("$bootstrap");
}
/* the top-level is now ready */
/* read it before case someone, that is, Ashwin, hides
the atom false away ;-).
*/
livegoal = YAP_FullLookupAtom("$live");
atomfalse = YAP_MkAtomTerm(YAP_FullLookupAtom("$false"));
while (YAP_GetValue(livegoal) != atomfalse) {
YAP_Reset(YAP_FULL_RESET);
do_top_goal(YAP_MkAtomTerm(livegoal));
livegoal = YAP_FullLookupAtom("$live");
}
YAP_Exit(EXIT_SUCCESS);
}