Skip to content

♻️ Refactor FoMaC classes#1849

Draft
MatthiasReumann wants to merge 11 commits into
mainfrom
enh/refactor-fomac
Draft

♻️ Refactor FoMaC classes#1849
MatthiasReumann wants to merge 11 commits into
mainfrom
enh/refactor-fomac

Conversation

@MatthiasReumann

@MatthiasReumann MatthiasReumann commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Description

Proposed FoMaC rewrite:

  • Use unique_ptr instead of custom destructor, copy, and move semantics.
  • Remove trailing return types as the return type does not depend on the arguments.
  • Remove "Tokens". Use private constructors and friendship semantics.
  • Consistency improvements (std::size_t vs size_t, etc.)

Checklist

  • The pull request only contains commits that are focused and relevant to this change.
  • I have added appropriate tests that cover the new/changed functionality.
  • I have updated the documentation to reflect these changes.
  • I have added entries to the changelog for any noteworthy additions, changes, fixes, or removals.
  • I have added migration instructions to the upgrade guide (if needed).
  • The changes follow the project's style guidelines and introduce no new warnings.
  • The changes are fully tested and pass the CI checks.
  • I have reviewed my own code changes.

If PR contains AI-assisted content:

  • I have disclosed the use of AI tools in the PR description as per our AI Usage Guidelines.
  • AI-assisted commits include an Assisted-by: [Model Name] via [Tool Name] footer.
  • I confirm that I have personally reviewed and understood all AI-generated content, and accept full responsibility for it.

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-tidy (v22.1.8) reports: 1 concern(s)
  • src/na/fomac/Device.cpp:578:1: warning: [cppcoreguidelines-pro-type-member-init]

    constructor does not initialize these bases: Device

      578 | Session::Device::Device(const fomac::Device& device)
          | ^
      579 |     : fomac::Device(device), na::Device{} {}
          |       Device(),

Have any feedback or feature suggestions? Share it here.

@codecov

codecov Bot commented Jul 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.83333% with 9 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
include/mqt-core/fomac/FoMaC.hpp 93.5% 7 Missing ⚠️
src/fomac/FoMaC.cpp 97.9% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@MatthiasReumann MatthiasReumann mentioned this pull request Jul 3, 2026
11 tasks
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.

1 participant