# asak
Partitioning OCaml codes.
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).Asak.Factorization that will take a list of OCaml codes and detect codes that can be factorized.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.
The documentation of the API is available here: [https://nobrakal.github.io/asak/asak/].
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.
Asak is developed by Alexandre Moine.