Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ShallowCopy for KnuthBendixRewritingSystem #3128

Merged
merged 2 commits into from
Jan 7, 2019

Conversation

ChrisJefferson
Copy link
Contributor

Fixes #3108

If anyone wants to write some more tests, both with and without ShallowCopying, that would be good, as this is not an area I'm expert in and no-one has touched it in quite a long time.

@markuspf
Copy link
Member

I'll push some tests this afternoon.

@codecov
Copy link

codecov bot commented Dec 20, 2018

Codecov Report

Merging #3128 into master will increase coverage by 0.01%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #3128      +/-   ##
==========================================
+ Coverage   83.58%    83.6%   +0.01%     
==========================================
  Files         687      687              
  Lines      336919   336920       +1     
==========================================
+ Hits       281619   281673      +54     
+ Misses      55300    55247      -53
Impacted Files Coverage Δ
lib/kbsemi.gi 98.14% <100%> (+9.31%) ⬆️
lib/rwssmg.gi 87.17% <0%> (+0.64%) ⬆️
lib/orders.gi 75.67% <0%> (+2.07%) ⬆️

@markuspf markuspf added kind: bug: unexpected error Issues describing bugs in which computation unexpectedly encounters an error, and PRs fixing them release notes: to be added PRs introducing changes that should be (but have not yet been) mentioned in the release notes backport-to-4.10 labels Dec 21, 2018
lib/kbsemi.gi Show resolved Hide resolved
lib/kbsemi.gi Show resolved Hide resolved
@@ -0,0 +1,95 @@
gap> START_TEST("knuthbendix.tst");
Copy link
Member

Choose a reason for hiding this comment

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

Since this only contains tests for code in kbsemi.gi, perhaps kbsemi.tst would be the more appropriate filename?

ChrisJefferson and others added 2 commits December 21, 2018 12:19
ShallowCopy did not copy the components `freefam`, `ordering` and `tzordering`
of a KnuthBendixRewritingSystem, and hence cause an error if a rewriting system
was ShallowCopied and used afterwards.
`IsReduced` did not work for KnuthBendixRewritingSystems, because it used
`Rules` to obtain the rules of a rewriting system which are stored as
`IsLetterAssocWordRep`, and then tried reducing words using a kernel function
that assumes list access is possible for such words (which it is not).

Use TzRules instead which converts rules to lists of integers.
@fingolfin fingolfin merged commit 7587224 into gap-system:master Jan 7, 2019
@fingolfin
Copy link
Member

Backported via 5c4f835 and d213d23

@ChrisJefferson ChrisJefferson deleted the knuth branch January 20, 2019 13:24
@olexandr-konovalov olexandr-konovalov added this to the GAP 4.10.1 milestone Jan 26, 2019
@olexandr-konovalov olexandr-konovalov added release notes: added PRs introducing changes that have since been mentioned in the release notes and removed release notes: to be added PRs introducing changes that should be (but have not yet been) mentioned in the release notes labels Feb 23, 2019
@fingolfin fingolfin added the kind: bug Issues describing general bugs, and PRs fixing them label Mar 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-to-4.10-DONE kind: bug: unexpected error Issues describing bugs in which computation unexpectedly encounters an error, and PRs fixing them kind: bug Issues describing general bugs, and PRs fixing them release notes: added PRs introducing changes that have since been mentioned in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants