Giter VIP home page Giter VIP logo

rvplan's Introduction

RVPlan

How to install

Property synthesis

To synthesise a Past LTL property (i.e. to create an instantiated monitor):

-$ python3 translator.py <domain_file.pddl> <plan_file>

To test, try to synthesise the Past LTL property for the sample domain and plan files.

-$ python3 translator.py domain.pddl plan.txt

This will generate the prop.qtl file inside the out folder. This is the Past LTL corresponding to the preconditions for the actions used in the given plan.

To synthesise a Past FO-LTL property (i.e. to create a parameterised monitor):

-$ python3 translator.py <domain_file.pddl>

To test, try to synthesise the Past FO-LTL property for the sample domain file (the plan is not necessary, since only domain actions are needed).

-$ python3 translator.py domain.pddl

This will generate the prop.qtl file inside the out folder. This is the Past FO-LTL corresponding to the preconditions for the domain actions.

Monitor synthesis

To compile the property obtained at the previous step, simply use DEJAVU (<dejavu_home> is the folder where you installed DEJAVU).

java -cp <dejavu_home>/out/artifacts/dejavu_jar/dejavu.jar dejavu.Verify ./out/prop.qtl | grep -v "Elapsed total"

This will generate the TraceMonitor.scala file in your folder. This represents the monitor corresponding to the prop.qtl property.

Runtime Verification

In the previous step, we obtained the monitor, now we can use it to verify a trace (offline for now).

First, we compile the Scala monitor we obtained at previous step.

-$  scalac -cp .:<dejavu_home>/out/artifacts/dejavu_jar/dejavu.jar TraceMonitor.scala 2>&1 | grep -v "warning"

This will generate the .class files. Next, we can run the compiled monitor passing a CSV file containing an execution trace.

-$ scala -J-Xmx32g -cp .:<dejavu_home>/out/artifacts/dejavu_jar/dejavu.jar TraceMonitor <trace_to_analyse> 20  2>&1  | grep -v "Resizing" | grep -v "load BDD package" | grep -v "Garbage collection"

To test, try to verify the trace stored in trace.csv file.

-$ scala -J-Xmx32g -cp .:<dejavu_home>/out/artifacts/dejavu_jar/dejavu.jar TraceMonitor ./trace.csv 20  2>&1  | grep -v "Resizing" | grep -v "load BDD package" | grep -v "Garbage collection"

rvplan's People

Contributors

angeloferrando avatar

Stargazers

 avatar

Watchers

 avatar  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.