Skip to content

Commit

Permalink
Merge pull request #52 from timbeurskens/feature/definitions
Browse files Browse the repository at this point in the history
language support for pre-defined references to subtrees
  • Loading branch information
timbeurskens authored Oct 11, 2023
2 parents cf02d2d + 0dbfc99 commit ca14cee
Show file tree
Hide file tree
Showing 7 changed files with 248 additions and 155 deletions.
14 changes: 7 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ authors = ["Tim Beurskens <[email protected]>"]
[package]
name = "rsbdd"
description = "A BDD-based SAT solver"
version = "0.13.0"
version = "0.14.2"
edition.workspace = true
authors.workspace = true

Expand Down
9 changes: 9 additions & 0 deletions examples/cliques.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ only the complement of E is denoted below.
The cliques problem shows an interesting similarity to the graph-coloring problem:
graph coloring can be encoded as a clique in a graph of vertices VxC where V is the set of vertices in the graph to be colored, and C is the set of colors.
a vertex pair in the clique graph is connected by an edge if the original vertices are adjacent, and they do not share the same color.

more intuitive explanation:

- The encoding chosen here is: 'a variable is true if it is in the clique, false if it is not in the clique'.
- Every node is a variable.
- A node can be in the clique if all its edges are in the clique as well.
- Unconnected nodes can not be in the clique simultaneously.
- Every unconnected edge (edge in the residual graph) is a new -(x & y) constraint.

"

-(a & f) &
Expand Down
3 changes: 1 addition & 2 deletions src/bin/rsbdd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ fn main() -> anyhow::Result<()> {
if !args.retain_choices.is_any() {
result = input_parsed
.env
.borrow()
.retain_choice_bottom_up(result, args.retain_choices);
}

Expand All @@ -145,7 +144,7 @@ fn main() -> anyhow::Result<()> {

// reduce the bdd to a single path from root to a single 'true' node
if args.model {
result = input_parsed.env.borrow().model(result);
result = input_parsed.env.model(result);
}

// show ordered variable list
Expand Down
Loading

0 comments on commit ca14cee

Please sign in to comment.