Skip to content

Grammar Guided Structure Recovery

Recover the nested structure carried by a flat sequence by binding the input to a grammar, preserving spans, retaining competing parses when needed, and validating the selected hierarchy.

Overview

Grammar-Guided Structure Recovery turns a flat or serialized sequence into a nested, relational representation that downstream reasoning can inspect. The sequence may be source code, a sentence, a policy expression, a message stream, a mathematical formula, a document, or another ordered representation. What makes the pattern distinctive is not merely that it “analyzes text.” It must recover hidden hierarchy through declared rules while preserving the evidence that supports every node.

A reliable implementation keeps four commitments together:

  1. Source fidelity. Every accepted constituent remains grounded in stable source positions, and unknown or malformed material does not disappear.
  2. Grammar licensing. Every node and attachment is justified by a versioned production, schema rule, declared exception, or bounded repair.
  3. Ambiguity honesty. More than one licensed structure remains more than one structure until evidence or policy justifies a choice.
  4. Safe validation. Structural well-formedness is checked separately from semantic consistency, truth, intent, permission, and authorization.

This combination distinguishes the archetype from a tokenizer, parser algorithm, grammar file, syntax tree, deserializer, or linter. Those are mechanisms or artifacts. The archetype is the transferable intervention logic that governs how sequence evidence becomes structure.

Structural problem

Many useful representations are flattened for communication, storage, or observation. A linear string can encode operator scope; a byte stream can encode nested records; prose can encode clauses, modifiers, and exceptions; a log can encode events with embedded payloads. The surface sequence alone does not display all parent–child relations. Delimiters, precedence, context, schemas, and conventions carry the missing organization.

Three common shortcuts fail:

  • Splitting without hierarchy preserves local pieces but loses scope and attachment.
  • Forcing one interpretation hides genuine ambiguity behind search order, model score, or undocumented precedence.
  • Repairing silently produces a plausible structure by deleting, inserting, or reinterpreting material without preserving the difference between source and reconstruction.

The cost can be much larger than an inaccurate tree. An attachment error can change program behavior, policy authority, contractual scope, scientific meaning, or protocol boundaries. A permissive parser can also become an authority-confusion surface when attacker-controlled data is interpreted as executable control.

Intervention sequence

1. Preserve the observed sequence

Capture the source, encoding, source identity, and stable positional coordinates. Normalization may be useful, but it needs a reversible map back to the original. Unknown bytes, tokens, delimiters, or spans remain visible. The parser should be able to answer, “Which source material supports this node?” and “What source material was not incorporated?”

2. Establish atomic units

When token boundaries are not already given, scan or tokenize explicitly. Tokenization is a separate decision because different lexical boundaries can produce different higher-level structures. Preserve unmatched material and overlapping candidates when the lexical grammar permits them.

3. Bind the grammar and interpretation mode

Record the exact grammar or schema version, precedence and associativity rules, dialect, feature flags, and contextual mode. A result produced under one version must not be relabeled as though a later grammar produced it. Rule changes require regression testing and, where needed, explicit re-parsing.

4. Generate span-linked candidates

Apply grammar rules to construct constituents and attachments. Each node maps to a source span or declared discontinuous span. Equivalent partial derivations can be packed so the system need not repeat work. When several complete structures remain licensed, preserve a candidate forest.

5. Disambiguate through declared evidence

Use authoritative precedence, associativity, type compatibility, locality, context, semantic constraints, or calibrated probabilities. Keep these policies explicit. A probabilistic ranker may order candidates, but it should rank only structures already licensed by the grammar; a high score does not authorize an unlicensed structure.

6. Validate in layers

Run at least three distinguishable checks:

  • Structural validation: Does the hierarchy obey the grammar, nesting, cardinality, and span rules?
  • Domain validation: Are types, references, combinations, and contextual constraints coherent?
  • Authority validation: May this structure actually trigger the requested action?

The third layer is essential at security and safety boundaries. A parse is a structural hypothesis, not proof of truth, intent, legitimacy, or permission.

7. Reconstruct and compare

Serialize, render, or otherwise project the hierarchy back to a surface form. Compare it with the original under a declared equivalence relation. Exact byte equality is not always required, but every normalization, insertion, deletion, or repair must be explainable.

8. Commit, preserve alternatives, or fail

Return one hierarchy only when the selection policy is met. Otherwise return a forest, an uncertainty-bearing partial structure, an escalation request, or an explicit failure. Resource exhaustion, excessive depth, and unresolved consequential ambiguity are legitimate outcomes; they should not be converted into invented certainty.

9. Record provenance and monitor drift

Retain grammar version, rules used, candidate pruning, scores, validation outcomes, repairs, and overrides. Use conformance tests, differential testing, adversarial corpora, and dialect-diverse examples whenever the grammar or implementation changes.

Key components

ComponentDescription
Surface Sequence Record This record is the evidence base for the reconstruction. It holds the exact or privacy-safe canonical input, encoding, source, and stable positions. Without it, a parse cannot be audited or round-tripped. In sensitive contexts, retain a redacted or hashed mapping while limiting raw-content access.
Token and Span Map The map connects every atomic token and recovered constituent to the sequence. It supports nesting, source highlighting, localized re-parsing, error diagnostics, and contestability. A span map also prevents a parser from “explaining” only the convenient parts of an input while dropping the rest.
Composition Rule Grammar and Versioned Rule Record The grammar defines licensed constructions; the version record makes those rules reproducible. Together they prevent implementation accidents from becoming silent semantics. Precedence, associativity, schema cardinality, dialect flags, and declared exceptions belong here or in explicitly linked records.
Candidate Structure Forest A forest preserves competing trees compactly. This matters whenever the sequence does not contain enough evidence for a unique structure. The forest is not merely a debugging artifact: in legal, scientific, linguistic, and policy settings, the difference among candidates may be the most important output.
Structural Attachment Rule Attachment determines where a modifier, clause, field, operator, or constituent belongs. Rules may use precedence, locality, type compatibility, context, or probabilities. Consequential attachment should never be decided by incidental iteration order.
Uncertainty Annotation and Residual Ambiguity Log Uncertainty should attach to the specific span, label, or edge that is uncertain. A residual ambiguity log records what remains unresolved and why. It enables downstream systems to abstain, ask for more evidence, or preserve alternatives instead of treating a global confidence number as certainty.
Validation Rule Validation distinguishes grammar failure from type failure, policy prohibition, missing evidence, and authorization failure. Keeping these categories separate improves diagnostics and prevents “the parser accepted it” from becoming a claim that the input is safe or true.
Round-Trip Reconstruction Check The round-trip check exposes omissions, inventions, incompatible versions, and unstable normalization. The equivalence relation must be explicit: exact bytes, normalized whitespace, canonical ordering, or a repair-aware rendering are different contracts.
Error-Recovery Boundary This component says what may be inserted, skipped, synchronized, or inferred after malformed input. Recovery is useful in editors and ingestion workflows, but dangerous when the output controls authority. Every repair remains labeled, and the boundary can prohibit repair entirely for specific regions or actions.
Complexity Budget and Termination Condition Parsing can be computationally hostile. Depth, branch count, chart size, time, memory, token count, and grammar expansion need explicit limits. When limits are reached, the system returns a resource-bound outcome, partial forest, or failure rather than continuing unpredictably.
Provenance and Audit Trace Provenance connects results to source, grammar, evidence, and overrides. The trace records candidate generation and pruning at an appropriate level of detail. These records support replay, regression analysis, parser-differential investigation, and accountable human review.

Common mechanisms

Lexical scanning and tokenization identifies atomic units while retaining offsets and unknown material.

Recursive-descent parsing provides an understandable top-down implementation for suitable grammars. Left recursion, unrestricted backtracking, and error recovery require explicit controls.

Shift–reduce parsing constructs structure bottom-up and is efficient for many deterministic languages. Conflicts should be surfaced as grammar or policy decisions rather than hidden in generator defaults.

Chart parsing memoizes partial constituents across spans and efficiently packs many ambiguous derivations. It is useful when a forest is an intended output, though forest size still needs a budget.

Probabilistic grammar parsing ranks licensed candidates using learned or elicited probabilities. It can improve selection but introduces calibration, distribution-shift, and dialect-bias risks.

Schema-driven hierarchical decoding applies the same intervention to messages, records, configuration, and serialized data. Unknown fields, length boundaries, and schema versions are first-class evidence.

Error-tolerant parsing uses bounded insertion, deletion, synchronization, or partial recovery. Its repairs must be visible and should not confer authority.

Round-trip parse–serialize testing checks that structure and surface remain compatible. It is especially valuable after grammar migrations and across independent implementations.

Existing catalog mechanisms such as a Grammar Rule Set, Ambiguity Register, Controlled Disambiguation Test, Interpretation Walkthrough, Semantic Schema Validation, and Invalid Combination Linter can be reused. “Literal Content Parsing” remains a narrow mechanism for speech-act decomposition and should be cross-linked rather than treated as a duplicate archetype.

Parameter dimensions

Implementations vary along several dimensions:

  • Grammar expressiveness: regular, deterministic context-free, ambiguous context-free, feature-enriched, probabilistic, or schema-constrained.
  • Output commitment: one tree, ranked list, packed forest, partial structure, or abstention.
  • Processing mode: batch, incremental, streaming, or localized re-parse.
  • Disambiguation authority: specification rule, domain constraint, user choice, expert review, learned ranker, or later evidence.
  • Recovery tolerance: strict rejection, diagnostics-only, bounded repair, or permissive import.
  • Source fidelity: exact byte preservation, normalized token preservation, or privacy-safe provenance.
  • Validation depth: structural only, typed, semantic, referential, policy, or independent authorization validation.
  • Resource limits: input size, depth, branches, chart entries, time, and memory.
  • Explanation granularity: final derivation, rule trace, alternatives, pruning rationale, and repair trace.
  • Version policy: fixed grammar, negotiated dialect, backward compatibility, or migration with re-parsing.

These are not cosmetic settings. They change the failure modes and therefore belong in the archetype’s governance.

Invariants to preserve

  1. Every accepted structural node is grounded in source positions or an explicit repair.
  2. Every constituent and attachment is grammar-licensed or declared as an exception.
  3. The accepted hierarchy reproduces the source under the stated equivalence relation.
  4. No source material is silently lost, and no material is silently invented.
  5. Grammar version and interpretation mode remain reproducible.
  6. Unresolved consequential ambiguity remains visible.
  7. Structural validity remains separate from semantic truth and authorization.
  8. Resource limits lead to explicit, safe outcomes.
  9. Parser disagreement can be detected and investigated.
  10. Sensitive source material and traces receive proportionate privacy controls.

Target outcomes

A successful intervention makes hidden organization available without severing it from evidence. Downstream systems gain structured inputs, but they also gain the information needed to know when structure is uncertain, repaired, version-dependent, or unsafe to act on. Grammar changes become testable. Malformed inputs produce precise diagnostics. Independent implementations can be compared. Users and reviewers can contest an attachment decision by pointing to the source span, rule, and alternative.

Variants

Deterministic Grammar Parsing

This variant applies when the language is deliberately constrained and every transition or reduction should be uniquely determined. It prioritizes repeatability and latency. Unresolved conflicts are treated as grammar defects or explicit errors rather than runtime ambiguity.

Ambiguity-Preserving Parsing

This variant makes the forest a primary output contract. It is useful for natural language, legal provisions, requirements, and other domains where several structures may be licensed and later context can resolve them. Its main risks are forest explosion and downstream systems that collapse alternatives without notice.

Incremental or Streaming Parsing

This variant updates a provisional hierarchy as new sequence fragments arrive. It adds revision and retraction semantics: later input may change an earlier attachment. Downstream consumers must know which results are provisional and must handle invalidation.

Error-Tolerant Recovery Parsing

This variant returns a labeled partial or minimally repaired structure after bounded grammar violations. It supports interactive editing and messy-data ingestion, but it must not launder repairs into source facts. At control and authority boundaries, strict rejection or independent validation is usually safer.

Neighbor distinctions

Compositional Meaning Design

Compositional Meaning Design is forward-facing: it designs parts and combination rules so complex meanings can be built predictably. Grammar-Guided Structure Recovery is inverse-facing: it starts with an observed sequence and reconstructs the hierarchy licensed by those rules. The two are close siblings, but their evidence, failure modes, and output contracts differ.

Hierarchical Decomposition

Hierarchical Decomposition chooses a useful nested breakdown of a known whole. Parsing does not freely choose the hierarchy; it must justify it from sequence positions and grammar rules. A work breakdown structure is designed. A syntax tree is recovered.

Cascaded Hierarchical Recognition

Cascaded recognition narrows a classification problem through coarse and fine filters. Parsing builds a complete span-linked structure and may preserve multiple complete alternatives. A classifier can say what a sequence is; a parser says how its parts are structurally related.

Essential Structure Extraction

Essential Structure Extraction removes incidental detail to reveal a useful abstraction. Parsing normally preserves all relevant material and must account for every span. Simplification can follow parsing, but it should not substitute for it.

State Estimation

State Estimation infers a hidden condition from noisy signals. Parsing can use probabilities, but its candidates are constrained by grammar and grounded in constituent spans and yield. A hidden-state estimate need not reconstruct a hierarchy that reproduces the observation.

Locution–Illocution–Perlocution Decomposition

Speech-act decomposition separates literal content, communicative force, and effects. Its existing Literal Content Parsing mechanism can use this archetype, but the parent archetype is broader and applies to any grammar-governed sequence-to-structure task.

Failure modes and safeguards

Premature single parse

A parser may choose the first derivation, an undocumented conflict resolution, or the top model score. Preserve a forest until a declared rule passes and report consequential alternatives.

Silent loss or invention

Normalization, tokenization, or recovery may drop unknown content or add synthetic material. Preserve unmatched spans, label repairs, and run round-trip checks.

Parser differential

Two standards-compliant components may interpret the same sequence differently, enabling security or interoperability failures. Use conformance corpora, differential testing, canonical modes, and independent validation at trust boundaries.

Grammar drift

Rules evolve while stored results retain no version. Bind every result to its grammar, re-parse explicitly, and keep migrations auditable.

Ambiguity and recursion explosion

Ambiguous or hostile input can consume unbounded resources. Pack equivalent derivations, constrain the grammar, prune with provenance, and enforce depth, branch, time, and memory budgets.

Semantic and authority overreach

A valid parse can still be false, misleading, unintended, prohibited, or unauthorized. Keep structural, semantic, evidential, and authorization validation separate.

Dialect and language bias

A grammar or ranker can privilege dominant forms and turn legitimate variation into “error.” Test across relevant dialects and accessibility formats, support declared modes, measure differential rejection and misparse rates, and preserve contestability.

Privacy leakage

Raw sequences, offsets, and traces may expose sensitive content. Minimize retention, restrict access, use privacy-safe diagnostics, and preserve only the provenance needed for accountability.

Extended example

A policy platform receives the sentence:

permit transfer when verified and amount under limit or supervisor approves, except for frozen accounts

The platform cannot safely execute the sentence after simple tokenization. The scope of “or” and the attachment of the exception determine which transfers are authorized. It records the exact text and offsets, binds the run to the current policy grammar, and builds a packed forest. Type constraints eliminate an interpretation that applies a person-level approval predicate to an amount. Two structures remain: one makes the frozen-account exception override both authorization branches; the other makes it override only the supervisor branch.

Because the distinction changes authority, the parser does not choose by probability or implementation order. It escalates the two span-linked alternatives to the policy owner. The owner selects the intended scope, the canonical renderer adds parentheses, and a round-trip check confirms that the new representation preserves the approved structure. The decision, grammar revision, and historical interpretation remain versioned. If malformed or attacker-crafted content arrives, the system does not repair it into an executable policy; it quarantines the input until an independent validation gate accepts it.

Non-examples

  • Splitting a flat comma-separated list with no nested fields.
  • Designing the grammar of a new language.
  • Summarizing a document into themes.
  • Choosing an organizational hierarchy.
  • Serializing an already structured object.
  • Classifying a message without recovering internal relations.
  • Treating the highest-scoring language-model interpretation as the speaker’s verified intent.

Implementation checklist

  • Preserve the original sequence and reversible position map.
  • Version the grammar, dialect, precedence, and contextual mode.
  • Separate tokenization from higher-level structural recovery.
  • Map every node to source spans.
  • Preserve alternatives when evidence is insufficient.
  • Keep structural, semantic, and authorization validation distinct.
  • Label every insertion, deletion, skipped span, and repair.
  • Define exact or normalized round-trip equivalence.
  • Enforce depth, branch, time, memory, and input-size budgets.
  • Test parser differentials and adversarial inputs.
  • Evaluate dialect, language, and accessibility bias.
  • Record provenance, pruning, overrides, and residual ambiguity.
  • Treat parse output as a hypothesis, not as truth or permission.

Disposition rationale

The accepted prime parsing currently has zero direct, related, variant, and alias coverage in the coverage matrix. The exact phrase “Literal Content Parsing” appears only as a narrow mechanism under Locution–Illocution–Perlocution Decomposition. Accepted neighbors address forward meaning composition, chosen decomposition, coarse-to-fine recognition, simplification, hidden-state inference, shared sensemaking, or stable ordering. None owns the full conjunction of grammar-bound inverse reconstruction, span and yield preservation, forest representation, explicit attachment policy, layered validation, round-trip checking, bounded recovery, resource safety, and provenance.

The correct disposition is therefore draft_full_archetype, with Grammar-Guided Structure Recovery as the canonical candidate name and parsing retained as an exact alias and source prime.

Common Mechanisms

  • Ambiguity Register — The standing record of every ambiguity the parser could not resolve, each entry tagged with its competing readings and a route to whoever or whatever decides it.
  • Chart Parsing — Recovers every licensed parse at once by tabulating partial constituents in a chart and reusing shared sub-analyses, turning ambiguous input into polynomial-time work.
  • Controlled Disambiguation Test — Resolves a specific ambiguity by constructing a discriminating probe whose outcome forces one reading over its rivals, and scores the confidence of the verdict.
  • Error-Tolerant Parsing — Keeps parsing through malformed input by bounding the damaged region, resynchronizing at a safe point, and returning a partial structure plus an explicit list of what it could not recover.
  • Grammar Rule Set — The declarative set of production rules that defines well-formed composition — the reference grammar every parser consults to license or reject a structure.
  • Interpretation Walkthrough — A human-readable, step-by-step account of why the parser recovered this structure — each node traced back to the rule that licensed it and the input span it covers.
  • Invalid Combination Linter — A running tool that scans a recovered structure for forbidden co-occurrences — elements each legal alone but illegal together — and dispatches a handled violation when it finds one.
  • Lexical Scanning and Tokenization — Segments the raw character stream into typed, position-stamped tokens — the flat, span-tagged feedstock every parser consumes, with no hierarchy of its own.
  • Linting or Validation Rule — A single declarative constraint that marks a recovered structure well-formed or ill-formed — the atomic, named, individually-toggleable unit the whole validation layer is built from.
  • Probabilistic Grammar Parsing — Weights grammar rules with probabilities and returns a ranked forest of candidate parses with a most-likely tree and a calibrated confidence, treating disambiguation as inference rather than a fixed rule.
  • Recursive-Descent Parsing — Turns each grammar rule into a procedure and lets the call stack mirror the parse, recovering structure top-down by predicting which rule applies next.
  • Round-Trip Parse–Serialize Testing — Verifies a parser–serializer pair by parsing input, serializing the result back, and diffing against the original — using round-trip equality as an oracle for information loss and spec bugs.
  • Schema-Driven Hierarchical Decoding — Generates hierarchical structure with a model while a schema masks every ill-formed continuation at decode time, so the output is well-formed by construction rather than validated after the fact.
  • Semantic Schema Validation — Checks a recovered structure against a versioned semantic schema — not whether it parsed, but whether it means something admissible — and records a version-tagged conformance audit.
  • Shift-Reduce Parsing — Builds the parse tree bottom-up with a stack and a parse table — shifting tokens until a rule's right-hand side is complete, then reducing it, resolving attachment conflicts by declared precedence.

Compression statement

Preserve the source sequence and stable positions; bind the run to a versioned grammar and interpretation mode; generate grammar-licensed constituents and parent–child attachments; keep a forest rather than silently forcing a single tree when evidence is insufficient; use declared precedence, context, semantic constraints, or calibrated probabilities to select among candidates; validate yield, nesting, types, and domain invariants; label every repair and residual ambiguity; enforce resource and authority boundaries; and retain provenance sufficient to reproduce or contest the result.

Canonical formula: Given a surface sequence x = (x₁ … xₙ), grammar version Gᵥ, contextual constraints C, and optional evidence E, recover a parse forest F such that for each T ∈ F: yield(T) = x, or yield(T) = repair(x, R) with every repair R declared; every node and attachment in T is licensed by Gᵥ and mapped to a span of x; T satisfies structural invariants and applicable constraints C. Select T* = argmax score(T | Gᵥ, C, E) only when the selection policy and confidence threshold are met. Otherwise return F, an uncertainty-bearing partial structure, an escalation request, or an explicit failure—never an unlabeled invention.

Abstractions this archetype builds on — directly (a source ingredient) or as a related pattern. Links follow the typed catalog namespace.

Built directly on (7)

  • Compositionality: Meaning from parts.
  • Constraint: Limits possibilities to guide outcomes.
  • Hierarchy: Organizes elements into levels or ranks.
  • Interpretation: Recover meaning from a representational substrate under a framework that makes some readings available and others not.
  • Order: Defines ranking or sequencing relationships.
  • Parsing: Recover hidden hierarchical structure from a flat sequence using a grammar.
  • Transformation: A rule-governed mapping that restructures an input into a different output, holding certain invariants fixed while altering others.

Also references 17 related abstractions

  • Algorithm: Step-by-step problem-solving procedure.
  • Contextual Mode Switching: Adapt communication.
  • Decomposition: Breaking a whole into parts that can be analyzed independently and recombined to reconstitute the whole, making complexity tractable through divide-and-conquer.
  • Encoding And Decoding: The paired transformation by which content is converted into a transmissible code by an encoder and recovered from it by a decoder, with faithful round-trip conditional on a shared scheme.
  • Formal System: Symbols, formation rules, axioms, and inference rules closed under mechanical derivation.
  • Hierarchical Address: A single string whose substring structure encodes a path through a tree, so the identifier simultaneously names an entity and locates it within a containment hierarchy.
  • Pattern Recognition: Identify regularities.
  • Preimage: The set of all inputs that map to a given output under some mapping.
  • Probability: Quantifies uncertainty and likelihoods.
  • Recursion: Breaks processes into self-similar steps.

Variants

Narrower or domain-specific specializations that share this archetype's core structure. Recognized variants are established; candidate variants are provisional.

Deterministic Grammar Parsing · implementation variant · recognized

Recovers exactly one hierarchy through a grammar and conflict-resolution table that make every parsing action determinate.

  • Distinct from parent: The parent permits forests and unresolved ambiguity; this variant treats unresolved conflicts as grammar defects or explicit errors.
  • Use when: The language is deliberately constrained; Latency and repeatability matter more than retaining broad ambiguity; Precedence and associativity are authoritative.
  • Typical domains: programming languages, configuration languages, mathematical notation
  • Common mechanisms: recursive descent parsing, shift reduce parsing, grammar rule set

Ambiguity-Preserving Parsing · risk or failure variant · recognized

Retains a packed forest or explicit alternatives when the sequence and grammar do not justify a unique hierarchy.

  • Distinct from parent: It makes alternative preservation a primary output contract rather than an occasional fallback.
  • Use when: Natural or underspecified languages are involved; Alternative attachments have material consequences; Later context can resolve uncertainty.
  • Typical domains: natural language, law, requirements, scientific text
  • Common mechanisms: chart parsing, probabilistic grammar parsing, ambiguity register, controlled disambiguation test

Incremental or Streaming Parsing · temporal variant · recognized

Updates a partial hierarchy as sequence fragments arrive and revises attachments when later material changes the interpretation.

  • Distinct from parent: It adds temporal commitments, revision semantics, and bounded lookahead to the core recovery pattern.
  • Use when: Inputs arrive continuously; Low-latency partial structure is useful; Revisions and retractions can be communicated.
  • Typical domains: interactive editors, streaming protocols, speech transcription, event processing
  • Common mechanisms: shift reduce parsing, schema driven hierarchical decoding, interpretation walkthrough

Error-Tolerant Recovery Parsing · risk or failure variant · recognized

Returns a labeled partial or minimally repaired hierarchy when input violates the grammar within an explicit recovery budget.

  • Distinct from parent: The core archetype may fail on malformed input; this variant deliberately trades strict acceptance for bounded continuity.
  • Use when: Human-authored input is commonly incomplete; Diagnostics and continued processing are valuable; Repair cannot cross authority or safety boundaries.
  • Typical domains: interactive compilers, document import, data ingestion, legacy protocols
  • Common mechanisms: error tolerant parsing, linting or validation rule, round trip parse serialize testing

Near names: Parsing, Grammar-Constrained Hierarchy Reconstruction, Sequence-to-Structure Recovery, Syntax-Tree Recovery, Structural Sequence Interpretation.