{"id":19362665,"url":"https://github.com/imdea-software/violin","last_synced_at":"2025-11-17T14:02:11.258Z","repository":{"id":79163423,"uuid":"24379970","full_name":"imdea-software/violin","owner":"imdea-software","description":null,"archived":false,"fork":false,"pushed_at":"2015-10-09T09:53:24.000Z","size":21733,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-24T12:50:27.524Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/imdea-software.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}},"created_at":"2014-09-23T16:38:22.000Z","updated_at":"2021-12-13T12:40:37.000Z","dependencies_parsed_at":"2023-03-12T07:13:31.517Z","dependency_job_id":null,"html_url":"https://github.com/imdea-software/violin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/imdea-software/violin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imdea-software%2Fviolin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imdea-software%2Fviolin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imdea-software%2Fviolin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imdea-software%2Fviolin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imdea-software","download_url":"https://codeload.github.com/imdea-software/violin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imdea-software%2Fviolin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":284893575,"owners_count":27080531,"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-11-17T02:00:06.431Z","response_time":55,"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":[],"created_at":"2024-11-10T07:29:51.616Z","updated_at":"2025-11-17T14:02:11.211Z","avatar_url":"https://github.com/imdea-software.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Monitoring Refinement via Symbolic Reasoning\n\nThis project aims to develop efficient monitoring algorithms for concurrent\ndata structures, e.g., locks, semaphores, atomic registers, stacks, queues.\n\n\n## Installation\n\nThis project is written in [Ruby], and works “out of the box” without\ncompilation nor installation, though does require a Ruby interpreter. Simply\nclone this repository, configure accordingly, and proceed to *Usage*\ninstructions.\n\n    git clone https://github.com/imdea-software/observational-refinement-checking.git\n\nBelow we provide instructions for configuration with your native Ruby\ninstallation, as well as alternative instructions for using a preconfigured\nvirtual environment.\n\n\n### Configuration with Native Ruby Installation\n\nIn principle, this project works “out of the box” with the latest Ruby\ninterpreters an a couple of supplementary “gems”. So is our experience with OS\nX and Linux, though we have not tested on Windows.\n\n#### Requirements\n\n* [Ruby], version 2.0.0 or greater.\n* The `ffi` and `os` Ruby gems, installed via `gem install ffi os`.\n\n**Note** This project also uses [Z3] as a shared library. For convenience we\nprovide the [Z3] shared library prebuilt for 64bit OS X (Yosemite), 64bit Linux\n(OpenSUSE), and Windows in the `xxx/` directory. Dependence on the platforms on\nwhich it was built is unclear. In the case that you encounter problems\ninvolving `FFI` or `Z3`, try to obtain [Z3] on your own, and include the\nappropriate `libz3.{dylib,so,dll}` in your `LIBRARY_PATH`.\n\n\n### Preconfigured Virtual Environment\n\nAlternatively, this project can be run in a preconfigured virtual machine using\n[VirtualBox] and [Vagrant]. Both are available for a wide range of systems,\nwith great installation support.\n\n#### Requirements\n\n* [VirtualBox], version 4.3.20 or greater\n* [Vagrant], version 1.7.2 or greater\n\n#### Instructions\n\nFirst, start [Vagrant] in this project’s root directory (containing\n`Vagrantfile`):\n\n    vagrant up\n\nThis can take a few minutes the first time around, since it includes the\ndownload of a virtual machine image. When this step finishes, our virtual\nmachine should be up and running — verify this with the `vagrant status`\ncommand. Open a shell to the running virtual machine via ssh:\n\n    vagrant ssh\n\nand follow the *Usage* instructions below. When finished, simply close the SSH\nsession, and halt, suspend, or destroy the virtual machine:\n\n    vagrant destroy\n\n\n## Contents\n\nFiles in this project are organized according to the following directory\nstructure.\n\n* `bin/` contains executable ruby programs:\n    * `logchecker.rb` for checking history logs,\n    * `loggenerator.rb` for generating history logs,\n    * `report.rb` for generating benchmarking reports, and\n    * `experiments.rb` for generating experimental data.\n\n* `data/` contains various data:\n    * `histories/` contains history logs,\n        * `generated/` contains history logs generated from actual executions,\n        * `simple/` contains hand-crafted history logs,\n    * `reports/` contains reports benchmarking the performance of each algorithm,\n    * `experiments/` contains empirical measurements, and\n    * `plots/` contains visualizations of empirical measurements.\n\n* `lib/` contains the source code of the checking algorithms.\n\n* `pldi-2015-submission.pdf` is a research paper accepted to [PLDI 2015][].\n\n* `xxx/` contains prebuilt external shared-libraries for OS X, Windows, and Linux.\n\n\n## Usage\n\nThe `logchecker.rb` program checks whether an input history violates it’s\ncorresponding object specification, via one of various algorithms. This program\nis invoked as follows:\n\n    ./bin/logchecker.rb data/histories/simple/lifo-violation-dhk-2.log -a symbolic -v\n\nThis command runs the “symbolic” checking algorithm on the\n`lifo-violation-dhk-2.log` history. See *History Input Format*, below, for a\ndescription of the input format to `logchecker.rb`.\n\nTo see the list of options to `logchecker.rb`, run\n\n    ./bin/logchecker.rb --help\n\nAn input history file is mandatory. The checking algorithm is given by the\noption `-a`/`--algorithm`. Valid choices include `enumerate`, `symbolic`,\n`saturate`, and `counting`.\n\nWhen the “enumerate” and “symbolic” algorithms are used, the\n`-c`/`--[no-]completion` flag enables/disables the enumeration of history\ncompletions prior to the enumeration of linearizations. When the “symbolic”\nalgorithm is used, the `-i`/`--[no-]incremental` flag enables/disables\nincremental assertions to the underlying theorem prover. For all algorithms,\nthe `-r`/`--[no-]remove-obsolete` flag performs the match-removal optimization\nto remove operations deemed obsolete.\n\nWhen the “counting” algorithm is used, the interval bound is specified via the\n`-b`/`--interval-bound` option — see [Tractable Refinement Checking for\nConcurrent Objects][popl-2015-paper] for background on approximating refinement\nchecking via interval bounding.\n\n\n### Generating History Logs\n\nThe `loggenerator.rb` program was used to generate the history logs in the\n`histories/generated` directory by pseudo-random execution of various objects\nfrom the [Scal] High-Performance Multicore-Scalable Computing suite. This\nprogram depends on an external library which is not currently included in this\nproject, and is thus currently unusable. However, any available means of\ngenerating valid history log files, or simply using the pre-recorded histories\nin the `data/histories` directory, is compatible with the `logchecker.rb`\nprogram.\n\n\n### Benchmarking Reports\n\nTo generate reports benchmarking the performance of various algorithms with\nvarious parameters on the many history logs included in this project, run\n\n    ./bin/report.rb\n\nThe rightmost column `v` indicates whether a violation was discovered in the\ngiven history by the given algorithm: `√` indicates “yes”, and `-` no. In case\nthe given algorithm exceeds the given timeout, the value in the `steps` and\n`time` columns are marked with an asterisk. The default timeout is 5 seconds,\nand is adjustable via the `--timeout` option. To see the list of options to\n`report.rb`, run\n\n    ./bin/report.rb --help\n\nPrevious runs of `report.rb` are logged in the `data/reports` directory.\n\n\n### Empirical Data\n\nThe empirical data used in the publication of this work is generated via the\n`experiments.rb` program. Results are stored in tab-separated-values (TSV)\nformat in the `data/experiments` directory. Visualizations of this data are\nstored in the `data/plots` directory. The file `data/plots/plot.html` renders\nthe data in a web browser, and is known to work with Safari.\n\n\n## History Input Format\n\nThe input to the history-checking algorithms is a text file specifying the\nexecution history of an object via ordered method call and return actions. Each\naction must appear on a separate line. Call actions have the format\n\n    [ID] call MMM(V1, V2, …)\n\nwhere `ID` is an operation identifier, `MMM` is a method name, and `V1`, `V2`,\n… is a possibly-empty sequence of argument values. Return actions have the\nformat\n\n    [ID] return V1, V2, …\n\nwhere `ID` is an operation identifier, and `V1`, `V2`, … is a possibly-empty\nsequence of return values. Each operation identifier may appear in at most 2\nactions — one call and one return — and each identifiers appearing in a return\naction must appear in some prior call action. Lines beginning with `#` are\nignored. For example, the following the history\n\n    [1] call push(a)\n    [2] call push(b)\n    [2] return\n    [3] call pop\n    [3] return a\n    \nis the concurrent history of a stack data structure, where the values `a` and\n`b` are pushed concurrently — operations `1` and `2` overlap — and the value\n`a` is popped while operation `1` is still pending — the return action of\noperation `1` has not occurred. Drawn as intervals spanned by the `#` symbol,\nthis corresponds to the history\n\n    [1] push(a)*  ###\n    [2] push(b)   #\n    [3] pop =\u003e a    #\n\nwhere the `*` symbol indicates that operation `1` is pending.\n\nThe directory `data/histories` contains many other example histories.\n\n**Note** currently only support for atomic stack-based and queue-based\ncollections has been implemented. To support additional classes of objects,\ntheir logical theories and matching functions must be added to\n`lib/theories.rb` and `lib/matching.rb`.\n\n**Note** currently we assume that each history contains one of the following lines:\n\n    # @object atomic-stack\n    # @object atomic-queue\n\nand uses only one of the following method name pairs: `add`/`rem`, `put`/`get`,\n`push`/`pop`, `enqueue`/`dequeue`. When in doubt, just follow the examples\ncontained in `data/histories`.\n\n\n[Ruby]: https://www.ruby-lang.org\n[RubyInstaller]: http://rubyinstaller.org\n[Homebrew]: http://brew.sh\n[Cygwin]: https://www.cygwin.com\n[libffi]: https://sourceware.org/libffi\n[Z3]: http://z3.codeplex.com\n\n[Vagrant]: https://www.vagrantup.com\n[VirtualBox]: https://www.virtualbox.org\n\n[PLDI 2015]: http://conf.researchr.org/home/pldi2015\n\n[popl-2015-paper]: http://michael-emmi.github.io/papers/conf-popl-BouajjaniEEH15.pdf\n\n[Scal]: http://scal.cs.uni-salzburg.at\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimdea-software%2Fviolin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimdea-software%2Fviolin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimdea-software%2Fviolin/lists"}