From 903b02ea8368a66d9d8966314d22495ccb422d72 Mon Sep 17 00:00:00 2001 From: Raymond Toy Date: Mon, 18 Nov 2024 15:57:33 -0800 Subject: [PATCH] Fix #4413: In def-simplifier, add noun property Also, when matching Maxima keyword args, call $verbify to convert any nouns to verbs since the list of valid keywords are all verbs. --- src/defmfun-check.lisp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/defmfun-check.lisp b/src/defmfun-check.lisp index 773f69dc8..8569c2c06 100644 --- a/src/defmfun-check.lisp +++ b/src/defmfun-check.lisp @@ -245,7 +245,11 @@ o (declare (ignore mequal)) (if (or (null valid-keywords) - (member opt valid-keywords)) + ;; The valid keywords are always verb forms + ;; ($foo), so we need to convert OPT to a + ;; verb form to be able to match the + ;; keywords. + (member ($verbify opt) valid-keywords)) (flet ((keywordify (x) (intern (subseq (symbol-name x) 1) :keyword))) (list (keywordify opt) val)) @@ -642,6 +646,13 @@ ;; Set up properties (defprop ,noun-name ,simp-name operators) + + ;; The noun property is needed so that $verbify returns the + ;; verb form. Without this, things like ($verbify '%beta) + ;; doesn't return $beta because beta is a function and a + ;; variable (used by dgemm). + (defprop ,noun-name ,verb-name noun) + ;; The verb and alias properties are needed to make things like ;; quad_qags(jacobi_sn(x,.5)...) work. (defprop ,verb-name ,noun-name verb) -- 2.11.4.GIT