From abe5953da708b8bbf2f7f9ef77e8be6c79b6ecbf Mon Sep 17 00:00:00 2001 From: vscosta Date: Tue, 5 Apr 2016 02:24:09 +0100 Subject: [PATCH] boot from prolog --- console/yap.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/console/yap.c b/console/yap.c index ae7582956..b2bc82f6e 100755 --- a/console/yap.c +++ b/console/yap.c @@ -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); }