compilation problem

11 views
Skip to first unread message

Ralf Hemmecke

unread,
May 16, 2024, 6:32:15 AM5/16/24
to fricas-devel
Does anyway see, why there is a compilation problem with the attached file?

I get the following error.

%%% (301) -> )co ../foo
Compiling FriCAS source code from file
/home/hemmecke/backup/git/qeta/tmp/../foo.spad using old system
compiler.
FOO abbreviates package Foo
------------------------------------------------------------------------
initializing NRLIB FOO for Foo
compiling into NRLIB FOO
compiling exported foo : () -> Polynomial C

debugger invoked on a SIMPLE-CONDITION in thread
#<THREAD "main thread" RUNNING {100295C183}>:
break

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
0: [CONTINUE] Return from BREAK.
1: [ABORT ] Exit from the current thread.

(|compMapCond'| (NIL (ELT C 0)) |coerce| C NIL ((((#:G36442 (|mode|
|Fraction| #)) (|qpol| (|value| # # #) (|mode| |Polynomial| #)) (|/\\|
(|modemap| #)) (< (|modemap| #)) (<= (|modemap| #)) (= (|modemap| # #))
(> (|modemap| #)) (>= (|modemap| #)) (T$ (|modemap| #)) (|\\/|
(|modemap| #)) (|_\|_| (|modemap| #)) (|and| (|modemap| #)) ...))))
error finding frame source: Bogus form-number: the source file has
probably
changed too much to cope with.
source: NIL
0]

====================
If I enter 0 at this prompt, the compilation continues seemingly
successfully.
====================
0] 0
Time: 0.01 SEC.

(time taken in buildFunctor: 226)

;;; *** |Foo| REDEFINED

;;; *** |Foo| REDEFINED
Time: 0 SEC.


Cumulative Statistics for Constructor Foo
Time: 0.01 seconds

finalizing NRLIB FOO
Processing Foo for Browser database:
--->/home/hemmecke/backup/git/qeta/tmp/../foo.spad-->Foo(constructor):
Not documented!!!!
--->/home/hemmecke/backup/git/qeta/tmp/../foo.spad-->Foo((foo
((Polynomial C)))): Not documented!!!!
--->/home/hemmecke/backup/git/qeta/tmp/../foo.spad-->Foo(): Missing
Description
; compiling file "/home/hemmecke/backup/git/qeta/tmp/FOO.NRLIB/FOO.lsp"
(written 16 MAY 2024 12:30:49 PM):

; wrote /home/hemmecke/backup/git/qeta/tmp/FOO.NRLIB/FOO.fasl
; compilation finished in 0:00:00.008
------------------------------------------------------------------------
Foo is already explicitly exposed in frame initial
Foo will be automatically loaded when needed from
/home/hemmecke/backup/git/qeta/tmp/FOO.NRLIB/FOO

Ralf
foo.spad

Ralf Hemmecke

unread,
May 16, 2024, 7:13:27 AM5/16/24
to fricas...@googlegroups.com
Further experiments. It seems that the name "coerce" is treated
differently by the compiler.

You can compile the attached program with "xxx ==> bar", but not with
"xxx ==> coerce".

Ralf
foo.spad

Waldek Hebisch

unread,
May 18, 2024, 2:07:47 PM5/18/24
to fricas...@googlegroups.com
Actually, difference is that condition on 'coerce' is redundant.
Spad compiler uses 'false' to mark conditianal signatures with
conditions that are not known to be true. In conditional part
when condition is true condition in the signature is effectively
replaced by true. That worked for 'bar'. But Spad compiler
knew that condition is true so did not bother with replacement
for 'coerce'. I have commited a patch so that code handling
conditions allows false condition, so now this extra signature
causes no trouble.

>
> Ralf
>
> --
> You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to fricas-devel...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/fricas-devel/4c02fab8-c770-431d-90b0-04dac78e7ce9%40hemmecke.org.

> xxx ==> bar
> )abbrev package FOO Foo
> Foo(C: Ring): Exports == Implementation where
> Exports ==> with
> if C has xxx: Integer -> C then
> foo: () -> C
> Implementation ==> add
> if C has xxx: Integer -> C then
> blah(x: Integer): C == xxx x
> foo(): C == 1


--
Waldek Hebisch
Reply all
Reply to author
Forward
0 new messages