objectionary / ideas

Here we keep ideas for future research in EO programming language and Polystat static analyzer
https://www.eolang.org
7 stars 0 forks source link

Compile time function executor (CTFE) #12

Open yegor256 opened 2 years ago

yegor256 commented 2 years ago

Consider this EO program:

[] > app
  QQ.io.stdout
    QQ.txt.sprintf
      "2x2 = %2"
      2.times 2

This program can be optimized in compile time:

[] > app
  QQ.io.stdout
    QQ.txt.sprintf
      "2x2 = %2"
      4

Let's create a command line tool, which would perform such Compile-time function execution. It will take a directory with XMIR files and produce a new directory with similar files, where some objects are executed and replaced with small objects. Would be great to use Java and XSL.

Lazydemon341 commented 1 year ago

My team will work on this issue as a part of HSE course

yegor256 commented 1 year ago

@Lazydemon341 sounds good, go ahead. Please, get in touch with me in Telegram to discuss details.