You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,19 +15,19 @@ chmod u+x bin/d4
15
15
For now, [D4 compiler](http://www.cril.univ-artois.fr/KC/d4.html) and [Dsharp_PCompile](https://bitbucket.org/haz/dsharp) (modified for our use case, see the "PCompile" procedure) are included as default for compiling CNF to d-DNNF. Any other compiler can be easily used with slight modifications.
16
16
17
17
## Running WAPS
18
-
You can run WAPS by using 'WAPS.py' Python script present in WAPS directory. A simple invocation looks as follows:
18
+
You can run WAPS by using 'waps.py' Python script present in waps directory. A simple invocation looks as follows:
19
19
```bash
20
-
python3 WAPS.py <cnffile>
20
+
python3 waps.py <cnffile>
21
21
```
22
22
The usage instructions and default values to arguments can be found by running
23
23
```bash
24
-
python3 WAPS.py -h
24
+
python3 waps.py -h
25
25
```
26
26
## Weight Format
27
-
WAPS support providing weights in CNF itself apart from being provided separately in a file. A type variable weight is in [0,inf], specified by line starting with 'w',literal, and weight separated by space. Later, WAPS normalizes it such that weight(l)+weight(-l)=1 where l is a literal. By default, every variable weight is set to 0.5, if its value is not given in CNF or the weightfile.
27
+
WAPS supports providing weights in CNF itself apart from being provided separately in a file. Weight of a literal is in [0,inf], specified by line starting with 'w',literal, and weight separated by space. Later, WAPS normalizes it such that weight(l)+weight(-l)=1 where l is a literal. While weights for both positive and negative literals should be specified, if weight of only positive literal is specified, waps assumes it to be normalized and assigns weight of negative literal as 1 - weight(l). By default, every literal's weight is set to 0.5, if its value is not given in CNF or the weightfile.
28
28
29
29
## Specifying sampling set
30
-
WAPS support providing sampling set in CNF itself. It is specified by lines starting with 'c ind' ,var indexes separated by space, and ended by 0. If sampling set is not provided, by default, every variable specified in formula is assumed to be a part of sampling set.
30
+
WAPS supports providing sampling set in CNF itself. It is specified by lines starting with 'c ind' ,var indexes separated by space, and ended by 0. If sampling set is not provided, by default, every variable specified in formula is assumed to be a part of sampling set.
31
31
32
32
## Output Format
33
33
The output samples are stored in samples.txt by default. Each line of the output consists of a serial number of the sample followed by a satisfying assignment projected on sampling set. The satisfying assignment consists of literals seperated by space. Note that turning random assignment (--randAssign) to 0 can lead to partial assignments in each line. In such cases, the unassigned sampling variables can be chosen to be True or False.
@@ -50,13 +50,13 @@ chmod u+x Dsharp_PCompile
50
50
chmod u+x d4
51
51
sudo mv Dsharp_PCompile /usr/local/bin/
52
52
sudo mv d4 /usr/local/bin/
53
-
pip install WAPS
53
+
pip install waps
54
54
```
55
55
Please reload your shell so that binaries are accessible via PATH.
Copy file name to clipboardExpand all lines: setup.py
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -8,17 +8,17 @@
8
8
9
9
10
10
setup(
11
-
name='WAPS',
12
-
packages= ['WAPS'],
13
-
version='v1.0',
11
+
name='waps',
12
+
packages= ['waps'],
13
+
version='v1.0.2',
14
14
license='MIT',
15
15
description='This library can be used to sample satisfying assignments for a CNF/DNF obeying a given literal-weighted weight function and projected upon a given sampling set.',
0 commit comments