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 TLA_PATH environment variable to load modules from #490

Open
konnov opened this issue Jul 22, 2020 · 7 comments
Open

Add TLA_PATH environment variable to load modules from #490

konnov opened this issue Jul 22, 2020 · 7 comments
Labels
enhancement Lets change things for the better Tools The command line tools - TLC, SANY, ...
Milestone

Comments

@konnov
Copy link

konnov commented Jul 22, 2020

Run TLC with -DTLA-Library=/path/to/lib/archive or add the library archive to the Toolbox (File > Preferences > TLA+ Preferences > TLA+ library path locations).

It would be great to have a standard environment variable, e.g., called TLA_PATH. Similar to PATH, PYTHON_PATH, JAVA_LIBRARY_PATH, etc., it would list directories, from which the TLA+ tools would pull the library modules.

@lemmy lemmy transferred this issue from tlaplus/CommunityModules Jul 22, 2020
@lemmy lemmy added enhancement Lets change things for the better Tools The command line tools - TLC, SANY, ... labels Jul 22, 2020
@lemmy
Copy link
Member

lemmy commented Jul 22, 2020

Does @informalsystems have the resources to provide a pull request?

@konnov
Copy link
Author

konnov commented Jul 22, 2020

In principle, yes, but I am not sure about the whereabouts of the file reading operations in the SANY parser.

@lemmy
Copy link
Member

lemmy commented Jul 22, 2020

util.FilenameToStream and its subclasses such as util.SimpleFilenameToStream

Since TLA_PATH is an alternative to "TLA-Library", it should work for SANY and the other tools such as TLC.

@konnov
Copy link
Author

konnov commented Jul 22, 2020

Thanks! I will have a look.

@lemmy lemmy changed the title An environment variable for the standard modules? Add TLA_PATH environment variable to load modules from Jul 23, 2020
konnov added a commit to konnov/tlaplus that referenced this issue Jul 28, 2020
@lemmy lemmy added this to the 1.7.1 milestone Aug 10, 2020
@lemmy
Copy link
Member

lemmy commented Sep 17, 2020

@konnov Are you still pushing this?

@konnov
Copy link
Author

konnov commented Sep 17, 2020

Not really. I was stuck at how Eclipse handles filenames. So I guess the related PR #493 needs some expertise in Eclipse.

@ahelwer
Copy link
Contributor

ahelwer commented Sep 27, 2020

@lemmy what do you think about also adding this as a TLC command line option? You can define additional directories to search for TLA files when running TLC. This would also help when outputting TE specs to a subdirectory; you can switch working directory to that subdirectory, then run TLC on the TE spec while asking TLC to look for the original spec in the parent directory via a command line option. This is also nice because running TLC on a spec identified by absolute path (rather than in current working directory) does not seem to be currently supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Lets change things for the better Tools The command line tools - TLC, SANY, ...
Development

No branches or pull requests

3 participants