-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:kwrx/qasp
- Loading branch information
Showing
19 changed files
with
127 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,11 +10,12 @@ jobs: | |
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: s-weigand/[email protected] | ||
|
||
- name: Install Dependencies | ||
shell: bash | ||
working-directory: ${{github.workspace}} | ||
run: sudo apt update && sudo apt install libboost-dev ninja-build | ||
run: sudo apt update && sudo apt install libboost-dev ninja-build && conda install -c potassco clingo | ||
|
||
- name: Create Build Environment (Debug) | ||
run: cmake -E make_directory ${{github.workspace}}/debug | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,11 +11,12 @@ jobs: | |
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: s-weigand/[email protected] | ||
|
||
- name: Install Dependencies | ||
working-directory: ${{github.workspace}} | ||
shell: bash | ||
run: sudo apt update && sudo apt install dpkg rpm libboost-dev ninja-build | ||
run: sudo apt update && sudo apt install dpkg rpm libboost-dev ninja-build && conda install -c potassco clingo | ||
|
||
- name: Create Build Environment | ||
run: cmake -E make_directory ${{github.workspace}}/build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
if(${HAVE_THREADS}) | ||
find_package(Threads REQUIRED) | ||
endif() | ||
|
||
if(${HAVE_WASP}) | ||
|
||
find_package(Boost REQUIRED) | ||
|
||
if(Boost_FOUND) | ||
add_subdirectory(lib/wasp) | ||
endif() | ||
|
||
endif() | ||
|
||
if(${HAVE_CLASP}) | ||
message(FATAL_ERROR "clasp not yet supported") | ||
endif() | ||
|
||
if(${HAVE_GRINGO}) | ||
find_program(GRINGO gringo REQUIRED) | ||
endif() | ||
|
||
if(${HAVE_IDLV}) | ||
find_program(IDLV idlv REQUIRED) | ||
endif() |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{b,d,g} | ||
{b,d} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
%@exists | ||
a | na. | ||
b | nb. | ||
a | b. % P1 = {a} {b} | ||
%@forall | ||
c | nc. | ||
d | nd. | ||
e | ne. | ||
c | d :- a. % P2 U {a} = {a,c} {a,d} -> {a,c} U C -> INCOHERENT | Non tutti gli AS(P2) U {a} sono coerenti con un AS(P1) | ||
d :- b. % -> {a,d} U C -> COHERENT | | ||
% P2 U {b} = {b,d} -> {b,d} U C -> COHERENT | Un AS(P1) = {b} è coerente con tutti gli AS(P2) U {b} | ||
%@exists | ||
e | f | g :- b, d. % P3 U {b,d} = {b,d,f} {b,d,f} -> {b,d,e} U C -> INCOHERENT | | ||
% -> {b,d,f} U C -> COHERENT | Tutti gli AS(P2) sono coerenti con almeno un AS(P3) U {b,d} | ||
% -> {b,d,g} U C -> COHERENT | Tutti gli AS(P2) sono coerenti con almeno un AS(P3) U {b,d} | ||
%@forall | ||
:- f. % P4 U {b,d,f} = INCOHERENT -> {b,d,f} U C -> INCOHERENT | | ||
% P4 U {b,d,g} = {b,d,g} -> {b,d,g} U C -> COHERENT | Almeno un AS(P3) è coerente con tutti gli AS(P4) U {b,d,g} | ||
%@constraints | ||
{c;d;e}. | ||
:- c, not e. | ||
:- d, not e. | ||
:- not c, not d, e. | ||
:- c, not d. % C | ||
:- e. | ||
|
||
% Result: { b, d, g } is COHERENT. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
INCOHERENT | ||
{b,d,g} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
%@exists | ||
a | na. | ||
b | nb. | ||
%@forall | ||
c | nc. | ||
d | nd. | ||
e | ne. | ||
%@constraints | ||
{c;d;e}. | ||
:- c, not e. | ||
:- d, not e. | ||
:- not c, not d, e. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
INCOHERENT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
% https://en.wikipedia.org/wiki/Boolean_satisfiability_problem | ||
% ∀x ∀y ∃z (x ∨ y ∨ z) ∧ (¬x ∨ ¬y ∨ ¬z) | ||
|
||
%@forall | ||
x | nx. | ||
%@forall | ||
y | ny. | ||
%@exists | ||
z | nz. | ||
%@constraints | ||
{x;y;z;nx;ny;nz}. | ||
:- nx, ny, nz. | ||
:- x, y, z. | ||
|
||
|
||
%% Result: COHERENT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{x,y,nz} | ||
{x,ny,z} | ||
{x,ny,nz} | ||
{nx,y,z} | ||
{nx,y,nz} | ||
{nx,ny,z} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
% https://en.wikipedia.org/wiki/Boolean_satisfiability_problem | ||
% ∀x ∀y ∀z (x ∨ y ∨ z) ∧ (¬x ∨ ¬y ∨ ¬z) | ||
|
||
%@forall | ||
x | nx. | ||
%@forall | ||
y | ny. | ||
%@forall | ||
z | nz. | ||
%@constraints | ||
{x;y;z;nx;ny;nz}. | ||
:- nx, ny, nz. | ||
:- x, y, z. | ||
|
||
|
||
%% Result: INCOHERENT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
INCOHERENT |