Anagram-Agnostic Data Types (AADTs)
- AADTs are data types where any two legal sequential anagrams yield equivalent states, ensuring uniform legal continuations.
- They collapse multiple linearizations into a single semantic class, reducing complexity in monitoring concurrent histories.
- AADTs support fixed-parameter tractable algorithms and extend to permutation-invariant type systems for efficient state representation.
Searching arXiv for the cited papers and closely related work to ground the article. Anagram-agnostic data types (AADTs) are data types whose legal sequential executions are insensitive, in a precise behavioral sense, to permutation of the same multiset of operations. In the formal framework introduced for linearizability monitoring, a data type is an AADT when any two legal sequential histories that are anagrams are state-equivalent, meaning that they admit exactly the same legal continuations (Han et al., 6 Sep 2025). This notion is consequential because it collapses many distinct linearizations of a concurrent history into a single semantic class. Related work does not usually define AADTs directly, but it supplies adjacent foundations: row-typed extensible sums and products give an order-insensitive, label-indexed structural analogue of datatype presentation (Hubers et al., 2023), while explicit isomorphisms and reusable synthesis templates illustrate broader forms of representation-agnostic and presentation-agnostic computation (0808.2953, Inala et al., 2015).
1. Definition and semantic criterion
In the monitoring framework of "Fixed Parameter Tractable Linearizability Monitoring for Stack, Queue and Anagram Agnostic Data Types" (Han et al., 6 Sep 2025), a concurrent history is a finite set of operations, with each operation modeled as
where is a unique identifier, is the method, is the argument/return value component, , and . A history is sequential if intervals do not overlap. A linearization is an injective mapping
such that for each operation ,
The induced abstract sequential history is
0
ordered by increasing 1.
The defining equivalence relation for AADTs is semantic rather than syntactic. For legal sequential executions 2,
3
Thus, two executions are equivalent exactly when they admit the same legal futures. The formal definition is: 4
A recurrent misconception is that an AADT must accept every permutation of a multiset of operations. The formal definition is weaker and more specific. It does not say that every permutation is legal; it says that among the permutations that are legal, all are semantically equivalent. This distinction is central. AADT semantics is therefore permutation-insensitive only after legality has been established.
2. Linearizability, partition states, and semantic collapse
The decision problem studied for AADTs is standard linearizability monitoring: given a concurrent history 5 and a prefix-closed sequential specification 6, determine whether there exists a linearization 7 such that 8 (Han et al., 6 Sep 2025). The paper organizes the search space using partition states. A subset 9 is a partition state if there exists a time 0 such that completed-before-1 operations are included and not-yet-invoked operations are excluded: 2
3
Let 4 denote the set of partition states of 5.
The associated frontier graph is the DAG
6
with edges
7
Each path from 8 to 9 corresponds to a candidate linearization order. The paper proves the bound
0
where 1 and
2
is the maximum concurrency.
For a general ADT, the certificate of a partition state 3, written 4, is the set of all legal linearizations of 5, with recurrence
6
In general this set can be exponentially large because different legal linearizations of the same subset may induce different future behaviors. The AADT condition removes precisely that source of blow-up. The paper’s corollary states that for a history 7 of an AADT 8, for all 9, 0, one has 1. Consequently, one representative legal linearization, or equivalently one current simulated object state, suffices per reachable partition state.
3. Examples, non-examples, and common misunderstandings
The paper explicitly identifies the following as AADTs or representative AADTs: Counter, (Multi)Set, (Double-ended) Priority Queue, Read-modify-write register, and Size-aware stack (Han et al., 6 Sep 2025). The motivating intuition is that these objects are governed by extensional state properties such as current contents, multiplicities, priorities, or arithmetic effects, rather than by insertion order.
A canonical example is the set. The paper gives
2
because both executions leave the set in the same state 3, and therefore have the same valid continuations. Priority queues are treated similarly when implemented as multisets with unique priority: legal permutations of overlapping enqueues that precede a dequeue leave the same final content with the same priority ordering.
By contrast, stacks and queues are not AADTs, because insertion order changes future behavior. For a queue,
4
are anagrams, but they are not equivalent under 5; the first admits
6
while the second admits
7
Likewise,
8
because the top element differs.
| Class | Status | Reason in the formal sense |
|---|---|---|
| Set / Multiset | AADT | Legal anagrams yield equivalent states |
| Priority queue | AADT | Contents and priorities, not enqueue order, determine futures |
| Queue | Not AADT | Different legal anagrams admit different dequeue suffixes |
| Stack | Not AADT | Different legal anagrams admit different pop/peek suffixes |
A second misconception is that AADTs are merely “unordered containers.” The listed examples show that the class is broader: read-modify-write registers and size-aware stacks are included in the paper’s discussion. This suggests that the decisive property is not container shape but the equivalence of legal anagrams under the continuation-based state relation.
4. Structural and type-theoretic interpretations
Although "Generic Programming with Extensible Data Types; Or, Making Ad Hoc Extensible Data Types Less Ad Hoc" is not a paper about AADTs per se, it provides a typed foundation for extensible, label-indexed sums and products whose simple row theory is permutation-invariant (Hubers et al., 2023). In that setting, datatype structure is represented by rows, finite associations of labels to types, such as
9
From rows the system forms records 0 and variants 1. In the simple row theory 2, rows are commutative and labels are unique, so what matters is which labeled constructors or fields are present, not the textual order in which they were listed.
This yields a structural analogue of “anagram-agnostic” datatype presentation. For example, under 3,
4
The paper identifies this as explicit permutation invariance. A variant such as
5
is therefore a structurally labeled sum rather than a closed nominal declaration. This aligns with an AADT intuition in which constructor identity is label-based rather than position-based.
The paper’s more distinctive contribution is generic programming over rows themselves. Its operators 6, 7, and 8 quantify over every label/type pair in an arbitrary row. In particular, 9 analyzes a whole variant 0 if one can handle any entry 1 in the row, and 2 synthesizes a whole record 3 from a uniform row-indexed producer. The resulting record/variant duality is made explicit by
4
via reify and reflect. This provides a modular eliminator story over order-insensitive labeled constructor families.
The match with AADTs is nevertheless partial. The row-typed account handles extensible products and sums, but not a dedicated framework of recursive datatype fixpoints, induction principles, or pattern matching modulo permutation of nested constructor arguments. It also does not provide a full datatype-level equivalence theory beyond rows, nor a mechanism for globally relating or canonically renaming labels. A plausible implication is that row calculi furnish a strong substrate for the “order-insensitive labeled structure” aspect of AADTs, without yet constituting a full AADT theory.
5. Algorithmic consequences for linearizability monitoring
For AADTs, the semantic collapse of legal linearizations leads directly to a fixed-parameter tractable monitoring algorithm parameterized by maximum concurrency 5 (Han et al., 6 Sep 2025). The paper gives the explicit DFS:
9
Here 6 is the current partition state and 7 is a representative legal linearization of 8, or equivalently a representation of the current object state. Because all legal linearizations of the same partition state are equivalent for an AADT, the algorithm does not need to preserve multiple incomparable prefixes at the same node.
The main theorem states that given a history 9 with 0 operations of an AADT 1, where the membership of 2 can be solved in 3 time, monitoring linearizability can be solved in
4
time. The paper also gives the same asymptotic bound when initialization of the object and each operation both updates and backtracks in 5 time. This is the central fixed-parameter tractability result.
The paper further notes concrete instantiations. If specification membership is linear, then monitoring is
6
For priority queues implemented by balanced BSTs with 7 updates/backtracking, the bound becomes
8
For hash-based sets and multisets, the paper gives
9
These bounds are substantially simpler than the queue and stack cases treated in the same work: 0 for queues, and
1
with a subcubic improvement
2
for stacks. The difference is exactly that AADTs eliminate the need to remember multiple semantically distinct legal prefixes per partition state.
6. Representation-agnostic encodings and synthesis over datatype presentations
A second line of adjacent work concerns representation-agnostic computation rather than AADT semantics strictly defined. "Declarative Combinatorics: Isomorphisms, Hylomorphisms and Hereditarily Finite Data Types in Haskell" studies explicit isomorphisms
3
with
4
implemented as Iso (a->b) (b->a) (0808.2953). Its framework is organized around a common root representation type Root = [Nat], together with with, as, borrow, and lend combinators for any-to-any conversion and transport of operations. For AADT-adjacent purposes, the most relevant examples are sets and multisets, where canonical forms are sorted strictly increasing or sorted nondecreasing sequences. This is closely related to order-insensitive content, but the paper’s framework remains fundamentally about bijections, not quotienting arbitrary syntax by permutation.
"Synthesis of Recursive ADT Transformations from Reusable Templates" addresses a different neighboring problem: how to synthesize recursive transformations while reducing dependence on concrete constructor-by-constructor templates (Inala et al., 2015). Its polymorphic synthesis constructs include polymorphic generators, flexible pattern matching switch(x){ case?: e }, field lists e.fields?, and unknown constructors new cons?(...). These constructs make templates more reusable across recursive ADTs and support a two-stage process
5
where type-directed expansion removes PSCs before ordinary constraint-based synthesis. The paper reports that 23 benchmarks are handled using only 4 generic templates from a library.
These two works illuminate different sides of the AADT landscape. Tarau’s isomorphism-based framework suggests how canonical forms and transport of operations can support representation-independent computation after normalization. SyntRec suggests how generic transformations can be made less brittle with respect to constructor and field organization. Neither paper defines AADTs in the continuation-equivalence sense of linearizability monitoring, but both are technically relevant to the broader goal of reducing semantic dependence on surface presentation.
7. Limitations, scope, and open directions
The formal AADT notion in the monitoring literature is deliberately strong. It depends on a prefix-closed sequential specification 6, on equivalence defined by legal continuations, and on bounded maximum concurrency 7 for tractable monitoring (Han et al., 6 Sep 2025). The paper is explicit that ordinary stacks, queues, and plain read/write registers do not satisfy the AADT property. It also assumes efficient membership in 8, or efficient incremental update and backtracking, for the stated runtime bounds.
The row-typed line of work exposes a different boundary. In the simple row theory, labeled sums and products are permutation-invariant, but the theory does not supply a first-class account of recursive datatype fixpoints, induction principles, or datatype-level equivalence beyond rows (Hubers et al., 2023). It also notes limitations in relating row components, especially renaming while preserving uniqueness constraints. Likewise, folds over unordered labeled structure require algebraic laws: in a commutative row theory, the combining operator should be commutative.
The encoding and synthesis papers identify further gaps. The isomorphism framework is exact and reversible, whereas quotient-style AADTs may require many-to-one normalization from raw syntax to canonical form (0808.2953). The synthesis framework reduces dependence on presentation details but still expands against the concrete constructor inventory of a declared ADT, and its correctness guarantees are bounded rather than universal (Inala et al., 2015).
Taken together, these limitations suggest a coherent research agenda. A full AADT theory would likely need a semantic equivalence account of legal anagrams, a structural calculus for permutation-invariant labeled sums and products, a normalization discipline for presentation variants, and recursive principles for inductive or coinductive AADT families. This suggests that current work has established strong components of the subject—especially the continuation-based definition and fixed-parameter monitoring algorithm—but not yet a single unified theory spanning semantics, type structure, normalization, and synthesis.