[cmucl-help] Re : Disabling the automated code deletion when compiling.

Rémy remy_chretien at yahoo.fr
Tue Nov 2 20:13:55 CET 2010


I am afraid that snippets from code and logs will not be very efficient to track 

down the problem. The disappearance of important features of the program is 
quite ubiquitous and the code itself is very dense. Anyway, here is an example 
of an 'unfortunate' code deletion.

-----the source code:
(defun piy (wff prefix num window)
  (unless maint:*dont-ask*
    (unless (if (symbolp wff)
        (find-mode wff nil t)
          (if (and (symbolp *last-gwff-typed*)  ; added this check -- ceb 6/2/99
               (wffeq-ab (get *last-gwff-typed* 'represents) wff))
          (find-mode *last-gwff-typed* nil t)
        (if (symbolp prefix)
            (find-mode prefix nil t)
          nil)))
      (if (query "Would you like to give a mode for this theorem?" t)
      (let ((mode nil))
        (loop until mode do
          (prompt-read mode nil (msgf "Mode")
                   'tps-mode '$
                   ((? (msgf "Name of a mode (indicating a collection of flag 
settings)"))
                (?? (msgf "A mode for automatic search."))))
          (if (member mode global-modelist)
              (mode mode)
            (let ((y (car (remove-if-not #'(lambda (x) (memq (car x) '(mode 
mode1)))
                         (gethash mode core::*lib-masterindex*)))))
              (if y
              (progn
                (core::retrieve-libobject mode :types (car y) :multiple nil)
                (mode mode) t)
            (progn
              (msgf "Can't find that mode in the library." t)
              (setq mode nil)))))))
    (progn
      (msgf "Warning: Search will proceed with current flag settings.")
      (when (query "Abort Search?" t)
        (throwfail "Search Aborted by User"))))))
  (prove2 wff prefix num)
  (msgf " --- Starting Automatic Search --- ")
  (diy (numalias num) nil window))

------the compilation log:
In: DEFUN PIY 

;   'TPS-MODE 
; Note: Deleting unreachable code. 
;  
;   '$ 
; Note: Deleting unreachable code. 
;  
;   'TPS-MODE 
; Note: Deleting unreachable code. 
;  
;   '$ 
; Note: Deleting unreachable code. 
;  
;   (QUERY "Would you like to give a mode for this theorem?" T) 
; --> LET PROMPT-READ IF SETQ DO BLOCK LET TAGBODY LET INTERN  
; ==> 
;   (GENSYM "PROMPT") 
; Warning: Result is a SYMBOL, not a (VALUES &OPTIONAL BASE-STRING &REST T). 
;  
;   (PROMPT-READ MODE NIL (MSGF "Mode") 'TPS-MODE ...) 
; --> IF SETQ DO BLOCK LET TAGBODY LET INTERN  
; ==> 
;   (GENSYM "PROMPT") 
; Warning: Result is a SYMBOL, not a (VALUES &OPTIONAL BASE-STRING &REST T). 
;  
;   (QUERY "Abort Search?" T) 
; --> LET PROMPT-READ IF SETQ DO BLOCK LET TAGBODY LET INTERN  
; ==> 
;   (GENSYM "PROMPT") 
; Warning: Result is a SYMBOL, not a (VALUES &OPTIONAL BASE-STRING &REST T). 

If my hypothesis of type errors causing inappropriate code deletion was wrong, 
what could in your opinion cause the software to progressively lose its 
features, from cmucl 18c to 20b?

Extra question: I try to compile with various version, to determine when the 
features exactly start to fade, and the following happens (with version <19):
I use a Makefile, with this instruction:

tps_compile:    bin lisp tps-compile.lisp make_tps_sys 
    @date
    @/bin/sh -ec 'echo "(load \"../tps-compile.lisp\") (core:exit-from-lisp)"' | 
(cd bin; $(lisp))

and then a Segmentation Fault Occur, while writing this line in the shell does 
work properly.

/bin/sh: line 1: 11953 Segmentation fault      cmucl18
make: *** [tps_compile] Error 139

Do you have a clue of what the problem is?

Thank you again,

Remy
________________________________
De : Raymond Toy <toy.raymond at gmail.com>
À : cmucl-help at cmucl.cons.org
Envoyé le : Mar 2 novembre 2010, 12h 04min 18s
Objet : Re: [cmucl-help] Disabling the automated code deletion when compiling.

On 11/1/10 10:42 AM, Rémy wrote:
> Greetings,
>
> I hope I'm posting at the right place: so, here is my problem. I recently had 
>to 
>
> adapt an old piece of software to the latest version of CMU-CL. While it worked 
>
>
>
> perfectly fine with the 18c release, bugs appeared when I used the 19b and, 
> finally, entire features are missing when compiled with the 20b version. 
> According to the compilation logs, it seems the problems are caused by the 
> automated deletion of code, in my opinion because of subtle type errors in the 



> source code. Nevertheless, because of the size of the project, and its 
> priorities, we cannot work on these corrections. 
>
Can you provide some snippets from the compilation logs?  That would
help understand what the issue is.  Even better would be the actual code
that shows the problem.
> Hence I would like to know if there was a possibility to disable the code 
> deletion feature during compilation, so as to test this hypothesis? I tried an 



> (optimize (safety 0)) , but it did not change the "missing" parts of the code.
I'll have to dig through the compiler to see if it's possible to turn
this off.

Ray

_______________________________________________
cmucl-help mailing list
cmucl-help at cmucl.cons.org
http://lists.zs64.net/mailman/listinfo/cmucl-help


      


More information about the cmucl-help mailing list