[ANN] Reduce.jl : Symbolic CAS parser-interface


REDUCE is a portable general-purpose computer algebra system. This package enables users of Julia to use this programmable CAS inside Julia with methods that automatically parse queries and their output.

It currently supports both 0.6 and 0.7 version of Julia. See README and docs for examples.

At this point in the development of this module, there should be enough documentation with examples available for users to see what they can do with it. The way it currently works is by piping the IO from Julia with the upstream reduce binaries provided on SourceForge. In time, it will be possible to port these methods into native Julia or to make upstream modifications that enable the use C interfaces, with other planned optimizations for the Julia-Reduce parser performance.

It will be interesting to see what kind of use cases that users will come up with. Due to the large amount of generated code produced by this module, all generated code has not been individually tested for special input or output scenarios. However, the generalized nature of the parser-generator has been well-tested for robustness, even though each individual generated method is not tested yet.

With this package, it is easily possible to extend the integration of Reduce with the Julia language, by use of the parsegen method. Regular users don’t need to use it, but for developers who are interested in extending Reduce: it is worth knowing that it is very simple to create more specialized call methods. An example of how this can be done is the ReduceLinAlg package, which uses Reduce and provides an additional set of linear algebra related methods. The JuliaReducePkg organization has been created in order to organize further extensions and additional packages created with the Reduce parser and its features.

This discourse thread, the gitter page, and the issues and pull-requests can be used to provide feedback.

Issues with the upstream REDUCE binaries can be resolved with the collaborators on SourceForge.

If you come up with some interesting use-cases for this, you are free to communicate them here too.


I get a curl error due to some certification issues, when I try to build Reduce. I assume thats an issue with the binaries? Any easy fixes?

curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or thename might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.

Could be, or your local certificates are out of date (update?). If you have a lot of trouble with the certificate, you can technically install the program manually too, in multiple ways.

seems to be because the curl used by julia is somehow not the one in my PATH… Rather an anaconda one… Weird, but I managed to download the dmg.

the build script for OSX basically runs these commands here

so just copy the csl folder from dmg into the deps/csl folder and you are set

Yea I just manually downloaded it, commented out the download line and it worked :slight_smile: thanks!

1 Like

Is defining mathematical functions on symbols and expressions not type piracy?

Yes, it is, but only if those methods are being “pirated.” However, in Reduce, the methods contained in the Reduce.Algebra module are not the same ones that are in Base. They are their own methods, so they are not doing type-piracy and do not modify the global behavior of the Base methods. For example Algebra.:+ is not the same method as Base.:+.

julia> Algebra.:+ == Base.:+

The first major version v1.0.0 of Reduce.jl is now released and compatible with Julia 1.0 and 0.7

Now that the 1.0 transition is complete, the next planned minor update for Reduce.jl will be focused on making the parsing faster with an extensive IOBuffer redesign of the parser-generator. I already have an outline and several planned approaches for redesign; however since I am working on this package on my free time alongside other priorities, I can’t provide a specific date for the next update yet. Stay tuned for more and if there are any issues a patch update will be released as soon as it is needed / resolved.


The package is now updated to v1.2.3 with newest revision REDUCE binaries snapshot_2019-09-15.

One interesting side note is the download history of the previously used binaries snapshot_2018-04-06:

This snapshot used by the Julia Reduce package was downloaded 6550 times, which is fairly active.

Other snapshots of REDUCE were not so actively downloaded, giving insight into the Julia user base.

In the other graph above, the snapshot_2018-08-08 was not used by the Julia community and has 900 downloads. From this data, it is clear that Julia users are a significant portion of REDUCE users.

Most of the downloads of the sustained snapshot_2018-04-06 up until now were due to Julia users.