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

Order of options not respected #3

Open
gregg0 opened this issue Mar 9, 2016 · 2 comments
Open

Order of options not respected #3

gregg0 opened this issue Mar 9, 2016 · 2 comments

Comments

@gregg0
Copy link
Contributor

gregg0 commented Mar 9, 2016

In Section 4.4, of the ACE manual, we state that due to the non-orthogonality of options it is important to preserve the order in which options are put to ACE. This was a working feature in 2008 with GAP 4.4.12,
but in 2012, with GAP 4.5.4 it was not. Generally, the order options are put to ACE makes little difference, but the example in Appendix C.1, extending to:

ACECosetTableFromGensAndRels(fgens, [], [] : max := 12, start, print := -12, incomplete);

fails to work as shown in the manual without 'start' being put to the ACE binary after the 'max' option.
Omitting 'start' in the list of options restores the behaviour in the manual, since a feature of the GAP interface is that if 'start' is omitted it is inserted, and fortunately this happens after the 'max' option has been put to ACE.

@fingolfin
Copy link
Member

So the only way I can think of to resolve this is to specify options as a list, not a record. Something like this:

ACECosetTableFromGensAndRels(fgens, [], [] : options := [["max", 12], ["start"], ["print", -12], ["incomplete"]]);

or perhaps this:

ACECosetTableFromGensAndRels(fgens, [], [] : options := [["max", 12], "start", ["print", -12], "incomplete"]);

The name "options" is of course just an example, something else could be used.

And of course we must keep accepting the current options! So what we'd do is, we'd first look at the options option; if given, we use it first to set options. Then we iterate over all the other options given in "old-style" and append them. Then we could also do the following, which would be guaranteed to pass max before start.

ACECosetTableFromGensAndRels(fgens, [], [] : options := [["max", 12]], start, print := -12, incomplete); 

Perhaps early_options or initial_options would be good alternative names for options?

@gregg0
Copy link
Contributor Author

gregg0 commented Feb 11, 2020 via email

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

No branches or pull requests

2 participants