Greetings, and thank you so much! This appears to have removed the practical problem for the moment -- great!
Your extremely helpful earlier exposition however indicates the potential need for large argument lists in the future. Please forgive me as I have not yet examined the code in any detail, but the naming seems to indicate that some of these functions might satisfy a property like (fn a b c) == (fn (fn a b) c) (e.g. '|Join|, '|Union|...) You also indicate that you aggressively 'flatten' '|Join| calls, which is also suggestive that '|Join| might have this property. This was the thinking about suggesting reduce on a list, which may very well be equivalent to the algorithm of '|JoinInner|. If there is such flattening going on, one might very well limit it to call-arguments-limit at that point. I am experimenting with a list macro at the moment to take care of that function, which seems to be working. You might be interested to know that when we were working out similar problems with ACL2, now finished, the author introduced a list$ macro: (defmacro list$ (&rest args) ; The logical definitions agree for this macro and list. But in raw Lisp, a ; macro call of list$ expands to a nest of cons calls, which allows GCL version ; 2.7.0 (and presumably later versions) to avoid causing an error when list is ; called on too many arguments. (list-macro args)) (defun list-macro (lst) (declare (xargs :guard t)) (if (consp lst) (cons 'cons (cons (car lst) (cons (list-macro (cdr lst)) nil))) nil)) GCL's compiler then groups this code, valid regardless of call-arguments-limit, into valid calls to list respecting that limit. ACL2 had been writing code like that for a long time anyway so it made eminent sense. I do not know if a similar approach is a good fit for FRICAS. Take care, Waldek Hebisch <de...@fricas.org> writes: > On Sat, Jan 11, 2025 at 01:27:54AM +0100, Waldek Hebisch wrote: >> >> There is similar code path where result of 'mkEvalableCategoryForm' >> is passed to 'eval'. For FriCAS categories one needs first use >> 'mkEvalableCategoryForm' before using 'eval', so basically there >> are 3 call sites that pass category expression to Lisp 'EVAL', >> all going via 'eval'. In principle 'mkEvalableCategoryForm' >> could replace >> >> (Join arg1 arg2 ... argn) >> >> with >> >> (JoinInner (LIST arg1 arg2 ... argn)) >> >> if that helps. > > > I mean the attached patch. > > -- > Waldek Hebisch -- Camm Maguire c...@maguirefamily.org ========================================================================== "The earth is but one country, and mankind its citizens." -- Baha'u'llah -- 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+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/fricas-devel/874j25nuhl.fsf%40maguirefamily.org.