Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Absolute value PL constraint #228

Merged
merged 122 commits into from
Mar 31, 2020
Merged
Show file tree
Hide file tree
Changes from 116 commits
Commits
Show all changes
122 commits
Select commit Hold shift + click to select a range
4ea217f
initial abs cinstraint, three files - h, cpp and error
shiranaziz May 15, 2019
56613e8
variable name
shiranaziz May 15, 2019
2b5d4a2
removing run3 files
clazarus May 21, 2019
f2f373a
wip
GuyKatzHuji May 22, 2019
f0e1834
Sources.mk - add AbsConstraint.cpp; AbsConstraint.cpp - Add some sig…
shiranaziz May 22, 2019
670b661
add constant ABS_CONSTRAINT_COMPARISON_TOLERANCE
shiranaziz May 22, 2019
611ea76
add ifndef to AbsConstraint.h
shiranaziz May 22, 2019
ef83ad7
add some signatures to AbsConstraint.h and fix some signatures at Ab…
shiranaziz May 22, 2019
470cb09
fixing errors
shiranaziz May 22, 2019
a8fd8f6
fix errors
shiranaziz May 25, 2019
76b96b1
split and more
shiranaziz May 28, 2019
e4ad19b
add some signatures
shiranaziz May 28, 2019
5c86a6e
notify functions
shiranaziz Jun 11, 2019
0757204
finsh write functions. next step - testing
shiranaziz Jun 12, 2019
8921f17
test file
shiranaziz Jun 13, 2019
0802502
notifyLowerBound and notifyUpperBound
shiranaziz Jun 22, 2019
eeb04ce
test with sumathi
shiranaziz Jun 23, 2019
8ae7a1d
add check at notify lower/upper bound if new bound is better then ol…
shiranaziz Jun 25, 2019
c2404c1
getEntailedTightenings
shiranaziz Jun 25, 2019
08a512a
fix at notifyUpperBound
shiranaziz Jun 25, 2019
6d99119
Test to entailed_tighteningst
shiranaziz Jun 25, 2019
51d0082
duplicate and restore
shiranaziz Aug 22, 2019
5af54ba
register_and_unregister
shiranaziz Aug 24, 2019
26e1686
test for notifyVariableValue, satisfied and updateVariableIndex
shiranaziz Aug 24, 2019
340dd17
more tests
shiranaziz Aug 24, 2019
bde322a
edit comments
shiranaziz Aug 24, 2019
09a6df1
more tests
shiranaziz Aug 24, 2019
328eaf4
some fixes
shiranaziz Aug 27, 2019
1e0d6cd
some fixes
shiranaziz Aug 27, 2019
3c9f487
fix
shiranaziz Aug 27, 2019
264d4e9
add getter to _lowerBounds
shiranaziz Aug 27, 2019
69f1994
test_abs_entailed_tighteningst
shiranaziz Aug 27, 2019
95cad3c
fix
shiranaziz Aug 27, 2019
00f02d9
upper\lower bpound f <0 , get_upper_bound
shiranaziz Sep 5, 2019
8607a48
more testing and print func
shiranaziz Sep 5, 2019
c1ed5bf
fix x_f<0
shiranaziz Sep 5, 2019
5ccf804
fix x_f<0
shiranaziz Sep 5, 2019
8187103
some changes
shiranaziz Oct 6, 2019
94a8e00
some changes
shiranaziz Oct 6, 2019
2d07867
without test_abs_entailed_tighteningst2
shiranaziz Oct 6, 2019
b10fab7
some changes if upper/ lower bound <0
shiranaziz Oct 12, 2019
b6d5636
fix tighteningst2
shiranaziz Oct 12, 2019
e6ae748
some fixes
shiranaziz Oct 14, 2019
b2c3df9
more tests for getEntailedTightenings
shiranaziz Oct 14, 2019
884c52e
add cases to getEntailedTightnings
shiranaziz Oct 16, 2019
95d2d99
finish testing getEntailedTighteningsgit add Test_AbsConstraint.h!
shiranaziz Oct 16, 2019
d2a752a
change non overlap at getEntailedTightenings
shiranaziz Oct 17, 2019
51aa53c
change ovelap tests
shiranaziz Oct 17, 2019
d18162e
CMakeLists
shiranaziz Oct 17, 2019
b35d75a
test fixes and case split
shiranaziz Oct 17, 2019
7fe0ab3
fix
shiranaziz Oct 29, 2019
02b304e
finish tests
shiranaziz Oct 29, 2019
7f42963
abs_feasible_2 like relu_feasible_2
shiranaziz Nov 10, 2019
c209076
add regress for abs constraint
shiranaziz Nov 12, 2019
53f557d
add some print at getEntailedTightening befor ASSERT
shiranaziz Nov 12, 2019
d422a07
notifynotifyLowerBound if var == _f && bound <0. i delete & bound ==0
shiranaziz Nov 18, 2019
c986639
same as befor change not is posetive
shiranaziz Nov 18, 2019
884d964
change the part when the bounds of _f need to be zero
shiranaziz Nov 18, 2019
8dfd0b9
notifyLowerBound and upper, when update the prtner, if var is f, i ad…
shiranaziz Nov 19, 2019
7e1db00
test_abs_entailed_tighteningst0 if lower bound of f is <0
shiranaziz Nov 19, 2019
05fe005
check that _constraintBoundTightener exists before using it
GuyKatzHuji Nov 19, 2019
7ea77be
add test for _f bound<0
shiranaziz Nov 19, 2019
10eec91
more test lower bounf f<0
shiranaziz Nov 24, 2019
14d0f0d
1 is UNSAT- not working, 2 is SAT
shiranaziz Dec 3, 2019
1d3604c
getE fix overlap
shiranaziz Dec 3, 2019
2190c7b
get lower bound, change to double
shiranaziz Dec 3, 2019
98c9ca3
more tests
shiranaziz Dec 3, 2019
26fbf6a
add feasible2
shiranaziz Dec 3, 2019
a5ad749
non
shiranaziz Dec 3, 2019
2056e24
better printing of bounds
GuyKatzHuji Dec 5, 2019
1da8264
without no overlap
shiranaziz Dec 7, 2019
5f29476
fix
shiranaziz Dec 7, 2019
9ddbfb7
unsat
shiranaziz Dec 19, 2019
cba8a49
more regress
shiranaziz Dec 19, 2019
a745558
getEntailedTightenings without max positive
shiranaziz Dec 19, 2019
1665e78
fix a bug regarding bound extraction of fixed variables
guykatzz Dec 19, 2019
0b81d98
Entailed_Tightenings without max and min
shiranaziz Dec 19, 2019
550e2c1
more regress
shiranaziz Dec 19, 2019
52a2c9b
match to tha changes at absconstraint
shiranaziz Dec 19, 2019
8821190
without max/min at getEntailedTightenings
shiranaziz Dec 19, 2019
0429da2
match to changes at ans
shiranaziz Dec 19, 2019
cee68fd
more regress
shiranaziz Dec 19, 2019
075de39
conflict res
shiranaziz Dec 22, 2019
b608000
add new files acas regress fixed input and with constraint. inputQuer…
shiranaziz Dec 28, 2019
fb06a31
check correctness
shiranaziz Dec 28, 2019
5d6cba6
fix the new network, but there is steal problem
shiranaziz Jan 12, 2020
145b7b3
fix the new network, but there is yet problem
shiranaziz Jan 12, 2020
dcee0e3
change fix point
shiranaziz Jan 14, 2020
cfdf45f
configuration
guykatzz Jan 14, 2020
42a9d73
fix acas abs constraint
shiranaziz Jan 14, 2020
44e1bde
add for at the main, add documentaion
shiranaziz Jan 15, 2020
5114524
coding style
shiranaziz Feb 15, 2020
9332e16
changes
shiranaziz Feb 15, 2020
359e524
Merge branch 'absLinearConstraint'
guykatzz Mar 24, 2020
3eefe70
Merge branch 'master' into absLinearConstraint
guykatzz Mar 24, 2020
cd16714
minor
guykatzz Mar 24, 2020
ab8ec66
the old regression test moved to be a system test
guykatzz Mar 24, 2020
18b4fc9
moving some files around
guykatzz Mar 25, 2020
d353571
typo
guykatzz Mar 25, 2020
6e76d21
compilation issues
guykatzz Mar 25, 2020
a7e6f65
cleanup
guykatzz Mar 25, 2020
808159d
cleanup
guykatzz Mar 25, 2020
2053ce2
refactoring
guykatzz Mar 25, 2020
b631f85
finished pass on main class
guykatzz Mar 26, 2020
8d66225
remove AbsError class
guykatzz Mar 26, 2020
9dd4cb9
compilation
guykatzz Mar 26, 2020
05eba84
thorough phass over the unit tests
guykatzz Mar 26, 2020
7884dbd
more polishing of bound tighting and phase-fixing-detection
guykatzz Mar 26, 2020
76f2903
system test cleanup
guykatzz Mar 26, 2020
05d7dbc
dont override variable elimination
guykatzz Mar 26, 2020
7145de2
additional tests
guykatzz Mar 26, 2020
9cd081a
some more cleanup
guykatzz Mar 26, 2020
e001a13
remove a few comments
guykatzz Mar 26, 2020
d51c883
Merge from master (#231)
guykatzz Mar 26, 2020
33c0d7f
bug fix
guykatzz Mar 27, 2020
0320b0e
remove "unused"s
guykatzz Mar 27, 2020
f9f42da
minor
guykatzz Mar 28, 2020
2a4c3e1
Aleks' comments
guykatzz Mar 28, 2020
d9fac60
merge
guykatzz Mar 28, 2020
56c8b7c
space
guykatzz Mar 28, 2020
0d94cab
test no longer needed
guykatzz Mar 28, 2020
b5f08c3
Merge branch 'master' into absLinearConstraint
guykatzz Mar 31, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ endif()

if (NOT MSVC)
set(COMPILE_FLAGS -Wall -Wextra -Werror -MMD) #-Wno-deprecated
set(RELEASE_FLAGS -O3) #-Wno-deprecated
set(RELEASE_FLAGS ${COMPILE_FLAGS} -O3) #-Wno-deprecated
endif()

if (RUN_MEMORY_TEST)
Expand All @@ -104,20 +104,17 @@ endif()
add_definitions(-DRESOURCES_DIR="${RESOURCES_DIR}")

if (NOT MSVC)
set(DEBUG_FLAGS ${COMPILE_FLAGS} ${MEMORY_FLAGS} -g -DDEBUG_ON)
set(DEBUG_FLAGS ${COMPILE_FLAGS} ${MEMORY_FLAGS} -g)
set(CXXTEST_FLAGS ${DEBUG_FLAGS} -Wno-ignored-qualifiers)
else()
set(DEBUG_FLAGS ${COMPILE_FLAGS} ${MEMORY_FLAGS} /DDEBUG_ON)
set(DEBUG_FLAGS ${COMPILE_FLAGS} ${MEMORY_FLAGS})
add_definitions(-DNOMINMAX) # remove min max macros
endif()

if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set(CXXTEST_FLAGS ${CXXTEST_FLAGS} -Wno-terminate)
endif()

if (NOT MSVC)
set(RELEASE_FLAGS ${COMPILE_FLAGS} -O3)
endif()


# Boost
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ To enable multiprocess build change the last command to:
```
cmake --build . -j PROC_NUM
```
To compile in debug mode (default is release)
```
cmake .. -DCMAKE_BUILD_TYPE=Debug
cmake --build .
```

The compiled binary will be in the *build* directory, named _Marabou_

To run tests we use [ctest](https://cmake.org/cmake/help/v3.15/manual/ctest.1.html).
Expand Down
7 changes: 3 additions & 4 deletions src/common/Debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@

#include <cstdlib>

// #define DEBUG_ON

#ifdef DEBUG_ON
#ifndef NDEBUG
# define DEBUG(x) x
#else
# define DEBUG(x)
#endif

#ifdef DEBUG_ON
#ifndef NDEBUG
# define ASSERTM(x, y, ...) \
{ \
if ( !( x ) ) \
Expand All @@ -39,7 +38,7 @@
# define ASSERTM(x, y, ...)
#endif

#ifdef DEBUG_ON
#ifndef NDEBUG
# define ASSERT(x) \
{ \
if ( !( x ) ) \
Expand Down
1 change: 1 addition & 0 deletions src/configuration/GlobalConfiguration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ const double GlobalConfiguration::PSE_GAMMA_ERROR_THRESHOLD = 0.001;
const double GlobalConfiguration::PSE_GAMMA_UPDATE_TOLERANCE = 0.000000001;

const double GlobalConfiguration::RELU_CONSTRAINT_COMPARISON_TOLERANCE = 0.001;
const double GlobalConfiguration::ABS_CONSTRAINT_COMPARISON_TOLERANCE = 0.001;

const bool GlobalConfiguration::ONLY_AUX_INITIAL_BASIS = false;

Expand Down
5 changes: 4 additions & 1 deletion src/configuration/GlobalConfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,12 @@ class GlobalConfiguration
// PSE's Gamma function's update tolerance
static const double PSE_GAMMA_UPDATE_TOLERANCE;

// The tolerance for checking whether f = Relu( b ), to determine a ReLU's statisfaction
// The tolerance for checking whether f = Relu( b )
static const double RELU_CONSTRAINT_COMPARISON_TOLERANCE;

// The tolerance for checking whether f = Abs( b )
static const double ABS_CONSTRAINT_COMPARISON_TOLERANCE;

// Should the initial basis be comprised only of auxiliary (row) variables?
static const bool ONLY_AUX_INITIAL_BASIS;

Expand Down
Loading