Question about Invariant Diff.

35 views
Skip to first unread message

Kevin Erdiza Yogatama

unread,
Jan 17, 2020, 1:05:32 AM1/17/20
to Daikon discuss

Hello,
I have a question regarding Invariant Diff.

Currently, I am implementing a bug localization technique named Savant which uses Daikon to infer invariants from different test executions. However I am confused to how to transform the data from daikon's output to the data that Savant can process. in a simple way, Savant uses Daikon to infer invariants from a number of sets of test execution, and then to do an Invariant Diff between the sets. the resulting diff are formated in way that it would show for each methods in program, what changes of invariants occur.

taking the example from Savant's paper, the format would look this way
   
    example of invariant change: [OneOfString, SingleString, idiff(Fc, Pc)]
    which mean that OneOfString invariant inferred in execution Fc change to SingleString Invariant in execution Pc
    and for every method executed, the value of that particular invariant change would be the frequency of that invariant change.

    so the complete resulting data would be a matrix of all executed methods against 96721 possible invariant change(311 invariants x 311 invariants) for each pair of execution sets.

    (the paper can be read here: https://squareslab.github.io/materials/LeLikelyInvariants2016.pdf)

What I am confused about is to extract those values from the daikon's output. I have produced these outputs below but I am stuck at how to process these outputs

    [Files attached, with what command used to output the file, simplified]
    2 .inv.gz files (daikon output of two execution A and B)

        java -cp [..] daikon.Chicory --ppt-select-pattern=[..] --dtrace-file=[dtrace_file] myclass.TestRunner executionA [..]

        java -cp [..] daikon.Daikon [dtrace_file] -o A.inv.gz --no_text_output

     2 printinv.txt file which is the output of `daikon.PrintInvariant` with `--wrap-xml` flag
      
        java -cp [..] daikon.PrintInvariants A.inv.gz --wrap_xml > [printinv.txt]

    1 diff_AB.txt which is the result of `daikon.DIff` between two .inv.gz file

        java -cp [..] daikon.diff.Diff A.inv.gz B.inv.gz > diff_AB.txt

extra information
    daikon version: 5.2.8
    Java version 7

Any advice?
Thanks in advance.

A.inv.gz
A-printinv.txt
B.inv.gz
B-printinv.txt
diff_AB.txt

Michael Ernst

unread,
Jan 17, 2020, 10:34:44 AM1/17/20
to daikon-discuss
I think you are asking how to write a program or script to process text files and produce a desired output.  Is that correct?

Since the Savant authors wrote exactly such a program or script, can you re-use their work?

Mike

--
You received this message because you are subscribed to the Google Groups "Daikon discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to daikon-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/daikon-discuss/cb37072a-d691-43b5-b46a-ede15ecfc8a9%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages