diff --git a/.gitignore b/.gitignore index 1ff2b0c..37b3971 100644 --- a/.gitignore +++ b/.gitignore @@ -1,35 +1,3 @@ -porta.log - -# ignore changes to examples/ -examples/* - -# Object files -*.o -*.ko -*.obj -*.elf - -# Libraries -*.lib -*.a - -# Dependency files -*.d - -# Compiled binary files -gnu-make/bin/valid -gnu-make/bin/xporta - -# Shared objects (inc. Windows DLLs) -*.dll -*.so -*.so.* -*.dylib - -# Executables -*.exe -*.out -*.app -*.i*86 -*.x86_64 -*.hex +# Build and install directories for clean out-of-source testing +build/* +install/* diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..ba1b8cf --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,39 @@ +cmake_minimum_required(VERSION 3.12) +project(julia-porta) + +set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH}:\$ORIGIN/../lib:\$ORIGIN") + +if(MSVC) + add_compile_options(/W4) +else() + add_compile_options(-Wall) +endif() + +set(JULIA_PORTA_SRC "${PROJECT_SOURCE_DIR}/src") + +add_library(porta SHARED + "${JULIA_PORTA_SRC}/arith.c" + "${JULIA_PORTA_SRC}/common.c" + "${JULIA_PORTA_SRC}/four_mot.c" + "${JULIA_PORTA_SRC}/inout.c" + "${JULIA_PORTA_SRC}/largecalc.c" + "${JULIA_PORTA_SRC}/log.c" + "${JULIA_PORTA_SRC}/mp.c" + "${JULIA_PORTA_SRC}/portsort.c" + "${JULIA_PORTA_SRC}/porta.c" +) +target_include_directories(porta PRIVATE "${JULIA_PORTA_SRC}") + +add_executable(xporta + "${JULIA_PORTA_SRC}/main.c" +) +target_link_libraries(xporta PRIVATE porta) +target_include_directories(xporta PRIVATE "${JULIA_PORTA_SRC}") + +add_executable(valid + "${JULIA_PORTA_SRC}/valid.c" +) +target_link_libraries(valid PRIVATE porta) +target_include_directories(valid PRIVATE "${JULIA_PORTA_SRC}") + +install(TARGETS porta xporta valid) diff --git a/INFO b/INFO index cc8bb0d..f445169 100644 --- a/INFO +++ b/INFO @@ -5,19 +5,18 @@ Contents: 2. General file format 2.1. Format (sections) of '.ieq'-files 2.2. Format (sections) of '.poi'- files -3. Installation -4. Program calls and parameters +3. Program calls and parameters 1. General Information: ----------------------- PORTA is a collection of routines for analyzing polytopes and -polyhedra. The polyhedra are either given as the convex hull +polyhedra. The polyhedra are either given as the convex hull of a set of points plus (possibly) the convex cone of a set of -vectors, specified in a '.poi'-file, or as a system of linear +vectors, specified in a '.poi'-file, or as a system of linear equations and inequalities, specified in a '.ieq'-file - see -file format descriptions below. The following routines are +file format descriptions below. The following routines are available: dim - computes the dimension of convex hull and convex @@ -29,7 +28,7 @@ dim - computes the dimension of convex hull and convex the system are displayed. fctp - checks whether a set of inequalities given in a - '.ieq'-file is facet inducing for a polyhedron given + '.ieq'-file is facet inducing for a polyhedron given by a '.poi'-file. If this is not the case, points and rays which are not valid are output into a file. Points and rays that satisfy the inequality with @@ -37,7 +36,7 @@ fctp - checks whether a set of inequalities given in a if there are any. fmel - reads a system of linear inequalities and eliminates - choosen variables, i.e. given an index set I for + choosen variables, i.e. given an index set I for variables to be eliminated, 'fmel' projects the given system to the subspace given by x_{i} = 0 for i in I. @@ -57,15 +56,15 @@ portsort - puts the points or inequalities given in an input - right hand sides of inequalities or equations - frequency of the values -5 .. -1, 1 .. 5 - lexicographical order - Additionally 'portsort' formats the output. + Additionally 'portsort' formats the output. traf - carries out the transformation between the two poly- hedron representations, the direction is determined by the input filename suffix '.poi' or '.ieq' (see - file format description below). All computations are + file format description below). All computations are carried out in rational arithmetic using integer ope- rations only to have guaranteed numerical results. A - possible arithmetic overflow is recognized. + possible arithmetic overflow is recognized. The computation of the ieq-representation is perfor- med using Gaussian and Fourier-Motzkin elimination. @@ -76,26 +75,26 @@ traf - carries out the transformation between the two poly- multiple precision integer arithmetic is set, the right hand sides are 0 or 1 or -1 and the values are reduced as far as possible. If PORTA terminates - successfully then the resulting inequalities + successfully then the resulting inequalities are all facet-defining for your polyhedron and give together with equations a minimal linear description of your polyhedron. If an ieq-representation is given as input and if 0 is not valid for the linear system, 'traf' needs a - valid point that must be specified additionally in + valid point that must be specified additionally in the input by using the keyword VALID - see format de- scription below. 'traf' transforms the ieq-represen- - tation to the poi-representation, after elimination + tation to the poi-representation, after elimination of equations and 0-centering, by applying the 'poi'- to-'ieq' direction to the polar polyhedron. Hint: If you give a valid point or if 0 is valid, then this vector may appear again in the resulting system, even if this vector might be redundant in - a minimal description. (All other vectors are + a minimal description. (All other vectors are non-redundant.) -vint - enumerates all integral points within given bounds +vint - enumerates all integral points within given bounds that are valid for a linear system of inequalities and equations. The lower and upper bounds for each component must be specified in the input file by the @@ -115,11 +114,11 @@ for both of '.ieq'- and '.poi'-files in having several sections headed by an indicator line with a specific capitalized key- word, the first line stating the dimension as - DIM = + DIM = and the last line containing the keyword - END . + END . The sections are specific to the '.ieq' and '.poi' polyhedron representations with the exception of comment sections indica- @@ -133,9 +132,9 @@ A 'valid'-section is headed by the keyword VALID -which indicates that the next line specifies a valid point for +which indicates that the next line specifies a valid point for the system of inequalities and equations by rational values -in the format +in the format / ... @@ -144,7 +143,7 @@ required by the function 'traf' in case 0 is not valid for the system. There is no restriction concerning the order of sections and -some sections are optional. There are sections specific to PORTA +some sections are optional. There are sections specific to PORTA functions, such must be present in an input file for executing the corresponding function. @@ -152,21 +151,21 @@ the corresponding function. 2.1. Format (sections) of '.ieq'-files: --------------------------------------- -INEQUALITIES_SECTION - +INEQUALITIES_SECTION + Subsequent lines contain inequalities or equations, one per - line, with format + line, with format + + () - () - - line number (optional) : +|- ... +|- - : / x{i} , i in {1,...} + : / x{i} , i in {1,...} + + : <= | >= | => | =< | = | == - : <= | >= | => | =< | = | == - : / The values are rational, represented by numerators @@ -176,7 +175,7 @@ INEQUALITIES_SECTION LOWER BOUNDS - The next line specifies lower bounds for the components of + The next line specifies lower bounds for the components of the system by integer values such that the i-th entry re- fers to the i-th component. The lower bounds are used by the function 'vint' for enumerating integral points. @@ -184,23 +183,23 @@ LOWER BOUNDS UPPER BOUNDS - The next line specifies upper bounds for the components of + The next line specifies upper bounds for the components of the system by integer values such that the i-th entry re- fers to the i-th component. The upper bounds are used by the function 'vint' for enumerating integral points. -ElIMINATION ORDER +ElIMINATION ORDER - The next line specifies a set of variables to be eliminated + The next line specifies a set of variables to be eliminated by the function 'fmel' and the order of elimination by in- - teger values. A value 0 as the i-th entry of the line indicates + teger values. A value 0 as the i-th entry of the line indicates that the i-th variable must not be eliminated, a value j, 0 < j, j < , as the i-th entry of the line indicates that the i-th - variable should be eliminated in the j-th iteration. All non- - zero numbers must be different and it must be possible to put + variable should be eliminated in the j-th iteration. All non- + zero numbers must be different and it must be possible to put into an order 1,2,3,... . - + See file 'example.ieq' for '.ieq' format illustration. @@ -209,78 +208,30 @@ See file 'example.ieq' for '.ieq' format illustration. CONV_SECTION - Subsequent lines contain specifications of points, one per - line by rational values, the line format is + Subsequent lines contain specifications of points, one per + line by rational values, the line format is - () / ... / + () / ... / - line number (optional) - i-th numerator - + - i-th denominator, a denominator with value 1 can be omitted - If a CONV_SECTION is missing (the case of a cone) the origin + If a CONV_SECTION is missing (the case of a cone) the origin is assumed to be feasible. CONE_SECTION Subsequent lines contains specification of vectors, one per - line, the line format is the same as for points. + line, the line format is the same as for points. See file 'example.poi' for '.poi' format illustration. - -3. Installation: ----------------- - -A GNU Makefile is provided for producing the executables. - -1) Edit that file and enter your favorite compiler and compiler -options - gcc works fine !! - -CFLAGS = -O3 -CC = gcc - -2) Just type 'make'. - -Makes an executable 'xporta' by compiling and linking the sources - common.c, - porta.c, - four_mot.c, - arith.c, - inout.c, - portsort.c, - largecalc.c, - mp.c, - log.c. - -Makes an executable 'valid' by compiling and linking the sources - valid.c, - common.c, - arith.c, - inout.c. - - -The executables are called by the (UNIX) drivers - dim, - fctp, - fmel, - iespo, - posie, - portsort, - traf, - vint -provided for executing the corresponding PORTA functions. - -3) Unpack the man-pages `man1.tar' - tar tvf man1.tar - and move them to your default man-path, e.g. - mv man1/* /usr/local/man/man1 - -Program calls and parameters: +3. Program calls and parameters: ---------------------------- dim [-pl] .poi @@ -288,15 +239,15 @@ Program calls and parameters: p - Unbuffered redirection of terminal messages into .prt - l - Use a special integer arithmetic + l - Use a special integer arithmetic allowing the integers to have arbitrary lengths. This arithmetic is not as efficient as the system's integer arithmetic with respect to time and storage - requirements. - Note: Output values which exceed the 32-bit integer storage size + requirements. + Note: Output values which exceed the 32-bit integer storage size are written in hexadecimal format (hex). Such hexadecimal - format can not be reread as input. - + format can not be reread as input. + fctp .ieq .poi Filenames of output files are generated from @@ -312,15 +263,15 @@ Program calls and parameters: c - Generation of new inequalities without the rule of Chernikov. - l - Use a special integer arithmetic + l - Use a special integer arithmetic allowing the integers to have arbitrary lengths. This arithmetic is not as efficient as the system's integer arithmetic with respect to time and storage - requirements. - Note: Output values which exceed the 32-bit integer storage size + requirements. + Note: Output values which exceed the 32-bit integer storage size are written in hexadecimal format (hex). Such hexadecimal - format can not be reread as input. - + format can not be reread as input. + iespo [-v] .ieq .poi v - Table indicating strong validity printed in the output @@ -357,19 +308,15 @@ Program calls and parameters: v - Table indicating strong validity printed in the output file. - l - Use a special integer arithmetic + l - Use a special integer arithmetic allowing the integers to have arbitrary lengths. This arithmetic is not as efficient as the system's integer arithmetic with respect to time and storage - requirements. - Note: Output values which exceed the 32-bit integer storage size + requirements. + Note: Output values which exceed the 32-bit integer storage size are written in hexadecimal format (hex). Such hexadecimal - format can not be reread as input. - - vint .ieq - - Output is written into a file named .poi. - - + format can not be reread as input. + vint .ieq + Output is written into a file named .poi. diff --git a/README.md b/README.md index 8220e77..5405c08 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,41 @@ julia-porta ===== -A version of the [PORTA](http://porta.zib.de/) software intended for cross-platform deployment via [Julia](https://julialang.org/). +A distribution of the [PORTA](http://porta.zib.de/) software intended for cross-platform deployment via [Julia](https://julialang.org/). ## PORTA (POlyhedron Representation Transformation Algorithm) "PORTA is a collection of [C] routines for analyzing polytopes and polyhedra. The polyhedra are either given as the convex hull of a set of points plus (possibly) the convex cone of a set of vectors, or as a system of linear equations and inequalities." -([PORTA](http://porta.zib.de/)). +## Quick Start + +julia-porta compilation follows the typical [CMake](https://cmake.org/) workflow: +```sh +mkdir build # Make a build directory +cd build # Move into the build directory +cmake /path/to/julia-porta # Invoke cmake to generate build files +make -j # Compile, throwing all available processors at it +make install # (Optional) Install in the specified install dir +``` +You may also update your man-pages for the compiled executables, e.g. +```sh + tar tvf man1.tar # Unpack man-page tarball + mv man1/* /usr/local/man/man1 # Move them to user-scope man-path +``` + ## PORTA in Julia -The julia programming language provides utilities for packaging C libraries for cross-platform deployment. The [BinaryBuilder.jl](https://github.com/JuliaPackaging/BinaryBuilder.jl) julia package reliably cross-compiles software to run on supported platforms. The end result is a julia module, `porta_jll`, containing the executables for all supported platforms and the logic to run the correct executable on that platform. +The julia programming language provides utilities for packaging C libraries for cross-platform deployment. The [BinaryBuilder.jl](https://github.com/JuliaPackaging/BinaryBuilder.jl) julia package reliably cross-compiles software to run on supported platforms. The end result is a julia module, `porta_jll`, containing the executables for all supported platforms and the logic to run the correct executable on that platform. + +The following cross-platform build script can be used by BinaryBuilder.jl: + +```sh +cd $WORKSPACE/srcdir +install_license julia-porta/LICENSE +cmake -DCMAKE_INSTALL_PREFIX=$prefix -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN} -DCMAKE_BUILD_TYPE=Release julia-porta/ +make -j +make install +``` # PORTA Documentation @@ -23,7 +49,7 @@ The GNU makefile compiles two executables, `xporta` and `valid`. The compiled bi The compiled `xporta` binary exposes the following methods. See `julia-porta/INFO` and the `man` pages and for more details. -#### `dim` +#### `dim` Compute the dimension of convex hull and convex cone for a set of given points. @@ -91,14 +117,14 @@ Sort inequality or point systems. 1. right hand sides of inequalities or equations 2. frequency of the values -5 .. -1, 1 .. 5 3. lexicographical order - + Additionally portsort formats the output. The output filename arises from the filename of the input file by appending the suffix of the input filename once again. **Options:** -s Appending a statistical part to each line containing the number of nonzero coefficients. - + #### `traf` Transformation of polyhedron representations. @@ -110,14 +136,14 @@ Transformation of polyhedron representations. traf transforms polyhedra between the following two representations: - convex hull of points + convex cone of vectors (poi-representation) - system of linear equations and inequalities (ieq-representation) - + The direction of transformation is determined by the input filename, which ends - either in '.poi' or in '.ieq'. All computations are carried out in rational arithmetic + either in '.poi' or in '.ieq'. All computations are carried out in rational arithmetic to have guaranteed correct numerical results. Rational arithmetic uses only integer operations. A possible arithmetic overflow is recognized. In this case the computations can be restarted with a special arithmetic allowing the integers to have arbitrary length. This arithmetic is not as efficient as the system's integer arithmetic with respect to time and storage requirements. - The computation of the ieq-representation is performed using Gaussian and Fourier-Motzkin + The computation of the ieq-representation is performed using Gaussian and Fourier-Motzkin elimination. In the output file the right hand sides are 0, or determined by the smallest integer value for which the coefficients of the inequality are integral. If this is not possible with system integer arithmetic or if multiple precision integer arithmetic is set, the right @@ -131,7 +157,7 @@ Transformation of polyhedron representations. by applying the 'poi'-to-'ieq' direction to the polar polyhedron. Hint: If you give a valid point or if 0 is valid, then this vector may appear again in the resulting system, even if this vector might be redundant in a minimal description. (All other vectors are non-redundant.) - + **Options:** -p Unbuffered redirection of terminal messages into file filename_'.prt' @@ -166,13 +192,13 @@ Checks inequalities for facet inducing property. fctp checks whether a set of inequalities given in a '.ieq'-file is facet inducing for a polyhedron given by a '.poi'-file. For all inequalities fctp does the following: - + - In a first step fctp checks if the inequality is valid. If this is not the case fctp writes the points and rays which are not valid into a file. - + - In a second step fctp computes those valid points and rays which satisfy the inequality with equality and - if there are any - writes them into a file. - + For these points and rays the dimension is computed by using the routine 'dim'. The filenames result from the '.ieq'-filename by appending first the number of the corresponding inequality and then the suffix '.poi' resp. @@ -194,9 +220,9 @@ Enumeration of equations and inequalities that are valid for a convex cone an **Options:** -v Prints a table in the output file which indicates strong validity. - - - + + + #### `posie` Enumeration of points that are valid for a linear system. @@ -208,7 +234,7 @@ Enumeration of points that are valid for a linear system. posie is a simple enumeration routine which determines the number of the points and direction vectors in the '.poi'-file which are valid for the linear system in the '.ieq'-file. The output is written into a 'poi'-file, whose name is derived from the 'ieq'-input filename. - + #### `vint` Enumeration of integral inner points of a linear system. @@ -218,12 +244,12 @@ Enumeration of integral inner points of a linear system. **Description:** vint enumerates all integral points within given bounds that are valid for a linear system. - In the input file lower and upper bounds for each component must be given. The + In the input file lower and upper bounds for each component must be given. The specific keywords are LOWER_BOUNDS and UPPER_BOUNDS. The line after each keyword contains exactly dim integers. The i-th entry of such a line gives the upper resp. lower bound for the i-th component. vint writes the points found into a file. The filename results from the input filename by replacing the suffix '.ieq' with - + ## General File Format: Files with name suffix `.ieq` contain a representation of a @@ -235,11 +261,11 @@ for both of `.ieq`- and `.poi`-files in having several sections headed by an indicator line with a specific capitalized key- word, the first line stating the dimension as - DIM = + DIM = and the last line containing the keyword - END + END The sections are specific to the `.ieq` and `.poi` polyhedron representations with the exception of comment sections indica- @@ -253,9 +279,9 @@ A 'valid'-section is headed by the keyword VALID -which indicates that the next line specifies a valid point for +which indicates that the next line specifies a valid point for the system of inequalities and equations by `` rational values -in the format +in the format / ... @@ -264,7 +290,7 @@ required by the function `traf` in case 0 is not valid for the system. There is no restriction concerning the order of sections and -some sections are optional. There are sections specific to PORTA +some sections are optional. There are sections specific to PORTA functions, such must be present in an input file for executing the corresponding function. @@ -272,19 +298,19 @@ the corresponding function. ## Format (sections) of `.ieq`-files: #### `INEQUALITIES_SECTION` - -Subsequent lines contain inequalities or equations, one per line, with format - () - +Subsequent lines contain inequalities or equations, one per line, with format + + () + - line number (optional) : +|- ... +|- - : / x{i} , i in {1,...} + : / x{i} , i in {1,...} + + : <= | >= | => | =< | = | == - : <= | >= | => | =< | = | == - : / The values are rational, represented by numerators `` @@ -293,29 +319,29 @@ with value 1 can be omitted. #### `LOWER_BOUNDS` -The next line specifies lower bounds for the components of +The next line specifies lower bounds for the components of the system by `` integer values such that the i-th entry refers to the i-th component. The lower bounds are used by the function `vint` for enumerating integral points. #### `UPPER_BOUNDS` -The next line specifies upper bounds for the components of +The next line specifies upper bounds for the components of the system by `` integer values such that the i-th entry refers to the i-th component. The upper bounds are used by the function `vint` for enumerating integral points. #### `ElIMINATION_ORDER` -The next line specifies a set of variables to be eliminated +The next line specifies a set of variables to be eliminated by the function `fmel` and the order of elimination by `` integer -values. A value 0 as the i-th entry of the line indicates +values. A value 0 as the i-th entry of the line indicates that the i-th variable must not be eliminated, a value j, `0 < j`, `j < `, as the i-th entry of the line indicates that the i-th variable should be eliminated in the j-th iteration. All non-zero -numbers must be different and it must be possible to put +numbers must be different and it must be possible to put into an order 1,2,3,... . - + See file `example.ieq` for `.ieq` format illustration. @@ -323,25 +349,23 @@ See file `example.ieq` for `.ieq` format illustration. #### `CONV_SECTION` -Subsequent lines contain specifications of points, one per -line by rational values, the line format is +Subsequent lines contain specifications of points, one per +line by rational values, the line format is - () / ... / + () / ... / - line number (optional) - i-th numerator - + - i-th denominator, a denominator with value 1 can be omitted -If a `CONV_SECTION` is missing (the case of a cone) the origin +If a `CONV_SECTION` is missing (the case of a cone) the origin is assumed to be feasible. #### `CONE_SECTION` Subsequent lines contains specification of vectors, one per -line, the line format is the same as for points. +line, the line format is the same as for points. See file `example.poi` for `.poi` format illustration. - - diff --git a/gnu-make/Makefile b/gnu-make/Makefile deleted file mode 100644 index e2be548..0000000 --- a/gnu-make/Makefile +++ /dev/null @@ -1,44 +0,0 @@ -# LAST EDIT: Fri Sep 20 15:09:27 2002 by Andreas Loebel (opt0.zib.de) -# $Id: Makefile,v 1.3 2002/09/20 13:09:40 bzfloebe Exp $ - -CFLAGS = -O6 -g -Wall -CC ?= gcc -VPATH = ../src - -LIB_MOD = common arith inout log -valid_MOD = valid $(LIB_MOD) -xporta_MOD = porta four_mot portsort largecalc mp $(LIB_MOD) -ALL_MOD = $(valid_MOD) $(xporta_MOD) - -# `exeext` is the extension, including the dot, of executables. -# These variables are preset in the BinaryBuilder.jl environment. -UNAME := $(shell uname) -ifeq ($(UNAME), Darwin) - exeext ?= -else ifeq ($(UNAME), Windows) - exeext ?= .exe -else - exeext ?= -endif - -VALID_EXE := valid$(exeext) -XPORTA_EXE := xporta$(exeext) - -all: $(XPORTA_EXE) $(VALID_EXE) - -$(VALID_EXE): $(valid_MOD:%=%.d) $(valid_MOD:%=%.o) - $(CC) -o bin/$@ $(valid_MOD:%=%.o) - -$(XPORTA_EXE): $(xporta_MOD:%=%.d) $(xporta_MOD:%=%.o) - $(CC) -o bin/$@ $(xporta_MOD:%=%.o) - - -clean: - rm -f *.o *.d bin/xporta bin/valid - -%.d: %.c - $(SHELL) -ec '$(CC) -MM $(CPPFLAGS) $< \ - | sed '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \ - [ -s $@ ] || rm -f $@' - -include $(ALL_MOD:%=%.d) diff --git a/gnu-make/bin/dim b/gnu-make/bin/dim deleted file mode 100755 index 15f8d02..0000000 --- a/gnu-make/bin/dim +++ /dev/null @@ -1 +0,0 @@ -xporta -D $1 $2 $3 $4 $5 $6 $7 $8 $9 diff --git a/gnu-make/bin/fctp b/gnu-make/bin/fctp deleted file mode 100755 index 6326696..0000000 --- a/gnu-make/bin/fctp +++ /dev/null @@ -1,2 +0,0 @@ -valid -C $1 $2 $3 $4 $5 $6 $7 $8 $9 - diff --git a/gnu-make/bin/fmel b/gnu-make/bin/fmel deleted file mode 100755 index f80ac0c..0000000 --- a/gnu-make/bin/fmel +++ /dev/null @@ -1 +0,0 @@ -xporta -F $1 $2 $3 $4 $5 $6 $7 $8 $9 diff --git a/gnu-make/bin/iespo b/gnu-make/bin/iespo deleted file mode 100755 index 1c18bd6..0000000 --- a/gnu-make/bin/iespo +++ /dev/null @@ -1 +0,0 @@ -valid -I $1 $2 $3 $4 $5 $6 $7 $8 $9 diff --git a/gnu-make/bin/portsort b/gnu-make/bin/portsort deleted file mode 100755 index 3f33bf0..0000000 --- a/gnu-make/bin/portsort +++ /dev/null @@ -1,3 +0,0 @@ -xporta -S $1 $2 $3 $4 $5 $6 $7 $8 $9 - - diff --git a/gnu-make/bin/posie b/gnu-make/bin/posie deleted file mode 100755 index eeeae3e..0000000 --- a/gnu-make/bin/posie +++ /dev/null @@ -1 +0,0 @@ -valid -P $1 $2 $3 $4 $5 $6 $7 $8 $9 diff --git a/gnu-make/bin/traf b/gnu-make/bin/traf deleted file mode 100755 index 22bf088..0000000 --- a/gnu-make/bin/traf +++ /dev/null @@ -1 +0,0 @@ -xporta -T $1 $2 $3 $4 $5 $6 $7 $8 $9 diff --git a/gnu-make/bin/vint b/gnu-make/bin/vint deleted file mode 100755 index 3f52e99..0000000 --- a/gnu-make/bin/vint +++ /dev/null @@ -1 +0,0 @@ -valid -V $1 $2 $3 $4 $5 $6 $7 $8 $9 diff --git a/src/common.c b/src/common.c index b93642a..c3c3091 100644 --- a/src/common.c +++ b/src/common.c @@ -1,20 +1,20 @@ /******************************************************************************* Copyright (C) 1997-2009 Thomas Christof and Andreas Loebel - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + FILENAME: common.c @@ -43,33 +43,33 @@ REVISED BY ANDREAS LOEBEL char* RATallo( RAT *ptr, int nold, int nnew ) -{ +{ int i; char* allo(); - + #define get_len(x) (abs((x)->num) & m0_9) #define m0_9 1023 - if (ptr && MP_realised && nold > nnew) + if (ptr && MP_realised && nold > nnew) /* free space in ptr[i].den.p for i>nold */ - for (i = nold; i < nnew; i++) + for (i = nold; i < nnew; i++) allo(CP ptr[i].den.p,U get_len(ptr+1)*szU,0); - - /* + + /* * Allocate ptr using malloc(), if nnew = 0, * free ptr if nold = 0, * reallocate ptr using realloc(), if nnew != nold != 0 * realloc() copies the old contents of ptr[0..nold] into the new location, * as far as possible. */ - + ptr = RP allo(CP ptr,nold*sizeof(RAT),nnew*sizeof(RAT)); - - for (i = nold; i < nnew; i++) + + for (i = nold; i < nnew; i++) { ptr[i].num = 0; ptr[i].den.i = 1; } - + return(CP ptr); } @@ -90,13 +90,13 @@ char* allo( char *ptr, unsigned oldsize, unsigned newsize ) * But not every ptr allocated with allo() is freed with allo(), * so total_size is too high. */ -{ +{ if( newsize == 0 && oldsize == 0 ) return( ptr ); - - if (newsize == 0 && ptr) + + if (newsize == 0 && ptr) { - if (oldsize > 0) + if (oldsize > 0) { free(CP ptr); ptr = 0; @@ -104,24 +104,24 @@ char* allo( char *ptr, unsigned oldsize, unsigned newsize ) total_size -= oldsize; return (CP 0); } - - if (ptr == 0 || oldsize == 0) - { + + if (ptr == 0 || oldsize == 0) + { /* change malloc to calloc, because some allocated bytes are somewere unitialized read, but they are assumed to be zero. if ((ptr = (char *) malloc(newsize)) == 0) */ if ((ptr = (char *) calloc(newsize,1)) == 0) - msg( "allocation of new space failed", "", 0 ); + msg( "allocation of new space failed", "", 0 ); total_size += newsize; return(ptr); } - - if (oldsize != newsize && (ptr = (char *) realloc(ptr,newsize)) == 0) - msg( "reallocation of space failed", "", 0 ); + + if (oldsize != newsize && (ptr = (char *) realloc(ptr,newsize)) == 0) + msg( "reallocation of space failed", "", 0 ); total_size += newsize-oldsize; - + return(ptr); } @@ -138,24 +138,24 @@ listp *porta_list; void allo_list( int new, unsigned **markp, int blocks ) { int i,ms; - - if (new == maxlist) + + if (new == maxlist) { maxlist += INCR_LIST; porta_list = (listp *) allo(CP porta_list,1,U maxlist*sizeof(listp)); for (i = new; i < maxlist; i++) porta_list[i] = 0; } - if (porta_list[new] == 0) - { + if (porta_list[new] == 0) + { porta_list[new] = (struct list *) allo(CP 0,0,U sizeof(struct list)); porta_list[new]->mark = 0; } if (markp) { - if ( porta_list[new]->mark == 0) + if ( porta_list[new]->mark == 0) { - *markp = porta_list[new]->mark = (unsigned *) + *markp = porta_list[new]->mark = (unsigned *) allo(CP 0,0,U (ms = blocks*sizeof(unsigned))); for (i = 0; i < blocks; i++) porta_list[new]->mark[i] = 0; @@ -177,8 +177,8 @@ void listptoar( RAT *ar, int rows, int rowl, int blocks ) int i; unsigned j = 0; RAT *arp; - - for (i = 0,arp = ar; i < rows; i++,arp += rowl) + + for (i = 0,arp = ar; i < rows; i++,arp += rowl) { allo_list(i,(unsigned **)&j,blocks); porta_list[i]->sys = arp; @@ -199,10 +199,10 @@ void listptoar( RAT *ar, int rows, int rowl, int blocks ) void get_options( int *argc, char **argv[] ) { char *s; - + while (--(*argc)>0 && (*++*argv)[0] == '-') for (s = *argv[0]+1; *s != '\0'; s++) - switch(*s) + switch(*s) { case 'l' : option |= Long_arithmetic; break; @@ -213,36 +213,36 @@ void get_options( int *argc, char **argv[] ) case 'v' : option |= Validity_table_out; break; case 'c' : option |= Chernikov_rule_off; - break; + break; case 'o' : option |= Opt_elim; - break; + break; case 'D' : option |= Dim; allowed_options = Dim|Protocol_to_file|Long_arithmetic; - break; + break; case 'F' : option |= Fmel; allowed_options = Fmel|Chernikov_rule_off|Protocol_to_file|Long_arithmetic; - break; + break; case 'S' : option |= Sort; allowed_options = Sort|Statistic_of_coefficients; - break; + break; case 'T' : option |= Traf; allowed_options = Traf| Chernikov_rule_off|Validity_table_out| Redundance_check|Statistic_of_coefficients| Protocol_to_file|Opt_elim|Long_arithmetic; - break; + break; case 'C' : option |= Cfctp; allowed_options = Cfctp; - break; + break; case 'P' : option |= Posie; allowed_options = Posie; - break; + break; case 'I' : option |= Iespo; allowed_options = Iespo|Validity_table_out; - break; + break; case 'V' : option |= Vint; allowed_options = Vint; - break; + break; default : msg( "invalid command line", "", 0 ); break; } @@ -266,7 +266,7 @@ void initialize() cone = conv = equa = ineq = points = blocks = option = nel_ar6 = nel_ar5 = nel_ar4 = nel_ar2 = nel_ar3 = nel_ar1 = 0; ar6 = ar5 = ar4 = ar2 = ar3 = ar1 = 0; - + RAT_const[0].num = 0; RAT_const[1].num = RAT_const[1].den.i = RAT_const[0].den.i = 1; } @@ -278,15 +278,15 @@ void initialize() void set_I_functions() -{ +{ RAT_add = I_RAT_add; RAT_sub = I_RAT_sub; RAT_mul = I_RAT_mul; RAT_assign = I_RAT_assign; RAT_row_prim = I_RAT_row_prim; writeline = (void (*)())I_RAT_writeline; - -} + +} @@ -295,17 +295,16 @@ void set_I_functions() -int comp; int num_den_comp( RAT *a, RAT *b ) -{ +{ if ((a+comp)->num == (b+comp)->num) return((a+comp)->den.i - (b+comp)->den.i); else return((a+comp)->num - (b+comp)->num); -} +} @@ -316,17 +315,17 @@ int num_den_comp( RAT *a, RAT *b ) void sort_eqie_cvce( RAT *ar, int nrows, int rowlen, int *neqcv, int *niece ) /*****************************************************************/ /* - * Sort the "nrow" inequalities and equations in ar, + * Sort the "nrow" inequalities and equations in ar, * so that equations come first. - * For i = 1,...,nrow-1, + * For i = 1,...,nrow-1, * ar[i-1][rowlen-1] contains 0 (for equation), 1 (for inequality). * Output: - * neqcv is the number of equations, + * neqcv is the number of equations, * niece the number of inequalities. */ { int i,equa; - + /* ar[i][rowlen-1] contains 0 (for equation), 1 (for inequality). */ for (i = 1; i <= nrows; i++) @@ -339,7 +338,7 @@ void sort_eqie_cvce( RAT *ar, int nrows, int rowlen, int *neqcv, int *niece ) *neqcv = equa; *niece = nrows - equa; for (i = 1; i <= nrows; i++) - (ar+i*rowlen-1)->den.i = 1; + (ar+i*rowlen-1)->den.i = 1; } diff --git a/src/four_mot.c b/src/four_mot.c index 996cac8..163b500 100644 --- a/src/four_mot.c +++ b/src/four_mot.c @@ -1,20 +1,20 @@ /******************************************************************************* Copyright (C) 1997-2009 Thomas Christof and Andreas Loebel - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + FILENAME: four_mot.c @@ -45,7 +45,6 @@ REVISED BY ANDREAS LOEBEL #define INCR_CMB 100000 #define MAX_EL_CMB 5000000 -int blocks; /* set in fourier_motzkin, used in red_test */ int itr, totalineq = 0; @@ -101,11 +100,11 @@ void print_head_line() -void gauss( int traf, int sysrow, int eqrl, int dim, int equa_in, +void gauss( int traf, int sysrow, int eqrl, int dim, int equa_in, int *ineq, int *equa, int indx[] ) /*****************************************************************/ /* - * Perform Gauss-Elimination + * Perform Gauss-Elimination * in a system Py+Qx = b * Fx <= f * -y <= 0 @@ -117,20 +116,20 @@ void gauss( int traf, int sysrow, int eqrl, int dim, int equa_in, * Unchanged inequalities -y <= 0 are not output!! * * Description of input: - * The equations Py+Qx = b and Fx <= f are stored rowwise in matrix "ar2", - * first the coeff of y-variables, then of x-variables, + * The equations Py+Qx = b and Fx <= f are stored rowwise in matrix "ar2", + * first the coeff of y-variables, then of x-variables, * then the right-hand side. * Equations come in front of inequalities. * Each row i is also accessible via porta_list[i]->sys. * The inequalities -y <= 0 are not part of the input, * they are treated implicitly. - * Dimensions: + * Dimensions: * # rows of P = equa_in, # rows of F = ineq_in-equa_in, * # y-variables = sysrow-dim-1, # x-variables = dim. * indx[] is an array of variable names (parallel to the columns of ar2). - * y have negative names starting with -1, + * y have negative names starting with -1, * x have nonnegative names starting with 0. - * "ar2" should be able to contain "dim+1" more rows of length + * "ar2" should be able to contain "dim+1" more rows of length * "sysrow", for temporary storage. * "traf" = 1 means that there are -y <= 0 inequalities, * otherwise "traf" = 0. @@ -145,13 +144,13 @@ void gauss( int traf, int sysrow, int eqrl, int dim, int equa_in, * "ineq_in" = "dim+1", if "conv" = "points" (i.e. last equation deleted) * = "dim", otherwise. * The 0-columns belonging to the eliminated y-variables are deleted in "ar2", - * so "ar2"s row length is (together with the right-hand side column) + * so "ar2"s row length is (together with the right-hand side column) * sysrow-equa_in. * The rows of "ar2" are also accessible via porta_list[i]->sys * for i = 0,...,ineq_in-equa-1. * "ineq" is not changed, if traf=1. */ -{ +{ int col,row,pivcol; int i,j, ineq_in; RAT *sptr,*pivot; @@ -173,27 +172,27 @@ void gauss( int traf, int sysrow, int eqrl, int dim, int equa_in, strcpy( hest1, "# equa" ); strcpy( hest2, " " ); strcpy( hest3, " " ); - + print_head_line(); - + /* GAUSS - ELIMINATION */ ineq_in = *ineq; /* reduced by one for each pivot on a y-variable */ - - for (itr = equa_in; itr != 0; itr--) + + for (itr = equa_in; itr != 0; itr--) { pivot = porta_list[0]->sys; for(pivcol=0; !pivot->num && pivcol < sysrow-1; pivcol++,pivot++); /* If pivcol == sysrow-1, the equation in the first row is 0x = ? */ - if (pivcol == sysrow - 1) + if (pivcol == sysrow - 1) { - if (pivot->num) + if (pivot->num) msg( "Inconsistent system", "", 0 ); else msg( "%sThe %i. equation is redundant", "", equa_in-itr+1); } - if (indx[pivcol] >= 0) - { + if (indx[pivcol] >= 0) + { /* Equality for the finite system found */ /* Store it in ar4 */ nel_ar4 += eqrl; @@ -201,16 +200,16 @@ void gauss( int traf, int sysrow, int eqrl, int dim, int equa_in, sptr = ar4+(*equa)*eqrl; col = sysrow-dim-1+*equa; - for (i = 0; i < dim-*equa; i++) + for (i = 0; i < dim-*equa; i++) (*RAT_assign)(sptr+indx[col+i],ar2+col+i); - for (; i < dim; i++) - { + for (; i < dim; i++) + { (*RAT_assign)((sptr+indx[col+i]),RAT_const); } (*RAT_assign)(sptr+eqrl-1,ar2+sysrow-1); - + (*RAT_row_prim)(sptr,sptr,sptr+eqrl-1,eqrl); - + fprintf( prt, " variable %d eliminated - finite equation found\n", indx[pivcol]+1); @@ -219,86 +218,86 @@ void gauss( int traf, int sysrow, int eqrl, int dim, int equa_in, porta_log( " variable %d eliminated - finite equation found\n", indx[pivcol]+1 ); } - /* + /* * For row = 1,..,ineq_in-equa-1, * eliminate variable pivcol in porta_list[row]->sys by adding porta_list[0]->sys, * store the result in porta_list[ineq+row-1]->sys. * The pivot variable is removed and porta_list[ineq+row-1]->sys * shortened by 1. */ - for (row = 1; row < ineq_in-*equa; row++) + for (row = 1; row < ineq_in-*equa; row++) { gauss_calcnewrow(porta_list[0]->sys,porta_list[row]->sys,pivcol, porta_list[(*ineq)+row-1]->sys,1,sysrow); } - if (indx[pivcol] < 0 && traf) - { - /* + if (indx[pivcol] < 0 && traf) + { + /* * Create a new inequality in porta_list[*ineq+ineq_in-equa-1]->sys, * by "adding" the pivot row to the (implied) inequality -y <= 0. * The pivot element is removed. */ - for (col = 0,i = 0; col < sysrow; col++) - if (col != pivcol) + for (col = 0,i = 0; col < sysrow; col++) + if (col != pivcol) { (*RAT_assign)(porta_list[*ineq + ineq_in-*equa-1]->sys+i, porta_list[0]->sys+col); i++; } if (pivot->num < 0) - for (col = 0,i = 0; col < sysrow; col++) + for (col = 0,i = 0; col < sysrow; col++) (porta_list[*ineq + ineq_in-*equa-1]->sys+col)->num *= -1; } - + /* Rows in "ar2" are now 1 element shorter */ (sysrow)--; - + if (indx[pivcol] >= 0) (*equa)++; - else + else { if (!traf) ineq_in--; } - - /* + + /* * Copy porta_list[*ineq]->sys, ..., porta_list[*ineq + ineq_in-equa-1]->sys back * to porta_list[0]->sys, ..., porta_list[ineq_in-equa-1]->sys. */ sptr = ar2; - for (row = 1; row <= ineq_in-*equa; row++) + for (row = 1; row <= ineq_in-*equa; row++) { (*RAT_row_prim)(porta_list[*ineq+row-1]->sys,sptr, porta_list[*ineq+row-1]->sys+sysrow-1,sysrow); porta_list[row-1]->sys = sptr; sptr += sysrow; } - for (row = ineq_in-*equa; row <= 2*(*ineq)-1; row++) + for (row = ineq_in-*equa; row <= 2*(*ineq)-1; row++) { porta_list[row]->sys = sptr; sptr += sysrow; } - - for (sptr=ar2, j=sysrow*(ineq_in-*equa), i=nz=ld = 0; + + for (sptr=ar2, j=sysrow*(ineq_in-*equa), i=nz=ld = 0; i < sysrow*(ineq_in-*equa); i++,sptr++) size_info(sptr,&nz,&ld); - + /* Update indx */ i = indx[pivcol]; for (col = pivcol; col <= sysrow-2+*equa; col++) indx[col] = indx[col+1]; - if (i>=0) + if (i>=0) indx[sysrow-2+*equa] = i; - + #if defined WIN32 fprintf(prt, "|%6i |%11i |%9i |%5i |%4c |%7.2f |%8i |%10.2f |\n", itr, itr, ineq_in-itr+1, ld,MP_realised?'y':'n', (float)nz/(float)j, total_size/1000, total_time()); - + /* 17.01.1994: include logging on file porta.log */ porta_log( "|%6i |%11i |%9i |%5i |%4c |%7.2f |%8i |%10.2f |\n", itr, itr, ineq_in-itr+1, ld,MP_realised?'y':'n', @@ -311,7 +310,7 @@ void gauss( int traf, int sysrow, int eqrl, int dim, int equa_in, itr, itr, ineq_in-itr+1, ld,MP_realised?'y':'n', (float)nz/(float)j, total_size/1000, time_used(), total_time()); - + /* 17.01.1994: include logging on file porta.log */ porta_log( "|%6i |%11i |%9i |%5i |%4c |%7.2f |%8i |%10.2f |%10.2f |\n", itr, itr, ineq_in-itr+1, ld,MP_realised?'y':'n', @@ -331,7 +330,7 @@ void gauss( int traf, int sysrow, int eqrl, int dim, int equa_in, -void fourier_motzkin( char fname[], int nieq, int rowl, int niterat, +void fourier_motzkin( char fname[], int nieq, int rowl, int niterat, int poi_file, int indx[], int *elim_ord ) /*****************************************************************/ /* @@ -350,10 +349,10 @@ void fourier_motzkin( char fname[], int nieq, int rowl, int niterat, * (This heuristic is not available, if the elimination order is given * beforehand in elim_ord) * "indx" is only used if "Opt_elim" is set. - * + * * This procedure is called either from a "traf" application, * or from an "fmel" application. - * The first case is recognized by elim_ord = 0, + * The first case is recognized by elim_ord = 0, * the second by the existence of an array elim_ord. * elim_ord (if existent) is an array of length "rowl". * For 1<=i<=niterat, elim_ord[i-1] gives the column of "ar2" @@ -369,9 +368,9 @@ void fourier_motzkin( char fname[], int nieq, int rowl, int niterat, * to be eliminated. * These inequalities are treated implicitly by the algorithm. */ -{ +{ struct list *iep; - int elcol,col = 0,maxnumineq = 0; + int elcol,col = 0,maxnumineq = 0; int sysrow,i,j,pos,zer,neg,new,p,n,nn,s=1,minineq = 0, nel_xxx; RAT *sptr,*sysp,*iesp,*ar3bd,*xxx,sw; unsigned *newmark,nmark; @@ -379,18 +378,18 @@ void fourier_motzkin( char fname[], int nieq, int rowl, int niterat, register unsigned *nmp,*lnm,*o1mp,*o2mp; FILE *fie; int *cmb,*bdcmb,*cmbp; - + /* FOURIER - MOTZKIN - ELIMINATION */ - + fprintf(prt,"\nFOURIER - MOTZKIN - ELIMINATION:\n"); /* 17.01.1994: include logging on file porta.log */ porta_log( "\nFOURIER - MOTZKIN - ELIMINATION:\n"); - if (!MP_realised && is_set(Opt_elim)) + if (!MP_realised && is_set(Opt_elim)) { - if (poi_file) + if (poi_file) { fprintf(prt,"\nstoring finite inequalities in file %s\n\n",fname); @@ -407,14 +406,14 @@ void fourier_motzkin( char fname[], int nieq, int rowl, int niterat, strcpy(hest2," bound"); strcpy(hest3,"# ineq"); print_head_line(); - - + + /* transponation of the inequalities */ - + ar2 = (RAT *) RATallo(CP ar2,nel_ar2,U 2*nieq*rowl); sptr = ar2+nieq*rowl; - /* + /* * Store the transpose of matrix ar2 to location "sptr", * then copy matrix "sptr" to location "ar2". */ @@ -426,11 +425,11 @@ void fourier_motzkin( char fname[], int nieq, int rowl, int niterat, (*RAT_assign)(ar2+i,sptr++); ar2 = (RAT *) RATallo(CP ar2,U 2*nieq*rowl,U nieq*rowl); nel_ar2 = nieq*rowl; - + sysrow = nieq+1; - + /* - * Reserve space for rowl-niterat rationals and + * Reserve space for rowl-niterat rationals and * for the nieq vectors porta_list[]->sys of length nieq+1, */ /* @@ -442,23 +441,23 @@ void fourier_motzkin( char fname[], int nieq, int rowl, int niterat, nel_ar3 = (FIRST_SYS_EL+(nieq+1)*nieq); ar3 = (RAT *) RATallo(CP ar3,0,U nel_ar3); ar3bd = ar3+nel_ar3-1; - + sysp = ar3+rowl-niterat; /* first not reserved element */ - - /* + + /* * The reserved elements are used for intermediate storage * at the end of this subroutine. */ - + /* initialization */ sptr = sysp; - ineq = nieq; - /* + ineq = nieq; + /* * "ineq" is the number of Fourier-Motzkin inequalities in each iteration, * "nieq" is the number of original inequalities. */ blocks = ((elim_ord)?nieq:points)/32 + 1 + 1; - /* + /* * Each Fourier-Motzkin inequality is a certain nonnegative combination * of the original inequalities (stored in "ar2"). * For each Fourier-Motzkin inequality i, @@ -470,12 +469,12 @@ void fourier_motzkin( char fname[], int nieq, int rowl, int niterat, * newmark[1] is the beginning of a unit vector (in bits), * and newmark[0] is the number of 1-bits in this vector. */ - for (i = 0; i < nieq; i++) + for (i = 0; i < nieq; i++) { allo_list(i,&newmark,blocks); porta_list[i]->sys = sptr; sptr++; - for (j = 0; j < nieq; j++,sptr++) + for (j = 0; j < nieq; j++,sptr++) if (i == j) (*RAT_assign)(sptr,RAT_const+1); /* RAT_const[1] = 1/1 */ else @@ -487,75 +486,75 @@ void fourier_motzkin( char fname[], int nieq, int rowl, int niterat, newmark[i/32+1] <<= i%32; /* shift the one (i mod 32) positions to left, * that is, set newmark[] := 2 power(i mod 32)*/ } - - for (itr = niterat; itr > 0; itr--) + + for (itr = niterat; itr > 0; itr--) { /* elimination column of inequality-system */ - /* + /* * "elcol" is the variable to be deleted, * which is a row in the transposed matrix "ar2". * "iesp" points to the beginning of that row. */ iesp = ar2+nieq*(elcol = ((elim_ord)?elim_ord[niterat-itr]:niterat-itr)); - - if (!elim_ord && is_set(Opt_elim) && !MP_realised) + + if (!elim_ord && is_set(Opt_elim) && !MP_realised) { /* minimal ineq heuristic */ - - for (i = 0; i < ineq; i++) + + for (i = 0; i < ineq; i++) porta_list[i]->ptr = 0; - + allo_list(ineq,&newmark,blocks); lnm = newmark+blocks; nf_dstf = 0; - + cmbp = cmb = (int *) malloc(INCR_CMB*sizeof(int)); bdcmb = cmb+INCR_CMB-3; nel_cmb = INCR_CMB; - - for (p = 0; p < ineq; p++, *cmbp++ = 0) - for(n = p+1; n != ineq; n++) - { + + for (p = 0; p < ineq; p++, *cmbp++ = 0) + for(n = p+1; n != ineq; n++) + { o1mp = porta_list[p]->mark+1; o2mp = porta_list[n]->mark+1; *newmark = 0; - for (nmp = newmark+1; nmp != lnm; nmp++,o1mp++,o2mp++) + for (nmp = newmark+1; nmp != lnm; nmp++,o1mp++,o2mp++) { nmark = *nmp = (*o1mp) | (*o2mp); - for (; nmark != 0; nmark = nmark & (nmark-1)) + for (; nmark != 0; nmark = nmark & (nmark-1)) (*newmark)++; } - if (*newmark <= s+1) + if (*newmark <= s+1) { *cmbp++ = n; - if (cmbp >= bdcmb) + if (cmbp >= bdcmb) { if (nel_cmb+INCR_CMB > MAX_EL_CMB) /* no sence */ - goto break_opt_elim; + goto break_opt_elim; pos = cmbp - cmb; if(!(cmb = (int *) realloc(CP cmb,(INCR_CMB+nel_cmb)*sizeof(int)))) - goto break_opt_elim; + goto break_opt_elim; nel_cmb += INCR_CMB; bdcmb = cmb+nel_cmb-3; cmbp = cmb + pos; } } - } - - new = minineq = cmbp-cmb; - - for (j = itr; j; j--) + } + + new = minineq = cmbp-cmb; + + for (j = itr; j; j--) { /* test all possible elimination columns */ new = 0; - for (i = 0; i < ineq; i++) + for (i = 0; i < ineq; i++) { vecpr(iesp, porta_list[i]->sys+1, porta_list[i]->sys, nieq); if (porta_list[i]->sys[0].num < 0) (porta_list[i]->ptr)++; } - - for (cmbp = cmb, p = 0; p < ineq-1; p++, cmbp++) + + for (cmbp = cmb, p = 0; p < ineq-1; p++, cmbp++) { neg = (porta_list[p]->sys[0].num < 0); pos = (porta_list[p]->sys[0].num > 0); @@ -563,35 +562,35 @@ void fourier_motzkin( char fname[], int nieq, int rowl, int niterat, if ((pos && porta_list[*cmbp]->sys[0].num < 0) || (neg && porta_list[*cmbp]->sys[0].num > 0) ) new++; } - if (new < minineq) + if (new < minineq) { minineq = new; col = niterat-j; /* best column */ } iesp += nieq; } /* for j */ - - for (i = nieq*elcol, j = nieq*col, nn = 0; nn < nieq; i++,j++,nn++) + + for (i = nieq*elcol, j = nieq*col, nn = 0; nn < nieq; i++,j++,nn++) { - sw = ar2[i]; ar2[i] = ar2[j]; ar2[j] = sw; + sw = ar2[i]; ar2[i] = ar2[j]; ar2[j] = sw; } iesp = ar2+nieq*elcol; - + neg = 9999999; - for (nn = i = 0; i < ineq; i++) + for (nn = i = 0; i < ineq; i++) { - if (!(long) (porta_list[i]->ptr)) + if (!(long) (porta_list[i]->ptr)) nn++; else if ((long) (porta_list[i]->ptr) < neg) neg = (long) (porta_list[i]->ptr)/(sizeof(RAT)); } - if ((nf_dstf = nn) > finie) + if ((nf_dstf = nn) > finie) { - if (poi_file) + if (poi_file) { fie = fopen (fname,"a"); - for (i = ineq-1; nn > finie; i--) - if (!(long)(porta_list[i]->ptr)) + for (i = ineq-1; nn > finie; i--) + if (!(long)(porta_list[i]->ptr)) { for (j = 0; j < rowl-niterat; j++) vecpr(ar2+nieq*(j+niterat), porta_list[i]->sys+1, ar3+j, nieq); @@ -602,41 +601,41 @@ void fourier_motzkin( char fname[], int nieq, int rowl, int niterat, fprintf(fie,"\n"); nn--; fflush(fie); - } + } fclose(fie); } finie = nf_dstf; } else if (ineq == finie) nf_dstf = ineq; - else + else nf_dstf = -neg; - + break_opt_elim : ; free(CP cmb); } /* end of the "minimal ineq heuristic" */ - /* - * Compute the product of vectors "iesp" and porta_list[i]->sys[1] + /* + * Compute the product of vectors "iesp" and porta_list[i]->sys[1] * in porta_list[i]->sys[0]. - * This product is the coefficient of variable "elcol" (or "iesp") in + * This product is the coefficient of variable "elcol" (or "iesp") in * the i-th Fourier-Motzkin inequality. */ for (i = 0; i < ineq; i++) vecpr(iesp, porta_list[i]->sys+1, porta_list[i]->sys, nieq); - + /* sptr points to the first unused element in array "ar3" */ /* * Change by M.S. 4.6.92: * ineq may be 0. - sptr = porta_list[ineq-1]->sys+sysrow; - */ + sptr = porta_list[ineq-1]->sys+sysrow; + */ if (ineq) - sptr = porta_list[ineq-1]->sys+sysrow; + sptr = porta_list[ineq-1]->sys+sysrow; else sptr = ar3; - - /* + + /* * Sort "list" over the signum of the elimination variable, * first the positive, then the zero, then the negative coefficients. * It is important for later that porta_list[i]->sys < porta_list[j]->sys @@ -644,24 +643,24 @@ void fourier_motzkin( char fname[], int nieq, int rowl, int niterat, */ pos = 0; for(i = 0 ; i < ineq ; i++) - if ((porta_list[i]->sys)->num > 0) + if ((porta_list[i]->sys)->num > 0) { /* rotate contents of porta_list[pos,...,i] to the right */ iep = porta_list[i]; - for (j = i; j > pos; j--) + for (j = i; j > pos; j--) porta_list[j] = porta_list[j-1] ; porta_list[pos++] = iep; } - + zer = pos; for(i = zer ; i < ineq ; i++) if ( !(porta_list[i]->sys->num) ) { iep = porta_list[i]; - for (j = i; j > zer; j--) + for (j = i; j > zer; j--) porta_list[j] = porta_list[j-1] ; porta_list[zer++] = iep; } - + /* first indx */ /* 0 <= zer <= neg <= new, * zer is the number of positive coefficients, @@ -671,12 +670,12 @@ void fourier_motzkin( char fname[], int nieq, int rowl, int niterat, neg = zer; zer = pos; new = ineq; - + allo_list(new,&newmark,blocks); lnm = newmark+blocks; - - /* - * If there are positive and negative coeff's, + + /* + * If there are positive and negative coeff's, * then new inequalities are generated (increase s, starting from s=1). * In the case that elim_ord is 0 * (i.e. fourier_motzkin() was called by "traf"), @@ -685,9 +684,9 @@ void fourier_motzkin( char fname[], int nieq, int rowl, int niterat, */ if (zer > 0 && (elim_ord?(neg != ineq):1)) s++; - - /* - * Print the number of iterations + + /* + * Print the number of iterations * and the upper bound on the number of inequalities. * nf_dstf is always 0, if the minimal ineq. heuristic is not used. * If elim_ord is 0, i.e., if this subroutine is called by "traf", @@ -698,23 +697,23 @@ void fourier_motzkin( char fname[], int nieq, int rowl, int niterat, if (nf_dstf) { fprintf(prt,"|%6i |%11i ",itr,minineq+ineq); - + /* 17.01.1994: include logging on file porta.log */ porta_log( "|%6i |%11i ",itr,minineq+ineq); } else { fprintf(prt,"|%6i |%11i ",itr,(elim_ord?(neg-zer):neg)+zer*(ineq-neg)); - + /* 17.01.1994: include logging on file porta.log */ porta_log( "|%6i |%11i ",itr,(elim_ord?(neg-zer):neg)+zer*(ineq-neg)); } - + /* 17.01.1994: include logging on file porta.log */ fflush(logfile); - - fflush(prt); - + + fflush(prt); + /* * Normalize the inequality by multiplying it with a positive constant, * such that the variable to be eliminated has coefficient +1, 0, or -1. @@ -723,120 +722,120 @@ void fourier_motzkin( char fname[], int nieq, int rowl, int niterat, (*RAT_row_prim)(porta_list[p]->sys,porta_list[p]->sys,porta_list[p]->sys,sysrow); for (p = neg; p != ineq; p++) (*RAT_row_prim)(porta_list[p]->sys,porta_list[p]->sys,porta_list[p]->sys,sysrow); - - + + /* new inequalities generation */ - /* + /* * If a new inequality is generated from an inequality "p" and an ineq. "n" * then porta_list[new]->sys is porta_list[p]->sys * and porta_list[new]->ptr is porta_list[n]->sys */ - if (option & Chernikov_rule_off) - - for (p = 0; p != zer; p++) - for(n = neg; n != ineq; n++) + if (option & Chernikov_rule_off) + + for (p = 0; p != zer; p++) + for(n = neg; n != ineq; n++) { allo_list(new,&newmark,blocks); porta_list[new]->sys = porta_list[p]->sys; porta_list[new]->ptr = porta_list[n]->sys; - new++; + new++; } - else + else { /* for all inequalities with positive coefficients */ - for (p = 0; p != zer; p++) - + for (p = 0; p != zer; p++) + /* for all inequalities with negative coefficients */ - for(n = neg; n != ineq; n++) + for(n = neg; n != ineq; n++) { o1mp = porta_list[p]->mark+1; o2mp = porta_list[n]->mark+1; - - /* + + /* * "Or" both mark-vectors into newmark[1]. * newmark[0] counts the number of 1's in this vector. * (nmark & (nmark-1)) sets the lowest 1-bit in nmark to 0. */ *newmark = 0; - for (nmp = newmark+1; nmp != lnm; nmp++,o1mp++,o2mp++) + for (nmp = newmark+1; nmp != lnm; nmp++,o1mp++,o2mp++) { nmark = *nmp = (*o1mp) | (*o2mp); - for (; nmark != 0; nmark = nmark & (nmark-1)) + for (; nmark != 0; nmark = nmark & (nmark-1)) (*newmark)++; } - /* + /* * First Chernikov-rule: * If the number of 1's in newmark exceeds the number of iterations+1, * the inequality is redundant. * (Here "iterations" counts only those iterations, * where there existed positive and negative coefficients.) */ - if (*newmark > s) + if (*newmark > s) { goto gennextie; - } - - /* + } + + /* * Test newmark versus all inequalities with zero coefficients, * whose mark-vector contains at most as many 1's as newmark[1]. * Second Chernikov-rule: - * If the set "newmark" contains the set "mark" of any other + * If the set "newmark" contains the set "mark" of any other * inequality in this iteration, * then the new inequality is redundant. */ - for (nn = zer; nn != neg; nn++ ) + for (nn = zer; nn != neg; nn++ ) { - o1mp = porta_list[nn]->mark; + o1mp = porta_list[nn]->mark; nmp = newmark; - - if (*o1mp++ <= *nmp++) - { - - for (; nmp != lnm; nmp++,o1mp++) + + if (*o1mp++ <= *nmp++) + { + + for (; nmp != lnm; nmp++,o1mp++) /* if set "o1mp" <= set "nmp" */ if ( (~(*nmp)) & *o1mp ) goto contin_nro; - + /* "new inequality" redundant versus old ineq. */ goto gennextie; } - + contin_nro : ; } - /* - * Test "newmark" + /* + * Test "newmark" * versus all inequalities generated in this iteration */ - for (nn = ineq; nn != new; nn++) + for (nn = ineq; nn != new; nn++) { - + nmp = newmark; o1mp = o2mp = porta_list[nn]->mark; - - if (*o1mp++ <= *nmp++) + + if (*o1mp++ <= *nmp++) { - - for (; nmp != lnm; nmp++,o1mp++) - if ( (~ (*nmp)) & *o1mp ) + + for (; nmp != lnm; nmp++,o1mp++) + if ( (~ (*nmp)) & *o1mp ) goto contin_nron; /* "new inequality" redundant versus old "new inequality" */ - + goto gennextie; contin_nron : ; } nmp = newmark; o1mp = o2mp; - - if (*o1mp++ >= *nmp++) + + if (*o1mp++ >= *nmp++) { - - for (; nmp != lnm; nmp++,o1mp++) - if (*nmp & ~ (*o1mp) ) + + for (; nmp != lnm; nmp++,o1mp++) + if (*nmp & ~ (*o1mp) ) goto contin_onrn; - - /* + + /* * Old "new inequality" redundant * * Inequality "nn" is removed by renaming "nn" with "new-1", @@ -845,7 +844,7 @@ void fourier_motzkin( char fname[], int nieq, int rowl, int niterat, * is remembered now in porta_list[new]. * allo_list(new,&newmark,blocks) will not allocate any * new space for porta_list[new], nor for porta_list[new]->mark. - * The space pointed to by porta_list[new]->sys will be lost, + * The space pointed to by porta_list[new]->sys will be lost, * but that does not matter, since "ar3" will be reorganized * at the end of this iteration. */ @@ -854,7 +853,7 @@ void fourier_motzkin( char fname[], int nieq, int rowl, int niterat, porta_list[new-1] = porta_list[new]; porta_list[new] = iep; new--; - nn--; + nn--; contin_onrn : ; } } @@ -862,24 +861,24 @@ void fourier_motzkin( char fname[], int nieq, int rowl, int niterat, porta_list[new]->mark = newmark; porta_list[new]->sys = porta_list[p]->sys; porta_list[new]->ptr = porta_list[n]->sys; - + new++; - + allo_list(new,&newmark,blocks); lnm = newmark+blocks; - + gennextie : ; } /* for all inequalities with negative coefficients * and all with negative coefficients */ } /* if the Chernikov-rules were used */ - + /* numerical phase */ - for (i = ineq; i != new; i++) + for (i = ineq; i != new; i++) { - if (sptr+sysrow > ar3bd) + if (sptr+sysrow > ar3bd) { - /* - * Make array a3 larger, + /* + * Make array a3 larger, * and recompute porta_list[]->sys, porta_list[]->ptr, sptr, ar3bd and sysp. */ reallocate(new, &sptr); @@ -901,19 +900,19 @@ void fourier_motzkin( char fname[], int nieq, int rowl, int niterat, * Recall that one of them has coeff. +1, the other coeff. -1, * for the elimination variable. */ - row_add(porta_list[i]->sys+1,porta_list[i]->ptr+1,sptr+1,sysrow-1); + row_add(porta_list[i]->sys+1,porta_list[i]->ptr+1,sptr+1,sysrow-1); porta_list[i]->sys = sptr; - sptr = sptr+sysrow; + sptr = sptr+sysrow; } - + /* reordering of sys */ sptr = sysp; nmark = (zer != 0 && neg != ineq) ? 1 : 0; /* nmark is not used for elim_ord != 0. */ nmark <<= ((points-itr) % 32); pos = zer; - - if (elim_ord) + + if (elim_ord) { /* * Move the 0-inequalities to the front of porta_list[]. @@ -925,36 +924,36 @@ void fourier_motzkin( char fname[], int nieq, int rowl, int niterat, * porta_list[j]->sys[0] is not up to date after this operation, * but it will be recomputed in the next iteration. */ - for (j = 0,i = zer; i < neg; j++, i++ ) - { + for (j = 0,i = zer; i < neg; j++, i++ ) + { /* save 0 ieqs */ - sptr++; + sptr++; iep = porta_list[j]; porta_list[j] = porta_list[i]; porta_list[i] = iep; - for (col = 1; col <= nieq; col++,sptr++) + for (col = 1; col <= nieq; col++,sptr++) (*RAT_assign)(sptr,porta_list[j]->sys+col); porta_list[j]->sys = sptr - sysrow; } neg = j; } - else + else /* * Move the vectors porta_list[]->sys to the front of array "ar3" * for all "+" and "0" inequalities. * The trouble is, when this is done sequentially, first for the "+"ieqs, - * one may overwrite something in "ar3" being pointed to + * one may overwrite something in "ar3" being pointed to * by a "0" inequality (but not by a "+" inequality!!). * Therefore the following is quite complicated. */ - for (i = 0,j = zer; (i < zer) || (j < neg); ) + for (i = 0,j = zer; (i < zer) || (j < neg); ) { - sptr++; - if (j == neg || (porta_list[i]->sys < porta_list[j]->sys && i != zer)) + sptr++; + if (j == neg || (porta_list[i]->sys < porta_list[j]->sys && i != zer)) { /* first try to save as many + inequalities as possible */ for (col = 1; col <= nieq; col++,sptr++) /* save + ieqs */ (*RAT_assign)(sptr,porta_list[i]->sys+col); porta_list[i]->mark[(points-itr)/32+1] |= nmark; - /* + /* * In the present "+" inequality, * set the bit belonging to the implicit "-x[i]<=0"constraint. * (This bit is not set, if there were no "+" and no "-" inequalities @@ -963,12 +962,12 @@ void fourier_motzkin( char fname[], int nieq, int rowl, int niterat, porta_list[i]->sys = sptr - sysrow; i++; } - else + else { for (col = 1; col <= nieq; col++,sptr++) /* save 0 ieqs */ - (*RAT_assign)(sptr,porta_list[j]->sys+col); + (*RAT_assign)(sptr,porta_list[j]->sys+col); porta_list[j]->sys = sptr - sysrow; - /* + /* * Rotate the contents of porta_list[i,...,j] to the right: link[j,i,...]. * Thereby porta_list[k]->sys < porta_list[l]->sys is preserved for k < l * of the same type. @@ -976,13 +975,13 @@ void fourier_motzkin( char fname[], int nieq, int rowl, int niterat, iep = porta_list[j]; for (n = j; n > i; n--) porta_list[n] = porta_list[n-1]; - porta_list[i] = iep; + porta_list[i] = iep; i++; zer++; j++; } } - + /* * Move the new inequalities to position j in "list", * and to position "sptr" in "ar3", @@ -990,7 +989,7 @@ void fourier_motzkin( char fname[], int nieq, int rowl, int niterat, * In porta_list[]->sys, divide the numerators by their gcd, * and divide the denominators by their gcd. */ - for (i = ineq, j = neg; i != new; i++,j++) + for (i = ineq, j = neg; i != new; i++,j++) { /* overwrite - ieqs */ iep = porta_list[i]; @@ -999,20 +998,20 @@ void fourier_motzkin( char fname[], int nieq, int rowl, int niterat, (*RAT_row_prim)(iep->sys+1,sptr+1,RAT_const,nieq); porta_list[j]->sys = sptr; sptr += sysrow; - } - + } + ineq = j; - + nz = ld = 0; /* compute number of nonzeros nz, and the max bit-length ld */ for (i = 0,sptr=sysp; i < ineq;i++,sptr++) for (j=0,sptr=porta_list[i]->sys+1; j < nieq;j++,sptr++) size_info(sptr,&nz,&ld); - + /* output */ - + p = 0; /* number of non-zeros */ - + #if defined WIN32 fprintf(prt,"|%9i |%5i |%4c |%7.2f |%8i |%10.2f |", @@ -1044,38 +1043,38 @@ void fourier_motzkin( char fname[], int nieq, int rowl, int niterat, if (!MP_realised && is_set(Opt_elim)) { fprintf(prt,"%7i |\n",finie); - + /* 17.01.1994: include logging on file porta.log */ porta_log( "%7i |\n",finie); } - else + else { fprintf(prt,"\n"); - + /* 17.01.1994: include logging on file porta.log */ porta_log( "\n"); } /* 17.01.1994: include logging on file porta.log */ fflush(logfile); - + fflush(prt); - - if (ineq > maxnumineq) + + if (ineq > maxnumineq) maxnumineq = ineq; - + totalineq += ineq; - + } /* for itr */ - + fprintf(prt,"\n"); /* 17.01.1994: include logging on file porta.log */ porta_log( "\n" ); - + sptr = ar3; sysrow = rowl-niterat; - /* + /* * sysrow was the length of the porta_list[]->sys vectors, which is nieq+1. * rowl-niterat is the number of noneliminated variables+1 in case of "fmel", * is dim + 1 - equa in case of "traf". @@ -1083,12 +1082,12 @@ void fourier_motzkin( char fname[], int nieq, int rowl, int niterat, * with matrix "ar2". * To store the results, "ar3" has to be enlarged if sysrow > nieq+1. */ - if (sysrow > nieq+1) + if (sysrow > nieq+1) { /* * Change by M.S. 4.6.92: * - * The following resizing and saving of contents of "ar3" + * The following resizing and saving of contents of "ar3" * may go awfully wrong, if "ar3" was moved a little to the left * by realloc(). * But for "traf" applications, sysrow is "dim+1-equa", @@ -1100,17 +1099,17 @@ void fourier_motzkin( char fname[], int nieq, int rowl, int niterat, ar3 = (RAT *) RATallo(ar3,nel_ar3,i); nel_ar3 = i; for (i = ineq-1, sptr = ar3+ineq*sysrow; i >= 0; i--, sptr -= sysrow) { - for (j = 0; j < nieq+1; j++) + for (j = 0; j < nieq+1; j++) (*RAT_assign)(sptr+j,porta_list[i]->sys+j); porta_list[i]->sys = sptr; } * Instead, a new array xxx of size (ineq+1)*sysrow is allocated, - * the contents of ar3 stored in it, ar3 is freed, + * the contents of ar3 stored in it, ar3 is freed, * and xxx is renamed as ar3. */ nel_xxx = (ineq+1)*sysrow; xxx = (RAT *) RATallo( (RAT *)0, 0, nel_xxx); - for(i=ineq-1, sptr=xxx+ineq*sysrow; i>=0; i--,sptr-=sysrow) + for(i=ineq-1, sptr=xxx+ineq*sysrow; i>=0; i--,sptr-=sysrow) { for (j = 0; j < nieq+1; j++) (*RAT_assign)(sptr+j, porta_list[i]->sys+j); @@ -1124,36 +1123,36 @@ void fourier_motzkin( char fname[], int nieq, int rowl, int niterat, iesp = ((elim_ord)?ar2:ar2+niterat*nieq); if (elim_ord) elim_ord += niterat; - /* + /* * "iesp" is the offset for the list of non-eliminated variables (rows), * in ar2. * The list of variables not to be eliminated begins with elim_ord[niterat]. * If elim_ord was not used, the not-eliminated variables are called * niterat+1, ..., dim. - * + * * Compute the product of porta_list[]->sys with the original inequalities, * but only for the non-eliminated variables and the right-hand side. * The result is stored one vector to the left of porta_list[]->sys. * (This is the reason for the free space at the beginning of ar3). */ - for (i = 0; i < ineq; i++,sptr += sysrow) + for (i = 0; i < ineq; i++,sptr += sysrow) { for (j = 0; j < sysrow; j++) vecpr(iesp+nieq*((elim_ord)?elim_ord[j]:j), porta_list[i]->sys+1, sptr+j, nieq); porta_list[i]->sys = sptr; - /* + /* * Transform inequalities into "<=1", "<=-1" inequalities, * or divide the left-hand side by a common gcd. */ (*RAT_row_prim)(sptr,sptr,sptr+sysrow-1,sysrow); } - - for (i = 0; i < ineq; i++) - { + + for (i = 0; i < ineq; i++) + { /* 0x <= 1 ? */ - for ( j = 0; j < sysrow-1; j++) + for ( j = 0; j < sysrow-1; j++) if (porta_list[i]->sys[j].num) break; - + /* * Change by M.S. 4.6.92: * Remove the inequality only if it is 0x <= 0, 0x <= 1, @@ -1162,28 +1161,28 @@ void fourier_motzkin( char fname[], int nieq, int rowl, int niterat, * as this causes the program to jump out of the for (i) loop, * whenever one empty inequality was found. */ - if ( j == sysrow-1 ) + if ( j == sysrow-1 ) { - if ( porta_list[i]->sys[j].num >= 0) + if ( porta_list[i]->sys[j].num >= 0) { rmlistel(blocks,i,ineq-1,1,sysrow); ineq--; } else msg( "Inconsistent system", "", 0 ); - } + } } fprintf(prt,"sum of inequalities over all iterations : %6i\n",totalineq); fprintf(prt,"maximal number of inequalities : %6i\n\n",maxnumineq); - + /* 17.01.1994: include logging on file porta.log */ porta_log( "sum of inequalities over all iterations : %6i\n",totalineq); porta_log( "maximal number of inequalities : %6i\n\n",maxnumineq); - + /* append pointers to equations */ - - for (i = ineq, sysp = ar4; i < ineq+equa; i++, sysp += dim+1) + + for (i = ineq, sysp = ar4; i < ineq+equa; i++, sysp += dim+1) { allo_list(i,&newmark,blocks); porta_list[i]->sys = sysp; @@ -1191,17 +1190,17 @@ void fourier_motzkin( char fname[], int nieq, int rowl, int niterat, /* This should not done, because the value of ar3 is assigned to porta_list[~]->sys. Reallocating causes a free memory read in - origin_add(). + origin_add(). 18.01.1994, Andreas Loebel - * - * Make ar3 just as big as it should be - * (this does not change the position of ar3) + * + * Make ar3 just as big as it should be + * (this does not change the position of ar3) * i = nel_ar3; nel_ar3 = (ineq)*sysrow; ar3 = (RAT *) RATallo(ar3,i,nel_ar3); */ } - + @@ -1211,11 +1210,11 @@ void fourier_motzkin( char fname[], int nieq, int rowl, int niterat, void red_test( int indx[], RAT *inieq, int *rowl_inar ) -{ +{ RAT *convmid,*mid,*x; RAT *ptr,*pp,*lpp,*ie1p; int sysrow,i,j,ncv,nce,b,ie1,ie2; - + if (option & Redundance_check) { fprintf(prt,"redundance - check "); @@ -1230,19 +1229,19 @@ void red_test( int indx[], RAT *inieq, int *rowl_inar ) /* 17.01.1994: include logging on file porta.log */ porta_log( "testing strong validity "); } - + /* REDUCE inieq TO NONELIMINATED VARIABLES */ - + pp = inieq; - for (i = 0; i < points; i++) + for (i = 0; i < points; i++) { for (j = 0; j < dim-equa; j++) (*RAT_assign)(pp++ ,&inieq[i*(dim+1)+indx[j]]); (*RAT_assign)(pp++,&inieq[i*(dim+1)+dim]); } - + /* LOOK FOR INTERNAL POINTS OF INEQUALITY ie SATISFYING ANOTHER IEQ WITH = */ - + sysrow = dim-equa; *rowl_inar = dim-equa+1; @@ -1251,13 +1250,13 @@ void red_test( int indx[], RAT *inieq, int *rowl_inar ) convmid = ar5; mid = ar5+sysrow+1; x = mid+sysrow+1; - - - for (ie1 = 0; ie1 != ineq; ie1++) + + + for (ie1 = 0; ie1 != ineq; ie1++) { /*******************************/ - - if (ie1%50 == 0) + + if (ie1%50 == 0) { fprintf(prt,"."); fflush(prt); @@ -1266,96 +1265,96 @@ void red_test( int indx[], RAT *inieq, int *rowl_inar ) porta_log( "." ); fflush(logfile); } - + ie1p = porta_list[ie1]->sys; - + for (ptr = convmid; ptr != convmid+sysrow; ptr++) (*RAT_assign)(ptr,RAT_const); - + ncv = nce = 0; for (b = 0; b < blocks; b++) porta_list[ie1]->mark[b] = 0; - + lpp = inieq+*rowl_inar*points; for (i = 0,pp = inieq; pp < lpp; pp += *rowl_inar,i++) { /********************************************/ - + if (!pp[dim-equa].num) continue; - + /* middle of satisfying conv-points */ - + if (eqie_satisfied(ie1p,pp,sysrow,0)) { - + domark(porta_list[ie1]->mark,i); ncv++; row_add(pp,convmid,convmid,sysrow); - + } - + } - - if (ncv > 0) + + if (ncv > 0) { if (MP_realised) L_RAT_to_RAT(var+3,1); var[3].num = 1; var[3].den.i = ncv; - if (MP_realised) RAT_to_L_RAT(var+3,1); + if (MP_realised) RAT_to_L_RAT(var+3,1); scal_mul(var+3,convmid,convmid,sysrow); } - - if (cone) + + if (cone) { for (ptr = mid; ptr != mid+sysrow; ptr++) (*RAT_assign)(ptr,RAT_const); - + for (i = 0,pp = inieq; pp < lpp; pp += *rowl_inar,i++) { /********************************************/ - + if (pp[dim-equa].num) continue; - + row_add(pp,convmid,x,sysrow); - - if (eqie_satisfied(ie1p,x,sysrow,0)) + + if (eqie_satisfied(ie1p,x,sysrow,0)) { - + domark(porta_list[ie1]->mark,i); nce++; row_add(x,mid,mid,sysrow); - + } - + } - - if (nce > 0) + + if (nce > 0) { if (MP_realised) L_RAT_to_RAT(var+3,1); var[3].num = 1; var[3].den.i = nce; - if (MP_realised) RAT_to_L_RAT(var+3,1); + if (MP_realised) RAT_to_L_RAT(var+3,1); scal_mul(var+3,mid,mid,sysrow); } else - for (i = 0; i != sysrow; i++) + for (i = 0; i != sysrow; i++) (*RAT_assign)(mid+i, convmid+i); } else - for (i = 0; i != sysrow; i++) + for (i = 0; i != sysrow; i++) (*RAT_assign)(mid+i, convmid+i); - + if (!(option & Redundance_check)) /* option.valout == 'v' */ continue; - - if (ncv + nce > 0) + + if (ncv + nce > 0) { - - for (ie2 = 0; ie2 != ineq; ie2++) + + for (ie2 = 0; ie2 != ineq; ie2++) { - if (ie1 != ie2) + if (ie1 != ie2) { - if (eqie_satisfied(porta_list[ie2]->sys,mid,sysrow,0)) + if (eqie_satisfied(porta_list[ie2]->sys,mid,sysrow,0)) { fprintf (prt,"r"); @@ -1370,8 +1369,8 @@ void red_test( int indx[], RAT *inieq, int *rowl_inar ) } } /* for ie1 */ } - - else + + else { fprintf (prt,"r"); @@ -1382,26 +1381,26 @@ void red_test( int indx[], RAT *inieq, int *rowl_inar ) rmlistel(blocks,ineq-1,ineq-1+equa,0,sysrow); ie1--;ineq--; } - + } /* for ie1 */ fprintf(prt,"\n"); /* 17.01.1994: include logging on file porta.log */ porta_log( "\n" ); - + pp = ar3; sysrow++; - for (i = 0; i < ineq; i++) + for (i = 0; i < ineq; i++) { porta_list[i]->ptr = pp; for (j = 0; j < sysrow; j++, pp++) (*RAT_assign)(pp, porta_list[i]->sys+j); porta_list[i]->sys = porta_list[i]->ptr; } - + ar5 = (RAT *) RATallo(ar5,nel_ar5,0); nel_ar5 = 0; - + } @@ -1414,11 +1413,11 @@ void red_test( int indx[], RAT *inieq, int *rowl_inar ) void domark( unsigned *m, int n ) { unsigned mark; - + mark = 1; mark <<= n%32; m[n/32] |= mark; - + } @@ -1434,7 +1433,7 @@ void rmlistel( int blocks, int cel, int lastie, int real, int sysrow ) /* * Remove element cel from list. * If real = 1, - * move the contents of porta_list[cl+i]->sys and porta_list[cl+i]->mark physically + * move the contents of porta_list[cl+i]->sys and porta_list[cl+i]->mark physically * to porta_list[cl+i-1]->sys, and porta_list[cl+i-1]->mark, for i = 1, ..., lastie. * Otherwise, * rotate the contents of porta_list[cl, ..., lastie] to the left. @@ -1442,10 +1441,10 @@ void rmlistel( int blocks, int cel, int lastie, int real, int sysrow ) { listp lp; int i,j; - - if (real) + + if (real) { - for (i = cel; i < lastie; i++) + for (i = cel; i < lastie; i++) { lp = porta_list[i]; for (j = 0; j <= sysrow; j++) @@ -1454,14 +1453,14 @@ void rmlistel( int blocks, int cel, int lastie, int real, int sysrow ) lp->mark[j] = porta_list[i+1]->mark[j]; } } - else - { + else + { lp = porta_list[cel]; - for (i = cel; i < lastie; i++) + for (i = cel; i < lastie; i++) porta_list[i] = porta_list[i+1]; porta_list[lastie] = lp; } - + } @@ -1475,10 +1474,10 @@ void rmlistel( int blocks, int cel, int lastie, int real, int sysrow ) void wl( RAT *p, int n ) { - for( ; n; n--, p++ ) + for( ; n; n--, p++ ) { printf("%ld/%i ",p[0].num,p[0].den.i); - + /* 17.01.1994: include logging on file porta.log */ porta_log( "%ld/%i ",p[0].num,p[0].den.i ); } diff --git a/src/log.c b/src/log.c index 71f1f2f..52c01c1 100644 --- a/src/log.c +++ b/src/log.c @@ -1,20 +1,20 @@ /******************************************************************************* Copyright (C) 1997-2009 Thomas Christof and Andreas Loebel - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + FILENAME: log.c @@ -35,11 +35,14 @@ REVISED BY ANDREAS LOEBEL #include "log.h" +FILE *logfile; + + int porta_log( char *fmt, ... ) { va_list argp; int ret; - + if( logfile ) { va_start( argp, fmt ); diff --git a/src/log.h b/src/log.h index 6056986..21368b7 100644 --- a/src/log.h +++ b/src/log.h @@ -1,20 +1,20 @@ /******************************************************************************* Copyright (C) 1997-2009 Thomas Christof and Andreas Loebel - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + FILENAME: log.h diff --git a/src/main.c b/src/main.c new file mode 100644 index 0000000..0fb06b4 --- /dev/null +++ b/src/main.c @@ -0,0 +1,384 @@ +#define _CRT_SECURE_NO_WARNINGS 1 + + +#include "porta.h" +#include "arith.h" +#include "common.h" +#include "log.h" +#include "inout.h" +#include "mp.h" +#include "four_mot.h" +#include "portsort.h" + + +#define FILENAME_SIZE 1000 + + +void resubst( RAT *inner, int equa_in, int indx[] ); + +int main( int argc, char *argv[] ) +{ + int i, ieq_file, start; + char outfname[FILENAME_SIZE]; + char fname[FILENAME_SIZE]; + int poi_file; + int rowl_inar, ierl; + int *indx = (int *)0; + int equa_in,ineq_in, ineq_out; + FILE *outfp; + + printf("\nPORTA - a POlyhedron Representation Transformation Algorithm\n"); + printf( "Version %s\n\n", VERSION ); + + printf( "Written by Thomas Christof (Uni Heidelberg)\n" ); + printf( "Revised by Andreas Loebel (ZIB Berlin)\n\n" ); + + printf( "PORTA is free software and comes with ABSOLUTELY NO WARRENTY! You are welcome\n" ); + printf( "to use, modify, and redistribute it under the GNU General Public Lincese.\n\n" ); + + printf( "This is the program XPORTA from the PORTA package.\n\n" ); + + if( argc <= 2 ) + { + printf( "For more information read the manpages about porta.\n\n" ); + exit(-1); + } + + /* 17.01.1994: include logging on file porta.log */ + logfile = fopen( "porta.log", "a" ); + if( !logfile ) + fprintf( stderr, "can't open logfile porta.log\n" ); + else + { + porta_log( "\n\n\nlog for " ); + for( i = 0; i < argc; i++ ) + porta_log( "%s ", argv[i] ); + porta_log( "\n\n" ); + } + + init_total_time(); + + initialize(); + + prt = stdout; + get_options(&argc,&argv); + + if (option & Protocol_to_file) + { + strcat(*argv,".prt"); + prt = fopen(*argv,"w"); + (*argv)[strlen(*argv)-4] = '\0'; + } + setbuf(prt,CP 0); + + set_I_functions(); + SET_MP_not_ready; + ieq_file = !strcmp(*argv+strlen(*argv)-4,".ieq"); + poi_file = !strcmp(*argv+strlen(*argv)-4,".poi"); + + if (!poi_file && !ieq_file) + msg( "invalid format of command line", "", 0 ); + + /* + * change by M.S. 5.6.92: + * read_input_file writes to the output file, if is_set(Sort). + */ + outfp = 0; + strcpy(outfname,*argv); + if (is_set(Sort) && poi_file) + { + strcat(outfname,".poi"); + outfp = wfopen(outfname); + } + if (is_set(Sort) && ieq_file) + { + strcat(outfname,".ieq"); + fprintf(prt,"outfname = %s\n",outfname); + fflush(stdout); + + /* 17.01.1994: include logging on file porta.log */ + porta_log( "outfname = %s\n",outfname ); + fflush(logfile); + + outfp = wfopen(outfname); + } + + if (is_set(Fmel) && ieq_file) + { + /* ONLY FM-ELIMINATON */ + + int *elim_ord,nel; + char *cp1; + elim_ord = 0; + cp1=strdup("ELIMINATION_ORDER"); + if(!cp1) + msg( "allocation of new space failed", "", 0 ); + ineq = read_input_file(*argv,outfp,&dim,&ar1,(int *)&nel_ar1,cp1, + &elim_ord,"\0",(int **)&i,"\0",(RAT **)&i); + free(cp1); + sort_eqie_cvce(ar1,ineq,dim+2,&equa_in,&ineq_in); + ineq = ineq_in+equa_in; + /* elim_ord = check_and_reorder_elim_ord(elim_ord,&nel); */ + reorder_var(ineq,ar1,&ar2,(int *)&nel_ar2,&nel,&elim_ord,&indx); + /* indx = elim_ord+nel; */ + /* + * Transform all inequalities into "<= 1" or "<=-1" inequalities, + * if possible. + * If the right-hand side is 0, divide the numerators by their gcd + * and the denominators by their gcd. + * (This is not really necessary). + */ + /* + for (i = 0; i < ineq; i++) + (* RAT_row_prim)(ar2+(dim+2)*i,ar2+(dim+1)*i,ar2+(dim+2)*i+dim,dim+1); + */ + if(is_set(Long_arithmetic)) + { + RAT a, b; + SET_MP_ready; + memset( &a, 0, sizeof(a) ); + memset( &b, 0, sizeof(b) ); + arith_overflow_func(0,0,a,b,0); + } + for (i = 0; i < ineq; i++) + (* RAT_row_prim)(ar2+(dim+1)*i,ar2+(dim+1)*i, + ar2+(dim+1)*i+dim,dim+1); + /* nel_ar2 = ineq*(dim+1); + */ + equa = 0; + ineq_out = ineq; + gauss(0, dim+1, dim+1, dim-nel, equa_in, &ineq_out, &equa, indx); + for (; (*indx) < 0; indx++); + ierl = dim-nel-equa +1; + /* row-length of inequalities after fourier_motzkin + * = number of noneliminated variables+1 */ + nel = nel - (ineq - ineq_out); /* number of variables to be elim. */ + ineq = ineq_out; + fourier_motzkin(0,ineq-equa,dim+1-equa_in,nel,poi_file,indx,elim_ord); + if ((MP_realised && return_from_mp()) || !MP_realised) + sort(no_denom(ierl, 0, ineq,1), ierl, 0, ineq); + write_ieq_file(*argv,outfp,equa,ineq,dim+1,0, + ineq,0,ierl,indx); + + } + else if (is_set(Sort)) + { + points = read_input_file(*argv,outfp,&dim,&ar1,(int *)&nel_ar1,"\0",(int **)&i, + "\0",(int **)&i,"\0",(RAT **)&i); + if (ieq_file) + sort_eqie_cvce(ar1,points,dim+2,&equa,&ineq); + listptoar(ar1,points,ieq_file?dim+2:dim+1,0); + if (ieq_file) + { + if (equa) sort(1,dim+1,0,equa); + if (ineq) sort(1,dim+1,equa,points); + write_ieq_file(*argv,outfp,equa,0,dim+1,0,ineq,equa,dim+1,0); + } + else + { + sort(1,dim+1,0,points); + for (cone = 0; !(porta_list[cone]->sys[dim].num); cone++); + write_poi_file(*argv,outfp,dim,0,0,cone,0,points-cone,cone); + } + } + else if ((is_set(Traf) || is_set(Dim)) && poi_file) + { + points = read_input_file(*argv,outfp,&dim,&ar1,(int *)&nel_ar1, + "\0",(int **)&i,"\0",(int **)&i,"\0", + (RAT **)&i); + gentableau(ar1,1,&rowl_inar,&indx); + if(is_set(Long_arithmetic)) + { + RAT a, b; + SET_MP_ready; + memset( &a, 0, sizeof(a) ); + memset( &b, 0, sizeof(b) ); + arith_overflow_func(0,0,a,b,0); + } + ineq = (cone == points) ? dim : dim + 1; + ineq_out = ineq; /*not used further */ + gauss(1, points+dim+1,dim+1,dim,ineq,&ineq_out, &equa, indx); + /* make indx point to the system-variable section */ + for (; (*indx) < 0; indx++); + if (is_set(Dim)) + { + char str[100]; + fprintf (prt,"\nDIMENSION OF THE POLYHEDRON : %i\n\n",dim-equa); + + /* 17.01.1994: include logging on file porta.log */ + porta_log( "\nDIMENSION OF THE POLYHEDRON : %i\n\n", dim-equa ); + + sprintf (str,"echo 'DIMENSION OF THE POLYHEDRON : %i' | cat >> %s", + dim-equa,argv[0]); + system(str); + if (equa) + { + fprintf(prt,"equations :\n"); + + /* 17.01.1994: include logging on file porta.log */ + porta_log( "equations :\n"); + + listptoar(ar4,equa,dim+1,0); + if ((MP_realised && return_from_mp()) || !MP_realised) + sort(no_denom(dim+1,0,equa,1), dim+1,0,equa); + start = 1; + /* last argument of writesys was lost? + writesys(prt,0,equa,dim+1,0,0,'='); + */ + writesys(prt,0,equa,dim+1,0,0,'=', &start); + + /* log equation system */ + start = 1; + writesys(logfile,0,equa,dim+1,0,0,'=', &start); + } + } + else + { + /* POINTS TO INEQUALITIES */ + sprintf(fname,"%s.ieq",*argv); + fourier_motzkin(fname,ineq-equa,points+dim+1-ineq, + points-ineq+equa,poi_file,indx,0); + if (is_set(Validity_table_out)) + red_test(indx,ar1,&rowl_inar); + if ((MP_realised && return_from_mp()) || !MP_realised) + { + if (equa) sort(no_denom(dim+1, ineq, ineq+equa,1), + dim+1, ineq, ineq+equa); + sort(no_denom(dim+1-equa, 0, ineq,1), + dim+1-equa, 0, ineq); + } + write_ieq_file(*argv,outfp,equa,ineq, + dim+1,0,ineq,0,dim+1-equa,indx); + } + } + else if (is_set(Traf) && ieq_file) + { + /* INEQUALITIES TO POINTS */ + RAT *inner,*iep; + char *cp1; + cp1=strdup("VALID"); + inner = 0; + if(!cp1) + msg( "allocation of new space failed", "", 0 ); + + points = read_input_file(*argv,outfp,&dim,&ar1,(int *)&nel_ar1, + "\0",(int **)&i, + "\0",(int **)&i,cp1,&inner); + free(cp1); + ar6 = inner; if (inner) nel_ar6 = dim; + sort_eqie_cvce(ar1,points,dim+2,&equa_in,&ineq_in); + iep = ar1+equa_in*(dim+2); + /* first equations then inequalities */ + points = ineq_in; + polarformat(iep,&equa_in,ineq_in,inner); + gentableau(iep,0,&rowl_inar,&indx); + if(is_set(Long_arithmetic)) + { + RAT a, b; + SET_MP_ready; + memset( &a, 0, sizeof(a) ); + memset( &b, 0, sizeof(b) ); + arith_overflow_func(0,0,a,b,0); + } + ineq = (cone == points) ? dim : dim + 1; + ineq_out = ineq; /* not used further */ + gauss(1, points+dim+1,dim+1,dim,ineq,&ineq_out, &equa, indx); + /* make indx point to the x-variable section */ + for (; (*indx) < 0; indx++); + fourier_motzkin(0,ineq-equa,points+dim+1-ineq, + points-ineq+equa,poi_file,indx,0); + if (is_set(Validity_table_out)) + red_test(indx,iep,&rowl_inar); + if (cone >= dim-equa) + origin_add(rowl_inar,iep); + resubst(inner,equa_in,indx); + if ((MP_realised && return_from_mp()) || !MP_realised) + { + if (equa) + sort(no_denom(dim+1, ineq, ineq+equa,1), + dim+1,ineq,ineq+equa); + sort(0, dim+1, 0, ineq); + } + for (cone = 0; !(porta_list[cone]->sys[dim].num); cone++); + conv = ineq - cone; + if (!MP_realised) no_denom(dim+1, 0, cone,1); + write_poi_file(*argv,outfp,dim,equa,ineq,cone,0,conv,cone); + } + else + msg( "invalid format of command line", "", 0 ); + + /* 17.01.1994: include logging on file porta.log */ + fclose( logfile ); + exit(0); +} + +void resubst( RAT *inner, int equa_in, int indx[] ) +{ + int sysrow,ie,j; + RAT *new_sys; + + new_sys = ar3 + (equa+ineq)*(dim+equa_in+1); + while (new_sys > ar3+nel_ar3-1) + { + reallocate(ineq, &new_sys); + new_sys = ar3 + (equa+ineq)*(dim+equa_in+1); + } + + if (equa) + { + /* inequality dimension to dim */ + new_sys = ar3 + ineq*(dim+1); + for (ie = ineq-1; ie >= 0; ie--, new_sys -= dim+1) + blow_up(new_sys,ie,indx,dim-equa,dim); + } + + if (equa_in) + { + /* append equations on sys */ + new_sys = ar3 + (ineq+equa)*(dim+equa_in+1); + for (ie = equa+ineq-1; ie >= 0; ie--, new_sys -= (equa_in+dim+1)) + blow_up(new_sys,ie,elim_in,dim,dim+equa_in); + } + + if (inner != 0) + { + for (ie = 0; ie < ineq; ie++) + if ((porta_list[ie]->sys+dim+equa_in)->num) + for (j = 0; j < dim+equa_in; j++) + (*RAT_add)(*(porta_list[ie]->sys+j),*(inner+j), + porta_list[ie]->sys+j); + } + + if (equa_in > 0) + { + + fprintf(prt,"solving linear equality system "); + fflush(prt); + + /* 17.01.1994: include logging on file porta.log */ + porta_log( "solving linear equality system "); + fflush(logfile); + + sysrow = equa_in + dim + 2; + for (ie = 0; ie < ineq+equa; ie++) + { + if (ie%50 == 0) + { + fprintf(prt,"."); + fflush(prt); + + /* 17.01.1994: include logging on file porta.log */ + porta_log( "."); + fflush(logfile); + } + backwsubst(porta_list[ie]->sys,sysrow,equa_in); + } + + dim += equa_in; + fprintf(prt,"\n"); + + /* 17.01.1994: include logging on file porta.log */ + porta_log( "\n"); + } + +} diff --git a/src/porta.c b/src/porta.c index 9f12a1e..55b24da 100644 --- a/src/porta.c +++ b/src/porta.c @@ -44,320 +44,29 @@ REVISED BY ANDREAS LOEBEL #include "four_mot.h" #include "portsort.h" -#define FILENAME_SIZE 1000 - -FILE *logfile; - - - - -int main( int argc, char *argv[] ) -{ - int i, ieq_file, start; - char outfname[FILENAME_SIZE]; - char fname[FILENAME_SIZE]; - int poi_file; - int rowl_inar, ierl; - int *indx = (int *)0; - int equa_in,ineq_in, ineq_out; - FILE *outfp; - - - - printf("\nPORTA - a POlyhedron Representation Transformation Algorithm\n"); - printf( "Version %s\n\n", VERSION ); - - printf( "Written by Thomas Christof (Uni Heidelberg)\n" ); - printf( "Revised by Andreas Loebel (ZIB Berlin)\n\n" ); - - printf( "PORTA is free software and comes with ABSOLUTELY NO WARRENTY! You are welcome\n" ); - printf( "to use, modify, and redistribute it under the GNU General Public Lincese.\n\n" ); - - printf( "This is the program XPORTA from the PORTA package.\n\n" ); - - if( argc <= 2 ) - { - printf( "For more information read the manpages about porta.\n\n" ); - exit(-1); - } - - /* 17.01.1994: include logging on file porta.log */ - logfile = fopen( "porta.log", "a" ); - if( !logfile ) - fprintf( stderr, "can't open logfile porta.log\n" ); - else - { - porta_log( "\n\n\nlog for " ); - for( i = 0; i < argc; i++ ) - porta_log( "%s ", argv[i] ); - porta_log( "\n\n" ); - } - - init_total_time(); - - initialize(); - - prt = stdout; - get_options(&argc,&argv); - - if (option & Protocol_to_file) - { - strcat(*argv,".prt"); - prt = fopen(*argv,"w"); - (*argv)[strlen(*argv)-4] = '\0'; - } - setbuf(prt,CP 0); - - set_I_functions(); - SET_MP_not_ready; - ieq_file = !strcmp(*argv+strlen(*argv)-4,".ieq"); - poi_file = !strcmp(*argv+strlen(*argv)-4,".poi"); - - if (!poi_file && !ieq_file) - msg( "invalid format of command line", "", 0 ); - - /* - * change by M.S. 5.6.92: - * read_input_file writes to the output file, if is_set(Sort). - */ - outfp = 0; - strcpy(outfname,*argv); - if (is_set(Sort) && poi_file) - { - strcat(outfname,".poi"); - outfp = wfopen(outfname); - } - if (is_set(Sort) && ieq_file) - { - strcat(outfname,".ieq"); - fprintf(prt,"outfname = %s\n",outfname); - fflush(stdout); - - /* 17.01.1994: include logging on file porta.log */ - porta_log( "outfname = %s\n",outfname ); - fflush(logfile); - - outfp = wfopen(outfname); - } - - if (is_set(Fmel) && ieq_file) - { - /* ONLY FM-ELIMINATON */ - - int *elim_ord,nel; - char *cp1; - elim_ord = 0; - cp1=strdup("ELIMINATION_ORDER"); - if(!cp1) - msg( "allocation of new space failed", "", 0 ); - ineq = read_input_file(*argv,outfp,&dim,&ar1,(int *)&nel_ar1,cp1, - &elim_ord,"\0",(int **)&i,"\0",(RAT **)&i); - free(cp1); - sort_eqie_cvce(ar1,ineq,dim+2,&equa_in,&ineq_in); - ineq = ineq_in+equa_in; - /* elim_ord = check_and_reorder_elim_ord(elim_ord,&nel); */ - reorder_var(ineq,ar1,&ar2,(int *)&nel_ar2,&nel,&elim_ord,&indx); - /* indx = elim_ord+nel; */ - /* - * Transform all inequalities into "<= 1" or "<=-1" inequalities, - * if possible. - * If the right-hand side is 0, divide the numerators by their gcd - * and the denominators by their gcd. - * (This is not really necessary). - */ - /* - for (i = 0; i < ineq; i++) - (* RAT_row_prim)(ar2+(dim+2)*i,ar2+(dim+1)*i,ar2+(dim+2)*i+dim,dim+1); - */ - if(is_set(Long_arithmetic)) - { - RAT a, b; - SET_MP_ready; - memset( &a, 0, sizeof(a) ); - memset( &b, 0, sizeof(b) ); - arith_overflow_func(0,0,a,b,0); - } - for (i = 0; i < ineq; i++) - (* RAT_row_prim)(ar2+(dim+1)*i,ar2+(dim+1)*i, - ar2+(dim+1)*i+dim,dim+1); - /* nel_ar2 = ineq*(dim+1); - */ - equa = 0; - ineq_out = ineq; - gauss(0, dim+1, dim+1, dim-nel, equa_in, &ineq_out, &equa, indx); - for (; (*indx) < 0; indx++); - ierl = dim-nel-equa +1; - /* row-length of inequalities after fourier_motzkin - * = number of noneliminated variables+1 */ - nel = nel - (ineq - ineq_out); /* number of variables to be elim. */ - ineq = ineq_out; - fourier_motzkin(0,ineq-equa,dim+1-equa_in,nel,poi_file,indx,elim_ord); - if ((MP_realised && return_from_mp()) || !MP_realised) - sort(no_denom(ierl, 0, ineq,1), ierl, 0, ineq); - write_ieq_file(*argv,outfp,equa,ineq,dim+1,0, - ineq,0,ierl,indx); - - } - else if (is_set(Sort)) - { - points = read_input_file(*argv,outfp,&dim,&ar1,(int *)&nel_ar1,"\0",(int **)&i, - "\0",(int **)&i,"\0",(RAT **)&i); - if (ieq_file) - sort_eqie_cvce(ar1,points,dim+2,&equa,&ineq); - listptoar(ar1,points,ieq_file?dim+2:dim+1,0); - if (ieq_file) - { - if (equa) sort(1,dim+1,0,equa); - if (ineq) sort(1,dim+1,equa,points); - write_ieq_file(*argv,outfp,equa,0,dim+1,0,ineq,equa,dim+1,0); - } - else - { - sort(1,dim+1,0,points); - for (cone = 0; !(porta_list[cone]->sys[dim].num); cone++); - write_poi_file(*argv,outfp,dim,0,0,cone,0,points-cone,cone); - } - } - else if ((is_set(Traf) || is_set(Dim)) && poi_file) - { - points = read_input_file(*argv,outfp,&dim,&ar1,(int *)&nel_ar1, - "\0",(int **)&i,"\0",(int **)&i,"\0", - (RAT **)&i); - gentableau(ar1,1,&rowl_inar,&indx); - if(is_set(Long_arithmetic)) - { - RAT a, b; - SET_MP_ready; - memset( &a, 0, sizeof(a) ); - memset( &b, 0, sizeof(b) ); - arith_overflow_func(0,0,a,b,0); - } - ineq = (cone == points) ? dim : dim + 1; - ineq_out = ineq; /*not used further */ - gauss(1, points+dim+1,dim+1,dim,ineq,&ineq_out, &equa, indx); - /* make indx point to the system-variable section */ - for (; (*indx) < 0; indx++); - if (is_set(Dim)) - { - char str[100]; - fprintf (prt,"\nDIMENSION OF THE POLYHEDRON : %i\n\n",dim-equa); - - /* 17.01.1994: include logging on file porta.log */ - porta_log( "\nDIMENSION OF THE POLYHEDRON : %i\n\n", dim-equa ); - - sprintf (str,"echo 'DIMENSION OF THE POLYHEDRON : %i' | cat >> %s", - dim-equa,argv[0]); - system(str); - if (equa) - { - fprintf(prt,"equations :\n"); - - /* 17.01.1994: include logging on file porta.log */ - porta_log( "equations :\n"); - - listptoar(ar4,equa,dim+1,0); - if ((MP_realised && return_from_mp()) || !MP_realised) - sort(no_denom(dim+1,0,equa,1), dim+1,0,equa); - start = 1; - /* last argument of writesys was lost? - writesys(prt,0,equa,dim+1,0,0,'='); - */ - writesys(prt,0,equa,dim+1,0,0,'=', &start); - - /* log equation system */ - start = 1; - writesys(logfile,0,equa,dim+1,0,0,'=', &start); - } - } - else - { - /* POINTS TO INEQUALITIES */ - sprintf(fname,"%s.ieq",*argv); - fourier_motzkin(fname,ineq-equa,points+dim+1-ineq, - points-ineq+equa,poi_file,indx,0); - if (is_set(Validity_table_out)) - red_test(indx,ar1,&rowl_inar); - if ((MP_realised && return_from_mp()) || !MP_realised) - { - if (equa) sort(no_denom(dim+1, ineq, ineq+equa,1), - dim+1, ineq, ineq+equa); - sort(no_denom(dim+1-equa, 0, ineq,1), - dim+1-equa, 0, ineq); - } - write_ieq_file(*argv,outfp,equa,ineq, - dim+1,0,ineq,0,dim+1-equa,indx); - } - } - else if (is_set(Traf) && ieq_file) - { - /* INEQUALITIES TO POINTS */ - RAT *inner,*iep; - char *cp1; - cp1=strdup("VALID"); - inner = 0; - if(!cp1) - msg( "allocation of new space failed", "", 0 ); - - points = read_input_file(*argv,outfp,&dim,&ar1,(int *)&nel_ar1, - "\0",(int **)&i, - "\0",(int **)&i,cp1,&inner); - free(cp1); - ar6 = inner; if (inner) nel_ar6 = dim; - sort_eqie_cvce(ar1,points,dim+2,&equa_in,&ineq_in); - iep = ar1+equa_in*(dim+2); - /* first equations then inequalities */ - points = ineq_in; - polarformat(iep,&equa_in,ineq_in,inner); - gentableau(iep,0,&rowl_inar,&indx); - if(is_set(Long_arithmetic)) - { - RAT a, b; - SET_MP_ready; - memset( &a, 0, sizeof(a) ); - memset( &b, 0, sizeof(b) ); - arith_overflow_func(0,0,a,b,0); - } - ineq = (cone == points) ? dim : dim + 1; - ineq_out = ineq; /* not used further */ - gauss(1, points+dim+1,dim+1,dim,ineq,&ineq_out, &equa, indx); - /* make indx point to the x-variable section */ - for (; (*indx) < 0; indx++); - fourier_motzkin(0,ineq-equa,points+dim+1-ineq, - points-ineq+equa,poi_file,indx,0); - if (is_set(Validity_table_out)) - red_test(indx,iep,&rowl_inar); - if (cone >= dim-equa) - origin_add(rowl_inar,iep); - resubst(inner,equa_in,indx); - if ((MP_realised && return_from_mp()) || !MP_realised) - { - if (equa) - sort(no_denom(dim+1, ineq, ineq+equa,1), - dim+1,ineq,ineq+equa); - sort(0, dim+1, 0, ineq); - } - for (cone = 0; !(porta_list[cone]->sys[dim].num); cone++); - conv = ineq - cone; - if (!MP_realised) no_denom(dim+1, 0, cone,1); - write_poi_file(*argv,outfp,dim,equa,ineq,cone,0,conv,cone); - } - else - msg( "invalid format of command line", "", 0 ); - - - - /* 17.01.1994: include logging on file porta.log */ - fclose( logfile ); - exit(0); -} - - - - - - - +int mp_state; +RAT RAT_const[2], var[4]; +RAT *ar1,*ar2,*ar3,*ar4,*ar5,*ar6; +long nel_ar1,nel_ar2,nel_ar3,nel_ar4,nel_ar5,nel_ar6; +int maxlist, total_size; +int dim, + equa, /* number of equalities */ + ineq, /* number of inequalities */ + conv, + cone, + points, + blocks, /* set in fourier_motzkin, used in red_test */ + comp; +FILE *fp,*prt; +int option, allowed_options; +void + (*RAT_add)(), + (*RAT_sub)(), + (*RAT_mul)(), + (*RAT_row_prim)(), + (*RAT_assign)(), + (*writeline)(); int *check_and_reorder_elim_ord( int *eo, int *nel ) @@ -573,85 +282,6 @@ void polarformat( RAT *inieq, int *equa_in, int ineq_in, RAT *inner ) -void resubst( RAT *inner, int equa_in, int indx[] ) -{ - int sysrow,ie,j; - RAT *new_sys; - - - new_sys = ar3 + (equa+ineq)*(dim+equa_in+1); - while (new_sys > ar3+nel_ar3-1) - { - reallocate(ineq, &new_sys); - new_sys = ar3 + (equa+ineq)*(dim+equa_in+1); - } - - if (equa) - { - /* inequality dimension to dim */ - new_sys = ar3 + ineq*(dim+1); - for (ie = ineq-1; ie >= 0; ie--, new_sys -= dim+1) - blow_up(new_sys,ie,indx,dim-equa,dim); - } - - if (equa_in) - { - /* append equations on sys */ - new_sys = ar3 + (ineq+equa)*(dim+equa_in+1); - for (ie = equa+ineq-1; ie >= 0; ie--, new_sys -= (equa_in+dim+1)) - blow_up(new_sys,ie,elim_in,dim,dim+equa_in); - } - - if (inner != 0) - { - for (ie = 0; ie < ineq; ie++) - if ((porta_list[ie]->sys+dim+equa_in)->num) - for (j = 0; j < dim+equa_in; j++) - (*RAT_add)(*(porta_list[ie]->sys+j),*(inner+j), - porta_list[ie]->sys+j); - } - - if (equa_in > 0) - { - - fprintf(prt,"solving linear equality system "); - fflush(prt); - - /* 17.01.1994: include logging on file porta.log */ - porta_log( "solving linear equality system "); - fflush(logfile); - - sysrow = equa_in + dim + 2; - for (ie = 0; ie < ineq+equa; ie++) - { - if (ie%50 == 0) - { - fprintf(prt,"."); - fflush(prt); - - /* 17.01.1994: include logging on file porta.log */ - porta_log( "."); - fflush(logfile); - } - backwsubst(porta_list[ie]->sys,sysrow,equa_in); - } - - dim += equa_in; - fprintf(prt,"\n"); - - /* 17.01.1994: include logging on file porta.log */ - porta_log( "\n"); - } - -} - - - - - - - - void blow_up( RAT *nptr, int ie, int *el, int eldim, int fdim ) /* blows up to get space for the eliminated components */ { @@ -837,7 +467,7 @@ int no_denom( int sysrow, int first, int last, int outmsg ) free(denom); return(ret); - + } diff --git a/src/porta.h b/src/porta.h index 43bdd48..716b83e 100644 --- a/src/porta.h +++ b/src/porta.h @@ -1,20 +1,20 @@ /******************************************************************************* Copyright (C) 1997-2009 Thomas Christof and Andreas Loebel - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + FILENAME: arith.h @@ -56,7 +56,7 @@ struct RAT { }; typedef struct RAT RAT; -int mp_state; +extern int mp_state; #define MP_not_ready (mp_state == -1) #define MP_ready (mp_state == 0) #define MP_realised (mp_state == 1) @@ -64,7 +64,7 @@ int mp_state; #define SET_MP_ready mp_state = 0 #define SET_MP_realised mp_state = 1 -void +extern void (*RAT_add)(), (*RAT_sub)(), (*RAT_mul)(), @@ -86,10 +86,10 @@ struct lorat { typedef struct lorat lorat; -#define FIRST_SYS_EL 50000 -#define INCR_SYS_EL 100000 -#define INCR_LIST 5000 -#define INCR_INSYS_ROW 1000 +#define FIRST_SYS_EL 50000 +#define INCR_SYS_EL 100000 +#define INCR_LIST 5000 +#define INCR_INSYS_ROW 1000 #define CP (char *) #define U (unsigned ) @@ -98,7 +98,7 @@ typedef struct lorat lorat; #define szU (sizeof(unsigned)) struct list { - RAT *sys; + RAT *sys; unsigned *mark; RAT *ptr; } ; @@ -108,30 +108,33 @@ typedef struct list *listp; extern char andreas[]; extern listp *porta_list; - -RAT RAT_const[2],var[4]; -RAT *ar1,*ar2,*ar3,*ar4,*ar5,*ar6; -long nel_ar1,nel_ar2,nel_ar3,nel_ar4,nel_ar5,nel_ar6; +extern RAT RAT_const[2],var[4]; + +extern RAT *ar1,*ar2,*ar3,*ar4,*ar5,*ar6; +extern long nel_ar1,nel_ar2,nel_ar3,nel_ar4,nel_ar5,nel_ar6; + +extern int maxlist, total_size; -int maxlist, total_size; +extern int dim, + equa, /* number of equalities */ + ineq, /* number of inequalities */ + conv, + cone, + points, + blocks, /* set in fourier_motzkin, used in red_test */ + comp; -int dim, - equa, /* number of equalities */ - ineq, /* number of inequalities */ - conv, - cone, - points, - blocks; +extern int *elim_in; -FILE *fp,*prt; +extern FILE *fp,*prt; char * RATallo(); char * allo(); /* options */ -int option, allowed_options; +extern int option, allowed_options; #define is_set(x) (option & x) #define Protocol_to_file 1 #define Redundance_check 4 @@ -154,7 +157,6 @@ extern int no_denom( int, int, int, int ); extern void reallocate( int, RAT ** ); extern void polarformat( RAT *, int *, int, RAT * ); extern int *check_and_reorder_elim_ord( int *, int * ); -extern void resubst( RAT *, int, int [] ); extern void blow_up( RAT *, int, int *, int, int ); extern void backwsubst( RAT *, int, int ); extern void origin_add( int, RAT * ); diff --git a/src/portsort.c b/src/portsort.c index 960a792..eab6a8d 100644 --- a/src/portsort.c +++ b/src/portsort.c @@ -1,20 +1,20 @@ /******************************************************************************* Copyright (C) 1997-2009 Thomas Christof and Andreas Loebel - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - + FILENAME: portsort.c @@ -37,7 +37,7 @@ REVISED BY ANDREAS LOEBEL #include "log.h" -int comp,delay,same_vals=0,rowlen; +int delay,same_vals=0,rowlen; int (*syscompare)(const void*,const void*); @@ -49,11 +49,11 @@ int (*syscompare)(const void*,const void*); int int_syscompare( listp *i, listp *j ) { int ret_code = 0; - + if( ((*i)->sys+comp)->num > ((*j)->sys+comp)->num ) ret_code = 1; else if( ((*i)->sys+comp)->num < ((*j)->sys+comp)->num ) - ret_code = -1; + ret_code = -1; else ret_code = 0; @@ -82,14 +82,14 @@ int ptrcompare( listp *i, listp *j ) { int ret_code = 0; int *statptr1,*statptr2; - + statptr1 = (int *) (*i)->ptr; statptr2 = (int *) (*j)->ptr; if( *(statptr1+comp) > *(statptr2+comp) ) ret_code = 1; else if( *(statptr1+comp) < *(statptr2+comp) ) - ret_code = -1; + ret_code = -1; else ret_code = 0; @@ -105,30 +105,30 @@ int ptrcompare( listp *i, listp *j ) void sortrekurs( int first, int last, int whatcomp ) { int i,compint,*statptr1,*statptr2; - - if (whatcomp == 0 || whatcomp > 10) + + if (whatcomp == 0 || whatcomp > 10) { - - if (whatcomp == 0) + + if (whatcomp == 0) { comp = rowlen-1; } - else + else { comp = whatcomp - 11; } - - if (whatcomp == 11) + + if (whatcomp == 11) { - same_vals++; + same_vals++; for (i = first; i <= last; i++) *((int *) porta_list[i]->ptr) = same_vals; } - + compint = comp; - qsort( &(porta_list[first]), last -first +1, sizeof(porta_list[0]), + qsort( &(porta_list[first]), last -first +1, sizeof(porta_list[0]), (int(*)(const void*,const void*))syscompare ); - + for (; first < last; first = i+1) { (*RAT_sub)(*(porta_list[first]->sys+compint), @@ -141,28 +141,28 @@ void sortrekurs( int first, int last, int whatcomp ) sortrekurs(first,i,whatcomp+1); } } - else + else { - + compint = comp = whatcomp-6; if (comp >= 0) compint = ++comp; - + qsort(CP (porta_list +first),last-first+1,sizeof(porta_list[0]), (int(*)(const void*,const void*))ptrcompare); - - for (; first < last; first = i+1) + + for (; first < last; first = i+1) { statptr1 = (int *) porta_list[first]->ptr; statptr2 = (int *) porta_list[first+1]->ptr; - for (i = first; - i < last && - (*(statptr1+compint) == *(statptr2+compint)); i++) + for (i = first; + i < last && + (*(statptr1+compint) == *(statptr2+compint)); i++) { statptr1 = (int *) porta_list[i+1]->ptr; if (i+1 < last) statptr2 = (int *) porta_list[i+2]->ptr; - } + } if (i != first) sortrekurs(first,i,whatcomp+1); } @@ -179,50 +179,49 @@ void sortrekurs( int first, int last, int whatcomp ) void sort( int int_val, int rl, int first, int last) { int i,j,val,*statptr,*statistik; - + fprintf(prt,"sorting system "); /* 17.01.1994: include logging on file porta.log */ porta_log( "sorting system "); - + rowlen = rl; syscompare = (int(*)(const void*,const void*)) (int_val ? int_syscompare : rat_syscompare); - + statistik = (int *) allo(CP 0,0,U (last-first+1)*11*sizeof(int)); for (j = 0; j < (last-first+1)*11; j++) *(statistik+j) = 0; - + statptr = statistik + 5; - - for (i = first; i < last; i++,statptr += 11) + + for (i = first; i < last; i++,statptr += 11) { - + porta_list[i]->ptr = (RAT *) statptr; - - for ( j = 0; j != rl-1; j++) + + for ( j = 0; j != rl-1; j++) { - - val = ((porta_list[i]->sys+j)->den.i == 1) ? + + val = ((porta_list[i]->sys+j)->den.i == 1) ? (porta_list[i]->sys+j)->num : -100; if ( val < 0 && val > -6) *(statptr+val) += 1; - else if (val > 0 && val < 6 ) + else if (val > 0 && val < 6 ) *(statptr+val) += 1; - + } } - + sortrekurs(first,last-1,0); - + if (MP_realised) return_from_mp(); free( statistik ); - + fprintf(prt,"\n"); /* 17.01.1994: include logging on file porta.log */ porta_log( "\n"); } - diff --git a/src/valid.c b/src/valid.c index 1c25de4..b07a5b9 100644 --- a/src/valid.c +++ b/src/valid.c @@ -39,8 +39,6 @@ REVISED BY ANDREAS LOEBEL #include "log.h" -FILE *logfile; - FILE *fp; int *lowbds,*upbds; diff --git a/win32/bin/dim.bat b/win32/bin/dim.bat deleted file mode 100755 index 3803cbb..0000000 --- a/win32/bin/dim.bat +++ /dev/null @@ -1 +0,0 @@ -xporta -D %1 %2 %3 %4 %5 %6 %7 %8 %9 \ No newline at end of file diff --git a/win32/bin/fctp.bat b/win32/bin/fctp.bat deleted file mode 100755 index af063b4..0000000 --- a/win32/bin/fctp.bat +++ /dev/null @@ -1 +0,0 @@ -valid -C %1 %2 %3 %4 %5 %6 %7 %8 %9 \ No newline at end of file diff --git a/win32/bin/fmel.bat b/win32/bin/fmel.bat deleted file mode 100755 index 10137aa..0000000 --- a/win32/bin/fmel.bat +++ /dev/null @@ -1 +0,0 @@ -xporta -F %1 %2 %3 %4 %5 %6 %7 %8 %9 \ No newline at end of file diff --git a/win32/bin/iespo.bat b/win32/bin/iespo.bat deleted file mode 100755 index 6b51878..0000000 --- a/win32/bin/iespo.bat +++ /dev/null @@ -1 +0,0 @@ -valid -I %1 %2 %3 %4 %5 %6 %7 %8 %9 \ No newline at end of file diff --git a/win32/bin/porta.log b/win32/bin/porta.log deleted file mode 100755 index 185962a..0000000 --- a/win32/bin/porta.log +++ /dev/null @@ -1,427 +0,0 @@ - - - -log for \\optsamba\bzfloebe\PORTA\win32\bin\xporta.exe -T PrismSimplex32.poi - -input file PrismSimplex32.poi o.k. -dimension : 33 -number of cone-points : 0 -number of conv-points : 66 - -GAUSS - ELIMINATION: -| iter- | # equa | # ineq | max| long| non- | mem | time | -| ation | | | bit-|arith| zeros | used | used | -| | | |length|metic| in % | in kB | in sec | -|-------|------------|----------|------|-----|--------|---------|-----------| -| 34 | 34 | 1 | 1 | n | 0.31 | 94 | 0.00 | -| 33 | 33 | 2 | 1 | n | 0.30 | 94 | 0.00 | -| 32 | 32 | 3 | 1 | n | 0.29 | 94 | 0.00 | -| 31 | 31 | 4 | 1 | n | 0.27 | 94 | 0.00 | -| 30 | 30 | 5 | 1 | n | 0.24 | 94 | 0.00 | -| 29 | 29 | 6 | 2 | n | 0.27 | 94 | 0.00 | -| 28 | 28 | 7 | 2 | n | 0.29 | 94 | 0.00 | -| 27 | 27 | 8 | 2 | n | 0.30 | 94 | 0.00 | -| 26 | 26 | 9 | 3 | n | 0.31 | 94 | 0.00 | -| 25 | 25 | 10 | 3 | n | 0.34 | 94 | 0.00 | -| 24 | 24 | 11 | 3 | n | 0.34 | 94 | 0.00 | -| 23 | 23 | 12 | 3 | n | 0.34 | 94 | 0.00 | -| 22 | 22 | 13 | 3 | n | 0.36 | 94 | 0.00 | -| 21 | 21 | 14 | 4 | n | 0.38 | 94 | 0.00 | -| 20 | 20 | 15 | 4 | n | 0.36 | 94 | 0.00 | -| 19 | 19 | 16 | 3 | n | 0.35 | 94 | 0.00 | -| 18 | 18 | 17 | 3 | n | 0.36 | 94 | 0.00 | -| 17 | 17 | 18 | 4 | n | 0.36 | 94 | 0.00 | -| 16 | 16 | 19 | 6 | n | 0.37 | 94 | 0.00 | -| 15 | 15 | 20 | 7 | n | 0.37 | 94 | 0.00 | -| 14 | 14 | 21 | 9 | n | 0.40 | 94 | 0.00 | -| 13 | 13 | 22 | 11 | n | 0.41 | 94 | 0.00 | -| 12 | 12 | 23 | 12 | n | 0.43 | 94 | 0.00 | -| 11 | 11 | 24 | 14 | n | 0.44 | 94 | 0.00 | -| 10 | 10 | 25 | 15 | n | 0.44 | 94 | 0.00 | -| 9 | 9 | 26 | 18 | n | 0.44 | 94 | 0.00 | -| 8 | 8 | 27 | 20 | n | 0.44 | 94 | 0.00 | -| 7 | 7 | 28 | 23 | n | 0.46 | 94 | 0.00 | -| 6 | 6 | 29 | 25 | n | 0.47 | 94 | 0.00 | -| 5 | 5 | 30 | 29 | n | 0.46 | 94 | 0.00 | -| 4 | 4 | 31 | 31 | n | 0.47 | 94 | 0.00 | -Arithmetic overflow - try again with long integer arithmetic (`-l' option) - - - -log for \\optsamba\bzfloebe\PORTA\win32\bin\xporta.exe -T -l PrismSimplex32.poi - -input file PrismSimplex32.poi o.k. -dimension : 33 -number of cone-points : 0 -number of conv-points : 66 - -GAUSS - ELIMINATION: -| iter- | # equa | # ineq | max| long| non- | mem | time | -| ation | | | bit-|arith| zeros | used | used | -| | | |length|metic| in % | in kB | in sec | -|-------|------------|----------|------|-----|--------|---------|-----------| -| 34 | 34 | 1 | 1 | y | 0.31 | 119 | 0.00 | -| 33 | 33 | 2 | 1 | y | 0.30 | 119 | 0.00 | -| 32 | 32 | 3 | 1 | y | 0.29 | 119 | 0.00 | -| 31 | 31 | 4 | 1 | y | 0.27 | 118 | 0.00 | -| 30 | 30 | 5 | 1 | y | 0.24 | 117 | 0.00 | -| 29 | 29 | 6 | 2 | y | 0.27 | 119 | 0.00 | -| 28 | 28 | 7 | 2 | y | 0.29 | 120 | 0.00 | -| 27 | 27 | 8 | 2 | y | 0.30 | 121 | 0.00 | -| 26 | 26 | 9 | 3 | y | 0.31 | 122 | 0.00 | -| 25 | 25 | 10 | 3 | y | 0.34 | 124 | 0.00 | -| 24 | 24 | 11 | 3 | y | 0.34 | 124 | 0.00 | -| 23 | 23 | 12 | 3 | y | 0.34 | 124 | 0.00 | -| 22 | 22 | 13 | 3 | y | 0.36 | 126 | 0.00 | -| 21 | 21 | 14 | 4 | y | 0.38 | 127 | 0.00 | -| 20 | 20 | 15 | 4 | y | 0.36 | 126 | 0.00 | -| 19 | 19 | 16 | 3 | y | 0.35 | 126 | 0.00 | -| 18 | 18 | 17 | 3 | y | 0.36 | 127 | 0.00 | -| 17 | 17 | 18 | 4 | y | 0.36 | 127 | 0.00 | -| 16 | 16 | 19 | 6 | y | 0.37 | 128 | 0.00 | -| 15 | 15 | 20 | 7 | y | 0.37 | 129 | 0.00 | -| 14 | 14 | 21 | 9 | y | 0.40 | 130 | 0.00 | -| 13 | 13 | 22 | 11 | y | 0.41 | 131 | 0.00 | -| 12 | 12 | 23 | 12 | y | 0.43 | 132 | 0.00 | -| 11 | 11 | 24 | 14 | y | 0.44 | 133 | 0.00 | -| 10 | 10 | 25 | 15 | y | 0.44 | 133 | 0.00 | -| 9 | 9 | 26 | 18 | y | 0.44 | 133 | 0.00 | -| 8 | 8 | 27 | 20 | y | 0.44 | 134 | 0.00 | -| 7 | 7 | 28 | 23 | y | 0.46 | 135 | 0.00 | -| 6 | 6 | 29 | 25 | y | 0.47 | 136 | 0.00 | -| 5 | 5 | 30 | 29 | y | 0.46 | 136 | 0.00 | -| 4 | 4 | 31 | 31 | y | 0.47 | 137 | 0.00 | -| 3 | 3 | 32 | 62 | y | 0.46 | 144 | 0.00 | -| 2 | 2 | 33 | 62 | y | 0.48 | 145 | 0.00 | -| 1 | 1 | 34 | 62 | y | 0.49 | 145 | 0.00 | - -FOURIER - MOTZKIN - ELIMINATION: -| iter- | upper | # ineq | max| long| non- | mem | time | -| ation | bound | | bit-|arith| zeros | used | used | -| | # ineq | |length|metic| in % | in kB | in sec | -|-------|------------|----------|------|-----|--------|---------|-----------| -| 32 | 35 | 35 | 1 | y | 0.03 | 520 | 0.00 | -| 31 | 36 | 35 | 1 | y | 0.03 | 520 | 0.00 | -| 30 | 36 | 35 | 31 | y | 0.03 | 520 | 0.00 | -| 29 | 36 | 35 | 31 | y | 0.03 | 520 | 0.00 | -| 28 | 36 | 35 | 31 | y | 0.03 | 520 | 0.00 | -| 27 | 36 | 35 | 32 | y | 0.03 | 520 | 0.00 | -| 26 | 36 | 35 | 32 | y | 0.04 | 520 | 0.00 | -| 25 | 36 | 35 | 32 | y | 0.04 | 520 | 0.00 | -| 24 | 36 | 35 | 32 | y | 0.04 | 520 | 0.00 | -| 23 | 36 | 35 | 32 | y | 0.04 | 520 | 0.00 | -| 22 | 36 | 35 | 32 | y | 0.04 | 520 | 0.00 | -| 21 | 36 | 35 | 32 | y | 0.04 | 520 | 0.00 | -| 20 | 36 | 35 | 32 | y | 0.04 | 520 | 0.00 | -| 19 | 36 | 35 | 32 | y | 0.04 | 520 | 0.00 | -| 18 | 36 | 35 | 32 | y | 0.04 | 520 | 0.00 | -| 17 | 36 | 35 | 32 | y | 0.04 | 520 | 0.00 | -| 16 | 36 | 35 | 32 | y | 0.04 | 520 | 0.00 | -| 15 | 36 | 35 | 32 | y | 0.04 | 520 | 0.00 | -| 14 | 36 | 35 | 32 | y | 0.04 | 520 | 0.00 | -| 13 | 36 | 35 | 32 | y | 0.05 | 520 | 0.00 | -| 12 | 36 | 35 | 32 | y | 0.05 | 520 | 0.00 | -| 11 | 36 | 35 | 32 | y | 0.05 | 520 | 0.00 | -| 10 | 36 | 35 | 32 | y | 0.05 | 520 | 0.00 | -| 9 | 36 | 35 | 32 | y | 0.05 | 520 | 0.00 | -| 8 | 36 | 35 | 32 | y | 0.05 | 520 | 0.00 | -| 7 | 36 | 35 | 32 | y | 0.05 | 521 | 0.00 | -| 6 | 36 | 35 | 32 | y | 0.05 | 521 | 0.00 | -| 5 | 36 | 35 | 32 | y | 0.05 | 521 | 0.00 | -| 4 | 36 | 35 | 32 | y | 0.05 | 521 | 0.00 | -| 3 | 36 | 35 | 32 | y | 0.05 | 521 | 0.00 | -| 2 | 36 | 35 | 32 | y | 0.05 | 521 | 0.00 | -| 1 | 36 | 35 | 32 | y | 0.06 | 521 | 0.00 | - -sum of inequalities over all iterations : 1120 -maximal number of inequalities : 35 - - -number of equations : 0 -number of inequalities : 35 - -output written to file PrismSimplex32.poi.ieq - - - - -log for \\optsamba\bzfloebe\PORTA\win32\bin\xporta.exe -T -l PrismSimplex32.poi - -input file PrismSimplex32.poi o.k. -dimension : 33 -number of cone-points : 0 -number of conv-points : 66 - -GAUSS - ELIMINATION: -| iter- | # equa | # ineq | max| long| non- | mem | time | -| ation | | | bit-|arith| zeros | used | used | -| | | |length|metic| in % | in kB | in sec | -|-------|------------|----------|------|-----|--------|---------|-----------| -| 34 | 34 | 1 | 1 | y | 0.31 | 119 | 0.00 | -| 33 | 33 | 2 | 1 | y | 0.30 | 119 | 0.00 | -| 32 | 32 | 3 | 1 | y | 0.29 | 119 | 0.00 | -| 31 | 31 | 4 | 1 | y | 0.27 | 118 | 0.00 | -| 30 | 30 | 5 | 1 | y | 0.24 | 117 | 0.00 | -| 29 | 29 | 6 | 2 | y | 0.27 | 119 | 0.00 | -| 28 | 28 | 7 | 2 | y | 0.29 | 120 | 0.00 | -| 27 | 27 | 8 | 2 | y | 0.30 | 121 | 0.00 | -| 26 | 26 | 9 | 3 | y | 0.31 | 122 | 0.00 | -| 25 | 25 | 10 | 3 | y | 0.34 | 124 | 0.00 | -| 24 | 24 | 11 | 3 | y | 0.34 | 124 | 0.00 | -| 23 | 23 | 12 | 3 | y | 0.34 | 124 | 0.00 | -| 22 | 22 | 13 | 3 | y | 0.36 | 126 | 0.00 | -| 21 | 21 | 14 | 4 | y | 0.38 | 127 | 0.00 | -| 20 | 20 | 15 | 4 | y | 0.36 | 126 | 0.00 | -| 19 | 19 | 16 | 3 | y | 0.35 | 126 | 0.00 | -| 18 | 18 | 17 | 3 | y | 0.36 | 127 | 0.00 | -| 17 | 17 | 18 | 4 | y | 0.36 | 127 | 0.00 | -| 16 | 16 | 19 | 6 | y | 0.37 | 128 | 0.00 | -| 15 | 15 | 20 | 7 | y | 0.37 | 129 | 0.00 | -| 14 | 14 | 21 | 9 | y | 0.40 | 130 | 0.00 | -| 13 | 13 | 22 | 11 | y | 0.41 | 131 | 0.00 | -| 12 | 12 | 23 | 12 | y | 0.43 | 132 | 0.00 | -| 11 | 11 | 24 | 14 | y | 0.44 | 133 | 0.00 | -| 10 | 10 | 25 | 15 | y | 0.44 | 133 | 0.00 | -| 9 | 9 | 26 | 18 | y | 0.44 | 133 | 0.00 | -| 8 | 8 | 27 | 20 | y | 0.44 | 134 | 0.00 | -| 7 | 7 | 28 | 23 | y | 0.46 | 135 | 0.00 | -| 6 | 6 | 29 | 25 | y | 0.47 | 136 | 0.00 | -| 5 | 5 | 30 | 29 | y | 0.46 | 136 | 0.00 | -| 4 | 4 | 31 | 31 | y | 0.47 | 137 | 0.00 | -| 3 | 3 | 32 | 62 | y | 0.46 | 144 | 0.00 | -| 2 | 2 | 33 | 62 | y | 0.48 | 145 | 0.00 | -| 1 | 1 | 34 | 62 | y | 0.49 | 145 | 0.00 | - -FOURIER - MOTZKIN - ELIMINATION: -| iter- | upper | # ineq | max| long| non- | mem | time | -| ation | bound | | bit-|arith| zeros | used | used | -| | # ineq | |length|metic| in % | in kB | in sec | -|-------|------------|----------|------|-----|--------|---------|-----------| -| 32 | 35 | 35 | 1 | y | 0.03 | 520 | 0.00 | -| 31 | 36 | 35 | 1 | y | 0.03 | 520 | 0.00 | -| 30 | 36 | 35 | 31 | y | 0.03 | 520 | 0.00 | -| 29 | 36 | 35 | 31 | y | 0.03 | 520 | 0.00 | -| 28 | 36 | 35 | 31 | y | 0.03 | 520 | 0.00 | -| 27 | 36 | 35 | 32 | y | 0.03 | 520 | 0.00 | -| 26 | 36 | 35 | 32 | y | 0.04 | 520 | 0.00 | -| 25 | 36 | 35 | 32 | y | 0.04 | 520 | 0.00 | -| 24 | 36 | 35 | 32 | y | 0.04 | 520 | 0.00 | -| 23 | 36 | 35 | 32 | y | 0.04 | 520 | 0.00 | -| 22 | 36 | 35 | 32 | y | 0.04 | 520 | 0.00 | -| 21 | 36 | 35 | 32 | y | 0.04 | 520 | 0.00 | -| 20 | 36 | 35 | 32 | y | 0.04 | 520 | 0.00 | -| 19 | 36 | 35 | 32 | y | 0.04 | 520 | 0.00 | -| 18 | 36 | 35 | 32 | y | 0.04 | 520 | 0.00 | -| 17 | 36 | 35 | 32 | y | 0.04 | 520 | 0.00 | -| 16 | 36 | 35 | 32 | y | 0.04 | 520 | 0.00 | -| 15 | 36 | 35 | 32 | y | 0.04 | 520 | 0.00 | -| 14 | 36 | 35 | 32 | y | 0.04 | 520 | 0.00 | -| 13 | 36 | 35 | 32 | y | 0.05 | 520 | 0.00 | -| 12 | 36 | 35 | 32 | y | 0.05 | 520 | 0.00 | -| 11 | 36 | 35 | 32 | y | 0.05 | 520 | 0.00 | -| 10 | 36 | 35 | 32 | y | 0.05 | 520 | 0.00 | -| 9 | 36 | 35 | 32 | y | 0.05 | 520 | 0.00 | -| 8 | 36 | 35 | 32 | y | 0.05 | 520 | 0.00 | -| 7 | 36 | 35 | 32 | y | 0.05 | 521 | 0.00 | -| 6 | 36 | 35 | 32 | y | 0.05 | 521 | 0.00 | -| 5 | 36 | 35 | 32 | y | 0.05 | 521 | 0.00 | -| 4 | 36 | 35 | 32 | y | 0.05 | 521 | 0.00 | -| 3 | 36 | 35 | 32 | y | 0.05 | 521 | 0.00 | -| 2 | 36 | 35 | 32 | y | 0.05 | 521 | 1.00 | -| 1 | 36 | 35 | 32 | y | 0.06 | 521 | 1.00 | - - - -log for \\optsamba\bzfloebe\PORTA\win32\bin\xporta.exe -T -l PrismSimplex32.poi - -input file PrismSimplex32.poi o.k. -dimension : 33 -number of cone-points : 0 -number of conv-points : 66 - -GAUSS - ELIMINATION: -| iter- | # equa | # ineq | max| long| non- | mem | time | -| ation | | | bit-|arith| zeros | used | used | -| | | |length|metic| in % | in kB | in sec | -|-------|------------|----------|------|-----|--------|---------|-----------| -| 34 | 34 | 1 | 1 | y | 0.31 | 119 | 0.00 | -| 33 | 33 | 2 | 1 | y | 0.30 | 119 | 0.00 | -| 32 | 32 | 3 | 1 | y | 0.29 | 119 | 0.00 | -| 31 | 31 | 4 | 1 | y | 0.27 | 118 | 0.00 | -| 30 | 30 | 5 | 1 | y | 0.24 | 117 | 0.00 | -| 29 | 29 | 6 | 2 | y | 0.27 | 119 | 0.00 | -| 28 | 28 | 7 | 2 | y | 0.29 | 120 | 0.00 | -| 27 | 27 | 8 | 2 | y | 0.30 | 121 | 0.00 | -| 26 | 26 | 9 | 3 | y | 0.31 | 122 | 0.00 | -| 25 | 25 | 10 | 3 | y | 0.34 | 124 | 0.00 | -| 24 | 24 | 11 | 3 | y | 0.34 | 124 | 0.00 | -| 23 | 23 | 12 | 3 | y | 0.34 | 124 | 0.00 | -| 22 | 22 | 13 | 3 | y | 0.36 | 126 | 0.00 | -| 21 | 21 | 14 | 4 | y | 0.38 | 127 | 0.00 | -| 20 | 20 | 15 | 4 | y | 0.36 | 126 | 0.00 | -| 19 | 19 | 16 | 3 | y | 0.35 | 126 | 0.00 | -| 18 | 18 | 17 | 3 | y | 0.36 | 127 | 0.00 | -| 17 | 17 | 18 | 4 | y | 0.36 | 127 | 0.00 | -| 16 | 16 | 19 | 6 | y | 0.37 | 128 | 0.00 | -| 15 | 15 | 20 | 7 | y | 0.37 | 129 | 0.00 | -| 14 | 14 | 21 | 9 | y | 0.40 | 130 | 0.00 | -| 13 | 13 | 22 | 11 | y | 0.41 | 131 | 0.00 | -| 12 | 12 | 23 | 12 | y | 0.43 | 132 | 0.00 | -| 11 | 11 | 24 | 14 | y | 0.44 | 133 | 0.00 | -| 10 | 10 | 25 | 15 | y | 0.44 | 133 | 0.00 | -| 9 | 9 | 26 | 18 | y | 0.44 | 133 | 0.00 | -| 8 | 8 | 27 | 20 | y | 0.44 | 134 | 0.00 | -| 7 | 7 | 28 | 23 | y | 0.46 | 135 | 0.00 | -| 6 | 6 | 29 | 25 | y | 0.47 | 136 | 0.00 | -| 5 | 5 | 30 | 29 | y | 0.46 | 136 | 0.00 | -| 4 | 4 | 31 | 31 | y | 0.47 | 137 | 0.00 | -| 3 | 3 | 32 | 62 | y | 0.46 | 144 | 0.00 | -| 2 | 2 | 33 | 62 | y | 0.48 | 145 | 0.00 | -| 1 | 1 | 34 | 62 | y | 0.49 | 145 | 0.00 | - -FOURIER - MOTZKIN - ELIMINATION: -| iter- | upper | # ineq | max| long| non- | mem | time | -| ation | bound | | bit-|arith| zeros | used | used | -| | # ineq | |length|metic| in % | in kB | in sec | -|-------|------------|----------|------|-----|--------|---------|-----------| -| 32 | 35 | 35 | 1 | y | 0.03 | 520 | 0.00 | -| 31 | 36 | 35 | 1 | y | 0.03 | 520 | 1.00 | -| 30 | 36 | 35 | 31 | y | 0.03 | 520 | 1.00 | -| 29 | 36 | 35 | 31 | y | 0.03 | 520 | 1.00 | -| 28 | 36 | 35 | 31 | y | 0.03 | 520 | 1.00 | -| 27 | 36 | 35 | 32 | y | 0.03 | 520 | 1.00 | -| 26 | 36 | 35 | 32 | y | 0.04 | 520 | 1.00 | -| 25 | 36 | 35 | 32 | y | 0.04 | 520 | 1.00 | -| 24 | 36 | 35 | 32 | y | 0.04 | 520 | 1.00 | -| 23 | 36 | 35 | 32 | y | 0.04 | 520 | 1.00 | -| 22 | 36 | 35 | 32 | y | 0.04 | 520 | 1.00 | -| 21 | 36 | 35 | 32 | y | 0.04 | 520 | 1.00 | -| 20 | 36 | 35 | 32 | y | 0.04 | 520 | 1.00 | -| 19 | 36 | 35 | 32 | y | 0.04 | 520 | 1.00 | -| 18 | 36 | 35 | 32 | y | 0.04 | 520 | 1.00 | -| 17 | 36 | 35 | 32 | y | 0.04 | 520 | 1.00 | -| 16 | 36 | 35 | 32 | y | 0.04 | 520 | 1.00 | -| 15 | 36 | 35 | 32 | y | 0.04 | 520 | 1.00 | -| 14 | 36 | 35 | 32 | y | 0.04 | 520 | 1.00 | -| 13 | 36 | 35 | 32 | y | 0.05 | 520 | 1.00 | -| 12 | 36 | 35 | 32 | y | 0.05 | 520 | 1.00 | -| 11 | 36 | 35 | 32 | y | 0.05 | 520 | 1.00 | -| 10 | 36 | 35 | 32 | y | 0.05 | 520 | 1.00 | -| 9 | 36 | 35 | 32 | y | 0.05 | 520 | 1.00 | -| 8 | 36 | 35 | 32 | y | 0.05 | 520 | 1.00 | -| 7 | 36 | 35 | 32 | y | 0.05 | 521 | 1.00 | -| 6 | 36 | 35 | 32 | y | 0.05 | 521 | 1.00 | -| 5 | 36 | 35 | 32 | y | 0.05 | 521 | 1.00 | -| 4 | 36 | 35 | 32 | y | 0.05 | 521 | 1.00 | -| 3 | 36 | 35 | 32 | y | 0.05 | 521 | 1.00 | -| 2 | 36 | 35 | 32 | y | 0.05 | 521 | 1.00 | -| 1 | 36 | 35 | 32 | y | 0.06 | 521 | 1.00 | - -sum of inequalities over all iterations : 1120 -maximal number of inequalities : 35 - - -number of equations : 0 -number of inequalities : 35 - -PrismSimplex32.poi.ieq moved into PrismSimplex32.poi.ieq.bak -output written to file PrismSimplex32.poi.ieq - - - - -log for \\optsamba\bzfloebe\PORTA\win32\bin\xporta.exe -T -l PrismSimplex32.poi - -input file PrismSimplex32.poi o.k. -dimension : 33 -number of cone-points : 0 -number of conv-points : 66 - -GAUSS - ELIMINATION: -| iter- | # equa | # ineq | max| long| non- | mem | time | -| ation | | | bit-|arith| zeros | used | used | -| | | |length|metic| in % | in kB | in sec | -|-------|------------|----------|------|-----|--------|---------|-----------| -| 34 | 34 | 1 | 1 | y | 0.31 | 119 | 1.00 | -| 33 | 33 | 2 | 1 | y | 0.30 | 119 | 1.00 | -| 32 | 32 | 3 | 1 | y | 0.29 | 119 | 1.00 | -| 31 | 31 | 4 | 1 | y | 0.27 | 118 | 1.00 | -| 30 | 30 | 5 | 1 | y | 0.24 | 117 | 1.00 | -| 29 | 29 | 6 | 2 | y | 0.27 | 119 | 1.00 | -| 28 | 28 | 7 | 2 | y | 0.29 | 120 | 1.00 | -| 27 | 27 | 8 | 2 | y | 0.30 | 121 | 1.00 | -| 26 | 26 | 9 | 3 | y | 0.31 | 122 | 1.00 | -| 25 | 25 | 10 | 3 | y | 0.34 | 124 | 1.00 | -| 24 | 24 | 11 | 3 | y | 0.34 | 124 | 1.00 | -| 23 | 23 | 12 | 3 | y | 0.34 | 124 | 1.00 | -| 22 | 22 | 13 | 3 | y | 0.36 | 126 | 1.00 | -| 21 | 21 | 14 | 4 | y | 0.38 | 127 | 1.00 | -| 20 | 20 | 15 | 4 | y | 0.36 | 126 | 1.00 | -| 19 | 19 | 16 | 3 | y | 0.35 | 126 | 1.00 | -| 18 | 18 | 17 | 3 | y | 0.36 | 127 | 1.00 | -| 17 | 17 | 18 | 4 | y | 0.36 | 127 | 1.00 | -| 16 | 16 | 19 | 6 | y | 0.37 | 128 | 1.00 | -| 15 | 15 | 20 | 7 | y | 0.37 | 129 | 1.00 | -| 14 | 14 | 21 | 9 | y | 0.40 | 130 | 1.00 | -| 13 | 13 | 22 | 11 | y | 0.41 | 131 | 1.00 | -| 12 | 12 | 23 | 12 | y | 0.43 | 132 | 1.00 | -| 11 | 11 | 24 | 14 | y | 0.44 | 133 | 1.00 | -| 10 | 10 | 25 | 15 | y | 0.44 | 133 | 1.00 | -| 9 | 9 | 26 | 18 | y | 0.44 | 133 | 1.00 | -| 8 | 8 | 27 | 20 | y | 0.44 | 134 | 1.00 | -| 7 | 7 | 28 | 23 | y | 0.46 | 135 | 1.00 | -| 6 | 6 | 29 | 25 | y | 0.47 | 136 | 1.00 | -| 5 | 5 | 30 | 29 | y | 0.46 | 136 | 1.00 | -| 4 | 4 | 31 | 31 | y | 0.47 | 137 | 1.00 | -| 3 | 3 | 32 | 62 | y | 0.46 | 144 | 1.00 | -| 2 | 2 | 33 | 62 | y | 0.48 | 145 | 1.00 | -| 1 | 1 | 34 | 62 | y | 0.49 | 145 | 1.00 | - -FOURIER - MOTZKIN - ELIMINATION: -| iter- | upper | # ineq | max| long| non- | mem | time | -| ation | bound | | bit-|arith| zeros | used | used | -| | # ineq | |length|metic| in % | in kB | in sec | -|-------|------------|----------|------|-----|--------|---------|-----------| -| 32 | 35 | 35 | 1 | y | 0.03 | 520 | 1.00 | -| 31 | 36 | 35 | 1 | y | 0.03 | 520 | 1.00 | -| 30 | 36 | 35 | 31 | y | 0.03 | 520 | 1.00 | -| 29 | 36 | 35 | 31 | y | 0.03 | 520 | 1.00 | -| 28 | 36 | 35 | 31 | y | 0.03 | 520 | 1.00 | -| 27 | 36 | 35 | 32 | y | 0.03 | 520 | 1.00 | -| 26 | 36 | 35 | 32 | y | 0.04 | 520 | 1.00 | -| 25 | 36 | 35 | 32 | y | 0.04 | 520 | 1.00 | -| 24 | 36 | 35 | 32 | y | 0.04 | 520 | 1.00 | -| 23 | 36 | 35 | 32 | y | 0.04 | 520 | 1.00 | -| 22 | 36 | 35 | 32 | y | 0.04 | 520 | 1.00 | -| 21 | 36 | 35 | 32 | y | 0.04 | 520 | 1.00 | -| 20 | 36 | 35 | 32 | y | 0.04 | 520 | 1.00 | -| 19 | 36 | 35 | 32 | y | 0.04 | 520 | 1.00 | -| 18 | 36 | 35 | 32 | y | 0.04 | 520 | 1.00 | -| 17 | 36 | 35 | 32 | y | 0.04 | 520 | 1.00 | -| 16 | 36 | 35 | 32 | y | 0.04 | 520 | 1.00 | -| 15 | 36 | 35 | 32 | y | 0.04 | 520 | 1.00 | -| 14 | 36 | 35 | 32 | y | 0.04 | 520 | 1.00 | -| 13 | 36 | 35 | 32 | y | 0.05 | 520 | 1.00 | -| 12 | 36 | 35 | 32 | y | 0.05 | 520 | 1.00 | -| 11 | 36 | 35 | 32 | y | 0.05 | 520 | 1.00 | -| 10 | 36 | 35 | 32 | y | 0.05 | 520 | 1.00 | -| 9 | 36 | 35 | 32 | y | 0.05 | 520 | 1.00 | -| 8 | 36 | 35 | 32 | y | 0.05 | 520 | 1.00 | -| 7 | 36 | 35 | 32 | y | 0.05 | 521 | 1.00 | -| 6 | 36 | 35 | 32 | y | 0.05 | 521 | 1.00 | -| 5 | 36 | 35 | 32 | y | 0.05 | 521 | 1.00 | -| 4 | 36 | 35 | 32 | y | 0.05 | 521 | 1.00 | -| 3 | 36 | 35 | 32 | y | 0.05 | 521 | 1.00 | -| 2 | 36 | 35 | 32 | y | 0.05 | 521 | 1.00 | -| 1 | 36 | 35 | 32 | y | 0.06 | 521 | 1.00 | - -sum of inequalities over all iterations : 1120 -maximal number of inequalities : 35 - - -number of equations : 0 -number of inequalities : 35 - -PrismSimplex32.poi.ieq moved into PrismSimplex32.poi.ieq.bak -output written to file PrismSimplex32.poi.ieq - diff --git a/win32/bin/portsort.bat b/win32/bin/portsort.bat deleted file mode 100755 index 7465f8a..0000000 --- a/win32/bin/portsort.bat +++ /dev/null @@ -1 +0,0 @@ -xporta -S %1 %2 %3 %4 %5 %6 %7 %8 %9 \ No newline at end of file diff --git a/win32/bin/posie.bat b/win32/bin/posie.bat deleted file mode 100755 index b4e2789..0000000 --- a/win32/bin/posie.bat +++ /dev/null @@ -1 +0,0 @@ -valid -P %1 %2 %3 %4 %5 %6 %7 %8 %9 \ No newline at end of file diff --git a/win32/bin/traf.bat b/win32/bin/traf.bat deleted file mode 100755 index 2acc145..0000000 --- a/win32/bin/traf.bat +++ /dev/null @@ -1 +0,0 @@ -xporta -T %1 %2 %3 %4 %5 %6 %7 %8 %9 \ No newline at end of file diff --git a/win32/bin/vint.bat b/win32/bin/vint.bat deleted file mode 100755 index d759c3b..0000000 --- a/win32/bin/vint.bat +++ /dev/null @@ -1 +0,0 @@ -valid -V %1 %2 %3 %4 %5 %6 %7 %8 %9 \ No newline at end of file diff --git a/win32/porta.sln b/win32/porta.sln deleted file mode 100755 index f0cf5e1..0000000 --- a/win32/porta.sln +++ /dev/null @@ -1,38 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "portalib", "portalib.vcproj", "{78294D47-6FB4-478C-88FC-AFC61581B5F9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "valid", "valid.vcproj", "{C52FBCD0-27A3-4208-A564-2A2E9370DD5D}" - ProjectSection(ProjectDependencies) = postProject - {78294D47-6FB4-478C-88FC-AFC61581B5F9} = {78294D47-6FB4-478C-88FC-AFC61581B5F9} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xporta", "xporta.vcproj", "{0EA5E5B0-743C-4D11-AEBB-C86E63C030C5}" - ProjectSection(ProjectDependencies) = postProject - {78294D47-6FB4-478C-88FC-AFC61581B5F9} = {78294D47-6FB4-478C-88FC-AFC61581B5F9} - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {78294D47-6FB4-478C-88FC-AFC61581B5F9}.Debug|Win32.ActiveCfg = Debug|Win32 - {78294D47-6FB4-478C-88FC-AFC61581B5F9}.Debug|Win32.Build.0 = Debug|Win32 - {78294D47-6FB4-478C-88FC-AFC61581B5F9}.Release|Win32.ActiveCfg = Release|Win32 - {78294D47-6FB4-478C-88FC-AFC61581B5F9}.Release|Win32.Build.0 = Release|Win32 - {C52FBCD0-27A3-4208-A564-2A2E9370DD5D}.Debug|Win32.ActiveCfg = Debug|Win32 - {C52FBCD0-27A3-4208-A564-2A2E9370DD5D}.Debug|Win32.Build.0 = Debug|Win32 - {C52FBCD0-27A3-4208-A564-2A2E9370DD5D}.Release|Win32.ActiveCfg = Release|Win32 - {C52FBCD0-27A3-4208-A564-2A2E9370DD5D}.Release|Win32.Build.0 = Release|Win32 - {0EA5E5B0-743C-4D11-AEBB-C86E63C030C5}.Debug|Win32.ActiveCfg = Debug|Win32 - {0EA5E5B0-743C-4D11-AEBB-C86E63C030C5}.Debug|Win32.Build.0 = Debug|Win32 - {0EA5E5B0-743C-4D11-AEBB-C86E63C030C5}.Release|Win32.ActiveCfg = Release|Win32 - {0EA5E5B0-743C-4D11-AEBB-C86E63C030C5}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/win32/portalib.vcproj b/win32/portalib.vcproj deleted file mode 100755 index cc5f233..0000000 --- a/win32/portalib.vcproj +++ /dev/null @@ -1,268 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/valid.vcproj b/win32/valid.vcproj deleted file mode 100755 index b41980c..0000000 --- a/win32/valid.vcproj +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/win32/xporta.vcproj b/win32/xporta.vcproj deleted file mode 100755 index 6f1f8fa..0000000 --- a/win32/xporta.vcproj +++ /dev/null @@ -1,316 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -