{"id":16313731,"url":"https://github.com/co-dan/seloc","last_synced_at":"2025-04-04T10:45:37.550Z","repository":{"id":43260501,"uuid":"261129255","full_name":"co-dan/SeLoC","owner":"co-dan","description":"Strong non-interference for fine-grained concurrent programs","archived":false,"fork":false,"pushed_at":"2022-03-11T10:54:19.000Z","size":367,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-09T20:45:42.616Z","etag":null,"topics":["coq","coq-library","iris","noninterference","program-verification","separation-logic","type-system"],"latest_commit_sha":null,"homepage":"","language":"Coq","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/co-dan.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":"2020-05-04T09:18:01.000Z","updated_at":"2022-03-11T10:54:22.000Z","dependencies_parsed_at":"2022-09-03T02:31:49.578Z","dependency_job_id":null,"html_url":"https://github.com/co-dan/SeLoC","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/co-dan%2FSeLoC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/co-dan%2FSeLoC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/co-dan%2FSeLoC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/co-dan%2FSeLoC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/co-dan","download_url":"https://codeload.github.com/co-dan/SeLoC/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247166149,"owners_count":20894652,"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":["coq","coq-library","iris","noninterference","program-verification","separation-logic","type-system"],"created_at":"2024-10-10T21:52:09.174Z","updated_at":"2025-04-04T10:45:37.535Z","avatar_url":"https://github.com/co-dan.png","language":"Coq","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SeLoC: Relational separation logic for non-interference\n\nThis is the Coq development for SeLoC: a relational separation logic for proving non-interference of concurrent stateful programs.\n\nSee [the paper](https://arxiv.org/abs/1910.00905) for more details.\n\n# Installation instructions\n\nThis version is known to compile with:\n- Coq 8.12 or later\n- Iris developement version [96191ed7ef792478c86890a0ebdbbbea0dc9c9ab](https://gitlab.mpi-sws.org/iris/iris/tree/96191ed7ef792478c86890a0ebdbbbea0dc9c9ab)\n- Equations 1.2.3 or later\n\nIf you use [opam](https://opam.ocaml.org/), then you can install all the dependencies by running the following commands from the root directory:\n```\nopam repo add coq-released https://coq.inria.fr/opam/released\nopam repo add iris-dev https://gitlab.mpi-sws.org/iris/opam.git\nopam update\nopam install .\n```\n\nOtherwise you can manually install all the dependencies and run `make \u0026\u0026 make install`.\n\n# Directory structure\n\nAll the Coq modules are in the subfolders of the `theories` folder:\n\n- [program_logic](theories/program_logic): the definition of double weakest preconditions and the core logic rules, as well as the soundness proof.\n- [proofmode](theories/proofmode): tactics that ease symbolic execution proofs.\n- [logrel](theories/logrel): the type system and its interpretation.\n- [examples](theories/examples): examples studied in the paper.\n- [heap_lang](theories/heap_lang): operational semantics for HeapLang with deterministic allocation and its adequacy result (see more on that below).\n\n## Material from the paper\n\n- The set data structure from Section II.A is in [examples/set.v](theories/examples/set.v).\nThe safe arrays from Section II.B are defined and verified in [examples/array.v](theories/array.v).\n- Rules from Figure 3 are in [program_logic/dwp.v](theories/program_logic/dwp.v), [program_logic/lifting.v](theories/program_logic/lifting.v) and [program_logic/heap_lang_lifting.v](theories/program_logic/heap_lang_lifting.v).\n- Proposition 4 is proved in [examples/rand.v](theories/examples/rand.v).\n- Proposition 6 is proved in [examples/value_sensitivity_3.v](theories/examples/value_sensitivity_3.v).\n- The types are defined in [logrel/types.v](theories/logrel/types.v), the model for the type system and the compatibility rules are in [logrel/interp.v](theories/logrel/interp.v).\nThe typing rules and the fundamental property are in [logrel/typing.v](theories/logrel/typing.v).\n- Proposition 10 is proved in [examples/various.v](theories/examples/various.v).\n- The modular specifications for dynamically classified references are given in [examples/value_dep.v](theories/examples/value_dep.v). The example clients that use those specification are in [examples/value_sensitivity_2.v](theories/examples/value_sensitivity_2.v) and [examples/value_sensitivity_4.v](theories/examples/value_sensitivity_4.v).\n- The bisimulation is constructed in [program_logic/dwp_adequacy.v](theories/program_logic/dwp_adequacy.v).\n\nThere are some additional examples that did not make the paper.\nSee, in particular, [examples/calendar.v](theories/examples/calendar.v) for an example of how to handle delimited information release.\n\n# Differences with the paper\n\nThere are some differences between the Coq formalization and the presentation in the paper.\n\nFirst of all, to be compatible with the existing version of HeapLang in Iris, we define double weakest preconditions on top of a language with non-deterministic allocation semantics.\nHowever, to have well-defined probabilistic semantics of thread-pools, we require the allocation to be deterministic. We formalize HeapLang with deterministic allocation in [heap_lang/lang_det.v](theories/heap_lang/lang_det.v) (the language is parameterized by an allocation oracle).\nWe prove the following adequacy statement: if we have a double weakest precondition for a program under the standard non-deterministic semantics, we can also have adouble weakest precondition for the same program under the deterministic semantics with an allocator.\n\nSecondly, our type system (and its interpretation) is parameterized by an attacker level `ξ`, and you can see that throughout the code.\nIn our type system we also have an option type for integers.\nIt is denoted as `toption il l` where `il` is the sensitivity label of the underlying integer, and `l` is the label for the option type (whether it is `SOME` or `NONE`); thus it roughly corresponds to `option^l (int^il)`.\nIn the future work we would like to extend the typing rules to arbitrary sum types.\n\nLastly, In Coq, we do not use the AWP proposition for atomic weakest preconditions we used in the paper.\nRather, in the rule `dwp-awp` (in the formalization: `dwp_atomic_lift_wp`) we require the expressions `e1` and `e2` to be _atomic_ and produce no forked off threads.\nThen, we fall back onto the total weakest precondition from Iris.\nThis allows us to reuse a lot of lemmas and tactics about total weakest preconditions from Iris.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fco-dan%2Fseloc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fco-dan%2Fseloc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fco-dan%2Fseloc/lists"}