Commit Graph

285 Commits

Author SHA1 Message Date
Thomas Arts 42719e7000 Fail on deserializing negative zero 2019-05-29 08:52:24 +02:00
Thomas Arts 0d6322c0aa Fix property 2019-05-29 08:31:04 +02:00
Thomas Arts f7a4c40c50 Only decode correctly encoded negative binaries 2019-05-29 08:21:25 +02:00
Thomas Arts ec0af8046a Safer serialization of opcode arguments 2019-05-28 19:09:42 +02:00
Thomas Arts 73c80e1168 Extend model to find {stack, N} errors as argument 2019-05-28 19:09:25 +02:00
Thomas Arts 45ff418699 More dsitintc fault injection 2019-05-28 18:23:39 +02:00
Thomas Arts 032277ae8b model so far
improved model
2019-05-28 18:13:27 +02:00
Thomas Arts 0bb4ac0fea Rough model to fuzz test aeb_fate_code 2019-05-28 18:13:24 +02:00
Thomas Arts 4a90e3b2b4 Add two more opcodes 2019-05-28 18:12:43 +02:00
Thomas Arts 8b7fefc8a9 Extend tests to encoded opcodes 2019-05-28 18:12:41 +02:00
Thomas Arts 6f59ef7a7c Fuzz test aeb_fate_encoding 2019-05-28 18:11:42 +02:00
Thomas Arts 302c1c211d Erik's fix to LONG strings 2019-05-28 18:11:42 +02:00
Thomas Arts 74791cfe52 typo 2019-05-28 18:11:42 +02:00
Thomas Arts 453f68fa39 Serialize only code blocks that have operators in right order 2019-05-28 18:11:42 +02:00
Thomas Arts aa9d2bf893 Do not allow empty code blocks 2019-05-28 18:11:42 +02:00
Thomas Arts 23b98f7d65 Add unit test to trigger eqc property 2019-05-28 18:11:42 +02:00
Thomas Arts 5d7bd73bcb Serialization of functions only succeeds for 4 byte iudentifiers 2019-05-28 18:11:42 +02:00
Thomas Arts 34b9684b6b Deserialize code without functions 2019-05-28 18:11:42 +02:00
Thomas Arts ccbb0ed6c7 Make code easier to test 2019-05-28 18:11:42 +02:00
Ulf Norell f1298870e5 Merge pull request #47 from aeternity/add-target-register-to-tuple
Add target register to TUPLE
2019-05-28 14:17:16 +02:00
Ulf Norell 9cfd369c5d Update tests 2019-05-28 12:54:10 +02:00
Ulf Norell f115feb16d Print state variables as storeN instead of var-N 2019-05-28 11:53:13 +02:00
Tobias Lindahl 241a96ebaa Change the correct function name to not shadow builting guard (#46) 2019-05-28 11:32:52 +02:00
Ulf Norell 880cf573aa Add a target register to TUPLE instruction 2019-05-28 11:24:38 +02:00
Tobias Lindahl 89f5ebc84b Add missing basic instructions (#45)
* Add missing basic instructions

* MAP_SIZE
* MAP_TO_LIST
* STR_LENGTH

* Change name of erlang function to not shadow builtin guard
2019-05-28 11:15:04 +02:00
Erik Stenman e98298cce4 Add accepted types to operator declarations. Check opcode numbering. (#43)
* Add accepted types to operator declarations. 
* Check opcode numbering.
2019-05-24 13:21:49 +02:00
Erik Stenman 0d1899b32a Pt 165352420 dissallow stack n (#42)
* Get rid of redundant arity field from op defs. Reorder and renumber ops. Fix bb_end for abort and exit.

* FATE does not accept arbitrary stack positions, only the accumulator aka stack 0.
2019-05-23 13:40:49 +02:00
Erik Stenman 3e0e289f2f Get rid of redundant arity field from op defs. Reorder and renumber ops. Fix bb_end for abort and exit. (#41) 2019-05-23 13:37:32 +02:00
Tobias Lindahl 11a8997ac7 Pt 166148534 refactor fate code (#40)
* Change names of generated aeb_fate_code -> aeb_fate_ops

* Break out fate code to separate adt module

* Fix documentation of the SPEND op

* More compact implementation of serialization/deserialization

* Changed argument specification order
2019-05-23 08:15:18 +02:00
Tobias Lindahl 2f4e1888c2 Merge pull request #38 from aeternity/PT-165857097-add-gas-and-value-to-calls
Pt 165857097 add gas and value to calls
2019-05-09 14:18:15 +02:00
Tobias Lindahl a9389e4e69 Add the CALL_VALUE instruction 2019-05-09 10:57:18 +02:00
Tobias Lindahl 2d3cede235 Add value to remote calls and the new ops CALL_GR and CALL_GTR 2019-05-09 10:57:18 +02:00
Hans Svensson 08a09b065b Merge pull request #39 from aeternity/PT-165440601-165713319-sophia_addons
Add CREATOR opcode and address check primops
2019-05-09 09:51:40 +02:00
Hans Svensson 5fd076f043 Add CREATOR opcode and address check primops 2019-05-09 09:35:48 +02:00
Ulf Norell 2555868990 Merge pull request #37 from aeternity/fate-compiler
Fate compiler
2019-05-07 13:04:53 +02:00
Tobias Lindahl 7eafbc22ae Merge pull request #36 from aeternity/PT-165760129-fix-object-parsing
Fix object parsing
2019-05-07 12:40:20 +02:00
Tobias Lindahl 3ed0fcbe05 Add test for parsing immediate objects 2019-05-07 11:28:54 +02:00
Tobias Lindahl b6019eb81b Fix object parsing 2019-05-07 11:16:05 +02:00
Ulf Norell 6eab9a32c9 Bump aeserialization dependency 2019-05-07 10:14:23 +02:00
Ulf Norell 91fc56c322 Change local calls to allow dynamic function name 2019-05-07 09:04:24 +02:00
Ulf Norell 1887486d36 Replace STR_EQ by APPEND
STR_EQ is not needed, the regular EQ instruction can handle strings as well. Having
an instruction for list append is quite handy though (would need two passes to do it
tail recursive in FATE assembly)
2019-05-07 09:04:24 +02:00
Ulf Norell bf6741eac4 Format of li should be {immediate, [integer()]} 2019-05-07 08:38:23 +02:00
Ulf Norell 491489ca7d Change ~w to ~p 2019-05-07 08:38:23 +02:00
Thomas Arts 91c4ab5bea Merge pull request #35 from aeternity/PT-property-based-tests
Pt property based tests
2019-05-06 14:51:04 +02:00
Thomas Arts 163e805f55 Enable running properties as Eunit tests
Update model to address serialization

Update eunit test wrapper

Update tests

Add tests for serialize_type
2019-05-02 13:08:43 +02:00
Thomas Arts d69375e72b Fix types 2019-05-02 13:08:43 +02:00
Tobias Lindahl 2b3603e86f Merge pull request #33 from aeternity/PT-165760129-FATE-blockhash
Correct arity for BLOCKHASH
2019-05-02 12:28:58 +02:00
Tobias Lindahl 31d188ce81 Update test of BLOCKHASH to correct arity 2019-05-02 10:52:07 +02:00
Tobias Lindahl dfca41c98d Correct arity for BLOCKHASH 2019-05-02 10:33:26 +02:00
Hans Svensson 1526ad3bf0 Merge pull request #32 from aeternity/remove_bytes_from_aevm
Revert bytes(N) from ABI encode it in word/tuple
2019-04-23 17:43:41 +02:00