Skip to main content

Implementation of the Schedule-Abstraction Graph (SAG) in Python.

Project description

Schedule-Abstraction Graph in Python

Schedule-abstraction graph (SAG) is a reachability-based response-time analysis for real-time systems.

This is the unofficial implementation of the SAG in Python. You can visit the official repository here. This is still WIP (Work-in-Progress) - you can run the anaysis but it doesn't scale because path merging is not implemented yet. The implemented SAG follows the following paper:

For Users

  1. Install the package with:
pip install sagpy
  1. Use the sagpy Command-Line Interface (CLI) to run the SAG analysis on a set of jobs from a csv file. You must select what SAG algorithm to use. For now there are only 2: ecrts2019 (the one presented in the paper above) and ros (based on ecrts2019, but adapted to analyze ROS2's executor):
sagpy overlapping_release_intervals.csv --algorithm ecrts2019
  1. Output files are by default generated in the ~/USER/.sagpy folder.

By default the script generates a csv containing the Best Response times (BR) and the Worst Response times (WR) for all given jobs. Moreover, a png with the visual representation of the SAG is generated as well. Optionally, you can add --drawio to generate a drawio file with a job release plot, so you can better visualize the interference between jobs. Also optionally, the SAG can be serialized with pickle and saved for later use, e.g. making ground truths for testing.

For Developers

  1. Clone the repository.
git clone https://github.com/RaduLucianR/sag-py.git
  1. Change directory in the root folder of the repository.
cd sag-py
  1. Install the package locally. This allows you to run the scripts like they'd be run by the OS. Even if you make changes in the scripts, these changes will be taken into account when Python runs the script again after install.
pip install -e . --break-system-package
  1. Run the CLI script sagpy on a csv file that contains a set of jobs:
python3 -m src.sagpy.sagpy examples/input_examples/job_sets/overlapping_release_intervals.csv --algorithm ecrts2019
  1. Output files are by default generated in the ~/USER/.sagpy folder.
  2. Run the tests running pytest from the root directiory:
pytest

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sagpy-0.0.12.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sagpy-0.0.12-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

File details

Details for the file sagpy-0.0.12.tar.gz.

File metadata

  • Download URL: sagpy-0.0.12.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for sagpy-0.0.12.tar.gz
Algorithm Hash digest
SHA256 3428d65a7fee3f880766efc84ea6e3a7c678f5f9eaf18887ad16019cf963dcf3
MD5 543edd1d124717b392a3075d0a54cf4b
BLAKE2b-256 447d1134acb6f86b9201cf78f2cba23a28a9dcd68575bbcfcefb59927a4acce3

See more details on using hashes here.

File details

Details for the file sagpy-0.0.12-py3-none-any.whl.

File metadata

  • Download URL: sagpy-0.0.12-py3-none-any.whl
  • Upload date:
  • Size: 18.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.3

File hashes

Hashes for sagpy-0.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 0518bbcd81d2a9389247eca4ad308810f47da61e477c01e9994a818779fec9ed
MD5 d76cc0c1970b3d39ebc7f5b1a02aa3fb
BLAKE2b-256 4b73c6fd98703f54dbc7e78f68a36f369ab437d52d2198c0b5504dac4eab9152

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page