package asak

  1. Overview
  2. Docs
type 'a partition = {
  1. bad_type : 'a list;
    (*

    Keys identifying codes that either don't implement the searched function, or implement it with a bad type.

    *)
  2. clusters : ('a * string) list Wtree.wtree list;
    (*

    Main result. Each class is composed of a tree representing a hierarchical clustering of "similar codes". Each leaf is a list of keys identifying "totally similar" codes, plus the considered code.

    *)
}

Type used to represent a partition.

val create : int -> string -> string -> ('a * string) list -> 'a partition

Partitioning OCaml codes. Usage: create threshold name sol list.

  • parameter threshold

    Weight threshold required to keep a sub-AST. It is a percentage (a number between 0 and 100) of the weight of the whole AST.

    • A value of 0 means "keep all sub-ASTs"
    • A value of 100 means "don't keep any sub-AST"
  • parameter name

    The name of the searched function.

  • parameter sol

    A reference implementation, used only for typing.

  • parameter list

    List of valid OCaml codes, using only installed modules, that may contains the searched function.

  • returns

    The partition.

OCaml

Innovation. Community. Security.