OTP-004: Auto Encoder
This proposal defines a way to automatically build a serialization layout for a given structure.
Motivation
Designing a serialization layout in TLB is a very risky task. Developers have to take care of the size limitations of cells and remember how many bits are used by each field. This is a very error-prone task and it is very easy to make a mistake. This proposal aims to solve this problem by providing a way to automatically build a serialization layout for a given structure.
Specification
We define auto-encoder as an eager algorithm that builds a serialization layout for a given structure. The algorithm is defined as follows:
Drawbacks
- This is an implicit algorithm. It is not clear results of this allocator have to be checked to make compatible serialization.