{"id":22131936,"url":"https://github.com/petroniuss/compilers","last_synced_at":"2026-05-01T01:32:12.799Z","repository":{"id":129356555,"uuid":"304661155","full_name":"Petroniuss/Compilers","owner":"Petroniuss","description":"Statically-typed Matlab-like language compiled using LLVM compiler infrastracture.","archived":false,"fork":false,"pushed_at":"2021-01-10T12:24:53.000Z","size":1026,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T09:25:23.984Z","etag":null,"topics":["compiler","llvm","llvmlite"],"latest_commit_sha":null,"homepage":"","language":"Python","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/Petroniuss.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":"2020-10-16T15:06:49.000Z","updated_at":"2025-01-26T13:08:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"ae2efdb1-1477-4768-a2b3-94ccc7d68f44","html_url":"https://github.com/Petroniuss/Compilers","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Petroniuss/Compilers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Petroniuss%2FCompilers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Petroniuss%2FCompilers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Petroniuss%2FCompilers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Petroniuss%2FCompilers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Petroniuss","download_url":"https://codeload.github.com/Petroniuss/Compilers/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Petroniuss%2FCompilers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32482460,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["compiler","llvm","llvmlite"],"created_at":"2024-12-01T18:38:27.345Z","updated_at":"2026-05-01T01:32:12.775Z","avatar_url":"https://github.com/Petroniuss.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Compilers\n\nRepository contains finished project completed during `Compilers` course at AGH UST.\n\nStatically-typed Matlab-like language compiled using LLVM compiler infrastracture.\n\n## Example program\n\nSee [Usage example](#Usage-example) below to see generated ir for this code.\n\nCode:\n\n```\nM = zeros(3, 3);\nprint M;\n\n\n# Assigining individual values works!\nM[1, 1] = 69.0;\n\n# Reading values works!\nx = M[1, 1];\nprint \"x =\", x;\n\nX = [1, 2, 3];\nfor i = 0:2 {\n    M[i, i] = X[i];\n}\n\nprint M;\n```\n\nOutput:\n\n```\n[    0.00,     0.00,     0.00    ]\n[    0.00,     0.00,     0.00    ]\n[    0.00,     0.00,     0.00    ]\n\nx =   69.00\n[    1.00,     0.00,     0.00    ]\n[    0.00,     2.00,     0.00    ]\n[    0.00,     0.00,     3.00    ]\n```\n\n## Usage example\n\nMakefile prints AST, both unoptimized and optimized IR and generates executable file which is automatically executed.\n\nCommand:\n\n```\nmake all arg=./tests/ir/slice.m\n```\n\nOutput:\n\n```\n------------------------ Compiling Runtime -------------------------\nclang++ -shared -fpic -lpthread  runtime.cpp -o ./build/runtime.so\n------------------------ Compiler -------------------------\n\u003cTarget x86-64 (64-bit X86: EM64T and AMD64)\u003e\n------------------------ Compiling ./tests/ir/slice.m  ------------------------\nM = zeros(3, 3);\nprint M;\n\n\n# Assigining individual values works!\nM[1, 1] = 69.0;\n\n# Reading values works!\nx = M[1, 1];\nprint \"x =\", x;\n\nX = [1, 2, 3];\nfor i = 0:2 {\n    M[i, i] = X[i];\n}\n\nprint M;\n------------------------ Abstract Syntax Tree  ------------------------\nRoot\n└── CodeBlock\n    ├── =\n    │   ├── FunctionCall\n    │   │   ├── Int\n    │   │   │   └── 3\n    │   │   ├── Int\n    │   │   │   └── 3\n    │   │   └── zeros\n    │   └── ID\n    │       └── M\n    ├── =\n    │   ├── Float\n    │   │   └── 69.0\n    │   └── VectorSlice\n    │       ├── ID\n    │       │   └── M\n    │       ├── SimpleRange\n    │       │   └── Int\n    │       │       └── 1\n    │       └── SimpleRange\n    │           └── Int\n    │               └── 1\n    ├── =\n    │   ├── ID\n    │   │   └── x\n    │   └── VectorSlice\n    │       ├── ID\n    │       │   └── M\n    │       ├── SimpleRange\n    │       │   └── Int\n    │       │       └── 1\n    │       └── SimpleRange\n    │           └── Int\n    │               └── 1\n    ├── =\n    │   ├── ID\n    │   │   └── X\n    │   └── Vector\n    │       ├── Int\n    │       │   └── 1\n    │       ├── Int\n    │       │   └── 2\n    │       └── Int\n    │           └── 3\n    ├── For\n    │   ├── CodeBlock\n    │   │   └── =\n    │   │       ├── VectorSlice\n    │   │       │   ├── ID\n    │   │       │   │   └── M\n    │   │       │   ├── SimpleRange\n    │   │       │   │   └── ID\n    │   │       │   │       └── i\n    │   │       │   └── SimpleRange\n    │   │       │       └── ID\n    │   │       │           └── i\n    │   │       └── VectorSlice\n    │   │           ├── ID\n    │   │           │   └── X\n    │   │           └── SimpleRange\n    │   │               └── ID\n    │   │                   └── i\n    │   ├── ID\n    │   │   └── i\n    │   └── Range\n    │       ├── Int\n    │       │   └── 0\n    │       └── Int\n    │           └── 2\n    ├── FunctionCall\n    │   ├── ID\n    │   │   └── M\n    │   └── print\n    ├── FunctionCall\n    │   ├── ID\n    │   │   └── x\n    │   ├── String\n    │   │   └── x =\n    │   └── print\n    └── FunctionCall\n        ├── ID\n        │   └── M\n        └── print\n\n------------------------ Unoptimized IR  ------------------------\n; ModuleID = \"Main\"\ntarget triple = \"unknown-unknown-unknown\"\ntarget datalayout = \"\"\n\ndeclare i8* @\"formatInt\"(i32 %\".1\")\n\ndeclare i8* @\"formatDouble\"(double %\".1\")\n\ndeclare void @\"freeString\"(i8* %\".1\")\n\ndeclare void @\"putLn\"()\n\ndeclare void @\"putStrLn\"(i8* %\".1\")\n\ndeclare void @\"putVectorLn\"({}* %\".1\")\n\ndeclare void @\"putStr\"(i8* %\".1\")\n\ndeclare {}* @\"zeros\"(i32 %\".1\", i32* %\".2\")\n\ndeclare {}* @\"ones\"(i32 %\".1\", i32* %\".2\")\n\ndeclare {}* @\"dotAdd\"({}* %\".1\", {}* %\".2\")\n\ndeclare {}* @\"dotMinus\"({}* %\".1\", {}* %\".2\")\n\ndeclare {}* @\"dotMult\"({}* %\".1\", {}* %\".2\")\n\ndeclare {}* @\"dotDiv\"({}* %\".1\", {}* %\".2\")\n\ndeclare void @\"assignValue\"({}* %\".1\", i32* %\".2\", i32 %\".3\", double %\".4\")\n\ndeclare double @\"readValue\"({}* %\".1\", i32* %\".2\", i32 %\".3\")\n\ndeclare {}* @\"literalNVector\"(i32 %\".1\", i32* %\".2\", double* %\".3\")\n\ndefine i32 @\"main\"()\n{\nentry:\n  %\".2\" = alloca [2 x i32]\n  %\".3\" = getelementptr [2 x i32], [2 x i32]* %\".2\", i32 0, i32 0\n  store i32 3, i32* %\".3\"\n  %\".5\" = getelementptr [2 x i32], [2 x i32]* %\".2\", i32 0, i32 1\n  store i32 3, i32* %\".5\"\n  %\".7\" = getelementptr [2 x i32], [2 x i32]* %\".2\", i32 0, i32 0\n  %\".8\" = call {}* @\"zeros\"(i32 2, i32* %\".7\")\n  %\"M\" = alloca {}*\n  store {}* %\".8\", {}** %\"M\"\n  %\".10\" = load {}*, {}** %\"M\"\n  call void @\"putVectorLn\"({}* %\".10\")\n  call void @\"putLn\"()\n  %\".13\" = alloca [6 x i32]\n  %\".14\" = getelementptr [6 x i32], [6 x i32]* %\".13\", i32 0, i32 0\n  store i32 1, i32* %\".14\"\n  %\".16\" = getelementptr [6 x i32], [6 x i32]* %\".13\", i32 0, i32 1\n  store i32 1, i32* %\".16\"\n  %\".18\" = getelementptr [6 x i32], [6 x i32]* %\".13\", i32 0, i32 2\n  store i32 0, i32* %\".18\"\n  %\".20\" = getelementptr [6 x i32], [6 x i32]* %\".13\", i32 0, i32 3\n  store i32 1, i32* %\".20\"\n  %\".22\" = getelementptr [6 x i32], [6 x i32]* %\".13\", i32 0, i32 4\n  store i32 1, i32* %\".22\"\n  %\".24\" = getelementptr [6 x i32], [6 x i32]* %\".13\", i32 0, i32 5\n  store i32 0, i32* %\".24\"\n  %\".26\" = load {}*, {}** %\"M\"\n  %\".27\" = getelementptr [6 x i32], [6 x i32]* %\".13\", i32 0, i32 0\n  call void @\"assignValue\"({}* %\".26\", i32* %\".27\", i32 6, double 0x4051400000000000)\n  %\".29\" = alloca [6 x i32]\n  %\".30\" = getelementptr [6 x i32], [6 x i32]* %\".29\", i32 0, i32 0\n  store i32 1, i32* %\".30\"\n  %\".32\" = getelementptr [6 x i32], [6 x i32]* %\".29\", i32 0, i32 1\n  store i32 1, i32* %\".32\"\n  %\".34\" = getelementptr [6 x i32], [6 x i32]* %\".29\", i32 0, i32 2\n  store i32 0, i32* %\".34\"\n  %\".36\" = getelementptr [6 x i32], [6 x i32]* %\".29\", i32 0, i32 3\n  store i32 1, i32* %\".36\"\n  %\".38\" = getelementptr [6 x i32], [6 x i32]* %\".29\", i32 0, i32 4\n  store i32 1, i32* %\".38\"\n  %\".40\" = getelementptr [6 x i32], [6 x i32]* %\".29\", i32 0, i32 5\n  store i32 0, i32* %\".40\"\n  %\".42\" = load {}*, {}** %\"M\"\n  %\".43\" = getelementptr [6 x i32], [6 x i32]* %\".29\", i32 0, i32 0\n  %\".44\" = call double @\"readValue\"({}* %\".42\", i32* %\".43\", i32 6)\n  %\"x\" = alloca double\n  store double %\".44\", double* %\"x\"\n  call void @\"putStr\"(i8* getelementptr ([4 x i8], [4 x i8]* @\"global_0\", i32 0, i32 0))\n  %\".47\" = load double, double* %\"x\"\n  %\".48\" = call i8* @\"formatDouble\"(double %\".47\")\n  call void @\"putStr\"(i8* %\".48\")\n  call void @\"freeString\"(i8* %\".48\")\n  call void @\"putLn\"()\n  %\".52\" = sitofp i32 1 to double\n  %\".53\" = getelementptr [3 x double], [3 x double]* @\"global_1\", i32 0, i32 0\n  store double %\".52\", double* %\".53\"\n  %\".55\" = sitofp i32 2 to double\n  %\".56\" = getelementptr [3 x double], [3 x double]* @\"global_1\", i32 0, i32 1\n  store double %\".55\", double* %\".56\"\n  %\".58\" = sitofp i32 3 to double\n  %\".59\" = getelementptr [3 x double], [3 x double]* @\"global_1\", i32 0, i32 2\n  store double %\".58\", double* %\".59\"\n  %\".61\" = call {}* @\"literalNVector\"(i32 1, i32* getelementptr ([1 x i32], [1 x i32]* @\"global_2\", i32 0, i32 0), double* getelementptr ([3 x double], [3 x double]* @\"global_1\", i32 0, i32 0))\n  %\"X\" = alloca {}*\n  store {}* %\".61\", {}** %\"X\"\n  br label %\"for-init-block\"\nfor-init-block:\n  %\"i\" = alloca i32\n  store i32 0, i32* %\"i\"\n  br label %\"for-condition\"\nfor-condition:\n  %\".66\" = load i32, i32* %\"i\"\n  %\".67\" = sitofp i32 %\".66\" to double\n  %\".68\" = sitofp i32 2 to double\n  %\"for-cmp\" = fcmp ule double %\".67\", %\".68\"\n  br i1 %\"for-cmp\", label %\"for-body-block\", label %\"for-merged\"\nfor-body-block:\n  %\".70\" = alloca [3 x i32]\n  %\".71\" = load i32, i32* %\"i\"\n  %\".72\" = getelementptr [3 x i32], [3 x i32]* %\".70\", i32 0, i32 0\n  store i32 %\".71\", i32* %\".72\"\n  %\".74\" = getelementptr [3 x i32], [3 x i32]* %\".70\", i32 0, i32 1\n  store i32 %\".71\", i32* %\".74\"\n  %\".76\" = getelementptr [3 x i32], [3 x i32]* %\".70\", i32 0, i32 2\n  store i32 0, i32* %\".76\"\n  %\".78\" = load {}*, {}** %\"X\"\n  %\".79\" = getelementptr [3 x i32], [3 x i32]* %\".70\", i32 0, i32 0\n  %\".80\" = call double @\"readValue\"({}* %\".78\", i32* %\".79\", i32 3)\n  %\".81\" = alloca [6 x i32]\n  %\".82\" = load i32, i32* %\"i\"\n  %\".83\" = getelementptr [6 x i32], [6 x i32]* %\".81\", i32 0, i32 0\n  store i32 %\".82\", i32* %\".83\"\n  %\".85\" = getelementptr [6 x i32], [6 x i32]* %\".81\", i32 0, i32 1\n  store i32 %\".82\", i32* %\".85\"\n  %\".87\" = getelementptr [6 x i32], [6 x i32]* %\".81\", i32 0, i32 2\n  store i32 0, i32* %\".87\"\n  %\".89\" = load i32, i32* %\"i\"\n  %\".90\" = getelementptr [6 x i32], [6 x i32]* %\".81\", i32 0, i32 3\n  store i32 %\".89\", i32* %\".90\"\n  %\".92\" = getelementptr [6 x i32], [6 x i32]* %\".81\", i32 0, i32 4\n  store i32 %\".89\", i32* %\".92\"\n  %\".94\" = getelementptr [6 x i32], [6 x i32]* %\".81\", i32 0, i32 5\n  store i32 0, i32* %\".94\"\n  %\".96\" = load {}*, {}** %\"M\"\n  %\".97\" = getelementptr [6 x i32], [6 x i32]* %\".81\", i32 0, i32 0\n  call void @\"assignValue\"({}* %\".96\", i32* %\".97\", i32 6, double %\".80\")\n  %\".99\" = load i32, i32* %\"i\"\n  %\".100\" = add i32 %\".99\", 1\n  store i32 %\".100\", i32* %\"i\"\n  br label %\"for-condition\"\nfor-merged:\n  %\".103\" = load {}*, {}** %\"M\"\n  call void @\"putVectorLn\"({}* %\".103\")\n  call void @\"putLn\"()\n  ret i32 0\n}\n\n@\"global_0\" = constant [4 x i8] [i8 120, i8 32, i8 61, i8 0]\n@\"global_1\" = global [3 x double] [double              0x0, double              0x0, double              0x0]\n@\"global_2\" = constant [1 x i32] [i32 3]\n------------------------ Optimized IR  ------------------------\n; ModuleID = '\u003cstring\u003e'\nsource_filename = \"\u003cstring\u003e\"\ntarget triple = \"unknown-unknown-unknown\"\n\n@global_0 = constant [4 x i8] c\"x =\\00\"\n@global_1 = global [3 x double] zeroinitializer\n@global_2 = constant [1 x i32] [i32 3]\n\ndeclare i8* @formatDouble(double) local_unnamed_addr\n\ndeclare void @freeString(i8*) local_unnamed_addr\n\ndeclare void @putLn() local_unnamed_addr\n\ndeclare void @putVectorLn({}*) local_unnamed_addr\n\ndeclare void @putStr(i8*) local_unnamed_addr\n\ndeclare {}* @zeros(i32, i32*) local_unnamed_addr\n\ndeclare void @assignValue({}*, i32*, i32, double) local_unnamed_addr\n\ndeclare double @readValue({}*, i32*, i32) local_unnamed_addr\n\ndeclare {}* @literalNVector(i32, i32*, double*) local_unnamed_addr\n\ndefine i32 @main() local_unnamed_addr {\nentry:\n  %.2 = alloca [2 x i32], align 4\n  %.3 = getelementptr inbounds [2 x i32], [2 x i32]* %.2, i64 0, i64 0\n  store i32 3, i32* %.3, align 4\n  %.5 = getelementptr inbounds [2 x i32], [2 x i32]* %.2, i64 0, i64 1\n  store i32 3, i32* %.5, align 4\n  %.8 = call {}* @zeros(i32 2, i32* nonnull %.3)\n  call void @putVectorLn({}* %.8)\n  call void @putLn()\n  %.13 = alloca [6 x i32], align 4\n  %.14 = getelementptr inbounds [6 x i32], [6 x i32]* %.13, i64 0, i64 0\n  store i32 1, i32* %.14, align 4\n  %.16 = getelementptr inbounds [6 x i32], [6 x i32]* %.13, i64 0, i64 1\n  store i32 1, i32* %.16, align 4\n  %.18 = getelementptr inbounds [6 x i32], [6 x i32]* %.13, i64 0, i64 2\n  store i32 0, i32* %.18, align 4\n  %.20 = getelementptr inbounds [6 x i32], [6 x i32]* %.13, i64 0, i64 3\n  store i32 1, i32* %.20, align 4\n  %.22 = getelementptr inbounds [6 x i32], [6 x i32]* %.13, i64 0, i64 4\n  store i32 1, i32* %.22, align 4\n  %.24 = getelementptr inbounds [6 x i32], [6 x i32]* %.13, i64 0, i64 5\n  store i32 0, i32* %.24, align 4\n  call void @assignValue({}* %.8, i32* nonnull %.14, i32 6, double 6.900000e+01)\n  %.29 = alloca [6 x i32], align 4\n  %.30 = getelementptr inbounds [6 x i32], [6 x i32]* %.29, i64 0, i64 0\n  store i32 1, i32* %.30, align 4\n  %.32 = getelementptr inbounds [6 x i32], [6 x i32]* %.29, i64 0, i64 1\n  store i32 1, i32* %.32, align 4\n  %.34 = getelementptr inbounds [6 x i32], [6 x i32]* %.29, i64 0, i64 2\n  store i32 0, i32* %.34, align 4\n  %.36 = getelementptr inbounds [6 x i32], [6 x i32]* %.29, i64 0, i64 3\n  store i32 1, i32* %.36, align 4\n  %.38 = getelementptr inbounds [6 x i32], [6 x i32]* %.29, i64 0, i64 4\n  store i32 1, i32* %.38, align 4\n  %.40 = getelementptr inbounds [6 x i32], [6 x i32]* %.29, i64 0, i64 5\n  store i32 0, i32* %.40, align 4\n  %.44 = call double @readValue({}* %.8, i32* nonnull %.30, i32 6)\n  call void @putStr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @global_0, i64 0, i64 0))\n  %.48 = call i8* @formatDouble(double %.44)\n  call void @putStr(i8* %.48)\n  call void @freeString(i8* %.48)\n  call void @putLn()\n  store double 1.000000e+00, double* getelementptr inbounds ([3 x double], [3 x double]* @global_1, i64 0, i64 0), align 16\n  store double 2.000000e+00, double* getelementptr inbounds ([3 x double], [3 x double]* @global_1, i64 0, i64 1), align 8\n  store double 3.000000e+00, double* getelementptr inbounds ([3 x double], [3 x double]* @global_1, i64 0, i64 2), align 16\n  %.61 = call {}* @literalNVector(i32 1, i32* getelementptr inbounds ([1 x i32], [1 x i32]* @global_2, i64 0, i64 0), double* getelementptr inbounds ([3 x double], [3 x double]* @global_1, i64 0, i64 0))\n  %.70 = alloca [3 x i32], align 4\n  %.72 = getelementptr inbounds [3 x i32], [3 x i32]* %.70, i64 0, i64 0\n  store i32 0, i32* %.72, align 4\n  %.74 = getelementptr inbounds [3 x i32], [3 x i32]* %.70, i64 0, i64 1\n  store i32 0, i32* %.74, align 4\n  %.76 = getelementptr inbounds [3 x i32], [3 x i32]* %.70, i64 0, i64 2\n  store i32 0, i32* %.76, align 4\n  %.80 = call double @readValue({}* %.61, i32* nonnull %.72, i32 3)\n  %.81 = alloca [6 x i32], align 4\n  %.83 = getelementptr inbounds [6 x i32], [6 x i32]* %.81, i64 0, i64 0\n  %0 = bitcast [6 x i32]* %.81 to i8*\n  call void @llvm.memset.p0i8.i64(i8* nonnull align 4 dereferenceable(24) %0, i8 0, i64 24, i1 false)\n  call void @assignValue({}* %.8, i32* nonnull %.83, i32 6, double %.80)\n  %.70.1 = alloca [3 x i32], align 4\n  %.72.1 = getelementptr inbounds [3 x i32], [3 x i32]* %.70.1, i64 0, i64 0\n  store i32 1, i32* %.72.1, align 4\n  %.74.1 = getelementptr inbounds [3 x i32], [3 x i32]* %.70.1, i64 0, i64 1\n  store i32 1, i32* %.74.1, align 4\n  %.76.1 = getelementptr inbounds [3 x i32], [3 x i32]* %.70.1, i64 0, i64 2\n  store i32 0, i32* %.76.1, align 4\n  %.80.1 = call double @readValue({}* %.61, i32* nonnull %.72.1, i32 3)\n  %.81.1 = alloca [6 x i32], align 4\n  %.83.1 = getelementptr inbounds [6 x i32], [6 x i32]* %.81.1, i64 0, i64 0\n  store i32 1, i32* %.83.1, align 4\n  %.85.1 = getelementptr inbounds [6 x i32], [6 x i32]* %.81.1, i64 0, i64 1\n  store i32 1, i32* %.85.1, align 4\n  %.87.1 = getelementptr inbounds [6 x i32], [6 x i32]* %.81.1, i64 0, i64 2\n  store i32 0, i32* %.87.1, align 4\n  %.90.1 = getelementptr inbounds [6 x i32], [6 x i32]* %.81.1, i64 0, i64 3\n  store i32 1, i32* %.90.1, align 4\n  %.92.1 = getelementptr inbounds [6 x i32], [6 x i32]* %.81.1, i64 0, i64 4\n  store i32 1, i32* %.92.1, align 4\n  %.94.1 = getelementptr inbounds [6 x i32], [6 x i32]* %.81.1, i64 0, i64 5\n  store i32 0, i32* %.94.1, align 4\n  call void @assignValue({}* %.8, i32* nonnull %.83.1, i32 6, double %.80.1)\n  %.70.2 = alloca [3 x i32], align 4\n  %.72.2 = getelementptr inbounds [3 x i32], [3 x i32]* %.70.2, i64 0, i64 0\n  store i32 2, i32* %.72.2, align 4\n  %.74.2 = getelementptr inbounds [3 x i32], [3 x i32]* %.70.2, i64 0, i64 1\n  store i32 2, i32* %.74.2, align 4\n  %.76.2 = getelementptr inbounds [3 x i32], [3 x i32]* %.70.2, i64 0, i64 2\n  store i32 0, i32* %.76.2, align 4\n  %.80.2 = call double @readValue({}* %.61, i32* nonnull %.72.2, i32 3)\n  %.81.2 = alloca [6 x i32], align 4\n  %.83.2 = getelementptr inbounds [6 x i32], [6 x i32]* %.81.2, i64 0, i64 0\n  store i32 2, i32* %.83.2, align 4\n  %.85.2 = getelementptr inbounds [6 x i32], [6 x i32]* %.81.2, i64 0, i64 1\n  store i32 2, i32* %.85.2, align 4\n  %.87.2 = getelementptr inbounds [6 x i32], [6 x i32]* %.81.2, i64 0, i64 2\n  store i32 0, i32* %.87.2, align 4\n  %.90.2 = getelementptr inbounds [6 x i32], [6 x i32]* %.81.2, i64 0, i64 3\n  store i32 2, i32* %.90.2, align 4\n  %.92.2 = getelementptr inbounds [6 x i32], [6 x i32]* %.81.2, i64 0, i64 4\n  store i32 2, i32* %.92.2, align 4\n  %.94.2 = getelementptr inbounds [6 x i32], [6 x i32]* %.81.2, i64 0, i64 5\n  store i32 0, i32* %.94.2, align 4\n  call void @assignValue({}* %.8, i32* nonnull %.83.2, i32 6, double %.80.2)\n  call void @putVectorLn({}* %.8)\n  call void @putLn()\n  ret i32 0\n}\n\n; Function Attrs: argmemonly nounwind willreturn\ndeclare void @llvm.memset.p0i8.i64(i8* nocapture writeonly, i8, i64, i1 immarg) #0\n\nattributes #0 = { argmemonly nounwind willreturn }\n\n------------------------ Linker -------------------------\nclang++ ./build/output.o ./build/runtime.so -o ./build/executable.exe\n------------------------ Go! -----------------------------\n[    0.00,     0.00,     0.00    ]\n[    0.00,     0.00,     0.00    ]\n[    0.00,     0.00,     0.00    ]\n\nx =   69.00\n[    1.00,     0.00,     0.00    ]\n[    0.00,     2.00,     0.00    ]\n[    0.00,     0.00,     3.00    ]\n\n```\n\n## Libraries used:\n\n- Lexer and Parser (LALR) come from PLY.\n- clang - for compiling shared runtime and linking it with object file produced by code generator.\n- llvmlite - provides python bindings to llvm.\n\n## Dependencies:\n\n- llvm 10.0.0 (actually I only use clang)\n- ply 3.11\n- llvmlite 0.35.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetroniuss%2Fcompilers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpetroniuss%2Fcompilers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetroniuss%2Fcompilers/lists"}