Skip to main content

Module types

Module types 

Source
Expand description

Core types for the merge engine.

Based on the structured merge literature (LASTMERGE 2025, AutoMerge/OOPSLA 2018), we model code as concrete syntax trees with three node kinds:

  • Leaf: terminal nodes (identifiers, literals, operators)
  • Constructed: non-terminal with fixed-arity named children
  • List: non-terminal with variable-length children (ordered or unordered)

Structs§

MatchPair
A matched pair of nodes across two revisions.
MergeScenario
The three-way merge scenario: base, left, and right revisions.
ResolutionCandidate
A candidate resolution produced by the resolver pipeline.

Enums§

Confidence
Confidence level for an auto-resolution. Ordered Low < Medium < High so that derived Ord works correctly.
CstNode
A concrete syntax tree node, following the three-kind taxonomy from Zhu & He (OOPSLA 2018) and LASTMERGE (2025).
Diff3Hunk
A text-level hunk from diff3.
Language
Supported programming languages for tree-sitter parsing.
ListOrdering
Ordering semantics for list nodes, per LASTMERGE/JDime. Unordered lists (e.g., import blocks, class members) can be freely permuted without changing program semantics, enabling better conflict resolution.
MergeResult
The result of a merge operation on a region.
ResolutionStrategy
Which strategy produced a resolution.

Type Aliases§

NodeId
Unique identifier for a tree node within a merge context.