{"id":28260518,"url":"https://github.com/stepbrobd/srd","last_synced_at":"2025-07-17T21:37:55.632Z","repository":{"id":143200556,"uuid":"595315404","full_name":"stepbrobd/srd","owner":"stepbrobd","description":"srd: (go) static race detector","archived":false,"fork":false,"pushed_at":"2023-10-20T22:41:44.000Z","size":286,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-18T03:37:27.594Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","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/stepbrobd.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-01-30T20:44:15.000Z","updated_at":"2023-08-31T19:53:53.000Z","dependencies_parsed_at":"2023-07-08T01:15:30.055Z","dependency_job_id":"d868a434-f4ed-4a49-a3a0-33bd9595851f","html_url":"https://github.com/stepbrobd/srd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stepbrobd/srd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stepbrobd%2Fsrd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stepbrobd%2Fsrd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stepbrobd%2Fsrd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stepbrobd%2Fsrd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stepbrobd","download_url":"https://codeload.github.com/stepbrobd/srd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stepbrobd%2Fsrd/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265663125,"owners_count":23807465,"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":[],"created_at":"2025-05-20T04:10:38.569Z","updated_at":"2025-07-17T21:37:55.627Z","avatar_url":"https://github.com/stepbrobd.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SRD: (Go) Static Race Detector\n\nA proof of concept work of extracting Structural Operational Semantics rules and applying it to do static race detection.\n\n## Structural Operational Semantics Rules\n\n$\\textbf{Goroutine Creation}\\ \\frac{}{(G, M, C) \\xrightarrow{\\texttt{go f()}} (G \\cup \\{\\texttt{f()}\\}, M, C)}$\n\n$\\textbf{Memory Modification}\\ \\frac{\\texttt{f()}\\ \\text{is}\\ \\texttt{data++}}{(G, M, C) \\xrightarrow{\\texttt{go f()}} (G - \\{\\texttt{f()}\\}, M[\\texttt{data} \\rightarrow M(\\texttt{data}) + 1], C)}$\n\n$\\textbf{Channel Send}\\ \\frac{\\texttt{f()}\\ \\text{is}\\ \\texttt{done \u003c- true}}{(G, M, C) \\xrightarrow{\\texttt{go f()}} (G - \\{\\texttt{f()}\\}, M, C[\\texttt{done} \\rightarrow C(\\texttt{done}) \\cup \\{\\texttt{true}\\}])}$\n\n$\\textbf{Channel Receive}\\ \\frac{\\texttt{f()}\\ \\text{is}\\ \\texttt{\u003c-done}}{(G, M, C) \\xrightarrow{\\texttt{go f()}} (G - \\{\\texttt{f()}\\}, M, C[\\texttt{done} \\rightarrow C(\\texttt{done}) - \\{\\texttt{true}\\}])}$\n\n$\\textbf{Print}\\ \\frac{\\texttt{f()}\\ \\text{is}\\ \\texttt{fmt.Println(data)}}{(G, M, C) \\xrightarrow{\\texttt{go f()}} (G \\cup \\{\\texttt{f()}\\}, M, C)}$\n\n## Run\n\nUsing Nix:\n\n```shell\nnix run nixpkgs#go -- run -race cmd/srd/main.go -- examples/example_*.go\n```\n\n## Report\n\n```shell\nnix shell nixpkgs#texlive.combined.scheme-full -c pdflatex docs/main.tex\nnix shell nixpkgs#texlive.combined.scheme-full -c bibtex main.aux\nnix shell nixpkgs#texlive.combined.scheme-full -c pdflatex docs/main.tex\n```\n\n## License\n\nThis repository content excluding all submodules is licensed under the [MIT License](license.md), third-party code are subject to their original license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstepbrobd%2Fsrd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstepbrobd%2Fsrd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstepbrobd%2Fsrd/lists"}