Array functions can now be translated (again)
The translation of array functions has been broken for decades, since
the port to CL. Array functions always silently fail to translate:
(%i1) foo[x] := x$
(%i2) translate (foo)$
error: failed to translate foo
The immediate problem has been due to a Maclisp-style array reference,
which caused a lisp error during translation.
After that, another problem is due to a LispM lisp-style function spec,
which was supposed to store the translated function definition on the
A-SUBR property of the symbol $FOO, but instead caused it to be stored
on the $FOO property of the :PROPERTY symbol.
After that, another problem is due to a failed property lookup. Under
Maclisp the function definition was originally stored on the A-EXPR
(interpreted) and A-SUBR (compiled) properties. On the LispM it was
originally stored on the A-SUBR property (see above), although it does
appear that some later versions of Macsyma switched to using A-EXPR.
ARRFUNP used to check for both A-EXPR and A-SUBR, but the A-SUBR check
was conditionalized on Maclisp and was eventually removed. Now we
store the function definition on the A-SUBR property and check for
A-SUBR in ARRFUNP.
With these fixes the translation of plain array functions is now
working, but the translation of subscripted functions will still cause
problems for the same reason that upward funargs still cause problems.
We don't currently have any hacks in the translator to fake closures.
No problems with the test suite, share test suite or rtest_translator.
New tests have been added to rtest_translator.