Merged
Conversation
It is not advised to use 'using namespace std' on header files. For example, it causes issues for #include "windows.h" (https://developercommunity.visualstudio.com/t/error-c2872-byte-ambiguous-symbol/93889)
The enum values used full caps which caused collisions with macros from windows.h. Followed the style advice of https://google.github.io/styleguide/cppguide.html#Enumerator_Names to use 'k' followed by camel casing.
E.g. -cs 6000 overflowed. It is processed as integer arithmetics 6000 * 1024 * 1024, and only then assigned to size_t; but by then it already overflowed.
Closed
Contributor
|
Very weird that those iterators weren't segfaulting elsewhere! I guess it would have been fine if the for-loop conditions were swapped to check the Thank you so much for all the efforts on it! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Extended platform-depended availableMem() with implementation for Windows and Mac (cf. src/src_sharpSAT/MainSolver/FormulaCache.cpp). Required some annoying changes, e.g.:
Fixed segmentation fault issue on Mac (not sure why it (only) occurred there).
Changed datatype of some memory related variables into
size_tto support +4GB cache size. For example, before this pull request, -cs 6000 causedCSolverConf::maxCacheSizeto overflow.Note
Some files appear as entirely changed because they were using CRLF (Windows) as line endings instead of LF (Linux, Mac) and my editor/git converted them. E.g. in SomeTime.h only
using namespace std;was removed. I can elaborate on changes if needed.Verified output
None of the changes should have affected the produced results (model count, nnf, ...). Regardless, I tested on the two files in exp-testing and the statistics (incl. model count) remain the same.