Skip to content

Commit 899dc7c

Browse files
eda-ai: add package files
Building an EDA-AI package requires a few more scripts to make the solver work. This commit adds these files. Signed-off-by: Norbert Manthey <[email protected]>
1 parent 1747979 commit 899dc7c

File tree

3 files changed

+69
-0
lines changed

3 files changed

+69
-0
lines changed

tools/eda-ai/README

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
MergeSat (EDA-AI version), Norbert Manthey, Johannes Fichte, 2021
2+
3+
This package contains tools to solve CNF formulas with MergeSat.
4+
5+
## Quick Start
6+
7+
The following steps allow to solve a CNF INPUT_FILE:
8+
9+
```
10+
./build.sh # run once
11+
./binary/run_config*.sh "$INPUT_FILE" # run selected configuration on CNF
12+
```
13+
14+
## MergeSat in the EDA AI package
15+
16+
This package contains several configurations of the MergeSat solver. Each
17+
configuration package wlil select a single one. Hence, the instructions in this
18+
README file are generic, especially the step to solve the CNF.

tools/eda-ai/build.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
#
3+
4+
SELECTED_CONFIGURATION=1 # could be 1, 2 or 3
5+
6+
# locate the script to be able to call related scripts
7+
SCRIPT=$(readlink -e "$0")
8+
SCRIPTDIR=$(dirname "$SCRIPT")
9+
10+
# fail on error
11+
set -e
12+
13+
mkdir -p "$SCRIPTDIR"/binary
14+
OUTPUT_DIR=$(readlink -e "$SCRIPTDIR"/binary)
15+
16+
rsync -avz "$SCRIPTDIR"/code/mergesat/ "$OUTPUT_DIR"/mergesat-src/
17+
18+
pushd "$SCRIPTDIR"/binary/mergesat-src
19+
make r BUILD_TYPE=simp VERB= -j $(nproc)
20+
cp build/release/bin/mergesat "$OUTPUT_DIR"/
21+
cd "$OUTPUT_DIR"
22+
rm -rf mergesat-src
23+
popd
24+
25+
cp "$SCRIPTDIR"/code/mergesat/tools/eda-ai/run_config"$SELECTED_CONFIGURATION".sh "$OUTPUT_DIR"/
26+
27+
ls binary

tools/eda-ai/license.txt

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
MergeSat -- Copyright (c) 2021, Norbert Manthey
2+
3+
This file lists the license for the MergeSat package for EDA AI
4+
5+
### MergeSat License ###
6+
7+
Permission is hereby granted, free of charge, to any person obtaining a
8+
copy of this software and associated documentation files (the
9+
"Software"), to deal in the Software without restriction, including
10+
without limitation the rights to use, copy, modify, merge, publish,
11+
distribute, sublicense, and/or sell copies of the Software, and to
12+
permit persons to whom the Software is furnished to do so, subject to
13+
the following conditions:
14+
15+
The above copyright notice and this permission notice shall be included
16+
in all copies or substantial portions of the Software.
17+
18+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
22+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
23+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
24+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0 commit comments

Comments
 (0)