-
Notifications
You must be signed in to change notification settings - Fork 86
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
Integrate Solver with ApiWsStructureMutator #1078
base: master
Are you sure you want to change the base?
Conversation
// TODO: This should only be initialized when config.generateSqlDataWithDSE is enabled | ||
// TODO: Also, z3solver.close() should be invoked | ||
// when the application is shutting down to stop the Docker container and clean the tmp folder | ||
@Inject |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arcuri82 How and where should I do that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@agusaldasoro read docs/for_developers.md
, in particular the part about Guice
. So, likely would need to be defined in org.evomaster.core.BaseModule
val fileName = storeToTmpFile(smtLib) // Store SMTLib to a temporary file | ||
val z3Response = executor.solveFromFile(fileName) // Solve using Z3 | ||
override fun solve(schemaDto: DbSchemaDto, sqlQuery: String, numberOfRows: Int): List<SqlAction> { | ||
// TODO: Use memoized, if it's the same schema and query, return the same result and don't do any calculation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@arcuri82 What do you think of this? Running the same query more than once extracts the same SMT solver, and as we are not using any seed the result is the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @agusaldasoro (and @jgaleotti ). if the query is the same, those could be cached, and executed only once. however, how often does that happen? I would assume most of the times the queries are parametric (based on inputs coming from the HTTP request). we could still use a cache, but need to make sure it is bound in size
core/src/main/kotlin/org/evomaster/core/problem/api/service/ApiWsStructureMutator.kt
Outdated
Show resolved
Hide resolved
…iWsStructureMutator.kt
core/src/main/kotlin/org/evomaster/core/problem/api/service/ApiWsStructureMutator.kt
Outdated
Show resolved
Hide resolved
…iWsStructureMutator.kt
Integration between Z3Solver and
config.generateSqlDataWithDSE
.What does this PR include?
e2e-z3solver
testsconfig.generateSqlDataWithDSE
Future work
failedWhere
queries.