Collin Chin
13254ef4a3
Merge pull request #1886 from AleoHQ/abnf-static-calls
...
[ABNF] Add syntax for circuits and for associated constants and functions
2022-06-23 20:23:10 -10:00
Alessandro Coglio
93e9686972
[ABNF] Prohibit empty circuits.
...
These would flatten to nothing, component-wise.
This requirement actually slighly simplifies the grammar, avoiding the `[ ... ]`
around the circuit component declarations (in a circuit declaration) or the
circuit component initializers (in a circuit expression).
2022-06-23 21:13:24 -07:00
Alessandro Coglio
35485bea25
[ABNF] Add circuits and add associated constants.
2022-06-23 15:06:39 -07:00
collin
5ee2858b0a
add tests and remove dead code
2022-06-22 22:38:33 -10:00
collin
7417496eee
merge testnet3
2022-06-22 21:42:00 -10:00
Collin Chin
977e3369ea
Merge pull request #1890 from AleoHQ/dependabot/cargo/testnet3/clap-3.2.6
...
Bump clap from 3.2.5 to 3.2.6
2022-06-23 00:31:03 -07:00
Collin Chin
b2a40502f7
Merge pull request #1889 from AleoHQ/dependabot/cargo/testnet3/indexmap-1.9.1
...
Bump indexmap from 1.9.0 to 1.9.1
2022-06-23 00:30:43 -07:00
collin
4a80445bd8
test hashing u128 with ped64 fails
2022-06-22 21:29:04 -10:00
collin
4400545543
add all core circuit tests
2022-06-22 21:19:26 -10:00
collin
df908345bc
add circuit variable access and type check
2022-06-22 15:49:50 -10:00
collin
0c89c1b5fb
add circuit variable access and type check
2022-06-22 15:14:00 -10:00
dependabot[bot]
c2d81ca6e0
Bump clap from 3.2.5 to 3.2.6
...
Bumps [clap](https://github.com/clap-rs/clap ) from 3.2.5 to 3.2.6.
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v3.2.5...v3.2.6 )
---
updated-dependencies:
- dependency-name: clap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-06-22 10:15:16 +00:00
dependabot[bot]
299e918285
Bump indexmap from 1.9.0 to 1.9.1
...
Bumps [indexmap](https://github.com/bluss/indexmap ) from 1.9.0 to 1.9.1.
- [Release notes](https://github.com/bluss/indexmap/releases )
- [Changelog](https://github.com/bluss/indexmap/blob/master/RELEASES.md )
- [Commits](https://github.com/bluss/indexmap/compare/1.9.0...1.9.1 )
---
updated-dependencies:
- dependency-name: indexmap
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-06-22 10:15:09 +00:00
collin
a79196c945
fix circuit type checking, addresses review comments 2/2
2022-06-21 19:37:23 -07:00
collin
d6e32788b4
rename static -> associated, addresses review comments 1/2
2022-06-21 18:30:10 -07:00
Collin Chin
5b572278fb
Merge pull request #1871 from AleoHQ/misc-improvements
...
Misc improvements
2022-06-21 10:45:20 -07:00
Mazdak Farrokhzad
01e4b292cf
cleanup unused expecations
2022-06-21 17:23:30 +02:00
Mazdak Farrokhzad
7dbe55b38a
cleanup
2022-06-21 17:12:36 +02:00
Mazdak Farrokhzad
b4e8a773df
simplify bidi override logic
2022-06-21 17:12:36 +02:00
Mazdak Farrokhzad
1d92e07fdf
simplify tokenize_iter
2022-06-21 17:12:36 +02:00
Mazdak Farrokhzad
2c194b8e57
reduce work for string literals bidi check
2022-06-21 17:12:36 +02:00
Mazdak Farrokhzad
8b3e87889f
cargo clippy
2022-06-21 17:12:36 +02:00
Mazdak Farrokhzad
7226659bf6
Value -> Literal
2022-06-21 17:12:34 +02:00
Mazdak Farrokhzad
ddbf2ae849
1. Speed up string literal lexing.
...
2. Move address check to parser.
3. Move assignment place WF check to type checker.
2022-06-21 17:07:44 +02:00
Alessandro Coglio
abc50d8c3e
[ABNF] Add syntax for static function calls.
...
Also renames pre-existing (generic) function calls to 'free function calls', now
that we are effectively introducing a new kind of functions, namely (associated)
static functions, distinguished from free (i.e. non-associated) functions.
Also introduces notion of named type, as a type that has a name, which may be
either a keyword (e.g. `u8`, `address`) or an identifier (e.g. `Pedersen64`).
2022-06-20 13:46:43 -07:00
collin
f7a55de9a6
lt, gt, lte, gte for address
2022-06-20 13:25:40 -07:00
collin
99605f46a5
le, ge -> lte, gte
2022-06-20 13:24:20 -07:00
collin
23ba8bc40c
check field type for square_root
2022-06-20 13:18:11 -07:00
collin
d4171de577
check signed ints for abs and abs.w
2022-06-20 13:15:13 -07:00
collin
811eaadc98
remove poseidon prfs
2022-06-20 13:06:47 -07:00
collin
bfd3a37a42
merge testnet3
2022-06-20 12:34:33 -07:00
Collin Chin
1971dd0aa1
Merge pull request #1880 from AleoHQ/abnf-new-operators
...
[ABNF] Add new operators.
2022-06-20 12:24:12 -07:00
Collin Chin
6b064d0227
Merge pull request #1873 from AleoHQ/abnf-operator-calls
...
[ABNF] Add operator calls.
2022-06-20 12:23:46 -07:00
Collin Chin
39de5d1238
Merge pull request #1884 from AleoHQ/dependabot/cargo/testnet3/anyhow-1.0.58
...
Bump anyhow from 1.0.57 to 1.0.58
2022-06-20 12:22:49 -07:00
Collin Chin
b0c32a9ff1
Merge pull request #1883 from AleoHQ/dependabot/cargo/testnet3/indexmap-1.9.0
...
Bump indexmap from 1.8.2 to 1.9.0
2022-06-20 12:22:31 -07:00
Collin Chin
c95c920f04
Merge pull request #1866 from AleoHQ/method-call-expr
...
Implement AVM instructions as Leo method calls
2022-06-20 12:21:07 -07:00
dependabot[bot]
b0ecf7361c
Bump anyhow from 1.0.57 to 1.0.58
...
Bumps [anyhow](https://github.com/dtolnay/anyhow ) from 1.0.57 to 1.0.58.
- [Release notes](https://github.com/dtolnay/anyhow/releases )
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.57...1.0.58 )
---
updated-dependencies:
- dependency-name: anyhow
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-06-20 10:20:15 +00:00
Alessandro Coglio
5539ce11a6
[ABNF] Improve the grammar for operator calls.
...
Introduce the notion of postfix expression in the grammar, which will also go
well with some expected upcoming extensions to Leo.
This does not change the Leo language. It does not necessarily involve modifying
the parser. It merely reorganizes some rules slightly.
2022-06-18 15:45:33 -07:00
collin
52395bba45
fix circuit type checking
2022-06-17 18:32:49 -07:00
collin
5a0186b93d
cargo fmt
2022-06-17 15:42:09 -07:00
collin
26810a15ae
impl bhp, pedersen, poseidon instructions
2022-06-17 15:37:48 -07:00
collin
d527a88a3a
impl core circuit instructions
2022-06-17 11:17:46 -07:00
dependabot[bot]
787937c36e
Bump indexmap from 1.8.2 to 1.9.0
...
Bumps [indexmap](https://github.com/bluss/indexmap ) from 1.8.2 to 1.9.0.
- [Release notes](https://github.com/bluss/indexmap/releases )
- [Changelog](https://github.com/bluss/indexmap/blob/master/RELEASES.md )
- [Commits](https://github.com/bluss/indexmap/compare/1.8.2...1.9.0 )
---
updated-dependencies:
- dependency-name: indexmap
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-06-17 10:24:48 +00:00
0rphon
34a408ea41
sqrt tests
2022-06-16 16:56:00 -07:00
0rphon
b03c890dd2
syntactical operator tests
2022-06-16 16:45:37 -07:00
gluax
c9ab4bd3d7
add bitwise op parsing, fix tests
2022-06-16 15:40:48 -07:00
Alessandro Coglio
5f5124d2d0
[ABNF] Fix overlooked update.
...
Thanks to @gluax for reporting the issue.
2022-06-16 15:18:59 -07:00
Alessandro Coglio
64307d075c
[ABNF] Add new operators.
...
This adds shift (`<<` `>>`) and bitwise logical (`&` `|` `^`) operators.
Their precedence is between the additive and ordering operations, in this order
(higher to lower):
- ... others, to additive
- `<<` and `>>`
- `&`
- `|`
- `^`
- ... others, from ordering
This is consistent with Rust, but not with C and Java, both of which make the
bitwise logical operators lower-precedence than equalities.
The previous ABNF rule names for `conjunctive-expression` and
`disjunctive-expression` have been renamed to be more consistent with the newly
added ones. Also, the rule names "abbreviate" 'conjunctive' and 'disjunctive'
with 'and' and 'or', otherwise the names were a bit too long.
2022-06-16 14:02:22 -07:00
0rphon
94b506cf3f
fixed tests
2022-06-16 13:22:32 -07:00
0rphon
66286ca88e
more tests
2022-06-16 13:07:40 -07:00