Skip to main content

SpotOnDocker

SpotOnDocker is a utility which exposes some of spot's functions as a dockerized service. The functions can be called using client API provided in C++, Python, VB.NET and C#.

Note: In v0.1.0, only Python client API is available.

Supported spot Functions:

  • mp_class: Returns class of LTL formula in Manna-Pnueli hierarchy.
  • translate: Translates LTL formula to Buchi automaton.
  • contains: Checks if the language of an LTL formula is contained within another's.
  • equiv: Checks of the language of two LTL formulas is equivalent.
  • rand_ltl: Generates a random LTL formula.
  • get_ap: Gets the atomic propositions from given LTL formula.
  • to_string_latex: LaTeX-friendly writing of LTL formula.

Installation Instructions

Server Setup

  1. Install Docker. Skip if already installed.

  2. Get the latest version of spotondocker image.

    docker pull abhibp1993/spotondocker
    

Python Client Setup

The following packages are required.

  • networkx
  • docker
  • thrift (Apache)
pip3 install docker networkx thrift
pip3 install spotondocker

Example (Python Client API)

It is advisable to check if spot is available on system, if not use spotondocker.

try:
    import spot
except ImportError:
    import spotondocker.client as client
    spot = client.SpotOnDockerClient()

SpotOnDockerClient() creates a docker container and sets up the server to send requests to

Call the spot functions (only the supported ones!) as usual. For example, to get the class of formula G(a -> Fb) in Manna Pnueli hierarchy, we can call

spot.mp_class('G(a -> Fb)')

which will return a verbose like safety, guarantee, ...

In case of translation, the SpotClient.translate(..) function returns a networkx.MultiDiGraph.

nx_graph = spot.translate("(p1 W 0) | Gp2")

The returned graph has several graph properties. See spotondocker.thrift to see a list of properties associated with graph. The node and edge attributes of nx_graph contains information like id and label.

Release files for spotondocker 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for spotondocker 0.1.2
File Size Uploaded
spotondocker-0.1.2.tar.gz 14.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for spotondocker 0.1.2
File Interpreter ABI Platform
spotondocker-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 30.9 kB

Release files / spotondocker-0.1.2.tar.gz

Download URL spotondocker-0.1.2.tar.gz
Size 14.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4b7bea831fa8f8d4015a2ea9e4754b93e43872d944e31b4e5e39324a8162724e
BLAKE2b-256 checksum
How to use checksums
4504ca4b7fb8b897a1ae0cb3b7cf6319e6a4a0b4bdcc29127902e955170eb917
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

Release files / spotondocker-0.1.2-py3-none-any.whl

Download URL spotondocker-0.1.2-py3-none-any.whl
Size 16.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c0f0c30af8dcd56bbf735318cef32705d5e108d8c59866844bdf3b3ac9f713b2
BLAKE2b-256 checksum
How to use checksums
ca1c3972b2f70d1c6d5f62e3e348a8b13ec42d7d9553ba34bec2d5ce6796e8b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page