Skip to content

Commit

Permalink
gfan 0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
mahrud committed Aug 22, 2024
1 parent 3dde630 commit 3a454ee
Showing 1 changed file with 262 additions and 27 deletions.
289 changes: 262 additions & 27 deletions Formula/gfan.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
class Gfan < Formula
desc "Grobner fans and tropical varieties"
homepage "https://users-math.au.dk/~jensen/software/gfan/gfan.html"
url "https://users-math.au.dk/~jensen/software/gfan/gfan0.6.2.tar.gz"
sha256 "a674d5e5dc43634397de0d55dd5da3c32bd358d05f72b73a50e62c1a1686f10a"
url "https://users-math.au.dk/~jensen/software/gfan/gfan0.7.tar.gz"
sha256 "ab833757e1e4d4a98662f4aa691394013ea9a226f6416b8f8565356d6fcc989e"
license "GPL-2.0-or-later"
revision 11

bottle do
root_url "https://ghcr.io/v2/macaulay2/tap"
Expand All @@ -25,11 +24,6 @@ class Gfan < Formula
depends_on "cddlib"
depends_on "gmp"

patch do
url "https://raw.githubusercontent.com/Macaulay2/M2/d51564127d757a3132684e9730f4085cb89297bb/M2/libraries/gfan/patch-0.6.2"
sha256 "9ebbf25e6de16baec877050bef69c85504e7bfa81e79407c2ab00ea4433e838c"
end

patch :DATA

def install

Check failure on line 29 in Formula/gfan.rb

View workflow job for this annotation

GitHub Actions / test-bot (macos-12)

`brew install --verbose --formula --build-bottle macaulay2/tap/gfan` failed on macOS Monterey (12)!

==> Fetching macaulay2/tap/gfan ==> Downloading https://users-math.au.dk/~jensen/software/gfan/gfan0.7.tar.gz Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/13350b9f43648de391008e16b56de048901d3cc3a784014d9f38961875d50995--gfan0.7.tar.gz ==> Verifying checksum for '13350b9f43648de391008e16b56de048901d3cc3a784014d9f38961875d50995--gfan0.7.tar.gz' ==> Installing gfan from macaulay2/tap /usr/bin/env tar --extract --no-same-owner --file /Users/runner/Library/Caches/Homebrew/downloads/13350b9f43648de391008e16b56de048901d3cc3a784014d9f38961875d50995--gfan0.7.tar.gz --directory /private/tmp/homebrew-unpack20240822-10007-dkenp8 /usr/bin/env cp -pR /private/tmp/homebrew-unpack20240822-10007-dkenp8/gfan0.7/. /private/tmp/gfan-20240822-10007-h53pnc/gfan0.7 ==> Patching ==> make cddnoprefix=yes GMP_LINKOPTIONS=-L/usr/local/opt/gmp/lib -lgmp GMP_INCLUDEOPTIONS=-I/usr/local/opt/gmp/include OPTFLAGS=-O2 -DGMPRATIONAL -DNDEBUG -I/usr/local/opt/cddlib/include/cddlib CCLINKER=g++-14 -L/usr/local/opt/cddlib/lib -static-libgcc -static-libstdc++ g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/usr/local/opt/cddlib/include/cddlib -g -I/usr/local/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/polynomialgcd.cpp -o src/polynomialgcd.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/usr/local/opt/cddlib/include/cddlib -g -I/usr/local/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/lp_cdd.cpp -o src/lp_cdd.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/usr/local/opt/cddlib/include/cddlib -g -I/usr/local/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/parser.cpp -o src/parser.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/usr/local/opt/cddlib/include/cddlib -g -I/usr/local/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/field.cpp -o src/field.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/usr/local/opt/cddlib/include/cddlib -g -I/usr/local/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/monomial.cpp -o src/monomial.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/usr/local/opt/cddlib/include/cddlib -g -I/usr/local/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/printer.cpp -o src/printer.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/usr/local/opt/cddlib/include/cddlib -g -I/usr/local/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/polynomial.cpp -o src/polynomial.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/usr/local/opt/cddlib/include/cddlib -g -I/usr/local/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/termorder.cpp -o src/termorder.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/usr/local/opt/cddlib/include/cddlib -g -I/usr/local/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/term.cpp -o src/term.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/usr/local/opt/cddlib/include/cddlib -g -I/usr/local/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/vektor.cpp -o src/vektor.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/usr/local/opt/cddlib/include/cddlib -g -I/usr/local/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/division.cpp -o src/division.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/usr/local/opt/cddlib/include/cddlib -g -I/usr/local/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/buchberger.cpp -o src/buchberger.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/usr/local/opt/cddlib/include/cddlib -g -I/usr/local/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/wallideal.cpp -o src/wallideal.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/usr/local/opt/cddlib/include/cddlib -g -I/usr/local/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/lp.cpp -o src/lp.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/usr/local/opt/cddlib/include/cddlib -g -I/usr/local/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/enumeration.cpp -o src/enumeration.o In file included from src/gfanlib_tableau.h:14, from src/divisionobject.h:22, from src/buchberger.cpp:17: src/gfanlib_circuittableint.h: In instantiation of 'static gfan::CircuitTableIntPOD<word, longword> gfan::CircuitTableIntPOD<word, longword>::scaleVector(gfan::CircuitTableIntPOD<word, longword>*, gfan::CircuitTableIntPOD<word, l

Check failure on line 29 in Formula/gfan.rb

View workflow job for this annotation

GitHub Actions / test-bot (macos-13)

`brew install --verbose --formula --build-bottle macaulay2/tap/gfan` failed on macOS Ventura (13)!

==> Fetching macaulay2/tap/gfan ==> Downloading https://users-math.au.dk/~jensen/software/gfan/gfan0.7.tar.gz Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/13350b9f43648de391008e16b56de048901d3cc3a784014d9f38961875d50995--gfan0.7.tar.gz ==> Verifying checksum for '13350b9f43648de391008e16b56de048901d3cc3a784014d9f38961875d50995--gfan0.7.tar.gz' ==> Installing gfan from macaulay2/tap /usr/bin/env tar --extract --no-same-owner --file /Users/runner/Library/Caches/Homebrew/downloads/13350b9f43648de391008e16b56de048901d3cc3a784014d9f38961875d50995--gfan0.7.tar.gz --directory /private/tmp/homebrew-unpack20240822-9283-iuznom /usr/bin/env cp -pR /private/tmp/homebrew-unpack20240822-9283-iuznom/gfan0.7/. /private/tmp/gfan-20240822-9283-igiatx/gfan0.7 ==> Patching ==> make cddnoprefix=yes GMP_LINKOPTIONS=-L/usr/local/opt/gmp/lib -lgmp GMP_INCLUDEOPTIONS=-I/usr/local/opt/gmp/include OPTFLAGS=-O2 -DGMPRATIONAL -DNDEBUG -I/usr/local/opt/cddlib/include/cddlib CCLINKER=g++-14 -L/usr/local/opt/cddlib/lib -static-libgcc -static-libstdc++ -ld_classic g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/usr/local/opt/cddlib/include/cddlib -g -I/usr/local/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/polynomialgcd.cpp -o src/polynomialgcd.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/usr/local/opt/cddlib/include/cddlib -g -I/usr/local/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/lp_cdd.cpp -o src/lp_cdd.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/usr/local/opt/cddlib/include/cddlib -g -I/usr/local/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/parser.cpp -o src/parser.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/usr/local/opt/cddlib/include/cddlib -g -I/usr/local/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/field.cpp -o src/field.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/usr/local/opt/cddlib/include/cddlib -g -I/usr/local/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/monomial.cpp -o src/monomial.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/usr/local/opt/cddlib/include/cddlib -g -I/usr/local/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/printer.cpp -o src/printer.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/usr/local/opt/cddlib/include/cddlib -g -I/usr/local/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/polynomial.cpp -o src/polynomial.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/usr/local/opt/cddlib/include/cddlib -g -I/usr/local/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/termorder.cpp -o src/termorder.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/usr/local/opt/cddlib/include/cddlib -g -I/usr/local/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/term.cpp -o src/term.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/usr/local/opt/cddlib/include/cddlib -g -I/usr/local/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/vektor.cpp -o src/vektor.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/usr/local/opt/cddlib/include/cddlib -g -I/usr/local/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/division.cpp -o src/division.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/usr/local/opt/cddlib/include/cddlib -g -I/usr/local/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/buchberger.cpp -o src/buchberger.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/usr/local/opt/cddlib/include/cddlib -g -I/usr/local/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/wallideal.cpp -o src/wallideal.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/usr/local/opt/cddlib/include/cddlib -g -I/usr/local/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/lp.cpp -o src/lp.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/usr/local/opt/cddlib/include/cddlib -g -I/usr/local/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/enumeration.cpp -o src/enumeration.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/usr/local/opt/cddlib/include/cddlib -g -I/usr/local/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/ep_standard.cpp -o src/ep_standard.o In file included from src/gfanlib_tableau.h:14, from src/divisionobject.h:22, from src/buchberger.cpp:17: src/gfanlib_circuittableint.h: In in

Check failure on line 29 in Formula/gfan.rb

View workflow job for this annotation

GitHub Actions / test-bot (macos-14)

`brew install --verbose --formula --build-bottle macaulay2/tap/gfan` failed on macOS Sonoma (14) on Apple Silicon!

==> Fetching macaulay2/tap/gfan ==> Downloading https://users-math.au.dk/~jensen/software/gfan/gfan0.7.tar.gz Already downloaded: /Users/runner/Library/Caches/Homebrew/downloads/13350b9f43648de391008e16b56de048901d3cc3a784014d9f38961875d50995--gfan0.7.tar.gz ==> Verifying checksum for '13350b9f43648de391008e16b56de048901d3cc3a784014d9f38961875d50995--gfan0.7.tar.gz' ==> Installing gfan from macaulay2/tap /usr/bin/env tar --extract --no-same-owner --file /Users/runner/Library/Caches/Homebrew/downloads/13350b9f43648de391008e16b56de048901d3cc3a784014d9f38961875d50995--gfan0.7.tar.gz --directory /private/tmp/homebrew-unpack20240822-8786-cgjwg4 /usr/bin/env cp -pR /private/tmp/homebrew-unpack20240822-8786-cgjwg4/gfan0.7/. /private/tmp/gfan-20240822-8786-ebb4f3/gfan0.7 ==> Patching ==> make cddnoprefix=yes GMP_LINKOPTIONS=-L/opt/homebrew/opt/gmp/lib -lgmp GMP_INCLUDEOPTIONS=-I/opt/homebrew/opt/gmp/include OPTFLAGS=-O2 -DGMPRATIONAL -DNDEBUG -I/opt/homebrew/opt/cddlib/include/cddlib CCLINKER=g++-14 -L/opt/homebrew/opt/cddlib/lib -static-libgcc -static-libstdc++ -ld_classic g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/opt/homebrew/opt/cddlib/include/cddlib -g -I/opt/homebrew/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/polynomialgcd.cpp -o src/polynomialgcd.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/opt/homebrew/opt/cddlib/include/cddlib -g -I/opt/homebrew/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/lp_cdd.cpp -o src/lp_cdd.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/opt/homebrew/opt/cddlib/include/cddlib -g -I/opt/homebrew/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/parser.cpp -o src/parser.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/opt/homebrew/opt/cddlib/include/cddlib -g -I/opt/homebrew/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/field.cpp -o src/field.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/opt/homebrew/opt/cddlib/include/cddlib -g -I/opt/homebrew/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/monomial.cpp -o src/monomial.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/opt/homebrew/opt/cddlib/include/cddlib -g -I/opt/homebrew/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/printer.cpp -o src/printer.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/opt/homebrew/opt/cddlib/include/cddlib -g -I/opt/homebrew/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/polynomial.cpp -o src/polynomial.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/opt/homebrew/opt/cddlib/include/cddlib -g -I/opt/homebrew/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/termorder.cpp -o src/termorder.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/opt/homebrew/opt/cddlib/include/cddlib -g -I/opt/homebrew/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/term.cpp -o src/term.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/opt/homebrew/opt/cddlib/include/cddlib -g -I/opt/homebrew/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/vektor.cpp -o src/vektor.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/opt/homebrew/opt/cddlib/include/cddlib -g -I/opt/homebrew/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/division.cpp -o src/division.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/opt/homebrew/opt/cddlib/include/cddlib -g -I/opt/homebrew/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/buchberger.cpp -o src/buchberger.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/opt/homebrew/opt/cddlib/include/cddlib -g -I/opt/homebrew/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/wallideal.cpp -o src/wallideal.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/opt/homebrew/opt/cddlib/include/cddlib -g -I/opt/homebrew/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/lp.cpp -o src/lp.o g++-14 -O2 -DGMPRATIONAL -DNDEBUG -I/opt/homebrew/opt/cddlib/include/cddlib -g -I/opt/homebrew/opt/gmp/include -g -DNOCDDPREFIX -std=c++2a -c src/enumeration.cpp -o src/enumeration.o In file included from src/gfanlib_tableau.h:14, from src/divisionobject.h:22, from src/buchberger.cpp:17: src/gfanlib_circuittableint.h: In instantiation of 'static gfan::CircuitTableIntPOD<word, longword> gfan::CircuitTable
Expand All @@ -55,31 +49,272 @@ def install

__END__

diff --git a/Makefile-orig b/Makefile
index 737208abfb..52e010e0b3 100644
diff --git a/Makefile b/Makefile
index 67c8164..0c9bbf2 100644
--- a/Makefile
+++ b/Makefile
@@ -110,15 +110,15 @@ MKDIR=mkdir -p
PREFIX =
@@ -117,11 +117,6 @@ PREFIX =
SHELL = /bin/sh
#ARCH = LINUX

-CC = $(PREFIX)gcc
-CLINKER = $(CC)
-CXX = $(PREFIX)g++
-CCLINKER = $(CXX)
+#CC = $(PREFIX)gcc
+#CLINKER = $(CC)
+#CXX = $(PREFIX)g++
+#CCLINKER = $(CXX)
#OPTFLAGS = -O2 -DGMPRATIONAL -DNDEBUG
# Note that gcc produces wrong code with -O3
-OPTFLAGS = -DGMPRATIONAL -Wuninitialized -fno-omit-frame-pointer -O2 #-O3 -fno-guess-branch-probability #-DNDEBUG
+#OPTFLAGS = -DGMPRATIONAL -Wuninitialized -fno-omit-frame-pointer -O2 #-O3 -fno-guess-branch-probability #-DNDEBUG
#OPTFLAGS = -DGMPRATIONAL -Wuninitialized -fno-omit-frame-pointer -O3 -mavx -msse2 -finline-limit=1000 -ffast-math -Wuninitialized # -fno-guess-branch-probability #-DNDEBUG -ftree-vectorizer-verbose=2
-#OPTFLAGS = -DGMPRATIONAL -Wuninitialized -fno-omit-frame-pointer -O1 -fno-guess-branch-probability
+OPTFLAGS = -DGMPRATIONAL -Wuninitialized -fno-omit-frame-pointer -O1 -fno-guess-branch-probability
#-DNDEBUG
#OPTFLAGS = -DGMPRATIONAL -Wuninitialized -fno-omit-frame-pointer -O3 -mavx -msse2 -ftree-vectorizer-verbose=2 -finline-limit=1000 -ffast-math #-DNDEBUG
#OPTFLAGS = -DGMPRATIONAL -Wuninitialized -fno-omit-frame-pointer -O3 -mavx -msse2 -ftree-vectorizer-verbose=2 -march=native -unroll-loops --param max-unroll-times=4 -ffast-math #-DNDEBUG
-
#CC = $(PREFIX)gcc-8.1
#CLINKER = $(CC)
#CXX = $(PREFIX)g++-8.1
@@ -420,9 +415,9 @@ EXECS = $(MAIN)
# (compiling with gcc version 4.7.2 and running gfan _tropicaltraverse on a starting cone for Grassmann3_7)
# Either this is a bug in the code or in the compiler. The bug disappears by compiling with -fno-guess-branch-probability
src/symmetrictraversal.o: src/symmetrictraversal.cpp
- $(CXX) $(CFLAGS) -fno-guess-branch-probability -c src/symmetrictraversal.cpp -o src/symmetrictraversal.o
+# $(CXX) $(CFLAGS) -fno-guess-branch-probability -c src/symmetrictraversal.cpp -o src/symmetrictraversal.o
# If compiling with clang, use the line below instead:
-# $(CXX) $(CFLAGS) -c src/symmetrictraversal.cpp -o src/symmetrictraversal.o
+ $(CXX) $(CFLAGS) -c src/symmetrictraversal.cpp -o src/symmetrictraversal.o

# Define suffixes to make the program compile on legolas.imf.au.dk :
.SUFFIXES: .o .cpp .c
diff --git a/src/application.cpp b/src/application.cpp
index 77f830b..baf3589 100644
--- a/src/application.cpp
+++ b/src/application.cpp
@@ -567,7 +567,7 @@ void Application::makeSymbolicLinks(const char *name, bool all, const char *path
if(strlen(p->name())>0)
{
char c[1024];
- sprintf(c,"ln -s %s%s %s%s%s\n",path,name,path,name,p->name());
+ sprintf(c,"ln -sf %s%s %s%s%s\n",path,name,path,name,p->name());
fprintf(stderr,"%s",c);
int err=system(c);
assert(err==0);
diff --git a/src/enumeration.cpp b/src/enumeration.cpp
index 44d0a4f..6d3870e 100644
--- a/src/enumeration.cpp
+++ b/src/enumeration.cpp
@@ -14,7 +14,7 @@ EnumerationFilePrinter::EnumerationFilePrinter():

EnumerationFilePrinter::~EnumerationFilePrinter()
{
- assert(file==0);
+ // assert(file==0);
}


diff --git a/src/enumeration.h b/src/enumeration.h
index b0bd187..d91c9ff 100644
--- a/src/enumeration.h
+++ b/src/enumeration.h
@@ -36,7 +36,7 @@ class EnumerationFilePrinter: public EnumerationPrinter
FILE *file;
public:
EnumerationFilePrinter();
- ~EnumerationFilePrinter();
+ virtual ~EnumerationFilePrinter();

void open(std::string filename);
void open(FILE *file);
diff --git a/src/field.h b/src/field.h
index 866be22..7df1600 100644
--- a/src/field.h
+++ b/src/field.h
@@ -208,6 +208,7 @@ class FieldElementImplementation
{
fprintf(stderr,"*this is not in Z/pZ.\n");
assert(0);
+ exit(0);
}
virtual bool isInteger()const
{
@@ -223,6 +224,7 @@ class FieldElementImplementation
Field& operator=(const Field& a)
{
assert(0);
+ exit(1);
}//assignment
};

@@ -271,7 +273,8 @@ class FieldImplementation
virtual FieldElement random()
{
assert(0);
- }
+ exit(1);
+ }
virtual int getCharacteristic()const=0;
virtual const char *name()=0;
virtual std::string toString()const=0;
diff --git a/src/field_rationalfunctions2.cpp b/src/field_rationalfunctions2.cpp
index 4e80c5a..ccc6ae9 100644
--- a/src/field_rationalfunctions2.cpp
+++ b/src/field_rationalfunctions2.cpp
@@ -524,6 +524,7 @@ class FieldElementRationalFunction2 : public FieldElementImplementation

return sign+string("{").append(s,startIndex,slashIndex-startIndex)+string("\\over ").append(s,slashIndex+1,s.length()-slashIndex-1)+string("}");
*/
+ exit(1);
}

std::string toString(bool writeIfOne=true, bool alwaysWriteSign=false, bool latexMode=false /*, bool mathMode=true*/) const
diff --git a/src/field_rationals.cpp b/src/field_rationals.cpp
index 30a92f6..06c95c9 100644
--- a/src/field_rationals.cpp
+++ b/src/field_rationals.cpp
@@ -398,7 +398,7 @@ const char *FieldRationalsImplementation::name()
/*FieldRationals::FieldRationals():
Field(new FieldRationalsImplementation())
{
- /* fprintf(Stderr,"Adding field rationals\n");
+ fprintf(Stderr,"Adding field rationals\n");
next=list;
list=this;
*/
diff --git a/src/gmpallocator.cpp b/src/gmpallocator.cpp
index e308412..07c6b74 100644
--- a/src/gmpallocator.cpp
+++ b/src/gmpallocator.cpp
@@ -29,7 +29,7 @@ static inline int bufNum(int size)
{
ret++;
if(ret>=(NBUCKETSGMP))return -1;
- size>>1;
+ size>>=1;
}
return ret;
}
diff --git a/src/lp.cpp b/src/lp.cpp
index 744e2a9..420b853 100644
--- a/src/lp.cpp
+++ b/src/lp.cpp
@@ -59,6 +59,7 @@ bool LpSolver::hasInteriorPoint(const IntegerVectorList &g, bool strictlyPositiv
{
fprintf(stderr,"hasInteriorPoint method not supported in \"%s\" LP class\n",name());
assert(0);
+ exit(1);
}


@@ -119,6 +120,7 @@ bool LpSolver::hasHomogeneousSolution(int n, const IntegerVectorList &inequaliti
{
fprintf(stderr,"hasHomogeneousSolution method not supported in \"%s\" LP class\n",name());
assert(0);
+ exit(1);
}

static LpSolver *soplex,*soplexCddGmp,*huber,*cdd,*cddgmp,*default_;
diff --git a/src/nbody.cpp b/src/nbody.cpp
index e6d2e6e..3384bb0 100644
--- a/src/nbody.cpp
+++ b/src/nbody.cpp
@@ -17,6 +17,7 @@ static int rIndex(int i, int j, int N, bool withMasses)
r++;
}
assert(0);
+ exit(1);
}

static int sIndex(int i, int j, int N, bool withMasses)
diff --git a/src/packedmonomial.cpp b/src/packedmonomial.cpp
index 65a9242..37404e6 100644
--- a/src/packedmonomial.cpp
+++ b/src/packedmonomial.cpp
@@ -39,6 +39,7 @@ vector<MonomialType> minimized(vector<MonomialType> const &generators)

*g=ret;
*/
+ exit(1);
}


diff --git a/src/parser.cpp b/src/parser.cpp
index 8c09b1a..ed807f8 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -638,6 +638,7 @@ Field CharacterBasedParser::parseField()

parserError("field",c);
assert(0);
+ exit(1);
}


diff --git a/src/polyhedralfan.cpp b/src/polyhedralfan.cpp
index e62cae4..90eae40 100644
--- a/src/polyhedralfan.cpp
+++ b/src/polyhedralfan.cpp
@@ -1672,6 +1672,7 @@ PolyhedralCone PolyhedralFan::coneContaining(IntegerVector const &v)const
if(i->contains(v))return i->faceContaining(v);
debug<<"Vector "<<v<<" not contained in support of fan\n";
assert(0);
+ exit(1);
}


diff --git a/src/polymakefile.cpp b/src/polymakefile.cpp
index a7ea692..55d3d39 100644
--- a/src/polymakefile.cpp
+++ b/src/polymakefile.cpp
@@ -329,6 +329,7 @@ void PolymakeFile::writeMatrixProperty(const char *p, const IntegerMatrix &m, bo
IntegerMatrix PolymakeFile::readArrayArrayIntProperty(const char *p, int width)
{
assert(0);//Not implemented yet.
+ exit(1);
}


@@ -371,7 +372,7 @@ static list<int> readIntList(istream &s)
{
list<int> ret;
int c=s.peek();
- while((c>='0') && (c<='9')|| (c==' '))
+ while(((c>='0') && (c<='9'))|| (c==' '))
{
// fprintf(Stderr,"?\n");
int r;
diff --git a/src/polynomialgcd.cpp b/src/polynomialgcd.cpp
index 82aea06..14cb528 100644
--- a/src/polynomialgcd.cpp
+++ b/src/polynomialgcd.cpp
@@ -618,7 +618,7 @@ Polynomial NonMonomialPolynomialGCDForZ(PolynomialSet p)
if(1) {
static int i;
i++;
- if((i==1000))
+ if(i==1000)
{
// debug<<simplifyPolysViaHomogeneitySpace(p);
// debug<<"NonMon on:"<<p.getRing()<<p<<"\n";
diff --git a/src/timer.cpp b/src/timer.cpp
index 7421c41..b5d8741 100644
--- a/src/timer.cpp
+++ b/src/timer.cpp
@@ -1,10 +1,10 @@
#include "timer.h"
-#include "log.h"
-
#include "iostream"
#include <time.h>
#include <assert.h>

+#include "log.h" // include last, because it defines a macro "log2" also defined as a function in math.h
+
using namespace std;

Timer* Timer::timers;
diff --git a/src/vektor.cpp b/src/vektor.cpp
index d17579a..63e39f0 100644
--- a/src/vektor.cpp
+++ b/src/vektor.cpp
@@ -96,7 +96,7 @@ int gcdGFAN(int r, int s)
int gcdOfVector(IntegerVector const &v)
{
int ret=0;
- for(int i=0;i<v.size();i++)if(ret=v[i])break;
+ for(int i=0;i<v.size();i++)if((ret=v[i]))break;
if(ret<0)ret=-ret;
assert(ret!=0);
for(int i=0;i<v.size();i++)ret=gcdGFAN(ret,v[i]);
--
2.31.1
2.46.0

0 comments on commit 3a454ee

Please sign in to comment.