Re: Compiler design reference sought

"Chun Tian (binghe)" <[email protected]>
Newsgroups gmane.lisp.gcl.devel
Organization The Australian National University
Message-ID <[email protected]>
Hi Camm,

Is it possible that the "iteration" in the GCL compiler that you
mentioned, may not terminate (i.e. falling into infinite loops) for
certain inputs?

The attached Lisp code is the very beginning part of AXIOM's "tangle"
utility for extracting code from LaTeX files. In my machine, GCL 2.7.0
compiler seems take forever to compile the (only) Lisp function in it.

My guess is that, in the function, many other Lisp functions are
referenced, but these functions are to be defined at later position of
the code, and thus their type information is unknown. GCL 2.6.x can
compile this file any way, but the current GCL 2.7.0 compiler seems
failing into infinite loops.

Regards,

Chun TIAN

On 05/02/24 02:27, Camm Maguire wrote:
> Greetings!  Over the years, various theoretical papers on algorithms for
> Common Lisp utilities have been very helpful in GCL development,
> e.g. Baker's paper on the type system.
> 
> I am looking for a reference on compiler design algorithms which handle
> type inferencing most efficiently.  Right now we iterate on conflict,
> and I think this is too slow.  Pointers most appreciated!
> 
> Take care,
>
tangle0.lisp (text/plain, 635 B)
(defvar *chunkhash* nil "this hash table contains the chunks found")
(defvar *chunknoise* nil "turn this on to debug internals")

(defun tangle (filename topchunk &optional file)
 "Extract the source code from a pamphlet file"
 (let ((noweb? (char= (schar topchunk 0) #\<)))
  (setq *chunkhash* (make-hash-table :test #'equal))
  (when *chunknoise* (format t "PASS 1~%"))
  (gcl-hashchunks (gcl-read-file filename) noweb?)
  (when *chunknoise* (format t "PASS 2~%"))
  (if (and file (stringp file))
   (with-open-file (out file :direction :output)
     (gcl-expand topchunk noweb? out))
   (gcl-expand topchunk noweb? t)))
  (values))
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEES+aY+4laoC0TwmVKFUkg2jrYR8gFAmXDTqsACgkQFUkg2jrY
R8gZFA//WnaI/0thnzQcTUhqtR1VZ1+USTU4P2QVk6zzxyBYI2h0zZgQNhCTAgd5
yyoYQfqO5FzBXw8N7ZMPxayKP9KsiFD8UpcguJ3at2FmNPcB7gXfllN9y6csx1en
48OTUQFA2kJQEbuPSGS94LZrX5B4zgITRTqosrkWlogUkfLbEUG16wx8yZ2Vs9xK
6EjoE2YvKr29AWL9INSU35OO72fB+mgKxPY84vm+IEBbWWjMBZVkbbdkpk5q78GU
GV9S0yS7LbYhGQv5rxoZMzVPHAj3VsTiYbUhJJ/yDLiTjtK5qWjimbdypKazkZv5
3WPswsprSH5/udBGzwPIyGD8JyXD2M+HuMGwghtovH9q0seOrq/7SpmOjyw6SDYY
iB2rZzMCz9HcgzzcaggrlLA1H9YtheVPWrcDY5I3iz6QN6jUkw3/FFaFkvDwQoqv
/it+nL+933vMlrL5uZxYMaqADVznLn2ZwY3AYSWt4CG9SjJ5VetwvIAMCDqucGFD
Zm+iK7d7WV7yq6ZmV08rFDDgB6ZcDoDtZGCUUKiEEieKJSCBcQDLPiaWBr5kMLYY
2CGUCtTEvtrfDUdqJg4JJrfDOFSuhnZhAMArN4RqCvuObojaZXzFvvSk+f/9F4UU
sP9/o5MihV351CkkUzcHwAQAKW5jGhwJr5tWzYdv9noumTalDi0=
=lUSy
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.