S42 fixes a compiler memory problem

42 views
Skip to first unread message

dr.mt...@gmail.com

unread,
Aug 21, 2026, 2:42:51 PMAug 21
to Shen
(d-rule list-identity ()

_______________________________________________________________________
[all A : type [all X : A [all Y : [list A] [all W : A [all Z : [list A]
              [[[cons X Y] = [cons W Z]] => [[X = W] & [Y = Z]]]]]]]];)

is a Logic Lab axiom in the system I was building.  SBCL died on this
but Chez did not.  

(define f
   [all A : type [all X : A [all Y : [list A] [all W : A [all Z : [list A]
              [[[cons X Y] = [cons W Z]] => [[X = W] & [Y = Z]]]]]]]] -> true)

also crashed undeer SBCL - memory problems.

The cause is the extremely complex typed prop in this axiom and
the proliferation of selectors in the KL code.  The S41 factoriser does
not fix this; it works on overlapping patterns and here there is only
one.  I adjusted the factoriser in S42 to optimise selectors and the 
axiom now compiles under factorisation.

Interestingly the compilation time for the logic went down from 1.9s 
under S41 to 1.3s under S42.   

M.
Reply all
Reply to author
Forward
0 new messages