EricGT
October 22, 2021, 9:18am
2
My first choice would be to use constraints, in particular CLP(FD) .
My second choice would be s(CASP). The reason it is second is that at present (10/22/2021) the code is so new it is not even in the devel release much less the stable release.
See:
Although the ultimate goal is to integrate s(CASP) into SWISH, you can now play around using a small online service at s(CASP) web server . Don’t start relying on this service. I plan to take it offline when integration into SWISH is available and the current service may change at any time. The source is in the sCASP repo under examples/dyncall/http.pl
You can query with prolog
?- genotype(1,[2,1,2]),genotype(2,[1,2,1]).
true.
Not very helpful.
But query with scasp (note the ? op):
?- ? genotype(1,[2,1,2]),genotype(2,[1,2,1]).
#### s(CASP) model
* haplotype holds for [0, 1, 0]
* haplotype holds for [1, 0, 1]
* haplotype holds for [1, 1, 1]
* genotype holds for 1, and [2, 1, 2]
* genotype holds for 2, and [1, 2, 1]
* conflation holds for 1, 1, and 1
* conflation holds for 2, 0, and 1
* conflation_seq holds for [], [], and []
* conflation_s…
HTH