mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-25 08:55:11 +01:00
Update doc/related-work.md.
This commit is contained in:
1 parent
6748370c56
commit
1e10dad59e
1 file changed
+44
-31
+44
-31
@@ -61,11 +61,23 @@ of the Ada programming language, which again is more complicated than Puffs. It
|
|||||||
also allows for pluggable theorem provers such as Z3, similar to
|
also allows for pluggable theorem provers such as Z3, similar to
|
||||||
[Dafny](http://research.microsoft.com/dafny). This can increase programmer
|
[Dafny](http://research.microsoft.com/dafny). This can increase programmer
|
||||||
productivity in that it can take less effort to prove more programs safe, but
|
productivity in that it can take less effort to prove more programs safe, but
|
||||||
it also affects reproducibility: when some programs that are provable in one
|
it also affects reproducibility (when some programs that are provable in one
|
||||||
programmer's configuration are unprovable in another. It's also not obvious up
|
programmer's configuration are unprovable in another) and the size of the
|
||||||
front what effect different theorem provers, and their different heuristics,
|
trusted computing base. It's also not obvious up front what effect different
|
||||||
will have on compile times or proof times. In constrast, Puffs' proof system is
|
theorem provers, and their different heuristics, will have on compile times or
|
||||||
fast (and dumb) instead of smart (and slow).
|
proof times.
|
||||||
|
|
||||||
|
In constrast, Puffs' proof system is fast (and dumb) instead of smart (and
|
||||||
|
slow). For example, [Vale (Verified Assembly Language for
|
||||||
|
Everest)](https://github.com/project-everest/vale) is a promising approach that
|
||||||
|
uses Dafny to verify implementations of cryptographic algorithms. However,
|
||||||
|
["Vale: Verifying High-Performance Cryptographic Assembly
|
||||||
|
Code"](http://www.andrew.cmu.edu/user/bparno/papers/vale.pdf) reports in Table
|
||||||
|
1 that verification times are measured in *minutes*. Puffs aims for
|
||||||
|
*sub-second* compilation times, including proofs of safety.
|
||||||
|
|
||||||
|
Once again, we're not claiming that these other approaches are unworkable, or
|
||||||
|
not useful, just different, with different trade-offs.
|
||||||
|
|
||||||
|
|
||||||
## Why a New Language?
|
## Why a New Language?
|
||||||
@@ -103,12 +115,12 @@ HTTPS"](https://project-everest.github.io/assets/snapl2017.pdf) and ["Verified
|
|||||||
Low-Level Programming Embedded in F\*"](https://arxiv.org/pdf/1703.00053.pdf).
|
Low-Level Programming Embedded in F\*"](https://arxiv.org/pdf/1703.00053.pdf).
|
||||||
|
|
||||||
[Cryptol](https://github.com/GaloisInc/cryptol) is another project that, like
|
[Cryptol](https://github.com/GaloisInc/cryptol) is another project that, like
|
||||||
F\* / KreMLin and its HACL\* sub-project, focuses on cryptographic algorithms,
|
Everest (including F\* / KreMLin and its HACL\* sub-project, and Dafny / Vale),
|
||||||
rather than Puffs' focus on file formats, and also relies on a sophisticated
|
focuses on cryptographic algorithms, rather than Puffs' focus on file formats,
|
||||||
theorem prover like Z3.
|
and also relies on a sophisticated theorem prover like Z3.
|
||||||
|
|
||||||
Once again, we're not claiming that such projects are unworkable, just
|
Once again, we're not claiming that these other approaches are unworkable, or
|
||||||
different, with different trade-offs.
|
not useful, just different, with different trade-offs.
|
||||||
|
|
||||||
|
|
||||||
## Why Not Rust?
|
## Why Not Rust?
|
||||||
@@ -118,30 +130,31 @@ anywhere that has a C99 compliant C compiler. An existing C/C++ project, such
|
|||||||
as the Chromium web browser, can choose to replace e.g. libpng with Puffs PNG,
|
as the Chromium web browser, can choose to replace e.g. libpng with Puffs PNG,
|
||||||
without needing any additional toolchains. Sure, languages like D and Rust have
|
without needing any additional toolchains. Sure, languages like D and Rust have
|
||||||
great binary-level interop with C code, and Mozilla are reporting progress with
|
great binary-level interop with C code, and Mozilla are reporting progress with
|
||||||
parsing media formats in Rust, but it's still a non-zero operational hurdle to
|
parsing media formats in Rust, but it's still an operational hurdle to grow a
|
||||||
grow a project's build process and to assess build times and binary sizes.
|
project's build process and to assess build times and binary sizes.
|
||||||
|
|
||||||
[Nom](https://github.com/Geal/nom) is a
|
[Nom](https://github.com/Geal/nom) is a parser combinator library in Rust,
|
||||||
[promising](http://spw17.langsec.org/papers/chifflier-parsing-in-2017.pdf)
|
described in ["Writing parsers like it is
|
||||||
parser combinator library, in Rust. Puffs differs from nom by itself, in that
|
2017"](http://spw17.langsec.org/papers/chifflier-parsing-in-2017.pdf). Puffs
|
||||||
Puffs is an end to end implementation, not limited to that part of a file
|
differs from nom by itself, in that Puffs is an end to end implementation, not
|
||||||
format that is easily expressible as a formal grammar. In particular, it also
|
limited to that part of a file format that is easily expressible as a formal
|
||||||
handles entropy encodings such as LZW (for GIF), ZLIB (for PNG) and Huffman
|
grammar. In particular, it also handles entropy encodings such as LZW (for
|
||||||
(for JPEG, TODO). Puffs differs from nom combined with other Rust code (e.g. a
|
GIF), ZLIB (for PNG) and Huffman (for JPEG, TODO). Puffs differs from nom
|
||||||
Rust LZW implementation) in that bounds and overflow checks not just ubiquitous
|
combined with other Rust code (e.g. a Rust LZW implementation) in that bounds
|
||||||
but also completely eliminated at compile time.
|
and overflow checks not just ubiquitous but also completely eliminated at
|
||||||
|
compile time.
|
||||||
|
|
||||||
[Kaitai Struct](http://kaitai.io/) is a similar project that also generates
|
[Kaitai Struct](http://kaitai.io/) is in a similar space, generating safe
|
||||||
safe parsers, for multiple target programming languages. Again, Puffs differs
|
parsers for multiple target programming languages from one declarative
|
||||||
in that it is a complete (and performant) end to end implementation, not just
|
specification. Again, Puffs differs in that it is a complete (and performant)
|
||||||
for the structured parts of a file format. For example, the difficulty in
|
end to end implementation, not just for the structured parts of a file format.
|
||||||
decoding the GIF format isn't in the regularly-expressible part of the format,
|
Repeating a point in the previous paragraph, the difficulty in decoding the GIF
|
||||||
it's in the LZW compression. [Kaitai's GIF
|
format isn't in the regularly-expressible part of the format, it's in the LZW
|
||||||
parser](http://formats.kaitai.io/gif/index.html) returns the compressed LZW
|
compression. [Kaitai's GIF parser](http://formats.kaitai.io/gif/index.html)
|
||||||
data as an opaque blob.
|
returns the compressed LZW data as an opaque blob.
|
||||||
|
|
||||||
Once again, we're not claiming that nom or Rust are unworkable, or that Kaitai
|
Once again, we're not claiming that these other approaches are unworkable, or
|
||||||
is not useful, just different.
|
not useful, just different, with different trade-offs.
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
Reference in new issue
Block a user