Commit Graph

1444 Commits

Author SHA1 Message Date
gluaxspeed
b96609f839 merge master 2021-07-18 19:58:34 -07:00
damirka
2c58bf30a0 Merge branch 'master' into leo-manifest-dependencies 2021-07-19 01:15:32 +03:00
howardwu
546636152b Updates Leo to snarkVM v0.7.4 2021-07-17 00:42:24 -07:00
gluaxspeed
8b44cfa9c7 Merge branch 'master' of github.com:AleoHQ/leo into feature/theorem-tests 2021-07-16 03:28:37 -07:00
gluaxspeed
025f02e5f8 fmt and clippy 2021-07-16 03:28:06 -07:00
gluaxspeed
470a4075f8 refactor theorem to ast for out file hashes, migrate old tests 2021-07-16 03:20:36 -07:00
damirka
97b5c1b7c4 Merge branch 'master' into leo-manifest-dependencies 2021-07-15 13:00:55 +03:00
gluaxspeed
315dcebb34 fmt stable only features, test all the platforms, cc stable 2021-07-14 13:55:01 -07:00
gluaxspeed
8695b11ce0 Forgot to refactor in compiler tests 2021-07-14 05:04:09 -07:00
gluaxspeed
add64ae11a Refactor Proof/Theorem to Snapshots 2021-07-14 03:24:08 -07:00
gluaxspeed
2f000a971a digest is necessary 2021-07-14 03:09:44 -07:00
gluaxspeed
baca9ca4a5 Hash the ast in the .out file 2021-07-14 02:58:10 -07:00
gluaxspeed
c5c5bce2f0 Merge branch 'master' of github.com:AleoHQ/leo into bug/misc-bugs 2021-07-13 22:27:24 -07:00
gluaxspeed
650a729763 Add theorem generations to tests 2021-07-12 11:45:51 -07:00
gluaxspeed
a4575c8a00 cleaner output, and log writer 2021-07-11 23:42:14 -07:00
gluaxspeed
c0628a04c7 Merge branch 'master' of github.com:AleoHQ/leo into bug/misc-bugs 2021-07-11 22:55:29 -07:00
Eric McCarthy
a8840d5264
fix typo in name of initial ast file
`inital_ast.json` --> `initial_ast.json`
2021-07-11 21:29:50 -07:00
gluaxspeed
b767dcd08f Merge branch 'master' of github.com:AleoHQ/leo into feature/circuit-constant-value 2021-07-08 04:14:32 -07:00
gluaxspeed
0bd580e3d1 fmt fixes, realized they have to be in that format for outputs 2021-07-08 04:05:00 -07:00
damirka
bbc210d016 imports map, leo install 2021-07-07 17:15:03 +03:00
Alessandro Coglio
6d56aa9c81
Merge pull request #1090 from AleoHQ/feature/cli-generates-proofs
Ast Proof Generation In CLI
2021-07-03 14:40:07 -07:00
gluax
a496841563 the identifiers differ, change it to name 2021-07-02 18:29:48 -07:00
gluax
6022f42fa5 Merge branch 'master' of github.com:AleoHQ/leo into feature/circuit-constant-value 2021-07-02 17:33:31 -07:00
gluax
f650e12baf circuit cosnt_value 2021-07-02 17:32:37 -07:00
Alessandro Coglio
81d0a4c4e3
Merge pull request #1093 from AleoHQ/bugs/array-indexing
Array Indexing Fixes
2021-07-02 17:03:58 -07:00
gluax
41f4eed360 refactor proof options to theorem options 2021-07-02 15:26:13 -07:00
gluax
45f75ef33a fix tests running 2021-07-01 00:03:41 -07:00
gluax
026708d64d ast generation now in the compiler and has options 2021-06-30 23:47:20 -07:00
dependabot[bot]
4fd6cf5a14
Bump indexmap from 1.6.2 to 1.7.0
Bumps [indexmap](https://github.com/bluss/indexmap) from 1.6.2 to 1.7.0.
- [Release notes](https://github.com/bluss/indexmap/releases)
- [Commits](https://github.com/bluss/indexmap/compare/1.6.2...1.7.0)

---
updated-dependencies:
- dependency-name: indexmap
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-30 10:21:58 +00:00
gluax
bb63e13edf fix all the bugs for the new array indexes 2021-06-29 20:55:48 -07:00
Alessandro Coglio
2e0dab122b
Merge pull request #1074 from AleoHQ/bug/ternery-and-canonicalization-fixes
Bug-Fix: Canonicalization, Array Init, Array Indexing
2021-06-29 11:12:49 -07:00
gluax
5c3b48a25b slight rework to access to clean it up and fix other missed cases, added tests 2021-06-28 14:10:26 -07:00
damirka
dcf3de40e9 update to snarkvm-0.6.0 2021-06-28 22:01:01 +03:00
dependabot[bot]
2266a42e38
Bump snarkvm-fields from 0.5.5 to 0.6.0
Bumps [snarkvm-fields](https://github.com/AleoHQ/snarkVM) from 0.5.5 to 0.6.0.
- [Release notes](https://github.com/AleoHQ/snarkVM/releases)
- [Commits](https://github.com/AleoHQ/snarkVM/compare/v0.5.5...v0.6.0)

---
updated-dependencies:
- dependency-name: snarkvm-fields
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-28 10:19:42 +00:00
gluax
b96cc7b08c remove debug stmt 2021-06-26 20:46:54 -07:00
gluax
15402584c0 fix array indexing assigning 2021-06-26 20:44:48 -07:00
gluax
5ebea328fb const_value for array_init, and canonicalization fixes 2021-06-26 00:00:09 -07:00
Alessandro Coglio
d3aa50057a Merge pull request #1064 from AleoHQ/dependabot/cargo/snarkvm-curves-0.5.5
Bump snarkvm-curves from 0.5.4 to 0.5.5
2021-06-25 18:50:40 -07:00
dependabot[bot]
cf9efb1dc2
Bump snarkvm-curves from 0.5.4 to 0.5.5
Bumps [snarkvm-curves](https://github.com/AleoHQ/snarkVM) from 0.5.4 to 0.5.5.
- [Release notes](https://github.com/AleoHQ/snarkVM/releases)
- [Commits](https://github.com/AleoHQ/snarkVM/compare/v0.5.4...v0.5.5)

---
updated-dependencies:
- dependency-name: snarkvm-curves
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-06-25 10:20:40 +00:00
gluax
068958a2f4 array type inference bugs 2021-06-23 07:08:32 -07:00
Alessandro Coglio
214c5b21c9
Merge pull request #1054 from AleoHQ/bugs/1040-1041-input-bugs
input bugs fixes
2021-06-22 15:07:28 -07:00
gluax
af1aca3d9f parse returns leo error not rust error 2021-06-21 23:10:55 -07:00
gluax
b969774b85 check input integer types at all stages 2021-06-21 19:53:01 -07:00
howardwu
750c48ed3b chore(leo): bump version for new release 2021-06-21 14:28:28 -07:00
gluax
b27cffed19 quick branch to fix merge conflicts 2021-06-18 09:14:38 -07:00
Alessandro Coglio
b414cde00d
Merge pull request #1043 from AleoHQ/bug/canonicalization-fixes
canonicalization fixes
2021-06-18 09:01:39 -07:00
Alessandro Coglio
23e9622212
Merge pull request #1036 from AleoHQ/bug/1012-scalar-values
Scalar, Non-Scalar, and Char Output file
2021-06-18 09:01:07 -07:00
gluax
a2850bbd02 Self bug fix, and string canonicalization fix 2021-06-17 12:47:19 -07:00
gluax
5cf5437281 char spans from string, proper col_start and stop 2021-06-16 13:35:40 -07:00
dependabot-preview[bot]
0fa4907273
Bump rand_core from 0.6.2 to 0.6.3
Bumps [rand_core](https://github.com/rust-random/rand) from 0.6.2 to 0.6.3.
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-random/rand/compare/rand_core-0.6.2...rand_core-0.6.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-06-16 17:13:33 +00:00
gluax
1f35308f47 depend on improved tests branch 2021-06-15 11:44:20 -07:00
gluax
076aafa097 resolve merge conflicts 2021-06-15 11:32:46 -07:00
gluax
a6f4052dde type inference char reducer fixed, outputs fixed 2021-06-15 11:23:08 -07:00
gluax
7d29ef0d5e custom serializer/deserializer 2021-06-14 15:56:39 -07:00
gluax
d1ca1108fb scalar chars refactor, some stuff got fixed, some stuff broke 2021-06-11 16:16:21 -07:00
Alessandro Coglio
04c809c0dc
Merge pull request #1027 from AleoHQ/bug/1025-assigning-slice-to-string
fix slice assignment for strings
2021-06-11 11:36:08 -07:00
gluax
d6266102c3 more tests, hex fix 2021-06-09 15:54:05 -07:00
howardwu
6f5c02ae6d chore(leo): bump version for new release 2021-06-08 22:51:25 -07:00
gluax
77c3b9872a fmt fix 2021-06-08 14:52:13 -07:00
Max Bruce
e4b88f3095 Update compiler/src/value/integer/integer.rs
Co-authored-by: Collin Chin <16715212+collinc97@users.noreply.github.com>
2021-06-08 14:52:12 -07:00
p
e816ae4ac3 fix array dyn mut 2021-06-08 14:52:12 -07:00
p
a8f687f904 fix treating inputs as constants in to_usize 2021-06-08 14:52:12 -07:00
gluax
d4cdd93d15 Merge branch 'feat/update-snarkvm-0.5.4' of github.com:AleoHQ/leo into bug/1025-assigning-slice-to-string 2021-06-08 13:44:22 -07:00
gluax
c9b565cbfb fix slice assignment for strings 2021-06-08 12:29:49 -07:00
collin
04907c3e84 bump snarkvm module versions to 0.5.4 2021-06-08 10:25:41 -07:00
p
5cd05d7376 fix bounds check 2021-06-04 11:42:14 -07:00
Protryon
e6b7f0fce3 bounds check 2021-06-04 07:35:50 -07:00
Protryon
dc91b07e5c clippy 2021-06-04 06:14:09 -07:00
Protryon
936a35ebd2 fmt 2021-06-04 06:14:09 -07:00
Protryon
f8c4139c3a misc cleanup 2021-06-04 06:14:09 -07:00
Protryon
a0acc915e9 dynamic array index assignment 2021-06-04 06:14:09 -07:00
damirka
d979a06eac fix output of characters in out file 2021-06-03 15:38:58 +03:00
howardwu
eaadb29448 chore(leo): bump version for new release 2021-05-31 19:53:31 -07:00
gluax
91f27bc046 explicit type resolves issue, will make bug for implict 2021-05-22 22:26:24 -04:00
gluax
7145a751d9 console.log refactor, concat test... has asg or TIPhase reducer bug 2021-05-22 21:15:07 -04:00
gluax
ca59ff3177 tests for now should be changed to use input strings when they are in 2021-05-20 14:30:12 -04:00
gluax
c4a1bd6955 merge and print strings like strings, rather than arrays 2021-05-20 12:50:49 -04:00
gluax
4fe91f0f39 string canonicalization to char array 2021-05-20 12:39:36 -04:00
gluax
b6479b754f tests are passing interestingly but idk if they should be, == doesn't work for input on fields 2021-05-19 16:48:34 -04:00
Alessandro Coglio
7aa3fa3b1a
Merge pull request #920 from AleoHQ/compiler-tests
[Tests] Compiler tests
2021-05-19 12:56:18 -07:00
gluax
3cc3c7ab02 call the char methods 2021-05-19 14:24:57 -04:00
gluax
768a597e04 merge in field operator updates 2021-05-19 13:25:58 -04:00
collin
c4461f4ef4 bump snarkvm module versions to 0.3.1 2021-05-18 21:08:19 -07:00
collin
c936ca5f11 remove old field type code 2021-05-18 18:57:44 -07:00
collin
9c94422530 bump snarkvm module versions to 0.2.3 2021-05-18 18:53:07 -07:00
collin
2b1b2839b0 add field type refactor code 2021-05-18 18:35:54 -07:00
gluax
edf236158d add unimplemented other comparators in fields so chars can call them 2021-05-18 12:29:01 -04:00
gluax
08022bb383 char eq operators in, they just call the field ones for now, so when those are in they will work 2021-05-18 12:04:58 -04:00
collin
abeb796cbb use field eq method 2021-05-17 16:32:44 -07:00
collin
d24623d9d2 fix field subtraction 2021-05-17 16:16:42 -07:00
gluax
1377fc5d75 output file now does 'a', swapped to compiler tests, we fail char tests for now since no constraints 2021-05-14 15:34:39 -04:00
gluax
0435b7ce83 remove octal, fix ascii hex 2021-05-14 13:07:54 -04:00
damirka
c11ca98268 removed cwd arg from compiler tests 2021-05-14 16:42:20 +03:00
gluax
733bc90bbe chars done, should merge in compiler tests 2021-05-13 17:25:33 -04:00
gluax
6e71c8ab4f addex hex, octal, and direct unicode 2021-05-13 14:33:01 -04:00
damirka
17744f7f7d removes import tests, fix ci, add constraint number check, more tests 2021-05-13 16:56:17 +03:00
gluax
29cd920075 input, output and compiler tests 2021-05-13 07:16:59 -04:00
gluax
0ef7ca3d8e just need to fix input file parsing for chars to work 2021-05-12 18:56:27 -04:00
gluax
602300ea64 chars are implemented with no operations 2021-05-12 16:34:34 -04:00
gluax
10b97023ba type inference test update - though I would like to wait for compilers test merge? 2021-05-12 15:42:41 -04:00
damirka
e2492ba9e4 more constraints checks 2021-05-12 20:47:03 +03:00
damirka
cb2bd62ea9 Merge branch 'master' into compiler-tests 2021-05-12 20:02:03 +03:00
damirka
17b59fe96f remove otests folder 2021-05-12 19:45:01 +03:00
damirka
6138f8e719 removed old compiler tests 2021-05-12 19:39:27 +03:00
gluax
819fc9087f char type added to ast and asg 2021-05-12 08:39:55 -04:00
Alessandro Coglio
2ddb474dce
Merge pull request #903 from AleoHQ/bug/abnf-circuit-grammar
Bug/abnf-circuit-grammar
2021-05-06 11:50:20 -07:00
damirka
ac57fe6410 test conflicts + clippy 2021-05-06 14:27:42 +03:00
damirka
6bb14425fd Merge branch 'master' into compiler-tests 2021-05-06 14:15:03 +03:00
damirka
d5e8fb3718 imports 2021-05-05 19:31:25 +03:00
damirka
2ac3468d18 fixes constant tuples in inputs 2021-05-05 15:58:26 +03:00
damirka
dd4d909998 Merge branch 'master' into compiler-tests 2021-05-05 11:56:00 +03:00
gluax
ffb7cab142 bug fix 905, make sure values are constant when assign is constant 2021-05-03 15:32:11 -04:00
damirka
0b798dc950 console + definition + core 2021-05-03 16:47:33 +03:00
gluax
e0cf988261 hacky, but optional comma only allowed on last member variable 2021-04-29 15:22:17 -04:00
Collin Chin
aaa42bba4c
Merge pull request #705 from AleoHQ/feature/485-defines
Feature/485 global consts
2021-04-28 14:06:40 -07:00
Collin Chin
b4584399ef
Merge pull request #810 from AleoHQ/feature/opti-cli-flag
[CLI] Adds CompilerOptions flags to Leo CLI
2021-04-26 22:56:55 -07:00
gluax
e71c8d99e0 import global consts, clean up, test type inference on global consts 2021-04-26 17:51:19 -04:00
damirka
6ef9b86cc2 Merge branch 'feature/opti-cli-flag' of github.com:AleoHQ/leo into feature/opti-cli-flag 2021-04-26 23:42:57 +03:00
damirka
a1326d386e Merge branch 'master' into feature/opti-cli-flag 2021-04-26 23:39:10 +03:00
Collin Chin
b6f6f051f0
Merge pull request #896 from AleoHQ/feature-relative-imports
[CLI] Makes import path relative to program directory
2021-04-26 13:37:19 -07:00
damirka
1676d12f66 makes import path relative to program directory 2021-04-26 23:02:35 +03:00
damirka
5d359f23f5 Merge branch 'master' into feature/input-kebab 2021-04-26 22:25:10 +03:00
gluax
438c20c14d merge master, resolve conflicts, login test is failing 2021-04-26 14:43:21 -04:00
collin
de685928e2 rename stage -> phase 2021-04-21 15:22:20 -07:00
damirka
ad86b23c01 adds search for @test(custom) inputs path in kebab case
- in Leo test envs can only be snake_cased
- while we suggest naming inputs and folders in kebab-case
- this patch searches for both test_input and test-input options in inputs
2021-04-21 15:27:10 +03:00
Protryon
534f36a077 compiler tests 2021-04-19 18:08:14 -07:00
gluax
7031923921 clean up comments 2021-04-19 14:36:56 -04:00
gluax
8c497f0b7a more test coverage 2021-04-19 13:53:49 -04:00
gluax
f7ec5de7c9 fix address in test 2021-04-15 17:08:30 -04:00
gluax
0016a1beaa update to lastest master, with FormatString rename 2021-04-15 16:55:48 -04:00
howardwu
4eac040178 chore(leo): bump version for new release 2021-04-15 13:49:42 -07:00
Collin Chin
5f46ccc026
Merge pull request #869 from AleoHQ/bug/calling-mut-method-from-immutable-context
bug-fix-852
2021-04-15 11:51:11 -07:00
gluax
59f86c4b34 fix call for immutable context, add it to test 2021-04-15 14:34:22 -04:00
gluax
2f7ed99f76 pull max's required semi-colon branch to ensure sameness, MD file renamed to readme 2021-04-14 18:38:49 -04:00
Protryon
df60874da9 fix tests 2021-04-14 15:27:57 -07:00
Protryon
51920b5df7 require semicolons on return 2021-04-14 15:27:57 -07:00
gluax
6e595bd845 remove escaped double quote for now, address(...) removed 2021-04-14 17:43:02 -04:00
gluax
1803925b08 semi-colon after return statements are required 2021-04-14 16:59:07 -04:00
gluax
11c78da916 formatted string -> renamed format string 2021-04-14 16:15:27 -04:00
gluax
1231c5bc36 clippy fix 2021-04-14 16:03:53 -04:00
gluax
91634d6479 implicit input, removed from function input 2021-04-14 16:00:19 -04:00
damirka
fbe10b3aaf adds empty line to leo example 2021-04-14 20:06:14 +03:00
gluax
eaa07934ed resolve merge conflicts 2021-04-14 12:51:20 -04:00
damirka
794e0f1095 adds test for that scenario 2021-04-14 18:09:52 +03:00
Collin Chin
4ae6de4978
Add clippy flag 2021-04-13 15:22:31 -07:00
Collin Chin
e9988e9713
Add clippy flag 2021-04-13 15:22:01 -07:00
gluax
dc5d75da85 some clean up 2021-04-13 15:33:00 -04:00
gluax
a54488b45f use stage macro for cleaner type inference 2021-04-13 13:49:16 -04:00
gluax
fdf54ea9a1 make macro to make this easier 2021-04-13 13:36:16 -04:00
gluax
61e791c671 type inference tests 2021-04-13 11:52:01 -04:00
gluax
f612ed441a type inference, and canonicalization bug fixes 2021-04-12 16:21:44 -04:00
gluax
214d9e0f8c More generic errors for reducing 2021-04-12 12:33:06 -04:00
gluax
29b8b2e301 add another test for tuple defined arrays 2021-04-12 11:47:19 -04:00
gluax
2bb85f52c1 quick fix, it's in order in this location not reversed, add tests 2021-04-09 22:52:14 -04:00
damirka
1e1697b7fe Merge branch 'master' into feature/opti-cli-flag 2021-04-10 00:33:19 +03:00
howardwu
62ee4c3b8b chore(leo): bump version for new release 2021-04-09 14:08:52 -07:00
gluax
bddcef732f merge master, clean up reducer and directors 2021-04-09 12:48:59 -04:00
gluax
f963782d90 some bug fixing 2021-04-08 17:56:56 -04:00
gluax
cb2f77c7e4 program in, time to test 2021-04-08 16:36:37 -04:00
gluax
97b434986d statements 2021-04-08 16:06:44 -04:00
Collin Chin
23bca1e595
Merge pull request #796 from ljedrz/align_integers_with_snarkvm
Align with snarkVM's Integer changes
2021-04-07 15:28:39 -07:00
gluax
55dae9bc14 push some expression solving, start statements 2021-04-07 13:21:10 -04:00
damirka
8ac7440daa adds test, expects asg error 2021-04-07 20:20:58 +03:00
ljedrz
dee5f7dc15 fix: use a hand-written impl of get_index
Signed-off-by: ljedrz <ljedrz@gmail.com>
2021-04-07 10:01:26 +02:00
ljedrz
670e3c0b47 deps: update snarkVM
Signed-off-by: ljedrz <ljedrz@gmail.com>
2021-04-07 10:01:26 +02:00
ljedrz
74f02411e8 fix: align with snarkVM's Integer changes
Signed-off-by: ljedrz <ljedrz@gmail.com>
2021-04-07 10:01:26 +02:00
gluax
ac9414590f reduce type and the basis for type_inference ast 2021-04-06 17:09:36 -04:00
gluax
541b83d492 working on directing expressions so far 2021-04-06 14:07:37 -04:00
Collin Chin
ea5bc5d693
Merge pull request #825 from AleoHQ/bug/815-mutable-method-imuttable-context
Bug/815 mutable method imuttable context
2021-04-05 21:12:39 -07:00
Collin Chin
f3f569b233
Merge pull request #824 from AleoHQ/feature/no-space-between-literals
Feature/no space between literals
2021-04-05 21:11:57 -07:00
gluax
38c36cc305 tests for all the integers 2021-04-05 12:59:08 -04:00
gluax
f0ce9d400e testing the changes 2021-04-05 12:54:27 -04:00
damirka
2578be4287 fix test 2021-04-05 19:37:16 +03:00
damirka
03b2af4aaa Merge branch 'master' into unused-code-bye-bye 2021-04-05 16:40:30 +03:00
damirka
a588c18100 clippy 2021-04-05 16:39:38 +03:00
damirka
044dc96e58 adds tests for outputfile 2021-04-05 16:08:54 +03:00
gluax
f44dcc1e96 test for bug 2021-04-02 04:50:14 -04:00
gluax
dc8a04e872 fix test 2021-03-31 14:59:45 -04:00
gluax
24e5d5365b resolve all the merge conflicts 2021-03-31 14:08:38 -04:00
damirka
41600d0261 removed unused errors in compiler 2021-03-31 18:06:22 +03:00
gluax
34f0f1519a merge latest abnf branch 2021-03-30 19:38:37 -04:00
Collin Chin
bb8534bad1
Merge pull request #801 from ljedrz/dedup_code
Deduplicate code in Integer::allocate_type
2021-03-30 15:24:35 -07:00
collin
5bfca36fc7 fix array indexing bug and add test 2021-03-30 14:28:22 -07:00
Protryon
426cfbc88c address todos 2021-03-29 15:57:17 -07:00
Protryon
a763075e99 runtime array indexing 2021-03-29 14:16:53 -07:00
collin
9be13dfd51 update comments 2021-03-29 12:12:38 -07:00
collin
6774cbb01c fix canonicalization tests 2021-03-29 11:24:58 -07:00
gluax
e1a0838888 global consts work, time to add them to reducers and phases 2021-03-29 12:55:49 -04:00
damirka
c21114c161 adds compiler optimizations flags to build and other commands
- optimizations can either be turned all together or specified
- removed deprecated clippy rules, followed clippy
- removed library file logic from build command, we don't have libraries
2021-03-28 19:28:00 +03:00
damirka
5fdf86f415 added compiler options to constructor and factory methods 2021-03-28 17:49:49 +03:00
gluax
dadb518598 forgot to update test json 2021-03-26 17:14:37 -04:00
gluax
3e912ef165 access member fix 2021-03-26 17:02:59 -04:00
gluax
871e52006b quick bug fix 2021-03-26 16:51:03 -04:00
gluax
dd06df4b1d it almost fully works, need to fix arrays, circuits and function calls 2021-03-26 15:47:11 -04:00
gluax
406692c2aa merge master, next is parser 2021-03-26 12:07:48 -04:00
Protryon
63d1b1005f format 2021-03-26 05:19:42 -07:00
Protryon
5985d8da41 tendrilize spans 2021-03-26 05:18:55 -07:00
collin
dcc2844a50 fix canonicalization test 2021-03-25 22:52:58 -07:00
collin
6a1afdabb7 Merge branch 'master' of https://github.com/AleoHQ/leo into feature/constant-mutable-declarations 2021-03-25 22:46:11 -07:00
collin
28bca20b97 pray to the clippy gods (allow upper case acronyms in state module) 2021-03-25 16:03:32 -07:00
collin
ef8517b8ce allow clippy warns 2021-03-25 15:51:46 -07:00
gluax
c78ab699b8 another test 2021-03-25 16:52:43 -04:00
gluax
793cbb9f27 add test for const self, no clippy issues locally 2021-03-25 14:30:06 -04:00
gluax
696825eb6a asked for refactors started, this will fail tests 2021-03-25 13:48:47 -04:00
gluax
3efc705a8c fix tests merged from master 2021-03-25 11:19:42 -04:00
gluax
ab32aeb342 merge master 2021-03-24 15:13:53 -04:00
Collin Chin
94e7509690
Merge pull request #784 from AleoHQ/dead-code-elimination
Dead code elimination
2021-03-23 16:26:22 -07:00
collin
113ba12959 add tests for dead code elim 2021-03-23 15:49:56 -07:00
collin
99efdf00cb add comments to asg passes 2021-03-23 15:33:13 -07:00
Collin Chin
46220aa889
Merge pull request #761 from AleoHQ/feature/const-inputs
[Feature, Compiler] Adds constant inputs
2021-03-23 15:19:44 -07:00
collin
3a6ca5018d edit main input comments 2021-03-23 14:44:16 -07:00
collin
8172d73a71 fix bit not error 2021-03-23 14:38:20 -07:00
collin
68afcadfa4 update error descriptions 2021-03-23 14:36:22 -07:00
gluax
0ea4f1e0e3 const_ self as function input properly 2021-03-23 11:49:27 -04:00
ljedrz
d14edcb4cd refactor: use a macro to deduplicate code in Integer::allocate_type
Signed-off-by: ljedrz <ljedrz@gmail.com>
2021-03-23 11:24:47 +01:00
collin
ae9ba51b7d update pedersen hash example to use constant inputs 2021-03-22 15:24:32 -07:00
gluax
2c6a34fea7 test that was failing coverage only existed on master 2021-03-22 11:47:34 -04:00
gluax
ef43230e98 merge master and see if it fixes coverage ci 2021-03-22 11:38:19 -04:00
Max Bruce
d120e90d6e
Merge branch 'master' into dead-code-elimination 2021-03-22 07:04:38 -07:00
gluax
1d9befc0ac function input mutable by default 2021-03-19 11:30:24 -04:00
damirka
b5ae4e1ca4 extended errors, added more error cases 2021-03-19 15:15:06 +03:00
gluax
b50919085b deprecate let mut, undeprecate const, let is now mutable by default 2021-03-18 15:19:07 -04:00
collin
f1f8b99690 add passing iteration test with loop variable 2021-03-17 12:35:16 -07:00
gluax
dceb8a9744 fix Self inside of circuit giving an error, tests 2021-03-17 14:33:04 -04:00
damirka
0eb7b972c7 Merge branch 'master' into feature/const-inputs 2021-03-17 20:54:52 +03:00
damirka
2862549603 removed unwraps 2021-03-17 13:23:58 +03:00
gluax
e9bc1159ff merge master and fix last bug 2021-03-16 17:28:59 -04:00
gluax
6ffcb48822 asg now handles Circuit name in Circuit name, some bug fixes 2021-03-16 16:49:18 -04:00
damirka
60519275c9 added test for non const input as const 2021-03-16 23:18:10 +03:00
collin
0a28945262 Merge branch 'master' of https://github.com/AleoHQ/leo into dead-code-elimination 2021-03-16 12:19:01 -07:00
collin
078f0b4351 Merge branch 'master' of https://github.com/AleoHQ/leo into fix/const-loop-range 2021-03-16 12:18:15 -07:00
damirka
8c228cc6b7 forced const inputs for const variables 2021-03-16 20:37:27 +03:00
damirka
037851e703 Merge branch 'master' into feature/const-inputs 2021-03-16 16:34:29 +03:00
damirka
40f4b1cb65 covered type mismatch in constant inputs 2021-03-16 16:32:55 +03:00
howardwu
0a324ec817 Fix merge conflict with master 2021-03-15 21:14:04 -07:00
howardwu
284bee6fe8 Update to ToBitsBEGadget, update to snarkVM v0.2.1 2021-03-15 21:02:03 -07:00
damirka
a516f36e4f remove pub visibility in program_input 2021-03-16 00:50:04 +03:00
damirka
2508ec7ef1 array dimensions check added, const tuples added 2021-03-15 22:58:34 +03:00
gluax
7d2a71c668 Merge master 2021-03-15 13:52:51 -04:00
gluax
ac13542638 Proper Errors 2021-03-15 13:37:23 -04:00
damirka
258255102a expect fail in mismatch 2021-03-15 17:09:50 +03:00
damirka
229141a06e Merge branch 'master' into feature/const-inputs 2021-03-15 16:45:30 +03:00
damirka
b58db80005 updates after @collinc97 comments 2021-03-15 16:29:45 +03:00
Protryon
5f79a261e7 add cond_mut test 2021-03-13 07:02:18 -08:00
Protryon
ba9444ecc4 dead code elimination pass 2021-03-13 06:58:09 -08:00
Collin Chin
1c15fb5eff formatting 2 2021-03-12 21:13:17 -08:00
Collin Chin
45316e90d9 formatting 2021-03-12 21:02:38 -08:00
Collin Chin
712d2fbd02 add test for non-constant loop ranges 2021-03-12 20:39:58 -08:00
Collin Chin
6ce003fd6c fix program parsing formatted errors 2021-03-12 20:35:34 -08:00
collin
e369cb7049 remove leo-gadgets crate 2021-03-12 15:08:44 -08:00
collin
6962e1c2e1 refactor to use snarkvm int16 int32 int64 int128 gadgets 2021-03-12 15:03:22 -08:00
collin
bec4a15c12 refactor to use snarkvm int8 gadget 2021-03-12 14:23:41 -08:00
Collin Chin
1fbd337fec
Merge pull request #773 from AleoHQ/refactor/gadget-sign-extend
Refactor sign extend gadget
2021-03-12 11:48:02 -08:00
damirka
14d167a725 added tests for constants 2021-03-12 13:56:38 +03:00
damirka
15906bd4d2 updates following @collinc97 review 2021-03-12 12:35:17 +03:00
damirka
8542afe838 added const values processing for tuple and array 2021-03-12 10:21:03 +03:00
damirka
9808b2fa7f Merge branch 'master' into feature/const-inputs 2021-03-12 10:14:29 +03:00
collin
14063f723b refactor to use snarkvm evaluatelt and comparator gadgets 2021-03-11 16:44:46 -08:00
collin
522e3b6ea6 refactor to use snarkvm sub gadget 2021-03-11 16:27:06 -08:00
collin
b5ae6dee64 remove old pow gadget files 2021-03-11 16:19:20 -08:00
collin
faacfbc97e refactor to use snarkvm neg gadget 2021-03-11 16:12:33 -08:00
collin
d4b8bbbe50 refactor to use snarkvm mul gadget 2021-03-11 16:02:28 -08:00
collin
11ddb1f761 refactor to use snarkvm div gadget 2021-03-11 15:54:55 -08:00
Collin Chin
6d378c37e6
Merge pull request #760 from ljedrz/clippy_lints
clippy: 1.50 lints
2021-03-11 15:20:53 -08:00
collin
deb3847b8e remove add trait and uint impls 2021-03-11 14:47:34 -08:00
damirka
344d7886ea change grouping in imports 2021-03-11 23:10:05 +03:00
damirka
47e4d23ab1 staging commit with const input syntax and constants processing 2021-03-11 19:05:08 +03:00
ljedrz
25458835dc clippy: fix 1.50 lints
Signed-off-by: ljedrz <ljedrz@gmail.com>
2021-03-11 14:12:43 +01:00
Protryon
b28f8db4f5 flatten asg-passes 2021-03-10 09:57:27 -08:00
Protryon
0f977707a9 fmt 2021-03-10 09:35:11 -08:00
Protryon
9156068801 constant folding 2021-03-10 09:35:11 -08:00
Collin Chin
ace4147db7
Merge pull request #744 from AleoHQ/dependabot/cargo/indexmap-1.6.2
Bump indexmap from 1.6.1 to 1.6.2
2021-03-08 18:25:51 -08:00
Collin Chin
110fbdd6a6
Merge pull request #692 from AleoHQ/console-assert-error
[CLI] Changes compiler error message for console.assert
2021-03-08 17:50:53 -08:00
dependabot-preview[bot]
c764020b4e
Bump indexmap from 1.6.1 to 1.6.2
Bumps [indexmap](https://github.com/bluss/indexmap) from 1.6.1 to 1.6.2.
- [Release notes](https://github.com/bluss/indexmap/releases)
- [Commits](https://github.com/bluss/indexmap/compare/1.6.1...1.6.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-09 00:46:13 +00:00
Collin Chin
a18b757ff4
Merge branch 'master' into console-assert-error 2021-03-08 16:20:46 -08:00
dependabot-preview[bot]
ab5da38aa0
Bump num-bigint from 0.3.1 to 0.4.0
Bumps [num-bigint](https://github.com/rust-num/num-bigint) from 0.3.1 to 0.4.0.
- [Release notes](https://github.com/rust-num/num-bigint/releases)
- [Changelog](https://github.com/rust-num/num-bigint/blob/master/RELEASES.md)
- [Commits](https://github.com/rust-num/num-bigint/compare/num-bigint-0.3.1...num-bigint-0.4.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-03-08 23:39:44 +00:00
Protryon
a4f2101aaf remove if from ternary expression 2021-03-08 14:45:38 -08:00
Protryon
f5187fc872 fix some failing tests 2021-03-07 06:27:42 -08:00
collin
10ecc6e6e2 merge master and fix build issues 2021-03-04 14:11:17 -08:00
howardwu
2e7b542b8b Format and clean up, enable default on snarkvm_algorithms 2021-03-04 11:09:24 -08:00
howardwu
1735038dee Update algorithms, curves, and gadget traits 2021-03-04 11:02:31 -08:00
howardwu
4650b5cd80 Update gadget traits 2021-03-04 11:01:00 -08:00
howardwu
3bdf598431 Update field and curves traits 2021-03-04 10:59:43 -08:00
howardwu
8690e35e95 Update field structs 2021-03-04 10:58:50 -08:00
howardwu
c03e1045f2 Update gadgets traits 2021-03-04 10:57:20 -08:00
howardwu
dadc57a148 Add r1cs dep 2021-03-04 10:55:22 -08:00
howardwu
e11ef69f74 Add fields dep 2021-03-04 10:54:37 -08:00
howardwu
b029469eca Remove objects dep 2021-03-04 10:54:21 -08:00
howardwu
4692a2b20e Update object errors 2021-03-04 10:53:48 -08:00
howardwu
1b0a6dbd69 Update fields traits 2021-03-04 10:52:54 -08:00
howardwu
7b7c1bbef4 Remove object dept 2021-03-04 10:51:59 -08:00
howardwu
4e9576e58d Fix object errors 2021-03-04 10:49:47 -08:00
howardwu
d8e9edc941 Update fields structs 2021-03-04 10:48:28 -08:00
howardwu
24f5b168aa Updates r1cs traits 2021-03-04 10:45:37 -08:00
howardwu
f3daba63df Update gadgets traits 2021-03-04 10:41:33 -08:00
howardwu
fc4bc537dd Update primefield traits 2021-03-04 10:39:56 -08:00
howardwu
b95495bab3 Update r1cs error 2021-03-04 10:39:22 -08:00
howardwu
3c4b8e9f68 Update gadgets traits 2021-03-04 10:38:28 -08:00
howardwu
400e3dd440 Update r1cs traits 2021-03-04 10:36:54 -08:00
howardwu
bfdf3c4dca Update field trait 2021-03-04 10:36:29 -08:00
howardwu
4f50b44a63 itemize imports 2021-03-04 10:33:51 -08:00
howardwu
c9f70800fd Update .tomls to 0.2.0 2021-03-04 10:33:21 -08:00
Protryon
d400764e00 parser rewrite 2021-03-03 09:59:24 -08:00
howardwu
2bfb64f83e Update synthesizer to support new terminology 2021-02-27 13:21:29 -08:00
howardwu
8a05594b42 Bump snarkvm to v0.0.6 2021-02-27 13:10:39 -08:00
howardwu
77a0af18fe chore(leo): bump version for new release 2021-02-26 19:42:35 -08:00
François Garillot
0d7c6d0b65
Simplifies a number of pattern-matches
Into the direct `Result` / `Option` combinator they correspond to, for concision / clarity.

Reviewed from automated suggestions generated from [comby-rust](https://github.com/huitseeker/comby-rust).
2021-02-26 13:03:04 -08:00
gluax
6e38cc3b31 merge master for uid deprecation 2021-02-25 13:25:38 -05:00
gluax
3e20a9a177
Merge branch 'master' into feature/485-defines 2021-02-25 13:06:40 -05:00
collin
356b7ba062 merge master 2021-02-25 09:51:12 -08:00
damirka
efd193f187 Merge branch 'master' into console-assert-error 2021-02-25 20:24:43 +03:00
howardwu
be398437c6 Updates snarkVM to 0.0.5, updates rand usage 2021-02-25 08:56:20 -08:00
gluax
88bdc45eb1 merge master 2021-02-25 11:56:14 -05:00
gluax
38f5417571 last bit of clean up 2021-02-25 11:48:13 -05:00
Protryon
ed8d2fb11d remove uuid dependency 2021-02-25 07:40:47 -08:00
howardwu
2e00ff451e Rename all instances of 'ctx' to 'context' 2021-02-24 18:13:36 -08:00
gluax
e970194ed3 tuple const fixes, compiler tests 2021-02-24 11:48:00 -05:00
damirka
6448dac047 Fixes #580
- changes error message for console.assert inside main()
- small rewrite of setup command
- adds some autoformatting
2021-02-24 19:17:44 +03:00
dependabot-preview[bot]
f38cce71b3
Bump bincode from 1.3.1 to 1.3.2
Bumps [bincode](https://github.com/servo/bincode) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/servo/bincode/releases)
- [Commits](https://github.com/servo/bincode/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2021-02-24 10:47:15 +00:00
gluax
f7314625ff basic use case works, need to clean up, and test more advanced use cases 2021-02-23 14:38:50 -05:00
bors[bot]
211fcb0195
Merge #678
678: Bug 662 Fix r=collinc97 a=gluax

Allows -field values in input values, resolves #662. Also add tests for that and group - input values. Cleans up the re-written code used in a few places by adding a pub crate function. Depends on #626.

Co-authored-by: gluax <jonathan.t.pavlik@gmail.com>
Co-authored-by: gluax <16431709+gluax@users.noreply.github.com>
2021-02-19 22:10:36 +00:00
gluax
c5641a5507
Update compiler/src/value/field/input.rs
Co-authored-by: Collin Chin <collin.chin@berkeley.edu>
2021-02-19 13:25:11 -05:00
gluax
ad6f3fcf84 allow -field values in input values, clean up repeated code 2021-02-18 14:36:38 -05:00
bors[bot]
c62af038c5
Merge #672 #673
672: Feature/515 eliminate const vars r=collinc97 a=gluax

Resolves #515. Removes const keyword from statements. Also resolves #514. Still allows const y in function declaration of args.

673: feature/671-primefield-refactor r=collinc97 a=gluax

Resolves #671. Refactor "Field + PrimeField" -> "PrimeField" and all tests still pass.

Co-authored-by: gluaxspeed <jonathan.t.pavlik@gmail.com>
Co-authored-by: gluax <jonathan.t.pavlik@gmail.com>
Co-authored-by: Collin Chin <collin.chin@berkeley.edu>
2021-02-18 18:46:46 +00:00
gluax
a7b28fbf0a resolve all the merge conflicts 2021-02-18 11:39:35 -05:00
Collin Chin
9baa9388a0
Merge branch 'master' into feature/515-eliminate-const-vars 2021-02-17 22:06:12 -08:00
bors[bot]
6715f91690
Merge #670
670: feature_626/negative-group-contstraints r=collinc97 a=gluax

Resolves #626. Allows a negative group outside of a pair as well as negative numbers inside a pair group. Waiting to see if the later was necessary in the feature discussion, but I assume it would be.

Co-authored-by: gluax <jonathan.t.pavlik@gmail.com>
2021-02-17 20:50:30 +00:00
bors[bot]
54a9691b73
Merge #652 #663
652: ASG refactor r=collinc97 a=Protryon

## Motivation

This PR makes the ASG more user friendly by using arenas instead of RefCell/Arc:
1. Impossible to leak the ASG by creating a circular strong reference chain
2. We don't need RefCell's everywhere to implement passes

663: Bug 625/fix negative fields not allowed r=collinc97 a=gluax

Resolves #625. Logic used to do so is in check if first character of string to convert is a negative sign. If so remove first character convert from string to field, and then negate it on the leo side. If first character wasn't a negative sign, do the same as before.

Co-authored-by: Protryon <max.bruce12@gmail.com>
Co-authored-by: gluax <jonathan.t.pavlik@gmail.com>
Co-authored-by: gluax <16431709+gluax@users.noreply.github.com>
2021-02-17 20:10:30 +00:00
Protryon
29711ff041 clippy 2021-02-16 13:33:22 -08:00
Protryon
bf61820115 asg refactor 2021-02-16 13:32:34 -08:00
gluax
7e7db4d93b
remove comment
Co-authored-by: Collin Chin <collin.chin@berkeley.edu>
2021-02-16 15:12:20 -05:00
gluax
6cdefa7128
remove comment
Co-authored-by: Collin Chin <collin.chin@berkeley.edu>
2021-02-16 15:12:07 -05:00
gluax
ba3ca6069a refactor Field + PrimeField -> PrimeField, all tests still pass 2021-02-16 14:41:59 -05:00
gluax
d549fda7b5 rebase and replace const keyword in tests 2021-02-16 14:19:20 -05:00
gluax
8150869c6c negative groups, and negative group coords allowed 2021-02-16 12:00:08 -05:00
gluax
5bbaf9d999 add non negated field to test, merge master 2021-02-16 09:22:10 -05:00
bors[bot]
a7c9caf4b3
Merge #653
653: Fix return type error for input-dependent branches r=collinc97 a=Protryon

This PR fixes failure to handle input-dependent branches. No tests added here since base case is covered, and this only occurs with production constraints. Should fix #535.

There is an additional issue not solved by this PR on branching on booleans from input.

Co-authored-by: Protryon <max.bruce12@gmail.com>
2021-02-12 23:36:59 +00:00
gluax
eda78dd968 clippy fix 2021-02-12 15:22:59 -05:00
gluax
500a3e76d2 fix negative fields, add test for them 2021-02-12 15:20:58 -05:00
Collin Chin
6ac356819c
Merge pull request #656 from AleoHQ/dependency/snarkvm-0.0.4
[Dependencies] bump snarkvm module versions to 0.0.4
2021-02-11 19:50:48 -08:00
collin
537ea39513 bump snarkvm module versions to 0.0.4 2021-02-11 17:33:53 -08:00
bors[bot]
fa53e75f51
Merge #641
641: Bug/564 input array len not enforced r=collinc97 a=gluax

Resolves #564, depends on #563. The changes for this branch have pulled from PR #638, which is the PR that fixes #563.

Co-authored-by: gluaxspeed <jonathan.t.pavlik@gmail.com>
2021-02-11 21:41:53 +00:00
bors[bot]
d418b5330c
Merge #638
638: bug/563-array-input-wrong-dimensions r=collinc97 a=gluax

Closes #563. Fixes the array dimension builder when coming from the input file. Adds a test for it as well.

Co-authored-by: gluaxspeed <jonathan.t.pavlik@gmail.com>
2021-02-11 21:22:50 +00:00
Protryon
0bd324bcb4 fix return type error for input-dependent branches 2021-02-11 08:52:22 -08:00
gluaxspeed
9a015e1e5f console assert tests 2021-02-11 10:46:54 -05:00
gluaxspeed
cedcc6e1d1 console assert tests 2021-02-11 10:46:20 -05:00
Collin Chin
20a046bbbb
Merge pull request #643 from AleoHQ/feat/readme_license
Adds READMEs and LICENSEs to each Leo workspace member
2021-02-11 00:58:22 -08:00
bors[bot]
a3f0f9d587
Merge #633 #634
633: duplicate name context test r=collinc97 a=gluax

Adding a test for duplicate name context that was resolved in #546.

634: fn call array params r=collinc97 a=gluax

Adding a test for bug #522, which was resolved by the asg.

Closes #522 

Co-authored-by: gluaxspeed <jonathan.t.pavlik@gmail.com>
2021-02-11 07:53:26 +00:00
bors[bot]
b72b5ac125
Merge #620
620: Feature/254 strengthen import rules r=collinc97 a=gluax

Grammar changes are a bit different than what was suggested in the original feature request #254. However, it should be logically equivalent and I think makes more sense on the rust side.

Closes #254 

Co-authored-by: gluaxspeed <jonathan.t.pavlik@gmail.com>
2021-02-11 07:31:56 +00:00
howardwu
777a67fb40 Adds README.md 2021-02-10 22:27:37 -08:00