% Showcase bibliography demonstrating crossref functionality
% This file contains examples of all crossref features and inheritance chains

% ============================================================================
% SECTION 1: Basic Software → Version Examples
% ============================================================================
% Using real-world Scilab example from biblio.bib

% Scilab base software (real entry)
@software {delebecque:hal-02090402,
  title = {Scilab},
  author = {Delebecque, Fran{\c c}ois and Gomez, Claude and Goursat, Maurice 
    and Nikoukhah, Ramine and Steer, Serge and Chancelier, Jean-Philippe},
  date = {1994},
  institution = {Inria},
  license = {Scilab license},
  hal_id = {hal-02090402},
  hal_version = {v1},
  url = {https://www.scilab.org/},
  abstract = {Software for Numerical Computation freely distributed.},
  repository = {https://github.com/scilab/scilab}
}

% Scilab version 1.1 (real entry) - demonstrates different date (1994 vs 1994-01)
@softwareversion {delebecque:hal-02090402v1,
  crossref = {delebecque:hal-02090402},
  version = {1.1},
  date = {1994-01},
  file = {https://hal.inria.fr/hal-02090402/file/scilab-1.1.tar.gz},
  swhid = {swh:1:dir:1ba0b67b5d0c8f10961d878d91ae9d6e499d746a;
	   origin=https://hal.archives-ouvertes.fr/hal-02090402},
  note = {First Scilab version. It was distributed by anonymous ftp.}
}

% Scilab version 2.0 (variant) - demonstrates different version number
@softwareversion {delebecque:hal-02090402v2,
  crossref = {delebecque:hal-02090402},
  version = {2.0},
  date = {1995},
  swhid = {swh:1:rel:example1234567890abcdef1234567890abcdef12345678;
	   origin=https://hal.archives-ouvertes.fr/hal-02090402},
  note = {Scilab version 2.0 with enhanced features.}
}

% Scilab version with different title (variant) - demonstrates title override
@softwareversion {delebecque:hal-02090402v3,
  crossref = {delebecque:hal-02090402},
  version = {1.5},
  title = {Scilab Extended},
  date = {1994-06},
  note = {Extended version of Scilab with additional toolboxes.}
}

% Synthetic example: Version with all fields equal to parent (will show warning)
% Kept for pedagogical demonstration of duplicate detection
@software {showcase-base-software,
  title = {Example Software},
  author = {Smith, John and Doe, Jane},
  date = {2020},
  institution = {Example University},
  url = {https://example.com/software},
  license = {MIT}
}

@softwareversion {showcase-version-duplicate,
  crossref = {showcase-base-software},
  version = {1.0},
  % All fields inherited, nothing new - this will trigger a warning
}

% ============================================================================
% SECTION 2: Module Inheritance Examples
% ============================================================================
% Using real-world CGAL example from biblio.bib

% CGAL base software (real entry)
@software {cgal,
  title = {The Computational Geometry Algorithms Library},
  author = {{The CGAL Project}},
  editor = {{CGAL Editorial Board}},
  date = {1996},
  url = {https://cgal.org/}
}

% CGAL version (real entry)
@softwareversion {cgal:5-0-2,
  crossref = {cgal},
  version = {{5.0.2}},
  url = {https://docs.cgal.org/5.02},
  date = {2020},
  swhid = {swh:1:rel:636541bbf6c77863908eae744610a3d91fa58855;
           origin=https://github.com/CGAL/cgal/}
}

% CGAL module (real entry) - demonstrates module without explicit version
@softwaremodule {cgal:lp-gi-20a,
  crossref = {cgal:5-0-2},
  author = {Menelaos Karavelas},
  subtitle = {{2D} Voronoi Diagram Adaptor},
  license = {GPL},
  introducedin = {cgal:3-1},
  url = {https://doc.cgal.org/5.0.2/Manual/packages.html#PkgVoronoiDiagram2}
}

% CGAL module variant with explicit version (for demonstration)
@softwaremodule {cgal:module-with-version,
  crossref = {cgal:5-0-2},
  author = {Sylvain Pion},
  subtitle = {{3D} Convex Hull},
  version = {4.0},
  license = {LGPL},
  url = {https://doc.cgal.org/5.0.2/Manual/packages.html#PkgConvexHull3}
}

% CGAL module variant with different author (for demonstration)
@softwaremodule {cgal:module-diff-author,
  crossref = {cgal:5-0-2},
  author = {Andreas Fabri},
  subtitle = {{2D} Arrangements},
  license = {GPL},
  url = {https://doc.cgal.org/5.0.2/Manual/packages.html#PkgArrangement2}
}

% CGAL fragment from module (for 4-level chain demonstration)
@codefragment {cgal:voronoi-fragment,
  crossref = {cgal:lp-gi-20a},
  subtitle = {Print Endpoint},
  swhid = {swh:1:cnt:8451c216bded7e6769381cb49c5ebc1c7ca3f274;
     origin=https://github.com/CGAL/cgal;
     visit=swh:1:snp:b9276dcc8c0657480579375e334e4c59bc2d81ad;
     anchor=swh:1:rel:636541bbf6c77863908eae744610a3d91fa58855;
     path=/Voronoi_diagram_2/examples/Voronoi_diagram_2/vd_2_point_location.cpp;
     lines=30-39}
}

% ============================================================================
% SECTION 3: Fragment Inheritance Examples
% ============================================================================
% Using real-world Parmap example from biblio.bib

% Parmap base software (real entry)
@software {parmap,
  title = {The Parmap library},
  author = {Di Cosmo, Roberto and Marco Danelutto},
  date = {2012},
  institution = {{Inria} and {University of Paris} and {University of Pisa}},
  license = {LGPL-2.0},
  url = {https://rdicosmo.github.io/parmap/},
  repository = {https://github.com/rdicosmo/parmap}
}

% Parmap version (real entry)
@softwareversion {parmap-1.1.1,
  crossref = {parmap},
  date = {2020},
  version = {1.1.1},
  swhid = {swh:1:rel:373e2604d96de4ab1d505190b654c5c4045db773;
     origin=https://github.com/rdicosmo/parmap;
     visit=swh:1:snp:2a6c348c53eb77d458f24c9cbcecaf92e3c45615}
}

% Parmap code fragment (real entry) - fragment from version
@codefragment {simplemapper,
  crossref = {parmap-1.1.1},
  subtitle = {Core mapping routine},
  swhid = {swh:1:cnt:43a6b232768017b03da934ba22d9cc3f2726a6c5;
     origin=https://github.com/rdicosmo/parmap;
     visit=swh:1:snp:2a6c348c53eb77d458f24c9cbcecaf92e3c45615;
     anchor=swh:1:rel:373e2604d96de4ab1d505190b654c5c4045db773;
     path=/src/parmap.ml;
     lines=192-228}
}

% Parmap module (variant) - enables 4-level chain demonstration
@softwaremodule {parmap-module-core,
  crossref = {parmap-1.1.1},
  author = {Di Cosmo, Roberto},
  subtitle = {Parallel mapping core},
  url = {https://github.com/rdicosmo/parmap/tree/v1.1.1/src/core}
}

% Parmap fragment from module (variant) - demonstrates 4-level chain
@codefragment {parmap-fragment-from-module,
  crossref = {parmap-module-core},
  subtitle = {Work distribution algorithm},
  swhid = {swh:1:cnt:example9876543210fedcba9876543210fedcba98765432;
     origin=https://github.com/rdicosmo/parmap;
     visit=swh:1:snp:2a6c348c53eb77d458f24c9cbcecaf92e3c45615;
     anchor=swh:1:rel:373e2604d96de4ab1d505190b654c5c4045db773;
     path=/src/core/distribution.ml;
     lines=45-78}
}

% ============================================================================
% SECTION 4: Multi-level Inheritance Examples
% ============================================================================
% Multi-level chains use real-world examples defined above:
% - 3-level: cgal → cgal:5-0-2 → cgal:lp-gi-20a (defined in Section 2)
% - 4-level: parmap → parmap-1.1.1 → parmap-module-core → parmap-fragment-from-module (defined in Section 3)
% No additional entries needed for multi-level examples

% ============================================================================
% SECTION 5: Edge Cases and Special Scenarios
% ============================================================================
% These synthetic examples are kept for pedagogical demonstration of edge cases
% that may not exist in real-world data

% Example with editor field
@software {showcase-with-editor,
  title = {Edited Software},
  author = {Author, Main},
  editor = {Editor, Chief},
  date = {2021},
  institution = {Publishing House}
}

@softwareversion {showcase-editor-same,
  crossref = {showcase-with-editor},
  version = {1.0}
}

@softwareversion {showcase-editor-diff,
  crossref = {showcase-with-editor},
  version = {1.1},
  editor = {Editor, Different}
}

% Example with date precision differences
@software {showcase-date-base,
  title = {Date Test Software},
  author = {Tester, Date},
  date = {2020},
  institution = {Test Lab}
}

@softwareversion {showcase-date-year-month,
  crossref = {showcase-date-base},
  version = {1.0.1},
  date = {2020-06}
}

@softwareversion {showcase-date-full,
  crossref = {showcase-date-base},
  version = {1.0.2},
  date = {2020-06-15}
}

% Example with multiple authors
@software {showcase-multi-author,
  title = {Collaborative Software},
  author = {First, Author and Second, Author and Third, Author},
  date = {2021},
  institution = {Collaboration Inc}
}

@softwareversion {showcase-multi-author-version,
  crossref = {showcase-multi-author},
  version = {2.0},
  author = {First, Author and Second, Author and Third, Author and Fourth, Author}
}

