{"id":19472298,"url":"https://github.com/jakuj/ofmc-parallel","last_synced_at":"2025-08-17T10:33:42.989Z","repository":{"id":107257752,"uuid":"467221035","full_name":"JakuJ/ofmc-parallel","owner":"JakuJ","description":"Multicore OFMC implementation","archived":false,"fork":false,"pushed_at":"2022-09-15T10:33:30.000Z","size":3546,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-17T10:32:47.628Z","etag":null,"topics":["model-checking","ofmc","protocol-security"],"latest_commit_sha":null,"homepage":"","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JakuJ.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2022-03-07T18:54:13.000Z","updated_at":"2022-09-15T10:34:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"a965e4ff-a9bb-46c2-8d88-1da8e553bfc7","html_url":"https://github.com/JakuJ/ofmc-parallel","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/JakuJ/ofmc-parallel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakuJ%2Fofmc-parallel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakuJ%2Fofmc-parallel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakuJ%2Fofmc-parallel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakuJ%2Fofmc-parallel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JakuJ","download_url":"https://codeload.github.com/JakuJ/ofmc-parallel/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakuJ%2Fofmc-parallel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270837403,"owners_count":24654374,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["model-checking","ofmc","protocol-security"],"created_at":"2024-11-10T19:13:57.139Z","updated_at":"2025-08-17T10:33:42.972Z","avatar_url":"https://github.com/JakuJ.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Parallel OFMC\n\n[![CI](https://github.com/JakuJ/ofmc-parallel/actions/workflows/ci.yml/badge.svg)](https://github.com/JakuJ/ofmc-parallel/actions/workflows/ci.yml)\n\nThis repository contains the source code for the [Open-source Fixed-point Model Checker](https://www.imm.dtu.dk/~samo/) extended with parallel processing capabilities.\n\nThis version of OFMC utilises all available cores during both the BFS and the DFS phases and can achieve massive speedups depending on the number of cores.\n\nInstructions are provided for running locally, as well as on the DTU HPC cluster.\n\n## Performance\n\nTested on an 8-core CPU (2 x 2064MHz + 6 x 3228MHz), both versions of OFMC executed with `--numSess 2` on an example protocol:\n\n|             | OFMC  | Parallel OFMC | speedup |\n| ----------- | :---: | ------------- | ------- |\n| **typed**   |  50s  | 11s           | 4,55    |\n| **untyped** |  47m  | 8m            | 5,86    |\n\nThe workload seems to be evenly distributed across all 8 cores during both breadth-first and then depth-first searches:\n\n![threadscope screenshot](./extras/threadscope.png)\n## Requirements\n\n- [The Haskell Tool Stack](https://docs.haskellstack.org/en/stable/README/)\n- [Alex](https://www.haskell.org/alex/)\n- [Happy](https://www.haskell.org/happy/)\n- make\n- (optional) [Threadscope](https://github.com/haskell/ThreadScope)\n\nAlex, Happy and Threadscope can be installed using the `stack install` command. You might have to add some dependencies to `extra-deps` in `stack.yaml` for them to install, but you can remove those later.\n\n## Build\n\nInstall lexer and parser generators if you haven't already:\n\n```console\n$ stack install alex\n$ stack install happy\n```\n\nGenerate parser source files and build OFMC:\n\n```console\n$ make\n```\nCopy the executable to PATH:\n\n```console\n$ stack install\n```\n\n## Run on the DTU HPC cluster\n\nDTU students can run OFMC on the **LSF 10** High Performance Computing cluster:\n\n1. Access the cluster over `ssh` [(instructions)](https://www.hpc.dtu.dk/?page_id=2501)\n2. Clone this repository\n3. Download a binary release of `stack` for Linux [here](https://docs.haskellstack.org/en/stable/install_and_upgrade/#manual-download_2)\n4. Set the `STACK` variable in the Makefile to point to the `stack` executable\n5. Follow the steps to build the project\n\n`stack install` will print where the `ofmc` binary was copied to. You can add it to PATH for simplicity. Example:\n\n```shell\nexport PATH=\"/zhome/f1/2/143603/.local/bin:$PATH\"\n```\n\nYou can execute OFMC on 20 cores and pray you don't get banned from using the HPC cluster ever again. **Alternatively**, you can learn how to [schedule a job properly](https://www.hpc.dtu.dk/?page_id=1416) :upside_down_face:\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakuj%2Fofmc-parallel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjakuj%2Fofmc-parallel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakuj%2Fofmc-parallel/lists"}