There are two ways to use Translator in our project, which are:

  • Through Visualizer, our Hapi web application that brings together all the resources of the project in one place.
  • Through the Command Terminal.


For a better experience, we recommend using the translator through our WEB Application. Visualizer (Fig.1), which is another tool that accompanies the Hapi program. That way it will be very simple to use our Translator to convert the policies written in .hp to .yaml: Fig.1

After writing the Policy created in the designated field in Visualizer, the user only needs to run the application, and it will return the Policy made in HAPI, converted to YAML in a .yaml file that only needs to be downloaded to be used.

NT.:The Visualizer installation walkthrough can be found in the next section.

Command Terminal

The user of the Hapi tool can also choose to use our translator via the command terminal. For this, it will be necessary to have the Gradle component properly installed on your machine. Being in the Hapi root folder (../hapi/) in the terminal, the user must use the command: gradle run --args=path/of/your/file.hp under the desired policy file. A file in .yaml format will then be generated as output, with the same name and in the same folder in which the .hp file was located.

Note: Gradle already comes with the Hapi installation package.

We will present some examples using both methods, in the following subsection.