{"id":19673101,"url":"https://github.com/andrew-bedford/ott-ifc","last_synced_at":"2025-02-27T05:16:33.113Z","repository":{"id":202507978,"uuid":"108212167","full_name":"andrew-bedford/ott-ifc","owner":"andrew-bedford","description":"Generates information-flow control mechanisms from a language's specification","archived":false,"fork":false,"pushed_at":"2018-07-17T03:49:20.000Z","size":4761,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-10T03:51:41.412Z","etag":null,"topics":["information-flow-control","ott"],"latest_commit_sha":null,"homepage":null,"language":"Java","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/andrew-bedford.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}},"created_at":"2017-10-25T02:58:18.000Z","updated_at":"2021-11-11T17:48:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"fa38750b-7ec2-48b4-82d3-2e0dc52121d8","html_url":"https://github.com/andrew-bedford/ott-ifc","commit_stats":null,"previous_names":["andrew-bedford/ott-ifc"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrew-bedford%2Fott-ifc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrew-bedford%2Fott-ifc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrew-bedford%2Fott-ifc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andrew-bedford%2Fott-ifc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andrew-bedford","download_url":"https://codeload.github.com/andrew-bedford/ott-ifc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240981558,"owners_count":19888346,"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":["information-flow-control","ott"],"created_at":"2024-11-11T17:14:04.429Z","updated_at":"2025-02-27T05:16:33.093Z","avatar_url":"https://github.com/andrew-bedford.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ott-IFC\nDeveloping sound information-flow control mechanisms can be a laborious and error-prone task due to the numerous ways through which information may flow in a program, particularly when dealing with complex programming languages. Ott-IFC seeks to help with this task, by generating basic information-flow control mechanisms from language specifications (i.e., syntax and semantics).\n\nAs the name implies, the specifications that Ott-IFC takes as input (and outputs) are written in [Ott](https://github.com/ott-lang/ott). Ott is a tool that can generate LaTeX, Coq or Isabelle/HOL versions of a programming language's specification. The specification is written in a concise and readable ASCII notation that resembles what one would write in informal mathematics.\n\n## Example\nConsider the imperative language whose syntax and (partial) semantics are defined below:\n```\ngrammar\n    arith_expr, a :: ae_ ::=\n        | x                                 ::  :: variable\n        | n                                 ::  :: int\n        | a1 + a2                           ::  :: addition\n        | a1 * a2                           ::  :: multiplication\n    \n    bool_expr, b :: be_ ::=\n        | true                              ::  :: true\n        | false                             ::  :: false\n        | a1 \u003c a2                           ::  :: less_than\n    \n    commands, cmd :: cmd_ ::=\n        | stop                              ::  :: stop\n        | skip                              ::  :: skip\n        | x := a                            ::  :: assignment\n        | cmd1 ; cmd2                       ::  :: sequence\n        | if b then cmd1 else cmd2 end      ::  :: if\n        | while b do cmd end                ::  :: while\n        | read x from ch                    ::  :: read\n        | write x to ch                     ::  :: write\n```\n\nTo prevent explicit flows, Ott-IFC identifies the semantic rules that may modify the memory *m* (e.g., rule `assign`). In each of those rules, it updates the modified variable's label with the label of the expressions that are used in the rule.\n```\n    \u003ca, m, o\u003e || \u003cn, m, o\u003e\n    ----------------------------- :: assign\n    \u003cx := a, m, o\u003e || \u003cstop, m[x |-\u003e n], o\u003e\n\nis transformed into\n\n    E |- a : l_a\n    \u003cE, pc, a, m, o\u003e || \u003cE, pc, n, m, o\u003e\n    ----------------------------- :: assign\n    \u003cE, pc, x := a, m, o\u003e ||  \u003cE[x |-\u003e pc |_| l_a], pc, stop, m[x |-\u003e n], o\u003e\n```\n\n\nTo prevent implicit flows, it identifies commands that may influence the control-flow of the application. That is, commands for which a program configuration may lead to two different program configurations (e.g., the `if` command). It then updates to the program counter `pc` with the level of the expressions that are present in the rule (only `b` in this case).\n\n```\n    \u003cb, m, o\u003e || \u003ctrue, m, o\u003e\n    \u003ccmd1, m, o\u003e || \u003cstop, m1, o1\u003e\n    ---------------------------------------------------------------- :: if_true\n    \u003cif b then cmd1 else cmd2 end, m, o\u003e || \u003cstop, m1, o1\u003e\n    \n    \u003cb, m, o\u003e || \u003cfalse, m, o\u003e\n    \u003ccmd2, m, o\u003e || \u003cstop, m2, o2\u003e\n    ---------------------------------------------------------------- :: if_false\n    \u003cif b then cmd1 else cmd2 end, m, o\u003e || \u003cstop, m2, o2\u003e\n    \nis transformed into\n\n    E |- b : l_b\n    \u003cE, pc, b, m, o\u003e || \u003cE, pc, true, m, o\u003e\n    \u003cE, pc |_| l_b, cmd1, m, o\u003e || \u003cE, pc |_| l_b, stop, m1, o1\u003e\n    ---------------------------------------------------------------- :: if_true\n    \u003cE, pc, if b then cmd1 else cmd2 end, m, o\u003e ||  \u003cE, pc, stop, m1, o1\u003e\n    \n    E |- b : l_b\n    \u003cE, pc |_| l_b, cmd2, m, o\u003e || \u003cE, pc |_| l_b, stop, m2, o2\u003e\n    \u003cE, pc, b, m, o\u003e || \u003cE, pc, false, m, o\u003e\n    ---------------------------------------------------------------- :: if_false\n    \u003cE, pc, if b then cmd1 else cmd2 end, m, o\u003e ||  \u003cE, pc, stop, m2, o2\u003e\n```\n\n\n## Usage\n```\n-i [.ott file]                       Specification to use as input.\n-m [generation | verification]       Ott-IFC's mode. Use \"generation\" to generate a mechanism and \"verification\" to verify an existing mechanism.\n```\n\n### Assumptions\n - The specification for the language is contained in a single file\n - The language's syntax is composed of two types of productions: expressions and commands.\n - The semantics program states are of the form *\u003ccommand, memory, outputs\u003e*","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrew-bedford%2Fott-ifc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandrew-bedford%2Fott-ifc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandrew-bedford%2Fott-ifc/lists"}