Rémy | 2 Nov 2010 20:13
Picon
Favicon

Re : Disabling the automated code deletion when compiling.

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*)))))
(Continue reading)

Raymond Toy | 3 Nov 2010 15:55
Picon

Re: Re : Disabling the automated code deletion when compiling.

On 11/2/10 3:13 PM, Rémy wrote:
> 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.

To understand what's going on, I would need to see query and
prompt-read.  It seems prompt-read is creating a symbol where a string
was expected.  It also seems as if prompt-read and/or query are
inlined.  That seems unnecessary for functions that appear to wait for
user input.

It would certainly help in figuring this out if you looked at the notes
to see what the problem really is.  They seem rather serious if you're
feeding a symbol where a string is expected.
>
> 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?
Loss of features is in the eye of the beholder. :-)
> 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 
>      <at> date
>      <at> /bin/sh -ec 'echo "(load \"../tps-compile.lisp\") (core:exit-from-lisp)"' | 
> (cd bin; $(lisp))
>
(Continue reading)

Rémy | 3 Nov 2010 20:08
Picon
Favicon

Re : Re : Disabling the automated code deletion when compiling.

The code comes from a quite old theorem prover (TPS) at CMU. I am not its 
creator but am asked to adapt it to the newest version of cmu-cc, among other 
things. This project is/was pretty huge and I am afraid that correcting these 
types errors is not a priority (the system is usually compiled with allegro and 
seems to work fine).

The more I read the compilation logs for various versions of cmu-cl, the more I 
think the deletion problem may not be the cause of my loss of features (which, 
even if they only live in my eyes, are still absent from my interface 
unfortunately). So, you don't have to waste your time tracking down this 
symbol/string type error for me. I'd just like to test my hypothesis before 
giving it up, by trying to disable the code deletion, if possible. If my 
hypothesis appears be wrong, I will check the release notes more carefully and 
hope to find out something interesting.

Nevertheless, here are query and prompt-read. You will probably need to see many 
other ones. Please don't bother if the code is too dense. Just give me some 
trails I can investigate (if you have some).

Thank you very much,

Remy

---- QUERY
(defmacro query (message default)
  `(let ((var nil))
       (prompt-read var nil
       (msgf ,message) 'yesno ,default ((? (mhelp 'yesno))))
     var))

(Continue reading)

Raymond Toy | 3 Nov 2010 21:01
Picon

Re: Re : Re : Disabling the automated code deletion when compiling.

On 11/3/10 3:08 PM, Rémy wrote:
> unfortunately). So, you don't have to waste your time tracking down this 
> symbol/string type error for me. I'd just like to test my hypothesis before 
> giving it up, by trying to disable the code deletion, if possible. If my 
> hypothesis appears be wrong, I will check the release notes more carefully and 
> hope to find out something interesting.
After a quick look through the compiler, the code deletion stuff seems
deeply embedded in the compiler and there does not appear to be a way to
turn it off easily.
> ---- PROMPT-READ
> (defmacro prompt-read (internal-var external-var initial-message
>                     argument-type default-value
>                     special-response-list)
>   (declare (special *using-interface* *simple-interface-prompts*))
>   `(if (and *using-interface* (not *simple-interface-prompts*) (not 
> *executing*))
>        (setq ,internal-var
>          (do ((response nil))
>          (nil)
>            (let ((prompt-sym (intern (gensym "PROMPT"))))

Here is one problem.  INTERN expects a string, but GENSYM returns a
symbol.  You might get a little farther if you replaced it with
something like (intern (symbol-name (gensym "PROMPT"))), or perhaps
(gentemp "PROMPT"), but  gentemp is deprecated.

I only looked at the compiler notes that you sent earlier.  I didn't
investigate anything else in prompt-read.

Ray
(Continue reading)

Pascal J. Bourguignon | 4 Nov 2010 01:26
Face
Favicon

Re: Re : Re : Disabling the automated code deletion when compiling.

Raymond Toy <toy.raymond <at> gmail.com> writes:

> On 11/3/10 3:08 PM, Rémy wrote:
>> unfortunately). So, you don't have to waste your time tracking down this 
>> symbol/string type error for me. I'd just like to test my hypothesis before 
>> giving it up, by trying to disable the code deletion, if possible. If my 
>> hypothesis appears be wrong, I will check the release notes more carefully and 
>> hope to find out something interesting.
> After a quick look through the compiler, the code deletion stuff seems
> deeply embedded in the compiler and there does not appear to be a way to
> turn it off easily.
>> ---- PROMPT-READ
>> (defmacro prompt-read (internal-var external-var initial-message
>>                     argument-type default-value
>>                     special-response-list)
>>   (declare (special *using-interface* *simple-interface-prompts*))
>>   `(if (and *using-interface* (not *simple-interface-prompts*) (not 
>> *executing*))
>>        (setq ,internal-var
>>          (do ((response nil))
>>          (nil)
>>            (let ((prompt-sym (intern (gensym "PROMPT"))))
>
> Here is one problem.  INTERN expects a string, but GENSYM returns a
> symbol.  You might get a little farther if you replaced it with
> something like (intern (symbol-name (gensym "PROMPT"))), or perhaps
> (gentemp "PROMPT"), but  gentemp is deprecated.

Deprecation in CLHS has become deprecated too.

(Continue reading)

Rémy | 4 Nov 2010 17:58
Picon
Favicon

Re : Re : Re : Disabling the automated code deletion when compiling.

Thank your for your advice. I'll try to find a way to figure out what happens in 
my system.

Remy

----- Message d'origine ----
De : Raymond Toy <toy.raymond <at> gmail.com>
À : Rémy <remy_chretien <at> yahoo.fr>
Cc : cmucl-help <at> cmucl.cons.org
Envoyé le : Mer 3 novembre 2010, 16h 01min 47s
Objet : Re: [cmucl-help] Re : Re : Disabling the automated code deletion when 
compiling.

On 11/3/10 3:08 PM, Rémy wrote:
> unfortunately). So, you don't have to waste your time tracking down this 
> symbol/string type error for me. I'd just like to test my hypothesis before 
> giving it up, by trying to disable the code deletion, if possible. If my 
> hypothesis appears be wrong, I will check the release notes more carefully and 

> hope to find out something interesting.
After a quick look through the compiler, the code deletion stuff seems
deeply embedded in the compiler and there does not appear to be a way to
turn it off easily.
> ---- PROMPT-READ
> (defmacro prompt-read (internal-var external-var initial-message
>                     argument-type default-value
>                     special-response-list)
>   (declare (special *using-interface* *simple-interface-prompts*))
>   `(if (and *using-interface* (not *simple-interface-prompts*) (not 
> *executing*))
(Continue reading)

Willem Broekema | 5 Nov 2010 01:17
Picon

Re: Re : Re : Disabling the automated code deletion when compiling.

On Wed, Nov 3, 2010 at 9:01 PM, Raymond Toy <toy.raymond <at> gmail.com> wrote:
> Here is one problem.  INTERN expects a string, but GENSYM returns a
> symbol.

... and by default Allegro's INTERN is liberal in that it does accept
symbols. To detect unportable code you can disable this by toggling
excl:*intern-allows-symbol* - see:
  http://www.franz.com/support/documentation/8.2/doc/variables/excl/s_intern-allows-symbol_s.htm

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


Gmane