rizin/test/unit
Florian Märkl 157e40d65b
[RzIL] Add Validator (Type-checker) (#2182)
This adds the IL validator, which performs static type-checking of both
pure and effect ops among other checks. In particular, assuming the
validator is correctly implemented, if it considers an op to be valid
under some context, evaluating the op in the vm will never yield a
runtime error, that is, an error where the vm itself errors, not an
expected error state of the code being executed. In our case, this
includes for example:

* Any kind of type error: Conditions not being bool, bitvector sizes not
  matching, ...
* Variables not being available when they are accessed Using local
* variables with multiple different types in a single effect etc.

Any code that we lift must obey these rules. Thus, any analysis can rely
on it. The plan for this is to use the validator primarily in testing,
development of lifters and for IL code coming from the outside. If our
lifting code is covered well enough by tests using the validator, we can
omit the validation at runtime.

The only ops that do not have well-defined validation yet are blk and
goto since their semantics, in particular regarding label handling are
still a bit vague. This also removes the concat and unk ops since they
are unimplemented and not needed.
2022-01-10 16:54:13 +01:00
..
auxiliary Add asan build for clang (#1910) 2021-11-17 21:02:02 +08:00
cpp Revert test/unit/cpp/meson.build (#2003) 2021-11-21 19:39:34 +08:00
legacy_unit Format according to clang-format-13 2021-11-25 15:44:28 +08:00
.gitignore
meson.build [RzIL] Add Validator (Type-checker) (#2182) 2022-01-10 16:54:13 +01:00
minunit.h
mock_io.inl
rz_arch_buffer.h Add some SPDX headers (#1469) 2021-08-17 18:27:03 +02:00
rz_test_cmd_test Change -, --, = argument and = command meaning (#930) 2021-04-21 16:20:24 +08:00
test_addr_interval.c
test_agraph.c
test_analysis_block.c Format according to clang-format-13 2021-11-25 15:44:28 +08:00
test_analysis_block_invars.inl
test_analysis_cc.c
test_analysis_class_graph.c
test_analysis_function.c Refactor RzTypes to use structs instead of SDB + New Tree-Sitter based C Parser (#1047) 2021-07-20 01:46:45 +08:00
test_analysis_global_var.c Format according to clang-format-13 2021-11-25 15:44:28 +08:00
test_analysis_hints.c Format according to clang-format-13 2021-11-25 15:44:28 +08:00
test_analysis_meta.c Port C (metainformation) commands to the rzshell (#1752) 2021-10-15 16:48:18 +08:00
test_analysis_op.c Disable GPL code and Add RISC-V support via Capstone 5 (#2087) 2021-12-11 13:30:01 +01:00
test_analysis_var.c Refactor RzTypes to use structs instead of SDB + New Tree-Sitter based C Parser (#1047) 2021-07-20 01:46:45 +08:00
test_analysis_xrefs.c
test_annotated_code.c Format according to clang-format-13 2021-11-25 15:44:28 +08:00
test_autocmplt.c Disable GPL code and Add RISC-V support via Capstone 5 (#2087) 2021-12-11 13:30:01 +01:00
test_base64.c
test_big.c Rename RNum to the RzNum (#1539) 2021-08-29 21:06:29 +02:00
test_bin.c Fix some memleaks in unit tests (#1869) 2021-10-22 09:33:20 +08:00
test_bin_lines.c
test_bitmap.c
test_bitvector.c [RzIL] Add loadw/storew and bind memories against RzBuffer (#2105) 2021-12-24 16:53:20 +01:00
test_buf.c Add IO/Map-based RzBuffer Implementation (#2147) 2021-12-29 10:28:55 +01:00
test_cmd.c Fix some memleaks in unit tests (#1869) 2021-10-22 09:33:20 +08:00
test_compare.c Port c commands to newshell (#1854) 2021-11-25 17:55:08 +05:30
test_config.c Fix some memleaks in unit tests (#1869) 2021-10-22 09:33:20 +08:00
test_config.h.in Add some SPDX headers (#1469) 2021-08-17 18:27:03 +02:00
test_cons.c Simplify kill_word functions in dietline and fix META-D bug 2021-04-22 11:47:44 +02:00
test_contrbtree.c
test_core_bin.c Reorganize map skyline segments 2021-08-03 22:44:38 +08:00
test_core_cmd.c Move TSLanguage initialization into new rz_core_cmd_new API 2021-10-08 15:38:16 +02:00
test_core_seek.c
test_core_task.c Use rz_cons_get_buffer_dup 2021-08-27 20:12:57 +02:00
test_debruijn.c
test_debug.c
test_debug_session.c Reduce registers shown in the output of dr and Vpp when analysing an ARM64 executable (#1739) 2021-09-28 23:49:55 +08:00
test_diff.c Fix few clang-cl warnings 2021-09-04 12:06:07 +02:00
test_dwarf.c Format according to clang-format-13 2021-11-25 15:44:28 +08:00
test_dwarf_info.c Add configuration variables elf.load.sections 2021-07-28 16:40:14 +02:00
test_dwarf_integration.c Disable GPL code and Add RISC-V support via Capstone 5 (#2087) 2021-12-11 13:30:01 +01:00
test_ebcdic.c EBCDIC character support (#1643) 2021-11-22 09:48:57 +08:00
test_endian.c
test_event.c Fix few clang-cl warnings 2021-09-04 12:06:07 +02:00
test_file.c
test_flags.c
test_flirt.c [FLIRT] add info extraction 2021-12-23 17:06:55 +01:00
test_glob.c
test_graph.c
test_hash.c Added details on pointer ownership (#1164) 2021-05-24 20:17:21 +02:00
test_hex.c Document rz_hex_str2bin and add unit tests 2021-11-09 12:01:41 +01:00
test_id_storage.c Fix some memleaks in unit tests (#1869) 2021-10-22 09:33:20 +08:00
test_idpool.c
test_idstorage.c
test_il_definitions.c [RzIL] Add Validator (Type-checker) (#2182) 2022-01-10 16:54:13 +01:00
test_il_reg.c [RzIL] Rework Variable Handling (#2174) 2022-01-05 11:16:47 +00:00
test_il_validate.c [RzIL] Add Validator (Type-checker) (#2182) 2022-01-10 16:54:13 +01:00
test_il_vm.c [RzIL] Rework Variable Handling (#2174) 2022-01-05 11:16:47 +00:00
test_inflate_deflate.c [FLIRT] Create signatures from RzAnalysis data (#2036) 2021-12-15 19:08:16 +01:00
test_intervaltree.c
test_io.c Format according to clang-format-13 2021-11-25 15:44:28 +08:00
test_io_ihex.c Fix ihex Write for >2 16bit Pages 2021-05-11 09:53:51 +02:00
test_itv.c Reorganize map skyline segments 2021-08-03 22:44:38 +08:00
test_json.c Fix some memleaks in unit tests (#1869) 2021-10-22 09:33:20 +08:00
test_list.c Format according to clang-format-13 2021-11-25 15:44:28 +08:00
test_ovf.c Fix #1506 - Fix unsigned integer overflow in RzIO cache skyline (#1512) 2021-08-25 16:36:20 +08:00
test_pdb.c Fix #1377 - Handle forward definitions in PDB parser 2022-01-05 18:38:02 +08:00
test_pj.c Rename pj.h to rz_pj.h (#1783) 2021-10-01 21:35:39 +08:00
test_project_migrate.c Remove ESIL Pins (#2096) 2021-12-12 18:27:34 +01:00
test_queue.c
test_rbtree.c
test_reg.c [RzIL] Add RzReg/Variable Binding (#2155) 2022-01-02 17:56:19 +00:00
test_run.c Add RzRun tests 2021-08-23 18:45:22 +08:00
test_rz_test.c Convert ! commands to newshell (#1235) 2021-07-28 10:33:33 +02:00
test_rzpipe.c test: use inplace 'rizin' binary for 'rzpipe' test 2021-06-14 18:32:40 +08:00
test_sdb.h Add some SPDX headers (#1469) 2021-08-17 18:27:03 +02:00
test_serialize_analysis.c Remove ESIL Pins (#2096) 2021-12-12 18:27:34 +01:00
test_serialize_config.c
test_serialize_debug.c Add API function for RzBreakpointItem and fix breakpoint serialization tests (#1750) 2021-09-26 10:17:13 +02:00
test_serialize_flag.c
test_serialize_spaces.c
test_serialize_types.c Changes in how paths are handled (#1997) 2021-11-30 13:36:38 +08:00
test_sign.c [FLIRT] Refactoring and create rz_sign library (#1960) 2021-11-11 20:29:59 +01:00
test_skiplist.c
test_skyline.c Fix #1506 - Fix unsigned integer overflow in RzIO cache skyline (#1512) 2021-08-25 16:36:20 +08:00
test_spaces.c
test_sparse.c
test_stack.c
test_str.c Changes in how paths are handled (#1997) 2021-11-30 13:36:38 +08:00
test_str_search.c EBCDIC character support (#1643) 2021-11-22 09:48:57 +08:00
test_strbuf.c Make rz_strbuf_slice() truncate on excessive len (#2115) 2021-12-18 23:16:24 +01:00
test_subprocess.c Convert ! commands to newshell (#1235) 2021-07-28 10:33:33 +02:00
test_table.c Format according to clang-format-13 2021-11-25 15:44:28 +08:00
test_task.c
test_threads.c Add thread pool and physical core number (#1973) 2021-11-14 12:06:19 +01:00
test_tree.c
test_type.c Changes in how paths are handled (#1997) 2021-11-30 13:36:38 +08:00
test_types.h Add some SPDX headers (#1469) 2021-08-17 18:27:03 +02:00
test_uleb128.c
test_unum.c Format according to clang-format-13 2021-11-25 15:44:28 +08:00
test_util.c
test_vector.c Add head and tail for RzVector and RzPVector (#1450) 2021-08-15 22:53:47 +08:00
test_yank.c Port y (yank) commands to the rzshell (#1734) 2021-09-27 13:27:41 +08:00