{"id":26608510,"url":"https://github.com/viperproject/smt-scope","last_synced_at":"2025-08-09T23:09:45.179Z","repository":{"id":191640334,"uuid":"685075667","full_name":"viperproject/smt-scope","owner":"viperproject","description":"SMTscope automatically analyses and visualises SMT solver execution traces.","archived":false,"fork":false,"pushed_at":"2025-03-20T01:22:18.000Z","size":191122,"stargazers_count":39,"open_issues_count":7,"forks_count":5,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-07-22T10:16:43.708Z","etag":null,"topics":["axiom","e-matching","instantiation","profiler","quantifiers","smt","z3"],"latest_commit_sha":null,"homepage":"https://viperproject.github.io/smt-scope/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/viperproject.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-08-30T13:16:41.000Z","updated_at":"2025-07-14T06:39:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"69c7c1a9-db72-46b8-a1b7-795d9b3929aa","html_url":"https://github.com/viperproject/smt-scope","commit_stats":null,"previous_names":["oskari1/axiom-profiler","viperproject/axiom-profiler-2","viperproject/smt-scope"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/viperproject/smt-scope","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viperproject%2Fsmt-scope","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viperproject%2Fsmt-scope/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viperproject%2Fsmt-scope/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viperproject%2Fsmt-scope/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/viperproject","download_url":"https://codeload.github.com/viperproject/smt-scope/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/viperproject%2Fsmt-scope/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269649848,"owners_count":24453541,"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-08-09T02:00:10.424Z","response_time":111,"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":["axiom","e-matching","instantiation","profiler","quantifiers","smt","z3"],"created_at":"2025-03-24T00:00:53.120Z","updated_at":"2025-08-09T23:09:45.164Z","avatar_url":"https://github.com/viperproject.png","language":"Rust","funding_links":[],"categories":["Projects"],"sub_categories":["Provers and Solvers"],"readme":"![SMTScope](smt-scope-gui/assets/html/logo_side_small.png \"SMTScope\")\n\n[Runs online](https://viperproject.github.io/smt-scope/) · [Tutorial](https://github.com/viperproject/smt-scope/wiki/Tutorial)\n\nA tool for visualising, analysing and understanding quantifier instantiations made via E-matching in a run of an SMT solver (at present, only [Z3](https://github.com/Z3Prover/z3) has been modified to provide the necessary log files).\nThe tool takes a log file (which can be generated by Z3 by passing additional command-line options; see below) and presents information visually, primarily using a graph representation of the quantifier instantiations made and their causal connections.\nThis graph can be filtered and explored in a variety of ways, and detailed explanations of individual quantifier instantiations are assembled and displayed. A range of customisations are available for aiding the presentation and understanding of this information, including explanations of equalities used to justify a quantifier instantiation.\n\nThis tool supersedes the [Axiom Profiler](https://github.com/viperproject/axiom-profiler). S\u003cb\u003e\u003csub\u003e\u003csup\u003eMT\u003c/sup\u003e\u003c/sub\u003e\u003c/b\u003eS\u003cb\u003e\u003csub\u003e\u003csup\u003eCOPE\u003c/sup\u003e\u003c/sub\u003e\u003c/b\u003e is more stable, ~10x faster and is better a debugging z3 performance issues.\n\nMore details of the tool's features can be found in the [README](https://github.com/viperproject/axiom-profiler/blob/master/README.md) of the old tool.\n\n## Obtaining a z3 trace\n\n\u003e NOTE: S\u003cb\u003e\u003csub\u003e\u003csup\u003eMT\u003c/sup\u003e\u003c/sub\u003e\u003c/b\u003eS\u003cb\u003e\u003csub\u003e\u003csup\u003eCOPE\u003c/sup\u003e\u003c/sub\u003e\u003c/b\u003e requires at least version 4.8.5 of [z3](https://github.com/z3prover/z3/releases).\n\nRun Z3 with two extra command-line options:\n\n```\nz3 trace=true proof=true ./input.smt2\n```\n\nThis will produce a trace file called `./z3.log`.\nIf you want to specify the target filename, you can pass a third option:\n\n```\nz3 trace=true proof=true trace-file-name=foo.log ./input.smt2\n```\n\n\u003e NOTE: if this takes too long, it is possible to run S\u003cb\u003e\u003csub\u003e\u003csup\u003eMT\u003c/sup\u003e\u003c/sub\u003e\u003c/b\u003eS\u003cb\u003e\u003csub\u003e\u003csup\u003eCOPE\u003c/sup\u003e\u003c/sub\u003e\u003c/b\u003e with a prefix of a valid trace file - you could potentially kill the z3 process and obtain the corresponding partial trace. Some users (especially on Windows) have reported that killing z3 can cause a lot of the file contents to disappear; if you observe this problem, it's recommended to copy the trace file before killing the process.\n\nSimilarly, if you have a trace file which takes too long to load into S\u003cb\u003e\u003csub\u003e\u003csup\u003eMT\u003c/sup\u003e\u003c/sub\u003e\u003c/b\u003eS\u003cb\u003e\u003csub\u003e\u003csup\u003eCOPE\u003c/sup\u003e\u003c/sub\u003e\u003c/b\u003e, hitting Cancel will cause the tool to work with the portion loaded so far.\n\nTo correctly parse the trace file, we impose a few [restrictions](design-docs/restrictions.md) on the smt2 file given to z3.\n\n## Obtaining a trace from various verification tools that use z3 (feel free to add more)\n\n### Boogie\n\nBoogie can forward flags to z3 with `proverOpt:O:...`. For example:\n\n```\nboogie /vcsCores:1 /proverOpt:O:trace=true /proverOpt:O:proof=true ./file.bpl\n```\n\nBoogie can also dump the `.smt2` file it gives to z3. For example:\n\n```\nboogie /proverLog:query-@PROC@.smt2 ./file.bpl\n```\n\n### Viper (silicon)\n\nSilicon can dump the `.smt2` file it gives to z3. For example:\n\n```\nsilicon --numberOfParallelVerifiers 1 --proverLogFile query ./file.vpr\n```\n\nThen use the `z3` commands from [above](#obtaining-a-z3-trace) to generate the trace file from the resulting `.smt2` file.\n\nSilicon can also forward flags to z3 with `--z3Args`, but when verifying multiple methods/functions the traces for each will be overwritten. For example:\n\n```\nsilicon --numberOfParallelVerifiers 1 --z3Args \"trace=true proof=true\" ./file.vpr\n```\n\nIf it complains about an unrecognized argument, try escaping the double-quotes. E.g.:\n\n```\n# Unix-like systems\nsilicon --numberOfParallelVerifiers 1 --z3Args '\"trace=true proof=true\"' ./file.vpr\n\n# Windows\nsilicon --numberOfParallelVerifiers 1 --z3Args \"\"\"trace=true proof=true\"\"\" ./file.vpr\n```\n\n### Viper (carbon)\n\nCarbon can forward flags to Boogie with `--boogieOpt`, then use the same flags as listed [there](#boogie). For example:\n\n```\ncarbon --boogieOpt \"/vcsCores:1 /proverOpt:O:trace=true /proverOpt:O:proof=true\" ./file.vpr\n```\n\nCarbon can also dump the `.bpl` file it gives to Boogie. For example:\n\n```\ncarbon --print ./file.bpl ./file.vpr\n```\n\n### Dafny\n\nSee these instructions in Dafny's wiki: [Investigating slow verification performance](https://github.com/dafny-lang/dafny/wiki/Investigating-slow-verification-performance).\n\nDafny does not seem to support getting the trace file with the new configuration options, therefore we need to use the old mode. In the old mode flags are directly forwarded to Boogie. For example:\n\n```\ndafny /compile:0 /vcsCores:1 /proverOpt:O:trace=true /proverOpt:O:proof=true ./file.dfy\n```\n\nThis can be used to get the `.smt2` file (as above, using `/proverLog:query-@PROC@.smt2`). Dafny can also dump the `.bpl` file it gives to Boogie. For example:\n\n```\ndafny /compile:0 /print:file.bpl ./file.dfy\n```\n\n### FStar\n\nSee these instructions in FStar's wiki: [Profiling Z3 queries](https://github.com/FStarLang/FStar/wiki/Profiling-Z3-queries).\n\nUsing the `--log_queries` flag should dump the `.smt2` file it gives to z3.\n\n### VerCors\n\nVerCors can forward flags to the silicon backend with `--backend-option`, then use the same flags as listed [there](#viper-silicon). For example:\n\n```\nvercors ./file.pvl --backend-option --numberOfParallelVerifiers=1 --backend-option --z3Args=\"trace=true proof=true\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviperproject%2Fsmt-scope","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fviperproject%2Fsmt-scope","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviperproject%2Fsmt-scope/lists"}