Skip to content

[TM-201] Optimizer

Konstantin Ivanov requested to merge sebbes/optimize into master

Description

First version of Michelson optimizer. It was developed during ZuriHac with @sebbes. It has some limitations and issues (see comments), but it successfully optimizes some cases (see tests) and doesn't break anything. We'll resolve those issues later.

This MR includes: Michelson.Optimizer module with optimizer logic, CLI in app and a simple unit test. We had to change the type of COMPARE, see corresponding commit message for clarification.

Related issue(s)

https://issues.serokell.io/issue/TM-201

Checklist for your Merge Request

Related changes (conditional)

  • Tests (see short guidelines)

    • If I added new functionality, I added tests covering it.
    • If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
  • Documentation

    • I checked whether I should update the docs and did so if necessary:

Stylistic guide (mandatory)

Edited by Ivan Gromakovskii

Merge request reports