workflow ieee-vis-community-evolution-revised
  template: characterise -> visualise -> assess -> generate-knowledge ->
            define-unit -> characterise -> define-unit ->
            loop(build-model -> define-unit -> characterise ->
                 build-model -> define-unit -> characterise ->
                 contextualise -> visualise -> abstract -> assess) ->
            characterise ->
            loop(build-model -> define-unit -> characterise ->
                 visualise -> abstract -> assess) ->
            loop(define-unit -> characterise -> contextualise ->
                 visualise -> abstract -> assess) ->
            loop(define-unit -> build-model -> define-unit ->
                 characterise -> build-model -> define-unit ->
                 define-unit -> characterise -> visualise -> assess) ->
            generate-knowledge
  description: "Identify and interpret evolving, overlapping collaboration
    communities in IEEE VIS publications. The workflow characterises
    community cores, leaders, topical foci, membership overlap, and
    lineage events while documenting methodological decisions and
    uncertainty."

# ============================================================================
# INPUT DATA, DOMAIN KNOWLEDGE, AND INITIAL CONTROL SPECIFICATIONS
# ============================================================================

artifact D_papers_raw : entities
  origin: given
  internal structure: elementary
  embedment: {set, time}
  features:
    - id: paper_id
      value structure: atomic
      value type: reference
      description: "Paper identifier"
    - id: publication_year
      value structure: atomic
      value type: temporal
      description: "Publication year, 1990--2024"
    - id: venue
      value structure: atomic
      value type: categorical
      description: "VIS, InfoVis, VAST, or SciVis"
    - id: authors
      value structure: list
      value type: reference
      description: "DBLP-disambiguated author identifiers and raw names"
    - id: bibliographic_text
      value structure: vector
      value type: text
      description: "Title, abstract, and keywords"
    - id: citation_information
      value structure: relational configuration
      value type: {numeric, reference}
      description: "Citation links where available, otherwise citation counts"
  description: "Raw IEEE VIS conference-paper records"

artifact K_domain_knowledge : knowledge(D_papers_raw)
  origin: given
  representation form: "annotations, taxonomies, and interpretive criteria"
  description: "Visualization-domain knowledge used to interpret research
    foci, venue history, plausible collaboration structures, and events"

artifact K_provenance_seed : knowledge(D_papers_raw)
  origin: given
  representation form: "empty provenance protocol"
  description: "Initial protocol for recording specifications, revisions,
    visual evidence, analyst annotations, and reasons for decisions"

artifact S_temporal_views : specification
  origin: given
  representation form: "configuration schema"
  description: "Candidate annual, rolling three- or five-year, and
    broad-era temporal views"

artifact S_community_analysis : specification
  origin: given
  representation form: "configuration schema"
  description: "Initial co-authorship weighting, overlapping-community
    method, resolution range, weak-tie treatment, and candidate
    temporal-window settings"

artifact S_quality_criteria : specification
  origin: given
  representation form: "quality criteria and thresholds"
  description: "Initial criteria for minimum community size and duration,
    cohesion, separation, persistence, topical coherence, and
    interpretability"

artifact S_role_definition : specification
  origin: given
  representation form: "role-definition rules"
  description: "Rules defining stable-core members, leaders, peripheral
    contributors, and boundary spanners; includes persistence horizon,
    membership threshold, repeated-collaboration requirement, and the
    relative use of centrality, productivity, brokerage, and impact"

artifact S_topic_analysis : specification
  origin: given
  representation form: "configuration schema"
  description: "Text preprocessing, generic-term treatment, topic-model
    family, topic-count range, coherence criteria, and permitted edits"

artifact S_multi_community_attribution : specification
  origin: given
  representation form: "allocation rules"
  description: "Rules for allocating papers associated with authors who
    belong to multiple communities: weighted fractional allocation,
    full-membership evidence view, and primary-community reporting view"

artifact S_lineage_matching : specification
  origin: given
  representation form: "matching rules and thresholds"
  description: "Rules for continuation, growth, merge, split, birth,
    dissolution, temporary disappearance, and reorientation; includes
    relative weighting of stable-core overlap, total membership overlap,
    topical similarity, and collaboration-structure similarity"

artifact S_robustness_analysis : specification
  origin: given
  representation form: "resampling and sensitivity settings"
  description: "Alternative time windows, tie weights, filters, resolutions,
    attribution rules, topic settings, resampling unit, number of
    resamples, agreement measures, and robust/tentative/uncertain labels"

artifact S_explanation_standard : specification
  origin: given
  representation form: "evidence hierarchy"
  description: "Rules distinguishing descriptive structural observations,
    evidence-backed hypotheses, and externally corroborated explanations;
    prohibits causal claims from bibliographic evidence alone"

assign:
  K_provenance_current := K_provenance_seed

# ============================================================================
# DATA AUDIT, CITATION-SEMANTICS DECISION, AND CLEANING POLICY
# ============================================================================

transform T_audit_records :
  intent: characterise
  manner: "compute data quality and citation-availability statistics"
  input: D_papers_raw
  output: F_record_quality, F_citation_availability
  actor: machine
  description: "Identify duplicate papers, missing author or text fields,
    unusually large author teams, yearly venue coverage, and whether
    citations are links, counts, both, or unavailable"

artifact F_record_quality : feature(D_papers_raw)
  value structure: vector
  value type: {numeric, categorical}
  description: "Completeness, duplication, author-team-size, and venue-
    coverage indicators"

artifact F_citation_availability : feature(D_papers_raw)
  value structure: vector
  value type: categorical
  description: "Availability and semantics of citation links and counts"

transform T_visualise_audit :
  intent: visualise
  manner: "temporal coverage and quality overview"
  input: D_papers_raw, F_record_quality, F_citation_availability
  output: V_data_audit
  actor: machine
  description: "Show yearly publication counts by venue, missingness,
    duplicates, team sizes, and citation-data availability"

artifact V_data_audit : visualisation(D_papers_raw, F_record_quality,
    F_citation_availability)
  layout: "aligned venue timelines and linked quality summaries"
  form: "stacked bars, distributions, and record inspector"
  encoding: "time and venue determine publication-count displays; colour
    and highlighting identify quality and citation-data conditions"
  description: "Audit interface for corpus coverage and record quality"

transform T_assess_audit :
  intent: assess
  manner: "judge corpus adequacy and citation semantics"
  input: V_data_audit, F_record_quality, F_citation_availability,
         K_domain_knowledge, S_quality_criteria
  output: K_audit_assessment
  actor: human
  description: "Assess data quality, treatment of duplicates and missing
    fields, effects of venue coverage, and the appropriate analytical use
    of available citation information"

artifact K_audit_assessment : knowledge(D_papers_raw, F_record_quality,
    F_citation_availability)
  representation form: "quality judgment and data-treatment decisions"
  description: "Analyst judgment of corpus adequacy and citation semantics"

transform T_formulate_data_policy :
  intent: generate-knowledge
  manner: "formulate methodological policy and provenance entry"
  input: K_audit_assessment, K_provenance_current
  output: S_cleaning_policy, S_citation_scope, K_provenance_after_audit
  actor: human
  description: "Externalise reproducible cleaning and inclusion rules and
    decide whether citations are excluded, used only as impact indicators,
    or analysed as citation links"

artifact S_cleaning_policy : specification
  representation form: "data-cleaning and inclusion rules"
  description: "Versioned policy for duplicate resolution, missing-text
    handling, author-team-size treatment, isolated-author inclusion, and
    venue-coverage qualifications"

artifact S_citation_scope : specification
  representation form: "citation-analysis method choice"
  description: "Decision specifying whether citation information is used as
    impact only, as within-corpus links, as external links, or not used"

artifact K_provenance_after_audit : knowledge(K_audit_assessment,
    S_cleaning_policy, S_citation_scope)
  representation form: "provenance record"
  description: "Recorded audit evidence and adopted data and citation policy"

assign:
  K_provenance_current := K_provenance_after_audit

transform T_prepare_records :
  intent: define-unit
  manner: "filter, deduplicate, and normalise"
  input: D_papers_raw, S_cleaning_policy
  output: D_papers
  actor: machine
  description: "Create an analysis-ready corpus while retaining DBLP
    identifiers, raw display names, clean bibliographic text, and policy-
    compliant paper records"

artifact D_papers : entities
  internal structure: elementary
  embedment: {set, time}
  features:
    - id: publication_year
      value structure: atomic
      value type: temporal
      description: "Validated publication year"
    - id: venue
      value structure: atomic
      value type: categorical
      description: "Publication venue"
    - id: author_ids
      value structure: list
      value type: reference
      description: "Validated DBLP author identifiers"
    - id: clean_text
      value structure: vector
      value type: text
      description: "Normalised title, abstract, and keywords"
  description: "Prepared paper corpus"

# ============================================================================
# AUTHOR NETWORK AND TEMPORAL SNAPSHOTS
# ============================================================================

transform T_define_authors :
  intent: define-unit
  manner: "group-by-entity"
  input: D_papers
  output: D_authors, F_authorship
  actor: machine
  description: "Define unique researchers and preserve paper--author
    affiliations"

artifact D_authors : entities
  internal structure: group/cluster
  embedment: set
  features:
    - id: author_id
      value structure: atomic
      value type: reference
      description: "DBLP author identifier"
    - id: display_names
      value structure: list
      value type: text
      description: "Raw names retained for display and checking"
  description: "Researchers represented through associated papers"

artifact F_authorship : feature(D_papers)
  value structure: relational configuration
  value type: reference
  representation form: "paper--author bipartite network"
  description: "Complete authorship relationships"

transform T_characterise_relations :
  intent: characterise
  manner: "define fractional co-authorship relations and encode text"
  input: D_papers, D_authors, F_authorship
  output: F_coauthorship, F_text_representation
  actor: machine
  description: "Compute fractionally weighted temporal co-authorship ties
    and a machine-processable document representation"

artifact F_coauthorship : feature(D_authors)
  value structure: relational configuration
  value type: numeric
  representation form: "weighted temporal co-authorship network"
  description: "Co-authorship ties whose contribution is normalised within
    each paper's author team"

artifact F_text_representation : feature(D_papers)
  value structure: matrix
  value type: numeric
  representation form: "document-term matrix"
  description: "Text representation of normalised bibliographic content"

transform T_define_snapshots :
  intent: define-unit
  manner: "time-partitioning and network aggregation"
  input: D_papers, D_authors, F_coauthorship, S_temporal_views
  output: D_network_snapshots
  actor: machine
  description: "Construct annual, rolling-window, and broad-era weighted
    co-authorship network snapshots"

artifact D_network_snapshots : entities
  internal structure: formation
  embedment: time
  features:
    - id: window_extent
      value structure: atomic
      value type: temporal
      description: "Snapshot time interval"
    - id: edge_weight
      value structure: relational configuration
      value type: numeric
      description: "Weighted co-authorship ties"
  description: "Temporal collaboration-network snapshots"

assign:
  S_community_current := S_community_analysis
  S_quality_current := S_quality_criteria
  S_role_current := S_role_definition

# ============================================================================
# JOINT COMMUNITY-STRUCTURE AND LIGHTWEIGHT TOPICAL-SCREENING LOOP
# ============================================================================

loop L_community_refinement:
  purpose: "Find overlapping communities that are structurally coherent,
    temporally persistent, topically intelligible, and useful to the
    analyst"
  until: "The community structure satisfies the current quality criteria,
    including structural and lightweight topical-screening evidence"
  body:

    transform T_fit_community_model :
      intent: build-model
      manner: "fit overlapping community-detection model"
      input: D_network_snapshots, F_coauthorship, S_community_current
      output: M_community_model
      actor: machine
      description: "Fit candidate overlapping community memberships for
        each temporal network snapshot"

    artifact M_community_model : model(D_network_snapshots, F_coauthorship)
      model type: "overlapping community-detection model"
      representation form: "membership-weight and resolution parameters"
      description: "Candidate dynamic overlapping community structure"

    transform T_define_communities :
      intent: define-unit
      manner: "derive weighted overlapping groups"
      input: D_network_snapshots, D_authors, M_community_model
      output: D_communities, F_community_membership
      actor: machine
      description: "Define community instances and author membership weights
        for each temporal window"

    artifact D_communities : entities
      internal structure: group/cluster
      embedment: time
      description: "Candidate overlapping author communities"

    artifact F_community_membership : feature(D_authors)
      value structure: matrix
      value type: numeric
      representation form: "author x community-time membership weights"
      description: "Strength of every author's membership in communities
        across time"

    transform T_characterise_community_structure :
      intent: characterise
      manner: "compute role, persistence, and network metrics"
      input: D_communities, D_authors, F_community_membership,
             F_coauthorship, S_role_current
      output: F_author_roles, F_community_metrics
      actor: machine
      description: "Compute candidate stable cores, leaders, peripheral
        contributors, and boundary spanners according to explicit role rules"

    artifact F_author_roles : feature(D_authors)
      value structure: vector
      value type: {categorical, numeric, temporal}
      description: "Time-resolved role labels and supporting persistence,
        within-community, brokerage, productivity, and impact measures"

artifact F_community_metrics : feature(D_communities)
  value structure: vector
  value type: {numeric, temporal}
  description: "Size, density, separation, persistence, repeated-
    collaboration, overlap, productivity, and impact indicators"

    transform T_characterise_candidate_corpora :
      intent: characterise
      manner: "aggregate provisional community document corpora"
      input: D_papers, D_communities, F_community_membership,
             F_text_representation, S_multi_community_attribution
      output: F_candidate_community_corpora
      actor: machine
      description: "Create provisional weighted document corpora for
        topical screening of candidate communities"

    artifact F_candidate_community_corpora : feature(D_communities)
      value structure: matrix
      value type: numeric
      representation form: "weighted community-time document-term matrix"
      description: "Provisional textual evidence for each candidate community"

    transform T_fit_screening_topic_model :
      intent: build-model
      manner: "fit lightweight topical-screening model"
      input: F_candidate_community_corpora, S_topic_analysis
      output: M_screening_topic_model
      actor: machine
      description: "Estimate a lightweight topic representation used only
        to assess whether candidate communities have intelligible foci"

    artifact M_screening_topic_model : model(F_candidate_community_corpora)
      model type: "topic model"
      representation form: "compact topic-term and topic-community matrices"
      description: "Provisional topic model for community-solution assessment"

    transform T_define_screening_topics :
      intent: define-unit
      manner: "derive provisional topic groups"
      input: M_screening_topic_model, F_candidate_community_corpora
      output: D_screening_topics, F_screening_topic_profile
      actor: machine
      description: "Define provisional topics and their prevalence in
        candidate communities"

    artifact D_screening_topics : entities
      internal structure: group/cluster
      embedment: set
      description: "Provisional research-focus groups for screening"

    artifact F_screening_topic_profile : feature(D_communities)
      value structure: vector
      value type: numeric
      description: "Provisional topic prevalence and topical concentration
        per community-time instance"

    transform T_contextualise_community_states :
      intent: contextualise
      manner: "projection-based dynamic network-state map"
      input: D_network_snapshots, F_community_metrics
      output: D_state_space, A_snapshot_states
      actor: machine
      description: "Project snapshots so proximity represents similarity of
        their community-network structure"

    artifact D_state_space : entities
      internal structure: elementary
      features:
        - id: dimensions
          value structure: atomic
          value type: numeric
          description: "Two projection dimensions"
      description: "Computed network-state projection context"

    artifact A_snapshot_states : arrangement(D_network_snapshots)
      context: D_state_space
      principle: "similarity-preserving projection of network and community metrics"
      description: "Arrangement of temporal snapshots by structural similarity"

    transform T_visualise_community_candidates :
      intent: visualise
      manner: "coordinated community, role, and topical-screening views"
      input: D_communities, D_authors, F_community_membership,
             F_author_roles, F_community_metrics, A_snapshot_states,
             F_screening_topic_profile
      output: V_community_candidates
      actor: machine
      description: "Provide linked state-map, membership-history, core-
        periphery, NodeTrix-style, and provisional topical-profile views"

    artifact V_community_candidates : visualisation(D_communities, D_authors,
        F_community_membership, F_author_roles, F_community_metrics,
        A_snapshot_states, F_screening_topic_profile)
      layout: "state projection, temporal membership matrix, core-periphery
        summaries, selected-community matrices, and topical summaries"
      form: "projected points, ribbons, matrices, node-link diagrams,
        distributions, and topic bars"
      encoding: "colour denotes communities or topics; size and edge weight
        encode membership and collaboration strength; time orders snapshots"
      description: "Interactive workspace for inspecting candidate
        communities and their provisional research foci"

    transform T_interpret_community_patterns :
      intent: abstract
      manner: "perception-and-interpretation"
      input: V_community_candidates, F_author_roles, F_community_metrics,
             F_screening_topic_profile, K_domain_knowledge
      output: P_candidate_community_structure
      actor: human
      description: "Interpret salient communities, possible fragmentation,
        implausible merges, core and leader roles, overlap, and preliminary
        topical intelligibility"

    artifact P_candidate_community_structure : pattern(D_communities)
      representation form: "annotated candidate community descriptions"
      description: "Analyst interpretations of community structure and
        provisional intellectual coherence"

    transform T_assess_communities :
      intent: assess
      manner: "evaluate structural, temporal, role, and topical adequacy"
      input: D_communities, F_community_membership, F_author_roles,
             F_community_metrics, F_screening_topic_profile,
             V_community_candidates, P_candidate_community_structure,
             S_community_current, S_quality_current, S_role_current,
             K_domain_knowledge, K_provenance_current
      output: K_community_assessment, S_community_revised,
              S_quality_revised, S_role_revised,
              K_provenance_after_community_assessment
      actor: hybrid
      description: "Evaluate candidate communities against explicit
        thresholds and interpretive criteria; determine whether model
        settings, quality criteria, or role rules need justified revision"

    artifact K_community_assessment : knowledge(D_communities,
        F_community_metrics, F_screening_topic_profile)
      representation form: "quality judgment"
      description: "Assessment of cohesion, persistence, overlap,
        interpretability, topical intelligibility, and role validity"

    artifact S_community_revised : specification
      representation form: "revised community-analysis settings"
      description: "Justified revisions to method choice, resolution,
        temporal-window choice, weighting, or weak-tie treatment"

    artifact S_quality_revised : specification
      representation form: "revised quality criteria and thresholds"
      description: "Documented revisions to quality criteria when initial
        thresholds prove inappropriate for the corpus or historical period"

    artifact S_role_revised : specification
      representation form: "revised role-definition rules"
      description: "Documented revisions to stable-core, leader, peripheral,
        or broker definitions when evidence shows they are inadequate"

    artifact K_provenance_after_community_assessment : knowledge(
        K_community_assessment, S_community_revised, S_quality_revised,
        S_role_revised)
      representation form: "provenance record"
      description: "Recorded community-model settings, evidence, assessment,
        and rationale for accepted or revised choices"

    if K_community_assessment indicates refinement needed:
      then:
        assign:
          S_community_current := S_community_revised
          S_quality_current := S_quality_revised
          S_role_current := S_role_revised
          K_provenance_current := K_provenance_after_community_assessment
      else:
        assign:
          K_provenance_current := K_provenance_after_community_assessment
        exit loop L_community_refinement

end loop L_community_refinement

# ============================================================================
# DETAILED HUMAN-STEERED TOPIC CHARACTERISATION
# ============================================================================

transform T_characterise_community_corpora :
  intent: characterise
  manner: "aggregate weighted and full-membership document corpora"
  input: D_papers, D_communities, F_community_membership,
         F_text_representation, S_multi_community_attribution
  output: F_community_corpora, F_full_membership_papers
  actor: machine
  description: "Build topic-model corpora using the selected fractional
    allocation rule while retaining full paper--community associations for
    inspection of interdisciplinary work"

artifact F_community_corpora : feature(D_communities)
  value structure: matrix
  value type: numeric
  representation form: "weighted community-time document-term matrix"
  description: "Text corpus allocated to community-time instances"

artifact F_full_membership_papers : feature(D_communities)
  value structure: relational configuration
  value type: reference
  representation form: "full paper-community association graph"
  description: "Unfractionated evidence linking papers to every associated
    community"

assign:
  S_topic_current := S_topic_analysis
  S_attribution_current := S_multi_community_attribution

loop L_topic_refinement:
  purpose: "Develop meaningful and traceable research-focus profiles for
    accepted communities"
  until: "Topics satisfy coherence and distinctness criteria, are meaningful
    to the analyst, and adequately describe community focus and change"
  body:

    transform T_fit_topic_model :
      intent: build-model
      manner: "fit interpretable topic model"
      input: F_community_corpora, F_text_representation, S_topic_current
      output: M_topic_model
      actor: machine
      description: "Fit an interpretable topic model to community-associated
        paper text"

    artifact M_topic_model : model(F_community_corpora, F_text_representation)
      model type: "topic model"
      representation form: "topic-term and topic-document matrices"
      description: "Model of research foci in the accepted communities"

    transform T_define_topics :
      intent: define-unit
      manner: "derive topic groups and topic mixtures"
      input: M_topic_model, F_community_corpora
      output: D_topics, F_topic_mixture, F_topic_terms
      actor: machine
      description: "Define topics, representative terms and papers, and
        community-time topic mixtures"

    artifact D_topics : entities
      internal structure: group/cluster
      embedment: set
      description: "Candidate research topics"

    artifact F_topic_mixture : feature(D_communities)
      value structure: vector
      value type: numeric
      description: "Topic prevalence profile for each community over time"

    artifact F_topic_terms : feature(D_topics)
      value structure: list
      value type: text
      description: "Ranked terms and representative papers for each topic"

    transform T_characterise_topic_change :
      intent: characterise
      manner: "compute topic trends and community similarity"
      input: D_topics, F_topic_mixture, F_topic_terms
      output: F_topic_trends, F_topic_similarity
      actor: machine
      description: "Compute persistent, emerging, declining, and shared
        topics, topical diversity, and community topical similarity"

    artifact F_topic_trends : feature(D_communities)
      value structure: vector
      value type: {numeric, temporal}
      description: "Topic prevalence, diversity, emergence, and decline"

    artifact F_topic_similarity : feature(D_communities)
      value structure: matrix
      value type: numeric
      representation form: "pairwise community topical-similarity matrix"
      description: "Topical similarity among community-time instances"

    transform T_visualise_topics :
      intent: visualise
      manner: "topic timeline and paper-evidence inspection"
      input: D_communities, D_topics, F_topic_mixture, F_topic_terms,
             F_topic_trends, F_full_membership_papers
      output: V_topics
      actor: machine
      description: "Show topic timelines, community-topic heatmaps, terms,
        representative papers, and full-membership evidence"

    artifact V_topics : visualisation(D_communities, D_topics,
        F_topic_mixture, F_topic_terms, F_topic_trends,
        F_full_membership_papers)
      layout: "aligned community timelines, topic heatmap, and paper inspector"
      form: "stacked areas, heatmaps, ranked lists, and document cards"
      encoding: "time determines horizontal position; topic colour and
        area or intensity encode topic prevalence"
      description: "Interactive interface for interpreting research foci"

    transform T_interpret_topics :
      intent: abstract
      manner: "name and refine research-focus patterns"
      input: V_topics, D_topics, F_topic_terms, K_domain_knowledge
      output: P_research_foci
      actor: human
      description: "Name topics, identify mixed or redundant topics, and
        interpret topical evolution using paper-level evidence"

    artifact P_research_foci : pattern(D_topics, D_communities)
      representation form: "named topic descriptions and temporal focus patterns"
      description: "Interpreted research foci characterising communities"

    transform T_assess_topics :
      intent: assess
      manner: "evaluate topic coherence, attribution adequacy, and usefulness"
      input: M_topic_model, V_topics, P_research_foci, F_topic_trends,
             S_topic_current, S_attribution_current, S_quality_current,
             K_provenance_current
      output: K_topic_assessment, S_topic_revised, S_attribution_revised,
              K_provenance_after_topic_assessment
      actor: human
      description: "Assess whether topics are coherent and distinct, whether
        allocation of multi-community papers is misleading, and whether
        topic settings require refinement"

    artifact K_topic_assessment : knowledge(D_topics, M_topic_model)
      representation form: "quality judgment"
      description: "Assessment of topic coherence, coverage, distinction,
        temporal interpretability, and attribution adequacy"

    artifact S_topic_revised : specification
      representation form: "revised topic-model settings and constraints"
      description: "Analyst-guided changes such as merging or splitting
        topics, removing generic terms, seeding concepts, or changing
        topic count"

    artifact S_attribution_revised : specification
      representation form: "revised multi-community allocation rules"
      description: "Justified adjustment of fractional, full-membership, or
        primary-community topic reporting"

    artifact K_provenance_after_topic_assessment : knowledge(
        K_topic_assessment, S_topic_revised, S_attribution_revised)
      representation form: "provenance record"
      description: "Recorded topic edits, attribution decisions, evidence,
        and assessment rationale"

    if K_topic_assessment indicates refinement needed:
      then:
        assign:
          S_topic_current := S_topic_revised
          S_attribution_current := S_attribution_revised
          K_provenance_current := K_provenance_after_topic_assessment
      else:
        assign:
          K_provenance_current := K_provenance_after_topic_assessment
        exit loop L_topic_refinement

end loop L_topic_refinement

# ============================================================================
# LINEAGE MATCHING, EVENT REVIEW, AND LINEAGE-VALIDATION LOOP
# ============================================================================

assign:
  S_lineage_current := S_lineage_matching

loop L_lineage_validation:
  purpose: "Derive and validate community lineages and evolution events
    against membership, structural, topical, paper-level, and citation evidence"
  until: "Lineage links and event labels are sufficiently supported by the
    lineage rules and analyst review, with uncertainty explicitly recorded"
  body:

    transform T_define_lineages :
      intent: define-unit
      manner: "match communities across adjacent temporal windows"
      input: D_communities, F_community_membership, F_author_roles,
             F_topic_mixture, F_topic_similarity, S_lineage_current
      output: D_community_lineages, F_lineage_membership, F_event_candidates
      actor: hybrid
      description: "Match community instances across time, prioritising
        stable-core overlap while considering total membership, topical,
        and structural similarity"

    artifact D_community_lineages : entities
      internal structure: sequence
      embedment: set
      features:
        - id: lifespan
          value structure: atomic
          value type: temporal
          description: "Lineage time span"
      description: "Sequences of related community instances"

    artifact F_lineage_membership : feature(D_communities)
      value structure: relational configuration
      value type: reference
      representation form: "predecessor-successor lineage graph"
      description: "Inferred links between successive community instances"

    artifact F_event_candidates : feature(D_community_lineages)
      value structure: list
      value type: categorical
      description: "Candidate continuation, growth, merge, split, birth,
        dissolution, temporary-disappearance, and reorientation events"

    transform T_characterise_event_evidence :
      intent: characterise
      manner: "compute membership, topical, venue, paper, and citation evidence"
      input: D_authors, D_papers, D_communities, D_community_lineages,
             F_community_membership, F_author_roles, F_topic_mixture,
             F_event_candidates, S_citation_scope
      output: F_overlap, F_member_transitions, F_event_evidence
      actor: machine
      description: "Compute community overlap, mobile and simultaneous
        memberships, shared papers, core changes, topical change, venue
        shifts, and policy-compliant citation evidence"

    artifact F_overlap : feature(D_communities)
      value structure: matrix
      value type: numeric
      representation form: "time-resolved pairwise overlap matrix"
      description: "Shared membership between communities through time"

    artifact F_member_transitions : feature(D_authors)
      value structure: relational configuration
      value type: reference
      representation form: "author-to-community membership histories"
      description: "Researcher mobility and multiple-community participation"

    artifact F_event_evidence : feature(D_community_lineages)
      value structure: vector
      value type: {numeric, categorical, temporal, text}
      description: "Structural, membership, topic, paper, venue, and
        citation evidence for candidate events"

    artifact D_lineage_timeline : entities
      origin: given
      internal structure: elementary
      embedment: time
      features:
        - id: date
          value structure: atomic
          value type: temporal
          description: "Time position"
      description: "Temporal context for lineage displays"

    transform T_contextualise_lineages :
      intent: contextualise
      manner: "time-based lineage arrangement"
      input: D_communities, D_lineage_timeline, F_lineage_membership
      output: A_lineage_timeline
      actor: machine
      description: "Arrange community instances by time and lineage relations"

    artifact A_lineage_timeline : arrangement(D_communities)
      context: D_lineage_timeline
      principle: "temporal placement with lineage-preserving band positions"
      description: "Time-based arrangement of community instances"

    transform T_visualise_evolution :
      intent: visualise
      manner: "coordinated lineage, overlap, and evidence views"
      input: A_lineage_timeline, D_community_lineages, F_event_candidates,
             F_event_evidence, F_overlap, F_member_transitions,
             F_author_roles, F_topic_trends
      output: V_community_evolution
      actor: machine
      description: "Show lineage bands, membership ribbons, overlap matrix,
        selected-community network matrices, topic timelines, and linked
        evidence from papers and citations"

    artifact V_community_evolution : visualisation(A_lineage_timeline,
        D_community_lineages, F_event_candidates, F_event_evidence,
        F_overlap, F_member_transitions, F_author_roles, F_topic_trends)
      layout: "lineage bands with coordinated overlap, member, topic, and
        evidence-detail views"
      form: "alluvial bands, ribbons, heatmaps, matrices, node-link views,
        timelines, and document cards"
      encoding: "band width encodes activity; links encode lineage relation;
        colour identifies communities or topics; highlighting exposes
        members and supporting evidence"
      description: "Workspace for inspecting community evolution"

    transform T_review_evolution_events :
      intent: abstract
      manner: "perception-and-interpretation of evolution events"
      input: V_community_evolution, F_event_candidates, F_event_evidence,
             P_research_foci, K_domain_knowledge
      output: P_reviewed_evolution_events
      actor: human
      description: "Review candidate events and distinguish likely genuine
        structural change from sparse-data, windowing, or matching artifacts"

    artifact P_reviewed_evolution_events : pattern(D_community_lineages)
      representation form: "reviewed event annotations"
      description: "Analyst-reviewed community continuations, merges,
        splits, births, dissolutions, disappearances, and reorientations"

    transform T_assess_lineages :
      intent: assess
      manner: "validate lineage matching and event labels"
      input: D_community_lineages, F_lineage_membership, F_event_candidates,
             F_event_evidence, P_reviewed_evolution_events,
             S_lineage_current, S_quality_current, K_provenance_current
      output: K_lineage_assessment, S_lineage_revised,
              K_provenance_after_lineage_assessment
      actor: hybrid
      description: "Assess whether matching rules and event thresholds
        produce defensible lineages; identify uncertain events and decide
        whether matching policy should be revised"

    artifact K_lineage_assessment : knowledge(D_community_lineages,
        F_event_candidates, F_event_evidence)
      representation form: "quality judgment and uncertainty annotations"
      description: "Assessment of lineage validity, event confidence, and
        need for matching-rule revision"

    artifact S_lineage_revised : specification
      representation form: "revised matching rules and thresholds"
      description: "Justified revisions to core-overlap weighting, topical
        weighting, sparse-period treatment, event thresholds, or temporary-
        disappearance rules"

    artifact K_provenance_after_lineage_assessment : knowledge(
        K_lineage_assessment, S_lineage_revised)
      representation form: "provenance record"
      description: "Recorded lineage settings, event evidence, uncertainty,
        and rationale for accepted or revised matching decisions"

    if K_lineage_assessment indicates lineage refinement needed:
      then:
        assign:
          S_lineage_current := S_lineage_revised
          K_provenance_current := K_provenance_after_lineage_assessment
      else:
        assign:
          K_provenance_current := K_provenance_after_lineage_assessment
        exit loop L_lineage_validation

end loop L_lineage_validation

# ============================================================================
# EVIDENCE-BOUNDED EXPLANATION OF EVOLUTION EVENTS
# ============================================================================

transform T_formulate_event_explanations :
  intent: generate-knowledge
  manner: "formulate evidence-bounded explanatory statements"
  input: P_reviewed_evolution_events, P_research_foci, F_event_evidence,
         S_explanation_standard, K_domain_knowledge
  output: K_evolution_explanations
  actor: human
  description: "Formulate descriptions and hypotheses about why events
    occurred; classify each statement by the available evidence level and
    avoid unsupported causal claims"

artifact K_evolution_explanations : knowledge(P_reviewed_evolution_events,
    P_research_foci, F_event_evidence)
  representation form: "annotated explanatory statements"
  description: "Evidence-bounded interpretations of community evolution,
    labelled as descriptive observation, evidence-backed hypothesis, or
    externally corroborated explanation when external evidence exists"

# ============================================================================
# ROBUSTNESS, RESAMPLING, AND UNCERTAINTY ANALYSIS
# ============================================================================

assign:
  S_robustness_current := S_robustness_analysis

loop L_robustness_analysis:
  purpose: "Test whether substantive community, topic, lineage, and event
    findings persist under plausible alternative analytical choices"
  until: "The analyst has examined the specified sensitivity and resampling
    cases and can classify findings as robust, tentative, or uncertain"
  body:

    transform T_define_alternative_snapshots :
      intent: define-unit
      manner: "alternative time partitioning and resampling"
      input: D_papers, D_authors, F_coauthorship, S_robustness_current
      output: D_alternative_network_snapshots
      actor: machine
      description: "Create resampled or alternative-window collaboration
        snapshots according to the robustness specification"

    artifact D_alternative_network_snapshots : entities
      internal structure: formation
      embedment: time
      description: "Alternative or resampled temporal co-authorship snapshots"

    transform T_fit_alternative_community_model :
      intent: build-model
      manner: "fit alternative overlapping community model"
      input: D_alternative_network_snapshots, F_coauthorship,
             S_robustness_current
      output: M_alternative_community_model
      actor: machine
      description: "Fit community models under alternative resolutions,
        weights, filtering, window, and resampling choices"

    artifact M_alternative_community_model : model(
        D_alternative_network_snapshots, F_coauthorship)
      model type: "overlapping community-detection model"
      description: "Alternative community solution"

    transform T_define_alternative_communities :
      intent: define-unit
      manner: "derive alternative overlapping groups"
      input: D_alternative_network_snapshots, D_authors,
             M_alternative_community_model
      output: D_alternative_communities, F_alternative_membership
      actor: machine
      description: "Define alternative community memberships"

    artifact D_alternative_communities : entities
      internal structure: group/cluster
      embedment: time
      description: "Community instances from an alternative configuration"

    artifact F_alternative_membership : feature(D_authors)
      value structure: matrix
      value type: numeric
      description: "Alternative author-community membership weights"

    transform T_characterise_alternative_communities :
      intent: characterise
      manner: "compute alternative roles and topic corpora"
      input: D_alternative_communities, D_authors, F_alternative_membership,
             F_coauthorship, D_papers, F_text_representation,
             S_role_current, S_robustness_current
      output: F_alternative_roles, F_alternative_corpora
      actor: machine
      description: "Compute comparable role measures and alternative corpora,
        including the selected alternative attribution rule"

    artifact F_alternative_roles : feature(D_authors)
      value structure: vector
      value type: {categorical, numeric, temporal}
      description: "Roles computed for alternative community memberships"

    artifact F_alternative_corpora : feature(D_alternative_communities)
      value structure: matrix
      value type: numeric
      description: "Alternative community document corpora"

    transform T_fit_alternative_topic_model :
      intent: build-model
      manner: "fit alternative topic model"
      input: F_alternative_corpora, S_robustness_current
      output: M_alternative_topic_model
      actor: machine
      description: "Fit topic model under alternative preprocessing,
        topic-count, and attribution settings"

    artifact M_alternative_topic_model : model(F_alternative_corpora)
      model type: "topic model"
      description: "Alternative topical representation"

    transform T_define_alternative_topics :
      intent: define-unit
      manner: "derive alternative topic groups"
      input: M_alternative_topic_model, F_alternative_corpora
      output: D_alternative_topics, F_alternative_topic_mixture
      actor: machine
      description: "Define alternative research topics and mixtures"

    artifact D_alternative_topics : entities
      internal structure: group/cluster
      embedment: set
      description: "Topics from an alternative configuration"

    artifact F_alternative_topic_mixture : feature(D_alternative_communities)
      value structure: vector
      value type: numeric
      description: "Alternative community topic profiles"

    transform T_define_alternative_lineages :
      intent: define-unit
      manner: "match alternative communities across time"
      input: D_alternative_communities, F_alternative_membership,
             F_alternative_roles, F_alternative_topic_mixture,
             S_lineage_current
      output: D_alternative_lineages, F_alternative_events
      actor: machine
      description: "Derive alternative lineage and event structures"

    artifact D_alternative_lineages : entities
      internal structure: sequence
      embedment: set
      description: "Lineages from an alternative configuration"

    artifact F_alternative_events : feature(D_alternative_lineages)
      value structure: list
      value type: categorical
      description: "Alternative lineage-event labels"

    transform T_characterise_robustness :
      intent: characterise
      manner: "measure agreement and confidence across configurations"
      input: D_communities, D_community_lineages, F_community_membership,
             F_author_roles, F_topic_mixture, F_event_candidates,
             D_alternative_communities, D_alternative_lineages,
             F_alternative_membership, F_alternative_roles,
             F_alternative_topic_mixture, F_alternative_events,
             S_robustness_current
      output: F_result_robustness
      actor: machine
      description: "Compute agreement for memberships, stable cores, leaders,
        topics, lineages, and events across alternative and resampled runs"

    artifact F_result_robustness : feature(D_community_lineages)
      value structure: vector
      value type: {numeric, categorical}
      description: "Agreement scores, confidence intervals where applicable,
        and robust, tentative, or uncertain labels"

    transform T_visualise_robustness :
      intent: visualise
      manner: "comparative sensitivity display"
      input: F_result_robustness, D_communities, D_alternative_communities,
             D_community_lineages, D_alternative_lineages
      output: V_robustness
      actor: machine
      description: "Compare primary and alternative solutions and expose
        parameter-sensitive communities, topics, and events"

    artifact V_robustness : visualisation(F_result_robustness, D_communities,
        D_alternative_communities, D_community_lineages,
        D_alternative_lineages)
      layout: "aligned solution comparison and stability summaries"
      form: "matched lineage bands, agreement matrices, and stability plots"
      encoding: "alignment links comparable results; colour and opacity
        encode robustness category and agreement score"
      description: "Visual evidence for uncertainty assessment"

    transform T_assess_robustness :
      intent: assess
      manner: "judge sensitivity-analysis sufficiency"
      input: V_robustness, F_result_robustness, S_robustness_current,
             K_domain_knowledge, K_provenance_current
      output: K_robustness_assessment, S_robustness_revised,
              K_provenance_after_robustness_assessment
      actor: human
      description: "Judge whether examined alternatives are sufficient and
        classify final findings by robustness and uncertainty"

    artifact K_robustness_assessment : knowledge(F_result_robustness)
      representation form: "quality judgment and uncertainty classification"
      description: "Assessment of robustness coverage and confidence in
        communities, roles, topics, lineages, and events"

    artifact S_robustness_revised : specification
      representation form: "revised resampling and sensitivity settings"
      description: "Additional justified alternatives or resampling cases
        required for adequate uncertainty assessment"

    artifact K_provenance_after_robustness_assessment : knowledge(
        K_robustness_assessment, S_robustness_revised)
      representation form: "provenance record"
      description: "Recorded sensitivity cases, outcomes, uncertainty
        decisions, and rationale"

    if K_robustness_assessment indicates additional testing needed:
      then:
        assign:
          S_robustness_current := S_robustness_revised
          K_provenance_current := K_provenance_after_robustness_assessment
      else:
        assign:
          K_provenance_current := K_provenance_after_robustness_assessment
        exit loop L_robustness_analysis

end loop L_robustness_analysis

# ============================================================================
# SYNTHESIS AND REPORTING
# ============================================================================

transform T_synthesise_findings :
  intent: generate-knowledge
  manner: "formulate evidence-linked analytical report"
  input: D_community_lineages, F_author_roles, F_community_metrics,
         P_research_foci, P_reviewed_evolution_events,
         K_evolution_explanations, F_result_robustness,
         K_robustness_assessment, K_provenance_current,
         S_cleaning_policy, S_citation_scope
  output: K_community_findings
  actor: human
  description: "Report active communities and long-term lineages, stable
    cores and leaders, research foci, membership overlap and mobility,
    reviewed evolution events, evidential status of explanations, and
    uncertainty"

artifact K_community_findings : knowledge(D_community_lineages,
    P_research_foci, P_reviewed_evolution_events, F_result_robustness)
  representation form: "annotated report and reproducibility package"
  description: "Final evidence-linked account of the evolving intellectual
    structure of the IEEE VIS research community, including methodological
    provenance and uncertainty qualifications"