NARCISSUS: Deriving Correct-By-Construction Decoders and Encoders from Binary Formats
ثبت نشده
چکیده
Every injective function has an inverse, although constructing the inverse for a particular injective function can be quite tricky. One common instance of inverse-function pairs is the binary encoders and decoders used to convert in-memory data into and out of a structured binary format for network communication. Ensuring that a given decoder is a proper inverse of the original encoder is particularly important, as any error has the potential to introduce security vulnerabilities or to corrupt or lose data in translation. In this paper, we present a synthesis framework, NARCISSUS, that eliminates both the tedium and the potential for error in building the inverse of a binary encoder. The starting point of the process is a binary format, expressed as a functional program in the nondeterminism monad, that precisely captures all the valid binary encodings of an arbitrary datatype instance. From this specification, NARCISSUS synthesizes a decoder that is guaranteed to be the inverse of this relation, drawing on an extensible set of decoding strategies to construct the implementation. Each decoder is furthermore guaranteed to detect malformed encodings by failing on inputs not included in this relation. The derivation is carried out inside the Coq proof assistant and produces a proof trail certifying the correctness of the synthesized decoder. We demonstrate the utility of our framework by deriving and evaluating the performance of decoders for all packet formats used in a standard network stack.
منابع مشابه
Narcissus: Deriving Correct-By-Construction Decoders and Encoders from Binary Formats
Every injective function has an inverse, although constructing the inverse for a particular injective function can be quite tricky. One common instance of inverse-function pairs is the binary encoders and decoders used to convert in-memory data into and out of a structured binary format for network communication. Ensuring that a given decoder is a proper inverse of the original encoder is parti...
متن کاملRobust Distributed Source Coding with Arbitrary Number of Encoders and Practical Code Design Technique
The robustness property can be added to DSC system at the expense of reducing performance, i.e., increasing the sum-rate. The aim of designing robust DSC schemes is to trade off between system robustness and compression efficiency. In this paper, after deriving an inner bound on the rate–distortion region for the quadratic Gaussian MDC based RDSC system with two encoders, the structure of...
متن کاملIntroduction to Channel Coding
1 Fundamental Concepts and Techniques 1 1.1 Channels . . . . . . . . . . . . . . . . . . . . 1 1.2 Encoders . . . . . . . . . . . . . . . . . . . . 1 1.2.1 Code Rates . . . . . . . . . . . . . . . 2 1.3 Decoders . . . . . . . . . . . . . . . . . . . . 2 1.4 Probabilistic Model . . . . . . . . . . . . . . . 2 1.5 The Probability of Error . . . . . . . . . . . . . 2 1.6 New Codes from Old Codes b...
متن کاملMS Word template for letter size paper
Efficient packaging and communication of metadata are critical in multimedia communications to achieve seamless mobility. The XML schema compression proposed here comprises a method for decomposing an XML schema into a sequence of atomic elements. This representation reorganizes the given XML schema with the threefold purpose of facilitating dynamic schema switching and reconfiguration of metad...
متن کاملA Cache-Aware Strategy for H.264 Decoding on Multi-processor Architectures
H.264 is one of the most commonly used formats for the recording, compression and distribution of video. Encoders and decoders for the H.264 standard are widely in demand, and efficient strategies for enhancing their performance have been areas of active research. With the proliferation of many core architectures in the embedded community, there has been a trend towards parallelizing implementa...
متن کامل