Skip to content

Commit

Permalink
Crate metadata, READMEs and LICENSE files
Browse files Browse the repository at this point in the history
  • Loading branch information
jix committed Mar 12, 2021
1 parent a1c6e16 commit 53a673a
Show file tree
Hide file tree
Showing 8 changed files with 189 additions and 4 deletions.
20 changes: 20 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Copyrights in this software are retained by their respective authors. See the
version control history for full authorship information.

Except as otherwise noted (below and/or in individual files), this software is
licensed under the following terms ("Zero-Clause BSD"):

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in this software by you shall be under the terms and conditions
of the above license, without any additional terms or conditions.
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Flussab

[![github][github-badge]][github]
[![crates.io][crate-badge]][crate]
[![docs.rs][docs-badge]][docs]

The Flussab repository contains the file format parsing related crates listed below. See their individual readme's for more information:

* [`flussab`](flussab) generic parsing utilities.
* [`flussab-cnf`](flussab-cnf) for the DIMACS CNF file format and variants.

## License

This software is available under the Zero-Clause BSD license, see
[LICENSE](LICENSE) for full licensing information.

### Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in this software by you shall be licensed as defined in
[LICENSE](LICENSE).

[github]:https://github.com/jix/flussab
[crate]:https://crates.io/crates/flussab
[docs]:https://docs.rs/flussab/*/flussab

[github-badge]: https://img.shields.io/badge/github-jix/flussab-blueviolet?style=flat-square
[crate-badge]: https://img.shields.io/crates/v/flussab?style=flat-square
[docs-badge]: https://img.shields.io/badge/docs.rs-flussab-informational?style=flat-square
8 changes: 6 additions & 2 deletions flussab-cnf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ name = "flussab-cnf"
version = "0.1.0"
authors = ["Jannis Harder <me@jix.one>"]
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
description = "DIMACS CNF file format parser and writer"
repository = "https://github.com/jix/flussab"
license = "0BSD"
readme = "README.md"
keywords = ["cnf", "dimacs-cnf", "parser", "writer"]
categories = ["parser-implementations", "encoding"]

[dependencies]
itoa = "0.4.7"
Expand Down
20 changes: 20 additions & 0 deletions flussab-cnf/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Copyrights in this software are retained by their respective authors. See the
version control history for full authorship information.

Except as otherwise noted (below and/or in individual files), this software is
licensed under the following terms ("Zero-Clause BSD"):

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in this software by you shall be under the terms and conditions
of the above license, without any additional terms or conditions.
46 changes: 46 additions & 0 deletions flussab-cnf/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Flussab CNF

[![github][github-badge]][github]
[![crates.io][crate-badge]][crate]
[![docs.rs][docs-badge]][docs]

Parsing and writing of the [DIMACS CNF file format][dimacs-cnf], implemented
using [`flussab`][flussab]. The goal of this library is to provide a very
efficient streaming parser for the DIMACS CNF file format while being easy to
extend to the numerous variants, extensions and related file formats. Currently
only the base file format is covered, but feel free to file issues regarding
support for related formats.

## Performance

I don't have any extensive benchmarks, but parsing _and_ writing a 2.1 GiB CNF
file (from and to a `tmpfs`) takes 9 seconds on my machine, while `coreutils`'
`wc -w` takes 9.5 seconds to perform a much easier task.

Now it might seem silly to focus an _parsing_ performance for a file format
used in SAT solving, given that the runtime of SAT solvers almost always
dominates any time spent parsing. Nevertheless, often enough I find myself in
the situation of parsing many and/or large CNF files for some processing task
which is much faster than solving itself.

[dimacs-cnf]:http://www.satcompetition.org/2009/format-benchmarks2009.html
[flussab]:https://crates.io/crates/flussab

## License

This software is available under the Zero-Clause BSD license, see
[LICENSE](LICENSE) for full licensing information.

### Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in this software by you shall be licensed as defined in
[LICENSE](LICENSE).

[github]:https://github.com/jix/flussab
[crate]:https://crates.io/crates/flussab-cnf
[docs]:https://docs.rs/flussab-cnf/*/flussab-cnf

[github-badge]: https://img.shields.io/badge/github-jix/flussab-blueviolet?style=flat-square
[crate-badge]: https://img.shields.io/crates/v/flussab-cnf?style=flat-square
[docs-badge]: https://img.shields.io/badge/docs.rs-flussab_cnf-informational?style=flat-square
8 changes: 6 additions & 2 deletions flussab/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ name = "flussab"
version = "0.1.0"
authors = ["Jannis Harder <me@jix.one>"]
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
description = "Utilities for writing parsers"
repository = "https://github.com/jix/flussab"
license = "0BSD"
readme = "README.md"
keywords = ["parser", "streaming", "recursive-descent", "text", "binary"]
categories = ["parsing"]

[dependencies]
num-traits = "0.2.14"
20 changes: 20 additions & 0 deletions flussab/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Copyrights in this software are retained by their respective authors. See the
version control history for full authorship information.

Except as otherwise noted (below and/or in individual files), this software is
licensed under the following terms ("Zero-Clause BSD"):

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in this software by you shall be under the terms and conditions
of the above license, without any additional terms or conditions.
42 changes: 42 additions & 0 deletions flussab/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Flussab

[![github][github-badge]][github]
[![crates.io][crate-badge]][crate]
[![docs.rs][docs-badge]][docs]

The Flussab crate is a collection of utlities for writing parsers.

Currently Flussab aims to provide just enough to write parsers with a certain
combination of constraints for which Flussab's author did not find a suitable
existing solution. It is not intended as a replacement for any such existing
solution targeting a different set of constraints.

The target use-case are efficient, continuously streaming, interactive, error
reporting, non-backtracking, recursive-descent parsers for text-based, binary
and mixed formats. See the [documentation][docs], for details on what
trade-offs this implies.

Parsers (and writers) for the following file formats are currently implemented
using Flussab:

* [`flussab-cnf`](https://crates.io/crates/flussab-cnf) for the DIMACS CNF file
format and variants.

## License

This software is available under the Zero-Clause BSD license, see
[LICENSE](LICENSE) for full licensing information.

### Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in this software by you shall be licensed as defined in
[LICENSE](LICENSE).

[github]:https://github.com/jix/flussab
[crate]:https://crates.io/crates/flussab
[docs]:https://docs.rs/flussab/*/flussab

[github-badge]: https://img.shields.io/badge/github-jix/flussab-blueviolet?style=flat-square
[crate-badge]: https://img.shields.io/crates/v/flussab?style=flat-square
[docs-badge]: https://img.shields.io/badge/docs.rs-flussab-informational?style=flat-square

0 comments on commit 53a673a

Please sign in to comment.