rizin/librz/include/rz_il.h
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

9 lines
176 B
C

#ifndef RZ_IL_H
#define RZ_IL_H
#include <rz_il/rz_il_validate.h>
#include <rz_il/rz_il_vm.h>
#include <rz_il/rz_il_opcodes.h>
#include <rz_il/rz_il_reg.h>
#endif // RZ_IL_H