865 Commits

Author SHA1 Message Date
dbab49936d Renaming and preparing to remove oracles (#985)
All checks were successful
Sophia Tests / tests (push) Successful in 48m54s
A few references to oracles still remain, but they have been removed as a feature, at least.

Reviewed-on: #985
Reviewed-by: Ulf Wiger <ulfwiger@qpq.swiss>
Co-authored-by: Craig Everett <zxq9@zxq9.com>
Co-committed-by: Craig Everett <zxq9@zxq9.com>
2025-03-13 12:53:01 +09:00
Hans Svensson
927cd42592
Add check for number of type variables in type signature (#512)
* Fix tvar string generation

* Add check for number of tvars in a single type signature

The number of tvars is limited by serialization (u8) to 255

* Added a comment in CHANGELOG

* Docs fixes

* Adding docs about the limitation on number of tvars

* Limit is 256, not 255

* Update CHANGELOG.md

Co-authored-by: Gaith Hallak <gaithhallak@gmail.com>

---------

Co-authored-by: Gaith Hallak <gaithhallak@gmail.com>
2024-08-26 13:34:02 +02:00
Denis Davidyuk
16308a7840
Docs: Move poseidon outside of create (#510) 2024-08-12 09:02:56 +02:00
Denis Davidyuk
46a307432f
Docs: Fix return value type in Auction example (#511) 2024-08-12 09:02:29 +02:00
Gaith Hallak
83dcc6dbc4
Upgrade to the latest aebytecode to fix C warnings (#509) 2024-05-24 15:46:21 +03:00
Hans Svensson
ffdd4ecf26
Prepare release v8.0.0 (#506) 2024-04-18 09:15:34 +02:00
Hans Svensson
51bae61736
Add signature literals (#505)
* Add signature literals + handle system alias types

* Add tests for signature literals + encode/decode

* Add to CHANGELOG

* Add in documentation

* Additional documentation
2024-04-10 16:34:29 +02:00
Gaith Hallak
31301911a2
Docs: Mention the unit type in the literals section (#504) 2024-02-16 19:11:08 +03:00
Hans Svensson
de426a210b
Fix parser/pretty printer for OTP-27 (#502)
* In OTP-27 else is made a keyword, so needs quouting

* Fix List.aes - remove unnecessary self-qualification

* Changelog
2024-02-16 09:57:23 +01:00
Hans Svensson
944ed49f0b
Allow self-qualification (#503)
* Properly allow self-qualification

* Changelog

* Simplify logic as suggested by Ulf
2024-02-16 09:56:26 +01:00
Radosław Rowicki
1387e814f8
Fix printing FCode with lifted lambdas (#501) 2024-02-04 09:24:41 +01:00
Hans Svensson
44d6982d66 Prepare release v8.0.0-rc1 2024-01-31 09:11:30 +01:00
Hans Svensson
aa532046d3 [Ceres]: Improve documentation of new features 2024-01-31 09:11:30 +01:00
Hans Svensson
fbaab570f2 [Ceres]: Handle Bytes.to_any_size in calldata (#495)
* [Ceres] Handle Bytes.to_any_size in calldata

* Edit CHANGELOG
2024-01-31 09:11:30 +01:00
Hans Svensson
1a80f3faa0 [Ceres]: Update delegation signature documentation (#494)
* [Ceres]: Update delegation signature documentation

* Fix TYPOs
2024-01-31 09:11:30 +01:00
Hans Svensson
745eeda858 [Ceres]: Raw pointers as bytes (#493)
* DataPt should contain bytes() now that we have it

* Fix missing negation in docs
2024-01-31 09:11:30 +01:00
Hans Svensson
78b758c337 [Ceres]: Allow arbitrary sized message in Crypto.verify_sig (#481)
* Allow arbitrary sized msg in signature verification

* Move Address.to_bytes documentation to correct place
2024-01-31 09:11:30 +01:00
Hans Svensson
108cb1f948 [Ceres]: Add Chain.network_id (#468)
* Add Chain.network_id

* Bump aebytecode version
2024-01-31 09:11:30 +01:00
Hans Svensson
2c8dcf8032 [Ceres]: Add arbitrary size byte arrays (#456)
* Extend compiler to allow bytes()/bytes as type

* Add split_any, to_fixed_size, size, to_any_size, Int.to_bytes and String.to_bytes

* Add tests

* Use and and not andalso in unify, some things have side-effects

* Bump to aebytecode v3.3.0

* Changelog + update documentation

* fix wording in documentation
2024-01-31 09:11:30 +01:00
Hans Svensson
c51d0a5e21 [Ceres]: Document generic all names delegation signatures (#440) 2024-01-31 09:11:30 +01:00
Hans Svensson
e44174b71c [Ceres]: document changes to Auth.tx_hash (#439) 2024-01-31 09:11:30 +01:00
Hans Svensson
dcea538e11 [Ceres]: Introduce AENSv2 to add raw data pointers (#426)
Remove unused variable in AENSCompat
2024-01-31 09:11:30 +01:00
Hans Svensson
f60f9122ba [Ceres]: Add bitwise ops, Address.to_bytes and Crypto.poseidon 2024-01-31 09:11:30 +01:00
Hans Svensson
5c3b42aff1
Fix Typo and whitespace in sophia_features.md (#500) 2024-01-25 09:57:08 +01:00
Hans Svensson
dbeb792ca5
Prepare release v4.7.1 (#497) 2024-01-23 16:14:03 +01:00
Hans Svensson
f75455bb85
Bump pygments version (#496) 2024-01-23 15:55:12 +01:00
Gaith Hallak
cdbd430f23
Disable unused type warnings for type used inside of records (#492)
* Do not show warning for types used in records

* Exclude .vscode in .gitignore

* Update CHANGELOG.md
2023-11-27 12:12:24 +03:00
Hans Svensson
03d6dd6ca2
Improve resolution of relative includes (#489)
* Add aeso_utils:canonical_dir/1

* Add current file directory when resolving includes

* Add CHANGELOG

* Add documentation

* Add a test case

* Properly keep track of src_dir
2023-09-14 15:00:30 +02:00
Hans Svensson
33229c3513
Prepare release v7.4.0 (#487) v7.4.0 2023-09-05 10:04:46 +02:00
Radosław Rowicki
002e55d529
Name lambdas by their locations (#486)
* Name lambdas by their locations

* changelog
2023-09-04 18:50:37 +02:00
Hans Svensson
9b518150c3 Fix typo in CHANGELOG 2023-08-24 13:00:42 +02:00
Hans Svensson
67948513d5
Prepare v7.3.0 (#484) v7.3.0 2023-08-24 10:59:42 +02:00
Hans Svensson
08fa372c24
Improve independence analysis in code optimizer (#483)
* Improve independence analysis

* Changelog updated
2023-08-24 09:43:40 +02:00
Hans Svensson
3b0ca28c8e
Improve constraint solving (#480)
* Clean up constraint solving a bit

* Make unify always return true or false

* Remove unused unify_throws field from Env

* Better structure for constraint solving

* Fix formatting of if_branches error

* More cleanup
2023-08-23 09:43:49 +02:00
Gaith Hallak
86d7b36ba7
Unify typesigs when implementing interface funs (#469) 2023-07-17 13:32:11 +03:00
Gaith Hallak
43c8328615
Prepare v7.2.1 release (#466) v7.2.1 2023-06-29 15:46:23 +04:00
Gaith Hallak
c15d411660
Fix bugs caused by the addition of debugging symbols (#464)
* Fix get_catchalls bug

* Fix for event datatype
2023-06-28 18:43:41 +04:00
Gaith Hallak
b902226c26
Prepare v7.2.0 release (#462) v7.2.0 2023-06-19 13:21:44 +03:00
Hans Svensson
c1e8195fd8
Document Chain.spend and sort Chain functions (#460)
* Document Chain.spend and sort Chain functions

* Too little coffee, re-adding gas-limit
2023-06-19 11:49:03 +02:00
Hans Svensson
d5ff9d4a2f
fix AENS.update stdlib doc (#459) 2023-06-15 22:45:39 +02:00
Gaith Hallak
c395849684
Introduce debugging symbols (#424)
* Add fann type and to_fann fun

* Add fann() to funcall

* Add fann() to closure

* Add fann() to set_state

* Add fann() to remote_u

* Add fann() to remote

* Add fann() to proj

* Add fann() to set_proj

* Add fann() to def and def_u

* Add fann() to op

* Add fann() to let

* Add fann() to lam

* Add fann() to builtin_u

* Add missing functions specs

* Dead code removal

* Fix the spec for compute_state_layout

* Add fann() to var

* Add fann() to switch

* Add fann() to lit and get_state

* Add fann() to builtin

* Add fann() to con

* Add fann() to tuple

* Add fann() to nil

* Fix missing fann() in tuple fexpr()

* Add dbgloc instruction to fate

* Add instructions lines to the debugging result

* Fix compiler tests

* Fix calldata tests

* Rname Ann to FAnn when the type is fann()

* Add line to fann()

* Change attributes for DBGLOC instruction

* Add file to fann()

* Add file to aeso_syntax:ann()

* Fix dialyzer warning

* Remove fann() from fsplit_pat() and fpat()

* Fill out empty fann() when possible

* Save debug locations for child contracts

* Include DBGLOC instructions in the compiler output

* Return an empty string instead of no_file atom

* Wrap args of DBGLOC in immediate tuple

* Upgrade aebytecode ref in rebar.config

* Add DBG_DEF and DBG_UNDEF

* Do not DBG_DEF vars with % prefix

* Do not use DBG_DEF and DBG_UNDEF on args

* Fix dbg_undef for args

* Rename DBGLOC to DBG_LOC

* Remove column from DBG_LOC

* Add missing dbg_loc in to_scode1

* Keep a single DBG_LOC instruction per line

* Remove col from fann

* Add DBG_LOC op to step at function sig

* Remove the variable-register map from debug output

* Use get_value/3 to handle default

* Use lookup instead of lookup_all

* List only needed attributes

* Make debug ops impure

* Split complicated code and add comment

* Fix annotations

* Fix indenting

* Remove dbg_loc before closure

* Add dbg_loc in to_scode

* Add DBG_CALL and DBG_RETURN

* Separate the split at CALL_T and loop

* Revert "Separate the split at CALL_T and loop"

This reverts commit 4ea823a7ca798c756b20cee32f928f41092c4959.

* Revert "Add DBG_CALL and DBG_RETURN"

This reverts commit c406c6feb09b6a5bb859c38d634f08208c901e5a.

* Disable tail call optimization for better debug call stack

* Rename env.debug to env.debug_info

* Upgrade aebytecode: Add DBG_CONTRACT

* Add DBG_CONTRACT instruction

* Check if a var name is fresh in separate function

* Add DBG_CONTRACT and DBG_LOC before DBG_DEF

* Save fresh names of pattern variables

* Implement fsplit_pat_vars for assign

* Set fann for switches

* Revert "Save fresh names of pattern variables"

This reverts commit d2473f982996336131477df2b2115c04a55a62cb.

* Add DBG_DEF for switch pattern vars

* Fix the inability to pattern match constructors

* Upgrade aebytecode dep

* Upgrade aebytecode dep

* Update the lock file

* Add annotations to fexpr var

* Fix issues with pretty-printing of fexprs

* Use FAnn instead of get_fann(Body)

* Upgrade aebytecode version

* Fix pp_fpat

* Fix pattern matching on fpat

* Update rename when a new rename comes up

* Upgrade aebytecode

* Remove the getopt dep

* Fix calldata tests

* Remove file committed by mistake

* Remove location anns from contract call type
2023-06-13 14:36:48 +03:00
Hans Svensson
7bac15949c
Introduce encode/decode_value to compiler (#457) 2023-06-01 13:23:21 +02:00
Gaith Hallak
7b6eba5319
Introduce contract-level compile-time constants (#432)
* Allow compile-time constants as toplevel declarations

* Remove the test that fails on toplevel consts

* Warn when shadowing a constant

* Allow records to be used as compile time constants

* Allow data constructors in compile-time constants

* Disable some warnings for toplevel constants

Since variables and functions cannot be used in the definition of
a compile time constants, the following warnings are not going to be
reported:

* Used/Unused variable
* Used/Unused function

* Do not reverse constants declarations

* Add tests for all valid expressions

* Add test for accessing const from namespace

* Revert "Do not reverse constants declarations"

This reverts commit c4647fadacd134866e4be9c2ab4b0d54870a35fd.

* Add test for assigining constant to a constant

* Show empty map or record error when assigning to const

* Report all invalid constant expressions before fail

* Allow accessing records fields in toplevel consts

* Undo a mistake

* Add test for warning on const shadowing

* Show error message when using pattern matching for consts

* Remove unused error

* Ban toplevel constants in contract interfaces

* Varibles rename

* Change the error message for invalid_const_id

* Make constants public in namespaces and private in contracts

* Add a warning about unused constants in contracts

* Use ban_when_const for function applications

* Test for qualified access of constants in functions

* Add failing tests

* Add test for the unused const warning

* Update CHANGELOG

* Update all_syntax test file

* Treat expr and type inside bound as bound

* Allow typed ids to be used for constants

* List valid exprs in the error message for invalid exprs

* Fix tests

* Update the docs about constants

* Update syntax docs

* Check validity of const exprs in a separate functions

* Call both resolve_const and resolve_fun from resolve_var
2023-04-12 14:20:41 +03:00
Gaith Hallak
99bb3fe1fb
Mark only included files as potentially unused (#442)
* Mark only included files as potentially unused

* Update CHANGELOG

* Add test
2023-03-21 13:55:18 +03:00
Hans Svensson
311bf49505
Prepare v7.1.0 release (#438) v7.1.0 2023-02-24 09:40:06 +01:00
Denis Davidyuk
0e3bcba07d
Fix markup in sophia_features.md (#437) 2023-02-15 13:27:29 +03:00
Marco Walz
699d1f7ab8
fix: use latest pygments version to generate docs (#435) 2023-02-02 08:32:54 +01:00
Marco Walz
1a40a93157
chore(deps): mkdocs version update (#434) 2023-02-02 10:16:27 +03:00
Gaith Hallak
c078119bc4
Add hole expression (#433)
* Add hole expressions

* Fix the issue of unreported holes

* Add tests

* New line in the end of the test file

* Update CHANGELOG

* Add hole expression to the docs

* Do not treat hole as a special type

* Update docs

* Update docs/sophia_features.md

Co-authored-by: Radosław Rowicki <35342116+radrow@users.noreply.github.com>

Co-authored-by: Radosław Rowicki <35342116+radrow@users.noreply.github.com>
2023-01-12 16:23:36 +03:00
Gaith Hallak
31fd8fe24f
Hide warning when calling with non-0 value arg (#431)
* Hide warning when calling with non-0 value arg

* Update the tests

* Update CHANGELOG
2022-12-12 11:44:24 +03:00