unwanted abort message in Prolog 
Author Message
 unwanted abort message in Prolog

In PLOGHELP SAVE, it's suggested that the canonical way of using
-save/2- should be something like this:
    :- save(myplog, 1) ->
        /* after restoration */
        (reinitialise,              ;;; perform standard initialisation
         version,                   ;;; print version messages
         abort) ;                   ;;; go to top level
        /* after saving */
        write('myplog saved\n').

There's a slight problem here, in that the call to -abort- generates
an unwanted [execution aborted] message. This will appear just after
starting the saved image; as well as being ugly, it could be confusing
to some users. Is there a way (in v13 Poplog) to supress it?

Jocelyn Paine



Thu, 26 Oct 1995 21:55:29 GMT  
 unwanted abort message in Prolog

Quote:
> There's a slight problem here, in that the call to -abort- generates
> an unwanted [execution aborted] message. This will appear just after
> starting the saved image; as well as being ugly, it could be confusing
> to some users. Is there a way (in v13 Poplog) to supress it?

I'm guessing here, but I'd have thought that
        prolog_eval( setpop(0) )
was the easy way to force execution back to the top-level without
excessive output.  [Note that passing the argument of 0 is a way to
avoid disgusting hacks such as prolog_eval( apply( valof( setpop ) ) )
which won't work across prolog modules.]

Steve



Sun, 29 Oct 1995 03:14:12 GMT  
 unwanted abort message in Prolog

Jocelyn,

There's a prolog_restart/0 which does the equivalent of reinitialise, version
and then a Setprolog - but I think this is a fairly recent addition (in
its very earliest incarnation this may have been plain restart/0, but I think
even this was post-V13).

You can get a similar effect by replacing the abort in your example with:

        prolog_eval(apply(valof(setpop)))

I hope this does what you want. Incidentally, current versions have a much
more sophisticated version of save.

Regards,

Colin



Sun, 29 Oct 1995 21:32:57 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Thought on "abort with message" RCR

2. compilation with ifort9 aborts with strange message

3. socket error message: software caused connection abort

4. Aborting Tasks with abort command

5. simple messaging system in Prolog

6. Prolog and Message Passing On Clusters.

7. Getting Error Messages in Prolog

8. Visual Prolog mystery message

9. Disabling SWI-Prolog warning message

10. How to stop SWI prolog printing compiler messages

11. SWI Prolog: hiding compilation messages

12. URGENT MESSAGE TO STONY BROOK PROLOG

 

 
Powered by phpBB® Forum Software