[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
a bug with big defstructs
I think I have reported something like this earlier. But since it is
still in the 16b core I am sending it again in another shape. The easy
workaround is to move some slot init's out of the make- function.
(in-package 'bug)
(deftype point () `(integer -1000 1000))
(defstruct (parameters)
"all parameters to the match system."
(name-min-point 0 :type point)
(other-min-point 0 :type point)
(divide-difference-factor 0.0d0 :type double-float)
(min-weighted-word-count 0 :type fixnum)
(max-weighted-word-count 0 :type fixnum)
(first-match-point-threshold 0 :type point)
(point-threshold-lessen 0 :type point)
(final-point-threshold 0 :type point)
(orgnum 0 :type point)
(orgnum-wrong-point 0 :type point)
(orgnum-frequency-extra 0 :type point)
(orgnum-scale 0.0d0 :type double-float)
(name-levenshtein-match 0 :type point)
(name-levenshtein-weight-mul 0.0d0 :type double-float)
(name-levenshtein-weight-pow 0.0d0 :type double-float)
(christian-name-levenshtein-match 0 :type point)
(christian-name-levenshtein-wight-mul 0.0d0 :type double-float)
(christian-name-levenshtein-wight-pow 0.0d0 :type double-float)
(sir-name-levenshtein-match 0 :type point)
(sir-name-levenshtein-wight-mul 0.0d0 :type double-float)
(sir-name-levenshtein-wight-pow 0.0d0 :type double-float)
(title-levenshtein-match 0 :type point)
(title-levenshtein-wight-mul 0.0d0 :type double-float)
(title-levenshtein-wight-pow 0.0d0 :type double-float)
(department-levenshtein-match 0 :type point)
(department-levenshtein-wight-mul 0.0d0 :type double-float)
(department-levenshtein-wight-pow 0.0d0 :type double-float)
(address-levenshtein-match 0 :type point)
(address-levenshtein-match-min 0 :type point)
(address-levenshtein-match-scale 0.0d0 :type double-float)
(address-levenshtein-weight-mul 0.0d0 :type double-float)
(address-levenshtein-weight-pow 0.0d0 :type double-float)
(postalcode 0 :type point)
(postalcode-min 0 :type point)
(postalcode-scale 0.0d0 :type double-float)
(post-first-digits-match 0 :type point)
(post-no-first-digits-match 0 :type point)
(pbox 0 :type point)
(pbox-min 0 :type point)
(pbox-scale 0.0d0 :type double-float)
(phone 0 :type point)
(phone-min 0 :type point)
(phone-scale 0.0d0 :type double-float)
(phone-areacode-wrong 0 :type point)
(city 0 :type point)
(city-low-point 0 :type point)
(city-frequency-extra 0 :type point)
(city-scale 0.0d0 :type double-float)
(city-levenshtein-weight-mul 0.0d0 :type double-float)
(city-levenshtein-weight-pow 0.0d0 :type double-float)
(max-potentials-word 0 :type fixnum)
(max-potentials-address 0 :type fixnum)
(max-potentials-postalcode 0 :type fixnum)
(max-potentials-postalcode-3 0 :type fixnum)
(max-potentials-postalcode-2 0 :type fixnum)
(max-potentials-pbox 0 :type fixnum)
(max-potentials-orgnum 0 :type fixnum)
(max-potentials-phone 0 :type fixnum)
(max-potentials-city 0 :type fixnum))
(defun get-parameter-structure ()
(declare (values parameters))
(make-parameters
;;
:name-min-point 30
;; This should be more that usual for pnr and ort
:other-min-point 28
:divide-difference-factor 2.8d0
:min-weighted-word-count 250
:max-weighted-word-count 2500
;;
:first-match-point-threshold 250
:point-threshold-lessen 25
:final-point-threshold 200
;;
;;
:orgnum 20
:orgnum-frequency-extra 120
:orgnum-scale 1.2d0
:orgnum-wrong-point -150
;;
;;
:name-levenshtein-match 300
:name-levenshtein-weight-mul 0.0d0 ;not used
:name-levenshtein-weight-pow 2.30d0
;;
:christian-name-levenshtein-match 20
:christian-name-levenshtein-wight-mul 0.0d0
:christian-name-levenshtein-wight-pow 2.30d0
:sir-name-levenshtein-match 20
:sir-name-levenshtein-wight-mul 0.0d0
:sir-name-levenshtein-wight-pow 2.30d0
:title-levenshtein-match 15
:title-levenshtein-wight-mul 0.0d0
:title-levenshtein-wight-pow 2.30d0
:department-levenshtein-match 15
:department-levenshtein-wight-mul 0.0d0
:department-levenshtein-wight-pow 2.30d0
:address-levenshtein-match 120
:address-levenshtein-match-min 80
;; Divide freq by this
:address-levenshtein-match-scale 1.30d0
:address-levenshtein-weight-mul 0.0d0
:address-levenshtein-weight-pow 2.30d0
;;
:postalcode 80
:postalcode-min 20
:postalcode-scale 1.20d0
:post-first-digits-match 5
:post-no-first-digits-match -10
;;
:pbox 130
:pbox-min 80
:pbox-scale 1.40d0
;;
:phone 130
:phone-min 60
:phone-scale 1.50d0
:phone-areacode-wrong -10
;;
;; city-point = (lev city1 city2) * city - city-low-point
;; (if (> city-point 0)
;; (incf city-point city-frequency-extra * city-frequency /
;; city-scale / 100.0))
:city 50
:city-low-point -40
:city-frequency-extra 50
:city-scale 12.00d0
;; not used
:city-levenshtein-weight-mul 0.0d0
:city-levenshtein-weight-pow 2.30d0
;;
;; How many records may there be before we skip searching on this datum
:max-potentials-word 250
:max-potentials-address 250
:max-potentials-postalcode 300
:max-potentials-postalcode-3 300
:max-potentials-postalcode-2 300
:max-potentials-pbox 250
:max-potentials-orgnum 100
:max-potentials-phone 250
:max-potentials-city 250))
Starting lisp -version 16b -noinit ...
CMU Common Lisp 16b, running on analytik
Hemlock 3.5 (16b), Python 1.0(16b), target SPARCstation/Sun 4
Send bug reports and questions to cmucl-bugs@cs.cmu.edu.
*
* (compile-file "/my/w-lisp/bug-reports/big-defstruct.lisp")
Python version 1.0(16b), VM version SPARCstation/Sun 4 on 20 MAR 92 03:01:10 am.
Compiling: /tmp_mnt/net/puma/d2/my/w-lisp/bug-reports/big-defstruct.lisp 20 MAR 92 02:57:41 am
Compiling DEFTYPE POINT:
Converted MAKE-PARAMETERS.
Compiling DEFSTRUCT PARAMETERS:
[GC threshold exceeded with 6,657,864 bytes in use. Commencing GC.]
[GC completed with 1,133,760 bytes retained and 5,524,104 bytes freed.]
[GC will next occur when at least 3,133,760 bytes are in use.]
Converted GET-PARAMETER-STRUCTURE.
Compiling DEFUN GET-PARAMETER-STRUCTURE:
Compiling Top-Level Form:
/my/w-lisp/bug-reports/big-defstruct.sparcf written.
Compilation finished in 0:00:35.
#p"/tmp_mnt/net/puma/d2/my/w-lisp/bug-reports/big-defstruct.sparcf"
NIL
NIL
* (load "/my/w-lisp/bug-reports/big-defstruct")
; Loading "/tmp_mnt/net/puma/d2/my/w-lisp/bug-reports/big-defstruct.sparcf".
T
* (bug::get-parameter-structure)
Error in function "DEFSTRUCT PARAMETERS".
Unknown keyword: #<Function BUG::MAKE-PARAMETERS {B1680F1}>
Restarts:
0: [ABORT] Return to Top-Level.
Debug (type H for help)
(DEBUG::DEBUG-LOOP)
0] ba
(DEBUG::DEBUG-LOOP)
("DEFUN DEBUG-LOOP" #<unavailable-arg> #<unavailable-arg>)[:EXTERNAL]
(DEBUG:INTERNAL-DEBUG)
(INVOKE-DEBUGGER #<SIMPLE-ERROR {B18D46D}>)
(INVOKE-DEBUGGER #<unavailable-arg>)
(ERROR SIMPLE-ERROR :FUNCTION-NAME "DEFSTRUCT PARAMETERS" :FORMAT-STRING ...)
("DEFERR UNKNOWN-KEYWORD-ARGUMENT-ERROR" "DEFSTRUCT PARAMETERS"
#.(SYSTEM:INT-SAP #x00E00418) #<Alien (* #) at #xF7FFE400> (524))
("DEFERR UNKNOWN-KEYWORD-ARGUMENT-ERROR" #<unavailable-arg> #<unavailable-arg>
#<unavailable-arg> #<unavailable-arg>)
(KERNEL::INTERNAL-ERROR #.(SYSTEM:INT-SAP #xF7FFE400) #<unavailable-arg>)
("Foreign function call land")
("DEFSTRUCT PARAMETERS" 3670334 118)[:OPTIONAL]
(BUG::GET-PARAMETER-STRUCTURE)
(INTERACTIVE-EVAL (BUG::GET-PARAMETER-STRUCTURE))
(COMMON-LISP::%TOP-LEVEL)
("DEFUN %TOP-LEVEL" #<unavailable-arg>)[:EXTERNAL]
(COMMON-LISP::%INITIAL-FUNCTION)
0]
David Axmark
EMAIL: davida@isil.detron.se
MAIL: Detron HB, Petterslundsg 11 A, 753 28, UPPSALA, SWEDEN
PHONE: + (46) 18 - 11 07 80
(I can't spell in ANY language ...)