Commit Graph

432 Commits

Author SHA1 Message Date
dependabot[bot]
cc76430f9d
Bump smallvec from 1.12.0 to 1.13.1
Bumps [smallvec](https://github.com/servo/rust-smallvec) from 1.12.0 to 1.13.1.
- [Release notes](https://github.com/servo/rust-smallvec/releases)
- [Commits](https://github.com/servo/rust-smallvec/compare/v1.12.0...v1.13.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-22 10:41:13 +00:00
d0cd
e0aed142fc
Merge pull request #27446 from AleoHQ/dependabot/cargo/testnet3/smallvec-1.12.0
Bump smallvec from 1.11.2 to 1.12.0
2024-01-16 09:33:32 +08:00
Pranav Gaddamadugu
d1a1b258ec Remove InputAST from compiler 2024-01-15 15:45:07 -08:00
dependabot[bot]
87e9d323b0
Bump smallvec from 1.11.2 to 1.12.0
Bumps [smallvec](https://github.com/servo/rust-smallvec) from 1.11.2 to 1.12.0.
- [Release notes](https://github.com/servo/rust-smallvec/releases)
- [Commits](https://github.com/servo/rust-smallvec/compare/v1.11.2...v1.12.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-15 10:05:18 +00:00
evan-schott
28dae76945 CLI fix 2024-01-03 13:13:32 -08:00
evan-schott
902387d639
Merge branch 'testnet3' into feat/stubs
Signed-off-by: evan-schott <53463459+evan-schott@users.noreply.github.com>
2024-01-03 15:22:04 -05:00
Pranav Gaddamadugu
4730bb0fb4 Clippy 2023-12-04 18:44:03 -08:00
Andrew Rosborough
81b90017c3 #15513 Fix bug with parsing U32<N> from string into usize. 2023-12-04 13:56:51 -05:00
evan-schott
3ff41db376 Default trait for stubs 2023-11-30 16:10:26 -08:00
evan-schott
cd3ae369fc Clippy fix 2023-11-30 16:10:26 -08:00
evan-schott
c94c2c33b6 mapping & nit fix 2023-11-30 15:48:25 -08:00
evan-schott
313a5e45a9 add finalize 2023-11-30 15:47:34 -08:00
evan-schott
11851d4b8d support arrays as inputs 2023-11-30 15:46:48 -08:00
evan-schott
ce160d6882 clippy 2023-11-30 11:43:08 -08:00
evan-schott
b5a9eed04c From traits to from ProgramCore->AST 2023-11-30 11:39:19 -08:00
evan-schott
aa37895d91 mess 2023-11-30 11:38:39 -08:00
evan-schott
400702e900 add finalize_stub field to function_stub AST 2023-11-30 10:52:38 -08:00
evan-schott
f1a19b2a03 rebase fix 2023-11-30 10:52:16 -08:00
evan-schott
bd2e3de733 Allow imports & Variant::Function functions in stubs 2023-11-30 10:52:16 -08:00
evan-schott
ae6fda3b52 Update AST 2023-11-30 10:52:15 -08:00
evan-schott
cf7baa0132 Update AST to include FunctionStub and Stub 2023-11-30 10:52:15 -08:00
Pranav Gaddamadugu
4a0228bcac Update CI rust version 2023-11-27 17:18:48 -08:00
Pranav Gaddamadugu
afc953cd0b Clippy + fmt 2023-11-22 17:34:20 -08:00
Pranav Gaddamadugu
1afa68a66e Remove is_main 2023-11-22 17:33:42 -08:00
d0cd
5c6a6315e8
Merge pull request #5085 from AleoHQ/dependabot/cargo/testnet3/smallvec-1.11.2
Bump smallvec from 1.11.1 to 1.11.2
2023-11-20 18:10:35 -08:00
dependabot[bot]
ec6be21abf
Bump itertools from 0.11.0 to 0.12.0
Bumps [itertools](https://github.com/rust-itertools/itertools) from 0.11.0 to 0.12.0.
- [Changelog](https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-itertools/itertools/compare/v0.11.0...v0.12.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-15 10:11:57 +00:00
dependabot[bot]
909aaf6904
Bump smallvec from 1.11.1 to 1.11.2
Bumps [smallvec](https://github.com/servo/rust-smallvec) from 1.11.1 to 1.11.2.
- [Release notes](https://github.com/servo/rust-smallvec/releases)
- [Commits](https://github.com/servo/rust-smallvec/compare/v1.11.1...v1.11.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-11-11 20:19:20 +00:00
Pranav Gaddamadugu
6756320fd8 Regen expectations 2023-10-27 18:54:58 -04:00
Pranav Gaddamadugu
8ca1de3951 Refactor Reconstructor 2023-10-27 18:54:57 -04:00
Pranav Gaddamadugu
5b2e73d419 Refactor TupleTyple 2023-10-27 18:54:57 -04:00
Pranav Gaddamadugu
072ab7b930 Change PositiveNumber to NonzeroNumber 2023-10-27 18:54:56 -04:00
Pranav Gaddamadugu
7e471b7748 Add type checking for arrays 2023-10-27 18:54:56 -04:00
Pranav Gaddamadugu
c94acdebbd Support array access expressions in AST and visitors 2023-10-27 18:54:56 -04:00
Pranav Gaddamadugu
5f75ae8c49 Support array expressions in AST and visitors 2023-10-27 18:54:56 -04:00
Pranav Gaddamadugu
e372710d22 Introduce ArrayExpression 2023-10-27 18:54:56 -04:00
Pranav Gaddamadugu
d8a7f74508 Add support for parsing the array type 2023-10-27 18:54:56 -04:00
Pranav Gaddamadugu
c3b92d1a4d Add Array type to Type 2023-10-27 18:54:56 -04:00
Pranav Gaddamadugu
25b7d5cfac Rename types::Tuple to types::TupleType 2023-10-27 18:54:56 -04:00
Pranav Gaddamadugu
3fda5aab62 Introduce Array type 2023-10-27 18:54:56 -04:00
Collin Chin
eb12c7e475 chore(leo): bump version for new release 2023-10-19 21:02:05 -07:00
evan-schott
7f7f92b508 remove duplicate reconstruct_const functions 2023-10-04 13:05:35 -07:00
evan-schott
e9d55796a2 Apply suggestions from code review
Co-authored-by: d0cd <pranavsaig@gmail.com>
Signed-off-by: evan-schott <53463459+evan-schott@users.noreply.github.com>
2023-10-04 13:05:35 -07:00
evan-schott
0d1ed9671e clippy 2023-10-04 13:00:58 -07:00
evan-schott
0a2ea03701 rebase 2023-10-04 13:00:52 -07:00
evan-schott
24c88795fe fixes 2023-10-04 12:54:36 -07:00
evan-schott
09df202905 updated AST pass templates to account for addition of const in programscope 2023-10-04 12:54:36 -07:00
Pranav Gaddamadugu
3d5495aefa Make program scopes indexable by symbol 2023-09-28 23:34:18 -04:00
Collin Chin
9c20f42d1d
Feat/sha3 (#2604)
* implement Keccak256 Keccak384 Keccak512 with tests

* implement SHA3_256 SHA3_384 SHA3_512 with tests
2023-09-22 09:54:14 -07:00
Collin Chin
82b39a81e9
implement Keccak256 Keccak384 Keccak512 with tests (#2603) 2023-09-22 08:31:30 -07:00
dependabot[bot]
f15677c2f6
Bump smallvec from 1.11.0 to 1.11.1
Bumps [smallvec](https://github.com/servo/rust-smallvec) from 1.11.0 to 1.11.1.
- [Release notes](https://github.com/servo/rust-smallvec/releases)
- [Commits](https://github.com/servo/rust-smallvec/compare/v1.11.0...v1.11.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-21 10:05:48 +00:00
d0cd
edcf90580e
Fix inlining issue (#2581) 2023-09-18 09:52:52 -07:00
collin
0f2f16877b chore(leo): bump version for new release 2023-09-08 10:18:21 -07:00
evan-schott
aceb20b8d5 Merge remote-tracking branch 'origin/testnet3' into feat/hash-symbol-table 2023-09-07 11:09:02 -07:00
evan-schott
444a4214eb run all tests, add optionality for writing symbol tables to json 2023-09-06 16:02:21 -07:00
Pranav Gaddamadugu
e96475b3e2 Update AST 2023-08-30 14:05:46 -04:00
Pranav Gaddamadugu
46e9313e55 Introduce Type::Signature to the AST 2023-08-30 14:05:46 -04:00
d0cd
e180118a30
Merge pull request #2545 from AleoHQ/feat/underscore
Add support for underscores in numeric literals #2538
2023-08-28 08:17:22 -04:00
evan-schott
f4fee23758 clippy fix 2023-08-24 15:40:00 -07:00
evan-schott
439d2b29de loop unrolling compatible with underscores 2023-08-24 15:07:00 -07:00
collin
439312275a fix more warnings 2023-08-18 16:47:08 -07:00
Pranav Gaddamadugu
440cced9d8 Cleanup 2023-08-17 17:49:29 -04:00
Pranav Gaddamadugu
05d38f3777 Use NodeBuilder in Flattener 2023-08-17 17:22:56 -04:00
Pranav Gaddamadugu
637e091abb Use NodeBuilder in DCE 2023-08-17 17:22:56 -04:00
Pranav Gaddamadugu
a1b5cb1add Add NodeID to AST node constructors 2023-08-17 17:22:56 -04:00
Pranav Gaddamadugu
c2d04bf444 Introduce NodeBuilder 2023-08-17 17:22:56 -04:00
Pranav Gaddamadugu
93efccc9a7 Add NodeID to Identifier::serialize 2023-08-17 17:22:56 -04:00
d0cd
7cd6e757bf
Merge pull request #2522 from AleoHQ/design/node-id
[Design] Add `id` to AST nodes.
2023-08-17 00:26:52 -04:00
collin
11b87229f1 chore(leo): bump version for new release 2023-08-15 14:02:00 -07:00
Pranav Gaddamadugu
cbe79c0e98 Remove unused code 2023-08-09 17:38:13 -04:00
Pranav Gaddamadugu
9125c84cd1 Make StructVariableInitializer an AST node 2023-08-09 17:22:52 -04:00
Pranav Gaddamadugu
90add44907 WIP update passes 2023-08-09 15:34:39 -04:00
Pranav Gaddamadugu
a819488190 Support NodeID in parser; note that NodeID::default() is a placeholder 2023-08-09 13:09:43 -04:00
Pranav Gaddamadugu
5a1b9efd80 Add NodeID to Literal 2023-08-09 10:46:06 -04:00
Pranav Gaddamadugu
ec3aa4bd75 Update Reconstructor 2023-08-09 10:45:48 -04:00
Pranav Gaddamadugu
2f024c8346 Add id field to AST nodes 2023-08-09 10:13:59 -04:00
Pranav Gaddamadugu
6ab280a935 Add id to Node 2023-08-09 09:30:01 -04:00
collin
7714f55999 chore(leo): bump version for new release 2023-08-08 10:14:56 -07:00
collin
d336be0b7b chore(leo): bump version for new release 2023-07-24 10:51:44 -07:00
collin
6a7748e5fe chore(leo): bump version for new release 2023-07-19 18:17:31 -07:00
dependabot[bot]
0c062b5164
Bump smallvec from 1.10.0 to 1.11.0 (#2472)
Bumps [smallvec](https://github.com/servo/rust-smallvec) from 1.10.0 to 1.11.0.
- [Release notes](https://github.com/servo/rust-smallvec/releases)
- [Commits](https://github.com/servo/rust-smallvec/compare/v1.10.0...v1.11.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-07-10 15:04:24 -07:00
collin
a18899f253 chore(leo): bump version for new release 2023-07-05 21:25:34 -07:00
d0cd
d92d48e4a5
[Fix] Fix issues related to flattening. (#2439)
* Implement fix

* Regen expectations

* Update AST printing for functions

* Fix code generation when there are no output operands

* Fix flattener

* Add additional tests

* Regen expectations

* Fmt

* Regen expectations
2023-07-05 15:45:15 -07:00
Collin Chin
b690a62676
impl Mapping::contains, Mapping::remove (#2436)
* impl Mapping::contains, Mapping::remove

* regen expectations

* Update compiler/passes/src/type_checking/checker.rs

Co-authored-by: Alessandro Coglio <coglio@kestrel.edu>
Signed-off-by: Collin Chin <16715212+collinc97@users.noreply.github.com>

---------

Signed-off-by: Collin Chin <16715212+collinc97@users.noreply.github.com>
Co-authored-by: Alessandro Coglio <coglio@kestrel.edu>
2023-06-29 17:04:55 -07:00
collin
9fccf015d7 chore(leo): bump version for new release 2023-06-28 21:09:44 -07:00
d0cd
b236918df4
[Feature] Support ChaCha::rand_* (#2433)
* Add tests for ChaCha::rand*

* Add Chacha::rand* to AST, tyc, and codegen

* Add lottery example

* Regen expectations

* Add check asserting that command is only used in finalize block

* Update example and related CI
2023-06-28 21:02:50 -07:00
d0cd
c373b898c4
Merge pull request #2427 from AleoHQ/feat/group-to-coordinate
[Feature] Support `to_x_coordinate` for `group`s.
2023-06-28 11:32:57 -04:00
Pranav Gaddamadugu
8062693f3d Support method calls for group coordinates 2023-06-23 21:03:11 -04:00
Pranav Gaddamadugu
9b7a4ba456 WIP associated function syntax for group::to_*_coordinate 2023-06-23 20:22:03 -04:00
collin
80b0976276 chore(leo): bump version for new release 2023-06-23 17:19:25 -07:00
d0cd
07d26ea43f
[Feature] Casting via the as operator. (#2426)
* Revert "Revert WIP"

This reverts commit 5cce8b4a0e.

* Update tyc

* Add parse, compile, and execute tests

* Regen expectations
2023-06-23 17:09:15 -07:00
dependabot[bot]
1025bd965d
Bump itertools from 0.10.5 to 0.11.0 (#2424)
Bumps [itertools](https://github.com/rust-itertools/itertools) from 0.10.5 to 0.11.0.
- [Changelog](https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-itertools/itertools/compare/v0.10.5...v0.11.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-23 17:07:51 -07:00
Pranav Gaddamadugu
5cce8b4a0e Revert WIP 2023-06-23 10:24:10 -04:00
Pranav Gaddamadugu
72c6dcd343 Add CastExpression to the AST 2023-06-23 00:15:59 -04:00
collin
7741f5b0c4 chore(leo): bump version for new release 2023-06-15 22:38:02 -07:00
collin
f5867a4fe4 chore(leo): bump version for new release 2023-06-15 22:26:19 -07:00
Collin Chin
e5ae160d1a
Implement new hash and commit functions (#2415)
* refactor hash -> hash_to_field

* refactor commit -> commit_to_field

* implement commit_to_address

* implement hash_to_address

* update hash and commit examples

* implement hash_to_scalar

* update tests

* implement bhp hash to integer variants

* implement bhp pedersen and poseidon integer variants

* Update compiler/passes/src/type_checking/checker.rs

Signed-off-by: Collin Chin <16715212+collinc97@users.noreply.github.com>

* Update compiler/passes/src/type_checking/checker.rs

Co-authored-by: Alessandro Coglio <coglio@kestrel.edu>
Signed-off-by: Collin Chin <16715212+collinc97@users.noreply.github.com>

* fix pedersen hash type checks

---------

Signed-off-by: Collin Chin <16715212+collinc97@users.noreply.github.com>
Co-authored-by: Alessandro Coglio <coglio@kestrel.edu>
2023-06-15 19:55:03 -07:00
Collin Chin
d83c4be330
Implement Mapping::get_or_use (#2413)
* get_or_init -> get_or_use

* use mapping get_or_use in examples

* fix codegen for Mapping::get_or_use

* fix tests for Mapping::get_or_use

* fix warnings, update snarvm rev

* bump circle rust img v1.70

* fix codegen

* update snarkvm rev and regen tests

* Update compiler/parser/src/parser/expression.rs

Co-authored-by: d0cd <pranavsaig@gmail.com>
Signed-off-by: Collin Chin <16715212+collinc97@users.noreply.github.com>

* Delete program.json

Signed-off-by: Collin Chin <16715212+collinc97@users.noreply.github.com>

* Delete program.json

Signed-off-by: Collin Chin <16715212+collinc97@users.noreply.github.com>

---------

Signed-off-by: Collin Chin <16715212+collinc97@users.noreply.github.com>
Co-authored-by: d0cd <pranavsaig@gmail.com>
2023-06-13 12:09:33 -07:00
Collin Chin
4e71f60cb4
Implement additional features to the "group" element type (#2394)
* add new hash and commit symbols

* pedersen commitment methods return fields

* use snarkvm rev a451d91, impl commit_to_group.bhp256

* implement bhp commit to group variants

* implement bhp hash_to_group variants

* implement pedersen commit_to_group and hash_to_scalar variants

* implement poseidon hash_to_group and hash_to_scalar variants

* remove hash_many symbol

* fix tests

* regen test expectations
2023-06-07 13:09:08 -07:00
collin
52dfc097c5 chore(leo): bump version for new release 2023-05-31 20:37:17 -07:00
Collin Chin
42d97d3d89
implement group::GEN Leo syntax (#2401)
* implement group::GEN Leo syntax

* revert unrelated test changes

* move new errors to bottom of file to keep previous error codes consistent
2023-05-31 16:05:56 -07:00