Skip to main content

Module task_class

Module task_class 

Source
Expand description

Task-class abstraction for semantic-equivalent task grouping.

A TaskClass represents a category of semantically equivalent tasks that can reuse the same learned Gene even when the exact signal strings differ.

§Example classes

IDNameSignal keywords
missing-importMissing import / undefined symbolE0425, E0433, unresolved, undefined, import, use
type-mismatchType mismatchE0308, mismatched, expected, found, type
borrow-conflictBorrow checker conflictE0502, E0505, borrow, lifetime, moved

§How matching works

  1. Each signal string is tokenised into lowercase words.
  2. A signal matches a TaskClass if the intersection of its word-set with the class’s signal_keywords is non-empty.
  3. The TaskClassMatcher::classify method returns the class whose keywords produce the highest overlap score with the combined signal list.

Cross-class false positives are prevented because each class uses disjoint keyword sets; overlap scoring breaks ties by choosing the highest count, so a signal that partially matches two classes still maps to the one with more matching keywords.

Structs§

TaskClass
A named category of semantically equivalent tasks.
TaskClassMatcher
Classifies a list of signal strings to the best-matching TaskClass.

Functions§

builtin_task_classes
Return the canonical built-in set of task classes.
signals_match_class
Check whether signals match the given task-class ID in registry.