Sayısal Çözümleme Yöntemlerinin Programlanması ve Yorumlanması

Sayısal hesaplama ya da diğer adıyla nümerik analiz, uygulamalı matematiğin önemli bir dalıdır. Matematiğin analitik çözüm üretemediği veya üretilen çözümün uygulama açısından yüksek hesaplama karmaşıklığına sahip olduğu durumlarda sayısal yöntemler kullanılır. Bu makalede, sayısal yöntemlerin programlanabilmesini sağlayan bir programlama dilinin tasarımı yapılmış ve bu dilde yazılan kaynak kodun değerlendirmesini yapabilen bir yorumlayıcı geliştirilmiştir. Dilin sözdizimi BNF (Backus Naur Form) notasyonunda tanımlanan bir LL(k) grameri ile temsil edilmiştir. Yorumlayıcı, her biri kodun farklı türden yorumlamasını yapan ayrıştırıcı, anlamsal denetleyici, simgesel türev alıcı ve kod değerlendirici gibi birkaç temel bileşenden oluşmaktadır. Dilin sözdizim analizi için kullanılan LL(k) ayrıştırıcı bileşeni, otomatik kod üretim aracı olan JavaCC yardımıyla üretilmiştir. Diğer bileşenler bu ayrıştırıcının oluşturduğu soyut sözdizim ağacı üzerinde çalışmaktadır. Dilin kullanımına yönelik olarak, birkaç sayısal kök bulma yönteminin programlaması ve yorumlaması gösterilmiştir. Bazı popüler diller ile dil metriklerine dayalı bir karşılaştırma yapılmış ve koşum zamanları değerlendirilmiştir.

Programming and Interpretation of Numerical Analysis Methods

Numerical calculation, or, in other words, numerical analysis, is an important branch of applied mathematics. Numerical methods are used where mathematics can not produce an analytical solution or the generated solution has high computational complexity. In this article, a programming language that allows numerical methods to be programmed 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 (Backus Naur Form) notation. The interpreter consists of several basic components such as parser, semantic controller, symbolic derivator 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 JavaCC, an automatic code generation tool. The other components work on the abstract syntactic tree that this parser generates. For the use of the language, the programming and interpretation of several numerical root finding methods are demonstrated. A comparison is made with some populer languages based on language metrics and the running time is evaluated.

___

  • [1] J.V.Z. Gathen and J. Gerhard, “Modern Computer Algebra”, 3rd ed., Cambridge University Pres, Cambridge, 2013.
  • [2] MathWorks, (24 Ocak 2019). [Online]. Erişim: http://www.mathworks.com.
  • [3] Maplesoft, (24 Ocak 2019). [Online]. Erişim: http://www.maplesoft.com.
  • [4] Wolfram, (24 Ocak 2019). [Online]. Erişim: http://www.wolfram.com.
  • [5] W. A. Martin and R. J. Fateman, “The MACSYMA system”, Proceedings of the 2nd ACM symposium on Symbolic and Algebraic Manipulation. ACM, pp. 59-75, 1971.
  • [6] S. H. Sadat-Mohtasham and A. A. Ghorbani, “A language for high-level description of adaptive web systems”, Journal of Systems and Software, vol. 81, no. 7, pp. 1196-1217, 2008.
  • [7] S. Louise, “An OpenMP backend for the ΣC streaming language”, Procedia Computer Science, 108, pp. 1073-1082, 2017.
  • [8] N. Kokash, S. L. Moodie, M. K. Smith and N. Holford, “Implementing a domain-specific language for model-based drug development”, Procedia Computer Science, 63, pp. 308-316, 2015.
  • [9] E. G. Pinho and F. H. de Carvalho Junior, “An object-oriented parallel programming language for distributed-memory parallel computing platforms”, Sci. Comput. Program., 80 pp. 65- 90, 2014.
  • [10] J. R. Levine, J. R. Levine, T. Mason and D. Brown, “Lex & Yacc”, O’Reilly Media, Inc., Sebastopol, CA, USA, 1992.
  • [11] E. M. Gagnon and L. J. Hendren, “SableCC, an object-oriented compiler framework", In TOOLS USA 98 (Technology of Object-Oriented Languages and Systems), IEEE, 1998.
  • [12] V. Kodaganallur, “Incorporating language processing into Java applications: A JavaCC tutorial”, IEEE Software, vol. 21, no. 4, pp. 70–77, 2004.
  • [13] A. J. Dos Reis, “Compiler Construction Using Java, JavaCC, and Yacc”, IEEE Computer Society, Inc., 2012.
  • [14] S. C. Chapra and R. P. Canale, Numerical Methods for Engineers, 7th ed., McGraw Hill, 2015.
  • [15] B. W. Kernighan and D. M. Ritchie, "The C Programming Language", Prentice Hall Professional Technical Reference, 1988.
  • [16] K. Arnold, J. Gosling, and D. Holmes, "The Java programming language", Addison Wesley Professional, 2005.
  • [17] S. P. Jones. "Haskell 98 language and libraries: the revised report", Cambridge University Press, 2003.
  • [18] E. Gamma, R. Helm, R. Johnson and J. Vlissides, “Design Patterns: Elements of Reusable Object-Oriented Software”, Addison-Wesley Reading, MA, 1995.
  • [19] C.-J. H. Seger, R. B. Jones, J. W. O'Leary, T. Melham, M. D. Aagaard, C. Barrett, and D. Syme, “An Industrially Effective Environment for Formal Hardware Verification”, IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, vol. 24, no. 9, pp. 1381-1405, 2005.
  • [20] J. Armstrong, “Erlang”, Communications of the ACM, vol. 53, no. 9, pp. 68–75, 2010.
  • [21] Wolfram Language & System Documentation Center (24 Ocak 2019). [Online]. Erişim: reference.wolfram.com.
  • [22] H. Chen, “Comparative Study of C, C++, C# and Java Programming Languages”, M.S.thesis, Info. Tech., VAMK Univ., Vaasa, Finland, 2010.
  • [23] P. Gooyal, “A comparative study of C, Java, C# and Jython”, M.S. thesis, School of Comp.,UNF, Florida, USA, 2014.
  • [24] L. K. C. Louden, Programming Languages: Principles and Practices, Cengage Learning, 2011.
  • [25] R. Harper, Practical Principles for Programming Languages, 2nd ed., Cambridge University Press, 2016.
  • [26] S. Nanz, and C. A. Furia, “A Comparative Study of Programming Languages in Rosetta Code”, 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering, 1, pp. 778-788, 2015.
  • [27] B. O. Oguntunde, “Comparative analysis of some programming languages”, Transnational Journal of Science and Technology, vol. 2, no. 5, pp. 107-118, 2012.
  • [28] K. Biswa, B. Jamatia, D. Choudhury and P. Borah, “Comparative analysis of C, Fortran, C# and Java Programming Languages”, International Journal of Computer Science and Information Technologies (IJCSIT), vol. 7, no. 2, pp. 1004-1007, 2016.
  • [29] R. Naim, M. F. Nizam, S. Hanamasagar, J. Noureddine, M. Miladinova, “Comparative studies of 10 programming languages within 10 diverse criteria – a Team 10 COMP6411-S10”, Rep. arXiv:1008.3561, 2010.