Next: , Previous: , Up: Software Evolution Library Index   [Contents][Index]


A.14 SOFTWARE-EVOLUTION-LIBRARY/COMPONENTS/SEARCHABLE

Class: searchable [sel/cp/searchable]

Class precedence list: searchable, standard-object, slot-object, t

docfixme

Function: diff-scalar [sel/cp/searchable] original-seq modified-seq

Return an integer representing the diff size of two sequences Sum o + |O - M| over each diff region. o is the length of the original diff region and m is the length of the modified diff region.

Generic Function: find-snippets [sel/cp/searchable] database &key ast-class full-stmt decls limit

Find snippets in the fodder database database.

Method: find-snippets [sel/cp/searchable] (obj pliny-database) &key ast-class full-stmt decls (limit (- (expt 2 32) 1))

docfixme

Method: find-snippets [sel/cp/searchable] (db in-memory-database) &key ast-class full-stmt decls limit

Find limit snippets stored in db, an in-memory database. If limit is nil or >= the number of snippets of the desired kind, return a list of all of them. Otherwise, return a random subset of limit objects of the desired kind.

If ast-class is not nil, it is the name of an ast-class; consider only ASTs of that class.

Otherwise, if full-stmt is true, consider only full statements.

If decls is :only, consider only ASTs for which the :is-decl property is true.

Otherwise, consider all ASTs.

Generic Function: similar-snippets [sel/cp/searchable] searchable target &key predicate metric key limit ast-class limit-considered filter

Return snippets from searchable similar to target

Method: similar-snippets [sel/cp/searchable] (db searchable) target &key key ast-class limit (predicate (function <)) (metric (function diff-scalar)) (filter (function null)) (limit-considered infinity)

docfixme

Method: similar-snippets [sel/cp/searchable] (obj pliny-database) target &key predicate metric key ast-class limit-considered (limit (- (expt 2 32) 1)) (filter (function null))

docfixme

Generic Function: weighted-pick [sel/cp/searchable] searchable target weight &key predicate metric key limit ast-class filter limit-considered

Perform a random pick weighted by weight from ‘similar-snippets’. All other arguments are passed through to sorted snippets.

Method: weighted-pick [sel/cp/searchable] (obj searchable) target weight &key key limit ast-class (predicate (function <)) (metric (function diff-scalar)) (filter (function null)) (limit-considered infinity)

docfixme


Next: , Previous: , Up: Software Evolution Library Index   [Contents][Index]