package asak
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=dc0865360eae205ec059b61d6f38785815029f3c194ecffdedf88bd6bd3bc687
sha512=9825500b6064f32f65fea7bc8dbabbed3ecc6e05dd79cbd23634efa61607b787fb0cd44fa549f9181064779eed98b9cb37675007253cbaf025c8e02c9e08f3b5
Description
Asak provides functions to parse, type-check and identify similar OCaml codes. These functions are then used to partition codes implementing the same function and help to factorize existing code.
Published: 05 Jul 2019
README
README.md
# asak
Partitioning OCaml codes.
Why ?
For teaching: the module
Asak.Partition
offers a functioncreate
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 functionhash_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 functioncluster
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.
License and copyright
Asak is released under the MIT license. The copyright is held by IRIF / OCaml Software Foundation.
Authors
Asak is developed by Alexandre Moine.
Dev Dependencies (1)
-
odoc
with-doc & >= "1.2.0"
Used by (2)
-
learn-ocaml
>= "0.12" & < "1.0.0"
-
learn-ocaml-client
< "1.0.0"
Conflicts
None