Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Cargo.lock

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

5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ members = [
"dev-deps/trees-rs",

# internal
"integration"
"integration",

# examples
"examples/solver"
]
# in global rework
exclude = [
Expand Down
9 changes: 9 additions & 0 deletions examples/solver/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[package]
name = "solver"
version = "0.1.0"
edition = "2021"

[dependencies]
doublets = { path = "../../doublets" }
itertools = "0.10"
tap = { version = "1.0.1" }
40 changes: 40 additions & 0 deletions examples/solver/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Solver Example

This example demonstrates the fixed version of the solver code that was previously failing to compile with the errors mentioned in issue #17.

## Fixed Issues

1. **E0412: cannot find type `Link` in scope**
- The `Link` type was properly imported from `doublets` crate
- The import statement was already correct in the main.rs

2. **E0121: placeholder `_` not allowed in function signatures**
- Replaced `unit::Store<usize, _>` with `unit::Store<usize, mem::Global<unit::LinkPart<usize>>>`
- Added proper generic parameter specification for the `Global` type

## Running the Example

To run this example with the specific nightly toolchain mentioned in the issue:

```bash
# Install the required nightly toolchain
rustup toolchain install nightly-2022-08-22

# Build the example
cargo +nightly-2022-08-22 build

# Run the example
cargo +nightly-2022-08-22 run
```

The example will generate sequences of boolean logic operations using NAND gates and demonstrate how to work with the doublets data structure.

## What This Example Does

This solver example:
- Creates a doublets store for managing link relationships
- Generates sequences of different lengths using x and y placeholders
- Creates variants of these sequences using the doublets data structure
- Applies NAND operations to boolean combinations
- Demonstrates deep formatting of link structures
- Outputs the results of boolean logic evaluations
Loading
Loading