Commit Graph

237 Commits

Author SHA1 Message Date
Nicolas Abril
599ddf1ea6 Don't compile kdl functions in the genesis block 2022-09-26 17:33:22 +02:00
Nicolas Abril
bbce161ff1 Make to-kdl code slightly more readable 2022-09-26 17:32:38 +02:00
Felipe G
c1de579502
Merge pull request #372 from developedby/syntax-doc
Add preliminary syntax documentation
2022-09-25 20:48:46 -03:00
Nicolas Abril
324cdbac84
Update SYNTAX.md 2022-09-23 13:04:34 +00:00
Nicolas Abril
a906de2f73 Add preliminary syntax documentation 2022-09-22 22:21:45 +02:00
Felipe G
5f22aa81e7
Merge pull request #369 from gimbles/patch-1
Fix typo
2022-09-21 13:13:59 -03:00
Felipe g
801213664c Removed profile that does not exists 2022-09-21 13:07:12 -03:00
Felipe g
8d3b03d38c Fix workflows 2022-09-21 13:05:54 -03:00
Felipe g
d9da5be62a Added the same github workflow from Kindelia/Kindelia 2022-09-21 13:05:53 -03:00
Felipe g
ad7cd30fc5 Tests 2022-09-21 13:05:53 -03:00
Felipe g
6c3be451b9 Fixes 2022-09-21 13:05:53 -03:00
Felipe g
e6d79950d9 Added configuration and some fixes 2022-09-21 13:05:53 -03:00
Felipe g
6706b4b1df Code style improvements 2022-09-21 13:05:53 -03:00
Felipe g
ff00aa79ad Style changes suggested by Clippy 2022-09-21 13:05:53 -03:00
Felipe g
c6b88bb16e Style changes suggested by Clippy 2022-09-21 13:05:53 -03:00
Felipe g
ca14fd3fab Add example 2022-09-21 13:05:53 -03:00
Felipe g
22b16054e6 Fix toml 2022-09-21 13:05:53 -03:00
Felipe g
fe983a9cf8 Fix version 2022-09-21 13:05:53 -03:00
Felipe g
1a02e2d1e3 Fix structure 2022-09-21 13:05:53 -03:00
Felipe g
bdd438b8f7 Finished split 2022-09-21 13:05:53 -03:00
Felipe g
b996312813 Changed structure 2022-09-21 13:05:53 -03:00
Felipe g
1e8b0024e3 Refactor 2022-09-21 13:05:53 -03:00
Victor Taelin
c55d3eea8b
Merge pull request #367 from felipegchi/entry-orig
Added orig to entry
2022-09-21 12:20:07 -03:00
Victor Taelin
d8eced2fc4
Merge pull request #366 from felipegchi/rule-orig
Fix file origin of rules
2022-09-21 12:19:55 -03:00
Gimgim
dabcdd913d
Fix typo 2022-09-21 15:45:33 +05:30
Felipe g
21c5170030 Added orig to entry 2022-09-16 09:59:01 -03:00
Felipe g
797e41c3d8 Fix file origin of rules 2022-09-16 09:06:41 -03:00
Victor Taelin
a0e810ca4b
Merge pull request #365 from felipegchi/arity-16
Added maximum arity of 16
2022-09-15 15:58:23 -03:00
Felipe g
e0bf4ee86b Added maximum arity of 16 2022-09-15 12:00:49 -03:00
Victor Maia
d58784bfd0 Inc version 2022-09-07 22:00:04 -03:00
Victor Taelin
ec46af404d
Merge pull request #359 from developedby/kindelia-names
Handle U120 properly on kindelia compilation
2022-09-07 21:59:27 -03:00
Nicolas Abril
65c4cd715f Re-add special cases for U120.high and low 2022-09-07 21:44:29 -03:00
Nicolas Abril
24917cad72 Merge branch 'master' of https://github.com/Kindelia/Kind2 into kindelia-names 2022-09-07 21:31:55 -03:00
Nicolas Abril
d64eed4922 --amend 2022-09-07 21:31:52 -03:00
Nicolas Abril
7c09e0cbe9 Handle U120 properly on kindelia compilation
(U120.new num num) becomes a primitive num.

(U120.op num num) becomes a primitive op2.

Compilation fails on lhs (U120.new var _).
2022-09-07 21:11:43 -03:00
Victor Maia
d822149f4f Inc version 2022-09-07 14:20:46 -03:00
Victor Taelin
4629d55d3a
Merge pull request #358 from developedby/kindelia-names
More kindelia compiler improvements
2022-09-07 14:20:24 -03:00
Nicolas Abril
811c2eafb7 Merge branch 'master' of https://github.com/Kindelia/Kind2 into kindelia-names 2022-09-06 20:13:52 -03:00
Nicolas Abril
fa24180cb6 More kindelia compiler improvements
Add rule flattening to the kindelia compiler.
The algorithm is copied from the HVM, but instead of `>

Fix a bug where the variable linearizer didn't unbind >

Reorganize some of the compilation code, adding other >

This doesn't check for code
2022-09-06 20:05:43 -03:00
Victor Maia
26f55b3677 Inc version 2022-09-06 15:12:56 -03:00
Victor Maia
eae62b40e2 Merge branch 'master' of github.com:kindelia/kind2 2022-09-06 15:11:50 -03:00
Victor Maia
70004a7224 Inc version 2022-09-06 15:08:18 -03:00
Victor Taelin
0c831a1f8b
Merge pull request #357 from felipegchi/fix-load
Fix infinite loop
2022-09-06 15:07:23 -03:00
Victor Taelin
81a1240962
Merge pull request #356 from developedby/kindelia-names
Fixes and improvements for the kindelia compiler
2022-09-06 14:53:22 -03:00
Felipe g
8b6454426f Style removed useless parenthesis 2022-09-06 12:20:29 -03:00
Felipe g
7e614363b8 Fix infinite loop 2022-09-06 12:13:08 -03:00
Felipe g
4069f98ad9 Fix infinite loop 2022-09-06 12:06:52 -03:00
Victor Maia
3ff86299a1 Consider reductions of function before InvalidCall error 2022-09-04 21:48:44 -03:00
Nicolas Abril
06ebf9f05a Merge branch 'master' of https://github.com/Kindelia/Kind2 2022-09-03 13:32:22 -03:00
Nicolas Abril
2f9313abe0 Fixes and improvements for the kindelia compiler
Add an alternate name for function, to be used as the kindelia name.
Syntax is `Function.name #kdl_name (args) : type`

For functions that don't have a kindelia name, try to fit their names to 12 characters by truncating the last part of the name and inserting some random characters to avoid collisions. For example: `Fn.with_a_long_name` becomes `Fn.with_aF5m`, with the last 3 characters being random.
This takes the start of the function up to the last `.` as the namespace.

Compile entries with arity 0 as constructors.

Don't compile constructors of type Type.
This doesn't cover all cases of invalid constructors.
For example: `Fn (a: U60) : U60.if a Type U60` will still try to compile and fail.

Fix a bug where function applications where being compiled as constructors.

Don't compile erased arguments anymore.

Check for invalid Nil terms in compilation.
2022-09-03 13:26:58 -03:00