Skip to content

v0.16.0

Choose a tag to compare

@github-actions github-actions released this 12 Apr 13:16
· 28 commits to main since this release
9183eeb

Installation

Hex Archive (Global Mix Tasks)

Install directly from Hex:

mix archive.install hex metastatic

Or download and install the archive:

wget https://github.com/Oeditus/metastatic/releases/download/v0.16.0/metastatic-0.16.0.ez
mix archive.install metastatic-0.16.0.ez

Mix Dependency (Recommended)

Add to your mix.exs:

def deps do
  [
    {:metastatic, "~> 0.16.0"}
  ]
end

Then run:

mix deps.get

Usage

As a Library

alias Metastatic.{AST, Document, Adapter}
alias Metastatic.Adapters.{Elixir, Python}

# Parse Elixir code
{:ok, doc} = Adapter.abstract(Elixir, "x + 5", :elixir)

# Parse Python code
{:ok, doc} = Adapter.abstract(Python, "x + 5", :python)

# Both produce equivalent MetaAST!

CLI Tools

With hex archive or as dependency:

# Cross-language translation
mix metastatic.translate --from python --to elixir hello.py

# AST inspection
mix metastatic.inspect hello.py

# Analyze MetaAST metrics
mix metastatic.analyze hello.py

# Check semantic equivalence
mix metastatic.validate_equivalence hello.py hello.ex

# Purity analysis
mix metastatic.purity_check my_file.py

# Complexity metrics
mix metastatic.complexity my_file.ex

What's Changed

See CHANGELOG.md for detailed changes.

Verification

Verify the downloaded files using SHA256 checksums:

sha256sum -c metastatic-archive.sha256

Documentation

Supported Languages

  • Elixir (all 3 layers: Core, Extended, Native)
  • Erlang (all 3 layers: Core, Extended, Native)
  • Python (all 3 layers: Core, Extended, Native)

More languages coming soon!

Full Changelog: v0.15.1...v0.16.0