/pol

Primary LanguageJava

Policy Language

Implementation of the pol language, a language of security and privacy policies

Pol setup

I - Installing ANTLR Plugin

  1. - Download and install the eclipse IDE
  2. - Setup your workspace where you cloned the pol repository
  3. Install XText 2.7.3
    1. Go to Help > Install New Software...
    2. Enter http://download.eclipse.org/modeling/tmf/xtext/updates/composite/releases/ in the Work With textbox
    3. Hit Enter and wait for the list to load (this will take a few moments)
    4. Expand the Xtext node and check Xtext Complete SDK (ensure the version is 2.7.3x)
    5. Click Next, agree to the EULA, and click finish
    6. Let the installer finish and restart Eclipse
  4. Install ANTLR 4 IDE
    1. Go to Help > Eclipse Marketplace...
    2. Search for antlr
    3. Choose ANTLR 4 IDE (make sure it's ANTLR 4 IDE not ANTLR IDE)
    4. Click Install
    5. Let the installer finish clicking ok if it prompts and restart Eclipse

II - Creating an ANTLR Project in Eclipse

  1. Go to File > New Project > Project
  2. Select folder General > Select ANTLR 4 Project
  3. Next > Put the project name "PolicyLanguage" > Finish
  4. Right click on Pol.g4 > Run as... > External tools configuration
  5. Paste this on the arguments -no-listener -visitor -encoding UTF-8
  6. Run the PoL.g4

III - Create the Policy Language Core Project

  1. Go to File > New Project > Java Project
  2. Next > Put the project name "PolicyLanguageCore" > Finish
  3. Right Click on Project > Configure > Convert to Maven Project

IV - Run the Policy Language Core Project

  1. Copy all the files of PolicyLanguage > target > generated-resources > antlr except PoLBaseVisitor.java to PolicyLanguageCore > src > structure
  2. Put your file path as argument when running the PolicyBuilder.java in Run Configurations
  3. Run the project