Comments (8)
You can try to use option --no-gamma
as a workaround for now.
from clingo.
A real fix and a closer investigation is still in the making. I do not know the implementation but the name gamma probably comes from the nogoods in Definition 3 of the paper below. It's a bit technical to read. @BenKaufmann or @mgebser might be able to tell you more.
https://www.cs.uni-potsdam.de/wv/publications/DBLP_conf/ijcai/GebserKS13.pdf
from clingo.
I tried to compute all answer sets of the two below programs using Clingo 5.6.2. They have the same set of atoms and the same set of rules. However, in
choice-rule.txt
, I added a choice rule for every atom (e.g.,{aux_1}.
for atomaux_1
). Clingo returned 9 (resp. 10) answer sets forchoice-rule.txt
(resp.no-choice-rule.txt
). It seems strange because I understand that the number of answer sets ofchoice-rule.txt
should be theoretically greater than or equal to that ofno-choice-rule.txt
. Could you please check it? In addition, I expect that both programs return 9 answer sets.
Thanks for the report. This is a bug in clasp. I'll have a look later. The next step will be to reduce your program to something much smaller that still triggers the bug.
from clingo.
You can try the latest wip branch. The issue should be fixed.
from clingo.
Thank you for your quick response. I could not find a way to reduce my program to something much smaller that still triggers the bug. However, I added some new rules to reduce the number of answer sets. The new no-choice-rule program (see the attached file) has two answer sets as follows.
Answer: 1
nv_p38MAPK_b3 pv_DS_B_b1 pv_S_S_B_b1 pv_senescence nv_p16IN_K4a_b2 pv_ATR_b1 pv_ATR_b2 pv_CHE_K1 nv_CDK2CycE_ pv_cycle_arrest nv_proliferation nv_E_2F pv_Mdm2 nv_apoptosis nv_p53_b2 nv_CDK46CycD pv_p21 pv_p53_b1 aux_56 nv_p14ARF pv_RB1 pv_CHE_K2 pv_ATM_b1 pv_p38MAPK_b2 pv_p38MAPK_b1 nv_Cdc25A_b1 nv_Cdc25A_b2 pv_p16IN_K4a_b1 pv_ATM_b2 aux_18 aux_24 aux_26 aux_9 aux_6 pv_S_S_B_b2 aux_3 pv_DS_B_b2
Answer: 2
nv_p38MAPK_b3 pv_DS_B_b1 pv_S_S_B_b1 pv_senescence nv_p16IN_K4a_b2 pv_ATR_b1 nv_ATR_b2 pv_CHE_K1 nv_CDK2CycE_ pv_cycle_arrest nv_proliferation nv_E_2F pv_Mdm2 nv_apoptosis nv_p53_b2 nv_CDK46CycD pv_p21 pv_p53_b1 aux_56 nv_p14ARF pv_RB1 pv_CHE_K2 pv_ATM_b1 pv_p38MAPK_b2 pv_p38MAPK_b1 nv_Cdc25A_b1 nv_Cdc25A_b2 pv_p16IN_K4a_b1 pv_ATM_b2 aux_18 aux_24 aux_26 aux_9 nv_S_S_B_b2 aux_5 aux_3 pv_DS_B_b2
I am sure that Answer 1 is not correct. In my program, an atom always has a complementary atom (e.g., pv_ATM_b1
and nv_ATM_b1
), and every answer set must contain exactly one of them. Consider Line 308 of the new no-choice-rule program:
nv_ATM_b1; nv_ATM_b2; nv_ATR_b1; nv_ATR_b2; nv_p38MAPK_b1; nv_p38MAPK_b2 :- nv_p38MAPK_b3.
In Answer 1, we have pv_ATM_b1 = pv_ATM_b2 = pv_ATR_b1 = pv_ATR_b2 = pv_p38MAPK_b1 = pv_p38MAPK_b2 = true
, leading to nv_ATM_b1 = nv_ATM_b2 = nv_ATR_b1 = nv_ATR_b2 = nv_p38MAPK_b1 = nv_p38MAPK_b2 = false
. This contradicts to Line 308 because nv_p38MAPK_b3 = true
.
Moreover, by adding {pv_ATR_b2}.
and {nv_ATR_b2}.
, it returns only one answer set as follows.
Answer: 1
nv_p38MAPK_b3 pv_DS_B_b1 pv_S_S_B_b1 pv_senescence nv_p16IN_K4a_b2 pv_ATR_b1 nv_ATR_b2 pv_CHE_K1 nv_CDK2CycE_ pv_cycle_arrest nv_proliferation nv_E_2F pv_Mdm2 nv_apoptosis nv_p53_b2 nv_CDK46CycD pv_p21 pv_p53_b1 aux_56 nv_p14ARF pv_RB1 pv_CHE_K2 pv_ATM_b1 pv_p38MAPK_b2 pv_p38MAPK_b1 nv_Cdc25A_b1 nv_Cdc25A_b2 pv_p16IN_K4a_b1 pv_ATM_b2 aux_18 aux_24 aux_26 aux_9 nv_S_S_B_b2 aux_5 aux_3 pv_DS_B_b2
The above answer set is identical to Answer 2 of the previous program.
Hope that the above observation can help you in debugging.
from clingo.
I tried to use option --no-gamma
. Now, Clingo returns the correct number of answer sets. Thank you so much for your enthusiastic support.
In addition, could you please give me the information about this option? Just to be curious because I am learning more about ASP.
from clingo.
A real fix and a closer investigation is still in the making.
I see.
I do not know the implementation but the name gamma probably comes from the nogoods in Definition 3 of the paper below. It's a bit technical to read. @BenKaufmann or @mgebser might be able to tell you more.
Oh. I will look at Definition 3 of this paper. Thank you.
from clingo.
Thank you. I will try this branch.
from clingo.
Related Issues (20)
- add an option to preserve atoms of facts in the symbol table
- TypeError: unsupported operand type(s) for +: 'ASTSequence' and 'ASTSequence' HOT 1
- Problems building clingo for static linking HOT 1
- Performance degradation when an incremental solve times out HOT 2
- Optional HOT 1
- quick arithmetic between two aggregate expression in place HOT 1
- Tychecking control.solve HOT 1
- I am confused with the OR logic. HOT 2
- domRec ignored for heuristic with external atom HOT 3
- Evaluate using Profile-Guided Optimization (PGO) and Post Link Optimization (PLO) for Clingo HOT 1
- Issues Running Python Inside Clingo - MacOs - M2 Chip HOT 4
- disable printing info HOT 1
- Build Failure with Ubuntu 22.04.3 HOT 1
- A propagator-based approach to timeout a solve? HOT 8
- How to to Make Preference Criteria Effective HOT 1
- Clingo/gringo/clasp: incorrect behavior on Android 11+ HOT 9
- Capture the logger HOT 2
- C++ API throws exception from destructor that cannot be caught HOT 3
- Code that has no effect HOT 1
- The Python extension fails to compile: 'math/wide_integer/uintwide_t.h' file not found HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clingo.