Skip to content
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

Minimize UtExecution number produced by fuzzing and collect coverage statistics #465

Merged
merged 2 commits into from
Jul 11, 2022

Conversation

Markoutte
Copy link
Collaborator

@Markoutte Markoutte commented Jul 8, 2022

Description

The coverage statistic should be collected to improve fuzzing. To store the result of concrete execution a trie is used. For every coverage trace the total number of the same traces available to further analysis. Also, fuzzing now doesn't generate UtExecution with same coverage trace which increases a performance a bit, because fuzzing can generate a zillion combinations.

Type of Change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Automated Testing

org.utbot.framework.plugin.api.TrieTest

Checklist (remove irrelevant options):

  • The change followed the style guidelines of the UTBot project
  • Self-review of the code is passed
  • The change contains enough commentaries, particularly in hard-to-understand areas
  • New documentation is provided or existed one is altered
  • No new warnings
  • All tests pass locally with my changes

@Markoutte Markoutte requested a review from sergeypospelov July 8, 2022 15:27
Copy link
Member

@sergeypospelov sergeypospelov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to add some comments to public API of Trie class, because for me some return values (e.g., from remove and get) are not obvious.

Also, I expect (maybe wrongly), that remove from the Trie removes only one entry of the same string, but the following test fails:

    @Test
    fun testSearchingAfterDeletion() {
        val trie = stringTrieOf("abc", "abc", "abcde")
        assertEquals(3, trie.toList().size)

        val removed1 = trie.remove("abc")
        assertNotNull(removed1)

        val find = trie.get("abc")
        assertNotNull(find)

        val removed2 = trie.remove("abc")
        assertNotNull(removed2)
    }

@Markoutte Markoutte requested a review from sergeypospelov July 11, 2022 09:02
@Markoutte Markoutte merged commit c1d1ca7 into main Jul 11, 2022
@Markoutte Markoutte deleted the pelevin/trie branch July 11, 2022 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants