Mutare.Transform.Result (mutare v0.4.1)

Copy Markdown View Source

Public result returned by Mutare.transform_string/2.

The transform still produces richer internal Mutare.Site records for the runner and reporters. This DTO is intentionally smaller and stable: callers get the rendered metamutant, the public mutant descriptions, the next available id, and the metamutant's dispatch variable, without depending on internal site fields.

dispatch_var is the variable the metamutant's generated code binds the active mutant id to and reads in its selectors and guards — :mutare_active, unless the source already uses that identifier, in which case a salted variant (:mutare_active_0, …) is chosen per file. A reader of the metamutant needs it: Mutare.Manifest.from_source/2 recognises the hoisted selectors and gated clauses by this name.

Summary

Types

t()

@type t() :: %Mutare.Transform.Result{
  dispatch_var: atom(),
  metamutant: String.t(),
  mutants: [Mutare.MutationSite.t()],
  next_id: pos_integer()
}