Skip to content

CAP: Avoid duplicate methods for primitive replacements - #1868

Merged
mohamed-barakat merged 1 commit into
homalg-project:masterfrom
kamalsaleh:duplicate_primitive_op
Jul 31, 2026
Merged

CAP: Avoid duplicate methods for primitive replacements#1868
mohamed-barakat merged 1 commit into
homalg-project:masterfrom
kamalsaleh:duplicate_primitive_op

Conversation

@kamalsaleh

@kamalsaleh kamalsaleh commented Jul 30, 2026

Copy link
Copy Markdown
Member

When a primitive CAP operation is replaced by another primitive
implementation, update the category operation record without installing
another method with identical filters.

Installed dispatch methods now consult the current operation record, so
the latest implementation is used while preserving the added_functions
history. This avoids Julia method-overwrite errors during module
precompilation.

Add CapOperationInstallationInfo and emit a level-1 message when an
accepted primitive installation replaces another primitive
implementation. Include the operation, category, and old and new weights.

CompilerForCAP previously used the number of accepted Add-functions as
the expected number of installed GAP methods. These counts can differ
depending on whether implementations are primitive, derived, final
derived, or precompiled derived. In particular, replacing one primitive
implementation with another changes the function used by the existing
GAP method without installing a new method. Track the actual number of
methods installed by CAP per operation and use it when checking for
manually installed competing methods.

Bump CAP to v2026.07-04 and CompilerForCAP to v2026.07-01.

When a primitive CAP operation is replaced by another primitive
implementation, update the category operation record without installing
another method with identical filters.

Installed dispatch methods now consult the current operation record, so
the latest implementation is used while preserving the added_functions
history. This avoids Julia method-overwrite errors during module
precompilation.

Add CapOperationInstallationInfo and emit a level-1 message when an
accepted primitive installation replaces another primitive
implementation. Include the operation, category, and old and new weights.

CompilerForCAP previously used the number of accepted Add-functions as
the expected number of installed GAP methods. These counts can differ
depending on whether implementations are primitive, derived, final
derived, or precompiled derived. In particular, replacing one primitive
implementation with another changes the function used by the existing
GAP method without installing a new method. Track the actual number of
methods installed by CAP per operation and use it when checking for
manually installed competing methods.

Bump CAP to v2026.07-04 and CompilerForCAP to v2026.07-01.
@kamalsaleh
kamalsaleh force-pushed the duplicate_primitive_op branch from 3b57adc to df70a6a Compare July 30, 2026 22:22
@codecov

codecov Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 86.95652% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.76%. Comparing base (3f8578a) to head (df70a6a).

Files with missing lines Patch % Lines
CAP/gap/InstallAdds.gi 82.35% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1868   +/-   ##
=======================================
  Coverage   80.76%   80.76%           
=======================================
  Files         589      589           
  Lines       86304    86321   +17     
=======================================
+ Hits        69706    69721   +15     
- Misses      16598    16600    +2     
Flag Coverage Δ
ActionsForCAP 64.04% <ø> (ø)
AdditiveClosuresForCAP 80.70% <ø> (+0.01%) ⬆️
AttributeCategoryForCAP 90.45% <ø> (ø)
CAP 86.37% <85.00%> (-0.01%) ⬇️
CartesianCategories 84.25% <ø> (ø)
CompilerForCAP 95.39% <100.00%> (ø)
ComplexesAndFilteredObjectsForCAP 73.56% <ø> (ø)
FreydCategoriesForCAP 83.16% <ø> (ø)
GeneralizedMorphismsForCAP 61.73% <ø> (ø)
GradedModulePresentationsForCAP 44.78% <ø> (ø)
GroupRepresentationsForCAP 73.85% <ø> (ø)
GroupsAsCategoriesForCAP 90.90% <ø> (ø)
HomologicalAlgebraForCAP 73.21% <ø> (ø)
InternalExteriorAlgebraForCAP 93.09% <ø> (ø)
LinearAlgebraForCAP 56.00% <ø> (ø)
LinearClosuresForCAP 36.36% <ø> (ø)
ModulePresentationsForCAP 75.05% <ø> (ø)
ModulesOverLocalRingsForCAP 90.70% <ø> (ø)
MonoidalCategories 90.14% <ø> (ø)
ToricSheaves 21.79% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kamalsaleh
kamalsaleh marked this pull request as ready for review July 31, 2026 09:32
@mohamed-barakat
mohamed-barakat merged commit 9e62bd3 into homalg-project:master Jul 31, 2026
18 checks passed
@kamalsaleh
kamalsaleh deleted the duplicate_primitive_op branch July 31, 2026 09:33
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.

2 participants