Skip to content

Commit 17443d1

Browse files
authored
Merge pull request #231 from mgudemann/feature/remove_dependency_zlib
Remove dependency zlib
2 parents 2d26bc6 + 611773d commit 17443d1

File tree

6 files changed

+3
-24
lines changed

6 files changed

+3
-24
lines changed

.github/workflows/pull-request-checks.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ jobs:
111111
- name: Install Packages
112112
run: |
113113
sed -i -e "s|mirrorlist=|#mirrorlist=|g" -e "s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" /etc/yum.repos.d/CentOS-Linux-*
114-
yum -y install make gcc-c++ flex bison git rpmdevtools wget zlib-devel
114+
yum -y install make gcc-c++ flex bison git rpmdevtools wget
115115
wget --no-verbose https://github.com/ccache/ccache/releases/download/v4.8.3/ccache-4.8.3-linux-x86_64.tar.xz
116116
tar xJf ccache-4.8.3-linux-x86_64.tar.xz
117117
cp ccache-4.8.3-linux-x86_64/ccache /usr/bin/

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ For full information see [cprover.org](http://www.cprover.org/ebmc/).
1515
Compiling
1616
=========
1717

18-
- Install a package that provides `zlib.h`; e.g., on Debian/Ubuntu, do `sudo apt-get install
19-
zlib1g-dev`
2018
- initialize and update the CBMC submodule: `$> git submodule init; git submodule update`
2119
- download minisat: `$> make -C lib/cbmc/src minisat2-download`
2220
- build EBMC: `$> make -C src` (this also builds the CBMC submodule)

src/ic3/minisat/CMakeLists.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ set(MINISAT_SOVERSION ${MINISAT_SOMAJOR})
2626
#--------------------------------------------------------------------------------------------------
2727
# Dependencies:
2828

29-
find_package(ZLIB)
30-
include_directories(${ZLIB_INCLUDE_DIR})
31-
include_directories(${minisat_SOURCE_DIR})
32-
3329
#--------------------------------------------------------------------------------------------------
3430
# Compile flags:
3531

@@ -47,9 +43,6 @@ set(MINISAT_LIB_SOURCES
4743
add_library(minisat-lib-static STATIC ${MINISAT_LIB_SOURCES})
4844
add_library(minisat-lib-shared SHARED ${MINISAT_LIB_SOURCES})
4945

50-
target_link_libraries(minisat-lib-shared ${ZLIB_LIBRARY})
51-
target_link_libraries(minisat-lib-static ${ZLIB_LIBRARY})
52-
5346
add_executable(minisat_core minisat/core/Main.cc)
5447
add_executable(minisat_simp minisat/simp/Main.cc)
5548

src/ic3/minisat/minisat/core/Main.cc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA
1919
**************************************************************************************************/
2020

2121
#include <errno.h>
22-
#include <zlib.h>
2322

2423
#include "minisat/utils/System.h"
2524
#include "minisat/utils/ParseUtils.h"
@@ -84,7 +83,6 @@ int main(int argc, char** argv)
8483
if (argc == 1)
8584
printf("Reading from standard input... Use '--help' for help.\n");
8685

87-
gzFile in = (argc == 1) ? gzdopen(0, "rb") : gzopen(argv[1], "rb");
8886
if (in == NULL)
8987
printf("ERROR! Could not open file: %s\n", argc == 1 ? "<stdin>" : argv[1]), exit(1);
9088

@@ -93,7 +91,6 @@ int main(int argc, char** argv)
9391
printf("| |\n"); }
9492

9593
parse_DIMACS(in, S, (bool)strictp);
96-
gzclose(in);
9794
FILE* res = (argc >= 3) ? fopen(argv[2], "wb") : NULL;
9895

9996
if (S.verbosity > 0){

src/ic3/minisat/minisat/simp/Main.cc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA
1919
**************************************************************************************************/
2020

2121
#include <errno.h>
22-
#include <zlib.h>
2322

2423
#include "minisat/utils/System.h"
2524
#include "minisat/utils/ParseUtils.h"
@@ -88,7 +87,6 @@ int main(int argc, char** argv)
8887
if (argc == 1)
8988
printf("Reading from standard input... Use '--help' for help.\n");
9089

91-
gzFile in = (argc == 1) ? gzdopen(0, "rb") : gzopen(argv[1], "rb");
9290
if (in == NULL)
9391
printf("ERROR! Could not open file: %s\n", argc == 1 ? "<stdin>" : argv[1]), exit(1);
9492

@@ -97,7 +95,6 @@ int main(int argc, char** argv)
9795
printf("| |\n"); }
9896

9997
parse_DIMACS(in, S, (bool)strictp);
100-
gzclose(in);
10198
FILE* res = (argc >= 3) ? fopen(argv[2], "wb") : NULL;
10299

103100
if (S.verbosity > 0){

src/ic3/minisat/minisat/utils/ParseUtils.h

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWA
2424
#include <stdlib.h>
2525
#include <stdio.h>
2626

27-
#include <zlib.h>
28-
2927
#include "minisat/mtl/XAlloc.h"
3028

3129
namespace IctMinisat {
@@ -36,7 +34,6 @@ namespace IctMinisat {
3634

3735

3836
class StreamBuffer {
39-
gzFile in;
4037
unsigned char* buf;
4138
int pos;
4239
int size;
@@ -46,13 +43,10 @@ class StreamBuffer {
4643
void assureLookahead() {
4744
if (pos >= size) {
4845
pos = 0;
49-
size = gzread(in, buf, buffer_size); } }
46+
}
47+
}
5048

5149
public:
52-
explicit StreamBuffer(gzFile i) : in(i), pos(0), size(0){
53-
buf = (unsigned char*)xrealloc(NULL, buffer_size);
54-
assureLookahead();
55-
}
5650
~StreamBuffer() { free(buf); }
5751

5852
int operator * () const { return (pos >= size) ? EOF : buf[pos]; }

0 commit comments

Comments
 (0)