Designing and Interpreting a Mathematical Programming Language
Abstract
The syntax of the programming languages has a significant impact on the definition and validation of mathematical calculations. In particular, the management of code identification and validation processes can be made easier and faster, depending on the parametric behavior of the functions. In this article, a programming language that supports the use of mathematical function structures is designed and an interpreter, which can evaluate the source code written in this language, is developed. The language syntax is represented by an LL (k) grammar defined in the BNF notation. The interpreter consists of several basic components such as parser, semantic controller and code evaluator, each of which makes a different kind of code interpretation. The LL (k) parser component used for the syntactic analysis of the language is generated via an automatic code generation tool called JavaCC. The other components work on the abstract syntactic tree that this parser generates. To illustrate the use of the language with code samples, several mathematical algorithms that include calculations on different sequences of numbers, are programmed and interpreted.
Keywords
References
- [1] L. K. C. Louden, “Programming Languages: Principles and Practices", Cengage Learning, 2011.
- [2] R. Harper, "Practical Principles for Programming Languages", 2nd ed., Cambridge University Press, 2016.
- [3] B. W. Kernighan and D. M. Ritchie, "The C Programming Language", Prentice Hall Professional Technical Reference, 1988.
- [4] L. Wall, T. Christiansen and J. Orwant, "Programming Perl", 3rd ed., O'Reilly Media, 2000.
- [5] M. Mateas and N. Montfort, "A Box, Darkly: Obfuscation, Weird Languages, and Code Aesthetics", In Digital Arts and Culture: Digital Experience: Design, Aesthetics, Practice (DAC 2005), Copenhagen, Denmark, 2005.
- [6] International Obfuscated C Code Contest., https://www.ioccc.org/, 2018.
- [7] J. Wakerly, "The programming language Pascal", Microprocessors and Microsystems, vol. 3, no. 7, pp. 321-326, 1979.
- [8] K. Arnold, J. Gosling, and . Holmes, "The Java programming language", Addison Wesley Professional, 2005.
Details
Primary Language
English
Subjects
Computer Software
Journal Section
Research Article
Authors
Publication Date
December 1, 2019
Submission Date
December 11, 2018
Acceptance Date
April 16, 2019
Published in Issue
Year 2019 Volume: 23 Number: 6
Cited By
On technical debt in mathematical programming: An exploratory study
Mathematical Programming Computation
https://doi.org/10.1007/s12532-022-00225-1Centralized QoS Routing Model for Delay/Loss Sensitive Flows at the SDN-IoT Infrastructure
Computers, Materials & Continua
https://doi.org/10.32604/cmc.2021.018625