The symbolic-numeric computation has been extensively developed in scientific computing for experimenting mathematics in numerical programs, like in optimization problems and finite element methods. Many software and libraries have been developed to support symbolic-numeric computation especially in the recent years. However, most of the implementations are cumbersome and inefficient for numerically evaluating symbolic expressions. The popular implementation chooses the way that generates C/C++/FORTRAN source codes for symbolic expressions and compiles the source files using the external compilers. The compiled machine codes are then linked back to the symbolic manipulation language environment. Thi sprocess suffers from slow compilation and significant overhead of external function calls. To address this problem, this paper presents a handy approach that provides fast numerical evaluation for symbolic expressions in Java. In our approach, Java bytecode is generated in memory for symbolic expressions and further Just-In-Time (JIT) compiled to machine codes onJava Virtual Machine (JVM) at runtime. We have developedSymJava (https://github.com/yuemingl/SymJava) to implement our approach and tested a range of benchmark problems. The results show that SymJava is 1~3 orders of magnitude faster than the existing implementations including Matlab, Mathematica, Sage, Theano and SymPy. Additionally, SymJava offers a human friendly programming style for symbolic expressions by overloading operators in Java. Our approach opens up a new avenue for the development of next generation symbolic-numeric software.
[1]
M. Reza,et al.
Symbolic computation: A Java based computer algebra system
,
2012,
2012 NATIONAL CONFERENCE ON COMPUTING AND COMMUNICATION SYSTEMS.
[2]
H. H. Rosenbrock,et al.
An Automatic Method for Finding the Greatest or Least Value of a Function
,
1960,
Comput. J..
[3]
Ulrich Langer,et al.
Numerical and Symbolic Scientific Computing
,
2012,
Texts & Monographs in Symbolic Computation.
[4]
Razvan Pascanu,et al.
Theano: new features and speed improvements
,
2012,
ArXiv.
[5]
Artem Melentyev.
Java Modular Extension for Operator Overloading
,
2014,
ArXiv.
[6]
Peter C. Jurs,et al.
Mathematica
,
2019,
J. Chem. Inf. Comput. Sci..
[7]
Anthony C. Hearn,et al.
REDUCE 2: A system and language for algebraic manipulation
,
1971,
SYMSAC '71.
[8]
Richard Kreckel,et al.
Introduction to the GiNaC Framework for Symbolic Computation within the C++ Programming Language
,
2000,
J. Symb. Comput..
[9]
Erich Kaltofen,et al.
Computer Algebra Handbook : Foundations · Applications · Systems
,
2003
.
[10]
J. Abbott,et al.
Approximate Commutative Algebra
,
2009
.
[11]
Stefan Behnel,et al.
Cython: The Best of Both Worlds
,
2011,
Computing in Science & Engineering.
[12]
Dongming Wang,et al.
Symbolic-Numeric Computation
,
2007
.
[13]
B. F. Caviness,et al.
Future Directions for Research in Symbolic Computation
,
1990
.