From 09f1ddc704b406f7001458f34ea8a34fe3447a58 Mon Sep 17 00:00:00 2001 From: Flavio Bergamaschi Date: Sun, 25 Aug 2024 23:49:32 -0400 Subject: [PATCH] Updates to VSC extension and Kernel Generator examples --- kerngen/.gitignore | 2 +- kerngen/kernelLang/.vscodeignore | 3 +++ .../grammars/kerlang.tmLanguage.json | 12 ++++++------ .../heracles-kerlang-syntax-0.0.1.vsix | Bin 7340 -> 6881 bytes kerngen/kernelLang/package.json | 2 +- .../SimpleExamples/example_ADD_16K1rns.ker | 5 +++++ .../SimpleExamples/example_ADD_16K4rns.ker | 5 +++++ ...mple_ADD_8K.ker => example_ADD_8K1rns.ker} | 2 -- .../SimpleExamples/example_ADD_8K4rns.ker | 5 +++++ ...e_ADD_16K.ker => example_ADD_C16K4rns.ker} | 2 +- .../SimpleExamples/example_ADD_C8K1rns.ker | 5 +++++ .../SimpleExamples/example_ADD_C8K4rns.ker | 5 +++++ ..._MUL_16K.ker => examples_MUL_C16K1rns.ker} | 0 13 files changed, 37 insertions(+), 11 deletions(-) create mode 100644 kerngen/kernelLang/.vscodeignore create mode 100644 kerngen/tutorials/SimpleExamples/example_ADD_16K1rns.ker create mode 100644 kerngen/tutorials/SimpleExamples/example_ADD_16K4rns.ker rename kerngen/tutorials/SimpleExamples/{example_ADD_8K.ker => example_ADD_8K1rns.ker} (94%) create mode 100644 kerngen/tutorials/SimpleExamples/example_ADD_8K4rns.ker rename kerngen/tutorials/SimpleExamples/{example_ADD_16K.ker => example_ADD_C16K4rns.ker} (64%) create mode 100644 kerngen/tutorials/SimpleExamples/example_ADD_C8K1rns.ker create mode 100644 kerngen/tutorials/SimpleExamples/example_ADD_C8K4rns.ker rename kerngen/tutorials/SimpleExamples/{examples_MUL_16K.ker => examples_MUL_C16K1rns.ker} (100%) diff --git a/kerngen/.gitignore b/kerngen/.gitignore index 5945c3f..f0e4c94 100644 --- a/kerngen/.gitignore +++ b/kerngen/.gitignore @@ -9,4 +9,4 @@ data/ **/__pycache__/ # Playground -playground/ \ No newline at end of file +zz_playground/ \ No newline at end of file diff --git a/kerngen/kernelLang/.vscodeignore b/kerngen/kernelLang/.vscodeignore new file mode 100644 index 0000000..19bbe78 --- /dev/null +++ b/kerngen/kernelLang/.vscodeignore @@ -0,0 +1,3 @@ +.vscode/** +.vscode-test/** +.gitignore diff --git a/kerngen/kernelLang/grammars/kerlang.tmLanguage.json b/kerngen/kernelLang/grammars/kerlang.tmLanguage.json index 3b7f30f..6dd34a3 100644 --- a/kerngen/kernelLang/grammars/kerlang.tmLanguage.json +++ b/kerngen/kernelLang/grammars/kerlang.tmLanguage.json @@ -1,15 +1,15 @@ { "scopeName": "source.kerlang", + "fileTypes": ["kerlang"], "patterns": [ { - "name": "comment.line.double-dash.kerlang", + "name": "comment.line.number-sign.kerlang", "match": "# .*$" }, { - "name": "keyword.operator.kerlang", - "match": "\\b(COPY|ADD|MUL|MULI|RELIN|NTT|INTT|MOD|MODUP|SQUARE)\\b" - } + "name": "keyword.other.kerlang", + "match": "\b(COPY|ADD|MUL|MULI|RELIN|NTT|INTT|MOD|MODUP|SQUARE)\b" + } ], - "repository": {}, - "fileTypes": ["kerlang"] + "repository": {} } \ No newline at end of file diff --git a/kerngen/kernelLang/heracles-kerlang-syntax-0.0.1.vsix b/kerngen/kernelLang/heracles-kerlang-syntax-0.0.1.vsix index 019bdbb9a40ae5f6fc21f1299fc921875d27e51a..088dcb472963d7a28cffc7ba0e42027f3f5f73d9 100644 GIT binary patch delta 1519 zcmZuxdpy$%6#s2&EJQJ5CeNr1Q@0{LY%HNkt4Nye^13ybJYwE=$RjbYA7wWa8EJ$V z!bGAZ)@X4{B;;`s@+xs%bw8gz{c+D9=kqz|e9z~c^ZlI9x7g(UUL^_{wgCwM2n2wr zM?2DteQ9}600>Q0(q+y&oG~TI9GW_9i`zg?kW$3;sVQxm-7MJ0a61q-Sz0Quk?&vE zn_Pc5o*mqeZg6ckG-hk*@oiPMcG-#wHUzjti|JO<1n=;?8=a0 zQd_V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@jR+Y*)vU#wr=3j?>j3h(v*ZX zShPETOQhE1S^K*waz6O3cb7e4RT!df#>Uq5fBJuz^we=utAxBBq{a2ZRRWT~dwA+b;6o>!US!I_OW7 zEE>rR3fL@L@?ZbpkzXB%vg%8f#RC9JHIizZ4qX^Q5&|lF9>h zJvR_xlOY)@majVZ>9V#l(MlS=B>-W7qSNKt_Y8NNIit`}K{52<%yQ_jW@h&N<-9ct zJ>=y4iZ`u9VWE9*4UVLZIm>*T>S~p&tTFotUt*5x+yaA(QS(xcyv~5{m!1ki5h80l zRx8yyOr~(WQ%9reU|eoA567X+SfUBZwUs1bLOHZv!|sTac2VvY_dQu zjGIY0Pyss)nPvly*o1&dm;!{415oA=0nWe`z>fiQxF&Llnej(R6#grtBajbQ0nA}s mw#UdE{7}y^G5@iW*hJC)!w<%sjr~~8$vkA{W(L8Jy?+55-eR%< diff --git a/kerngen/kernelLang/package.json b/kerngen/kernelLang/package.json index 1b29783..0046bd9 100644 --- a/kerngen/kernelLang/package.json +++ b/kerngen/kernelLang/package.json @@ -7,7 +7,7 @@ "private": true, "license": "Apache-2.0", "engines": { - "vscode": "^1.0.0" + "vscode": "^1.92.0" }, "categories": ["Programming Languages"], "contributes": { diff --git a/kerngen/tutorials/SimpleExamples/example_ADD_16K1rns.ker b/kerngen/tutorials/SimpleExamples/example_ADD_16K1rns.ker new file mode 100644 index 0000000..b086a98 --- /dev/null +++ b/kerngen/tutorials/SimpleExamples/example_ADD_16K1rns.ker @@ -0,0 +1,5 @@ +CONTEXT BGV 16384 1 +DATA a 1 +DATA b 1 +DATA c 1 +ADD c a b diff --git a/kerngen/tutorials/SimpleExamples/example_ADD_16K4rns.ker b/kerngen/tutorials/SimpleExamples/example_ADD_16K4rns.ker new file mode 100644 index 0000000..4901547 --- /dev/null +++ b/kerngen/tutorials/SimpleExamples/example_ADD_16K4rns.ker @@ -0,0 +1,5 @@ +CONTEXT BGV 16384 4 +DATA a 1 +DATA b 1 +DATA c 1 +ADD c a b diff --git a/kerngen/tutorials/SimpleExamples/example_ADD_8K.ker b/kerngen/tutorials/SimpleExamples/example_ADD_8K1rns.ker similarity index 94% rename from kerngen/tutorials/SimpleExamples/example_ADD_8K.ker rename to kerngen/tutorials/SimpleExamples/example_ADD_8K1rns.ker index 0580c77..14b5673 100644 --- a/kerngen/tutorials/SimpleExamples/example_ADD_8K.ker +++ b/kerngen/tutorials/SimpleExamples/example_ADD_8K1rns.ker @@ -3,5 +3,3 @@ DATA a 1 DATA b 1 DATA c 1 ADD c a b - - diff --git a/kerngen/tutorials/SimpleExamples/example_ADD_8K4rns.ker b/kerngen/tutorials/SimpleExamples/example_ADD_8K4rns.ker new file mode 100644 index 0000000..e42b881 --- /dev/null +++ b/kerngen/tutorials/SimpleExamples/example_ADD_8K4rns.ker @@ -0,0 +1,5 @@ +CONTEXT BGV 8192 4 +DATA a 1 +DATA b 1 +DATA c 1 +ADD c a b diff --git a/kerngen/tutorials/SimpleExamples/example_ADD_16K.ker b/kerngen/tutorials/SimpleExamples/example_ADD_C16K4rns.ker similarity index 64% rename from kerngen/tutorials/SimpleExamples/example_ADD_16K.ker rename to kerngen/tutorials/SimpleExamples/example_ADD_C16K4rns.ker index 2c2681e..78429c2 100644 --- a/kerngen/tutorials/SimpleExamples/example_ADD_16K.ker +++ b/kerngen/tutorials/SimpleExamples/example_ADD_C16K4rns.ker @@ -1,4 +1,4 @@ -CONTEXT BGV 16384 1 +CONTEXT BGV 16384 4 DATA a 2 DATA b 2 DATA c 2 diff --git a/kerngen/tutorials/SimpleExamples/example_ADD_C8K1rns.ker b/kerngen/tutorials/SimpleExamples/example_ADD_C8K1rns.ker new file mode 100644 index 0000000..547f265 --- /dev/null +++ b/kerngen/tutorials/SimpleExamples/example_ADD_C8K1rns.ker @@ -0,0 +1,5 @@ +CONTEXT BGV 8192 1 +DATA a 2 +DATA b 2 +DATA c 2 +ADD c a b diff --git a/kerngen/tutorials/SimpleExamples/example_ADD_C8K4rns.ker b/kerngen/tutorials/SimpleExamples/example_ADD_C8K4rns.ker new file mode 100644 index 0000000..9123a94 --- /dev/null +++ b/kerngen/tutorials/SimpleExamples/example_ADD_C8K4rns.ker @@ -0,0 +1,5 @@ +CONTEXT BGV 8192 4 +DATA a 2 +DATA b 2 +DATA c 2 +ADD c a b diff --git a/kerngen/tutorials/SimpleExamples/examples_MUL_16K.ker b/kerngen/tutorials/SimpleExamples/examples_MUL_C16K1rns.ker similarity index 100% rename from kerngen/tutorials/SimpleExamples/examples_MUL_16K.ker rename to kerngen/tutorials/SimpleExamples/examples_MUL_C16K1rns.ker