{"id":18582773,"url":"https://github.com/gikoskos/simbly","last_synced_at":"2025-04-10T11:36:29.147Z","repository":{"id":98957694,"uuid":"116424080","full_name":"Gikoskos/simbly","owner":"Gikoskos","description":"Multithreaded runtime and interpreter for programs written in a tiny assembly-like language","archived":false,"fork":false,"pushed_at":"2018-01-11T19:22:38.000Z","size":390,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T20:51:11.522Z","etag":null,"topics":["c","cmake","concurrency","concurrent","data-structures","interpreter","language","multithreading","pthreads","runtime","toy-language","unix"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Gikoskos.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}},"created_at":"2018-01-05T20:29:43.000Z","updated_at":"2024-11-21T10:38:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"fc6f0c9d-28cf-456b-90f7-19ab6ed009b1","html_url":"https://github.com/Gikoskos/simbly","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gikoskos%2Fsimbly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gikoskos%2Fsimbly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gikoskos%2Fsimbly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Gikoskos%2Fsimbly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Gikoskos","download_url":"https://codeload.github.com/Gikoskos/simbly/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248208689,"owners_count":21065205,"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":["c","cmake","concurrency","concurrent","data-structures","interpreter","language","multithreading","pthreads","runtime","toy-language","unix"],"created_at":"2024-11-07T00:14:19.783Z","updated_at":"2025-04-10T11:36:24.133Z","avatar_url":"https://github.com/Gikoskos.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# simbly\n\nMultithreaded runtime for a simple dynamically typed assembly-like language. All variables are of type integer or array of integers. Has a small shell and supports running multiple programs simultaneously.\n\nIn the pic below you can see, on the left column, the grammar of the language, and on the right column a pseudo-C meaning of what each instruction does.\n\n![](https://i.imgur.com/KgMjhTy.png) \n\nThere are no functions or support for any kind of a call stack.\n\nAll programs have their own local variables that they can operate on, sort of like registers. There are also global variables that all programs can read and write to, sort of like a RAM.\n\nAll variables are defined when they are first used. If no value is assigned to them they will be initialized with the value 0. In this program\n\n```\n#PROGRAM\nPRINT \"val =\" $val\n```\n\n`val` wasn't initialized to anything, therefore the interpreter will initialize a local variable with the name `val` and assign to it the value 0. That program will simply print `val = 0`.\n\nGlobals can be seen from all the programs and are dynamically typed just like locals. However, globals can only be accessed through the instructions `LOAD` and `STORE` and no immediate operations would work on them. They can also be used like a semaphore, to synchronize with other running programs, through the instructions `DOWN` and `UP`.\n\nThis program\n\n```\n#PROGRAM\nSTORE $g 15\nLOAD $x $g\nPRINT \"x g =\" $x $g\n```\ncreates a global named `g` and initializes it to 15. It assigns the value of `g` to a local variable `x` and then prints `x` and `g`. The `PRINT` instruction can only print local variables and it will try to find a local named `g`, but since there are no locals with that name, it will instead create one. By the end the program will have two locals named `x` and `g`, and one global named `g`.\n\nIt will print `x g = 15 0`.\n\nSample programs that implement various concurrency problems can be found in the `test_programs` folder. Rend1 and Rend2 are for the rendezvous problem. Init, Producer and Consumer are for the producer/consumer problem (you need to execute Init.txt first, to initialize the global variables). Barber and Customer are for the sleeping barber problem. InitRW, Reader and Writer are for the reader/writer problem (you need to execute InitRW.txt first).\n\n## Building\n\nSupported OS is Linux and compiler is gcc. Might work on BSD too but it hasn't been tested there.\n\nExternal dependency is [libvoids](https://github.com/Gikoskos/libvoids) which is used for all the data structures in the program. Clone this repository with the `recursive` flag:\n\n`git clone --recursive https://github.com/Gikoskos/simbly`\n\nto download all the submodules.\n\nBuild system is cmake:\n\n`mkdir build \u0026\u0026 cd build \u0026\u0026 cmake .. \u0026\u0026 make`\n\n## How to use\n\nRun the command `help`, after executing the program, to get a list of all the possible commands.\n\n## License\n\nsee LICENSE\n\nThis was a lab project for UTH\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgikoskos%2Fsimbly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgikoskos%2Fsimbly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgikoskos%2Fsimbly/lists"}