Skip to content

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

Merged
Markoutte merged 2 commits into
mainfrom
pelevin/trie
Jul 11, 2022
Merged

Minimize UtExecution number produced by fuzzing and collect coverage statistics#465
Markoutte merged 2 commits into
mainfrom
pelevin/trie

Conversation

@Markoutte

@MarkoutteMarkoutte commented Jul 8, 2022

Copy link
Copy Markdown
Collaborator

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

@sergeypospelovsergeypospelov left a comment

Copy link
Copy Markdown
Member

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
funtestSearchingAfterDeletion() {
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)
}

Comment threadutbot-fuzzers/src/main/kotlin/org/utbot/fuzzer/Trie.kt Outdated
Comment threadutbot-fuzzers/src/main/kotlin/org/utbot/fuzzer/Trie.kt
Comment threadutbot-fuzzers/src/main/kotlin/org/utbot/fuzzer/Trie.kt
Comment threadutbot-fuzzers/src/main/kotlin/org/utbot/fuzzer/Trie.kt Outdated
@Markoutte
Markoutte merged commit c1d1ca7 into mainJul 11, 2022
@Markoutte
Markoutte deleted the pelevin/trie branch July 11, 2022 10:53
Sign up for freeto 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

@Markoutte@sergeypospelov