* 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
* 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
* 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>
* Ban calling contracts functions as functions namespaces
* Ban using contracts as namespaces
* Add tests
* Update CHANGELOG
* Separate guards with a semicolon
* Return mapping from variables to registers
* Fix dialyzer issues
* Record real names
* Report saved fresh names as part of fcode env
* Undo whitespace changes
* Fix dialyzer warnings
* Formatting fix
* Use function names as strings
* Manually handle making function names
* Update CHANGELOG
* Make variables registers optional
* Update docs about the new flag
* Remove empty saved_fresh_names map from fcode env
Add functions as fields before inferring
Unbound untyped fields before binding typed ones
Fix failing tests
Make complex_types contract non-compatible with aevm
Reduce code duplication
Undo changes to test.aes
Remove special handling of __constructor__ field
Resolve field constraint by arity of contract function
Update CHANGELOG
Update CHANGELOG.md
Co-authored-by: Radosław Rowicki <35342116+radrow@users.noreply.github.com>
Split bind_field function
Add a comment about rebinding
* Include all functions in the symbols map
* .
* remove improper wording
* Use update_symbols exported from aebytecode
* Extract adding child symbols into a separate fun
* Make child contracts symbols optional
* Document include_child_contract_symbols option
Co-authored-by: Gaith Hallak <gaithhallak@gmail.com>
* Add separate flags for each scode optimization
* Add a list of available optimizations to docs
* Update CONTRIBUTING.md
* Update docs/aeso_compiler.md
Co-authored-by: Radosław Rowicki <35342116+radrow@users.noreply.github.com>
* Prefix rules functions with optimize_ instead of r_
Co-authored-by: Radosław Rowicki <35342116+radrow@users.noreply.github.com>
* Assume that void is a supertype of all types
* Add test for void supertype
* Unify functions with decls from implemented interfaces
* Rename delete_if_implementation
* Match only with function name and without typesig
* Add CONTRIBUTING.md
* Include CONTRIBUTING.md in README.md
* Fix broken links
* Update CONTRIBUTING.md
* Update CONTRIBUTING.md
* Use "If a PR" instead of "If the PR"
* Mention fold and pretty printing
* Add missing precedence of the operator '|>'
* Add a note about tests
* Rename to Sophia
* Add missing using keyword
* Update the entire list of keywords in sophia syntax doc
* Add a section about creating a new aesophia release
* Add main contract, contract interface, and guards to the docs syntax
* Use Sep1 instead of Sep for the GuardedDef
* Add guarded case for switches
* Change '=' to '::=' in GuardedDef
* Add Using
* Add '|>' binary operator to aeso_syntax
* Add assign patter
* Fix typos
* Add polymorphism implmented interface syntax
* Move the missing_definition error to the type checker
* Move the parameterised_event and parameterised_state errors to the type checker
* Remove check_state_and_event_types from ast_to_fcode
* Move missing_init_function to the type checker
* Remove the code error last_declaration_must_be_main_contract
* Expand the tests for missing init function
* Remove found_void error
* Move the higher order entrypoint error to type checker
* Move invalid_aens_resolve_type error to type checker
* Add more tests for AENS.resolve
* Add test for AENS.resolve with using
* Move invalid_oracle_type error to type checker
* Move old code errors tests to compilable_contracts
* Remove the file aeso_code_errors.erl
* Add comment about state type
* Add polymorphism to syntax tree and parser
* Add polymorphism to infer types
* Fix pretty printing
* Add new tests and fix old tests
* Fix the comparison between unit and empty tuple
* Report undefined interface errors before checking implemented interfaces
* Add test for implementing multiple interfaces
* Add test for implementing two interfaces with entrypoints of same names and different types
* Add tests for interfaces implementing interfaces
* Draft: Add variance switching
* Revert "Draft: Add variance switching"
This reverts commit 92dc6ac169cfbff447ed59de04994f564876b3fb.
* Add variance switching
* Fix broken tests
* Fix broken abi tests
* Add tests for variance switching
* Fix tests after rebase
* Variance switching for custom datatypes
* Fix dialyzer warning
* Add testing for custom types variance switching
* Make opposite_variance a separate function
* Make is_subtype/4 a separate function
* Fix warning
* Mark tvars as invariant
* Add type_vars_uvar ets table to ets_tables()
* Don't destroy and recreate type errors table when not needed
* Fixes from the reviews
* Use is_list to check if a var is a list
* Compare named args in fun_t
* Test only for covariance and contravariance
* Remove arrows_in_type and use infer_type_vars_variance instead
* Add tests for option and type aliases
* Fix previous commit
* Rename check_implemented_interfaces_recursive to check_implemented_interfaces1
* Make interfaces declare functions from extended interfaces
* Restore test.aes
* Add test for variance switching in records
* Enable variance switching for record types
* Handle builtin types type variables separately
* Add tests for oracles and oracle queries
* Replace compare_types with non-throwing version of unify
* Add the context to unification error
* Test variance switching for bivariant records
* Give clear names to the records in records variance switching test
* Handle comments about polymorphism_variance_switching.aes
* Rename datatypes in custom types variance switching test for readability
* Change the variance of the oracle_query type vars
* Add test for accessing maps with the wrong type
* Default to invariant when the variance of the type vars is unknown
* Rename test files to have common prefix
* Rename functions in variance switching tests for readability
* Fix variance inference
* Eliminate redundant tests
* Test all cases for bivariant