While there are several tools available for validating and visualizing PROV, the ProvToolbox is perhaps the most useful for validating PROV-N syntax. However, the normal releases does not run in Windows due to a operating system restriction for command line and folder path length.
We have suggested a fix, but while we wait for that, here we describe a patch build that should work on Windows. We also show how to install dependencies: Java for executing ProvToolbox, and Graphviz for visualization. (See also macOS install).
Install Java for Windows
You will need Java JRE 9 or later to run ProvToolbox 0.9.5, so below we show how to install JRE 11 LTS on Windows. Do not install from
java.com as that provides the older Java 8, which unfortunately do not work with this ProvToolbox release.
Unfortunately there are quite a few alternatives for installing Java in Windows:
Oracle provide installers of JDK 11 for Windows x64, however they are distributed under a restrictive license you or your organization may have reservations against using. These are however straight forward to install if you only want to run ProvToolbox for personal or development use.
The official open source release of OpenJDK 11 for Windows do not provide an installer, and are fairly large. If you choose to install this you will need to modify your
PATH system environment variable manually depending on where you extract the folder
Alternatively RedHat provide OpenJDK installers based on the open source JDK, we would recommend jre-220.127.116.11-x64 MSI or newer. The MSI packages are installable by double-click in newer versions of Windows. You will need to create a RedHat account to download.
Finally, AdoptOpenJDK is a community project for providing user-friendly open source builds of Java. We found option this to be the easiest to install in Windows, as they provide a MSI installer of the smaller JRE distribution, and do not require registration. However the website needs some help navigating as they provide many alternatives.
We recommend this open source option for installing Java for Windows users.
From https://adoptopenjdk.net/ select Other Platforms, giving the full list of downloads. Make sure you select:
- Version: Open JDK 11 (LTS)
- JVM: HotSpot
- Operating System: Windows
- Architecture: x64 (64-bit Windows)
- If you use 32-bit Windows, say on an older or smaller machine, try x86 instead
Download the JRE as a MSI installer (the ZIP file does not include an installer).
Before you open the MSI you may need to change the Windows Store settings to allow installing applications. From the start menu type Add or Remove Programs to open the Settings pane for Choose where to get apps. Select Anywhere.
Now double-click the MSI file from the Download folder and walk through the Installer. Enable the “Set JAVA_HOME environment variable” option.
Now open the Command Prompt window:
java -version to check you now got OpenJDK 11 installed on the PATH.
Install ProvToolbox (patched)
Now we will install ProvToolbox 0.9.5 including the suggested fix so it runs in Windows. Until this fix has been accepted, for now we’ll use the ProvToolbox 0.9.5 for Windows patch release from the fork https://github.com/stain/ProvToolbox/.
Download provconvert-0.9.5-windows.zip and, after opening, click Extract All:
Shorten the path to install the folder to your home directory, e.g.
You should now have a folder ProvToolbox in your home directory:
You should now be able to run
ProvToolbox\bin\provconvert from the Command Prompt open in your home directory:
Note that if you change the directory with
cd you will need to modify the path to provconvert. To avoid that we’ll add it to the System Environment Variable
PATH. In the Start menu, type
PATH and select Settings -> Edit the system environment variables.
Click System Environment, then under User variables select PATH and click Edit. (If not found, click New and set Variable Name as
PATH). Add a new line (or set Variable Value) where you can use Browse to navigate to find the full path of the
After applying the settings with OK you will need to close and restart the Command Prompt window. This time
provconvert -version should work from any path.
Install Graphviz for Windows
ProvToolbox can also generate visualization, but for this we need to install the open source tool Graphviz.
Following the link for downloading Stable Windows Install Packages we are unfortunately thrown into an undocumented directory browsing. We found that the cmake/Release/x64 installer worked well on 64-bit Windows (for older 32-bit Windows, try Win32).
You will need to allow the unsifned package to install
When running the install wizard for GraphViz, make sure you enable to add GraphViz to the system PATH for the current user:
Close and restart the Command Prompt Window. This time
**dot -V** (notice capital) should work:
Unfortunately the installer of GraphViz does not initialize the plugins for graphical formats. To fix this we need to open another Command Prompt, but running as Administrator:
In this window, run
**dot -c** to initialize the GraphViz plugins.
Installing Visual Studio Code
VSCode is a free and lightweight text editor which is useful for writing *.provn files. The User Installer for 64-bit Windows should work for most users.
Note: After installing VSCode you will need to Restart Windows to pick up the updated
PATH for ProvToolbox.
Running provconvert from VSCode
Remember to save PROV-N files (example) with the extension
.provn so that ProvToolbox can recognize the file type. The first time you may need to select No Extension and add
.provn yourself to the filename.
In VSCode’s menu, select Terminal -> New Terminal, an embedded command prompt should open in the correct directory. Check with
dir *.provn that the file is present with the correct name.
You should now be able to convert the provn file to a PNG image, in our example using the command:
provconvert -infile alice.provn -outfile alice.png
You will be able to navigate and open the PNG image within VSCode. See validating and visualisation for details.
If you have made a syntactical error in the PROV-N file, then
provconvert report errors by line numbers, which you can recognize within the VSCode editor. Note that VSCode has no native PROVN support and so its Problems tab is currently unable to detect these errors.
Remember an error early in the file, such as a broken
prefix, or a missing
), may cause phantom errors to be reported later in the file.