A compiler-based framework for automated numerical method selection via deterministic finite automata

Authors

  • Muhammad Bala Universitas Andalas
  • Susila Bahri Universitas Andalas

DOI:

https://doi.org/10.32890/jcia2026.5.2.1

Keywords:

Automated solvers, compiler systems, DFA classification, mathematical expressions, numerical methods

Abstract

This study introduces a compiler-integrated framework for the automated selection of numerical methods through deterministic finite automata (DFA)-based structural classification of mathematical expressions. Traditional numerical method selection approaches typically rely on expert knowledge or data-driven models, which often lack interpretability and fail to integrate seamlessly with compiler systems. In contrast, the proposed framework employs a domain-specific language, lexical analysis, canonicalization, and DFA-based pattern recognition to classify mathematical expressions into categories such as linear, polynomial, nonlinear, recurrence relations, and ordinary differential equations (ODEs). Subsequently, a rule-based selection engine maps each expression to the most appropriate numerical solver, including Newton’s method, Bisection, Secant, Euler, RK2, and RK4 methods. Evaluation of the framework on a dataset of 150 expressions yielded 96.67% classification accuracy and 97% correctness in method selection. The solvers demonstrate convergence behavior consistent with theoretical expectations, while the computational overhead remains under 2 milliseconds. This approach offers an interpretable and efficient alternative to machine-learning-based methods and demonstrates the feasibility of integrating numerical reasoning directly into compiler systems and mathematical software.

References

Aho, A. V., Lam, M. S., Sethi, R., & Ullman, J. D. (2007). Compilers: Principles, techniques, & tools (2nd ed.). Pearson Addison-Wesley.

Atkinson, K. E. (1989). An introduction to numerical analysis (2nd ed.). John Wiley & Sons.

Cooper, K. D., & Torczon, L. (2012). Engineering a compiler (2nd ed.). Morgan Kaufmann. https://doi.org/10.1016/C2009-0-27982-7

Dennis, J. E., Jr., & Schnabel, R. B. (1996). Numerical methods for unconstrained optimization and nonlinear equations. SIAM. https://doi.org/10.1137/1.9781611971200

Driscoll, T. A., Bornemann, F., & Trefethen, L. N. (2008). The chebop system for the automatic solution of differential equations. BIT Numerical Mathematics, 48(4), 701–723. https://doi.org/10.1007/s10543-008-0198-4

Grune, D., van Reeuwijk, K., Bal, H. E., Jacobs, C. J. H., & Langendoen, K. (2012). Interpretation. In Modern compiler design (pp. 299–312). Springer. https://doi.org/10.1007/978-1-4614-4699-6_6

Jessup, E., Motter, P., Norris, B., & Sood, K. (2016). Performance-based numerical solver selection in the Lighthouse framework. SIAM Journal on Scientific Computing, 38(5), S750–S771. https://doi.org/10.1137/15M1028406

Khakpour, A., Colomo-Palacios, R., Martini, A., & Sánchez-Gordón, M. (2023). The use of domain-specific languages for visual analytics: A systematic literature review. Technologies, 11(2), 37. https://doi.org/10.3390/technologies11020037

Lee, Y., Liu, S., Darbon, J., & Karniadakis, G. E. (2025). Automatic discovery of optimal meta-solvers for time-dependent nonlinear PDEs. arXiv. https://doi.org/10.48550/arXiv.2507.00278

Liu, H., Xu, J., Chen, S., & Guo, T. (2022). Compiler optimization parameter selection method based on ensemble learning. Electronics, 11(15), 2452. https://doi.org/10.3390/electronics11152452

Mithul, C., Abdulla, D. M., Virinchi, M. H., Sathvik, M., & Belwal, M. (2024). Exploring compiler optimization: A survey of ML, DL and RL techniques. In 2024 8th International Conference on Computational System and Information Technology for Sustainable Solutions (CSITSS) (pp. 512–517). IEEE. https://doi.org/10.1109/CSITSS64042.2024.10816929

Motter, P., Sood, K., Jessup, E., & Norris, B. (2015). Lighthouse: An automated solver selection tool. In Proceedings of the 3rd International Workshop on Software Engineering for High Performance Computing in Computational Science and Engineering (SEHPCCSE) (pp. 16–24). Association for Computing Machinery. https://doi.org/10.1145/2830168.2830169

Norris, B., Bernstein, S.-L., Nair, R., & Jessup, E. R. (2014). Lighthouse: A user-centered web service for linear algebra software. arXiv. https://doi.org/10.48550/arXiv.1408.1363

Petcu, D., & Drăgan, M. (2000). Designing an ODE solving environment. In H. P. Langtangen, A. M. Bruaset, & E. Quak (Eds.), Advances in software tools for scientific computing (Lecture Notes in Computational Science and Engineering, Vol. 10, pp. 319–338). Springer. https://doi.org/10.1007/978-3-642-57172-5_10

Press, W. H., Teukolsky, S. A., Vetterling, W. T., & Flannery, B. P. (2007). Numerical recipes: The art of scientific computing (3rd ed.). Cambridge University Press.

Saad, Y. (2003). Iterative methods for sparse linear systems (2nd ed.). SIAM. https://doi.org/10.1137/1.9780898718003

Said Solaiman, O., Sihwail, R., Shehadeh, H., Hashim, I., & Alieyan, K. (2023). Hybrid Newton–sperm swarm optimization algorithm for nonlinear systems. Mathematics, 11(6), 1473. https://doi.org/10.3390/math11061473

Sal, B., García-Saiz, D., de la Vega, A., & Sánchez, P. (2024). Domain-specific languages for the automated generation of datasets for Industry 4.0 applications. Journal of Industrial Information Integration, 41, 100657. https://doi.org/10.1016/j.jii.2024.100657

Shen, L., Chen, X., Liu, R., Wang, H., & Ji, G. (2020). Domain-specific language techniques for visual computing: A comprehensive study. Archives of Computational Methods in Engineering, 28(4), 3113–3134. https://doi.org/10.1007/s11831-020-09492-4

Wang, H., Tang, Z., Zhang, C., Zhao, J., Cummins, C. C., Leather, H., & Wang, Z. (2022). Automating reinforcement learning architecture design for code optimization. In Proceedings of the 31st ACM SIGPLAN International Conference on Compiler Construction (pp. 129–143). Association for Computing Machinery. https://doi.org/10.1145/3497776.3517769

Winkler, F. (2024). Symbolic computation in algebra, geometry, and differential equations. Information and Computation, 301, 105200. https://doi.org/10.1016/j.ic.2024.105200

Zabegaev, Y., Keilegavlen, E., Iversen, E., & Berre, I. (2024). Automated linear solver selection for simulation of multiphysics processes in porous media. Computer Methods in Applied Mechanics and Engineering, 426, 117031. https://doi.org/10.1016/j.cma.2024.117031

Downloads

Published

31-07-2026

How to Cite

Bala, M., & Bahri, S. (2026). A compiler-based framework for automated numerical method selection via deterministic finite automata. Journal of Computational Innovation and Analytics (JCIA), 5(2), 1-24. https://doi.org/10.32890/jcia2026.5.2.1

Research impact

Harvested 2026-08-29
0 citations recorded so far

Counts differ between services because each indexes a different body of literature. None of them is the whole picture.

Identifiers DOI 10.32890/jcia2026.5.2.1 OpenAlex W7171847987

Similar Articles

1-10 of 23

You may also start an advanced similarity search for this article.