-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overlap trace test cases in result of Combinatorial Test #685
Comments
Is it the same with VDMJ? I'm on holiday at the moment, but will look at
this when I get back.
|
It is the same with VDMJ as followings:
|
OK, now back from holiday. I think I can see what's happening. It's because you have "let a, b in set ...". For the duplicated tests, both a and b are set to the same value, but they are regarded as different "selections" from the set of possible permutations. You'll see that the second instances of the test are then filtered out (rather than being executed) since it knows that the first one failed. I'll look into the expansion a bit more closely to clarify why it thinks they are different, but I'm pretty sure this is the root of the problem. It will probably be like saying that a=1, b=1 is different to b=1, a=1 - the result is the same, but the means of getting the result is different. |
Hmmm... or it may just be the alternation that you have removing user1 or user2. When the two users are the same, the alternation expands to the same result, but the two paths to get there are "the same". I'll investigate a bit more... |
OK, that does seem to be the "issue". When you have an alternation over N possibilities, when one or more of the possibilities is the same, you get duplicate tests. Ultimately, it is because the expansion engine does not generate a "set of tests" (which has no duplicates); it generates one test at a time by driving an iterator, which is more space efficient. So... is this an error or a feature? :-) |
I think this is not a feature. Because VDMTools generate correct combinatorial test cases.
It's not
|
I agree with your point about sets - and this isn't the underlying problem here, that was just a guess when I first looked at your example. The actual problem is because of the alternation, when both sides of the alternation generate the same step. If you remove the alternation, Overture handles the sets correctly. So I think the minimal example is:
That generates (in VDMJ):
You're saying that VDMTools would only have one test here? An interesting point is that, although the two tests are "the same", they are generated by different paths through the trace and "use" different variables. So they would be regarded as different "shapes" in terms of shaped reduction. |
I think your minimal example is not fit for my purpose. I want to generate 4 tests in following.
That generates 4 tests that I wanted in Overture Tool and VDMTools:
|
Are you sure? When I try that test with Overture 2.6.2 and VDMJ, they produce 8 tests. |
Oh! Sorry, I have a version with an alternation instead of just two calls:
|
Your minimum example generates 4 tests in VDMTools and Overture Tool. We have gone back. |
I can see why removing duplicates is useful. But the problem is that in general that is quite an expensive thing to do - to know that a test has been generated already, you need to keep the previously generated tests. Overture and VDMJ don't generate all of the tests to start with and then execute them, they generate each test iteratively and keep minimal information about failed results (for stem filtering). That means millions of tests can be generated without taking up too much space. Do you know how VDMTools does its duplicate removal? |
I don't know how VDMTools does its duplicate removal?
I'll ask Dr. Kei Sato. |
From some simple experiments with VDMTools, it looks like the set of tests generated is treated as a "set" - no duplicates - regardless of how or where the test was generated in the trace. VDMJ treats different parts of the trace as (potentially) different "shapes" even if they result in the same test output. So for example, if the trace below is reduced using the "shapes varnames" method, the second "copy" of the output is included as it is a different "shape" (regarding the variable names used to generate it). So even reducing to 10% includes one test of each distinct shape:
|
Yes, Nick. https://github.com/vdmtools/vdmtools/blob/master/spec/traces-spec/expanded.vdm |
Description
There are some overlap trace test cases in Combinatorial Test (CT)
Steps to Reproduce
Unzip the attached zip file
There are 2 VDM++ files (Library.vdmpp, UseLibrary.vdmpp) in the zip file.
Library4HoseiE_Smallest.zip
Mke a VDM++ project using unzipped VDM files
Run CT
Expected behavior:
24 (non0overlapping) test cases should be generated.
Actual behavior:
32 test cases generated.
Following test cases are overlapped.
Test 000001 is same as Test 000002.
Test 000003 is same as Test 000004
Test 000005 is same as Test 000006
Test 000007 is same as Test 000008
Test 000025 is same as Test 000026
Test 000027 is same as Test 000028
Test 000029 is same as Test 000030
Test 000031 is same as Test 000032
Reproduces how often: 100%
Versions
Overture Tool Version: 2.6.2 Build date: 2018 May 18 11:17 CEST
macOS High Sierra version 10.13.6
Additional Information
VDMTools generate 24 trace test cases, and there is no overlapped case.
The text was updated successfully, but these errors were encountered: