Skip to content

🚚 Restructuring include/fiction#665

Open
wlambooy wants to merge 8 commits intomainfrom
sidb-folder-restructure
Open

🚚 Restructuring include/fiction#665
wlambooy wants to merge 8 commits intomainfrom
sidb-folder-restructure

Conversation

@wlambooy
Copy link
Collaborator

@wlambooy wlambooy commented Feb 12, 2025

Description

This PR aims to restructure the simulation/sidb folder to something nicer. Currently in draft status---thoughts about, or direct changes to the proposal are welcome though.

Checklist:

  • The pull request only contains commits that are related to it.
  • I have added appropriate tests and documentation.
  • I have added a changelog entry.
  • I have created/adjusted the Python bindings for any new or updated functionality.
  • I have made sure that all CI jobs on GitHub pass.
  • The pull request introduces no new warnings and follows the project's style guidelines.

Summary by CodeRabbit

  • New Features
    • No user-facing changes.
  • Refactor
    • Reorganized header include paths under core/general namespaces; no API or behavior changes.
  • Documentation
    • Corrected internal docstring references for Python bindings.
  • Style
    • Minor formatting adjustment in build configuration.
  • Chores
    • Updated third-party submodules: Catch2, JSON, parallel-hashmap, pybind11, and tinyxml2.
    • Switched version info template source path without changing output.
    • Updated internal includes for technology and layout modules to new locations.

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@wlambooy wlambooy changed the title 🚚 Restructuring the simulation/sidb folder 🚚 Restructuring _fiction_ Aug 11, 2025
@wlambooy wlambooy changed the title 🚚 Restructuring _fiction_ 🚚 Restructuring *fiction* Aug 11, 2025
@wlambooy wlambooy changed the title 🚚 Restructuring *fiction* 🚚 Restructuring fiction Aug 11, 2025
@wlambooy wlambooy changed the title 🚚 Restructuring fiction 🚚 Restructuring include/fiction Aug 11, 2025
@wlambooy
Copy link
Collaborator Author

@marcelwa maybe you can rename the branch to folder-restructure

@wlambooy wlambooy marked this pull request as ready for review August 11, 2025 12:48
@wlambooy wlambooy requested a review from marcelwa August 11, 2025 12:48
@marcelwa
Copy link
Collaborator

marcelwa commented Aug 11, 2025

@marcelwa maybe you can rename the branch to folder-restructure

I'd rather not do that because that would automatically close this PR. Additionally, you'd have to manually update your local branch settings to fix the upstream. Let's keep the name.

Since this branch is now 134 commits behind main with many conflicts to be resolved, you might want to think about closing it altogether and starting fresh.

@wlambooy
Copy link
Collaborator Author

@marcelwa maybe you can rename the branch to folder-restructure

I'd rather not do that because that would automatically close this PR. Additionally, you'd have to manually update your local branch settings to fix the upstream. Let's keep the name.

Since this branch is now 134 commits behind main with many conflicts to be resolved, you might want to think about closing it altogether and starting fresh.

I reckoned doing all the file migrations again would take longer than a simple merge with main. So I'm continuing on this PR.

Copy link
Collaborator

@marcelwa marcelwa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @wlambooy 👋 Many thanks for starting on this big restructuring effort. Here is the first batch of comments.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have a good place for this folder yet 🤔 It doesn't seem to belong here, though. Its containing functions can judge certain quality metrics (costs) of networks and layouts. These are definitely not utils either.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any suggestion is welcome

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

physical_design/properties? I do think properties is a good folder name. And I guess that the properties are from the results of applying a physical design algorithm. Do you prefer physical_design/stat instead?

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 2, 2025

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

💤 Files selected but had no reviewable changes (3)
  • include/fiction/physical_design/holistic/utils/aspect_ratio_iterator.hpp
  • include/fiction/verification/analysis/sidb/engines/quickexact_dependencies/gray_code_iterator.hpp
  • include/fiction/verification/analysis/sidb/utils/bdl_input_iterator.hpp

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

Project-wide path refactors update include directives to new directories (core layouts, utils/general, technology/sidb). One configure_file input path is changed. Root CMake formatting is adjusted. Python binding docstrings are corrected. Several third-party submodules are advanced to new commits. No functional or API changes are introduced.

Changes

Cohort / File(s) Summary
Build system
CMakeLists.txt, include/CMakeLists.txt
Indentation tweak in project VERSION line; changed configure_file input from include/fiction/utils/version_info.hpp.in to include/fiction/utils/general/version_info.hpp.in while keeping output path.
Layouts include path refactor
include/fiction/core/layouts/cartesian_layout.hpp, .../cell_level_layout.hpp, .../clocked_layout.hpp, .../clocking_scheme.hpp, .../coordinates.hpp, .../gate_level_layout.hpp, .../hexagonal_layout.hpp, .../shifted_cartesian_layout.hpp
Updated includes to new locations: fiction/core/layouts/*, fiction/utils/general/range.hpp, fiction/utils/math/math_utils.hpp, and updated verification/util network includes. No logic changes.
Technology, traits, and types include path refactor
include/fiction/technology/cell_ports.hpp, include/fiction/technology/sidb/sidb_nm_distance.hpp, include/fiction/traits.hpp, include/fiction/types.hpp
Switched includes to utils/general/hash.hpp, technology/sidb/*, core/layouts/*, and core/networks/*. No API or logic modifications.
Bindings docstrings
bindings/mnt/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp
Corrected internal docstring identifiers from .../layouts/coordinates.hpp to .../core/layouts/coordinates.hpp. Textual-only.
Submodule updates
libs/Catch2, libs/json, libs/parallel-hashmap, libs/pybind11, libs/tinyxml2
Advanced submodule commit pointers to newer revisions; no direct code changes in this repo.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

tooling

Suggested reviewers

  • marcelwa

Poem

I hop between include paths, neat and new,
From layouts to core, a tidy view.
Submodules nudge to fresher leaves,
Docstrings fixed—no tangled weaves.
Thump-thump! my paws applaud the trail—
Headers aligned, no logic to derail. 🐇✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The description provides a basic summary of the change but omits several required elements from the template, including the issue reference under “Fixes #”, any listed dependencies, and more detailed motivation and context for the restructuring. Please update the description to include which issue is fixed (using “Fixes #…”), list any dependencies introduced by this change, and expand on the motivation and context behind the proposed restructuring.
✅ Passed checks (2 passed)
Check name Status Explanation
Title Check ✅ Passed The title succinctly reflects the primary change, which is restructuring the include/fiction directory, and accurately matches the modifications in the diff; it is clear and specific about the main intent of the pull request.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 41aa16b and 72a54c3.

📒 Files selected for processing (20)
  • CMakeLists.txt (1 hunks)
  • bindings/mnt/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp (1 hunks)
  • include/CMakeLists.txt (1 hunks)
  • include/fiction/core/layouts/cartesian_layout.hpp (1 hunks)
  • include/fiction/core/layouts/cell_level_layout.hpp (1 hunks)
  • include/fiction/core/layouts/clocked_layout.hpp (1 hunks)
  • include/fiction/core/layouts/clocking_scheme.hpp (1 hunks)
  • include/fiction/core/layouts/coordinates.hpp (1 hunks)
  • include/fiction/core/layouts/gate_level_layout.hpp (1 hunks)
  • include/fiction/core/layouts/hexagonal_layout.hpp (1 hunks)
  • include/fiction/core/layouts/shifted_cartesian_layout.hpp (1 hunks)
  • include/fiction/technology/cell_ports.hpp (1 hunks)
  • include/fiction/technology/sidb/sidb_nm_distance.hpp (1 hunks)
  • include/fiction/traits.hpp (1 hunks)
  • include/fiction/types.hpp (1 hunks)
  • libs/Catch2 (1 hunks)
  • libs/json (1 hunks)
  • libs/parallel-hashmap (1 hunks)
  • libs/pybind11 (1 hunks)
  • libs/tinyxml2 (1 hunks)
🧰 Additional context used
🧬 Code graph analysis (4)
include/fiction/traits.hpp (4)
include/fiction/technology/charge_distribution_surface.hpp (2)
  • params (503-514)
  • c (2164-2185)
include/fiction/utils/layout_utils.hpp (1)
  • convert_layout_to_siqad_coordinates (305-386)
include/fiction/algorithms/simulation/sidb/quickexact.hpp (1)
  • ON (25-578)
include/fiction/io/read_sqd_layout.hpp (1)
  • defect (361-417)
include/fiction/types.hpp (2)
include/fiction/technology/cell_technologies.hpp (1)
  • EMPTY (10-384)
include/fiction/technology/charge_distribution_surface.hpp (1)
  • params (503-514)
include/fiction/core/layouts/coordinates.hpp (1)
include/fiction/utils/math_utils.hpp (2)
  • nodiscard (18-198)
  • nodiscard (44-55)
include/fiction/technology/sidb/sidb_nm_distance.hpp (1)
include/fiction/technology/sidb_on_the_fly_gate_library.hpp (3)
  • sidb_on_the_fly_gate_library (146-1520)
  • nodiscard (811-838)
  • nodiscard (810-838)
🔇 Additional comments (15)
libs/tinyxml2 (1)

1-1: Submodule bump ack

The tinyxml2 submodule pointer update is noted; no concerns from my side.

CMakeLists.txt (1)

21-21: LGTM!

The indentation adjustment improves formatting consistency without any functional impact.

include/fiction/core/layouts/hexagonal_layout.hpp (1)

8-9: Include path updates look correct.

The updated paths align with the broader reorganization moving headers into core/layouts/ and utils/general/ subdirectories. No functional changes introduced.

include/fiction/technology/sidb/sidb_nm_distance.hpp (1)

8-8: Include path update aligns with SiDB reorganization.

The updated path correctly places sidb_nm_position.hpp under the technology/sidb/ subdirectory, consistent with the PR's goal of restructuring the SiDB-related headers.

include/fiction/technology/cell_ports.hpp (1)

8-8: LGTM!

The include path update correctly reflects the reorganization of utility headers under fiction/utils/general/.

include/CMakeLists.txt (1)

18-18: LGTM!

The configure_file input path correctly reflects the relocation of version_info.hpp.in under fiction/utils/general/.

include/fiction/types.hpp (1)

8-22: LGTM!

The include path updates correctly reflect the reorganization of core layout headers under fiction/core/layouts/, network headers under fiction/core/networks/, and SiDB-specific headers under fiction/technology/sidb/. No functional or API changes are introduced.

include/fiction/traits.hpp (1)

8-15: LGTM!

The include path updates correctly reflect the reorganization of coordinate and layout headers under fiction/core/layouts/ and SiDB-specific headers under fiction/technology/sidb/. No functional changes are introduced.

bindings/mnt/pyfiction/include/pyfiction/pybind11_mkdoc_docstrings.hpp (1)

23234-23236: Docstring path update looks correct.

The injected core segment matches the new header location under fiction/core/layouts. 👍

include/fiction/core/layouts/clocking_scheme.hpp (1)

8-8: LGTM!

The include path update to fiction/core/layouts/coordinates.hpp is consistent with the broader header reorganization moving layout-related headers under core/layouts.

include/fiction/core/layouts/shifted_cartesian_layout.hpp (1)

8-9: LGTM!

Both include path updates are consistent with the header reorganization, moving layout-related headers to fiction/core/layouts/.

include/fiction/core/layouts/cell_level_layout.hpp (1)

8-8: LGTM!

The include path update to fiction/core/layouts/clocking_scheme.hpp aligns with the broader reorganization moving clocking scheme headers under core/layouts.

include/fiction/core/layouts/clocked_layout.hpp (1)

8-8: LGTM!

The include path update to fiction/core/layouts/clocking_scheme.hpp is consistent with the project-wide header reorganization.

include/fiction/core/layouts/cartesian_layout.hpp (1)

8-9: LGTM!

Both include path updates are consistent with the header reorganization:

  • coordinates.hpp moved to fiction/core/layouts/
  • range.hpp moved to fiction/utils/general/
include/fiction/core/layouts/gate_level_layout.hpp (1)

8-12: LGTM!

All four include path updates are consistent with the header reorganization:

  • clocking_scheme.hpp moved to fiction/core/layouts/
  • range.hpp moved to fiction/utils/general/
  • mockturtle_utils.hpp moved to fiction/utils/network/
  • design_rule_violations.hpp moved to fiction/verification/

@wlambooy
Copy link
Collaborator Author

wlambooy commented Oct 2, 2025

Hi @marcelwa , I've implemented your suggestions. In particular, I've noticed now that physical_design/placement is left with an awkward on_the_fly_sidb_circuit_designer.hpp left standing alone (next to a singleton utils folder). I guess the aesthetician in me would like to see a nice spread in the placement and the routing subfolders, but I suppose the ones in there you mentioned (e.g., exact.hpp) don't just place. However, apply_gate_library.hpp does just place. Perhaps it belongs there all along?

@wlambooy
Copy link
Collaborator Author

wlambooy commented Oct 2, 2025

One thing that still feels awkward to me is the placement of analysis within the verification folder, whereas technology/sidb has a design subfolder. As you know, the analysis functions (simulators, etc) are used in the design functions, whereas the verification/analysis seems to suggest that these analysis are to be carried out after making designs...

@wlambooy wlambooy requested a review from marcelwa October 2, 2025 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants