How to get started using quad testing? #3250
Replies: 2 comments
-
|
Yes indeed, I think you @dcnorris already have a library that can process at least a subset of quads and run them as test cases, could you please briefly outline how we can install and use it? Thank you a lot! |
Beta Was this translation helpful? Give feedback.
-
|
So glad for more interest in this! I use quads extensively in the DEDUCTION project, in what feels to me like a 'literate' and even 'conversational' programming style. I hope also to use them for thoroughgoing regression testing. Presently, Scryer's If you look at the top of ?- check_module_quads(special_functions, _).
% Checking 11 quads ..
% CHECKING.. (?-A=0.6174468790806071,erf(A,A),B is-A,erf(B,B)).
% CHECKING.. (?-try_falsify(odd_t(erf,real(A)))).
% CHECKING.. (?-witness(odd_t(erf,real(A),false))).
% CHECKING.. (?-witness((real(A),erf(A,B),erf(-A,C),abs(B+C)>0))).
% CHECKING.. (?-length(A,B)).
% CHECKING.. (?-real(A),erf(A,B),erfc(A,C),abs(B+C-1)>epsilon).
% CHECKING.. (?-try_falsify(δ_inverses_t(40*epsilon,erf,inverf,interval(-2,2,A)))).
% CHECKING.. (?-try_falsify(δ_inverses_t(40*epsilon,erfc,inverfc,interval(-2,2,A)))).
% CHECKING.. (?-A=10,B is A+1,gamma(B,C),int_realfact(A,D)).
% CHECKING.. (?-gamma_P_Q(1.2,2.3,A,B),abs(A+B-1)<epsilon).
% CHECKING.. (?-A=1.5,B=0.7,invgammp(A,B,C),gamma_P_Q(A,C,D,E),abs(B-D)<epsilon).
true.As I mentioned in #3131 (reply in thread), the code in |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a module with some predicates defined in it and I have been manually testing it. I understand I can write tests using the
?-prompt inside the code and Scryer will ignore these lines. How does one cause the lines to be executed as tests? @dcnorris Markus told me to tag you about this.Beta Was this translation helpful? Give feedback.
All reactions