Maple 2020 includes the following enhancements to the Maple language and programming facilities.
Programming Tools Updates
Improvements to Execution Tracing
New Debugger Commands
Additional Information in Error and Warning Messages
Additions to the Java OpenMaple API
The Java OpenMaple Application Program Interface has been extended to simplify access to Maple data structures from Java.
Many OpenMaple classes corresponding to Maple data structures now implement standard interfaces from the java.util package, which enables simpler syntax and easier integration with existing Java code making use of these interfaces. These improved classes include:
In particular, these interfaces enable you to easily iterate over Maple data structures in Java code using Java for-in loops. The following sample code illustrates traversals which implicitly use these interfaces.
When compiled and executed with a Maple instance, the above sample code produces the following result.
CodeTools:-ProgramAnalysis:-StaticCallGraph
StaticCallGraph returns a directed graph which represents a static call graph for the input P. The vertices of the graph are strings which represent procedures or appliable modules, and a directed arc exists from f to g when there is an explicit reference to g in the body of f.The output is a Maple graph suitable for use with commands from the GraphTheory package.
> |
> |
> |
> |
ListTools:-Slice
The Slice command in the ListTools package slices a list into a sequence of sub-lists. The number of sub-lists is user-provided, and the lengths of the sub-lists in the sequence differ by at most one. Note that if the specified number of sub-lists is greater than the number of elements in the original list, then the result is a sequence of sub-lists consisting of a single element, followed by empty lists. For example:
> |
> |
> |
For comparison, the LengthSplit command, which splits the list based on a target length, often returns sub-lists with lengths of larger difference:
> |
> |
Miscellaneous