{"id":25386415,"url":"https://github.com/mgrojo/coap_spark","last_synced_at":"2026-02-22T21:56:03.855Z","repository":{"id":276384109,"uuid":"847004237","full_name":"mgrojo/coap_spark","owner":"mgrojo","description":"Formally verified implementation of the CoAP protocol in SPARK/Ada","archived":false,"fork":false,"pushed_at":"2026-02-20T23:26:23.000Z","size":4143,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-02-21T04:26:29.098Z","etag":null,"topics":["ada","coap","formal-verification","iot","spark-ada"],"latest_commit_sha":null,"homepage":"","language":"Ada","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mgrojo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-08-24T15:18:37.000Z","updated_at":"2025-12-28T13:08:02.000Z","dependencies_parsed_at":"2025-02-23T13:23:34.713Z","dependency_job_id":"e2d98668-ac7c-40c6-8cdb-de221cd15fd8","html_url":"https://github.com/mgrojo/coap_spark","commit_stats":null,"previous_names":["mgrojo/coap_spark"],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/mgrojo/coap_spark","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgrojo%2Fcoap_spark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgrojo%2Fcoap_spark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgrojo%2Fcoap_spark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgrojo%2Fcoap_spark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mgrojo","download_url":"https://codeload.github.com/mgrojo/coap_spark/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mgrojo%2Fcoap_spark/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29728545,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-22T20:09:16.275Z","status":"ssl_error","status_checked_at":"2026-02-22T20:09:13.750Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ada","coap","formal-verification","iot","spark-ada"],"created_at":"2025-02-15T10:36:42.888Z","updated_at":"2026-02-22T21:56:03.846Z","avatar_url":"https://github.com/mgrojo.png","language":"Ada","funding_links":[],"categories":["Libraries"],"sub_categories":["Networking and Communication Middleware"],"readme":"[![Build](https://github.com/mgrojo/coap_spark/actions/workflows/main.yml/badge.svg)](https://github.com/mgrojo/coap_spark/actions/workflows/main.yml)\n[![AppImage](https://github.com/mgrojo/coap_spark/actions/workflows/appimage.yml/badge.svg)](https://github.com/mgrojo/coap_spark/actions/workflows/appimage.yml)\n[![GNATprove](https://github.com/mgrojo/coap_spark/actions/workflows/prove.yml/badge.svg)](https://github.com/mgrojo/coap_spark/actions/workflows/prove.yml)\n[![codecov](https://codecov.io/gh/mgrojo/coap_spark/graph/badge.svg?token=2AEXL06XHU)](https://codecov.io/gh/mgrojo/coap_spark)\n[![Alire](https://img.shields.io/endpoint?url=https://alire.ada.dev/badges/coap_spark.json)](https://alire.ada.dev/crates/coap_spark.html)\n\n# CoAP-SPARK\nCoAP-SPARK is a library implementing the Constrained Application Protocol (CoAP)\nas defined in\n[RFC 7252](https://www.rfc-editor.org/rfc/rfc7252), developed in the SPARK \nlanguage, the formally verified subset of the Ada programming language.\n\nThe objective is to build a formally verified working CoAP\nimplementation, mainly for academic purposes.\n\n## Dependencies\nCoAP-SPARK uses:\n* [Alire](https://alire.ada.dev) as source package manager (independently installed)\n* [RecordFlux](https://github.com/AdaCore/RecordFlux) as a tool facilitating the implementation of the verifiable\n  protocol parser and the state machine of a session (included as Git submodule)\n* [WolfSSL](https://github.com/wolfSSL/wolfssl) as library for implementing the DTLS communications\n  (included as Git submodule)\n* [GNAT](https://github.com/alire-project/GNAT-FSF-builds) 14.2.1 (toolchain managed by Alire)\n* [GNATProve](https://github.com/alire-project/GNAT-FSF-builds) 14.1.1 (dependency managed by Alire)\n* [Aunit](https://github.com/AdaCore/aunit) for unit-testing the library (dependency managed by Alire)\n* [bbt](https://github.com/LionelDraghi/bbt) for testing (installable via Alire)\n\n## How to set-up\n\nClone the repository recursing on submodules:\n```\ngit clone --recurse-submodules https://github.com/mgrojo/coap_spark.git\n```\nThe source code generated by RecordFlux is already added to the repository.\nIf you want to generate it yourself, follow these two steps:\n\nBuild RecordFlux following instructions on\n[`tools/RecordFlux/doc/development_guide/index.rst`](tools/RecordFlux/doc/development_guide/index.rst).\n\nGenerate source code from the CoAP model using RecordFlux with:\n```\nmake generate\n```\n\n## How to build\n\nInstall [Alire](https://alire.ada.dev/) and build the library running:\n```\nalr build\n```\n\nFor building the client and server programs:\n```\nalr -C client build\nalr -C server build\n```\n\n## How to test\nInstall `bbt` running:\n```\nalr install bbt\n```\n\nAnd then run the tests with:\n```\nmake -C client/tests\nmake -C server/tests\n```\n\nThanks to `bbt`, the test specification can also work as documentation of the\nfeatures available in the server and the client. You can see:\n\n* Client tests for [plain CoAP](client/tests/coap_client_tests.md) and \n [CoAP over DTLS](client/tests/coaps_client_tests.md)\n* Server tests for [plain CoAP](server/tests/coap_server_tests.md) and\n [CoAP over DTLS](server/tests/coaps_server_tests.md)\n\nThere are also some unit tests for the library. To run them, enter the `tests/`\ndirectory and run them using Alire:\n```\ncd tests; alr run\n```\n\n## How to prove\nThe project (library, client and server) is currently proved up to the silver mode.\n\nThe [`proof/`](proof/) directory contains the results of passing GNATProve. You can replay it running:\n```\nalr gnatprove --replay\n```\n\nOr if you want to start afresh,for example, using a different version of\n`gnatprove`, simply run:\n```\nalr gnatprove\n```\n\nThe project is using `gnatprove` from the Alire community index. You can install it running this:\n```\nalr install gnatprove\n```\n\nThe Colibri solver has to be installed separately, for example, from the\n[GNAT Community Edition 2021](https://www.adacore.com/download). After installation,\nand before running `gnatprove`, you have to put `{GNAT-2021-HOME}/libexec/spark/bin`\nin the `PATH`, so `gnatprove` can find the `colibri` executable.\n\n## Status\nCoAP-SPARK is a working and verified implementation of CoAP.\n\nThe main objective of CoAP-SPARK is to be the subject of my Master's Thesis, but\nI think it can be used in scenarios where these limitations are not an issue:\n- There are no retransmissions.\n- It only supports NoSec and PreSharedKey security modes.\n- Block-wise transfers are not implemented. Nevertheless, this isn't part of the\n  main RFC 7252 for CoAP, but of [RFC 7959](https://datatracker.ietf.org/doc/rfc7959/).\n\nRegarding the implemented client, it is able to\nsubstitute libcoap's coap-client, for example, when called from a project like\n[ikea-smartlight](https://github.com/slokhorst/ikea-smartlight/).\n\nThe server implementation is an example of a CoAP server that can answer to CRUD\nrequests, storing resources in memory.\n\nBug reports, feedback or suggestions on how to improve the library are very welcome.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgrojo%2Fcoap_spark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmgrojo%2Fcoap_spark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgrojo%2Fcoap_spark/lists"}