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

Using LEO-III as library and calling it repeatedly with different arguments leads to the changed arguments being ignored later calls #75

Open
ColinRothgang opened this issue Sep 20, 2023 · 1 comment
Assignees

Comments

@ColinRothgang
Copy link

I'm currently testing a hammer tool (for MMT implemented here) that uses LEO-III as a library. As long as LEO-III is only used on one problem at a time this works without problems.
However, when LEO-III's main method is called repeatedly with different (problem file path) arguments the main method seems to ignore the different arguments starting with the second call and uses the same arguments as in the first call to LEO-III.

I think this error originates from the way Configuration objects are initialized in LEO-III.

Concretely, I think the bug is here
There the Configuration object is initialized from the arguments (given to the main method), whenever it isn't already initialized.
However, when LEO-III is repeatedly called the Configuration object is initialized after the first call, meaning that the arguments passed starting with the second call to the main method will be ignored.

I understand that using LEO-III as a library is not the originally intended use case, nevertheless I think it would be worth it to change the initialization code to support repeated library calls to LEO-III as well.

@ColinRothgang ColinRothgang changed the title Using LEO-III as library and running it repeatedly with different arguments Using LEO-III as library and calling it repeatedly with different arguments leads to the changed arguments being ignored later calls Sep 20, 2023
@lex-lex
Copy link
Member

lex-lex commented Sep 25, 2023

Hi Colin, thanks for the pointer. Indeed, this is a known issue (to me) -- just as you said: Leo-III wasn't designed to be called via API but rather as a stand-alone executable. Looking back, this was not a smart decision :-)

I will have a look if some relatively simple changes could do the trick.

Best, Alex

@lex-lex lex-lex self-assigned this Sep 25, 2023
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