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

Deduplication of Objects #9

Open yegor256 opened 1 year ago

yegor256 commented 1 year ago

Consider this EO program:

[] > app
  seq > @
    stdout
      "Jeff"
    stdout
      sprintf
        "Hello, %s"
        "Jeff"

It may be transformed to this semantically equivalent one:

[] > app
  "Jeff" > x
  seq > @
    stdout x
    stdout
      sprintf
        "Hello, %s"
        x

The duplicated object "Jeff" was converted into a single object x.

Let's create a command line tool, which will take a directory with XMIR files and create a new directory with similar files, but without object duplication.

Full paper is here: https://www.overleaf.com/read/vqydvswxgrbx

cahekska commented 1 year ago

I will do this

yegor256 commented 1 year ago

@cahekska here is the repo: https://github.com/objectionary/dedup