{"id":21374788,"url":"https://github.com/radrow/tiny-semantics","last_synced_at":"2025-03-16T09:20:47.402Z","repository":{"id":137636820,"uuid":"165848297","full_name":"radrow/Tiny-Semantics","owner":"radrow","description":"Task for Semantics and Programs Verification course at MIMUW – denotational semantics of extended Tiny programming language in continuational style","archived":false,"fork":false,"pushed_at":"2020-10-12T10:20:46.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-22T21:28:28.341Z","etag":null,"topics":["continuation-passing-style","haskell","interpreter","programming-language","semantics"],"latest_commit_sha":null,"homepage":null,"language":"Haskell","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/radrow.png","metadata":{"files":{"readme":"README.org","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":"2019-01-15T12:36:39.000Z","updated_at":"2023-12-03T03:10:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"e2ea211e-f4bd-4d26-81d7-9be5f3184db6","html_url":"https://github.com/radrow/Tiny-Semantics","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/radrow%2FTiny-Semantics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radrow%2FTiny-Semantics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radrow%2FTiny-Semantics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/radrow%2FTiny-Semantics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/radrow","download_url":"https://codeload.github.com/radrow/Tiny-Semantics/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243847965,"owners_count":20357471,"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":["continuation-passing-style","haskell","interpreter","programming-language","semantics"],"created_at":"2024-11-22T08:45:25.600Z","updated_at":"2025-03-16T09:20:47.373Z","avatar_url":"https://github.com/radrow.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"* Tiny-Semantics\n\nTiny is a minimalistic programming language featuring evaluation of simple expressions like ~+~, ~-~, ~*~ on integral numbers along with some basic logic expressions to handle ~if~ statements.\n\n#+BEGIN_SRC haskell\ndata Expr = LitInt Integer \n          | Var VarName\n          | Plus Expr Expr\n          | Minus Expr Expr\n          | Mult Expr Expr\n\ndata BExpr = LitBool Bool\n           | Con BExpr BExpr \n           | Eq Expr Expr \n           | Lt Expr Expr \n           | Neg BExpr\n\ndata Instr = Skip\n           | Assign VarName Expr\n           | Semicolon Instr Instr \n           | If BExpr Instr Instr \n           | While BExpr Instr \n           | Begin Decl Instr  -- new feature!\n           | Call ProcName VarName  -- new feature!\n#+END_SRC\n\nThis version of Tiny is extended with variable declarations and recursive procedures. \n\n#+BEGIN_SRC haskell\ndata Decl = VarDecl VarName Expr | ProcDecl ProcName VarName Instr | EmptyDecl | ConsDecl Decl Decl\n#+END_SRC\n\nAll procedures take single argument by name reference and return nothing – the only way to gather it's result is to assign new value to the argument, for instance evaluating program:\n\n#+BEGIN_SRC haskell\nsample :: Instr\nsample = Begin (ConsDecl\n                (VarDecl \"x\" (LitInt 0))\n                (ProcDecl \"p\" \"y\"\n                 (Semicolon\n                  (Assign \"y\" (LitInt 3))\n                  (If (Eq (Var \"x\") (LitInt 3))\n                   (Assign \"y\" (LitInt 4))\n                   Skip\n                 )\n                )\n               ))\n         (Call \"p\" \"x\")\n#+END_SRC\n\nWill return state where ~x~ is bound to value ~3~.\n\nThe semantics of this language is written in continuational style as a task for MIMUW course.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fradrow%2Ftiny-semantics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fradrow%2Ftiny-semantics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fradrow%2Ftiny-semantics/lists"}