PROBPATH: Difference between revisions

(Created page with '{{DISPLAYTITLE:The ProB Search Path}} Starting with version 1.5 of ProB, how the parser resolves files references from machines can be customized. By default ProB will try to f…')
 
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{DISPLAYTITLE:The ProB Search Path}}
{{DISPLAYTITLE:The ProB Search Path}}


Starting with version 1.5 of ProB, how the parser resolves files references from machines can be customized.
Starting with version 1.5 of ProB, it is possible to customize where the parser will ProB will search for referenced files.


By default ProB will try to find files referenced from a machine (using SEES, INCLUDES, DEFINITON-files, etc) resolving paths as releative to the current machine or within the ProB standard library.
By default ProB will try to find files referenced from a machine (using SEES, INCLUDES, DEFINITON-files, etc) resolving paths as relative to the current machine or within the ProB standard library.


Commonly used files can be placed in a shared location, e.g. in the standard library (the stdlib directory in the ProB distribution) or a custom location.
Commonly used files can be placed in a shared location, e.g. in the standard library (the stdlib directory in the ProB distribution) or any custom location.


The search path can be extended by defining a PROBPATH environment variable that contains a “:” separated list of directories to be searched, e.g.:
The search path can be customized by defining a PROBPATH environment variable that contains a list of directories to be searched. On windows the directors are separated by a ";" and on unix systems by a ":" character, e.g.:
 
On unix:  


  PROBPATH=~/myproject/common:~/myotherproject/common probcli model.mch
  PROBPATH=~/myproject/common:~/myotherproject/common probcli model.mch
And on windows:
  PROBPATH=~/myproject/common;~/myotherproject/common probcli model.mch
will resolved referenced files relative to model.mch, then in ~/myproject/common then in ~/myotherproject/common and finally in the standard library of ProB, stopping as soon as a file with the name being looked up is found.
will resolved referenced files relative to model.mch, then in '''~/myproject/common''' then in '''~/myotherproject/common''' and finally in the standard library of ProB, stopping as soon as a file with the name being looked up is found.

Latest revision as of 13:48, 15 March 2017


Starting with version 1.5 of ProB, it is possible to customize where the parser will ProB will search for referenced files.

By default ProB will try to find files referenced from a machine (using SEES, INCLUDES, DEFINITON-files, etc) resolving paths as relative to the current machine or within the ProB standard library.

Commonly used files can be placed in a shared location, e.g. in the standard library (the stdlib directory in the ProB distribution) or any custom location.

The search path can be customized by defining a PROBPATH environment variable that contains a list of directories to be searched. On windows the directors are separated by a ";" and on unix systems by a ":" character, e.g.:

On unix:

PROBPATH=~/myproject/common:~/myotherproject/common probcli model.mch

And on windows:

 PROBPATH=~/myproject/common;~/myotherproject/common probcli model.mch

will resolved referenced files relative to model.mch, then in ~/myproject/common then in ~/myotherproject/common and finally in the standard library of ProB, stopping as soon as a file with the name being looked up is found.