package asak

  1. Overview
  2. Docs

# asak

Build Status

Partitioning OCaml codes.

Why ?

  • For teaching: the module Asak.Partition offers a function create that produces a partition of codes implementing the same function, where two codes are in the same class if they are syntactically "close", and in the same sub-class if they are identical (up to alpha-renaming and some inlining).
  • For redundancy detection: while not being totally implemented, the goal is to produce a module Asak.Factorization that will take a list of OCaml codes and detect codes that can be factorized.

How ?

There is two cores:

  • Asak.Lambda_utils, that defines a function hash_lambda that is hashing a lambda expression (an intermediate language in the OCaml compilation pipeline), capturing only the shape of the AST, ignoring for example variable names, function names, pattern-matching order…
  • Asak.Clustering, that defines a function cluster which is making a complete-linkage clustering of a list of hashes.

For more details, see this blog post.

Documentation

The documentation of the API is available here: [https://nobrakal.github.io/asak/asak/].

The name

This tool is about making partitions. "Partition" is the word in french for "sheet music". Consequently, its name is about music: asak is the name of Tuareg's traditional songs accompanied by a monochord violin.

Asak is released under the MIT license. The copyright is held by IRIF / OCaml Software Foundation.

Authors

Asak is developed by Alexandre Moine.

OCaml

Innovation. Community. Security.