{"id":23792503,"url":"https://github.com/se2p/bastet","last_synced_at":"2025-09-06T10:32:44.470Z","repository":{"id":80478186,"uuid":"291049928","full_name":"se2p/Bastet","owner":"se2p","description":"BASTET program analysis and verification framework","archived":false,"fork":false,"pushed_at":"2021-10-28T13:32:33.000Z","size":14124,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-07T01:41:59.552Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/se2p.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2020-08-28T13:10:51.000Z","updated_at":"2021-10-28T13:32:34.000Z","dependencies_parsed_at":"2023-02-27T13:01:27.258Z","dependency_job_id":null,"html_url":"https://github.com/se2p/Bastet","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/se2p/Bastet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/se2p%2FBastet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/se2p%2FBastet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/se2p%2FBastet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/se2p%2FBastet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/se2p","download_url":"https://codeload.github.com/se2p/Bastet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/se2p%2FBastet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273892811,"owners_count":25186560,"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-09-06T02:00:13.247Z","response_time":2576,"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":"2025-01-01T18:35:27.820Z","updated_at":"2025-09-06T10:32:44.458Z","avatar_url":"https://github.com/se2p.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BASTET Framework\n\n*BASTET* is a program analysis and verification framework.\nIt is the first framework of its kind entirely built on Web technologies\nsuch as NodeJs, TypeScript, and WebAssembly.\n\nWhile *BASTET* was designed to analyze Scratch programs,\nit actually operates on an *intermediate language*. You should\nconsider using *BASTET* as the foundation for your endeavors in context\nof program analysis and verification if you are looking for a well-engineered\nanalysis framework entirely written in *TypeScript*.\nYou might also be interested in our bindings for the Z3 SMT solver\nwritten for *BASTET*.\n\nCurrently, this framework implements:\n- Abstract interpretation (including its lattice-theoretical foundations)\n- Configurable program analysis (a variant of it)\n- Model checking (of software)\n\n*BASTET* is developed at the [Chair of Software Engineering II](https://www.fim.uni-passau.de/lehrstuhl-fuer-software-engineering-ii/)\nof the [University of Passau](https://www.uni-passau.de).\nSee the list of [contributors](./CONTRIBUTORS.md) and `git shortlog -sne` for all people that contributed to this project.\n\n### Development Environment\n\n- NodeJs 14.x \n- TypeScript 4.x (`npm install -g typescript@4.1.2`)\n- JetBrains WebStorm 2020.x\n\n### Building BASTET\n\n```\nnpm install\nnpm run build\n```\n\n### Running BASTET\n\nWe recommend using the `bastet.sh` wrapper script (can be started from a Unix shell):\n\n```\n./scripts/bastet.sh \\\n    --program test/programs/hello.sc \\\n    --specification test/programs/empty.sc \\\n    --intermediateLibrary src/public/library.sc\n```\n\n*BASTET* can also be executed from within a Docker container:\n\n```\ndocker run \\\n    --mount type=bind,source=${INPUT_DIR},target=/input \\\n    --mount type=bind,source=${OUTPUT_DIR},target=/output \\\n    bastet:9a9e226 \\\n    /bin/bash ./scripts/bastet.sh\n```\nwhere `bastet:9a9e226` is the identifier of the Docker image \nthat was loaded to Docker.\n\nSee the files [docker-build.sh](./docker-build.sh) and\n[docker-load-run.sh](./docker-load-run.sh) for more details.\n\n## LeILa\n\n*BASTET* operates on *LeILa* programs (Learners' Intermediate Language). \nBefore a Scratch program can be analyzed by *BASTET*, both the given\nprogram and the formal specification have to be translated to LeILa \nas the intermediate language for analysis. \nThe grammar of *LeILa* is defined in the file [Leila.g4](src/bastet/syntax/parser/grammar/Leila.g4).\n\nFor now, the translation of *SCRATCH* programs to *LeiLa* is implemented\nin the tool [LitterBox](https://github.com/se2p/LitterBox). *BASTET* uses\n*LitterBox* as a library to conduct the translation. Invoking\n`bastet.sh` with a `.sb3` Scratch project file leads\nto an automatic translation to *LeILa*.\n\nNote that the formal specification of Scratch projects also has to be\nprovided as a *LeILa* program—which then observes if the program under\nanalysis behaves correctly.\nSee the directory [ase20-verified](test/programs/publications/ase20-verified/) for\nexamples of Scratch programs along with their formal specifications written\nin *LeILa*.\n\n## Scratch Block Library\n\nThe *BASTET* framework includes the [Scratch Block Library](src/public/library.sc).\nEach block that can be visually composed in the Scratch IDE either has a counterpart\nin the Scratch Block Library—in the form of a corresponding method—or \ncorresponds to a construct of the language *LeILa* itself.\n\nThe Scratch Block Library is steadily growing and different implementations and \napproximations of the different Scratch blocks become available.\nPlease see the ASE'20 paper for more details on the approximations.\nNote that the actual implementation of some Scratch blocks might \nstill be missing: Check the completeness of their implementation before\nconducting an analysis of Scratch projects.\n\n## Publications and Citing\n\nThe *BASTET* framework was presented in our **ASE'20** paper with the \ntitle *\"Verified from Scratch: Program Analysis for Learners’ Programs\"*:\n\n```\n@inproceedings{VerifiedFromScratch,\n  author    = {Andreas Stahlbauer and\n               Christoph Frädrich and\n               Gordon Fraser},\n  title     = {Verified from Scratch: Program Analysis for Learners’ Programs},\n  booktitle = {{ASE}},\n  publisher = {{IEEE}},\n  year      = {2020}\n}\n```\n\nSome foundations for this work were developed in our **FSE'19** paper on *\"Testing\nScratch Programs Automatically\"*:\n\n```\n@inproceedings{TestingScratchPrograms,\n  author    = {Andreas Stahlbauer and\n               Marvin Kreis and\n               Gordon Fraser},\n  title     = {Testing Scratch Programs Automatically},\n  booktitle = {{ESEC/SIGSOFT} {FSE}},\n  pages     = {165--175},\n  publisher = {{ACM}},\n  year      = {2019}\n}\n```\n\n## Funding\n\nThis work is supported by EPSRC project EP/N023978/2 and \nDFG project FR 2955/3-1 *“TENDER-BLOCK: Testing, Debugging, \nand Repairing Blocks-based Programs”*. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fse2p%2Fbastet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fse2p%2Fbastet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fse2p%2Fbastet/lists"}