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

Add ShowUsedInfoClasses #3379

Closed
ChrisJefferson opened this issue Mar 25, 2019 · 6 comments · Fixed by #3387
Closed

Add ShowUsedInfoClasses #3379

ChrisJefferson opened this issue Mar 25, 2019 · 6 comments · Fixed by #3387
Labels
gapdays2019-spring Issues and PRs that arose at https://www.gapdays.de/gapdays2019-spring kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements

Comments

@ChrisJefferson
Copy link
Contributor

This was suggested at GAP Days in Halle , and I think it's a good idea to find out what Info levels exist, and which algorithms they will are used in. I thought I'd suggest it before I wrote it, just in case anyone had any deep opinions. In an experiment, here is the suggested documentation :)

ShowUsedInfoClasses( bool )

Called with argument 'true', ShowUsedInfoClasses makes GAP print the InfoClass and level of any executed Info statement. Calling ShowUsedInfoClasses with the argument 'false' stops this information being printed.

Each level of each InfoClass is only printed once. The list of printed InfoClasses and levels is reset by calling ShowUsedInfoClasses(true).

@ChrisJefferson ChrisJefferson added the kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements label Mar 25, 2019
@fingolfin
Copy link
Member

I am not sure I understand; in which setting would this be useful? Is the idea that one wants to figure out which InfoClasses might affect a certain command, so then before running the command, one would do ShowUsedInfoClasses(true);, then execute the command, and watch the InfoClasses being printed?

I feel this kind of information should be part of the documentation, and perhaps even a brief example (could be fake).

@ChrisJefferson
Copy link
Contributor Author

ChrisJefferson commented Mar 25, 2019

Good plan. Add to end of documentation:

This can be used to find the Info classes which are considered when running any pieces of GAP code.

gap> ShowUsedInfoClasses(true);
gap> Intersection(MathieuGroup(23), MathieuGroup(23)^(1,2));;
#I Would print Info with SetInfoLevel(InfoBckt, 2)
#I Would print Info with SetInfoLevel(InfoBckt, 1)
#I Would print Info with SetInfoLevel(InfoGroup, 1)
#I Would print Info with SetInfoLevel(InfoPermGroup, 1)
#I Would print Info with SetInfoLevel(InfoPermGroup, 1)
#I Would print Info with SetInfoLevel(InfoPerformance, 2)
gap> ShowUsedInfoClasses(false);

@wilfwilson
Copy link
Member

I take it that the actual info statements will still get printed, too? (of course, only those with a low enough level).

@wilfwilson wilfwilson added the gapdays2019-spring Issues and PRs that arose at https://www.gapdays.de/gapdays2019-spring label Mar 26, 2019
@ChrisJefferson
Copy link
Contributor Author

Yes, this won't effect the outputting of Info statements, just let you know what could have been printed.

@olexandr-konovalov
Copy link
Member

It would require to implement some bookkeeping, but could make the output less verbose: do not repeat same combinations of the class and level, they will not add anything new. The example above has this line twice

#I Would print Info with SetInfoLevel(InfoPermGroup, 1)

while one line would suffice.

@ChrisJefferson
Copy link
Contributor Author

Woops, that was a cut+paste mistake, I haven't actually written the code yet, and meant to have no repeats :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gapdays2019-spring Issues and PRs that arose at https://www.gapdays.de/gapdays2019-spring kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants