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

MaxSMT solver implementation #137

Draft
wants to merge 243 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
243 commits
Select commit Hold shift + click to select a range
0533a20
Proto is in progress
viktoriia-fomina Jun 22, 2023
561afed
Simple cases work
viktoriia-fomina Jun 23, 2023
9d02516
Refactor: getUnsatCoreOfConstraints, context
viktoriia-fomina Jun 23, 2023
d8b4780
Do not keep and remove from formula hard constraints
viktoriia-fomina Jun 23, 2023
c6351cd
Split formula and soft constraints meaning
viktoriia-fomina Jun 23, 2023
72d2f97
Improve wording in variable names
viktoriia-fomina Jun 26, 2023
760d7d4
Update methods' order
viktoriia-fomina Jun 26, 2023
5ba890e
Do not keep and remove from formula hard constraints
viktoriia-fomina Jun 26, 2023
2efbc5b
Add smoke tests
viktoriia-fomina Jun 26, 2023
657e0a3
Merge main branch
viktoriia-fomina Jun 26, 2023
00aa09a
Fix bug with list subtraction im ApplyMaxRes, fix when styles, add mo…
viktoriia-fomina Jun 26, 2023
1ab1638
Support weighted soft constraints, soft constraints with duplicate ex…
viktoriia-fomina Jun 27, 2023
b44203b
Create MaxSATResult class, generalize KMaxSATSolver class
viktoriia-fomina Jun 28, 2023
88bc4af
Improve tests, do unionSoftConstraintsWithSameExpressions when get fo…
viktoriia-fomina Jun 28, 2023
cec69ed
Remove TODO from tests, add docs to methods, update their names
viktoriia-fomina Jun 28, 2023
522c6a9
Simplify expression in checkMaxSAT (removes TODO)
viktoriia-fomina Jun 28, 2023
7be0435
Add more comments
viktoriia-fomina Jun 28, 2023
ffff397
Do hard constraints work with push/pop
viktoriia-fomina Jun 28, 2023
14d8bdd
Support push/pop for soft constraints, use shorter expressions form i…
viktoriia-fomina Jun 29, 2023
6b680c4
Optimize algorithm (remove added that is later removed), fix a bug in…
viktoriia-fomina Jun 30, 2023
3e9afec
Add inequalities test
viktoriia-fomina Jun 30, 2023
3a14625
Rename soft constraint property: constraint -> expression
viktoriia-fomina Jun 30, 2023
e3c07f3
Add timeout support, improve KMaxSATResult
viktoriia-fomina Jul 3, 2023
ae12b77
Expression length growth: quadratic -> linear
viktoriia-fomina Jul 3, 2023
68ba4ed
Return accidently removed
viktoriia-fomina Jul 3, 2023
c3ccb57
Update build.gradle.kts for max-sat module
viktoriia-fomina Jul 3, 2023
b44279f
applyMaxRes: add lost soft constraint, format code
viktoriia-fomina Jul 4, 2023
51739d6
Use with(ctx) in solver for more readable expressions
viktoriia-fomina Jul 4, 2023
908175d
Rewrite KOrNaryExpr through reduce
viktoriia-fomina Jul 4, 2023
6aa4c50
Throw NotImplementedError when unsat and timeout exceeded
viktoriia-fomina Jul 4, 2023
9d68212
Add comments to MaxSATScopeManager, remove redundant classes
viktoriia-fomina Jul 4, 2023
972a521
Comment KMaxSATResult, add default value to pop in MaxSATScopeManager
viktoriia-fomina Jul 4, 2023
da70d6e
Refactor: more Kotlin style in MaxSATSolver
viktoriia-fomina Jul 4, 2023
04d582d
Remove useless file: Main.kt
viktoriia-fomina Jul 5, 2023
c773870
Do weight unsigned, fix reification variables markers (bugfix)
viktoriia-fomina Jul 26, 2023
c709ca9
Merge branch 'UnitTestBot:main' into max-sat
viktoriia-fomina Jul 27, 2023
f19805e
Merge branch 'max-sat' of https://github.com/victoriafomina/ksmt into…
viktoriia-fomina Jul 27, 2023
6b84643
Add timeout
viktoriia-fomina Aug 4, 2023
6feb1e6
Add ksmt-maxsat-tests project
viktoriia-fomina Aug 7, 2023
0e44ae2
Merge branch 'main' into max-sat
viktoriia-fomina Aug 7, 2023
52ab4e1
Ignore maxsat test data
viktoriia-fomina Aug 7, 2023
05fb157
Update timeout value
viktoriia-fomina Aug 7, 2023
472f367
Run benchmark on single runner
viktoriia-fomina Aug 8, 2023
e3f1467
Fix bug with return type in SmtLibBenchmarkUtil
viktoriia-fomina Aug 8, 2023
4642aff
Move MaxRes algorithm to a separate solver
viktoriia-fomina Aug 9, 2023
7ed9360
Use minOf instead of minBy
viktoriia-fomina Aug 10, 2023
a01c1bb
Implement primal dual MaxRes solver
viktoriia-fomina Aug 30, 2023
d4b5c39
Add timeout support for primal dual MaxRes solver
viktoriia-fomina Aug 30, 2023
d4422bd
Add KMaxSatContext
viktoriia-fomina Aug 31, 2023
73af599
Fix tests: pass MaxSAT context to KPrimalDualMaxResSolver constructor
viktoriia-fomina Aug 31, 2023
f584b31
Add hill-climb approach when checking satisfiability
viktoriia-fomina Aug 31, 2023
7eb8b40
Let extract a single core or multiple cores
viktoriia-fomina Aug 31, 2023
59e652a
Fix a bug when getting a single core in KPrimalDualMaxResSolver
viktoriia-fomina Sep 8, 2023
43b6b69
Add unit tests for all configurations
viktoriia-fomina Sep 8, 2023
18fe5a2
Support running MaxSMT benchmark tests
viktoriia-fomina Oct 5, 2023
ce4a5fa
Add similar expressions test
viktoriia-fomina Oct 5, 2023
931bde8
Merge branch 'UnitTestBot:main' into max-sat
viktoriia-fomina Oct 6, 2023
72d21fe
Set up running long MaxSMT tests
viktoriia-fomina Oct 6, 2023
aaa6aa0
Merge branch 'UnitTestBot:main' into max-sat
viktoriia-fomina Oct 19, 2023
8df4622
Rename MaxSATBenchmarkUtil to MaxSMTBenchmarkUtil
viktoriia-fomina Oct 19, 2023
0c722ca
Update test data directory
viktoriia-fomina Oct 20, 2023
8244dd8
Create monitoring.sh
viktoriia-fomina Oct 23, 2023
8ce6098
Add monitoring to long tests launch
viktoriia-fomina Oct 23, 2023
2999243
Add more MaxSMT unit tests
viktoriia-fomina Oct 23, 2023
d39fb0c
Add messages to MaxSMT benchmark tests assertions
viktoriia-fomina Oct 23, 2023
26048aa
Update maxsmt-tests-matrix.json
viktoriia-fomina Oct 23, 2023
234ee20
Update logics for MaxSMT tests
viktoriia-fomina Oct 23, 2023
b11a900
Merge branch 'max-sat' of https://github.com/victoriafomina/ksmt into…
viktoriia-fomina Oct 23, 2023
fa05d47
Upgrade Kotlin version to 1.9.0
viktoriia-fomina Oct 25, 2023
895193d
Rename maxsat subproject to maxsmt
viktoriia-fomina Oct 25, 2023
bdd471f
Merge branch 'UnitTestBot:main' into maxsmt
viktoriia-fomina Oct 25, 2023
4e116fb
Update maxsmt-tests-matrix.json
viktoriia-fomina Oct 26, 2023
51f2006
Update tests list in build.gradle.kts
viktoriia-fomina Oct 26, 2023
cf787e7
Merge branch 'maxsmt' of https://github.com/victoriafomina/ksmt into …
viktoriia-fomina Oct 26, 2023
efb04b8
Rename maxsat project to maxsmt in workflows
viktoriia-fomina Oct 26, 2023
83a03e7
Add QF_AUFLIA to MaxSMT tests
viktoriia-fomina Oct 26, 2023
abd32e2
Fix MaxSMT test assert message
viktoriia-fomina Oct 26, 2023
2215161
Update build.gradle.kts
viktoriia-fomina Oct 30, 2023
16abc14
Update maxsmt-tests-matrix.json
viktoriia-fomina Oct 30, 2023
9a35343
Update run-long-maxsmt-tests.yml
viktoriia-fomina Oct 30, 2023
cbf8f6b
Create KPrimalDualMaxResSMTBenchmarkTest.kt
viktoriia-fomina Oct 30, 2023
819d4c1
Merge branch 'maxsmt' of https://github.com/victoriafomina/ksmt into …
viktoriia-fomina Oct 30, 2023
ad03400
Merge branch 'UnitTestBot:main' into maxsmt
viktoriia-fomina Nov 8, 2023
b8eb117
Fix a bug in core minimization
viktoriia-fomina Nov 9, 2023
e6d2549
Add asserts to similar expressions test
viktoriia-fomina Nov 9, 2023
684b371
Add test when three expressions are inconsistent
viktoriia-fomina Nov 10, 2023
350a5c4
Fix typo in .gitignore
viktoriia-fomina Nov 10, 2023
e2a8f2a
Add possibility to choose solver for MaxSMT benchmark tests
viktoriia-fomina Nov 10, 2023
7643f6a
Update run-long-maxsmt-tests.yml: support choosing solver
viktoriia-fomina Nov 10, 2023
73451b4
Update run-long-maxsmt-tests.yml: update test report name
viktoriia-fomina Nov 10, 2023
03ce90f
Run PDMRes solver benchmark tests in different configurations
viktoriia-fomina Nov 10, 2023
6a33a56
Format KMaxSMTSolverTest.kt
viktoriia-fomina Nov 10, 2023
b12e8f4
Add statistics collection
viktoriia-fomina Nov 16, 2023
ad0c2c3
Add more test data
viktoriia-fomina Nov 17, 2023
b3d52ff
Refactor checking hard constraints in KPMResSolver
viktoriia-fomina Nov 20, 2023
3a57541
Update assertions in MaxSMT tests
viktoriia-fomina Nov 20, 2023
b1530da
Fix KPrimalDualMaxRes solver bugs
viktoriia-fomina Nov 23, 2023
21d104d
Add more logics for MaxSMT tests
viktoriia-fomina Nov 24, 2023
265fe5b
Run solvers only on supported theories for MaxSMT tests
viktoriia-fomina Nov 28, 2023
670fa11
Add QF_UF MaxSMT test data
viktoriia-fomina Nov 29, 2023
0232cac
Generalize solvers configurations in tests using out
viktoriia-fomina Nov 29, 2023
40b00f0
Add QF_AUFBV MaxSMT test data
viktoriia-fomina Nov 29, 2023
a34677d
Generalize solver in MaxSAT tests
viktoriia-fomina Nov 29, 2023
27f106d
Rename solver to Yices in workflow
viktoriia-fomina Nov 29, 2023
78d9073
Update QF_ABVFP MaxSMT benchmark information
viktoriia-fomina Nov 30, 2023
69461f7
Collect and merge MaxSMT test run statistics
viktoriia-fomina Dec 1, 2023
ec71037
Add SMT solver name to statistics
viktoriia-fomina Dec 1, 2023
5d042a4
Add QF_FP MaxSMT test data
viktoriia-fomina Dec 1, 2023
3bab490
Add comments to MaxSMT benchmark workflow
viktoriia-fomina Dec 1, 2023
4dbe40f
Update to always add logic name to statistics
viktoriia-fomina Dec 1, 2023
52123c2
Move SAT soft constraints sum calculation in tests
viktoriia-fomina Dec 1, 2023
c4c0f75
Collect statistics from ignored, failed when parsing file/convert exp…
viktoriia-fomina Dec 1, 2023
1912f64
Merge branch 'UnitTestBot:main' into maxsmt
viktoriia-fomina Dec 1, 2023
1c3081c
Add QF_UFBV MaxSMT test data
viktoriia-fomina Dec 1, 2023
21f58ec
Remove elapsed time from MaxSMTTestStatistics
viktoriia-fomina Dec 1, 2023
9c856db
Run MaxSMT tests on Ubuntu-20.04
viktoriia-fomina Dec 1, 2023
b07a245
Add script analyzing statistics
viktoriia-fomina Dec 1, 2023
da3d854
Add statistics analysis to MaxSMT benchmark workflow
viktoriia-fomina Dec 1, 2023
429eaa1
Move analyze MaxSMT test run statistics step
viktoriia-fomina Dec 1, 2023
0940065
Fix work with JSON in statistics analyzer
viktoriia-fomina Dec 1, 2023
2a694bf
Set up encoding in JSON analyzer
viktoriia-fomina Dec 1, 2023
9744336
Add repository checkout in MaxSMT benchmark workflow
viktoriia-fomina Dec 2, 2023
0ddf3a1
Generate statistics with random string suffix
viktoriia-fomina Dec 3, 2023
1ae2639
Fix a bug with core minimization
viktoriia-fomina Dec 3, 2023
764a8c5
Add lost path to MaxSMT statistics analyzer script
viktoriia-fomina Dec 4, 2023
bb3aa19
Do core minimization optional for KPDMRes
viktoriia-fomina Dec 4, 2023
c5f6ab4
Use `==` instead of internEquals
viktoriia-fomina Dec 6, 2023
e223e75
Divide MaxSMT tests by primal and dual strategies
viktoriia-fomina Dec 6, 2023
d4d660f
Ignore MaxSMT statistics files
viktoriia-fomina Dec 6, 2023
ce4dd73
Divide MaxSMT workflows into PMRes and PrimalDualMaxRes
viktoriia-fomina Dec 6, 2023
655335a
Do not union soft constraints with same expressions
viktoriia-fomina Dec 6, 2023
6b43cac
Fix checking out commit in the MaxSMT workflow
viktoriia-fomina Dec 7, 2023
5f293d3
Add QF_ABV MaxSMT test data
viktoriia-fomina Dec 7, 2023
d911a7b
Fix the bug with duplicated test statistics collection
viktoriia-fomina Dec 7, 2023
9c12bd4
Update MaxSMT tests archives sizes
viktoriia-fomina Dec 7, 2023
4c41c30
Expand analyzed MaxSMT statistics content
viktoriia-fomina Dec 7, 2023
dcddae4
Add QF_AUFLIA MaxSMT test data
viktoriia-fomina Dec 7, 2023
ef39f8c
Add QF_UFLIA MaxSMT test data
viktoriia-fomina Dec 7, 2023
c6bb303
Update MaxSAT workflow in order to run tests on multiple runners
viktoriia-fomina Dec 8, 2023
52f0335
Process cases when exception is thrown during MaxSMT solving
viktoriia-fomina Dec 11, 2023
7f31dd4
Update MaxSMT tests timeout
viktoriia-fomina Dec 12, 2023
1c84b45
Log events in KPrimalDualMaxResSolver
viktoriia-fomina Jan 16, 2024
238f9bd
Upload test logs in MaxSMT workflow
viktoriia-fomina Jan 16, 2024
dd3b16b
Use ValueTimeMark for time measurement
viktoriia-fomina Jan 17, 2024
5c9144d
Log more events
viktoriia-fomina Jan 17, 2024
c33d2bd
Log unsucceeded MaxSMT execution
viktoriia-fomina Jan 18, 2024
211e2af
Update default value for KMaxSMTContext
viktoriia-fomina Jan 18, 2024
6fdb930
Update logs about models
viktoriia-fomina Jan 18, 2024
adc89ad
Fix hill climb option
viktoriia-fomina Jan 19, 2024
354affa
Update getting disjoint unsat cores option
viktoriia-fomina Jan 23, 2024
5d14b5a
Log lower bound updates
viktoriia-fomina Jan 23, 2024
ffea92d
Add NotYetImplementedException
viktoriia-fomina Jan 24, 2024
0f161f4
Refactor KPMResSolver
viktoriia-fomina Jan 25, 2024
fe3b272
Fix a bug with a core to soft constraints transformation
viktoriia-fomina Jan 25, 2024
d2a0f3e
Add GSON version to properties
viktoriia-fomina Jan 25, 2024
49172ec
Merge branch 'UnitTestBot:main' into maxsmt
viktoriia-fomina Mar 23, 2024
e94beaa
Merge branch 'main' into maxsmt
viktoriia-fomina Apr 17, 2024
cc255d9
Merge branch 'main' into maxsmt
viktoriia-fomina Apr 28, 2024
f03b984
Add checkSubOptMaxSMT method to KPrimalDualMaxResSolver
viktoriia-fomina Apr 28, 2024
60ff5c3
Add test run for Portfolio
viktoriia-fomina Apr 30, 2024
ae059fc
Fix comment for MinimalUnsatCore
viktoriia-fomina Apr 30, 2024
4aa0762
Add default params to checkSubOptMaxSMT
viktoriia-fomina Apr 30, 2024
448f1f0
Implement portfolio mode with MaxSMT logic in the backend process
viktoriia-fomina Apr 30, 2024
0801086
Update Portfolio using rd
viktoriia-fomina May 2, 2024
64e17c9
Transfer solverManager creation/closing to before/after All
viktoriia-fomina May 2, 2024
0937081
Add Portfolio solver to KMaxSMTBenchmarkTest
viktoriia-fomina May 2, 2024
2f4236e
Support portfolio for statistics on CI
viktoriia-fomina May 2, 2024
14280b6
Fix path to configurations
viktoriia-fomina May 2, 2024
3610a0b
Pass optimality from PDMRes workflow
viktoriia-fomina May 2, 2024
abcd7d4
Fix syntax error in workflow
viktoriia-fomina May 2, 2024
55a3df0
Fix workflow error
viktoriia-fomina May 2, 2024
b8757e4
Update statistics path
viktoriia-fomina May 2, 2024
0b87c8f
Downgrade upload-action version in order to use wilcard path
viktoriia-fomina May 2, 2024
97c2ace
Upgrade upload-artifact version
viktoriia-fomina May 2, 2024
ab8cb9d
Upgrade Ubuntu version
viktoriia-fomina May 2, 2024
12e8723
Remove redundant lines
viktoriia-fomina May 2, 2024
fef02cd
Update SolverProtocolModel
viktoriia-fomina May 10, 2024
af14e36
Process UNKNOWN cases in KPMResSolver
viktoriia-fomina May 10, 2024
b114218
Add debug step to workflow
viktoriia-fomina May 10, 2024
1697ec0
Upgrade download action version
viktoriia-fomina May 10, 2024
b1d0979
Remove debug step in workflow
viktoriia-fomina May 10, 2024
6be8ce9
Collect statistics about all theories
viktoriia-fomina May 10, 2024
506ba0c
Fix a bug with optimalWeight in KSubOptMaxSMTBenchmarkTest
viktoriia-fomina May 10, 2024
cb5d1b4
Fix a bug with score collection
viktoriia-fomina May 10, 2024
b3053c3
Use solverQuery for checkMaxSMT in KPortfolioSolver
viktoriia-fomina May 11, 2024
c0241a0
Update workers number
viktoriia-fomina May 11, 2024
7bec874
Fix a bug with internalizing assertions for Portfolio
viktoriia-fomina May 12, 2024
53c303c
Update timeout to 10 seconds
viktoriia-fomina May 12, 2024
c8cb725
Update timeout for MaxSAT tests
viktoriia-fomina May 12, 2024
8670b7f
Run KPrimalDualMaxRes solver for corectness check
viktoriia-fomina May 12, 2024
664b0e6
Update MaxSAT tests for multiple solvers
viktoriia-fomina May 12, 2024
22db2e2
Update MaxSAT workflow for multiple solvers
viktoriia-fomina May 12, 2024
99a0bc3
Fix a bug with integer overflow
viktoriia-fomina May 12, 2024
a39e0c0
Fix integer overflow in solver
viktoriia-fomina May 12, 2024
587d9ed
Set up big timeout for MaxSAT tests
viktoriia-fomina May 12, 2024
8400f2a
Set up new time for MaxSAT tests
viktoriia-fomina May 13, 2024
dca5430
Update TestProtocolModel
viktoriia-fomina May 13, 2024
cc93a56
Fix an error with redeclaration SoftConstraint in ProtocolModel
viktoriia-fomina May 13, 2024
ab0931e
Inherit secrets in called workflow
viktoriia-fomina May 13, 2024
a51a92b
Temporary remove UF and UFLIA form run
viktoriia-fomina May 13, 2024
aabef32
Merge KMaxSMTStatistics and KSubOptMaxSMTStatistics
viktoriia-fomina May 14, 2024
a535c7b
Run tests for QF_UF and QF_UFLIA
viktoriia-fomina May 15, 2024
f7ec47e
Create Portfolio solver in tests correctly
viktoriia-fomina May 15, 2024
5972d0d
Support interruption for MaxSMT
viktoriia-fomina May 15, 2024
912e89e
Implement KSolverRunner and KSolverExecutor in order to interact thro…
viktoriia-fomina May 17, 2024
7e196e8
Run Portfolio is async mode
viktoriia-fomina May 17, 2024
e75f2ab
Update KMaxSMTResult with timeoutExceededOrUnknown
viktoriia-fomina May 18, 2024
7473769
Update protocol models etc for timeoutExceededOrUnknown support
viktoriia-fomina May 18, 2024
e353380
Descrease test workers number to 1
viktoriia-fomina May 18, 2024
dcb1b7d
Update models to use two lists instead of List<SoftConstraint>
viktoriia-fomina May 18, 2024
c7f6f41
Fix a bug with initializing KPrimalDualMaxResSolverBase in KSolverWor…
viktoriia-fomina May 19, 2024
9638af4
Add elapsed time to general stat
viktoriia-fomina May 19, 2024
faadc62
Update statistics collection in script
viktoriia-fomina May 19, 2024
9f869c8
Remove redundant else
viktoriia-fomina May 19, 2024
c759217
Update predicate for checkSubOptMaxSMT in KPortfolioSolver
viktoriia-fomina May 20, 2024
31f65a7
Fix Portfolio
viktoriia-fomina May 20, 2024
b729853
Implement native z3 tests
viktoriia-fomina May 20, 2024
5a4bb77
Set an algorithm for Z3 native
viktoriia-fomina May 20, 2024
ff69d4c
Run Z3 native on CI
viktoriia-fomina May 20, 2024
ed462d3
Updare solver enum for Z3_Native support
viktoriia-fomina May 20, 2024
8062b71
Fix compilation
viktoriia-fomina May 20, 2024
2855eff
Update statistics analyzer
viktoriia-fomina May 20, 2024
29d283e
Fix compilation
viktoriia-fomina May 20, 2024
d427dc3
Update default value in workflow
viktoriia-fomina May 20, 2024
cc1441b
Update default value in workflow
viktoriia-fomina May 20, 2024
7788f68
Fix setting solver in workflow
viktoriia-fomina May 20, 2024
0d55a16
Add MaxSMTCallStatistics to Z3Native
viktoriia-fomina May 20, 2024
5d7cddb
Add to test stat timeoutExceededOrUnknown option
viktoriia-fomina May 20, 2024
8dd2dc5
Wrap Yices into SymFpu in tests
viktoriia-fomina May 23, 2024
b85b2f3
Add symfpu dependency to tests
viktoriia-fomina May 23, 2024
657a4e7
Hardcode test data revision
viktoriia-fomina May 23, 2024
d1fcfb5
Let Yices-SymFpu run on FP
viktoriia-fomina May 23, 2024
1e51545
Update benchmark tests solver list
viktoriia-fomina May 27, 2024
bca994a
Run Yices on corresponding theories
viktoriia-fomina May 27, 2024
8daaae1
Set up suboptimal mode for Z3 native
viktoriia-fomina May 28, 2024
2dbee6e
Set timeout to 1s
viktoriia-fomina May 29, 2024
3d8e9de
Downgrade timeout to 500 ms
viktoriia-fomina May 29, 2024
1c1f60a
Remove useless NotImplementedException
viktoriia-fomina Jun 14, 2024
1576cf4
Remove useless `maxSMTSuceeded` from `KMaxSMTResult`
viktoriia-fomina Jun 14, 2024
78fcf85
Remove useless `timeoutExceeded` method
viktoriia-fomina Jun 14, 2024
3d2a15a
Refactor
viktoriia-fomina Jun 14, 2024
e0e6689
Split checkMaxSMT and checkSubOptMaxSmt (part1)
viktoriia-fomina Jun 14, 2024
070cbcb
Refactor Portfolio: split CheckMaxSMT and CheckSubOptMaxSMT
viktoriia-fomina Jun 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/maxsmt-tests-matrix.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
[
{
"NAME": "QF_ABV-light",
"TEST_DATA_REVISION": "0.0.0"
},
{
"NAME": "QF_ABVFP-light",
"TEST_DATA_REVISION": "0.0.0"
},
{
"NAME": "QF_AUFBV",
"TEST_DATA_REVISION": "0.0.0"
},
{
"NAME": "QF_AUFBVLIA-light",
"TEST_DATA_REVISION": "0.0.0"
},
{
"NAME": "QF_AUFLIA",
"TEST_DATA_REVISION": "0.0.0"
},
{
"NAME": "QF_BV-light",
"TEST_DATA_REVISION": "0.0.0"
},
{
"NAME": "QF_FP",
"TEST_DATA_REVISION": "0.0.0"
},
{
"NAME": "QF_UF-light",
"TEST_DATA_REVISION": "0.0.0"
},
{
"NAME": "QF_UFBV-light",
"TEST_DATA_REVISION": "0.0.0"
},
{
"NAME": "QF_UFLIA-light",
"TEST_DATA_REVISION": "0.0.0"
},
{
"NAME": "QF_UFLRA-light",
"TEST_DATA_REVISION": "0.0.0"
}
]
68 changes: 68 additions & 0 deletions .github/workflows/run-long-maxsat-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Build and run long ksmt MaxSAT tests

on:
workflow_dispatch:
inputs:
smtSolver:
type: choice
description: Chosen SMT solver
options:
- Z3
- Bitwuzla
- Cvc5
- Yices

env:
TEST_DATA_REVISION: 0.0.0

jobs:
run-maxsat-tests:
runs-on: ubuntu-22.04

strategy:
matrix:
BENCHMARK_NUMBER: [ 1, 2, 3, 4, 5, 6 ]
fail-fast: false

steps:
- uses: actions/checkout@v4

- name: Prepare test data (cache)
id: test-data-cache
uses: actions/cache@v3
env:
cache-name: cache-maxsat-test-data
with:
key: maxsat-test-data-${{ env.TEST_DATA_REVISION }}-${{ matrix.os }}
path: ksmt-maxsmt-test/testData/data/*

- name: Set up JDK 1.8
uses: actions/setup-java@v3
with:
java-version: 8
distribution: 'zulu'
cache: gradle

- name: Prepare test data (download)
if: steps.test-data-cache.outputs.cache-hit != 'true'
uses: gradle/gradle-build-action@v2
with:
arguments: |
:ksmt-maxsmt-test:maxsat-benchmark-${{ matrix.BENCHMARK_NUMBER }}
--no-daemon
-PtestDataRevision=${{ env.TEST_DATA_REVISION }}

- name: Run MaxSAT benchmark
uses: gradle/gradle-build-action@v2
with:
arguments: |
:ksmt-maxsmt-test:test
--no-daemon
--tests "io.ksmt.solver.maxsmt.test.sat.KPrimalDualMaxResSATBenchmarkTest.maxSAT${{ inputs.smtSolver }}Test"

- name: Upload test report
if: always()
uses: actions/upload-artifact@v4
with:
name: ksmt-maxsat-test-report-${{ matrix.BENCHMARK_NUMBER }}
path: ksmt-maxsmt-test/build/reports/tests/test/*
119 changes: 119 additions & 0 deletions .github/workflows/run-long-maxsmt-tests-pdmres.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: (PrimalDualMaxRes solver) Build and run long MaxSMT tests

on:
workflow_dispatch:
inputs:
solver:
type: choice
description: Chosen MaxSMT solver
options:
- KPrimalDualMaxRes
smtSolver:
type: choice
description: Chosen SMT solver
options:
- Portfolio
- Z3
- Bitwuzla
- Cvc5
- Yices
- Z3Native
optimality:
type: boolean
description: Chosen optimal (otherwise suboptimal) configuration
default: false
strategy:
type: choice
description: Chosen MaxSMT solving strategy
options:
- Dual
- Primal
minimizeCores:
type: boolean
description: Core minimization option (only one of [minimizeCores, preferLargeWeightCores, getMultipleCores] can be true)
required: true
default: false
preferLargeWeightCores:
type: boolean
description: Prefer large weight constraints for cores (only one of [minimizeCores, preferLargeWeightCores, getMultipleCores] can be true)
required: true
default: true
getMultipleCores:
type: boolean
description: Get multiple cores (only one of [minimizeCores, preferLargeWeightCores, getMultipleCores] can be true)
required: true
default: false
commitSHA:
description: Commit SHA (latest commit is default)
required: false
type: string
default: ""

jobs:
verify-inputs:
runs-on: ubuntu-22.04
steps:
- name: Verify inputs
# Check only one option of [minimizeCores, preferLargeWeightCores, getMultipleCores] is true
# (supported tests configurations)
run: |
if ([[ "${{ inputs.minimizeCores }}" == "true" ]] && [[ "${{ inputs.preferLargeWeightCores }}" == "true" ]]) || \
([[ "${{ inputs.minimizeCores }}" == "true" ]] && [[ "${{ inputs.getMultipleCores }}" == "true" ]]) || \
([[ "${{ inputs.preferLargeWeightCores }}" == "true" ]] && [[ "${{ inputs.getMultipleCores }}" == "true" ]])
then
echo "Only one option of [minimizeCores, preferLargeWeightCores, getMultipleCores] can be true"
exit 1
fi

construct-solver-name:
needs: verify-inputs
runs-on: ubuntu-22.04
outputs:
solver: ${{ steps.set-output.outputs.solver }}
steps:
- name: Construct solver name
run: |
if [[ "${{ inputs.minimizeCores }}" == false ]] && \
[[ "${{ inputs.preferLargeWeightCores }}" == false ]] && \
[[ "${{ inputs.getMultipleCores }}" == false ]]
then
export OPTION_TO_VALUE=""
elif [[ "${{ inputs.preferLargeWeightCores }}" == true ]]
then
export OPTION_TO_VALUE="2"
elif [[ "${{ inputs.minimizeCores }}" == true ]]
then
export OPTION_TO_VALUE="3"
elif [[ "${{ inputs.getMultipleCores }}" == true ]]
then
export OPTION_TO_VALUE="4"
fi

echo "OPTION_TO_VALUE=$OPTION_TO_VALUE" >> $GITHUB_ENV

if [[ "${{ inputs.optimality }}" == false ]]
then
export SUB_OPT="SubOpt"
fi

echo "SUB_OPT=$SUB_OPT" >> $GITHUB_ENV

- name: Set solver name to output
id: set-output
run: |
if [[ "${{ inputs.smtSolver }}" == "Z3Native" ]]
then
echo "solver=Z3Native" >> $GITHUB_OUTPUT
else
echo "solver=K${{ env.SUB_OPT }}${{ inputs.strategy }}MaxRes${{ env.OPTION_TO_VALUE }}" >> $GITHUB_OUTPUT
fi

run-long-maxsmt-tests:
needs: construct-solver-name
uses: ./.github/workflows/run-long-maxsmt-tests.yml
with:
solver: ${{ needs.construct-solver-name.outputs.solver }}
smtSolver: ${{ inputs.smtSolver }}
optimality: ${{ inputs.optimality }}
commitSHA: ${{ inputs.commitSHA }}
secrets: inherit
33 changes: 33 additions & 0 deletions .github/workflows/run-long-maxsmt-tests-pmres.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: (PMRes solver) Build and run long MaxSMT tests

on:
workflow_dispatch:
inputs:
solver:
type: choice
description: Chosen MaxSMT solver
options:
- KPMRes
smtSolver:
type: choice
description: Chosen SMT solver
options:
- Z3
- Bitwuzla
- Cvc5
- Yices
commitSHA:
description: Commit SHA (latest commit is default)
required: false
type: string
default: ""

jobs:
run-long-maxsmt-tests:
uses: ./.github/workflows/run-long-maxsmt-tests.yml
with:
solver: ${{ inputs.solver }}
smtSolver: ${{ inputs.smtSolver }}
optimality: true
commitSHA: ${{ inputs.commitSHA }}
secrets: inherit
Loading