Coder Social home page Coder Social logo

expat's Introduction

Expat

  • Expat is a prototype of proposed system for protecting appified smart-home platforms.
  • This project contains Expat materials instantiated for OpenHAB system.

Requirements

  • Expat is written in Python3 and for installing required modules, please use the following command:

     $ pip3 install -r requirements.txt
    
  • This project also depends on z3 which needs to be built and installed according to the directions here

Project folder structure

  • expat.py: This is the main python file needs to be run. The usage is as follows:

     $ python3 expat.py <command> <policy_file> <target_rules_file> <instrumented_rules_file>
    

    where <command> specifies which task it should perform. This command can be either analysis or instrument. <policy_file> is an input policy file name written in UEI. <target_rules_file> is an input rules file that we want to target in the case that the command is instrument. <instrumented_rules_file> is an output rules file instrumented by the expat.py script whenever the command is instrument.

    For instance, to do policy analysis you can run:

     $ python3 expat.py analysis simulation/policies.uei
    

    and for deployment, run:

     $ python3 expat.py instrument simulation/policies.uei simulation/user.rules simulation/inst_user.rules
    
  • parser-generator: In this folder, you can find the source of all UEI/PAL parser scripts generated by ANTLR4. Mainly, OPOL.g4 contains the grammar of the policy language and using generate.sh, you can run ANTLR4 to spit out the parser-related scripts. Notice that you don't have to have ANTLR4 installed to run expat. You need ANTLR4, whenever you want to make changes in grammar and thus generating new parser-related scripts.

  • lib: This folder contains the parser-related scripts generated by ANTLR4 (i.e., copied from parser-generator folder) which is being used in expat.py.

  • syntax-highlighter: In this folder, you can find a very simple syntax highlighter of UEI for Sublime or TextMate. You can install it, if you wish.

  • simulation: This folder contains a sample policy and a test rule, both defined by a user that can be fed into expat.py as well as a sample instrumented rules file (i.e., inst_user.rules). This folder also contains testbed-config subfolder including the OpenHAB necessary config files to simulate a virtual smart home environment. For more details, read this.

  • device_list.csv: This csv file contains the list of devices used in defining device data type in z3. Each row includes the item name (exactly the same as what defined in openhab .items config file) and its type (i.e., Switch, Contact, etc).

expat's People

Contributors

expat-paper avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.