{"id":20504492,"url":"https://github.com/pkutcs-cbs/cbsverifi","last_synced_at":"2025-10-13T18:08:56.910Z","repository":{"id":166453923,"uuid":"388974252","full_name":"PKUTCS-CBS/CBSVerifi","owner":"PKUTCS-CBS","description":"Verify the basic operations in cloud block storage","archived":false,"fork":false,"pushed_at":"2021-07-24T13:42:42.000Z","size":576,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-05T20:55:27.909Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Coq","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PKUTCS-CBS.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-24T02:00:55.000Z","updated_at":"2023-03-09T12:40:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"5ea56292-ce20-4a2f-83ab-63b2ec850639","html_url":"https://github.com/PKUTCS-CBS/CBSVerifi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PKUTCS-CBS/CBSVerifi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PKUTCS-CBS%2FCBSVerifi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PKUTCS-CBS%2FCBSVerifi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PKUTCS-CBS%2FCBSVerifi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PKUTCS-CBS%2FCBSVerifi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PKUTCS-CBS","download_url":"https://codeload.github.com/PKUTCS-CBS/CBSVerifi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PKUTCS-CBS%2FCBSVerifi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279016553,"owners_count":26085850,"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-10-13T02:00:06.723Z","response_time":61,"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-15T19:38:24.271Z","updated_at":"2025-10-13T18:08:56.863Z","avatar_url":"https://github.com/PKUTCS-CBS.png","language":"Coq","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 一种基于分离逻辑的块云存储系统验证工具\n\n在交互式定理证明工具Coq中，我们实现了一个针对块云存储系统（CBS）的验证工具。它具备分离逻辑的关键特性，尤其能支持对CBS程序进行局部推导。\n\n对应实际CBS的主从式架构，工具将CBS细分为两个存储层级:文件层、块层。通过整合内部层级的状态和操作，工具支持表示和验证对实际CBS中的各项数据操作。\n\n## 工具中证明系统的构建环节\n\n事实上，我们基于分离逻辑，实现了一个关于CBS的证明系统。它涉及到构建建模语言、断言语言、分离逻辑三元组和推理规则等环节。这些环节与工程文件的对应关系如下：\n\n- 建模语言——Language.v\n- 断言语言——内部堆谓词（InnerPre.v）+ CBS堆谓词（Himpl.v）\n- CBS分离逻辑三元组和推理规则——Rules.v\n- 验证实例——Example.v \n\n此外，还有一些支持工具开发的原有库文件\n\n- TLC：Coq标准库\n- Fmap.v：有限映射\n- Var.v: 变量符号\n\n工具的实现共涉及3325行代码，其中包括51条定义，242条引理。\n\n最后，工具还提供了7个实例的证明，它们分别为：拷贝数据块、移动数据块、清除文件、读取文件内容、向文件尾部添加一个数据块、创建文件、拷贝文件。以此说明了工具对CBS程序的表示和推理能力。\n\n## 工具的开发环境\n\n本工具的开发环境为：\n\n- 操作系统：Windows 10\n- Coq版本：Coq 8.8.0\n- IDE : vscode\n\n## 工具的编译方式\n\n### 1. 下载压缩包文件到本地，并解压缩\n\n​\t**注意**：解压缩后的文件路径中，不可以有中文！！\n\n### 2. 安装Coq 8.8.0并配置环境变量\n\n- 安装Coq\n\n​\t下载地址：\n\n​\thttps://github.com/coq/coq/releases/download/V8.8.0/coq-8.8.0-installer-windows-x86_64.exe\n\n完成安装后，需要配置Coq的环境变量：\n\n- 打开环境变量设置\n\n\u003cimg src=\"image\\image-20210724145029025.png\" alt=\"avatar\" style=\"zoom:35%;\" /\u003e\n\n- 在系统变量的Path一栏中，添加Coq的安装路径\n\n\u003cimg src=\"image\\image-20210724155616354.png\" alt=\"avatar\" style=\"zoom:50%;\" /\u003e\n\n\u003cimg src=\"image\\image-20210724145233682.png\" alt=\"avatar\" style=\"zoom:35%;\" /\u003e\n\n### 3. 在Windows中安装make编译工具\n\n-  安装终端模拟器Cmder（**需要安装full版本**）\n\n   下载地址：https://cmder.net/\n\n​\tcmder解压后即可使用，建议和本工具文件解压到同一个根目录中。\n\n\u003cimg src=\"image\\image-20210724160349470.png\" alt=\"avatar\" zoom=90% /\u003e\n\n- 以**管理员方式**打开cmder，粘贴如下指令\n\n  - 安装软件管理器Chocolatey：\n\n    `@powershell -NoProfile -ExecutionPolicy unrestricted -Command \"iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))\" \u0026\u0026 SET PATH=%PATH%;%ALLUSERSPROFILE%\\chocolatey\\bin`\n    \n    注:如果出现` ... 未能创建SSL/TLS安全通道 ... `的问题时,可参考如下网站进行解决.\n       https://blog.csdn.net/qq_43650934/article/details/106637645\n\n  - 安装make编译工具：\n\n    `choco install make`\n\n### 4. 安装完成后，重新打开cmder窗口，进入到解压后的工具文件夹，输入make即可开始编译\n\n\u003cimg src=\"image\\image-20210724145814033.png\" alt=\"avatar\" style=\"zoom:50%;\" /\u003e\n\n\n\n最后，直接双击*.v文件，可以用CoqIDE审阅相应的代码。\n\n（如果此时Coq崩溃，说明路径中有中文）\n\n\u003cimg src=\"image\\image-20210724150102388.png\" alt=\"avatar\" style=\"zoom:80%;\" /\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpkutcs-cbs%2Fcbsverifi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpkutcs-cbs%2Fcbsverifi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpkutcs-cbs%2Fcbsverifi/lists"}