Open Access Open Access  Restricted Access Subscription or Fee Access

Exploring the Potential of the Kotlin Programming Language for Scientific Computing with the KotlinLab Environment

Stergios Papadimitriou

Abstract


KotlinLab is an easy to use MATLAB-like environment for the Java Virtual Machine (JVM). It implements scripting based on the Kotlin programming language. This paper shows that Kotlin Lab can significantly accelerate and simplify the development of complex scientific computer software in the JVM. The work compares Java based approaches with Kotlin ones, and illustrates the significant advantages of the enhanced flexibility of the Kotlin language. We illustrate that one of the more significant drawbacks of Java is its lack of operator overloading. Also, the nominal approach to functional programming of Java is not as flexible and convenient as the structural approach of Kotlin is. The paper presents the architecture of the KotlinLab environment, and the way that it exploits effectively the Kotlin JSR223 scripting implementation. The main concern of the KotlinLab enviroment is to exploit the potential of the Kotlin language in order to provide a rich and easy to use scientific programming environment. In this way the paper tries to highlight some important and advanced characteristics of the Kotlin language that provide important benefits to the programming experience. In particular, the Kotlin language is especially effective in building DSLs (Domain Specific Languages). At this domain, the paper illustrates the straightforward way to implement scientific operators.


Full Text:

PDF

References


Stephen Samuel and Stefan Bocutiu, Learn Kotlin Programming, Packt 2019. https://www.packtpub.com/product/learn kotlin programming second edition/9781789802351

Dmitry Jemerov, Svetlana Isakova, Kotlin in Action, Manning 2017. https://www.manning.com/books/kotlin in action

Ken Kouse, Kotlin Cookbook, O’Reily, 2018. https://www.oreilly.com/library/view/kotlin

cookbook/9781492046660/

Pierre Yves Saumont, The Joy of Kotlin, Manning, 2019. https://www.manning.com/books/the

joy of kotlin

Marcin Moskala, Effective Kotlin, Leanpub, 2020. https://leanpub.com/effectivekotlin

Stergios Papadimitriou, Konstantinos Terzidis, Seferina Mavroudi, Spiridon Likothanasis, “ScalaLab: an effective scientific programming environment for the Java Platform based on the Scala object functional language”, IEEE Computing in Science and Engineering (CISE), Vol. 13, No 5, 2011, p. 43 55

Papadimitriou S., Mavroudi S., Theofilatos K., Likothanasis S., The software architecture for performing scientific computation with the JLAPACK libraries in ScalaLab, Scientific Programming, 2012; 20 (4), pp. 379 391

Stergios Papadimitriou, Lefteris Moussiades. Combining Scala with C++ for efficient scientific computation in the context of ScalaLab, Lecture Notes in Engineering and Computer Science. 2016; 1: 409 412

Papadimitriou S, Moussiades L, The design of JVM and native libraries in ScalaLab for efficient scientific computation, International Journal of Modeling, Simulation and Scientific Computing 9 (5), 1850037, 2018

Gilles Dubochet, “On Embedding domain specific languages with user friendly syntax”, In Proceedings of the 1st Workshop on Domain Specific Program Development, pages 19 22, 2006

Gilles Dubochet, “Embedded Domain Specific Languages using Libraries and Dynamic Metaprogramming”, PhD Thesis, EPFL, Suise, 2011

Cay Horstmann, Gary Cornell, Core Java 2, Vol I Fundamentals, Vol II Advanced Techniques. Sun Microsystems Press, 11th edition, 2019

Hang T. Lau, A Numerical Library in Java for Scientists and Engineers, Chapman & Hall/CRC, 2003

E. Anderson, Z. Bai, C. Birschof, S. Blackford, J. Demmel, J. Dongarra, J. Du Croz, A. Greenbaum, S. Hammarling, A. Mckenney, D. Sorensen, LAPACK Users' Guide, SIAM, Third Edition, 1999

Timothy A. Davis, “Direct Methods for Sparse Linear Systems”, SIAM publishing, 2006

Kazushige Goto, Robert A. Van De Geijn, Anatomy of High Performance Matrix Multiplication, ACM Transactions on Mathematical Software, Vol[. 34, No 3, Article 12, May 2008

Field G.Van Zee, Tyler M. Smith, Bryan Marker, Tze Meng Low, Robert A. Van de Geijn, Francisco D. Igual, Michail Smelyankiy, Xianyi Zhang, Michael Kistler, Vernon Austel, John A. Gunnels, Lee Killough, The BLIS framework: Experiments in portability, ACM Transactions on Mathematical Software, 42 (2), 12, 2016

Venkat Subramaniam, Programming Kotlin: Create Elegant, Expressive, and Performant Jvm and Android Applications. O′Reilly (20 September 2019).

Dierk Konig, Andrew Glover, Paul King, Guillaume Laforge, Jon Skeet, Groovy In Action, Manning Publications, 2007

Mala Gupta, Java 11 and 12 New Features: Learn about Project Amber and the latest developments in the Java language and platform. Packt Publishing Limited (26 March 2019).

Edward Laviei, Mastering Java 11 Second Edition. 2nd Ed. 2018. https://www.packtpub.com/product/mastering java 11 second edition/9781789137613

Nick Samoylov, Learn Java 12 Programming, Packt 2019. https://www.packtpub.com/product /learn java 12 programming/9781789957051

Kishori Sharan, Java 9 Revealed, Apress 2017. https://link.springer.com/book/10.1007/978 1

2592 9

Richard Warburton, Java 8 Lambdas: Functional Programming for The Masses. Shroff/O'Reilly; First edition (1 January 2014).

Xiao Feng Li, Advanced Design and Implementation of Virtual Machines, CRC Press, 201

Aleksei Sedunov, Kotlin In depth [Vol II]: A comprehensive guide to modern multi paradigm language (English Edition). BPB Publications; 1st edition (7 March 2020).




DOI: https://doi.org/10.37628/ijocspl.v7i2.748

Refbacks

  • There are currently no refbacks.