{"id":16313925,"url":"https://github.com/johnwickerson/memalloy","last_synced_at":"2025-06-11T16:32:22.500Z","repository":{"id":55633421,"uuid":"63800543","full_name":"johnwickerson/memalloy","owner":"johnwickerson","description":"Memory consistency modelling using Alloy","archived":false,"fork":false,"pushed_at":"2020-12-16T15:23:11.000Z","size":5235,"stargazers_count":28,"open_issues_count":10,"forks_count":6,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-10-11T21:52:41.434Z","etag":null,"topics":["armv7","c11","compiler-design","constraint-solver","memory-model","model-checking","nvidia-gpus","opencl","powerpc","x86"],"latest_commit_sha":null,"homepage":"http://johnwickerson.github.io/memalloy","language":"OCaml","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johnwickerson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-07-20T17:23:40.000Z","updated_at":"2024-05-26T04:33:42.000Z","dependencies_parsed_at":"2022-08-15T05:00:50.123Z","dependency_job_id":null,"html_url":"https://github.com/johnwickerson/memalloy","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnwickerson%2Fmemalloy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnwickerson%2Fmemalloy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnwickerson%2Fmemalloy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnwickerson%2Fmemalloy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnwickerson","download_url":"https://codeload.github.com/johnwickerson/memalloy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221809085,"owners_count":16883850,"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","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":["armv7","c11","compiler-design","constraint-solver","memory-model","model-checking","nvidia-gpus","opencl","powerpc","x86"],"created_at":"2024-10-10T21:52:42.698Z","updated_at":"2024-10-28T08:44:58.327Z","avatar_url":"https://github.com/johnwickerson.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n| Licence | Master branch | Dev branch |\n|---------|---------------|------------|\n| [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) | [![Build Status](https://travis-ci.org/johnwickerson/memalloy.svg?branch=master)](https://travis-ci.org/johnwickerson/memalloy) | [![Build Status](https://travis-ci.org/johnwickerson/memalloy.svg?branch=dev)](https://travis-ci.org/johnwickerson/memalloy) |\n\n# System requirements\n\n- OCaml 4.07.0 or later (tested with 4.07.0)\n\n- OPAM packages `xml-light`, `ocamlfind`, and `ocamlbuild` (hint: `opam install \u003cpackage name\u003e`)\n\n- Python 2.7\n\n- Java runtime version 8 (tested with [Java SE Development Kit 8u181](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)).\n\n- Graphviz (hint: `brew install graphviz`)\n\n- Apache Ant, for building Alloy (hint: `brew install ant`)\n\n# Quick start\n\n1. Modify `configure.sh` to suit your OS.\n\n2. Run `source configure.sh`.\n\n3. Run `make install`. HTML documentation can now be browsed at\n   `doc/index.html`.\n\n4. Run `make quicktest`. After a few minutes you should find some\n   pictures of distinguishing executions in the `png` directory.\n\n# Converting .cat models to Alloy (.als) format\n\n- Each `.cat` file must begin with a description of the architecture\n  being modelled. This must be one of: `\"BASIC\"`, `\"C\"`, `\"HW\"`,\n  `\"X86\"`, `\"PPC\"`, `\"ARM7\"`, `\"ARM8\"`, `\"PTX\"`, `\"OpenCL\"`, or `\"OCaml\"`.\n\n- A reasonable fragment of the `.cat` language is supported.\n\n\t- You can define sets and relations via `let x = e`. Names of sets\n      must begin with an uppercase letter, and names of relations must\n      begin with a lowercase letter.\n\n\t- You can define functions via `let f(r1,...,rn) = e`. The name of\n      the function must begin with an uppercase letter if the function\n      returns a set, and must begin with a lowercase letter if the\n      function returns a relation. Functions cannot return functions.\n      Set-valued parameters must have a name beginning with an\n      uppercase letter, and relation-valued parameters must begin with\n      a lowercase letter. Parameters cannot be functions themselves.\n\t  \n    - You can define relations (but not sets) recursively via `let x1\n\t  = e1 and ... and xn = en`, and these are unrolled a fixed number\n\t  of times when translating into Alloy (since Alloy only checks up\n\t  to a finite bound anyway). The number of unrollings is set by\n\t  the `-u` flag, which defaults to 3.\n\t  \n    - You can define a consistency axiom of the model called `name`\n      via `acyclic|irreflexive|empty e as name`. You can define a\n      'definedness' axiom (i.e., one that must hold of every\n      consistent execution or else the whole program is undefined) by\n      prepending the statement above with `undefined_unless`, and you\n      can define a 'deadness' axiom (i.e., one that must hold of an\n      inconsistent execution in order to guarantee that the resultant\n      litmus test has no other passing executions) by prepending the\n      statement above with `deadness_requires` instead.\n\n    - You can include the definitions and axioms of the `submodel.cat`\n      file via `include submodel.cat`. \n\n- There are a few syntactic restrictions on `.cat` files.\n\n    - The variable `int`, built into Herd, clashes with a keyword in\n      Alloy, so is not allowed. You can use `thd` instead.\n\n    - The variable `X`, built into Herd, clashes with another variable\n      in Alloy, so is not allowed. You can use `domain(atom) |\n      range(atom)` instead.\n\n    - The variables `L` and `A` are used in Herd for 'release' and\n      'acquire' accesses in the Arm8 architecture, but these clash\n      with the variables for 'local' accesses in OpenCL and 'atomic'\n      accesses in C and OpenCL, respectively. Alloy does not allow\n      variables to be re-used in this way, so you must use `SCREL` and\n      `SCACQ` in the Arm8 architecture instead.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnwickerson%2Fmemalloy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnwickerson%2Fmemalloy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnwickerson%2Fmemalloy/lists"}