Compilation of mathematical expressions in Kotlin

02/16/2021
by   Iaroslav Postovalov, et al.
0

Interpreting mathematical expressions at runtime is a standard task in scientific software engineering. There are different approaches to this problem from creating an embedded domain-specific language (eDSL) with its own parser and interpreter specifically for that task, to using a full-fledged embedded compiler. This article is dedicated to a middle-ground solution implemented in the KMath library, which uses the Kotlin object builder DSL and its own algebraic abstractions to generate an AST for mathematical operations. This AST is then compiled just-in-time to generate JVM bytecode. A similar approach is tested on other Kotlin platforms, where its performance is compared across a variety of supported platforms.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
08/03/2018

A Compiler-Compiler for DSL Embedding

In this paper, we present a framework to generate compilers for embedded...
research
05/18/2017

Introducing Geometric Algebra to Geometric Computing Software Developers: A Computational Thinking Approach

Designing software systems for Geometric Computing applications can be a...
research
02/15/2023

Tree-Based Representation and Generation of Natural and Mathematical Language

Mathematical language in scientific communications and educational scena...
research
03/01/1999

An Algebraic Programming Style for Numerical Software and its Optimization

The abstract mathematical theory of partial differential equations (PDEs...
research
02/01/2022

Thematic Domain Analysis for Ocean Modeling

Ocean science is a discipline that employs ocean models as an essential ...
research
03/20/2021

The Concept of an Autonomic Avionics Platform and the Resulting Software Engineering Challenges

The self-* properties commonly associated with the concept of autonomic ...
research
03/20/2020

Mathematical Formulae in Wikimedia Projects 2020

This poster summarizes our contributions to Wikimedia's processing pipel...

Please sign up or login with your details

Forgot password? Click here to reset