Index: /vis_dev/glu-2.1/configure
===================================================================
--- /vis_dev/glu-2.1/configure	(revision 8)
+++ /vis_dev/glu-2.1/configure	(revision 9)
@@ -7629,5 +7629,5 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 # Files that config.status was made for.
-config_files="`echo $ac_config_files`"
+config_files="$ac_config_files"
 
 _ACEOF
Index: /vis_dev/sharpSAT/Makefile
===================================================================
--- /vis_dev/sharpSAT/Makefile	(revision 9)
+++ /vis_dev/sharpSAT/Makefile	(revision 9)
@@ -0,0 +1,153 @@
+
+CXX      = g++ 
+CXXFLAGS = -pipe -w -O3 -DGMP_BIGNUM -DCOMPILE_FOR_GUI
+INCPATH  =  -I. -Isrc/shared -I/usr/include 
+LINK     = g++
+LFLAGS   = 
+LIBS     = $(SUBLIBS) -L/usr/lib/ -lgmpxx -lgmp 
+TAR      = tar -cf
+GZIP     = gzip -9f
+COPY     = cp -f
+COPY_FILE= $(COPY)
+COPY_DIR = $(COPY) -r
+INSTALL_FILE= $(COPY_FILE)
+INSTALL_DIR = $(COPY_DIR)
+DEL_FILE = rm -f
+SYMLINK  = ln -sf
+DEL_DIR  = rmdir
+MOVE     = mv -f
+CHK_DIR_EXISTS= test -d
+MKDIR    = mkdir -p
+
+####### Output directory
+
+OBJECTS_DIR = ./
+
+####### Files
+
+HEADERS = src/src_sharpSAT/Basics.h \
+		src/shared/SomeTime.h \
+		src/shared/RealNumberTypes.h \
+		src/shared/Interface/AnalyzerData.h \
+		src/src_sharpSAT/MainSolver/DecisionStack.h \
+		src/src_sharpSAT/MainSolver/MainSolver.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/ComponentTypes.h \
+		src/src_sharpSAT/MainSolver/FormulaCache.h
+SOURCES = src/src_sharpSAT/Basics.cpp \
+		src/shared/SomeTime.cpp \
+		src/shared/RealNumberTypes.cpp \
+		src/shared/Interface/AnalyzerData.cpp \
+		src/src_sharpSAT/MainSolver/DecisionStack.cpp \
+		src/src_sharpSAT/MainSolver/MainSolver.cpp \
+		src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.cpp \
+		src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.cpp \
+		src/src_sharpSAT/main.cpp \
+		src/src_sharpSAT/MainSolver/FormulaCache.cpp
+OBJECTS = Basics.o \
+		SomeTime.o \
+		RealNumberTypes.o \
+		AnalyzerData.o \
+		DecisionStack.o \
+		MainSolver.o \
+		InstanceGraph.o \
+		AtomsAndNodes.o \
+		main.o \
+		FormulaCache.o
+TARGET   = sharpSAT
+
+first: all
+####### Implicit rules
+
+.SUFFIXES: .c .o .cpp .cc .cxx .C
+
+.cpp.o:
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
+
+.cc.o:
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
+
+.cxx.o:
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
+
+.C.o:
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
+
+.c.o:
+	$(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
+
+####### Build rules
+
+all: Makefile $(TARGET)
+
+$(TARGET):  $(OBJECTS) 
+	$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS)
+clean:
+	-$(DEL_FILE) $(OBJECTS)
+	-$(DEL_FILE) *~ core *.core
+
+
+####### Sub-libraries
+
+distclean: clean
+	-$(DEL_FILE) $(TARGET) $(TARGET)
+
+
+FORCE:
+
+####### Compile
+
+Basics.o: src/src_sharpSAT/Basics.cpp src/src_sharpSAT/Basics.h
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o Basics.o src/src_sharpSAT/Basics.cpp
+
+SomeTime.o: src/shared/SomeTime.cpp src/shared/SomeTime.h
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o SomeTime.o src/shared/SomeTime.cpp
+
+RealNumberTypes.o: src/shared/RealNumberTypes.cpp src/shared/RealNumberTypes.h
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o RealNumberTypes.o src/shared/RealNumberTypes.cpp
+
+AnalyzerData.o: src/shared/Interface/AnalyzerData.cpp src/shared/Interface/AnalyzerData.h
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o AnalyzerData.o src/shared/Interface/AnalyzerData.cpp
+
+DecisionStack.o: src/src_sharpSAT/MainSolver/DecisionStack.cpp src/src_sharpSAT/MainSolver/DecisionStack.h \
+		src/src_sharpSAT/Basics.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/ComponentTypes.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.h
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o DecisionStack.o src/src_sharpSAT/MainSolver/DecisionStack.cpp
+
+MainSolver.o: src/src_sharpSAT/MainSolver/MainSolver.cpp src/src_sharpSAT/MainSolver/MainSolver.h \
+		src/src_sharpSAT/Basics.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.h \
+		src/src_sharpSAT/MainSolver/FormulaCache.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/ComponentTypes.h \
+		src/src_sharpSAT/MainSolver/DecisionStack.h
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o MainSolver.o src/src_sharpSAT/MainSolver/MainSolver.cpp
+
+InstanceGraph.o: src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.cpp src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.h \
+		src/src_sharpSAT/Basics.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.h
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o InstanceGraph.o src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.cpp
+
+AtomsAndNodes.o: src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.cpp src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.h \
+		src/src_sharpSAT/Basics.h
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o AtomsAndNodes.o src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.cpp
+
+main.o: src/src_sharpSAT/main.cpp src/src_sharpSAT/MainSolver/MainSolver.h \
+		src/src_sharpSAT/Basics.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.h \
+		src/src_sharpSAT/MainSolver/FormulaCache.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/ComponentTypes.h \
+		src/src_sharpSAT/MainSolver/DecisionStack.h
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o src/src_sharpSAT/main.cpp
+
+FormulaCache.o: src/src_sharpSAT/MainSolver/FormulaCache.cpp src/src_sharpSAT/MainSolver/FormulaCache.h \
+		src/src_sharpSAT/Basics.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/ComponentTypes.h \
+		src/src_sharpSAT/MainSolver/DecisionStack.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.h
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o FormulaCache.o src/src_sharpSAT/MainSolver/FormulaCache.cpp
Index: /vis_dev/sharpSAT/Makefile_ar
===================================================================
--- /vis_dev/sharpSAT/Makefile_ar	(revision 9)
+++ /vis_dev/sharpSAT/Makefile_ar	(revision 9)
@@ -0,0 +1,153 @@
+
+CXX      = g++ 
+CXXFLAGS = -pipe -O3 -w  -DGMP_BIGNUM -DCOMPILE_FOR_GUI
+INCPATH  =  -I. -Isrc/shared -I/usr/include 
+LINK     = ar r
+LFLAGS   = 
+LIBS     = $(SUBLIBS) -L/usr/lib/ -lgmpxx -lgmp 
+TAR      = tar -cf
+GZIP     = gzip -9f
+COPY     = cp -f
+COPY_FILE= $(COPY)
+COPY_DIR = $(COPY) -r
+INSTALL_FILE= $(COPY_FILE)
+INSTALL_DIR = $(COPY_DIR)
+DEL_FILE = rm -f
+SYMLINK  = ln -sf
+DEL_DIR  = rmdir
+MOVE     = mv -f
+CHK_DIR_EXISTS= test -d
+MKDIR    = mkdir -p
+
+####### Output directory
+
+OBJECTS_DIR = ./
+
+####### Files
+
+HEADERS = src/src_sharpSAT/Basics.h \
+		src/shared/SomeTime.h \
+		src/shared/RealNumberTypes.h \
+		src/shared/Interface/AnalyzerData.h \
+		src/src_sharpSAT/MainSolver/DecisionStack.h \
+		src/src_sharpSAT/MainSolver/MainSolver.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/ComponentTypes.h \
+		src/src_sharpSAT/MainSolver/FormulaCache.h
+SOURCES = src/src_sharpSAT/Basics.cpp \
+		src/shared/SomeTime.cpp \
+		src/shared/RealNumberTypes.cpp \
+		src/shared/Interface/AnalyzerData.cpp \
+		src/src_sharpSAT/MainSolver/DecisionStack.cpp \
+		src/src_sharpSAT/MainSolver/MainSolver.cpp \
+		src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.cpp \
+		src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.cpp \
+		src/src_sharpSAT/main_.cpp \
+		src/src_sharpSAT/MainSolver/FormulaCache.cpp
+OBJECTS = Basics.o \
+		SomeTime.o \
+		RealNumberTypes.o \
+		AnalyzerData.o \
+		DecisionStack.o \
+		MainSolver.o \
+		InstanceGraph.o \
+		AtomsAndNodes.o \
+		main_.o \
+		FormulaCache.o
+TARGET   = sharpSAT.a
+
+first: all
+####### Implicit rules
+
+.SUFFIXES: .c .o .cpp .cc .cxx .C
+
+.cpp.o:
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
+
+.cc.o:
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
+
+.cxx.o:
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
+
+.C.o:
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
+
+.c.o:
+	$(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
+
+####### Build rules
+
+all: Makefile $(TARGET)
+
+$(TARGET):  $(OBJECTS) 
+	$(LINK) $(LFLAGS) $(TARGET) $(OBJECTS) $(LIBS)
+clean:
+	-$(DEL_FILE) $(OBJECTS)
+	-$(DEL_FILE) *~ core *.core
+
+
+####### Sub-libraries
+
+distclean: clean
+	-$(DEL_FILE) $(TARGET) $(TARGET)
+
+
+FORCE:
+
+####### Compile
+
+Basics.o: src/src_sharpSAT/Basics.cpp src/src_sharpSAT/Basics.h
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o Basics.o src/src_sharpSAT/Basics.cpp
+
+SomeTime.o: src/shared/SomeTime.cpp src/shared/SomeTime.h
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o SomeTime.o src/shared/SomeTime.cpp
+
+RealNumberTypes.o: src/shared/RealNumberTypes.cpp src/shared/RealNumberTypes.h
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o RealNumberTypes.o src/shared/RealNumberTypes.cpp
+
+AnalyzerData.o: src/shared/Interface/AnalyzerData.cpp src/shared/Interface/AnalyzerData.h
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o AnalyzerData.o src/shared/Interface/AnalyzerData.cpp
+
+DecisionStack.o: src/src_sharpSAT/MainSolver/DecisionStack.cpp src/src_sharpSAT/MainSolver/DecisionStack.h \
+		src/src_sharpSAT/Basics.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/ComponentTypes.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.h
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o DecisionStack.o src/src_sharpSAT/MainSolver/DecisionStack.cpp
+
+MainSolver.o: src/src_sharpSAT/MainSolver/MainSolver.cpp src/src_sharpSAT/MainSolver/MainSolver.h \
+		src/src_sharpSAT/Basics.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.h \
+		src/src_sharpSAT/MainSolver/FormulaCache.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/ComponentTypes.h \
+		src/src_sharpSAT/MainSolver/DecisionStack.h
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o MainSolver.o src/src_sharpSAT/MainSolver/MainSolver.cpp
+
+InstanceGraph.o: src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.cpp src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.h \
+		src/src_sharpSAT/Basics.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.h
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o InstanceGraph.o src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.cpp
+
+AtomsAndNodes.o: src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.cpp src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.h \
+		src/src_sharpSAT/Basics.h
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o AtomsAndNodes.o src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.cpp
+
+main_.o: src/src_sharpSAT/main.cpp src/src_sharpSAT/MainSolver/MainSolver.h \
+		src/src_sharpSAT/Basics.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.h \
+		src/src_sharpSAT/MainSolver/FormulaCache.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/ComponentTypes.h \
+		src/src_sharpSAT/MainSolver/DecisionStack.h
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o main_.o src/src_sharpSAT/main_.cpp
+
+FormulaCache.o: src/src_sharpSAT/MainSolver/FormulaCache.cpp src/src_sharpSAT/MainSolver/FormulaCache.h \
+		src/src_sharpSAT/Basics.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/ComponentTypes.h \
+		src/src_sharpSAT/MainSolver/DecisionStack.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.h
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o FormulaCache.o src/src_sharpSAT/MainSolver/FormulaCache.cpp
Index: /vis_dev/sharpSAT/Makefile_nogmp
===================================================================
--- /vis_dev/sharpSAT/Makefile_nogmp	(revision 9)
+++ /vis_dev/sharpSAT/Makefile_nogmp	(revision 9)
@@ -0,0 +1,153 @@
+
+CXX      = g++
+CXXFLAGS = -pipe -O3 -w  
+INCPATH  =  -I. -Isrc/shared -I/usr/include 
+LINK     = g++
+LFLAGS   = 
+LIBS     = $(SUBLIBS) -L/usr/lib/ 
+TAR      = tar -cf
+GZIP     = gzip -9f
+COPY     = cp -f
+COPY_FILE= $(COPY)
+COPY_DIR = $(COPY) -r
+INSTALL_FILE= $(COPY_FILE)
+INSTALL_DIR = $(COPY_DIR)
+DEL_FILE = rm -f
+SYMLINK  = ln -sf
+DEL_DIR  = rmdir
+MOVE     = mv -f
+CHK_DIR_EXISTS= test -d
+MKDIR    = mkdir -p
+
+####### Output directory
+
+OBJECTS_DIR = ./
+
+####### Files
+
+HEADERS = src/src_sharpSAT/Basics.h \
+		src/shared/SomeTime.h \
+		src/shared/RealNumberTypes.h \
+		src/shared/Interface/AnalyzerData.h \
+		src/src_sharpSAT/MainSolver/DecisionStack.h \
+		src/src_sharpSAT/MainSolver/MainSolver.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/ComponentTypes.h \
+		src/src_sharpSAT/MainSolver/FormulaCache.h
+SOURCES = src/src_sharpSAT/Basics.cpp \
+		src/shared/SomeTime.cpp \
+		src/shared/RealNumberTypes.cpp \
+		src/shared/Interface/AnalyzerData.cpp \
+		src/src_sharpSAT/MainSolver/DecisionStack.cpp \
+		src/src_sharpSAT/MainSolver/MainSolver.cpp \
+		src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.cpp \
+		src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.cpp \
+		src/src_sharpSAT/main.cpp \
+		src/src_sharpSAT/MainSolver/FormulaCache.cpp
+OBJECTS = Basics.o \
+		SomeTime.o \
+		RealNumberTypes.o \
+		AnalyzerData.o \
+		DecisionStack.o \
+		MainSolver.o \
+		InstanceGraph.o \
+		AtomsAndNodes.o \
+		main.o \
+		FormulaCache.o
+TARGET   = sharpSAT
+
+first: all
+####### Implicit rules
+
+.SUFFIXES: .c .o .cpp .cc .cxx .C
+
+.cpp.o:
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
+
+.cc.o:
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
+
+.cxx.o:
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
+
+.C.o:
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
+
+.c.o:
+	$(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
+
+####### Build rules
+
+all: Makefile $(TARGET)
+
+$(TARGET):  $(OBJECTS) 
+	$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS)
+clean:
+	-$(DEL_FILE) $(OBJECTS)
+	-$(DEL_FILE) *~ core *.core
+
+
+####### Sub-libraries
+
+distclean: clean
+	-$(DEL_FILE) $(TARGET) $(TARGET)
+
+
+FORCE:
+
+####### Compile
+
+Basics.o: src/src_sharpSAT/Basics.cpp src/src_sharpSAT/Basics.h
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o Basics.o src/src_sharpSAT/Basics.cpp
+
+SomeTime.o: src/shared/SomeTime.cpp src/shared/SomeTime.h
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o SomeTime.o src/shared/SomeTime.cpp
+
+RealNumberTypes.o: src/shared/RealNumberTypes.cpp src/shared/RealNumberTypes.h
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o RealNumberTypes.o src/shared/RealNumberTypes.cpp
+
+AnalyzerData.o: src/shared/Interface/AnalyzerData.cpp src/shared/Interface/AnalyzerData.h
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o AnalyzerData.o src/shared/Interface/AnalyzerData.cpp
+
+DecisionStack.o: src/src_sharpSAT/MainSolver/DecisionStack.cpp src/src_sharpSAT/MainSolver/DecisionStack.h \
+		src/src_sharpSAT/Basics.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/ComponentTypes.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.h
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o DecisionStack.o src/src_sharpSAT/MainSolver/DecisionStack.cpp
+
+MainSolver.o: src/src_sharpSAT/MainSolver/MainSolver.cpp src/src_sharpSAT/MainSolver/MainSolver.h \
+		src/src_sharpSAT/Basics.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.h \
+		src/src_sharpSAT/MainSolver/FormulaCache.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/ComponentTypes.h \
+		src/src_sharpSAT/MainSolver/DecisionStack.h
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o MainSolver.o src/src_sharpSAT/MainSolver/MainSolver.cpp
+
+InstanceGraph.o: src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.cpp src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.h \
+		src/src_sharpSAT/Basics.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.h
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o InstanceGraph.o src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.cpp
+
+AtomsAndNodes.o: src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.cpp src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.h \
+		src/src_sharpSAT/Basics.h
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o AtomsAndNodes.o src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.cpp
+
+main.o: src/src_sharpSAT/main.cpp src/src_sharpSAT/MainSolver/MainSolver.h \
+		src/src_sharpSAT/Basics.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.h \
+		src/src_sharpSAT/MainSolver/FormulaCache.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/ComponentTypes.h \
+		src/src_sharpSAT/MainSolver/DecisionStack.h
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o src/src_sharpSAT/main.cpp
+
+FormulaCache.o: src/src_sharpSAT/MainSolver/FormulaCache.cpp src/src_sharpSAT/MainSolver/FormulaCache.h \
+		src/src_sharpSAT/Basics.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/ComponentTypes.h \
+		src/src_sharpSAT/MainSolver/DecisionStack.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.h \
+		src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.h
+	$(CXX) -c $(CXXFLAGS) $(INCPATH) -o FormulaCache.o src/src_sharpSAT/MainSolver/FormulaCache.cpp
Index: /vis_dev/sharpSAT/README
===================================================================
--- /vis_dev/sharpSAT/README	(revision 9)
+++ /vis_dev/sharpSAT/README	(revision 9)
@@ -0,0 +1,11 @@
+sharpSAT version 1.1
+
+To compile this version of sharpSAT simply run
+
+make
+
+Note that this only works, if you have gmp installed. sharpSAT uses GMP to store the model counting results with infinite precision.
+
+If you do not want to use infinite precsision numbers in sharpSAT you simply have to use
+Makefile_nogmp instead of the standard Makefile.
+
Index: /vis_dev/sharpSAT/res_sat
===================================================================
--- /vis_dev/sharpSAT/res_sat	(revision 9)
+++ /vis_dev/sharpSAT/res_sat	(revision 9)
@@ -0,0 +1,1 @@
+100657278205558784
Index: /vis_dev/sharpSAT/semantic.cache
===================================================================
--- /vis_dev/sharpSAT/semantic.cache	(revision 9)
+++ /vis_dev/sharpSAT/semantic.cache	(revision 9)
@@ -0,0 +1,15 @@
+;; Object sharpSAT/
+;; SEMANTICDB Tags save file
+(semanticdb-project-database-file "sharpSAT/"
+  :tables (list 
+   (semanticdb-table "Makefile"
+    :major-mode 'makefile-gmake-mode
+    :tags '(("CXX" variable (:default-value ("g++")) nil [2 18]) ("CXXFLAGS" variable (:default-value ("-pipe" "-O3" "-w" "-DGMP_BIGNUM" "-DCOMPILE_FOR_GUI")) nil [18 74]) ("INCPATH" variable (:default-value ("-I." "-Isrc/shared" "-I/usr/include")) nil [74 119]) ("LINK" variable (:default-value ("ar" "r")) nil [119 135]) ("LFLAGS" variable nil nil [135 147]) ("LIBS" variable (:default-value ("$(SUBLIBS)" "-L/usr/lib/" "-lgmpxx" "-lgmp")) nil [147 196]) ("TAR" variable (:default-value ("tar" "-cf")) nil [196 215]) ("GZIP" variable (:default-value ("gzip" "-9f")) nil [215 235]) ("COPY" variable (:default-value ("cp" "-f")) nil [235 252]) ("COPY_FILE" variable (:default-value ("$(COPY)")) nil [252 271]) ("COPY_DIR" variable (:default-value ("$(COPY)" "-r")) nil [271 293]) ("INSTALL_FILE" variable (:default-value ("$(COPY_FILE)")) nil [293 320]) ("INSTALL_DIR" variable (:default-value ("$(COPY_DIR)")) nil [320 346]) ("DEL_FILE" variable (:default-value ("rm" "-f")) nil [346 363]) ("SYMLINK" variable (:default-value ("ln" "-sf")) nil [363 381]) ("DEL_DIR" variable (:default-value ("rmdir")) nil [381 398]) ("MOVE" variable (:default-value ("mv" "-f")) nil [398 415]) ("CHK_DIR_EXISTS" variable (:default-value ("test" "-d")) nil [415 439]) ("MKDIR" variable (:default-value ("mkdir" "-p")) nil [439 459]) ("OBJECTS_DIR" variable (:default-value ("./")) nil [486 503]) ("HEADERS" variable (:default-value ("src/src_sharpSAT/Basics.h" "src/shared/SomeTime.h" "src/shared/RealNumberTypes.h" "src/shared/Interface/AnalyzerData.h" "src/src_sharpSAT/MainSolver/DecisionStack.h" "src/src_sharpSAT/MainSolver/MainSolver.h" "src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.h" "src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.h" "src/src_sharpSAT/MainSolver/InstanceGraph/ComponentTypes.h" "src/src_sharpSAT/MainSolver/FormulaCache.h")) nil [519 981]) ("SOURCES" variable (:default-value ("src/src_sharpSAT/Basics.cpp" "src/shared/SomeTime.cpp" "src/shared/RealNumberTypes.cpp" "src/shared/Interface/AnalyzerData.cpp" "src/src_sharpSAT/MainSolver/DecisionStack.cpp" "src/src_sharpSAT/MainSolver/MainSolver.cpp" "src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.cpp" "src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.cpp" "src/src_sharpSAT/main_.cpp" "src/src_sharpSAT/MainSolver/FormulaCache.cpp")) nil [981 1429]) ("OBJECTS" variable (:default-value ("Basics.o" "SomeTime.o" "RealNumberTypes.o" "AnalyzerData.o" "DecisionStack.o" "MainSolver.o" "InstanceGraph.o" "AtomsAndNodes.o" "main_.o" "FormulaCache.o")) nil [1429 1612]) ("TARGET" variable (:default-value ("sharpSAT.a")) nil [1612 1634]) ("first" function (:arguments ("all")) nil [1635 1669]) (".SUFFIXES" function (:arguments (".c" ".o" ".cpp" ".cc" ".cxx" ".C")) nil [1670 1705]) (".cpp.o" function nil nil [1705 1757]) (".cc.o" function nil nil [1757 1808]) (".cxx.o" function nil nil [1808 1860]) (".C.o" function nil nil [1860 1910]) (".c.o" function nil nil [1910 1957]) ("all" function (:arguments ("Makefile" "$(TARGET)")) nil [1978 2003]) ("$(TARGET)" function (:arguments ("$(OBJECTS)")) nil [2003 2080]) ("clean" function nil nil [2075 2137]) ("distclean" function (:arguments ("clean")) nil [2161 2213]) ("FORCE" function nil nil [2214 2222]) ("Basics.o" function (:arguments ("src/src_sharpSAT/Basics.cpp" "src/src_sharpSAT/Basics.h")) nil [2239 2378]) ("SomeTime.o" function (:arguments ("src/shared/SomeTime.cpp" "src/shared/SomeTime.h")) nil [2378 2509]) ("RealNumberTypes.o" function (:arguments ("src/shared/RealNumberTypes.cpp" "src/shared/RealNumberTypes.h")) nil [2509 2675]) ("AnalyzerData.o" function (:arguments ("src/shared/Interface/AnalyzerData.cpp" "src/shared/Interface/AnalyzerData.h")) nil [2675 2856]) ("DecisionStack.o" function (:arguments ("src/src_sharpSAT/MainSolver/DecisionStack.cpp" "src/src_sharpSAT/MainSolver/DecisionStack.h" "src/src_sharpSAT/Basics.h" "src/src_sharpSAT/MainSolver/InstanceGraph/ComponentTypes.h" "src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.h" "src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.h")) nil [2856 3280]) ("MainSolver.o" function (:arguments ("src/src_sharpSAT/MainSolver/MainSolver.cpp" "src/src_sharpSAT/MainSolver/MainSolver.h" "src/src_sharpSAT/Basics.h" "src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.h" "src/src_sharpSAT/MainSolver/FormulaCache.h" "src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.h" "src/src_sharpSAT/MainSolver/InstanceGraph/ComponentTypes.h" "src/src_sharpSAT/MainSolver/DecisionStack.h")) nil [3280 3784]) ("InstanceGraph.o" function (:arguments ("src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.cpp" "src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.h" "src/src_sharpSAT/Basics.h" "src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.h")) nil [3784 4125]) ("AtomsAndNodes.o" function (:arguments ("src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.cpp" "src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.h" "src/src_sharpSAT/Basics.h")) nil [4125 4404]) ("main_.o" function (:arguments ("src/src_sharpSAT/main.cpp" "src/src_sharpSAT/MainSolver/MainSolver.h" "src/src_sharpSAT/Basics.h" "src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.h" "src/src_sharpSAT/MainSolver/FormulaCache.h" "src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.h" "src/src_sharpSAT/MainSolver/InstanceGraph/ComponentTypes.h" "src/src_sharpSAT/MainSolver/DecisionStack.h")) nil [4404 4865]) ("FormulaCache.o" function (:arguments ("src/src_sharpSAT/MainSolver/FormulaCache.cpp" "src/src_sharpSAT/MainSolver/FormulaCache.h" "src/src_sharpSAT/Basics.h" "src/src_sharpSAT/MainSolver/InstanceGraph/ComponentTypes.h" "src/src_sharpSAT/MainSolver/DecisionStack.h" "src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.h" "src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.h")) nil [4865 5331]))
+    :file "Makefile"
+    :pointmax 5331
+    )
+   )
+  :file "semantic.cache"
+  :semantic-tag-version "2.0beta3"
+  :semanticdb-version "2.0beta3"
+  )
Index: /vis_dev/sharpSAT/src/src_sharpSAT/Basics.cpp
===================================================================
--- /vis_dev/sharpSAT/src/src_sharpSAT/Basics.cpp	(revision 9)
+++ /vis_dev/sharpSAT/src/src_sharpSAT/Basics.cpp	(revision 9)
@@ -0,0 +1,27 @@
+#include "Basics.h"
+
+
+bool CSolverConf::analyzeConflicts = true;
+bool CSolverConf::doNonChronBackTracking = true;
+
+bool CSolverConf::allowComponentCaching = true;
+bool CSolverConf::allowImplicitBCP = true;
+
+bool CSolverConf::allowPreProcessing = true;
+
+bool CSolverConf::quietMode = false;
+
+unsigned int CSolverConf::secsTimeBound = 10000000;   
+
+unsigned int CSolverConf::maxCacheSize = 0;   
+bool CSolverConf::count = true;
+
+char TriValuetoChar(TriValue v){
+     switch(v){
+      case W: return '1';
+      case F: return '0';
+      case X: return '.';      
+     };
+     return '.';
+    }
+    
Index: /vis_dev/sharpSAT/src/src_sharpSAT/Basics.h
===================================================================
--- /vis_dev/sharpSAT/src/src_sharpSAT/Basics.h	(revision 9)
+++ /vis_dev/sharpSAT/src/src_sharpSAT/Basics.h	(revision 9)
@@ -0,0 +1,74 @@
+#ifndef _BASICS_H
+#define _BASICS_H
+
+
+#include<vector>
+#include<cstdlib>
+#include<iostream>
+
+using namespace std;
+
+
+class CSolverConf  
+{
+public:
+  static bool analyzeConflicts;
+  static bool doNonChronBackTracking;
+   
+  static bool quietMode;
+  
+  static bool allowComponentCaching;
+  static bool allowImplicitBCP;
+  
+  static bool allowPreProcessing;
+  
+  static unsigned int secsTimeBound;   
+  
+  static unsigned int maxCacheSize;   // maximum Cache Size in bytes
+
+  static bool count;
+
+  CSolverConf();
+
+  ~CSolverConf();
+
+};
+
+#ifdef COMPILE_FOR_GUI
+        #define toSTDOUT(X);
+#else
+	#define toSTDOUT(X)	if(!CSolverConf::quietMode) cout << X;
+#endif
+
+
+#ifdef COMPILE_FOR_GUI
+        #define toERROUT(X);
+#else
+	#define toERROUT(X)	if(!CSolverConf::quietMode) cout << X;
+#endif
+  
+#ifdef DEBUG
+	#define toDEBUGOUT(X) if(!CSolverConf::quietMode) cout << X;
+#else
+        #define toDEBUGOUT(X);	
+#endif
+  
+
+enum SOLVER_StateT{
+
+ SUCCESS,
+ TIMEOUT,
+ ABORTED
+};  
+ 
+enum TriValue{
+
+ F = 0,
+ W = 1,
+ X = 2
+ };
+ 
+
+  
+extern char TriValuetoChar(TriValue v);
+#endif
Index: /vis_dev/sharpSAT/src/src_sharpSAT/MainSolver/DecisionStack.cpp
===================================================================
--- /vis_dev/sharpSAT/src/src_sharpSAT/MainSolver/DecisionStack.cpp	(revision 9)
+++ /vis_dev/sharpSAT/src/src_sharpSAT/MainSolver/DecisionStack.cpp	(revision 9)
@@ -0,0 +1,115 @@
+#include "DecisionStack.h"
+
+
+
+void CDecisionStack::reactivateTOS()
+{          
+   for(vector<LiteralIdT>::const_iterator it = TOS_ImpliedLits_begin();it != TOS_ImpliedLits_end();it++)
+   {   
+     theClPool.getVar(*it).unsetVal();     
+   } 
+}
+
+bool CDecisionStack::flipTOS()
+{   
+   if(getDL() <= 0) return false; 
+   if (top().isFlipped()) return false; // es wurde schonmal geflippt
+         
+   top().flipped = true;
+   
+   reactivateTOS();     
+   allImpliedLits.resize(top().iImpLitOfs);   
+   storeTOSCachedChildren();        
+   top().iEndRemComps = top().iRemCompOfs;
+   
+   while(allComponentsStack.size() > top().iRemCompOfs)
+   {
+     delete allComponentsStack.back();
+     allComponentsStack.pop_back();
+   }
+   return true;   
+}
+
+bool CDecisionStack::storeTOSCachedChildren()
+{
+  vector<CComponentId *>::iterator it = allComponentsStack.begin() +top().iRemCompOfs;
+  for(;it != allComponentsStack.end(); it++)
+  {
+    if((*it)->cachedAs != 0) allComponentsStack[top().refCompId]->cachedChildren.push_back((*it)->cachedAs);
+  
+  }
+  return true;
+}
+
+bool CDecisionStack::pop()
+{
+   if(getDL() <= 0) return false; 
+   
+   reactivateTOS();  
+   allImpliedLits.resize(top().iImpLitOfs);   
+   storeTOSCachedChildren();
+   
+   while(allComponentsStack.size() > top().iRemCompOfs)
+   {
+     delete allComponentsStack.back();
+     allComponentsStack.pop_back();
+   }   
+      
+   (end()-2)->includeSol(top().getOverallSols());        
+   
+   pop_back();      
+   return true;    
+}
+
+
+void CDecisionStack::push()
+{   
+   push_back(CDecision()); 
+   
+   top().refCompId = (end()-2)->iEndRemComps-1;
+   (end()-2)->popRemComp();   
+   
+   top().iImpLitOfs = allImpliedLits.size();
+   top().iRemCompOfs = allComponentsStack.size(); 
+   top().iEndRemComps = allComponentsStack.size();
+}
+
+
+void CDecisionStack::init(unsigned int resSize)
+{    
+  clear();  
+  reserve(resSize);
+  allImpliedLits.clear();
+  allImpliedLits.reserve(theClPool.countAllVars());
+  allComponentsStack.clear();
+  allComponentsStack.reserve(theClPool.countAllVars()); 
+  allComponentsStack.push_back(new CComponentId()); 
+
+  // initialize the stack to contain at least level zero  
+  push_back(CDecision());   
+  back().flipped = true; 
+  top().iRemCompOfs = 1; 
+  top().iEndRemComps = 1; 
+  addToDecLev = 0;
+}
+
+void CDecisionStack::TOS_sortRemComps()
+{  
+  CComponentId * vBuf;
+  vector<CComponentId *> &keys = allComponentsStack;
+  
+  int uLower = top().iRemCompOfs;
+  int uUpper = top().iEndRemComps-1;
+  
+  
+  for(int i = uLower; i <=uUpper;i++)
+   for(int j = i+1; j <=uUpper;j++)
+   { 
+     if(keys[i]->countVars() < keys[j]->countVars())
+     {
+       vBuf = keys[i];
+       keys[i] = keys[j];
+       keys[j] = vBuf;    
+     }   
+   }   
+}
Index: /vis_dev/sharpSAT/src/src_sharpSAT/MainSolver/DecisionStack.h
===================================================================
--- /vis_dev/sharpSAT/src/src_sharpSAT/MainSolver/DecisionStack.h	(revision 9)
+++ /vis_dev/sharpSAT/src/src_sharpSAT/MainSolver/DecisionStack.h	(revision 9)
@@ -0,0 +1,243 @@
+#ifndef DECISIONSTACK_H
+#define DECISIONSTACK_H
+
+#include<vector>
+
+#ifdef DEBUG
+#include <assert.h>
+#endif 
+
+#include <RealNumberTypes.h>
+
+#include "../Basics.h"
+
+#include "InstanceGraph/ComponentTypes.h"
+#include "InstanceGraph/AtomsAndNodes.h"
+#include "InstanceGraph/InstanceGraph.h"
+
+using namespace std;
+
+/** \addtogroup Interna*/
+/*@{*/
+
+
+class CDecision
+{    
+    ////////////////////
+    /// active Component
+    ////////////////////        
+    unsigned int refCompId; 
+    
+    // branch
+    bool flipped;           
+    
+    //  bcp    
+    unsigned int iImpLitOfs;
+    
+    //  Solutioncount    
+    CRealNum  rnNumSols[2];     
+        
+    ////////////////////
+    /// remaining Components
+    ////////////////////    
+    
+    /**
+    * [iRemCompOfs,iEndRemComps) defines the interval in allComponentsStack
+    * where the child components of the [refCompId] component are stored
+    */    
+    unsigned int iRemCompOfs;    
+    unsigned int iEndRemComps;    
+  
+    //this function only to be used by decisionStack   
+    unsigned int countCompsToProcess()
+    {
+      #ifdef DEBUG
+      assert(iEndRemComps >= iRemCompOfs);
+      #endif
+      return iEndRemComps - iRemCompOfs;
+    } 
+    void popRemComp()
+    {
+      #ifdef DEBUG
+      assert(iEndRemComps >= iRemCompOfs);
+      #endif
+      iEndRemComps--;
+    }    
+    
+ public:             
+      
+    CDecision()
+    {
+       flipped = false;            
+       rnNumSols[0] = 0.0;    
+       rnNumSols[1] = 0.0; 
+       refCompId = 0;
+       iImpLitOfs = (unsigned int) -1;
+       iRemCompOfs = (unsigned int) -1;
+       iEndRemComps = (unsigned int) -1;
+    }
+    
+    ~CDecision(){}
+    
+    bool isFlipped(){return flipped;}                
+    bool anotherCompProcessible()
+    {     
+      return getBranchSols() !=0.0 && countCompsToProcess() > 0;
+    }   
+    
+    void includeSol(const CRealNum &rnCodedSols)
+    {    
+       if(rnNumSols[flipped] == 0.0)   rnNumSols[flipped] = rnCodedSols;	 
+       else 
+	rnNumSols[flipped] *= rnCodedSols;      
+    }
+    
+    const CRealNum &getBranchSols() const
+    {      
+      return rnNumSols[flipped]; 
+    }
+    
+    const CRealNum getOverallSols() const
+    {
+      return rnNumSols[0] + rnNumSols[1];
+    }       
+
+    friend class CDecisionStack;
+};
+
+
+class CDecisionStack : vector<CDecision>
+{  
+   CInstanceGraph &theClPool;  
+    
+   vector<LiteralIdT> allImpliedLits; 
+      
+   vector<CComponentId *> allComponentsStack;
+   
+   void reactivateTOS();
+   
+   // store each cacheEntry where the children of top().refComp are stored
+   bool storeTOSCachedChildren();
+   
+   unsigned int addToDecLev;
+ public: 
+   /// 
+   const vector<CComponentId *> & getAllCompStack() {return allComponentsStack;}
+   
+   
+   vector<CComponentId *>::iterator TOSRemComps_begin() {return allComponentsStack.begin() + top().iRemCompOfs;}
+   
+   CDecisionStack(CInstanceGraph &pool):theClPool(pool){addToDecLev = 0;}
+    
+   ~CDecisionStack(){}
+
+   //begin for implicit BCP
+   void beginTentative() {addToDecLev = 1;}
+   void endTentative() {addToDecLev = 0;}
+   //end for implicit BCP
+   
+   bool pop();         
+   void push();   
+   
+   inline CDecision &top() {return back();}
+
+   bool flipTOS();   
+   
+   unsigned int countAllImplLits()
+   {    
+     return allImpliedLits.size();
+   }
+   
+   void shrinkImplLitsTo(unsigned int sz)
+   {
+     if(sz >= allImpliedLits.size()) return; 
+     allImpliedLits.resize(sz);
+   }
+   
+   int TOS_siblingsProcessed()
+   { 
+     #ifdef DEBUG
+     assert(allComponentsStack.size() >= top().iEndRemComps);     
+     #endif     
+     return (int) allComponentsStack.size() - (int) top().iEndRemComps;
+   }
+   
+   unsigned int TOS_countImplLits()
+   {
+     return allImpliedLits.size() - top().iImpLitOfs;
+   }
+   
+        
+   const LiteralIdT &TOS_decLit() const 
+   {
+     return  allImpliedLits[back().iImpLitOfs];
+   }   
+   
+   void TOS_addImpliedLit(LiteralIdT aLit)
+   {    
+     allImpliedLits.push_back(aLit);     
+   }
+   
+   void TOS_popImpliedLit()
+   {    
+     allImpliedLits.pop_back();     
+   }
+   
+   vector<LiteralIdT>::const_iterator TOS_ImpliedLits_begin()
+   {
+     return allImpliedLits.begin() + top().iImpLitOfs;
+   }
+   
+   vector<LiteralIdT>::const_iterator TOS_ImpliedLits_end()
+   {    
+     return allImpliedLits.end();
+   }
+   
+    
+   CComponentId & TOSRefComp()
+   {  
+      #ifdef DEBUG    
+      assert(top().refCompId < allComponentsStack.size());
+      #endif
+      return *allComponentsStack[top().refCompId];
+   } 
+   
+    bool TOS_hasAnyRemComp()
+    {
+       return allComponentsStack.size() > top().iRemCompOfs;
+    } 
+    
+    void TOS_popRemComp(){top().popRemComp();}
+    
+    unsigned int TOS_countRemComps() {return top().countCompsToProcess();}
+    
+    void TOS_addRemComp()
+    {     
+       allComponentsStack.push_back(new CComponentId()); 
+       top().iEndRemComps = allComponentsStack.size();
+    }
+    
+    CComponentId & TOS_NextComp() 
+    {      
+      #ifdef DEBUG
+      assert(top().iEndRemComps <= allComponentsStack.size());
+      assert(allComponentsStack[top().iEndRemComps -1] != NULL);
+      #endif         
+      return *allComponentsStack[top().iEndRemComps - 1];
+    }  
+   
+    void TOS_sortRemComps();
+    
+    CComponentId & lastComp() {return *allComponentsStack.back();}
+    
+    void printStats();
+   
+   inline int getDL() const{return size()-1+addToDecLev;} // 0 means pre-1st-decision
+   
+   void init(unsigned int resSize = 1);
+};
+
+/*@}*/
+
+#endif 
+
Index: /vis_dev/sharpSAT/src/src_sharpSAT/MainSolver/FormulaCache.cpp
===================================================================
--- /vis_dev/sharpSAT/src/src_sharpSAT/MainSolver/FormulaCache.cpp	(revision 9)
+++ /vis_dev/sharpSAT/src/src_sharpSAT/MainSolver/FormulaCache.cpp	(revision 9)
@@ -0,0 +1,269 @@
+#include "FormulaCache.h"
+
+unsigned int CFormulaCache::oldestEntryAllowed = (unsigned int) -1;
+
+
+CFormulaCache::CFormulaCache()
+{
+    iBuckets = 900001;// =299999;       
+    theData.resize(iBuckets,NULL);
+    theBucketBase.reserve(iBuckets);
+    theEntryBase.reserve(iBuckets*10);
+    scoresDivTime = 50000;
+    lastDivTime = 0;    
+    #ifdef SUN_OS
+      if(CSolverConf::maxCacheSize == 0)
+        CSolverConf::maxCacheSize = 100*1024*1024;
+    #endif
+    #ifndef SUN_OS
+      if(CSolverConf::maxCacheSize == 0)
+      {
+       int pgs = getpagesize();
+       long int pages = get_avphys_pages();
+       CSolverConf::maxCacheSize = (pgs*pages)/2;
+      } 
+    #endif   
+}
+
+
+
+bool CFormulaCache::include(CComponentId &rComp, const CRealNum &val)
+{    
+    #ifdef DEBUG
+    // if everything is correct, a new value to be cached
+    // should not already be stored in the cache
+    assert(rComp.cachedAs == NIL_ENTRY);
+    #endif
+    
+    if(rComp.empty()) return false;    
+    iCacheTries++; 
+    
+    if(memUsage >= CSolverConf::maxCacheSize)  return false;
+   
+    long unsigned int hV = rComp.getHashKey();    
+    
+    CCacheBucket &rBucket = at(clip(hV));
+    
+      
+    CacheEntryId eId = newEntry();
+    CCacheEntry & rEntry = entry(eId);    
+    rBucket.push_back(eId);
+    rEntry.createFrom(rComp);        
+    rEntry.hashKey = hV;
+    rEntry.theVal = val;
+   
+    rComp.cachedAs = eId; // save in the Comp, wwhere it was saved
+    rEntry.theDescendants = rComp.cachedChildren; // save the cache ids of its children
+    
+    rComp.cachedChildren.clear();
+    
+    adjustDescendantsFather(eId);
+    
+    
+    //BEGIN satistics
+    
+    unsigned int memU = memUsage/(10*1024*1024);
+    
+    memUsage += rEntry.memSize();
+    
+    if(memU < memUsage/(10*1024*1024))
+    {     
+      toSTDOUT("Cache: usedMem "<< memUsage<<"Bytes\n");      
+    }    
+    iSumCachedCompSize += rComp.countVars();
+    
+    iCachedComponents++;
+    if(iCachedComponents % 50000 == 0) 
+    {
+       double d = iSumCachedCompSize;
+	  d /= (double) iCachedComponents;
+       toSTDOUT("cachedComponents:"<< iCachedComponents<<" avg. size:"<<d<<endl);
+    }
+    //END satistics
+    return true;    
+}
+  
+bool CFormulaCache::extract(CComponentId &rComp, CRealNum &val)
+{       
+    long unsigned int hV = rComp.getHashKey();    
+    
+    unsigned int v = clip(hV);        
+        
+    if(!isBucketAt(v)) return false;    
+    CCacheBucket &rBucket = *theData[v]; // the location of the considered bucket
+    
+    CCacheEntry *pComp;
+    
+    for(CCacheBucket::iterator it = rBucket.begin(); it != rBucket.end();it++)
+    {
+      pComp = &entry(*it);     
+      if(hV == pComp->getHashKey() &&  pComp->equals(rComp)) 
+      {
+        val = pComp->theVal;        
+	pComp->score++;
+	pComp->score+= (unsigned int)pComp->sizeVarVec();	
+        
+        iCacheRetrievals++;
+	iSumRetrieveSize += rComp.countVars();
+	
+        if(iCacheRetrievals % 50000 == 0)
+	{
+	  double d = iSumRetrieveSize;
+	  d /= (double) iCacheRetrievals;
+	  toSTDOUT("cache hits:"<< iCacheRetrievals<<" avg size:"<< d<<endl);
+	}
+	return true;
+       
+     }    
+   }    
+   return false;
+}
+
+int CFormulaCache::removePollutedEntries(CacheEntryId root)
+{
+  vector<CacheEntryId>::iterator it;// theDescendants;
+  CCacheBucket &rBuck = at(clip(entry(root).hashKey));
+  unsigned int n = 0;
+  
+  
+  for(CCacheBucket::iterator jt= rBuck.begin(); jt != rBuck.end(); jt++)
+  {
+    if(*jt == root)
+    {
+     rBuck.erase(jt);
+     n++;
+     break;
+    }     
+  }
+  
+  for(it = entry(root).theDescendants.begin(); it != entry(root).theDescendants.end(); it++)
+  {
+    n += removePollutedEntries(*it);  
+  }  
+ 
+  entry(root).clear();
+  
+  return n;
+}
+
+bool CFormulaCache::deleteEntries(CDecisionStack & rDecStack)
+{
+  vector<CCacheBucket>::iterator jt;
+  vector<CCacheEntry>::iterator it,itWrite;
+  CCacheBucket::iterator bt;
+    
+  if(memUsage < (unsigned int) ((double) 0.85* (double)CSolverConf::maxCacheSize)) return false;
+    
+  // first : go through the EntryBase and mark the entries to be deleted as deleted (i.e. EMPTY
+  for(it = beginEntries(); it != endEntries(); it++)
+  {      
+      if(it->score <= minScoreBound)      
+      {
+        deleteFromDescendantsTree(toCacheEntryId(it));   
+	it->clear();	
+      }
+  }
+  
+  // then go through the BucketBase and rease all Links to empty entries
+  for(jt = theBucketBase.begin(); jt != theBucketBase.end(); jt++)
+  {
+    for(bt = jt->end()-1; bt != jt->begin()-1; bt--)
+    {
+      if(entry(*bt).empty()) bt = jt->erase(bt);      
+    }    
+  }  
+  
+  // now: go through the decisionStack. and delete all Links to empty entries  
+  revalidateCacheLinksIn(rDecStack.getAllCompStack());
+  
+  // finally: truly erase the empty entries, but keep the descendants tree consistent
+  long int newSZ = 0;
+  long int SumNumOfVars= 0;
+  CacheEntryId idOld,idNew;
+      
+  itWrite = beginEntries();  
+  for(it = beginEntries(); it != endEntries(); it++)
+  {    
+    if(!it->empty())
+    {
+      if(it != itWrite)
+      {
+       *itWrite = *it;
+       idNew = toCacheEntryId(itWrite);
+       idOld = toCacheEntryId(it);
+       at(clip(itWrite->getHashKey())).substituteIds(idOld,idNew);                       
+       substituteInDescTree(idOld,idNew);
+       substituteCacheLinksIn(rDecStack.getAllCompStack(),idOld,idNew);
+      }
+      itWrite++;
+      //theEntryBase.pop_back();
+      newSZ += itWrite->memSize();
+      SumNumOfVars += itWrite->sizeVarVec();
+    }
+  }
+  
+  theEntryBase.erase(itWrite,theEntryBase.end()); 
+  
+  iCachedComponents = theEntryBase.size();  
+  iSumCachedCompSize = SumNumOfVars*sizeof(unsigned int)*8 / CCacheEntry::bitsPerVar();
+  
+  memUsage = newSZ;
+  
+  toSTDOUT("Cache cleaned: "<<iCachedComponents<<" Components ("<< (memUsage>>10)<< " KB remain"<<endl);
+  
+  if(scoresDivTime == 0) scoresDivTime = 1;
+  double dbound = (double) 0.5* (double)CSolverConf::maxCacheSize;
+  if(memUsage < (unsigned int) dbound)
+  {
+    minScoreBound/= 2;
+    if(memUsage < 0.5*dbound) scoresDivTime *= 2;
+  }
+  else if(memUsage > (unsigned int) dbound)
+  {
+    minScoreBound <<= 1;
+    minScoreBound++;
+    scoresDivTime /= 2;
+    if(scoresDivTime < 50000) scoresDivTime = 50000;
+  }
+  toDEBUGOUT("setting scoresDivTime: "<<scoresDivTime<<endl);  
+  toDEBUGOUT("setting minScoreBound: "<<minScoreBound<<endl);  
+  
+  return true;
+}
+
+
+void CFormulaCache::revalidateCacheLinksIn(const vector<CComponentId *> &rComps)
+{
+  vector<CComponentId *>::const_iterator it;
+  vector<unsigned int>::iterator jt;
+  for(it = rComps.begin(); it !=rComps.end(); it++)
+  {
+    if(!isEntry((*it)->cachedAs)) (*it)->cachedAs = 0;
+    
+    if(isEntry((*it)->cachedAs) && entry((*it)->cachedAs).empty()) (*it)->cachedAs = 0;
+    
+    for(jt = (*it)->cachedChildren.end()-1; jt != (*it)->cachedChildren.begin()-1; jt--)
+    {
+      if((!isEntry(*jt)) || entry(*jt).empty())
+      { 
+        toDEBUGOUT("_E"); 
+        jt =(*it)->cachedChildren.erase(jt);
+      }
+    }
+  }
+}
+
+
+void CFormulaCache::substituteCacheLinksIn(const vector<CComponentId *> &rComps, CacheEntryId idOld, CacheEntryId idNew)
+{
+  vector<CComponentId *>::const_iterator it;
+  vector<unsigned int>::iterator jt;
+  for(it = rComps.begin(); it !=rComps.end(); it++)
+  {
+    if((*it)->cachedAs == idOld) (*it)->cachedAs = idNew;
+    for(jt = (*it)->cachedChildren.begin(); jt != (*it)->cachedChildren.end(); jt++)
+    {
+      if(*jt == idOld){ toDEBUGOUT("_D"); *jt = idNew;}
+    }
+  }
+}
Index: /vis_dev/sharpSAT/src/src_sharpSAT/MainSolver/FormulaCache.h
===================================================================
--- /vis_dev/sharpSAT/src/src_sharpSAT/MainSolver/FormulaCache.h	(revision 9)
+++ /vis_dev/sharpSAT/src/src_sharpSAT/MainSolver/FormulaCache.h	(revision 9)
@@ -0,0 +1,397 @@
+#ifndef FORMULACACHE_H
+#define FORMULACACHE_H
+
+
+#ifdef DEBUG
+#include<assert.h>
+#endif
+    
+#include <sys/sysinfo.h>
+#include <vector>
+#include <iostream>
+
+
+#include <SomeTime.h>
+#include <RealNumberTypes.h>
+#include <Interface/AnalyzerData.h>
+
+
+#include "../Basics.h"
+#include "InstanceGraph/ComponentTypes.h"
+#include "DecisionStack.h"
+using namespace std;
+
+typedef unsigned int CacheEntryId;
+
+class CCacheEntry : public CPackedCompId<unsigned int>
+{
+  long unsigned int hashKey;
+  friend class CFormulaCache;  
+  
+  // theFather and theDescendants:
+  // each CCacheEntry is a Node in a tree which represents the relationship
+  // of the components stored
+  CacheEntryId theFather;
+  vector<CacheEntryId> theDescendants;
+  
+ public:  
+  
+  CRealNum   theVal;
+  
+  unsigned int score;
+  
+  CCacheEntry()
+  {
+    score = 0;
+    theFather = 0;
+  }
+   
+   
+  void clear()
+  {
+   theVars.clear();
+   theClauses.clear();
+   theDescendants.clear();
+  }
+ 
+ 
+  ~CCacheEntry()
+  {
+    theDescendants.clear();
+    theFather = 0;
+    clear();
+  }
+  
+  
+  long unsigned int getHashKey() const
+  {
+    return hashKey;
+  }
+  
+  void setHashKey(long unsigned int &val)
+  {
+    hashKey = val;
+  }
+  
+  unsigned int memSize()
+  {
+    return  CPackedCompId<unsigned int>::memSize() + theDescendants.capacity()*sizeof(CacheEntryId);
+  }
+  
+  void substituteDescendant(CacheEntryId iold, CacheEntryId inew)
+  {
+    vector<CacheEntryId>::iterator it;
+    for(it = theDescendants.begin();it != theDescendants.end();it++)
+    {
+      if(*it == iold) *it = inew;
+    }
+  }
+  
+  void removeDescendant(CacheEntryId d)
+  {
+    vector<CacheEntryId>::iterator it;
+    for(it = theDescendants.end()-1;it != theDescendants.begin()-1;it--)
+    {
+      if(*it == d)
+      {
+        it = theDescendants.erase(it);
+      }
+    }
+  }
+  
+  
+  void addDescendants(vector<CacheEntryId> &dVec)
+  {
+    theDescendants.insert(theDescendants.end(),dVec.begin(),dVec.end());    
+  }
+  
+  CacheEntryId getFather() {return theFather;}
+  void substituteFather(CacheEntryId newFather){theFather = newFather;}  
+  
+  
+};
+
+
+class CCacheBucket : protected vector<CacheEntryId>
+{  
+  friend class CFormulaCache;   
+  
+  
+ public:  
+    
+  CCacheBucket()
+  {     
+  }  
+  
+  ~CCacheBucket()
+  {
+    clear();
+  }
+  
+  bool substituteIds(CacheEntryId oldId, CacheEntryId newId)
+  {
+    for(CCacheBucket::iterator it = begin(); it != end(); it++)
+    {
+     if(*it == oldId) { *it = newId; return true;}     
+    }
+    return false;
+  }
+  
+  using vector<CacheEntryId>::size; 
+};
+
+class CFormulaCache
+{  
+  vector<CCacheBucket> theBucketBase; 
+  
+  vector<CCacheEntry> theEntryBase;
+  
+  #define NIL_ENTRY 0
+  
+  vector<CCacheBucket *> theData;  
+  
+  vector<CCacheEntry>::iterator beginEntries(){return theEntryBase.begin()+1;}
+  vector<CCacheEntry>::iterator endEntries(){return theEntryBase.end();}
+  
+  CacheEntryId toCacheEntryId(vector<CCacheEntry>::iterator &it)
+  {
+    return (CacheEntryId)(it - theEntryBase.begin());
+  }
+  
+  
+  unsigned int iBuckets;
+  static unsigned int oldestEntryAllowed; 
+  /* statistics */
+  unsigned int iCacheRetrievals;
+  unsigned int iSumRetrieveSize;
+  unsigned int iCacheTries;
+  
+  unsigned int iCachedComponents;
+  unsigned int iSumCachedCompSize;
+  unsigned int iSumCachedMemSize;
+  unsigned int iUsedBuckets;  
+  unsigned int scoresDivTime;
+  unsigned int minScoreBound;
+  
+  unsigned int lastDivTime;
+  
+  /*end statistics */
+  unsigned int memUsage;  
+  //unsigned int maxMemUsage;  
+  
+  double avgCachedSize()  
+  {
+     if(iCacheRetrievals == 0) return 0.0;
+     return (double) iSumCachedCompSize / (double) iCachedComponents;
+  }
+  
+  double avgCachedMemSize()  
+  {
+     if(iCacheRetrievals == 0) return 0.0;
+     return (double) memUsage / (double) iCachedComponents;
+  }
+  
+  double avgHitSize()  
+  {
+     if(iCacheRetrievals == 0) return 0.0;
+     return (double) iSumRetrieveSize / (double) iCacheRetrievals;
+  }
+  
+  unsigned int clip(unsigned int ofs)
+  {
+    return ofs % iBuckets;
+  }
+  
+  unsigned int clip(long unsigned int ofs)
+  {
+    return ofs % iBuckets;
+  }
+  
+  bool isEntry(CacheEntryId theId)
+  {
+    return (theId != 0) & (theId < theEntryBase.size());
+  }
+  
+  CCacheEntry &entry(CacheEntryId theId)
+  {
+    #ifdef DEBUG
+    assert(theId < theEntryBase.size());
+    #endif
+    return theEntryBase[theId];  
+  }
+  
+  CacheEntryId newEntry()
+  {   
+    theEntryBase.push_back(CCacheEntry());
+    return theEntryBase.size()-1;
+  }
+  
+  unsigned int memSizeOf(CCacheBucket &rBuck)
+  {
+   unsigned int n = 0;  
+   for(CCacheBucket::iterator it = rBuck.begin();it!= rBuck.end();it++)
+   {
+     n += entry(*it).memSize();
+   }
+   return n;
+  }
+  
+  CCacheBucket *createNewCacheBucket()
+  {
+    theBucketBase.push_back(CCacheBucket());
+    iUsedBuckets++;
+    return &theBucketBase.back();
+  }
+  
+  CCacheBucket &at(unsigned int ofs)
+  {
+    if(theData[ofs] == NULL) theData[ofs] = createNewCacheBucket();
+    return *theData[ofs];
+  }
+  
+  bool isBucketAt(unsigned int ofs)
+  {
+    #ifdef DEBUG
+    assert(theData.size() > ofs);    
+    #endif
+    return theData[ofs] != NULL;
+  }
+  
+ public:
+  
+  unsigned int getScoresDivTime() {return scoresDivTime;}
+  unsigned int getLastDivTime() {return lastDivTime;}
+  void setLastDivTime(unsigned int d) {lastDivTime = d;}
+ 
+  CFormulaCache();
+  
+  ~CFormulaCache()
+  {    
+    reset();
+  }
+  
+  void init()
+  {
+    theBucketBase.clear();
+    theData.clear();
+    theEntryBase.clear();
+    theEntryBase.push_back(CCacheEntry()); // dummy Element
+    theData.resize(iBuckets,NULL);
+    theBucketBase.reserve(iBuckets);
+    iUsedBuckets = 0;
+    memUsage = 0;
+    iCachedComponents = 0;
+    iCacheRetrievals = 0;
+    iSumRetrieveSize = 0;
+    iSumCachedCompSize = 0;
+    iSumCachedMemSize = 0;
+    iCacheTries = 0;
+    minScoreBound = 0;
+  }
+  
+  void reset()
+  {
+    theBucketBase.clear();
+    theEntryBase.clear();
+    theData.clear();
+  }  
+  
+  void printStatistics(CRunAnalyzer & rAn)
+  {
+    rAn.setValue(FCACHE_MAXMEM,CSolverConf::maxCacheSize);  // Formula Cache Memory Bound
+    rAn.setValue(FCACHE_MEMUSE,memUsage);  // Formula Cache memory usage
+    rAn.setValue(FCACHE_USEDBUCKETS,iUsedBuckets); // number of hashbuckets used
+    rAn.setValue(FCACHE_CACHEDCOMPS,iCachedComponents);
+    rAn.setValue(FCACHE_RETRIEVALS,iCacheRetrievals); // number of retrieved components
+    rAn.setValue(FCACHE_INCLUDETRIES,iCacheTries); // number of times it was tried to put a component into the cache    
+    
+  }
+  
+  void divCacheScores()
+  {     
+     for(vector<CCacheEntry>::iterator it =  theEntryBase.begin(); it != theEntryBase.end(); it++)
+     { 
+       (it->score) >>= 1;     
+     }
+  }
+  
+  long unsigned int computeHashVal(const CComponentId &rComp);
+   
+  bool include(CComponentId &rComp, const CRealNum &val);
+
+  bool extract(CComponentId &rComp, CRealNum &val);
+  
+  bool deleteEntries(CDecisionStack & rDecStack);
+  
+  void revalidateCacheLinksIn(const vector<CComponentId*> &rComps);
+  void substituteCacheLinksIn(const vector<CComponentId*> &rComps, CacheEntryId idOld, CacheEntryId idNew);
+  
+  
+  int removePollutedEntries(CacheEntryId root); // remove the whole tree below root
+  
+  
+  bool cacheCompaction(CDecisionStack & rDecStack);
+  
+  void adjustDescendantsFather(CacheEntryId father)
+  {
+    vector<CacheEntryId>::iterator it;
+    for(it = entry(father).theDescendants.begin();
+        it != entry(father).theDescendants.end();it++)
+    {
+      entry(*it).theFather = father;
+    }
+  }
+  
+  // delete entries, keeping the descendants tree consistent
+  void deleteFromDescendantsTree(CacheEntryId rEnt)
+  { 
+     // let ME be the entry to be deleted
+     CacheEntryId father = entry(rEnt).getFather();
+     // first remove link from father to ME
+     if(father != NIL_ENTRY)
+     {
+       entry(father).removeDescendant(rEnt);
+       // then add all my descendants to descendants of father
+       entry(father).addDescendants(entry(rEnt).theDescendants);
+     }
+     // next all MY descendants have now father father
+     vector<CacheEntryId>::iterator it;
+     for(it = entry(rEnt).theDescendants.begin();
+         it != entry(rEnt).theDescendants.end();
+	 it++)
+	 {
+	   entry(*it).substituteFather(father);
+	 } 
+  }
+  
+  void substituteInDescTree(CacheEntryId rOld, CacheEntryId rNew)
+  { 
+     // let ME be the entry to be deleted
+     CacheEntryId father = entry(rOld).getFather();
+     // first subst link from father to ME     
+     
+     if(father != NIL_ENTRY)
+     {
+       #ifdef DEBUG
+       assert(isEntry(father));
+       #endif
+       entry(father).substituteDescendant(rOld, rNew);
+     }         
+     // next all MY descendants get father rNew
+     vector<CacheEntryId>::iterator it;
+     for(it = entry(rOld).theDescendants.begin();
+         it != entry(rOld).theDescendants.end();
+	 it++)
+	 {
+	   #ifdef DEBUG
+           assert(isEntry(*it));
+           #endif
+	   entry(*it).substituteFather(rNew);
+	 }
+  }
+  
+};
+
+
+
+#endif
Index: /vis_dev/sharpSAT/src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.cpp
===================================================================
--- /vis_dev/sharpSAT/src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.cpp	(revision 9)
+++ /vis_dev/sharpSAT/src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.cpp	(revision 9)
@@ -0,0 +1,75 @@
+#include "AtomsAndNodes.h" // class's header file
+
+CVariableVertex::~CVariableVertex()
+{
+}
+
+bool CVariableVertex::substituteWatchCl(bool polarity, const ClauseIdT & oldId, const ClauseIdT &newId)
+{  
+  for(vector<ClauseIdT>::iterator jt = watchCls[polarity].end()-1;*jt != SENTINEL_CL; jt--)
+  {
+    if(*jt == oldId) *jt = newId; 
+  }
+  return true;
+}
+
+
+bool CVariableVertex::substituteBinLink(bool polarity, const LiteralIdT& oldLit, const LiteralIdT& newLit)
+{
+  vector<LiteralIdT>::iterator it;
+  for(it = binClLinks[polarity].begin(); it != binClLinks[polarity].end(); it++)
+  {
+      if(*it == oldLit) {*it = newLit; return true;} 
+  }
+  return false;
+}
+
+
+bool CVariableVertex::eraseWatchClause(ClauseIdT idCl, bool polarity)
+{ 
+     vector<ClauseIdT>& theWatchCls = watchCls[polarity];
+     vector<ClauseIdT>::iterator it;
+     
+     for(it = theWatchCls.begin();it != theWatchCls.end();it++)
+     {
+       if(*it == idCl)
+       {
+         theWatchCls.erase(it);
+         return true;
+       }    
+     }
+     return false;      
+}
+
+bool CVariableVertex::eraseBinLinkTo(LiteralIdT idLit, bool Linkpolarity)
+{ 
+  vector<LiteralIdT> &theLinks = getBinLinks(Linkpolarity);
+  vector<LiteralIdT>::iterator it;
+   
+  for(it = theLinks.begin();it != theLinks.end();it++)
+  {
+    if(*it == idLit)
+    {      
+      theLinks.erase(it);      
+      return true;
+    }    
+  }  
+  return false;
+}
+
+
+bool CVariableVertex::hasBinLinkTo(LiteralIdT idLit,bool pol) const
+{ 
+  vector<LiteralIdT>::const_iterator it;
+   
+  for(it = getBinLinks(pol).begin();*it != SENTINEL_LIT;it++)
+  {
+    if(*it == idLit) return true;
+  } 
+  it++; 
+  for(;*it != SENTINEL_LIT;it++)
+  {
+    if(*it == idLit) return true;
+  }
+  return false;
+}
Index: /vis_dev/sharpSAT/src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.h
===================================================================
--- /vis_dev/sharpSAT/src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.h	(revision 9)
+++ /vis_dev/sharpSAT/src/src_sharpSAT/MainSolver/InstanceGraph/AtomsAndNodes.h	(revision 9)
@@ -0,0 +1,457 @@
+// Class automatically generated by Dev-C++ New Class wizard
+
+#ifndef ATOMSANDNODES_H
+#define ATOMSANDNODES_H
+
+#include <vector>
+
+#include <iostream>
+
+#include "../../Basics.h"
+#include <SomeTime.h>
+
+using namespace std;
+
+#define INVALID_DL -1
+
+class CClauseVertex;
+typedef CClauseVertex *PCLV;
+
+class CVariableVertex;
+typedef CVariableVertex *PVARV;
+
+typedef unsigned int indexTypeVARS;
+typedef unsigned int indexTypeCLS;
+
+typedef indexTypeVARS VarIdT;
+typedef indexTypeCLS ClauseIdT;
+
+class LiteralIdT
+{
+  indexTypeVARS val;
+ public:
+ 
+  LiteralIdT()
+  {
+   val = 0;
+  }
+  LiteralIdT(int iLitIdx)
+  {
+   val = (abs(iLitIdx)<<1) + (unsigned int)(iLitIdx > 0);
+  }
+ 
+  LiteralIdT(VarIdT iVarIdx, bool polarity)
+  {
+   val = (iVarIdx<<1) + (unsigned int)polarity;
+  }
+  
+  VarIdT toVarIdx() const
+  {
+   return (val >> 1);  
+  }
+  
+  unsigned int toUInt() const
+  {
+   return val;  
+  }
+    
+  void makeFromUInt(unsigned int v)
+  {
+    val = v;
+  }  
+  
+  bool polarity() const
+  {   
+   return (bool)(val & 0x01);  
+  }
+  
+  TriValue polarityTriVal() const
+  {   
+   return (TriValue)(val & 0x01);  
+  }
+  
+  bool operator!=(const LiteralIdT &rL2) const
+  {
+    return val != rL2.val;
+  }
+  
+  bool operator==(const LiteralIdT &rL2) const
+  {
+    return val == rL2.val;
+  }
+  
+  const LiteralIdT oppositeLit() const
+  {
+    return LiteralIdT(toVarIdx(),!polarity());
+  }
+  
+  void print() const
+  {  
+   toSTDOUT((polarity()?" ":"-")<< toVarIdx()<<" ");
+  }
+};
+
+
+static const ClauseIdT NOT_A_CLAUSE(0);
+static const LiteralIdT NOT_A_LIT(0,false);
+
+#define SENTINEL_CL NOT_A_CLAUSE
+#define SENTINEL_LIT NOT_A_LIT
+
+
+class CClauseVertex 
+{
+        /// the offset of the first literal of this clause in theLitVector of
+        /// the main CInstanceGraph
+	unsigned int litPoolOfs;
+		
+	LiteralIdT litA, litB;	
+	
+	unsigned int numLits;
+	int lastTouchTime;
+	
+ public:    
+	
+	bool hasWatchLitA() { return litA != NOT_A_LIT;}
+	bool hasWatchLitB() { return litB != NOT_A_LIT;}
+	
+        void setLitA(const LiteralIdT & lit) { litA = lit;}
+	void setLitB(const LiteralIdT & lit) { litB = lit;}
+	
+	const LiteralIdT &idLitA() const {return litA;}	
+	const LiteralIdT &idLitB() const {return litB;}
+	
+        int getLastTouchTime() const
+	{
+	  return lastTouchTime;
+	}
+	
+	void setTouched()
+	{
+	  lastTouchTime = CStepTime::getTime();
+	}
+		
+	void setLength(unsigned int nlen)
+	{  
+	  numLits = nlen;
+	}
+	unsigned int length() const
+	{	  
+	  return numLits;
+	}
+	
+	bool isDeleted() const
+	{
+	 return numLits == 0;
+	}
+	
+	void setDeleted()
+	{
+	  numLits = 0;	  
+	}
+	
+	
+	void setLitOfs(unsigned int ofs) {litPoolOfs = ofs;}
+	unsigned int getLitOfs() const   {return litPoolOfs;}
+		
+	
+	// class constructor
+	CClauseVertex()
+        {   
+	   litA = litB = NOT_A_LIT;
+	   numLits = 0;
+	   litPoolOfs = 0;
+	   lastTouchTime =0;
+	}
+	
+	void reset()
+	{   
+	   
+	   lastTouchTime = 0;
+	}
+		
+	~CClauseVertex(){}
+	
+	bool watches(const VarIdT &theVar) const
+	{
+	   return (idLitA().toVarIdx() == theVar || idLitB().toVarIdx() == theVar);
+	}
+
+};
+
+
+
+ 
+ 
+template <typename _T>
+class extd_vector : public vector<_T>
+{ 
+ 
+ 
+ public:
+  void quickErase(int iOfs)
+  {     
+   (*this)[iOfs] = vector<_T>::back();
+   vector<_T>::pop_back();  
+  }
+  
+  //typename vector<_T>::iterator
+  void quickErase(typename vector<_T>::iterator &it)
+  {
+    *it = vector<_T>::back();
+    vector<_T>::pop_back();
+  }
+
+};
+
+
+
+class AntecedentT
+{  
+  unsigned int val;
+  
+ public:
+  AntecedentT() { val = 1;}
+  AntecedentT(const ClauseIdT idCl)
+  {
+    val = (idCl << 1) | 1;
+  }
+  AntecedentT(const LiteralIdT idLit)
+  {
+    val = (idLit.toUInt() << 1) ;
+  }  
+  
+  bool isAClause() {return val & 0x01;}
+  
+  ClauseIdT toCl()
+  {
+    return val>>1;
+  }
+  LiteralIdT toLit()
+  {
+    LiteralIdT idLit;
+    idLit.makeFromUInt(val>>1);
+    return idLit;
+  }
+  bool isAnt() { return (isAClause() && !(toCl() == NOT_A_CLAUSE))
+                          || (!isAClause() && (toLit() != NOT_A_LIT));}
+
+};
+
+class AntAndLit 
+//structure saving a Lit and the antecedent implying it
+// antecedents may be clauses or literals
+{
+ public:
+   AntecedentT theAnt;
+   LiteralIdT theLit;
+ 
+   AntAndLit(const AntecedentT ant,const LiteralIdT pL)
+   {
+    theAnt = ant;
+    theLit = pL;
+   }   
+   
+   AntAndLit(const LiteralIdT idAntLit,const LiteralIdT pL)
+   {
+    theAnt = AntecedentT(idAntLit);
+    theLit = pL;    
+   }
+   
+   AntAndLit(const ClauseIdT idCl = NOT_A_CLAUSE,const LiteralIdT pL = 0)
+   {
+    theAnt = AntecedentT(idCl);
+    theLit = pL;
+   }
+ 
+   AntecedentT &getAnt(){return theAnt;} 
+   LiteralIdT& getLit() {return theLit;}
+};
+
+
+class CVariableVertex 
+{	
+	/// INVARIANT : SENTINEL clclcl ...
+	/// this is due to the watchCls being passed in reverse by BCP
+	extd_vector<ClauseIdT> watchCls[2];
+	
+	TriValue theVal;	
+	
+	VarIdT itecIndex;	
+	
+	AntecedentT myAntecedent;
+	int DecLevelOfDeactivation;
+        
+        /// INVARIANT: array content: llll SENTINEL xxxxx SENTINEL
+        /// x: conflict binary link
+	vector<LiteralIdT> binClLinks[2]; // where the variable occurrs in pos/neg
+	
+	unsigned int inClsVecOfs[2]; // the offset in the theInClsVector	
+	unsigned int iVarNum;  // the number the variable had in the input file
+	
+	
+ public:
+        
+        void setInClsVecOfs(bool pol, unsigned int ofs)
+        {
+           inClsVecOfs[pol] = ofs;
+        }
+        
+        void setInClsVecOfs(unsigned int ofs)
+        {
+           unsigned int diff = inClsVecOfs[true] - inClsVecOfs[false];
+           inClsVecOfs[false] = ofs;
+           inClsVecOfs[true] = ofs + diff;
+        }
+        
+        unsigned int getInClsVecOfs(bool pol) const
+        {
+           return inClsVecOfs[pol];
+        }
+        
+        
+        int scoreDLIS[2];
+	int scoreVSIDS[2];	
+	
+	void eraseAllEdges()
+	{
+	  inClsVecOfs[0] = 1;
+	  inClsVecOfs[1] = 1;
+	  
+	  watchCls[0].clear();
+	  watchCls[0].push_back(SENTINEL_CL);	  
+	  watchCls[1].clear();
+	  watchCls[1].push_back(SENTINEL_CL);
+	  
+	  binClLinks[0].clear();
+	  binClLinks[0].push_back(SENTINEL_LIT);
+	  binClLinks[0].push_back(SENTINEL_LIT);	  
+	  binClLinks[1].clear();
+	  binClLinks[1].push_back(SENTINEL_LIT);
+	  binClLinks[1].push_back(SENTINEL_LIT);	  	  
+	}
+	        
+	 
+	CVariableVertex(unsigned int numofVar = 0, VarIdT index = 0): itecIndex(index), iVarNum(numofVar)
+        {	  
+	  DecLevelOfDeactivation = INVALID_DL;
+	  theVal=X;
+	  
+	  scoreDLIS[0] = scoreDLIS[1] = 0;
+	  scoreVSIDS[0] = scoreVSIDS[1] = 0;
+	  
+	  eraseAllEdges();
+        }
+	
+	bool isolated() {return (inClsVecOfs[0] <= 1) && (inClsVecOfs[1] <= 1)
+	                        && (binClLinks[0].size()<=2) && (binClLinks[1].size()<=2);}
+	                        
+	LiteralIdT getLitIdT(bool polarity) {return LiteralIdT(getVarIdT(),polarity);}
+	
+	void newtecIndex(VarIdT iIdx) {itecIndex = iIdx;}
+	
+	int  getDLCSScore() const {return scoreDLIS[0] + scoreDLIS[1];}
+	
+	int  getVSIDSScore(){return scoreVSIDS[0] + scoreVSIDS[1];}
+	
+	inline const unsigned int getVarNum() const {return iVarNum;}
+	
+	inline const unsigned int getVarIdT() const {return itecIndex;}
+	
+	int getDLOD() const {return DecLevelOfDeactivation;}
+	
+	bool setVal(bool aVal,unsigned int atDL, AntecedentT ant = AntecedentT(NOT_A_CLAUSE))
+	{
+	  if(!isActive()) return false;
+	  DecLevelOfDeactivation = atDL;
+	  
+	  myAntecedent = ant;	  		  
+	  theVal = (TriValue) aVal;
+	  return true;	
+	}
+	
+	void unsetVal()
+	{	  
+	  myAntecedent = AntecedentT(NOT_A_CLAUSE);		  
+	  DecLevelOfDeactivation = INVALID_DL;	
+	  theVal = X;	  
+	}
+	
+	bool isImpliedBy(const ClauseIdT idCl)
+	{
+	  if(isActive() || !myAntecedent.isAClause()) return false;
+	  if(myAntecedent.toCl() == idCl) return true;
+	  return false;
+	}
+	void adjustAntecedent(AntecedentT ant) {myAntecedent=ant;}
+	bool isActive() const {return theVal == X;}
+	
+	bool flipVal()
+	{
+	 if(theVal == W) theVal =F;
+	   else if(theVal == F) theVal =W;
+	  
+	 return true;	 
+	}
+	
+	AntecedentT getAntecedent() {return myAntecedent;}
+	
+	bool getboolVal() const {return theVal==W;}
+	
+	TriValue getVal() const {return theVal;}
+	
+	unsigned int countBinLinks() const {return binClLinks[0].size() + binClLinks[1].size() - 4;}
+	unsigned int countBinLinks(bool pol) const {return binClLinks[pol].size() - 2;}
+	
+	
+	extd_vector<ClauseIdT> &getWatchClauses(bool polarity)
+	{
+          return watchCls[polarity];
+	}
+	
+	const extd_vector<ClauseIdT> &getWatchClauses(bool polarity) const
+	{
+          return watchCls[polarity];
+	}
+	
+	void addWatchClause(ClauseIdT idCl,bool polarity)
+	{     
+	   watchCls[polarity].push_back(idCl);   
+	}
+	
+	void addBinLink(bool polarity, LiteralIdT &lit)
+	{  	   
+	   *(binClLinks[polarity].end()-2) = lit;
+	   binClLinks[polarity].push_back(SENTINEL_LIT);   	   
+	}
+		
+	void addBinLinkCCl(bool polarity, LiteralIdT &lit)
+	{	  
+	   *(binClLinks[polarity].end()-1) = lit;
+	   binClLinks[polarity].push_back(SENTINEL_LIT);   
+	}
+	
+	bool eraseBinLinkTo(LiteralIdT idLit, bool Linkpolarity);	
+	bool hasBinLinkTo(LiteralIdT idLit,bool pol) const;
+	
+	const vector<LiteralIdT> & getBinLinks(bool polarity) const
+	{     
+	   return binClLinks[polarity];
+	}
+	vector<LiteralIdT> & getBinLinks(bool polarity)
+	{     
+	   return binClLinks[polarity];
+	}
+	
+	bool eraseWatchClause(ClauseIdT idCl, bool polarity);		
+	
+	bool substituteWatchCl(bool polarity, const ClauseIdT & oldId, const ClauseIdT &newId);
+	
+	bool substituteBinLink(bool polarity, const LiteralIdT& oldLit, const LiteralIdT& newLit);
+	
+	// class destructor
+	~CVariableVertex();	
+};
+
+#endif 
+
Index: /vis_dev/sharpSAT/src/src_sharpSAT/MainSolver/InstanceGraph/ComponentTypes.h
===================================================================
--- /vis_dev/sharpSAT/src/src_sharpSAT/MainSolver/InstanceGraph/ComponentTypes.h	(revision 9)
+++ /vis_dev/sharpSAT/src/src_sharpSAT/MainSolver/InstanceGraph/ComponentTypes.h	(revision 9)
@@ -0,0 +1,356 @@
+#ifndef COMPONENTTYPES_H
+#define COMPONENTTYPES_H
+
+#ifdef DEBUG
+#include <assert.h>
+#endif
+
+
+#include <vector>
+#include <math.h>
+
+#include <RealNumberTypes.h>
+
+#include "AtomsAndNodes.h"
+
+using namespace std;
+
+//
+//  the identifier of the components
+//  identifier for (truly) binary clauses are not stored, therefore we need
+//  trueClauseCount to kepp track of the number of binary clauses still active in the
+//  component, otherwise if theClauses is empty one might suspect that the whole component is
+//  empty which would not be true if there where binary clauses in the original formula
+//
+class CComponentId
+{  
+  /// INVARIANT: content: vvvvv varsSENTINEL
+  vector<VarIdT> theVars;    
+  /// INVARIANT: content: cccccc clsSENTINEL
+  vector<ClauseIdT> theClauses;                   
+  
+  unsigned int trueClauseCount;  
+  
+  long unsigned int hashKeyVars;
+  long unsigned int hashKeyCls;
+  
+ public:
+  
+  /// INVARIANT:
+  ///  cachedChildren may be nonempty only if cachedAs == NIL_ENTRY
+  ///  if cachedAS != NIL_ENTRY then this component has been cached and
+  ///  its descendants can be found in xFormulaCache.entry(cachedAs).theDescendants
+  unsigned int cachedAs;
+  vector<unsigned int> cachedChildren;
+  
+  void addCachedChildren(const vector<unsigned int> & cc)
+  {
+     cachedChildren.insert(cachedChildren.end(),cc.begin(),cc.end());  
+  }
+  
+  
+  #define varsSENTINEL  0
+  #define clsSENTINEL   NOT_A_CLAUSE
+  
+  void reserveSpace(unsigned int nVars, unsigned int nCls)
+  {
+       theVars.reserve(nVars + 1);
+       theClauses.reserve(nCls + 1);
+  }
+  
+  inline void addCl(const ClauseIdT & cl)
+  { 
+     theClauses.push_back(cl);  
+     
+     //Compute HashKey   
+     if(cl != clsSENTINEL) hashKeyCls = hashKeyCls*7 + cl;        
+  }
+  
+  inline void addVar(const VarIdT & var)
+  { 
+     theVars.push_back(var);     
+     
+     //Compute HashKey
+     if(var != varsSENTINEL) hashKeyVars = hashKeyVars*5 + var;
+     
+  }
+  
+  long unsigned int getHashKey() const
+  {
+    return hashKeyVars + (hashKeyCls<<9);
+  }
+  
+  
+  void clear()
+  {
+   theVars.clear(); 
+   theClauses.clear(); 
+   trueClauseCount = 0;
+   cachedAs = 0;
+  }
+ 
+  CComponentId()
+  {    
+    clear();
+    trueClauseCount = 0;
+    cachedAs = 0;
+    hashKeyVars = 0;
+    hashKeyCls = 0;
+  }
+
+  
+  vector<VarIdT>::iterator varsBegin()  
+  {
+     return theVars.begin();
+  }
+ 
+   
+  vector<ClauseIdT>::iterator clsBegin()  
+  {
+     return theClauses.begin();
+  }
+  
+  inline vector<VarIdT>::const_iterator  varsBegin()  const
+  {
+     return theVars.begin();
+  }
+  
+  inline vector<ClauseIdT>::const_iterator  clsBegin()  const
+  {
+     return theClauses.begin();
+  }
+  
+  
+  unsigned int countVars()  const
+  {
+     #ifdef DEBUG
+     assert(theVars.size() >= 1);
+     #endif
+     return theVars.size() - 1;
+  }
+  
+  unsigned int countCls() const
+  {
+     #ifdef DEBUG
+     assert(theClauses.size() >= 1);
+     #endif
+     return theClauses.size() - 1;
+  }
+  
+  bool empty() const
+  {
+    return theVars.empty();// || theClauses.empty();
+  }
+  
+  int memSize() const
+  {
+     return theVars.capacity()*sizeof(VarIdT) +
+            theClauses.capacity()*sizeof(ClauseIdT);
+  }
+  
+  void setTrueClauseCount(unsigned int count)
+  {
+     trueClauseCount = count;    
+  }
+  
+  unsigned int getClauseCount()
+  {
+    #ifdef DEBUG
+    assert(trueClauseCount >= countCls());
+    #endif    
+    return trueClauseCount;
+  }
+
+  bool containsBinCls() const
+  {
+    #ifdef DEBUG
+    assert(trueClauseCount >= countCls());
+    #endif
+    return (trueClauseCount > countCls());
+  }
+  
+};
+
+template <class _T, unsigned int _bitsPerBlock = (sizeof(_T)<<3)>
+class CPackedCompId
+{ 
+  static unsigned int bpeCls, bpeVars; // bitsperentry    
+  static unsigned int maskVars,maskCls; 
+protected:  
+  vector<_T> theVars;      
+  vector<_T> theClauses;  
+  
+ public:
+  static unsigned int bitsPerVar() { return bpeVars;}
+  static unsigned int bitsPerCl() { return bpeCls;}
+  
+  unsigned int sizeVarVec() {return theVars.size();}
+  unsigned int sizeClVec() {return theClauses.size();}  
+ 
+  static void adjustPackSize(unsigned int maxVarId, unsigned int maxClId);  
+   
+  CPackedCompId()
+  {    
+  }
+  
+  void createFrom(const CComponentId &rComp);  
+  
+  
+  bool equals(const CPackedCompId<_T> &rComp) const
+  {
+    return theVars == rComp.theVars 
+          && theClauses == rComp.theClauses;
+  }
+  
+  bool equals(const CComponentId &rComp) const;
+  
+  void clear()
+  {
+   theVars.clear();
+   theClauses.clear();
+  }
+  
+  bool empty() const
+  {
+    return theVars.empty() && theClauses.empty();
+  }
+  
+  int memSize() const
+  {
+     return (theVars.capacity() + theClauses.capacity())*sizeof(_T);
+  }
+
+};
+
+/////////////////////////////////////////////////////////////////////////////
+//BEGIN Implementation CPackedCompId
+/////////////////////////////////////////////////////////////////////////////
+
+template <class _T, unsigned int _bitsPerBlock>
+unsigned int CPackedCompId<_T,_bitsPerBlock>::bpeCls = 0;
+template <class _T, unsigned int _bitsPerBlock>
+unsigned int CPackedCompId<_T,_bitsPerBlock>::bpeVars = 0; // bitsperentry
+template <class _T, unsigned int _bitsPerBlock>
+unsigned int CPackedCompId<_T,_bitsPerBlock>::maskVars = 0;
+template <class _T, unsigned int _bitsPerBlock>
+unsigned int CPackedCompId<_T,_bitsPerBlock>::maskCls = 0; // bitsperentry
+
+template <class _T, unsigned int _bitsPerBlock>
+void CPackedCompId<_T,_bitsPerBlock>::adjustPackSize(unsigned int maxVarId, unsigned int maxClId)
+{
+  bpeVars = (unsigned int)ceil(log((double)maxVarId+1)/log(2.0)); 
+  bpeCls = (unsigned int)ceil(log((double)maxClId+1)/log(2.0)); 
+
+  maskVars = maskCls = 0;
+  for(unsigned int i=0; i < bpeVars;i++) maskVars = (maskVars<<1) +1;
+  for(unsigned int i=0; i < bpeCls;i++) maskCls = (maskCls<<1) +1; 
+} 
+
+template <class _T, unsigned int _bitsPerBlock>
+void CPackedCompId<_T,_bitsPerBlock>::createFrom(const CComponentId &rComp)
+{    
+    vector<VarIdT>::const_iterator it;
+    vector<ClauseIdT>::const_iterator jt;
+    
+    if(!theVars.empty()) theVars.clear();
+    if(!theClauses.empty()) theClauses.clear();    
+    
+    theVars.reserve( rComp.countVars()*bpeVars/_bitsPerBlock +1);   
+    theClauses.reserve(rComp.countCls()*bpeCls/_bitsPerBlock +1);
+    
+    unsigned int bitpos = 0;        
+    unsigned int h = 0;
+    _T * pBack;  
+    
+    pBack = &theVars.front();
+    
+    for(it = rComp.varsBegin(); *it != varsSENTINEL;it++)
+    {     
+      h |= ((*it)<< (bitpos));
+      bitpos+= bpeVars;      
+                 
+      if(bitpos >= _bitsPerBlock)
+      {       
+       bitpos -= _bitsPerBlock;      
+       #ifdef DEBUG
+       assert(theVars.size() < theVars.capacity());
+       #endif
+       theVars.push_back(h);
+       h = ((*it)>> (bpeVars - bitpos));      
+      }      
+    }
+    if(bitpos > 0) theVars.push_back(h);
+    
+    bitpos = 0;
+    h = 0;
+    pBack = &theClauses.front();
+    for(jt = rComp.clsBegin(); *jt != clsSENTINEL;jt++)
+    {  
+      h |= ((*jt)<< (bitpos));      
+      bitpos += bpeCls;     
+                 
+      if(bitpos >= _bitsPerBlock)
+      {       
+       bitpos -= _bitsPerBlock;         
+       #ifdef DEBUG
+       assert(theClauses.size() < theClauses.capacity());
+       #endif
+       theClauses.push_back(h);
+       h = ((*jt)>> (bpeCls - bitpos));      
+      }      
+    }
+    if(bitpos > 0) theClauses.push_back(h);
+} 
+
+
+template <class _T, unsigned int _bitsPerBlock>
+bool CPackedCompId<_T,_bitsPerBlock>::equals(const CComponentId &rComp) const
+{
+   
+   if( (theVars.capacity() !=  (uint) rComp.countVars()*bpeVars/_bitsPerBlock +1)
+     || theClauses.capacity() != (uint) rComp.countCls()*bpeCls/_bitsPerBlock +1) return false;
+   
+   unsigned int bitpos = 0;        
+   unsigned int h = 0;
+   const _T * pItA;  
+      
+   pItA = &theVars.front();
+    
+   for(vector<VarIdT>::const_iterator it = rComp.varsBegin(); *it != varsSENTINEL;it++)
+   {   
+      h = ((*pItA)>> (bitpos));
+      bitpos+= bpeVars;                       
+      if(bitpos >= _bitsPerBlock)
+      {       
+        bitpos -= _bitsPerBlock;      
+        pItA++;
+        h |= ((*pItA)<< (bpeVars - bitpos));      
+      }
+      if(*it != (maskVars & h)) return false;      
+   }   
+   
+   bitpos = 0;    
+   pItA = &theClauses.front();    
+   for(vector<ClauseIdT>::const_iterator jt = rComp.clsBegin(); *jt != clsSENTINEL;jt++)
+   {  
+      h = (*pItA)>> (bitpos);      
+      bitpos += bpeCls;     
+                 
+      if(bitpos >= _bitsPerBlock)
+      {       
+       bitpos -= _bitsPerBlock;         
+       pItA++;
+       h |= ((*pItA)<< (bpeCls - bitpos));      
+      }      
+      if(*jt != (maskCls & h)) return false;
+   }   
+   
+   return true;
+   
+      
+}
+
+/////////////////////////////////////////////////////////////////////////////
+//END Implementation CPackedCompId
+/////////////////////////////////////////////////////////////////////////////
+#endif 
Index: /vis_dev/sharpSAT/src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.cpp
===================================================================
--- /vis_dev/sharpSAT/src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.cpp	(revision 9)
+++ /vis_dev/sharpSAT/src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.cpp	(revision 9)
@@ -0,0 +1,916 @@
+#include "InstanceGraph.h"
+#include <math.h>
+#include<fstream>
+#include<stdio.h>
+
+CRunAnalyzer theRunAn;
+
+
+// class constructor
+CInstanceGraph::CInstanceGraph()
+{
+
+}
+	
+// class destructor
+CInstanceGraph::~CInstanceGraph()
+{
+ toDEBUGOUT("lv sz:"<< theLitVector.size() << endl);
+ toDEBUGOUT("nUcls:"<< theUnitClauses.size() << endl);  
+}
+
+
+////////////////////////////////////////////////////////////////////////
+//
+//  BEGIN Methods for Clauses
+//
+///////////////////////////////////////////////////////////////////////
+
+bool CInstanceGraph::substituteLitsOf(CClauseVertex &rCl,const LiteralIdT &oldLit, const LiteralIdT &newLit)
+{
+  vector<LiteralIdT>::iterator it;
+  
+  if(oldLit == rCl.idLitA()) rCl.setLitA(newLit);
+  else if(oldLit == rCl.idLitB()) rCl.setLitB(newLit);
+    
+  if(oldLit.oppositeLit() == rCl.idLitA()) rCl.setLitA(newLit.oppositeLit());
+  else if(oldLit.oppositeLit() == rCl.idLitB()) rCl.setLitB(newLit.oppositeLit());
+    
+  for(it = begin(rCl); *it != ClauseEnd();it++)
+  {    
+    if(*it == oldLit)
+    {      
+      *it = newLit;                  
+      return true;
+    }
+    else if(*it == oldLit.oppositeLit())
+    {      
+      *it = newLit.oppositeLit();            
+      return true;
+    }   
+  }
+  return false;
+}
+
+bool CInstanceGraph::containsVar(const CClauseVertex &rCl, const VarIdT &theVar) const
+{
+  vector<LiteralIdT>::const_iterator it;
+  
+  for(it = begin(rCl); *it != ClauseEnd();it++)
+  {
+    if(it->toVarIdx() == theVar) return true;    
+  }
+  return false;
+}
+
+bool CInstanceGraph::containsLit(const CClauseVertex &rCl, const LiteralIdT &theLit) const
+{
+  vector<LiteralIdT>::const_iterator it;
+  
+  for(it = begin(rCl); *it != ClauseEnd();it++)
+  {
+    if(*it == theLit) return true;    
+  }
+  return false;
+}
+
+
+
+void CInstanceGraph::printCl(const CClauseVertex &rCl) const
+{  
+  vector<LiteralIdT>::const_iterator it;
+
+  for(it = begin(rCl); *it != ClauseEnd();it++)
+  {  
+    if(!(it)->polarity()) toSTDOUT("-");    
+    toSTDOUT(it->toVarIdx()+1 << " ");   
+  }
+  toSTDOUT("  0\n");
+}
+
+bool CInstanceGraph::createConflictClause(const vector<LiteralIdT> &theCClause)
+{   
+  ClauseIdT cclId;
+  vector<LiteralIdT>::const_iterator it;        
+  
+  #ifdef DEBUG
+  assert(theCClause.size() > 0);
+  #endif
+  
+  if(theCClause.size() == 1)
+  {    
+    createUnitCl(theCClause.front());
+    if(theUnitClauses.size() == 1 ||  theUnitClauses.size() % 5 == 0)
+    printCClstats();            
+    getVar(theCClause.front()).scoreVSIDS[theCClause.front().polarity()]++;
+    getVar(theCClause.front()).scoreVSIDS[theCClause.front().oppositeLit().polarity()]++;
+    theRunAn.addClause();    
+    return true;    
+  }
+  
+  
+  if(theCClause.size() == 2)  
+  {         
+   if(!createBinCCl(theCClause[0],theCClause[1])) return false;   
+   
+   getVar(theCClause[0]).scoreVSIDS[theCClause[0].polarity()]++;
+   getVar(theCClause[1]).scoreVSIDS[theCClause[1].polarity()]++;
+   getVar(theCClause[0]).scoreVSIDS[theCClause[0].oppositeLit().polarity()]++;
+   getVar(theCClause[1]).scoreVSIDS[theCClause[1].oppositeLit().polarity()]++;  
+   
+   if(numBinCCls % 100 == 0) printCClstats();
+   theRunAn.addClause();
+   return true;   
+  } 
+  
+  // create the ClauseVertex
+  
+  cclId = makeConflictClause();
+  
+  CClauseVertex *pCCl = &getClause(cclId);
+  
+  pCCl->setLitOfs(theLitVector.size());
+  pCCl->setLength(theCClause.size()); 
+  
+  int score = 0; 
+  LiteralIdT aLit = NOT_A_LIT; 
+  LiteralIdT bLit = NOT_A_LIT; 
+    
+  theLitVector.reserve(theLitVector.size() + theCClause.size());
+  for(it = theCClause.begin(); it != theCClause.end(); it++)
+  {   
+    // add literal *it to the litvector
+    theLitVector.push_back(*it);
+    
+    if(getVar(*it).getDLOD() >= score)
+    // determine the most recently set literals to become watched
+    {      
+      bLit = aLit;
+      aLit = *it;
+      score = getVar(*it).getDLOD();     
+    } 
+    getVar(*it).scoreVSIDS[it->polarity()]++;
+    getVar(*it).scoreVSIDS[it->oppositeLit().polarity()]++;
+  }
+  score = 0;
+  if(bLit == NOT_A_LIT)
+  for(it = theCClause.begin(); it != theCClause.end(); it++)
+  {   
+    if(*it != aLit && getVar(*it).getDLOD() >= score)
+    // determine the most recently set literals to become watched
+    {      
+      bLit = *it;
+      score = getVar(*it).getDLOD();     
+    }     
+  }
+  
+  #ifdef DEBUG
+  assert(aLit != NOT_A_LIT);
+  assert(bLit != NOT_A_LIT);
+  #endif
+   
+  // close the clause with a SENTINEL_LIT
+  theLitVector.push_back(SENTINEL_LIT);
+  
+  // set watch for litA
+  if(aLit != NOT_A_LIT)
+  {
+    pCCl->setLitA(aLit);     
+    getVar(aLit).addWatchClause(cclId,aLit.polarity());  
+  }
+  // set watch for litB 
+  if(bLit != NOT_A_LIT)
+  {
+    pCCl->setLitB(bLit);   
+    getVar(bLit).addWatchClause(cclId,bLit.polarity());  
+  }
+  
+  if(countCCls() % 10000 == 0) printCClstats(); 
+  theRunAn.addClause();
+  return true;
+}
+
+bool CInstanceGraph::setCClImplyingLit(ClauseIdT idCl, const LiteralIdT &theLit)
+{
+ CClauseVertex &rCV = getClause(idCl); 
+ vector<LiteralIdT>::const_iterator it; 
+ 
+ getVar(rCV.idLitA()).eraseWatchClause(idCl, rCV.idLitA().polarity()); 
+ getVar(rCV.idLitB()).eraseWatchClause(idCl, rCV.idLitB().polarity());  
+ 
+ int score = -1; 
+ LiteralIdT aLit = NOT_A_LIT; 
+ 
+ 
+ 
+ #ifdef DEBUG
+ bool ex = false;
+ for(it = begin(rCV); *it != ClauseEnd(); it++)
+  if(*it == theLit)
+  {      
+      ex = true;
+      break;
+  }
+ assert(ex); 
+ #endif
+ 
+ rCV.setLitA(theLit);         
+  getVar(rCV.idLitA()).addWatchClause(idCl,rCV.idLitA().polarity());  
+ // set watch for litB
+ 
+ aLit = NOT_A_LIT;
+ score = -1; 
+ 
+ for(it = begin(rCV); *it != ClauseEnd(); it++)
+  if(getVar(*it).getDLOD() > score)
+   {      
+      if(*it == theLit) continue;      
+      aLit = *it;
+      score = getVar(*it).getDLOD();     
+   }
+   
+ if(aLit != NOT_A_LIT)
+ { 
+   rCV.setLitB(aLit);   
+   getVar(aLit).addWatchClause(idCl,aLit.polarity());   
+ }
+ 
+ return true;
+}
+
+bool CInstanceGraph::cleanUp_deletedCCls()
+{ 
+  DepositOfClauses::iterator ct;  
+  
+  ///////////////////
+  // clean up LitVector
+  ///////////////////
+    
+  vector<LiteralIdT>::iterator writeLit = theLitVector.begin() + (beginOfCCls())->getLitOfs();
+  ct = beginOfCCls();
+  
+  for(vector<LiteralIdT>::iterator xt = writeLit;xt != theLitVector.end();xt++)
+   if(*xt != NOT_A_LIT)
+    {  
+      if(!ct->isDeleted())
+      {
+        ct->setLitOfs((unsigned int)(writeLit - theLitVector.begin()));
+        
+        while(*xt != NOT_A_LIT)
+        {
+          if(writeLit != xt) *writeLit = *xt;        
+	  xt++;
+	  writeLit++;	
+        }      
+        *(writeLit++) =  NOT_A_LIT; 
+      }
+      else { // *ct is deleted, hence, omit all its literals from consideration
+         while(*xt != NOT_A_LIT) xt++;//*(xt++) = NOT_A_LIT;
+       }
+       ct++;
+    }
+    
+  theLitVector.resize((unsigned int)(writeLit - theLitVector.begin()));  
+  
+  DepositOfClauses::iterator itWrite = beginOfCCls();
+  ///////////////////
+  // clean up clauses
+  /////////////////// 
+  ClauseIdT  oldId,newId;      
+                 
+  for(ct = beginOfCCls(); ct != endOfCCls();ct++)  
+   if(!ct->isDeleted())    
+   {     
+     if(itWrite != ct)    
+     {    
+      *itWrite = *ct;  
+      //BEGIN substitute CCLs
+      
+      oldId = toClauseIdT(ct);      
+      newId = toClauseIdT(itWrite);      
+                 
+      if(getVar(itWrite->idLitB()).isImpliedBy(oldId))   
+         getVar(itWrite->idLitB()).adjustAntecedent(AntecedentT(newId));    
+      if(getVar(itWrite->idLitA()).isImpliedBy(oldId)) 
+         getVar(itWrite->idLitA()).adjustAntecedent(AntecedentT(newId));  
+      
+      getVar(itWrite->idLitA()).substituteWatchCl(itWrite->idLitA().polarity(),oldId,newId);
+      getVar(itWrite->idLitB()).substituteWatchCl(itWrite->idLitB().polarity(),oldId,newId);
+      //END substitute CCLs  
+      
+      ct->setDeleted();
+     }
+     itWrite++;
+   }
+      
+  theClauses.erase(itWrite,endOfCCls());
+  
+  return true;
+}
+
+
+bool CInstanceGraph::deleteConflictCls()
+{   
+   DepositOfClauses::iterator it;
+   
+   double vgl = 0;
+   
+   for(it = beginOfCCls(); it != endOfCCls(); it++)
+   {
+      vgl = 11000.0;
+      if(it->length() != 0) vgl /= pow((double)it->length(),3);
+      
+      if(CStepTime::getTime() - it->getLastTouchTime() >  vgl)
+      {     
+	 markCClDeleted(toClauseIdT(it));	
+      }
+   }
+   return true;
+}
+
+bool CInstanceGraph::markCClDeleted(ClauseIdT idCl)
+{
+  CClauseVertex & rCV = getClause(idCl);
+  if(rCV.isDeleted()) return false;
+  /////
+  // a clause may not be deleted if it causes an implication:
+  ///
+  if(getVar(rCV.idLitB()).isImpliedBy(idCl)
+     ||getVar(rCV.idLitA()).isImpliedBy(idCl))
+  {
+    return false;
+  } 
+      
+  getVar(rCV.idLitB()).eraseWatchClause(idCl, rCV.idLitB().polarity());
+  getVar(rCV.idLitA()).eraseWatchClause(idCl, rCV.idLitA().polarity());  
+  rCV.setDeleted();
+  return true;
+}
+
+////////////////////////////////////////////////////////////////////////
+//
+//  END Methods for Clauses
+//
+///////////////////////////////////////////////////////////////////////
+
+bool CInstanceGraph::prep_substituteClauses(unsigned int oldIdx, unsigned int newIdx)
+{
+  CClauseVertex &rCl = getClause(newIdx);
+  vector<LiteralIdT>::const_iterator it;
+  vector<ClauseIdT>::iterator jt;
+  ClauseIdT  oldId(oldIdx),newId(newIdx);
+    
+  
+  if(getVar(rCl.idLitB()).isImpliedBy(oldId))   
+        getVar(rCl.idLitB()).adjustAntecedent(AntecedentT(newId));    
+	
+  if(getVar(rCl.idLitA()).isImpliedBy(oldId)) 
+        getVar(rCl.idLitA()).adjustAntecedent(AntecedentT(newId));    
+    
+  
+  getVar(rCl.idLitA()).substituteWatchCl(rCl.idLitA().polarity(),oldId,newId);
+  getVar(rCl.idLitB()).substituteWatchCl(rCl.idLitB().polarity(),oldId,newId);
+      
+  for(it = begin(rCl); *it != ClauseEnd(); it++)
+  {  
+    // substitute ClEdges in theInClsVector
+    for(vector<ClauseIdT>::iterator jt = var_InClsBegin(it->toVarIdx(),false);*jt != SENTINEL_CL; jt++)
+    {
+      if(*jt == oldId) *jt = newId; 
+    }       
+    //
+  }
+  
+  return true;
+}
+
+
+bool CInstanceGraph::prep_substituteVars(CVariableVertex &rV, unsigned int newIdx)
+// only valid if no conflict clauses are present
+{
+  vector<ClauseIdT>::const_iterator it;
+  vector<LiteralIdT>::iterator kt,vt;
+  
+  vector<LiteralIdT>::iterator jt;
+  unsigned int oldIdx = rV.getVarIdT();
+  rV.newtecIndex(newIdx);
+  
+  LiteralIdT oldLit, newLit;
+  
+  oldLit = LiteralIdT(oldIdx,true);
+  newLit = LiteralIdT(newIdx,true);
+  
+  for(it = var_InClsBegin(rV.getVarIdT(),true); *it != SENTINEL_CL; it++)
+  {    
+    substituteLitsOf(getClause(*it),oldLit,newLit);
+  }
+  
+  for(kt = rV.getBinLinks(true).begin(); *kt != SENTINEL_LIT; kt++)
+  {
+    getVar(*kt).substituteBinLink(kt->polarity(),oldLit,newLit);
+  }
+  
+  oldLit = LiteralIdT(oldIdx,false);
+  newLit = LiteralIdT(newIdx,false);
+  
+  for(it = var_InClsBegin(rV.getVarIdT(),true)-1; *it != SENTINEL_CL; it--)
+  {    
+    substituteLitsOf(getClause(*it),oldLit,newLit);
+  }
+  
+  for(kt = rV.getBinLinks(false).begin(); *kt != SENTINEL_LIT; kt++)
+  {
+    getVar(*kt).substituteBinLink(kt->polarity(),oldLit,newLit);
+  }    
+  return true;
+}
+
+
+bool CInstanceGraph::eraseLiteralFromCl(ClauseIdT idCl,LiteralIdT theLit)
+{ 
+  bool retV = false;
+  CClauseVertex & rCV = getClause(idCl);
+  vector<LiteralIdT>::iterator it;
+  vector<LiteralIdT>::iterator endCl = begin(rCV) + rCV.length();
+  if(rCV.isDeleted()) return false;
+  
+  if(getVar(rCV.idLitA()).isImpliedBy(idCl)
+     || getVar(rCV.idLitB()).isImpliedBy(idCl)) return false;
+     
+  getVar(rCV.idLitA()).eraseWatchClause(idCl, rCV.idLitA().polarity());
+  if(rCV.length() >= 2) 
+  getVar(rCV.idLitB()).eraseWatchClause(idCl, rCV.idLitB().polarity());
+  
+  for(it = begin(rCV); *it != ClauseEnd();it++)
+  {  
+   if((*it) == theLit)
+   {     
+     if(it != endCl-1) *it = *(endCl-1);
+     *(endCl-1) = NOT_A_LIT;  
+     rCV.setLength(rCV.length()-1);       
+     retV = true;
+     break;
+   }   
+  }
+  
+  rCV.setLitA(NOT_A_LIT);
+  rCV.setLitB(NOT_A_LIT);
+  
+  if(rCV.length() >= 1)
+  {    
+    rCV.setLitA(*begin(rCV));
+    getVar(rCV.idLitA()).addWatchClause(idCl, rCV.idLitA().polarity());   
+  }
+  if(rCV.length() >= 2)
+  {    
+    rCV.setLitB(*(begin(rCV)+1));
+    getVar(rCV.idLitB()).addWatchClause(idCl, rCV.idLitB().polarity());   
+  }
+  
+  return retV;
+}
+
+bool CInstanceGraph::prep_CleanUpPool()
+{     
+  ///////////////////
+  // clean up clauses
+  ///////////////////
+  DepositOfClauses::iterator ct, ctWrite = theClauses.begin()+1;
+   
+  for(ct = theClauses.begin()+1; ct != theClauses.end();ct++)  
+   if(!ct->isDeleted())    
+   {     
+     if(ctWrite != ct)    
+     {    
+      *ctWrite = *ct;              
+      prep_substituteClauses((unsigned int)(ct - theClauses.begin()), (unsigned int)(ctWrite - theClauses.begin()));    
+     }
+     ctWrite++;
+   } 
+  
+  theClauses.erase(ctWrite,theClauses.end()); 
+  iOfsBeginConflictClauses = theClauses.size();
+  ///////////////////
+  // clean up LitVector
+  ///////////////////  
+  
+  vector<LiteralIdT>::iterator writeLit = theLitVector.begin();
+   
+  ct = theClauses.begin()+1;
+  
+  for(vector<LiteralIdT>::iterator xt = writeLit;xt != theLitVector.end();xt++)
+   if(*xt != SENTINEL_LIT) // start of the next clause found
+   {  
+      ct->setLitOfs((unsigned int) (writeLit - theLitVector.begin()));
+      ct++;
+      while(*xt != SENTINEL_LIT)
+      {
+        if(writeLit != xt) *writeLit = *xt;     
+	xt++; writeLit++;
+      }
+      *writeLit =  NOT_A_LIT; 
+      writeLit++;
+   }
+  
+  theLitVector.resize((unsigned int) (writeLit - theLitVector.begin())); 
+  
+  
+  ///////////////////
+  // clean up vars
+  ///////////////////  
+  
+  DepositOfVars::iterator it, itWriteVar = theVars.begin()+1;
+  
+  for(it = theVars.begin()+1; it != theVars.end();it++)  
+  {    
+    if(!it->isolated() || it->isActive())    
+    {     
+     if(itWriteVar != it)    
+     {  
+      *itWriteVar = *it;               
+      prep_substituteVars(*itWriteVar, itWriteVar - theVars.begin()); 
+     }     
+     itWriteVar++;
+    }
+  }
+  
+  theVars.erase(itWriteVar,theVars.end());
+  
+  
+  it = theVars.begin()+1;
+  ///////////////////
+  // clean up inCls
+  //////////////////
+    
+  vector<ClauseIdT>::iterator clt, cltWrite = theInClsVector.begin()+2;  
+   for(clt = theInClsVector.begin()+2;clt != theInClsVector.end();clt++)
+   if(*clt != SENTINEL_CL)
+    {  
+       while(theInClsVector[it->getInClsVecOfs(false)] == SENTINEL_CL
+            && theInClsVector[it->getInClsVecOfs(true)] == SENTINEL_CL)
+            {
+               it->setInClsVecOfs(false,0);
+               it->setInClsVecOfs(true,1);
+               it++;
+            }
+       
+      {
+        it->setInClsVecOfs((unsigned int)(cltWrite - theInClsVector.begin()));
+        
+        while(*clt != SENTINEL_CL)
+        {
+          if(cltWrite != clt) *cltWrite = *clt;        
+	  clt++;
+	  cltWrite++;	
+        }      
+        *(cltWrite++) =  SENTINEL_CL; 
+      }
+      it++;
+    }
+   
+  theInClsVector.resize((unsigned int) (cltWrite - theInClsVector.begin()));
+  
+  theUnitClauses.clear();
+  theUClLookUp.clear();
+  theUClLookUp.resize(theVars.size(),X);
+  
+  unsigned int countBinCl= 0;
+  // as the number of binary clauses might have changed,
+  // we have to update the numBinClauses, which keeps track of the # of bin Clauses
+  for(it = theVars.begin(); it != theVars.end();it++)  
+  {
+    countBinCl += it->countBinLinks();    
+  }
+  numBinClauses = countBinCl>>1;  
+   
+  toDEBUGOUT("inCls sz:"<<theInClsVector.size()*sizeof(ClauseIdT)<<" "<<endl);
+  return true;
+}
+
+bool CInstanceGraph::createfromFile(const char* lpstrFileName)
+{
+  
+  const int BUF_SZ = 65536;
+  const int TOK_SZ = 255;
+  
+  char buf[BUF_SZ]; 
+  char token[TOK_SZ];
+  unsigned int line = 0;
+  unsigned int nVars, nCls;
+  int lit;
+  vector<int> litVec;
+  vector<TriValue> seenV;
+  int clauseLen = 0;
+  TriValue pol;
+  
+  vector<int> varPosMap;
+  
+  // BEGIN INIT 
+   reset(); // clear everything  
+  // END INIT 
+  
+  ///BEGIN File input
+  FILE *filedesc;
+  filedesc = fopen(lpstrFileName,"r");
+  if(filedesc == NULL){toERROUT(" Error opening file "<< lpstrFileName<<endl); exit(3);}
+  fclose(filedesc);
+  
+  ifstream inFile(lpstrFileName,ios::in); //TODO change this: check if file exists
+  
+  // read the preamble of the cnf file 
+  while(inFile.getline(buf,BUF_SZ))
+  {
+    line++;
+    if(buf[0] == 'c') continue;
+    if(buf[0] == 'p')
+    {
+       if(sscanf (buf, "p cnf %d %d", &nVars, &nCls) < 2)
+       {
+	  toERROUT("line "<<line<<": failed reading problem line \n");
+	  exit(3);
+       }
+       break;
+    }    
+    else 
+    {
+      toERROUT("line"<<line<<": problem line expected "<<endl);
+    }
+  }
+  int i,j;
+  // now read the data
+  while(inFile.getline(buf,BUF_SZ))
+  {
+    line++;
+    i = 0;
+    j = 0;
+    if(buf[0] == 'c') continue;
+    while(buf[i] != 0x0)
+    {      
+      
+      while(buf[i] != 0x0 &&  buf[i] != '-' &&(buf[i] < '0' || buf[i] > '9')) i++;      
+      while(buf[i] == '-' || buf[i] >= '0' && buf[i] <= '9')
+      {
+       token[j] = buf[i];
+       i++; j++;    
+      }
+      token[j] = 0x0;
+      lit = atoi(token);
+      j = 0;
+      if(lit == 0) // end of clause
+      {
+        if(clauseLen > 0) litVec.push_back(0);
+        clauseLen = 0;
+      }
+      else {
+         clauseLen++;
+         litVec.push_back(lit);      
+      }    
+    }
+  }		
+  
+  
+  if(!inFile.eof()){ toERROUT(" CNF input: line too long");}
+  inFile.close();
+  /// END FILE input	
+  	
+  	
+  vector<int>::iterator it, jt, itEndCl;
+   
+  int actVar;
+  bool istaut = true;
+  int imultipleLits = 0;  
+  int ilitA, ilitB, lengthCl;
+  LiteralIdT LitA,LitB;
+  ClauseIdT idCl;
+  
+  seenV.resize(nVars+1,X);
+  varPosMap.resize(nVars+1,-1);
+  theVars.reserve(nVars+1);
+  theLitVector.reserve(litVec.size());
+  theClauses.reserve(nCls + 10000);       
+  theRunAn.init(nVars,nCls);   
+  
+  vector<vector<ClauseIdT> > _inClLinks[2];
+  
+  _inClLinks[0].resize(nVars+1);
+  _inClLinks[1].resize(nVars+1);
+  
+  it = litVec.begin();
+  
+  
+  
+  while(it != litVec.end())
+  {
+    jt = it; 
+    istaut = false;
+    imultipleLits = 0;
+    ilitA = 0; ilitB = 0; // we pick two literals from each clause for watch- or bin-creation
+    lengthCl = 0;
+    while(*jt != 0) // jt passes through the clause to determine if it is valid
+    {      
+      actVar = abs(*jt);
+      if(seenV[actVar] == X) // literal not seen
+      {
+        seenV[actVar] = (*jt > 0)?W:F;
+        if(ilitA == 0) ilitA = *jt;
+        else if(ilitB == 0) ilitB = *jt;
+        jt++;        
+      }
+      else if(seenV[actVar] == (*jt > 0)?W:F)      
+      { // literal occurs twice: omit it
+            *jt = 0;
+            imultipleLits++;
+            jt++;
+      }
+      else
+      { // literal in two opposing polarities -> don't include this clause (INVALID)
+        istaut = true;           
+        while(*jt != 0) jt++;
+        //cout <<"X";
+        break;
+      }
+    }
+    
+    itEndCl = jt;
+    lengthCl = (int)(itEndCl - it) - imultipleLits;
+    
+    if(!istaut && lengthCl > 0) // if the clause is not tautological, add it
+    {
+      #ifdef DEBUG
+      if(ilitA == 0){ toERROUT("ERR"); exit(3);}
+      #endif
+      
+      actVar = abs(ilitA); 
+      if(varPosMap[actVar]== -1) // create new Var if not present yet
+      	  varPosMap[actVar] = makeVariable(actVar);
+      	               
+      LitA = LiteralIdT(varPosMap[actVar],(ilitA > 0)?W:F);
+      
+      
+      if(ilitB != 0)// determine LiteralIdT for ilitB         
+      {
+        actVar = abs(ilitB); 
+        if(varPosMap[actVar]== -1) // create new Var if not present yet
+	    varPosMap[actVar] = makeVariable(actVar);
+	    
+        LitB = LiteralIdT(varPosMap[actVar],(ilitB > 0)?W:F);     
+      }
+       
+       
+      if(lengthCl == 1)
+      {         
+         theUnitClauses.push_back(LitA);            
+      } 
+      else if(lengthCl == 2)
+      {
+         #ifdef DEBUG
+         if(ilitB == 0) { toERROUT("ERR BIN CL"); exit(3);}
+         #endif
+         
+         if(!getVar(LitA).hasBinLinkTo(LitB,LitA.polarity()))
+         {
+         getVar(LitA).addBinLink(LitA.polarity(),LitB);
+         getVar(LitB).addBinLink(LitB.polarity(),LitA);      
+         numBinClauses++;      
+         }
+      }
+      else
+      {
+         #ifdef DEBUG
+         if(ilitB == 0) { toERROUT("ERR CL"); exit(3);}
+         #endif
+         idCl = makeClause();
+         getClause(idCl).setLitOfs(theLitVector.size());
+              
+         theLitVector.push_back(LitA); 
+	 
+	 /// new
+	 _inClLinks[LitA.polarity()][LitA.toVarIdx()].push_back(idCl);
+	 getVar(LitA).scoreDLIS[LitA.polarity()]++;
+	 ///
+	 theLitVector.push_back(LitB); 
+	 
+	 /// new
+	 _inClLinks[LitB.polarity()][LitB.toVarIdx()].push_back(idCl);
+	 getVar(LitB).scoreDLIS[LitB.polarity()]++;
+	 ///
+	      
+	 for(jt = it+2; jt != itEndCl;jt++)
+          if(*jt != 0 && *jt != ilitB) // add all nonzero literals
+          {
+            actVar = abs(*jt); 
+	    pol = (*jt > 0)?W:F;	 
+            if(varPosMap[actVar]== -1) // create new Var
+	        varPosMap[actVar] = makeVariable(actVar);
+	    
+	    // add lit to litvector
+	    theLitVector.push_back(LiteralIdT(varPosMap[actVar],pol));	    
+	    /// new
+	     _inClLinks[pol][varPosMap[actVar]].push_back(idCl);
+	     getVar(varPosMap[actVar]).scoreDLIS[pol]++;
+	    ///
+          }
+          // make an end: SENTINEL_LIT
+          theLitVector.push_back(SENTINEL_LIT);
+               
+          getClause(idCl).setLitA(LitA);
+          getClause(idCl).setLitB(LitB);
+          getClause(idCl).setLength(lengthCl);
+      
+          getVar(LitA).addWatchClause(idCl,LitA.polarity());
+          getVar(LitB).addWatchClause(idCl,LitB.polarity());
+      } 
+      
+    }
+     
+    // undo the entries in seenV 
+    for(jt = it; jt != itEndCl;jt++) seenV[abs(*jt)] = X;
+    
+    it = itEndCl;
+    it++;  
+  } 
+  
+  
+  
+  //BEGIN initialize theInClsVector
+  theInClsVector.clear();
+  theInClsVector.reserve(theLitVector.size() + nVars);  
+  theInClsVector.push_back(SENTINEL_CL);
+  vector<ClauseIdT>::iterator clt;
+  for(unsigned int i = 0; i <= nVars; i++)  
+  {
+    getVar(i).setInClsVecOfs(false,theInClsVector.size());    
+    for(clt = _inClLinks[0][i].begin(); clt != _inClLinks[0][i].end(); clt++)
+    {
+      theInClsVector.push_back(*clt);    
+    }
+    
+    getVar(i).setInClsVecOfs(true,theInClsVector.size());
+    for(clt = _inClLinks[1][i].begin(); clt != _inClLinks[1][i].end(); clt++)
+    {
+      theInClsVector.push_back(*clt);    
+    }
+    theInClsVector.push_back(SENTINEL_CL);      
+  }  
+  //END initialize theInClsVector
+  
+  #ifdef DEBUG
+  assert(theInClsVector.size() <= theLitVector.size() + nVars + 1);  
+  toDEBUGOUT("inCls sz:"<<theInClsVector.size()*sizeof(ClauseIdT)<<" "<<endl);
+  toDEBUGOUT("lsz: "<< theLitVector.size()*sizeof(unsigned int)<< " bytes"<<endl);
+  #endif  
+  
+  theUClLookUp.resize(theVars.size()+1,X);  
+  iOfsBeginConflictClauses = theClauses.size();          
+  
+  theRunAn.setUsedVars(countAllVars());
+  return true;
+}
+
+
+unsigned int CInstanceGraph::countActiveBinLinks(VarIdT theVar) const
+{  
+  unsigned int n =0;
+  
+  const CVariableVertex &rVar = getVar(theVar);  
+  vector<LiteralIdT>::const_iterator bt;
+ 
+  for(bt = rVar.getBinLinks(true).begin(); bt != rVar.getBinLinks(true).end(); bt++)      
+  {
+	if(*bt != SENTINEL_LIT) n+= (unsigned int)getVar(*bt).isActive();
+  }
+  
+  for(bt = rVar.getBinLinks(false).begin(); bt != rVar.getBinLinks(false).end(); bt++)     
+  {
+	if(*bt != SENTINEL_LIT) n+= (unsigned int)getVar(*bt).isActive();
+  }  
+  
+  return n;
+}
+
+void CInstanceGraph::print()
+{
+  DepositOfClauses::iterator it;
+  for(it = theClauses.begin()+1; it != theClauses.end();it++)
+  {
+    printCl(*it);
+  }
+}
+
+
+void CInstanceGraph::printActiveClause(const ClauseIdT &idCl) const
+{
+  vector<LiteralIdT>::const_iterator it;
+  toSTDOUT("(");
+  
+  for(it = begin(getClause(idCl)); *it != ClauseEnd();it++)
+  {
+    if(getVar(*it).isActive())
+    {      
+      if(it->polarity()) toSTDOUT(" ") else toSTDOUT("-");
+      
+      toSTDOUT(it->toVarIdx() << " ");
+    }
+  }
+  toSTDOUT(")");
+}
Index: /vis_dev/sharpSAT/src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.h
===================================================================
--- /vis_dev/sharpSAT/src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.h	(revision 9)
+++ /vis_dev/sharpSAT/src/src_sharpSAT/MainSolver/InstanceGraph/InstanceGraph.h	(revision 9)
@@ -0,0 +1,394 @@
+#ifndef INSTANCE_GRAPH_H
+#define INSTANCE_GRAPH_H
+
+
+#include<vector>
+#include<deque>
+
+#ifdef DEBUG
+#include <assert.h>
+#endif
+
+using namespace std;
+
+#include <Interface/AnalyzerData.h>
+
+#include "../../Basics.h"
+#include "AtomsAndNodes.h"
+
+
+typedef vector<CClauseVertex> DepositOfClauses;
+typedef vector<CVariableVertex> DepositOfVars;
+
+
+extern CRunAnalyzer theRunAn;
+
+class CInstanceGraph
+{
+   /** theLitVector: the literals of all clauses are stored here
+   *   INVARIANT: first and last entries of theLitVector are a SENTINEL_LIT
+   *
+   */
+   vector<LiteralIdT>  theLitVector;
+   
+   /** theInClsVector:
+   * the Vector containing all links from variables
+   * to the clauses they appear in
+   * INVARIANT: for each Variable x the block of clause links looks as follows:
+           SENTINEL_CL nnnnnnnnppppppp SENTINEL_CL
+        where: n ... clause where -x appears; p.. clause where x appears
+   */
+   vector<ClauseIdT> theInClsVector; 
+   
+   DepositOfClauses    theClauses;   
+   unsigned int iOfsBeginConflictClauses;
+   
+   DepositOfVars       theVars;
+   
+   vector<AntecedentT> theConflicted;
+   unsigned int numBinClauses;
+   unsigned int numBinCCls; 
+   
+ protected:
+   
+   vector<LiteralIdT>  theUnitClauses;
+   vector<TriValue>  theUClLookUp;
+   
+   /// THE function to clear all the data in this class 
+   void reset()
+   {
+      theLitVector.clear();  
+      theLitVector.push_back(SENTINEL_LIT);
+      
+      theInClsVector.clear();
+      theInClsVector.push_back(SENTINEL_CL);
+      
+      theClauses.clear();
+      theClauses.push_back(CClauseVertex());  
+      iOfsBeginConflictClauses = 0;
+      
+      theVars.clear();
+      theVars.push_back(CVariableVertex(0,0)); //initializing the Sentinel
+      theConflicted.clear();
+      
+      numBinClauses = 0;
+      numBinCCls = 0;
+      
+      theUnitClauses.clear();
+      theUClLookUp.clear();
+   }
+   
+   void doVSIDSScoreDiv()
+   {
+     DepositOfVars::iterator it;
+     for(it = beginOfVars();it != endOfVars();it++)
+     {
+       it->scoreVSIDS[0] >>= 1;
+       it->scoreVSIDS[1] >>= 1;              
+     }       
+   }
+
+ protected:
+   void printCClstats()
+   {
+     toSTDOUT("CCls (all/bin/unit):\t");
+     toSTDOUT(theClauses.size() - iOfsBeginConflictClauses);
+     toSTDOUT("/"<< numBinCCls<< "/"<<theUnitClauses.size()<<endl);
+   }
+   bool isUnitCl(const LiteralIdT theLit)
+   {
+     return theUClLookUp[theLit.toVarIdx()] == theLit.polarityTriVal();
+   }
+ 
+   unsigned int countBinClauses() const { return numBinClauses;}
+   unsigned int countBinCCls() const { return numBinCCls;}
+   DepositOfClauses::iterator beginOfCCls()
+   {
+     return theClauses.begin() + iOfsBeginConflictClauses;
+   }
+   DepositOfClauses::iterator endOfCCls()
+   {
+     return theClauses.end();
+   }
+   DepositOfClauses::iterator beginOfClauses()
+   {
+     return theClauses.begin()+1;
+   }
+   
+   ClauseIdT toClauseIdT(DepositOfClauses::iterator it)
+   {
+     unsigned int idx = (unsigned int)(it - theClauses.begin());
+     return ClauseIdT(idx);   
+   }
+   
+   
+   DepositOfClauses::iterator endOfClauses()
+   {
+     return theClauses.begin() + iOfsBeginConflictClauses;
+   }
+   
+   DepositOfVars::iterator beginOfVars()
+   {
+    return theVars.begin()+1;
+   }
+   
+   DepositOfVars::iterator endOfVars()
+   {
+     return theVars.end();
+   }
+   vector<LiteralIdT>::iterator begin(CClauseVertex &rCV)
+   { 
+     return theLitVector.begin() + rCV.getLitOfs();
+   }
+   
+   vector<LiteralIdT>::const_iterator begin(const CClauseVertex &rCV) const
+   {
+      return theLitVector.begin() + rCV.getLitOfs();
+   }
+   
+   const LiteralIdT & ClauseEnd() const {return SENTINEL_LIT;}
+     
+   
+   bool substituteLitsOf(CClauseVertex &rCl,const LiteralIdT &oldLit, const LiteralIdT &newLit);
+   bool containsVar(const CClauseVertex &rCl,const VarIdT &theVar) const;	
+   bool containsLit(const CClauseVertex &rCl,const LiteralIdT &theLit) const;
+
+ public:
+   
+   CInstanceGraph();
+   ~CInstanceGraph();
+   
+   /////////////////////////////////////////////////////////
+   // BEGIN access to variables and clauses
+   inline vector<ClauseIdT>::const_iterator var_InClsBegin(VarIdT VarIndex) const
+   {
+     return (theInClsVector.begin() + theVars[VarIndex].getInClsVecOfs(false));
+   }
+   
+   inline vector<ClauseIdT>::iterator var_InClsBegin(VarIdT VarIndex,bool pol) 
+   {
+     return (theInClsVector.begin() + theVars[VarIndex].getInClsVecOfs(pol));
+   }
+   
+   inline vector<ClauseIdT>::iterator var_InClsStart(VarIdT VarIndex,bool pol) 
+   {
+     return (theInClsVector.begin() + theVars[VarIndex].getInClsVecOfs(true) - 1 + (int) pol);
+   }
+   
+   inline int var_InClsStep(bool pol) 
+   {
+     return pol?1:-1;
+   }
+    
+    
+   inline bool var_EraseClsLink(VarIdT VarIndex, bool linkPol ,ClauseIdT idCl)
+   {     
+     CVariableVertex &rV = getVar(VarIndex);
+     vector<ClauseIdT>::iterator it;
+     
+     if(!linkPol)
+     {
+       for(it = var_InClsBegin(VarIndex, true)-1;
+            *it != SENTINEL_CL;it--)       
+         if(*it == idCl)
+         {      
+           while(*it != SENTINEL_CL) {*it = *(it-1); it--;}
+           rV.setInClsVecOfs(false,rV.getInClsVecOfs(false)+1);
+           return true;
+         }
+     } else
+     {
+       for(it = var_InClsBegin(VarIndex, true);*it != SENTINEL_CL;it++)
+         if(*it == idCl)
+         {      
+           while(*it!= SENTINEL_CL) {*it = *(it+1); it++;}
+           return true;
+         }    
+     }      
+     return false;
+   }
+  
+  
+   
+   inline vector<ClauseIdT>::const_iterator var_InClsBegin(CVariableVertex &vv) const
+   {
+     return (theInClsVector.begin() + vv.getInClsVecOfs(false));
+   }
+   
+   
+   inline CVariableVertex &getVar(VarIdT VarIndex)
+   {
+     return theVars[VarIndex];
+   }
+   inline const CVariableVertex &getVar(VarIdT VarIndex) const
+   {
+     return theVars[VarIndex];
+   }
+   
+   inline bool isSatisfied(const LiteralIdT &lit)  const
+   {
+     return theVars[lit.toVarIdx()].getVal() == lit.polarityTriVal();
+   }
+   inline bool isSatisfied(const ClauseIdT &iCl)  const
+   {
+     return isSatisfied(getClause(iCl).idLitA())
+            || isSatisfied(getClause(iCl).idLitB());
+   }
+   
+   inline CVariableVertex &getVar(const LiteralIdT &rLitId)
+   {
+     return theVars[rLitId.toVarIdx()];
+   }
+   
+   inline const CVariableVertex &getVar(const LiteralIdT &rLitId) const
+   {
+     return theVars[rLitId.toVarIdx()];
+   }
+   
+   inline CClauseVertex &getClause(const ClauseIdT &iClauseId)
+   {
+     return theClauses[iClauseId];
+   }
+   
+   inline const CClauseVertex &getClause(const ClauseIdT &iClauseId) const
+   {
+    return theClauses[iClauseId];
+   }
+   
+   // END access to variables and clauses
+   /////////////////////////////////////////////////////////
+   
+   inline const ClauseIdT getLastClauseId()
+   {
+     return ClauseIdT(theClauses.size()-1);	  
+   }
+   
+   
+   vector<AntecedentT> &getConflicted()
+   {
+     return theConflicted;
+   }
+   
+   // BEGIN count something
+   inline unsigned int countAllClauses() const
+   {
+     return theClauses.size() - 1  + countBinClauses();
+   }
+   
+   inline unsigned int countCCls() const
+   {
+     return theClauses.size() - iOfsBeginConflictClauses;
+   }
+   
+   inline unsigned int countOriginalClauses() const
+   {  
+     return theClauses.size();
+   }
+   
+   inline unsigned int getMaxOriginalClIdx() const
+   {  
+     return iOfsBeginConflictClauses;
+   }
+   
+   inline unsigned int countAllVars()
+   {
+    return theVars.size() -1;
+   }
+   
+   unsigned int countActiveBinLinks(VarIdT theVar) const;   
+
+   // END count something   
+
+   bool createfromFile(const char* lpstrFileName);
+
+   
+   void print();
+   void printCl(const CClauseVertex &rCl) const;
+   void printActiveClause(const ClauseIdT &idCl) const;
+
+ protected:
+   // cleans up the ClausePool 
+   /// NOTE: this does only work correctly if no CCls are present
+   bool prep_CleanUpPool();   
+  
+   
+   // only valid if no conflict clauses are present
+   bool prep_substituteClauses(unsigned int oldIdx, unsigned int newIdx);
+   bool prep_substituteVars(CVariableVertex &rV, unsigned int newIdx);
+
+   bool markCClDeleted(ClauseIdT idCl);
+   
+   
+   ///  only correct if theLit is conteined in idCl
+   bool setCClImplyingLit(ClauseIdT idCl, const LiteralIdT &theLit);
+   bool eraseLiteralFromCl(ClauseIdT idCl,LiteralIdT theLit);
+   
+   bool deleteConflictCls();
+   bool cleanUp_deletedCCls();
+   
+   bool createConflictClause(const vector<LiteralIdT> &theCClause);
+   
+   
+   unsigned int makeVariable(unsigned int VarNum)
+   {
+     theVars.push_back(CVariableVertex(VarNum,theVars.size()));  
+     return theVars.back().getVarIdT();
+   }
+   
+   ClauseIdT makeClause()
+   {      
+      theClauses.push_back(CClauseVertex());  
+      return ClauseIdT(theClauses.size()-1);
+   }
+   
+   ClauseIdT makeConflictClause()
+   {
+      theClauses.push_back(CClauseVertex());  
+      return ClauseIdT(theClauses.size()-1);
+   }
+   
+   bool createUnitCl(LiteralIdT Lit)
+   {  
+     theUnitClauses.push_back(Lit);
+     if(theUClLookUp[Lit.toVarIdx()] == Lit.oppositeLit().polarityTriVal()) return false;
+     theUClLookUp[Lit.toVarIdx()] = Lit.polarityTriVal();
+     return true;
+   }
+   
+   bool createBinCl(LiteralIdT LitA,LiteralIdT LitB)
+   {
+     if(getVar(LitA).hasBinLinkTo(LitB,LitA.polarity()))
+       {
+        #ifdef DEBUG
+          assert(getVar(LitB).hasBinLinkTo(LitA,LitB.polarity()));
+          toDEBUGOUT("%");
+        #endif        
+        return false;
+       }
+      getVar(LitA).addBinLink(LitA.polarity(),LitB);
+      getVar(LitB).addBinLink(LitB.polarity(),LitA);   
+      numBinClauses++;
+      return true;
+   }
+
+   bool createBinCCl(LiteralIdT LitA,LiteralIdT LitB)
+   {
+      if(getVar(LitA).hasBinLinkTo(LitB,LitA.polarity()))
+      {
+         #ifdef DEBUG
+           assert(getVar(LitB).hasBinLinkTo(LitA,LitB.polarity()));
+         #endif
+         return false;
+      }
+      getVar(LitA).addBinLinkCCl(LitA.polarity(),LitB);
+      getVar(LitB).addBinLinkCCl(LitB.polarity(),LitA);   
+      numBinCCls++;
+      return true;
+   }
+   
+   
+};
+
+
+
+#endif // CLAUSEPOOL_H
Index: /vis_dev/sharpSAT/src/src_sharpSAT/MainSolver/InstanceGraph/semantic.cache
===================================================================
--- /vis_dev/sharpSAT/src/src_sharpSAT/MainSolver/InstanceGraph/semantic.cache	(revision 9)
+++ /vis_dev/sharpSAT/src/src_sharpSAT/MainSolver/InstanceGraph/semantic.cache	(revision 9)
@@ -0,0 +1,20 @@
+;; Object InstanceGraph/
+;; SEMANTICDB Tags save file
+(semanticdb-project-database-file "InstanceGraph/"
+  :tables (list 
+   (semanticdb-table "InstanceGraph.h"
+    :major-mode 'c-mode
+    :tags 'nil
+    :file "InstanceGraph.h"
+    )
+   (semanticdb-table "InstanceGraph.cpp"
+    :major-mode 'c++-mode
+    :tags '(("InstanceGraph.h" include nil nil [1 27]) ("math.h" include (:system-flag t) nil [28 45]) ("theRunAn" variable (:type ("CRunAnalyzer" type (:type "class") nil nil)) nil [83 105]) ("CInstanceGraph" function (:constructor-flag t :parent "CInstanceGraph" :type ("CInstanceGraph" type "class")) nil [129 166]) ("CInstanceGraph" function (:destructor-flag t :parent "CInstanceGraph" :type "void") nil [189 336]) ("substituteLitsOf" function (:parent "CInstanceGraph" :arguments (("rCl" variable (:type ("CClauseVertex" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [559 578]) ("oldLit" variable (:constant-flag t :type ("LiteralIdT" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [578 603]) ("newLit" variable (:constant-flag t :type ("LiteralIdT" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [604 629])) :type ("bool" type (:type "class") nil nil)) nil [521 1247]) ("containsVar" function (:parent "CInstanceGraph" :arguments (("rCl" variable (:constant-flag t :type ("CClauseVertex" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [1282 1307]) ("theVar" variable (:constant-flag t :type ("VarIdT" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [1308 1329])) :type ("bool" type (:type "class") nil nil)) nil [1249 1505]) ("containsLit" function (:parent "CInstanceGraph" :arguments (("rCl" variable (:constant-flag t :type ("CClauseVertex" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [1540 1565]) ("theLit" variable (:constant-flag t :type ("LiteralIdT" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [1566 1591])) :type ("bool" type (:type "class") nil nil)) nil [1507 1756]) ("printCl" function (:parent "CInstanceGraph" :arguments (("rCl" variable (:constant-flag t :type ("CClauseVertex" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [1789 1814])) :type "void") nil [1760 2034]) ("createConflictClause" function (:parent "CInstanceGraph" :arguments (("theCClause" variable (:constant-flag t :type ("vector" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [2078 2115])) :type ("bool" type (:type "class") nil nil)) nil [2036 4835]) ("setCClImplyingLit" function (:parent "CInstanceGraph" :arguments (("idCl" variable (:type ("ClauseIdT" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [4876 4891]) ("theLit" variable (:constant-flag t :type ("LiteralIdT" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [4892 4917])) :type ("bool" type (:type "class") nil nil)) nil [4837 5868]) ("cleanUp_deletedCCls" function (:parent "CInstanceGraph" :type ("bool" type (:type "class") nil nil)) nil [5870 7880]) ("deleteConflictCls" function (:parent "CInstanceGraph" :type ("bool" type (:type "class") nil nil)) nil [7883 8281]) ("markCClDeleted" function (:parent "CInstanceGraph" :arguments (("idCl" variable (:type ("ClauseIdT" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [8319 8334])) :type ("bool" type (:type "class") nil nil)) nil [8283 8797]) ("prep_substituteClauses" function (:parent "CInstanceGraph" :arguments (("oldIdx" variable (:type "unsigned int") (reparse-symbol arg-sub-list) [9023 9043]) ("newIdx" variable (:type "unsigned int") (reparse-symbol arg-sub-list) [9044 9064])) :type ("bool" type (:type "class") nil nil)) nil [8979 9936]) ("prep_substituteVars" function (:parent "CInstanceGraph" :arguments (("rV" variable (:type ("CVariableVertex" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [9980 10000]) ("newIdx" variable (:type "unsigned int") (reparse-symbol arg-sub-list) [10001 10021])) :type ("bool" type (:type "class") nil nil)) nil [9939 11032]) ("eraseLiteralFromCl" function (:parent "CInstanceGraph" :arguments (("idCl" variable (:type ("ClauseIdT" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [11075 11090]) ("theLit" variable (:type ("LiteralIdT" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [11090 11108])) :type ("bool" type (:type "class") nil nil)) nil [11035 12205]) ("prep_CleanUpPool" function (:parent "CInstanceGraph" :type ("bool" type (:type "class") nil nil)) nil [12207 15426]) ("createfromFile" function (:parent "CInstanceGraph" :arguments (("lpstrFileName" variable (:pointer 1 :constant-flag t :type "char") (reparse-symbol arg-sub-list) [15464 15490])) :type ("bool" type (:type "class") nil nil)) nil [15428 22832]) ("countActiveBinLinks" function (:parent "CInstanceGraph" :arguments (("theVar" variable (:type ("VarIdT" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [22884 22898])) :type "unsigned int") nil [22835 23380]) ("print" function (:parent "CInstanceGraph" :type "void") nil [23382 23535]) ("printActiveClause" function (:parent "CInstanceGraph" :arguments (("idCl" variable (:constant-flag t :type ("ClauseIdT" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [23577 23599])) :type "void") nil [23538 23909]))
+    :file "InstanceGraph.cpp"
+    :pointmax 23910
+    )
+   )
+  :file "semantic.cache"
+  :semantic-tag-version "2.0beta3"
+  :semanticdb-version "2.0beta3"
+  )
Index: /vis_dev/sharpSAT/src/src_sharpSAT/MainSolver/MainSolver.cpp
===================================================================
--- /vis_dev/sharpSAT/src/src_sharpSAT/MainSolver/MainSolver.cpp	(revision 9)
+++ /vis_dev/sharpSAT/src/src_sharpSAT/MainSolver/MainSolver.cpp	(revision 9)
@@ -0,0 +1,1260 @@
+#include "MainSolver.h" // class's header file
+
+// class constructor
+CMainSolver::CMainSolver():decStack(*this)
+{
+   stopWatch.setTimeBound(CSolverConf::secsTimeBound);  
+   remPoll = 0;
+}
+
+// class destructor
+CMainSolver::~CMainSolver()
+{ 
+   toDEBUGOUT("removed. Poll: "<<remPoll<<endl);
+}
+
+
+
+bool CMainSolver::performPreProcessing()
+{    
+   if(!prepBCP())
+   {
+      theRunAn.setExitState(SUCCESS);
+      stopWatch.markStopTime();
+      return false;
+   }   
+   if(CSolverConf::allowPreProcessing)
+   {   
+      toSTDOUT("BEGIN preprocessing"<<endl);                  
+      if(!prepFindHiddenBackBoneLits()) 
+      {
+        theRunAn.setExitState(SUCCESS);
+        toSTDOUT("ERR: UNSAT Formula"<<endl);  
+        stopWatch.markStopTime();
+        return false;
+      }             
+      toSTDOUT(endl<<"END preprocessing"<<endl); 
+   }
+     
+   prep_CleanUpPool();     
+  
+   toSTDOUT("#Vars remaining:"<<countAllVars()<<endl); 
+   toSTDOUT("#Clauses remaining:"<<countAllClauses()<<endl); 
+   toSTDOUT("#bin Cls remaining:"<<countBinClauses()<<endl);   
+
+   return true;
+}
+
+void CMainSolver::solve(const char *lpstrFileName)
+{
+  SOLVER_StateT exSt;
+  
+  stopWatch.markStartTime();  
+
+  createfromFile(lpstrFileName);  
+   
+  decStack.init(countAllVars());
+  
+  CStepTime::makeStart(); 
+  
+  xFormulaCache.init();   
+  
+  toSTDOUT("#Vars:"<<countAllVars()<<endl); 
+  toSTDOUT("#Clauses:"<<countAllClauses()<<endl);  
+  toSTDOUT("#bin Cls:"<<countBinClauses()<<endl); 
+   
+  bool needToCount = performPreProcessing(); 
+
+  if (needToCount && !(CSolverConf::count)) {
+ 	theRunAn.setExitState(SUCCESS);
+     	theRunAn.setSatCount(1.0);
+	stopWatch.markStopTime();
+        theRunAn.setElapsedTime(stopWatch.getElapsedTime());
+        xFormulaCache.printStatistics(theRunAn);
+        return;
+  }
+
+  theRunAn.setRemovedClauses(theRunAn.getData().nRemovedClauses +  theRunAn.getData().nOriginalClauses - getMaxOriginalClIdx() + 1 -countBinClauses());
+  
+  if(needToCount)
+  {
+     // the following call only correct if bin clauses not used for caching
+     CCacheEntry::adjustPackSize(countAllVars(), getMaxOriginalClIdx());
+  
+     lastTimeCClDeleted = CStepTime::getTime();
+     lastCClCleanUp = CStepTime::getTime();
+     makeCompIdFromActGraph(decStack.TOSRefComp());
+     bcpImplQueue.clear();
+     bcpImplQueue.reserve(countAllVars());
+     
+     // the size of componentSearchStack has to be reserved, otherwise getComp(...) might
+     // become erroneous due to realloc
+     componentSearchStack.reserve(countAllVars()+2);
+     
+     exSt = countSAT();        
+  
+     theRunAn.setExitState(exSt);
+     theRunAn.setSatCount(decStack.top().getOverallSols());
+  }
+  else{
+    
+    theRunAn.setExitState(SUCCESS);
+    theRunAn.setSatCount(0.0);
+  } 
+  
+  stopWatch.markStopTime();
+  
+  theRunAn.setElapsedTime(stopWatch.getElapsedTime());
+  
+  xFormulaCache.printStatistics(theRunAn);
+}
+
+
+SOLVER_StateT CMainSolver::countSAT()
+{   
+   retStateT res;   
+   
+   while(true)
+   {      
+      while(decide())
+      {
+         if(stopWatch.timeBoundBroken()) return TIMEOUT;   
+ 
+	 while(!bcp())
+         {
+	    res = resolveConflict();
+	    if (res == EXIT) return SUCCESS;    
+	    if (res == PROCESS_COMPONENT) break; //force calling decide()    
+         } 
+      }      
+      
+      res = backTrack();  
+      if(res == EXIT) return SUCCESS;  
+      
+      while(res != PROCESS_COMPONENT && !bcp())
+      { 
+	 res = resolveConflict();
+	 if(res == EXIT) return SUCCESS;   
+      }      
+   }
+}
+
+
+
+bool CMainSolver::findVSADSDecVar(LiteralIdT &theLit, const CComponentId & superComp)
+{   
+    vector<VarIdT>::const_iterator it;
+      
+    int score = -1;         
+    int bo;
+    PVARV pVV = NULL;
+        
+    for(it = superComp.varsBegin(); *it != varsSENTINEL; it++)
+      if(getVar(*it).isActive())
+      {	 
+	 bo = (int) getVar(*it).getVSIDSScore() + getVar(*it).getDLCSScore() ;  
+	 
+	 if(bo > score)
+	 {
+	      score = bo;	      
+	      pVV = &getVar(*it);
+	 }
+      }
+    
+    if(pVV == NULL) return false;
+        
+    bool pol = pVV->scoreDLIS[true] + pVV->scoreVSIDS[true] > pVV->scoreDLIS[false] + pVV->scoreVSIDS[false];
+    
+    theLit = pVV->getLitIdT(pol);
+    
+    return true;
+}
+
+
+bool CMainSolver::decide()
+{   
+   LiteralIdT theLit(NOT_A_LIT);
+   
+   CStepTime::stepTime(); // Solver-Zeit   
+   
+   
+   if(CStepTime::getTime() - xFormulaCache.getLastDivTime() > xFormulaCache.getScoresDivTime())
+   {   
+      xFormulaCache.divCacheScores();    
+      xFormulaCache.setLastDivTime(CStepTime::getTime());
+   }
+       
+      
+   if(!bcpImplQueue.empty()) return true;
+      
+   if(!decStack.TOS_hasAnyRemComp())
+   { 
+     recordRemainingComps();     
+     if(decStack.TOS_countRemComps() == 0)
+     {    
+       handleSolution();
+       return false;
+     }
+   }
+   
+
+   if(!findVSADSDecVar(theLit, decStack.TOS_NextComp())   
+     || decStack.TOS_NextComp().getClauseCount() == 0) // i.e. component satisfied 
+   {   
+    handleSolution();    
+    decStack.TOS_popRemComp();
+    return false;             
+   }   
+      
+   //checkCachedCompVal:
+   static CRealNum cacheVal;   
+   
+   decStack.TOS_NextComp();
+   
+   if(CSolverConf::allowComponentCaching
+     && 
+     xFormulaCache.extract(decStack.TOS_NextComp(),cacheVal))
+     {   
+       decStack.top().includeSol(cacheVal);       
+       theRunAn.addValue(SOLUTION,decStack.getDL());          
+       decStack.TOS_popRemComp();       
+       return false;   
+     }   
+   /////////////////////////////   
+   decStack.push();   
+   bcpImplQueue.clear();
+   bcpImplQueue.push_back(AntAndLit(NOT_A_CLAUSE,theLit));   
+   
+       theRunAn.addValue(DECISION,decStack.getDL());  
+   
+   
+   if(theRunAn.getData().nDecisions % 255 == 0)
+   {   
+      doVSIDSScoreDiv();    
+   }
+       
+   return true;
+}
+
+void CMainSolver::removeAllCachePollutions()
+{
+   // check if one sibling has modelcount 0
+   // if so, the other siblings may have polluted the cache --> remove pollutions
+   // cout << decStack.getDL()<<" "<<endl;
+   for(vector<CComponentId *>::iterator it = decStack.TOSRemComps_begin();
+         it != decStack.getAllCompStack().end(); it++)
+      // if component *it is cached remove it and all of its descendants
+      if((*it)->cachedAs != 0)
+      { 
+	       remPoll += xFormulaCache.removePollutedEntries((*it)->cachedAs);
+	       (*it)->cachedAs = 0;
+	       (*it)->cachedChildren.clear();	       
+      }
+      // it might occur that *it is not yet cached, but has descedants that are cached
+      // thus we have to delete them
+      else if(!(*it)->cachedChildren.empty())
+      {
+        for(vector<unsigned int>::iterator ct = (*it)->cachedChildren.begin();
+             ct != (*it)->cachedChildren.end(); ct++)
+         {    
+           remPoll += xFormulaCache.removePollutedEntries(*ct);
+         }     
+      }	                
+      xFormulaCache.revalidateCacheLinksIn(decStack.getAllCompStack());	   
+   
+}
+
+retStateT CMainSolver::backTrack()
+{   
+    unsigned int refTime = theRunAn.getData().nAddedClauses;
+    LiteralIdT aLit;
+
+    if(refTime - lastTimeCClDeleted > 1000
+       && countCCls() > 3000)
+    {      
+      deleteConflictCls();
+      lastTimeCClDeleted = refTime;
+    }
+    
+    if(refTime - lastCClCleanUp > 35000 )
+    {
+      cleanUp_deletedCCls();
+      toSTDOUT("cleaned:"); printCClstats();    
+      lastCClCleanUp = refTime;
+    }
+    
+    //component cache delete old entries
+    if(CSolverConf::allowComponentCaching)
+      xFormulaCache.deleteEntries(decStack);
+     
+    do{   
+       if(decStack.top().getBranchSols() == 0.0)
+                removeAllCachePollutions(); 
+       
+       if(decStack.top().anotherCompProcessible())
+       {  
+	 return PROCESS_COMPONENT;
+       }
+             
+       if(!decStack.top().isFlipped())
+       {             
+         aLit = decStack.TOS_decLit();
+	 decStack.flipTOS();
+	 bcpImplQueue.push_back(AntAndLit(NOT_A_CLAUSE,aLit.oppositeLit()));
+	 return RESOLVED;   
+       }
+   
+       //include the component value of the current component into the Cache
+       if(CSolverConf::allowComponentCaching)
+       {   
+         xFormulaCache.include(decStack.TOSRefComp(), decStack.top().getOverallSols());
+       }  
+           
+    } while(decStack.pop());
+    
+    return EXIT;
+}
+
+
+
+bool CMainSolver::bcp()
+{   
+    bool bSucceeded;    
+       
+    vector<LiteralIdT>::iterator it;             
+    
+    //BEGIN process unit clauses
+    for(it = theUnitClauses.begin(); it != theUnitClauses.end(); it++)
+    {     
+     if(getVar(*it).isActive())           
+	bcpImplQueue.push_back(AntAndLit(NOT_A_CLAUSE, *it));             
+     
+     if(isUnitCl(it->oppositeLit()))
+     {       
+       // dealing with opposing unit clauses is handed over to
+       // resolveConflict
+       return false;  
+     }          
+    }    
+    //END process unit clauses
+    
+    bSucceeded = BCP(bcpImplQueue);
+    bcpImplQueue.clear();
+   
+    if(CSolverConf::allowImplicitBCP 
+        && bSucceeded )
+      {         
+	 bSucceeded = implicitBCP();    	          
+      }
+    
+    theRunAn.addValue(IMPLICATION, decStack.getDL(),
+                      decStack.TOS_countImplLits());    
+    
+    
+    return bSucceeded;
+}
+
+
+retStateT CMainSolver::resolveConflict()
+{   
+   int backtrackDecLev;          
+   
+   for(vector<LiteralIdT>::iterator it = theUnitClauses.begin(); it != theUnitClauses.end(); it++)
+    {   
+     if(isUnitCl(it->oppositeLit()))
+     {
+       toSTDOUT("\nOPPOSING UNIT CLAUSES - INSTANCE UNSAT\n");
+       return EXIT;  
+     }          
+    }
+       
+   theRunAn.addValue(CONFLICT,  decStack.getDL(), 1);
+           
+   #ifdef DEBUG
+    assert(!getConflicted().empty());
+   #endif
+    
+   if(!CSolverConf::analyzeConflicts || getConflicted().empty())
+          return backTrack(); 
+           
+   caGetCauses_firstUIP(getConflicted());        
+   backtrackDecLev = getMaxDecLevFromAnalysis();       
+    
+    
+     
+   if(ca_1UIPClause.size() < ca_lastUIPClause.size()) 
+      create1UIPCCl(); 
+   //BEGIN Backtracking
+      
+    if(backtrackDecLev < decStack.getDL())
+    {      
+      if(CSolverConf::doNonChronBackTracking)  
+       while(decStack.getDL() > backtrackDecLev)
+       {         
+         /// check for polluted cache Entries
+         removeAllCachePollutions();          
+         ///         
+         decStack.pop();
+       }
+      return backTrack();
+       
+    }  
+      
+    // maybe the other branch had some solutions
+    if(decStack.top().isFlipped()) 
+    {       
+       return backTrack();     
+    }  
+    
+    // now: if the other branch has to be visited:
+    
+    createAntClauseFor(decStack.TOS_decLit().oppositeLit());
+      
+    LiteralIdT aLit = decStack.TOS_decLit();
+    AntecedentT ant = getVar(aLit).getAntecedent();
+    decStack.flipTOS();    
+    
+    bcpImplQueue.push_back(AntAndLit(ant,aLit.oppositeLit()));              
+    //END Backtracking
+    return RESOLVED;   
+}
+
+
+
+/////////////////////////////////////////////////////
+// BEGIN component analysis
+/////////////////////////////////////////////////////
+
+
+
+bool CMainSolver::recordRemainingComps()
+{
+  // the refComp has to be copied!! because in case that the vector
+  // containing it has to realloc (which might happen here)
+  // copying the refcomp is not necessary anymore, as the allCompsStack is a vector
+  // of pointers - realloc does not invalidate these
+  CComponentId & refSupComp = decStack.TOSRefComp();  
+  
+  viewStateT lookUpCls[getMaxOriginalClIdx()+2];         
+  viewStateT lookUpVars[countAllVars()+2];       
+  
+  memset(lookUpCls,NIL,sizeof(viewStateT)*(getMaxOriginalClIdx()+2));  
+  memset(lookUpVars,NIL,sizeof(viewStateT)*(countAllVars()+2));
+  
+  vector<VarIdT>::const_iterator vt;  
+  vector<ClauseIdT>::const_iterator itCl;
+  
+  for(itCl = refSupComp.clsBegin(); *itCl != clsSENTINEL; itCl++)
+  {    
+     lookUpCls[*itCl] = IN_SUP_COMP;     
+  }
+    
+  for(vt = refSupComp.varsBegin(); *vt != varsSENTINEL; vt++)
+  {
+    if(getVar(*vt).isActive())
+    {
+     lookUpVars[*vt] = IN_SUP_COMP;
+     getVar(*vt).scoreDLIS[true] = 0;
+     getVar(*vt).scoreDLIS[false] = 0;
+    }
+  }
+  
+  vector<LiteralIdT>::const_iterator itL; 
+  
+  for(vt = refSupComp.varsBegin(); *vt != varsSENTINEL; vt++)
+   if(lookUpVars[*vt] == IN_SUP_COMP)
+   {
+     decStack.TOS_addRemComp();
+    
+     getComp(*vt, decStack.TOSRefComp(), lookUpCls, lookUpVars);    
+   }  
+  
+ 
+  decStack.TOS_sortRemComps();
+  return true;
+}
+
+
+
+
+bool CMainSolver::getComp(const VarIdT &theVar, 
+	                    const CComponentId &superComp,
+			    viewStateT lookUpCls[], 
+			    viewStateT lookUpVars[])
+{  
+  componentSearchStack.clear();         
+     
+  lookUpVars[theVar] = SEEN;  
+  componentSearchStack.push_back(theVar);  
+  vector<VarIdT>::const_iterator vt,itVEnd; 
+     
+  vector<LiteralIdT>::const_iterator itL;
+  vector<ClauseIdT>::const_iterator itCl;          
+  
+  CVariableVertex * pActVar;
+  
+  unsigned int nClausesSeen = 0, nBinClsSeen = 0;  
+  
+  for(vt = componentSearchStack.begin(); vt !=componentSearchStack.end();vt++)
+  // the for-loop is applicable here because componentSearchStack.capacity() == countAllVars()
+  {   
+    pActVar = &getVar(*vt);    
+   //BEGIN traverse binary clauses
+   for(itL =pActVar->getBinLinks(true).begin();*itL != SENTINEL_LIT;itL++)
+    if(lookUpVars[itL->toVarIdx()] == IN_SUP_COMP)
+    {
+       nBinClsSeen++;
+       lookUpVars[itL->toVarIdx()] = SEEN;
+       componentSearchStack.push_back(itL->toVarIdx());
+       getVar(*itL).scoreDLIS[itL->polarity()]++;
+       pActVar->scoreDLIS[true]++; 
+    }
+   for(itL =pActVar->getBinLinks(false).begin();*itL != SENTINEL_LIT;itL++)
+    if(lookUpVars[itL->toVarIdx()] == IN_SUP_COMP)
+    {
+       nBinClsSeen++;
+       lookUpVars[itL->toVarIdx()] = SEEN;
+       componentSearchStack.push_back(itL->toVarIdx());
+       getVar(*itL).scoreDLIS[itL->polarity()]++;
+       pActVar->scoreDLIS[false]++; 
+    }
+   //END traverse binary clauses
+   
+   
+   for(itCl = var_InClsBegin(*pActVar); *itCl != SENTINEL_CL; itCl++)   
+    if(lookUpCls[*itCl] == IN_SUP_COMP)
+    {    
+       itVEnd = componentSearchStack.end();
+       for(itL = begin(getClause(*itCl)); *itL != ClauseEnd(); itL++)       
+         if(lookUpVars[itL->toVarIdx()] == NIL) //i.e. the var is not active
+         {    
+            if(!isSatisfied(*itL)) continue;	  
+	    //BEGIN accidentally entered a satisfied clause: undo the search process
+	    while(componentSearchStack.end() != itVEnd)
+	    {
+	       lookUpVars[componentSearchStack.back()] = IN_SUP_COMP;
+	       componentSearchStack.pop_back();
+	    }
+	    lookUpCls[*itCl] = NIL;
+	    for(vector<LiteralIdT>::iterator itX = begin(getClause(*itCl));itX != itL; itX++)
+	    {
+	     if(getVar(*itX).scoreDLIS[itX->polarity()] > 0) getVar(*itX).scoreDLIS[itX->polarity()]--; 
+	    }
+	    //END accidentally entered a satisfied clause: undo the search process
+	    break;
+	      
+         }else{
+          
+          getVar(*itL).scoreDLIS[itL->polarity()]++; 
+	  if(lookUpVars[itL->toVarIdx()] == IN_SUP_COMP)
+           {         
+              lookUpVars[itL->toVarIdx()] = SEEN;   	     
+              componentSearchStack.push_back(itL->toVarIdx());
+           }
+           }
+	 
+            
+      if(lookUpCls[*itCl] == NIL) continue;
+      nClausesSeen++; 
+      lookUpCls[*itCl] = SEEN;          
+    }       
+  }
+    
+  /////////////////////////////////////////////////
+  // BEGIN store variables in resComp 
+  /////////////////////////////////////////////////
+ 
+  decStack.lastComp().reserveSpace(componentSearchStack.size(), nClausesSeen);  
+  
+  for(vt = superComp.varsBegin(); *vt != varsSENTINEL; vt++)
+   if(lookUpVars[*vt] == SEEN) //we have to put a var into our component
+    {
+        decStack.lastComp().addVar(*vt);        
+	lookUpVars[*vt] = IN_OTHER_COMP;
+    } 
+  
+  decStack.lastComp().addVar(varsSENTINEL);          
+  
+  /////////////////////////////////////////////////
+  // END store variables in resComp 
+  /////////////////////////////////////////////////
+  
+  for(itCl = superComp.clsBegin(); *itCl != clsSENTINEL; itCl++)
+    if(lookUpCls[*itCl] == SEEN)
+    {
+       decStack.lastComp().addCl(*itCl);             
+       lookUpCls[*itCl] = IN_OTHER_COMP;
+    }
+  decStack.lastComp().addCl(clsSENTINEL);  
+  decStack.lastComp().setTrueClauseCount(nClausesSeen + nBinClsSeen);
+  
+  return true;
+}
+
+
+
+/////////////////////////////////////////////////////
+// END component analysis
+/////////////////////////////////////////////////////
+
+
+void CMainSolver::makeCompIdFromActGraph(CComponentId& rComp)
+{
+   DepositOfClauses::iterator it;
+   DepositOfVars::iterator jt;
+   
+   rComp.clear();
+   unsigned int nBinClauses = 0;
+   unsigned int idx = 1;
+   for(it = beginOfClauses(); it != endOfClauses(); it++, idx++)
+   {
+      #ifdef DEBUG
+      assert(!it->isDeleted()); // deleted Cls should be cleaned by prepCleanPool
+      #endif
+      rComp.addCl(ClauseIdT(idx));        
+   }
+   rComp.addCl(clsSENTINEL);
+   idx = 1;  
+   for(jt = beginOfVars(); jt != endOfVars();jt++, idx++)
+   {    
+     #ifdef DEBUG
+     assert(jt->isActive()); // deleted Vars should be cleaned by prepCleanPool
+     #endif
+     rComp.addVar(idx);     
+     nBinClauses += countActiveBinLinks(idx);
+    
+   }
+   rComp.addVar(varsSENTINEL);
+   
+   nBinClauses >>=1;  
+   rComp.setTrueClauseCount(nBinClauses + rComp.countCls()); 
+}
+
+
+void CMainSolver::printComponent(const CComponentId& rComp)
+{
+  vector<ClauseIdT>::const_iterator it;  
+  for(it = rComp.clsBegin(); *it != clsSENTINEL;it++)
+  {
+    printActiveClause(*it);
+  }
+}
+
+
+
+
+///////////////////////////////////////////////
+
+bool CMainSolver::BCP(vector<AntAndLit> &thePairsOfImpl)
+{
+   extd_vector<ClauseIdT>* pUnWatchCls;
+   extd_vector<ClauseIdT>::iterator it;
+   bool retV;
+   ClauseIdT actCl;
+   PCLV pCl;
+   vector<LiteralIdT>::const_iterator bt;
+   vector<LiteralIdT>::iterator itL;
+   LiteralIdT satLit,unLit;
+   
+   getConflicted().clear();
+   
+   for(unsigned int i = 0; i < thePairsOfImpl.size();i++)
+    if(assignVal(thePairsOfImpl[i].getLit(),thePairsOfImpl[i].getAnt()))
+    {     
+       satLit = thePairsOfImpl[i].getLit();
+       unLit = thePairsOfImpl[i].getLit().oppositeLit();
+       decStack.TOS_addImpliedLit(satLit);
+       
+       pUnWatchCls = &getVar(unLit).getWatchClauses(unLit.polarity());
+       
+       //BEGIN Propagate Bin Clauses
+       for(bt = getVar(unLit).getBinLinks(unLit.polarity()).begin(); *bt != SENTINEL_LIT;bt++)		
+       {
+          if(getVar(*bt).isActive()) thePairsOfImpl.push_back(AntAndLit(unLit,*bt));
+          else if(!isSatisfied(*bt))
+          {
+             getConflicted().push_back(unLit);
+             getConflicted().push_back(*bt);
+             return false;
+          }
+       }
+       for(bt = bt+1; *bt != SENTINEL_LIT;bt++)
+       {
+          if(getVar(*bt).isActive()) thePairsOfImpl.push_back(AntAndLit(unLit,*bt));
+          else if(!isSatisfied(*bt))
+          {
+             getConflicted().push_back(unLit);
+             getConflicted().push_back(*bt);
+             return false;
+          }
+       }
+       //END Propagate Bin Clauses
+       
+       for(it = pUnWatchCls->end()-1; *it != SENTINEL_CL; it--)
+       {
+          actCl = *it;
+          pCl = &getClause(actCl);   
+          // all clauses treated as conflict clauses, because no subsumption
+          // is being performed
+          if(isSatisfied(pCl->idLitA()) || isSatisfied(pCl->idLitB())) continue;
+          ///////////////////////////////////////
+          //BEGIN update watched Lits
+          ///////////////////////////////////////
+          retV = false;
+          for(itL = begin(*pCl); *itL != ClauseEnd(); itL++)
+          if(getVar(*itL).isActive() || isSatisfied(*itL))
+          {
+             if(*itL == pCl->idLitA() || *itL == pCl->idLitB()) continue;
+             retV = isSatisfied(*itL);
+             getVar(*itL).addWatchClause(actCl,itL->polarity());
+             if(pCl->idLitA() == unLit)
+             	pCl->setLitA(*itL);
+             else
+                pCl->setLitB(*itL);
+             pUnWatchCls->quickErase(it);
+             break;
+	  }      
+	  if(retV) continue; // i.e. clause satisfied           
+	  ///////////////////////////////////////
+          //END update watched Lits
+	  ///////////////////////////////////////      
+      	  
+      	  if(getVar(pCl->idLitA()).isActive())
+	  {
+	     if(!getVar(pCl->idLitB()).isActive()) //IMPLIES_LITA;
+             {
+                thePairsOfImpl.push_back(AntAndLit(actCl,pCl->idLitA()));
+                pCl->setTouched();
+	     }
+	  }
+	  else
+	  {
+	     pCl->setTouched();
+	     if(getVar(pCl->idLitB()).isActive()) //IMPLIES_LITB;
+	        thePairsOfImpl.push_back(AntAndLit(actCl,pCl->idLitB()));
+	     else  //provided that SATISFIED has been tested                   
+             {
+                getConflicted().push_back(actCl);
+                return false;
+             }
+         }
+      }
+    }   
+    return true; 
+}
+
+
+bool CMainSolver::createAntClauseFor(const LiteralIdT &Lit)
+{
+	const vector<LiteralIdT> &actCCl = caGetPrevLastUIPCCl();
+   
+	bool created = createLastUIPCCl();  
+  
+	if(!created && actCCl.size() != 2) return false;  
+  
+	if(actCCl.size() == 1) 
+	{
+	  getVar(Lit).adjustAntecedent(NOT_A_CLAUSE);
+	  return true; // theLit has become a unit clause: nothing to be done
+	} 
+	if(actCCl.size() == 2)
+	{
+		#ifdef DEBUG
+                assert(actCCl.front() != Lit.oppositeLit());
+                assert(actCCl.back() != Lit.oppositeLit());
+                #endif
+                
+		if(actCCl.front() == Lit)
+			getVar(Lit).adjustAntecedent(AntecedentT(actCCl.back()));                
+		else if(actCCl.back() == Lit)    
+			getVar(Lit).adjustAntecedent(AntecedentT(actCCl.front()));    
+    
+		return true;
+	}
+	setCClImplyingLit(getLastClauseId(),Lit);	
+	getVar(Lit).adjustAntecedent(AntecedentT(getLastClauseId()));	
+	return true;
+}
+
+bool CMainSolver::implicitBCP()
+{
+   vector<LiteralIdT>::iterator jt;
+   vector<LiteralIdT>::const_iterator it,lt;   
+   vector<ClauseIdT>::const_iterator ct;    
+
+   static vector<AntAndLit> implPairs;    
+   implPairs.clear();
+   vector<LiteralIdT> nextStep; 
+   bool viewedLits[(countAllVars()+1)*2 +1];    
+   LiteralIdT newLit;
+   AntecedentT theAnt, nant;
+   LiteralIdT theLit,nlit;
+   implPairs.reserve(decStack.TOSRefComp().countVars());        
+   nextStep.reserve(decStack.TOSRefComp().countVars());
+   int allFound = 0;
+   bool bsat;
+   
+   int impOfs = 0;  
+   int step;
+   do{ 
+      if(decStack.TOS_countImplLits() - impOfs > 0) 
+      {
+         memset(viewedLits,false,sizeof(bool)*((countAllVars()+1)*2 +1));
+         nextStep.clear();
+         for(it = decStack.TOS_ImpliedLits_begin()+ impOfs; it != decStack.TOS_ImpliedLits_end(); it++)
+         {  
+            step = var_InClsStep(!it->polarity());            
+            for(ct = var_InClsStart(it->toVarIdx(),!it->polarity()); *ct != SENTINEL_CL; ct+= step)
+            {
+               bsat = false;
+               for(lt = begin(getClause(*ct));*lt != ClauseEnd(); lt++)
+               	{
+               	  if(isSatisfied(*lt)) { bsat = true; break; }               	  
+               	}
+               
+               if(bsat) continue;
+               for(lt = begin(getClause(*ct));*lt != ClauseEnd(); lt++)
+                if(getVar(*lt).isActive() && !viewedLits[lt->toUInt()])
+                {
+                   nextStep.push_back(*lt);
+                   viewedLits[lt->toUInt()] = true;
+                }
+            }           
+         }
+      }
+      impOfs = decStack.TOS_countImplLits();
+      
+      for(jt = nextStep.begin(); jt != nextStep.end(); jt++)
+       if(getVar(*jt).isActive())
+       {
+         implPairs.push_back(AntAndLit(NOT_A_CLAUSE,jt->oppositeLit()));        
+	 // BEGIN BCPROPAGATIONNI
+	 unsigned int sz = decStack.countAllImplLits();
+	 
+	 // we increase the decLev artificially
+	 // s.t. after the tentative BCP call, we can learn a conflict clause
+	 // relative to the assignment of *jt
+	 decStack.beginTentative();
+	 
+	 bool bSucceeded = BCP(implPairs);	 
+	 
+	 
+	 decStack.shrinkImplLitsTo(sz);
+	 theAnt = NOT_A_CLAUSE;
+	 theLit = implPairs[0].getLit();
+	 	 
+	 if(!bSucceeded && CSolverConf::analyzeConflicts
+	    && !getConflicted().empty())
+	 {
+	    
+	    caGetCauses_lastUIP(getConflicted());    
+	    
+	    createAntClauseFor(theLit.oppositeLit());           
+	    //createLastUIPCCl(); 
+	    
+            theRunAn.addValue(IBCPIMPL,decStack.getDL(),1);
+            theAnt = getVar(theLit).getAntecedent();
+            
+         }
+         decStack.endTentative();
+         
+         for(vector<AntAndLit>::iterator at = implPairs.begin(); at != implPairs.end(); at++)
+            getVar(at->theLit).unsetVal(); 
+         implPairs.clear();
+    
+         if(!bSucceeded)
+         {
+            implPairs.push_back(AntAndLit(theAnt,theLit.oppositeLit()));    	  
+            	    
+            if(!BCP(implPairs))
+            {
+             implPairs.clear();
+             return false;
+            } 
+	  
+            implPairs.clear();          
+         }    
+      // END BCPROPAGATIONNI
+      }      
+      allFound += decStack.TOS_countImplLits() - impOfs;  
+     
+   }while(decStack.TOS_countImplLits() - impOfs > 0);   
+   return true;   
+}
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+// BEGIN module conflictAnalyzer
+///////////////////////////////////////////////////////////////////////////////////////////////
+
+
+void CMainSolver::caIncludeCauses(LiteralIdT theLit, bool viewedVars[])
+{ 
+	vector<LiteralIdT>::const_iterator it; 
+	
+	ClauseIdT implCl;
+
+	if(!getVar(theLit).getAntecedent().isAClause())
+	{
+		LiteralIdT hlit;   
+		hlit = getVar(theLit).getAntecedent().toLit();   
+		caIncorporateLit(hlit,viewedVars); 
+		#ifdef DEBUG
+		assert(hlit != NOT_A_LIT);  
+		#endif
+		return;
+	}
+ 
+	implCl = getVar(theLit).getAntecedent().toCl();
+ 
+	if(implCl == NOT_A_CLAUSE) 
+        // theLit has not been implied, in fact this means that
+        // either theLit is the decided variable, a unit clause or
+        // a variable that has been tentatively assigned by ImplicitBCP
+        // other cases may not occur !
+	{   
+		caAddtoCauses(theLit,viewedVars);        
+		return;
+	}
+ 
+	for(it = begin(getClause(implCl)); *it != ClauseEnd(); it ++)
+	{   
+		caIncorporateLit(*it,viewedVars);
+	}
+}
+///////////////////////////////////////////////////////////////////
+//
+//  BEGIN public
+//
+///////////////////////////////////////////////////////////////////
+
+void CMainSolver::caAddtoCauses(LiteralIdT theLit, bool viewedVars[])
+{   
+	viewedVars[theLit.toVarIdx()] = true; 
+      
+	ca_lastUIPClause.push_back(theLit.oppositeLit());
+   
+	if(getVar(theLit).getDLOD() > imaxDecLev) imaxDecLev = getVar(theLit).getDLOD();
+}
+
+void CMainSolver::caIncorporateLit(const LiteralIdT &Lit, bool viewedVars[])
+{    
+	if(Lit == NOT_A_LIT) return;
+	
+	if(!viewedVars[Lit.toVarIdx()])
+	{       
+		viewedVars[Lit.toVarIdx()] = true;
+		////
+		getVar(Lit).scoreVSIDS[Lit.polarity()]++;
+		getVar(Lit).scoreVSIDS[Lit.oppositeLit().polarity()]++;
+		////
+		if(getVar(Lit).getDLOD() == decStack.getDL())
+		{         
+			theQueue.push_back(Lit.oppositeLit());	 
+		}       
+		else caAddtoCauses(Lit.oppositeLit(),viewedVars);  
+	}
+}
+
+bool CMainSolver::caInit(vector<AntecedentT> & theConflicted, bool viewedVars[])
+{
+	vector<LiteralIdT>::const_iterator it;
+   
+	imaxDecLev = -1;
+     
+	ca_1UIPClause.clear();
+	ca_lastUIPClause.clear();
+   
+	theQueue.clear();	
+	theQueue.reserve(countAllVars()+1);
+   
+	ClauseIdT idConflCl;
+	LiteralIdT idConflLit;
+   
+	if(theConflicted[0].isAClause())
+	{
+		idConflCl = theConflicted[0].toCl();     
+                
+		for(it = begin(getClause(idConflCl)); *it != ClauseEnd(); it ++)
+		{   
+			caIncorporateLit(*it,viewedVars);
+		}
+	}
+	else
+	{
+		if(theConflicted.size() < 2)
+		{
+			toSTDOUT("error in getcauses bincl"<<endl);
+			return false;     
+		}
+     
+		idConflLit = theConflicted[0].toLit();     
+		caIncorporateLit(idConflLit,viewedVars);
+		idConflLit = theConflicted[1].toLit();
+		caIncorporateLit(idConflLit,viewedVars);
+	}
+   
+	return true;
+}
+
+bool CMainSolver::caGetCauses_lastUIP(vector<AntecedentT> & theConflicted)
+{
+	vector<LiteralIdT>::const_iterator it;
+	bool viewedVars[countAllVars()+1]; 
+    
+	memset(viewedVars,false,sizeof(bool)*(countAllVars()+1));     
+   
+	if(!caInit(theConflicted,viewedVars)) return false;
+   
+	for(unsigned int i = 0; i < theQueue.size();i++)
+	{
+		viewedVars[theQueue[i].toVarIdx()] = true;
+		caIncludeCauses(theQueue[i], viewedVars);
+	}
+   
+        // analyzer data
+	theRunAn.addValue(CCL_lastUIP, decStack.getDL(),ca_lastUIPClause.size());
+	return true;
+}
+
+
+bool CMainSolver::caGetCauses_firstUIP(vector<AntecedentT> & theConflicted)
+{
+	vector<LiteralIdT>::const_iterator it;
+	bool viewedVars[countAllVars()+1];
+   
+	memset(viewedVars,false,sizeof(bool)*(countAllVars()+1));  
+   
+	if(!caInit(theConflicted,viewedVars)) return false;
+   
+	bool pastfirstUIP = false;
+   
+	for(unsigned int i = 0; i < theQueue.size();i++)	
+	{ 
+		
+		if(i == theQueue.size()-1 && pastfirstUIP == false)
+		{
+			pastfirstUIP = true;
+       
+			ca_1UIPClause = ca_lastUIPClause;
+       
+			ca_1UIPClause.push_back(theQueue.back().oppositeLit());              
+		} 
+		viewedVars[theQueue[i].toVarIdx()] = true;
+		caIncludeCauses(theQueue[i], viewedVars);
+	}   
+        // analyzer data
+	theRunAn.addValue(CCL_1stUIP, decStack.getDL(), ca_1UIPClause.size());       
+	theRunAn.addValue(CCL_lastUIP, decStack.getDL(),ca_lastUIPClause.size());
+   
+	return true;
+}
+
+///////////////////////////////////////////////////////////////////////////////////////////////
+// END module conflictAnalyzer
+///////////////////////////////////////////////////////////////////////////////////////////////
+
+
+
+////////////////////////////////////////////////////////////////////////
+//
+//  BEGIN Methods for Preprocessing
+//
+///////////////////////////////////////////////////////////////////////
+
+bool CMainSolver::prep_IBCP(vector<AntAndLit> &impls)
+{   
+	bool bSucceeded = false;   
+    
+	getConflicted().clear();
+    
+	unsigned int sz = decStack.countAllImplLits();
+    
+	bSucceeded = BCP(impls);
+	decStack.shrinkImplLitsTo(sz);    
+    
+	vector<AntAndLit>::iterator it;
+ 
+	for(it = impls.begin(); it != impls.end(); it++)
+	{
+		getVar(it->theLit).unsetVal();
+	}
+    
+	impls.clear();    
+	return bSucceeded;
+}
+
+bool CMainSolver::prepFindHiddenBackBoneLits()
+{
+   DepositOfVars::iterator jt;                            
+   vector<AntAndLit> implPairs;
+   implPairs.reserve(countAllVars());    
+   
+   int foundInLoop = 0;
+   int allFound = 0;
+   
+   do{
+      foundInLoop = 0;
+      
+      for(jt = beginOfVars(); jt != endOfVars(); jt++)
+       if(jt->isActive() && jt->countBinLinks() > 0)
+       {
+          if(jt->countBinLinks(false)>0) implPairs.push_back(AntAndLit(NOT_A_CLAUSE,jt->getLitIdT(true)));
+          if((jt->countBinLinks(false)>0) && !prep_IBCP(implPairs))
+          {
+             foundInLoop++;
+             if(!prepBCP(jt->getLitIdT(false))) return false;
+          }
+          else if(jt->countBinLinks(true)>0)
+          {
+             implPairs.push_back(AntAndLit(NOT_A_CLAUSE,jt->getLitIdT(false)));
+             if(!prep_IBCP(implPairs))
+	     {
+	        foundInLoop++;
+	        if(!prepBCP(jt->getLitIdT(true))) return false;
+	     }
+          }
+       }              
+       allFound += foundInLoop;       
+       
+   }while(foundInLoop != 0);    
+   if(allFound != 0) toSTDOUT("found UCCL"<<allFound << endl);
+   return true;   
+}
+
+bool CMainSolver::prepBCP(LiteralIdT firstLit)
+{
+   vector<LiteralIdT> impls;   
+   int step = 0;
+   LiteralIdT unLit, satLit;
+    
+   impls.reserve(countAllVars());
+    
+   if(firstLit != NOT_A_LIT) impls.push_back(firstLit);    
+   
+   // prepare UnitClauses for BCP
+   if(!theUnitClauses.empty())
+   {
+      impls.insert(impls.end(),theUnitClauses.begin(),theUnitClauses.end());    
+      theUnitClauses.clear();  
+      theUClLookUp.clear();
+   }
+    
+   vector<ClauseIdT>::iterator it;
+   vector<ClauseIdT>::iterator itBegin;
+   vector<LiteralIdT>::iterator lt;
+   CVariableVertex *pV;    
+    
+   for(unsigned int i = 0; i < impls.size();i++)
+    if(getVar(impls[i]).setVal(impls[i].polarity(), 0))
+    {   
+      unLit = impls[i].oppositeLit();
+      satLit = impls[i];
+      pV = &getVar(satLit);      
+		
+      // BEGIN propagation	        
+      for(lt = pV->getBinLinks(unLit.polarity()).begin(); *lt != SENTINEL_LIT;lt++)		
+      {
+         if(getVar(*lt).isActive()) impls.push_back(*lt);       
+	   else
+	    if(getVar(*lt).getboolVal() != lt->polarity()) return false;     
+      }
+      CClauseVertex *pCl;
+      
+      itBegin = var_InClsStart(unLit.toVarIdx(),unLit.polarity());
+      step = var_InClsStep(unLit.polarity());
+      
+      for(it = itBegin; *it != SENTINEL_CL; it+= step)
+       if(!getClause(*it).isDeleted()) 
+       {
+          pCl = &getClause(*it); 
+          eraseLiteralFromCl(*it,unLit);       
+	  switch(getClause(*it).length())
+	  {
+             case 0: return false;
+             case 1: impls.push_back(*begin(*pCl));
+                     break;
+             case 2:
+                     createBinCl((*begin(*pCl)),*(begin(*pCl)+1));                     
+                     /// mark clause *it as deleted                     
+                     
+                     getVar(pCl->idLitB()).eraseWatchClause(*it, pCl->idLitB().polarity());
+                     getVar(pCl->idLitA()).eraseWatchClause(*it, pCl->idLitA().polarity());  
+                     
+                     for(vector<LiteralIdT>::iterator litt = begin(*pCl); *litt != ClauseEnd();litt++)
+                     {  
+                       if(*litt != unLit)                        
+                       var_EraseClsLink(litt->toVarIdx(), litt->polarity(),*it); 
+                       *litt = NOT_A_LIT;
+                     }  
+  
+                     pCl->setDeleted();
+                     
+                     ///
+                     break;
+             default: break;
+          };
+       }
+       //END propagation
+       
+       //BEGIN subsumption 
+       for(lt = pV->getBinLinks(satLit.polarity()).begin(); *lt != SENTINEL_LIT;lt++)
+	   getVar(*lt).eraseBinLinkTo(satLit,lt->polarity());       
+        
+      itBegin = var_InClsStart(satLit.toVarIdx(),satLit.polarity());
+      step = var_InClsStep(satLit.polarity());
+      
+       for(it = itBegin; *it != SENTINEL_CL;it+= step)
+       
+	 if(!getClause(*it).isDeleted())
+	 {
+	  pCl = &getClause(*it); 
+	  /// mark clause *it as deleted
+                    
+          getVar(pCl->idLitB()).eraseWatchClause(*it, pCl->idLitB().polarity());
+          getVar(pCl->idLitA()).eraseWatchClause(*it, pCl->idLitA().polarity());  
+                  
+          vector<LiteralIdT>::iterator litt;  
+          for(litt = begin(*pCl); *litt != ClauseEnd();litt++)
+          {  
+             if(*litt != satLit) 
+             // deleting ClauseEdges from satLit would be erroneous as it affects satPCl
+                var_EraseClsLink(litt->toVarIdx(), litt->polarity(),*it); 
+             *litt = NOT_A_LIT;
+          }  
+  
+          pCl->setDeleted();                     
+          ///
+	 } 
+       // END subsumption
+       
+       for(it = var_InClsBegin(unLit.toVarIdx(),false);*it != SENTINEL_CL;it++)
+       {
+         *it = SENTINEL_CL;
+       }
+       
+       pV->eraseAllEdges();            
+   }      
+   return true;  
+}
+
+
+////////////////////////////////////////////////////////////////////////
+//
+//  END Methods for Preprocessing
+//
+///////////////////////////////////////////////////////////////////////
+
+
+bool CMainSolver::printUnitClauses()
+{   
+	vector<LiteralIdT>::iterator it,jt;     
+    
+	toSTDOUT("UCCL:\n");
+	for(it = theUnitClauses.begin(); it != theUnitClauses.end(); it++)
+	{     
+		toSTDOUT((it->polarity()?" ":"-")<<getVar(*it).getVarNum()<< " 0\n");     
+	}
+	toSTDOUT(endl);   
+             
+	return true;
+}
Index: /vis_dev/sharpSAT/src/src_sharpSAT/MainSolver/MainSolver.h
===================================================================
--- /vis_dev/sharpSAT/src/src_sharpSAT/MainSolver/MainSolver.h	(revision 9)
+++ /vis_dev/sharpSAT/src/src_sharpSAT/MainSolver/MainSolver.h	(revision 9)
@@ -0,0 +1,241 @@
+#ifndef MAINSOLVER_H
+#define MAINSOLVER_H
+
+//shared files
+#include <Interface/AnalyzerData.h>
+
+#include "../Basics.h"
+#include "InstanceGraph/InstanceGraph.h"
+
+#include "FormulaCache.h"
+
+
+/** \addtogroup Interna Solver Interna 
+ * Dies sind alle Klassen, die ausschlieï¿œich vom Solver selbst verwendet werden
+ * sollten.
+ */
+ 
+ 
+/*@{*/
+
+typedef unsigned char viewStateT;
+#define   NIL  0
+#define   IN_SUP_COMP  1
+#define   SEEN 2
+#define   IN_OTHER_COMP  3
+
+enum retStateT{
+
+	EXIT,
+	RESOLVED,
+	PROCESS_COMPONENT
+}; 
+
+enum retIBCPT
+{
+	NOTHING_FOUND,
+	FOUND,
+	CONTRADICTION,
+}; 
+
+
+class CMainSolver : public CInstanceGraph
+{  
+   CDecisionStack decStack; // decision stack	            
+   CStopWatch   stopWatch;  
+   
+   CFormulaCache xFormulaCache;  
+   vector<AntAndLit> bcpImplQueue;               
+   
+   int lastTimeCClDeleted;
+   int lastCClCleanUp;
+   
+   unsigned int remPoll;
+   
+   retStateT backTrack();   
+   
+   // removes all cachePollutions that might be present in decedants of comnponents from the 
+   // present decision level   
+   void removeAllCachePollutions();
+   
+    
+   bool findVSADSDecVar(LiteralIdT &theLit, const CComponentId & superComp);
+
+   
+   bool decide();
+   
+   bool bcp();    
+ 
+   void handleSolution()
+   {   
+      int actCompVars = 0;
+      static CRealNum rnCodedSols;
+
+      // in fact the active component should only contain active vars   
+      if(decStack.TOS_countRemComps() != 0)
+        actCompVars = decStack.TOS_NextComp().countVars();
+     
+      pow2(rnCodedSols, actCompVars);   
+      decStack.top().includeSol(rnCodedSols);         
+      theRunAn.addValue(SOLUTION, decStack.getDL());                    
+
+   }
+   
+   retStateT resolveConflict();    
+   
+   SOLVER_StateT countSAT();   
+    
+   bool performPreProcessing(); 
+  
+   
+   /**
+     *  passes a componentId to rComp that is made of all
+     *  active variables and clauses
+     *  !! used to initialize decStack at DL zero
+    **/ 
+   void makeCompIdFromActGraph(CComponentId& rComp);
+   
+   // BEGIN component analysis   
+   vector<VarIdT> componentSearchStack;     
+   bool recordRemainingComps();    
+   bool getComp(const VarIdT &theVar, 
+	                    const CComponentId &superComp, 
+			    viewStateT lookUpCls[],
+			    viewStateT lookUpVars[]);
+   // END component analysis
+   
+   void printComponent(const CComponentId& rComp);
+    
+      
+   inline bool assignVal(const LiteralIdT &rLitId, AntecedentT ant = AntecedentT(NOT_A_CLAUSE))
+   {
+      return getVar(rLitId).setVal(rLitId.polarity(), decStack.getDL(), ant);
+   }
+   
+   bool BCP(vector<AntAndLit> &thePairsOfImpl);
+   
+   /////////////////////////////////////////////
+   //  BEGIN conflict analysis
+   /////////////////////////////////////////////
+   
+  private:
+    
+   vector<LiteralIdT> theQueue;       
+   vector<LiteralIdT> ca_1UIPClause;    
+   vector<LiteralIdT> ca_lastUIPClause;    
+        
+   int imaxDecLev;        
+    
+   // includes the causes of a variable assignment via 
+   // breadth first search
+   void caIncludeCauses(LiteralIdT theLit, bool viewedVars[]);       
+   void caIncorporateLit(const LiteralIdT &Lit, bool viewedVars[]); 
+  
+   void caAddtoCauses(LiteralIdT theLit, bool viewedVars[]);
+   // initializes all data structures for the analysis
+   // especially the startin point of the analysis i plugged into the queue
+   bool caInit(vector<AntecedentT> & theConflicted, bool viewedVars[]); 
+
+ 
+   bool caGetCauses_lastUIP(vector<AntecedentT> & theConflicted);
+   bool caGetCauses_firstUIP(vector<AntecedentT> & theConflicted);
+   
+   // whenever a variable that is not implied causes a conflict
+   // the conflict clause generated from this conflict implies a flip
+   // of that variable:
+   // creation of that clause and recording the implication is done by:
+   
+   const vector<LiteralIdT> &caGetPrev1UIPCCl()
+   {
+      return ca_1UIPClause;
+   }
+   const vector<LiteralIdT> &caGetPrevLastUIPCCl()
+   {
+      return ca_lastUIPClause;
+   }
+
+   /// ermittelt den maximalen Entscheidungslevel von
+   /// Variablen die zu den Konfliktursachen gehï¿œen.
+   /// Ein Aufruf ist erst nach dem Auftruf von getCausesOf sinnvoll
+   int getMaxDecLevFromAnalysis() const {return imaxDecLev;}
+   
+   /// gibt KonfliktKlausel zurck die durch die
+   /// vorhergehende Analyse gewonnen wurde
+   bool create1UIPCCl()
+   {
+      return createConflictClause(ca_1UIPClause);
+   }
+   
+   bool createLastUIPCCl()
+   {
+      return createConflictClause(ca_lastUIPClause);
+   }
+   
+   /////////////////////////////////////////////
+   //  END conflict analysis
+   /////////////////////////////////////////////
+     
+   /////////////////////////////////////////////
+   //  BEGIN implicitBCP
+   /////////////////////////////////////////////
+   
+   ///  this method is used for heuristically testing variable assignments
+   ///  whether they incur a conflict. If so we can infer the opposite assignment of
+   ///  the variable in question
+   ///  Thus the method will then perform the assignment
+   ///  Furthermore it manages the necessary entries to the decision stack itself
+   ///  returned value: analogously to the bcp procedure: false iff a conflict is found
+   bool implicitBCP();   
+   
+   bool createAntClauseFor(const LiteralIdT &Lit);   
+   
+   /////////////////////////////////////////////
+   //  END implicitBCP
+   /////////////////////////////////////////////
+   
+   /////////////////////////////////////////////
+   // BEGIN PreProcessing methods
+   ////////////////////////////////////////////
+   
+   ///NOTE: Preprocessing methods assume that no conflict clauses are present !
+   
+   bool prep_IBCP(vector<AntAndLit> &impls);
+   /// Preprocessing
+   /// i.e. the "hard" version of ImplicitBCP
+   /// used for preprosessing ONLY
+   bool prepFindHiddenBackBoneLits();
+   
+   /// Apply the BCP rule in a Preprocessing step:
+   /// That is: if firstLit is a valid literal, propagation is started there
+   /// firstLit should not be assigned already!
+   /// furthermore ALL unit clauses are processed
+   bool prepBCP(LiteralIdT firstLit = NOT_A_LIT);
+
+   /////////////////////////////////////////////
+   // END PreProcessing methods
+   /////////////////////////////////////////////
+   
+   bool printUnitClauses();   
+ 
+ public:
+   
+   // class constructor
+   CMainSolver();   
+   
+   // class destructor
+   ~CMainSolver();	
+   
+   void solve(const char *lpstrFileName); 
+   
+   void setTimeBound(long int i)
+   {
+      stopWatch.setTimeBound(i);
+   }
+
+};
+
+
+/*@}*/
+#endif // SOLVER_H
+
+
Index: /vis_dev/sharpSAT/src/src_sharpSAT/MainSolver/semantic.cache
===================================================================
--- /vis_dev/sharpSAT/src/src_sharpSAT/MainSolver/semantic.cache	(revision 9)
+++ /vis_dev/sharpSAT/src/src_sharpSAT/MainSolver/semantic.cache	(revision 9)
@@ -0,0 +1,27 @@
+;; Object MainSolver/
+;; SEMANTICDB Tags save file
+(semanticdb-project-database-file "MainSolver/"
+  :tables (list 
+   (semanticdb-table "MainSolver.h"
+    :major-mode 'c-mode
+    :tags '(("MAINSOLVER_H" variable (:constant-flag t) nil [22 60]) ("Interface/AnalyzerData.h" include (:system-flag t) nil [59 94]) ("../Basics.h" include nil nil [96 118]) ("InstanceGraph/InstanceGraph.h" include nil nil [119 159]) ("FormulaCache.h" include nil nil [161 186]) ("viewStateT" type (:typedef ("unsigned char") :superclasses "unsigned char" :type "typedef") nil [339 372]) ("NIL" variable (:constant-flag t :default-value (nil)) nil [373 389]) ("IN_SUP_COMP" variable (:constant-flag t :default-value (nil)) nil [390 414]) ("SEEN" variable (:constant-flag t :default-value (nil)) nil [415 431]) ("IN_OTHER_COMP" variable (:constant-flag t :default-value (nil)) nil [432 458]) ("retStateT" type (:members (("EXIT" variable (:constant-flag t :type "int") (reparse-symbol enumsubparts) [478 483]) ("RESOLVED" variable (:constant-flag t :type "int") (reparse-symbol enumsubparts) [485 494]) ("PROCESS_COMPONENT" variable (:constant-flag t :type "int") (reparse-symbol enumsubparts) [496 515])) :type "enum") nil [460 516]) ("retIBCPT" type (:members (("NOTHING_FOUND" variable (:constant-flag t :type "int") (reparse-symbol enumsubparts) [536 550]) ("FOUND" variable (:constant-flag t :type "int") (reparse-symbol enumsubparts) [552 558]) ("CONTRADICTION" variable (:constant-flag t :type "int") (reparse-symbol enumsubparts) [560 574])) :type "enum") nil [519 577]) ("CMainSolver" type (:superclasses ("CInstanceGraph") :members (("decStack" variable (:type ("CDecisionStack" type (:type "class") nil nil)) (reparse-symbol classsubparts) [630 654]) ("stopWatch" variable (:type ("CStopWatch" type (:type "class") nil nil)) (reparse-symbol classsubparts) [689 712]) ("xFormulaCache" variable (:type ("CFormulaCache" type (:type "class") nil nil)) (reparse-symbol classsubparts) [722 750]) ("bcpImplQueue" variable (:type ("vector" type (:type "class") nil nil)) (reparse-symbol classsubparts) [756 787]) ("lastTimeCClDeleted" variable (:type "int") (reparse-symbol classsubparts) [810 833]) ("lastCClCleanUp" variable (:type "int") (reparse-symbol classsubparts) [837 856]) ("remPoll" variable (:type "unsigned int") (reparse-symbol classsubparts) [864 885]) ("backTrack" function (:prototype-flag t :type ("retStateT" type (:type "class") nil nil)) (reparse-symbol classsubparts) [893 915]) ("removeAllCachePollutions" function (:prototype-flag t :type "void") (reparse-symbol classsubparts) [1052 1084]) ("findVSADSDecVar" function (:prototype-flag t :arguments (("theLit" variable (:type ("LiteralIdT" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [1118 1137]) ("superComp" variable (:constant-flag t :type ("CComponentId" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [1138 1169])) :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [1097 1170]) ("decide" function (:prototype-flag t :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [1179 1193]) ("bcp" function (:prototype-flag t :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [1201 1212]) ("handleSolution" function (:type "void") (reparse-symbol classsubparts) [1222 1671]) ("resolveConflict" function (:prototype-flag t :type ("retStateT" type (:type "class") nil nil)) (reparse-symbol classsubparts) [1679 1707]) ("countSAT" function (:prototype-flag t :type ("SOLVER_StateT" type (:type "class") nil nil)) (reparse-symbol classsubparts) [1719 1744]) ("performPreProcessing" function (:prototype-flag t :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [1756 1784]) ("makeCompIdFromActGraph" function (:prototype-flag t :arguments (("rComp" variable (:type ("CComponentId" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [1985 2005])) :type "void") (reparse-symbol classsubparts) [1957 2006]) ("componentSearchStack" variable (:type ("vector" type (:type "class") nil nil)) (reparse-symbol classsubparts) [2048 2084]) ("recordRemainingComps" function (:prototype-flag t :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [2093 2121]) ("getComp" function (:prototype-flag t :arguments (("theVar" variable (:constant-flag t :type ("VarIdT" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [2142 2163]) ("superComp" variable (:constant-flag t :type ("CComponentId" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [2186 2216]) ("lookUpCls" variable (:dereference 1 :type ("viewStateT" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [2225 2248]) ("lookUpVars" variable (:dereference 1 :type ("viewStateT" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [2256 2280])) :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [2129 2281]) ("printComponent" function (:prototype-flag t :arguments (("rComp" variable (:constant-flag t :type ("CComponentId" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [2338 2364])) :type "void") (reparse-symbol classsubparts) [2318 2365]) ("assignVal" function (:typemodifiers ("inline") :arguments (("rLitId" variable (:constant-flag t :type ("LiteralIdT" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [2403 2428]) ("ant" variable (:default-value "AntecedentT(NOT_A_CLAUSE)" :type ("AntecedentT" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [2429 2472])) :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [2381 2561]) ("BCP" function (:prototype-flag t :arguments (("thePairsOfImpl" variable (:type ("vector" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [2578 2612])) :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [2569 2613]) ("private" label nil (reparse-symbol classsubparts) [2753 2761]) ("theQueue" variable (:type ("vector" type (:type "class") nil nil)) (reparse-symbol classsubparts) [2770 2798]) ("ca_1UIPClause" variable (:type ("vector" type (:type "class") nil nil)) (reparse-symbol classsubparts) [2809 2842]) ("ca_lastUIPClause" variable (:type ("vector" type (:type "class") nil nil)) (reparse-symbol classsubparts) [2850 2886]) ("imaxDecLev" variable (:type "int") (reparse-symbol classsubparts) [2903 2918]) ("caIncludeCauses" function (:prototype-flag t :arguments (("theLit" variable (:type ("LiteralIdT" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [3039 3057]) ("viewedVars" variable (:dereference 1 :type ("bool" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [3058 3076])) :type "void") (reparse-symbol classsubparts) [3018 3077]) ("caIncorporateLit" function (:prototype-flag t :arguments (("Lit" variable (:constant-flag t :type ("LiteralIdT" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [3110 3132]) ("viewedVars" variable (:dereference 1 :type ("bool" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [3133 3151])) :type "void") (reparse-symbol classsubparts) [3088 3152]) ("caAddtoCauses" function (:prototype-flag t :arguments (("theLit" variable (:type ("LiteralIdT" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [3179 3197]) ("viewedVars" variable (:dereference 1 :type ("bool" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [3198 3216])) :type "void") (reparse-symbol classsubparts) [3160 3217]) ("caInit" function (:prototype-flag t :arguments (("theConflicted" variable (:type ("vector" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [3364 3400]) ("viewedVars" variable (:dereference 1 :type ("bool" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [3401 3419])) :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [3352 3420]) ("caGetCauses_lastUIP" function (:prototype-flag t :arguments (("theConflicted" variable (:type ("vector" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [3453 3489])) :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [3428 3490]) ("caGetCauses_firstUIP" function (:prototype-flag t :arguments (("theConflicted" variable (:type ("vector" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [3520 3556])) :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [3494 3557]) ("caGetPrev1UIPCCl" function (:constant-flag t :type ("vector" type (:type "class") nil nil)) (reparse-symbol classsubparts) [3799 3881]) ("caGetPrevLastUIPCCl" function (:constant-flag t :type ("vector" type (:type "class") nil nil)) (reparse-symbol classsubparts) [3885 3973]) ("getMaxDecLevFromAnalysis" function (:type "int") (reparse-symbol classsubparts) [4156 4213]) ("create1UIPCCl" function (:type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [4313 4393]) ("createLastUIPCCl" function (:type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [4401 4487]) ("implicitBCP" function (:prototype-flag t :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [5175 5194]) ("createAntClauseFor" function (:prototype-flag t :arguments (("Lit" variable (:constant-flag t :type ("LiteralIdT" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [5229 5251])) :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [5205 5252]) ("prep_IBCP" function (:prototype-flag t :arguments (("impls" variable (:type ("vector" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [5622 5647])) :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [5607 5648]) ("prepFindHiddenBackBoneLits" function (:prototype-flag t :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [5754 5788]) ("prepBCP" function (:prototype-flag t :arguments (("firstLit" variable (:default-value "NOT_A_LIT)" :type ("LiteralIdT" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [6035 6067])) :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [6022 6068]) ("printUnitClauses" function (:prototype-flag t :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [6207 6231]) ("public" label nil (reparse-symbol classsubparts) [6238 6245]) ("CMainSolver" function (:prototype-flag t :constructor-flag t :type ("CMainSolver" type "class")) (reparse-symbol classsubparts) [6277 6291]) ("CMainSolver" function (:prototype-flag t :destructor-flag t :type "void") (reparse-symbol classsubparts) [6325 6340]) ("solve" function (:prototype-flag t :arguments (("lpstrFileName" variable (:pointer 1 :constant-flag t :type "char") (reparse-symbol arg-sub-list) [6360 6386])) :type "void") (reparse-symbol classsubparts) [6349 6387]) ("setTimeBound" function (:arguments (("i" variable (:type "long int") (reparse-symbol arg-sub-list) [6414 6425])) :type "void") (reparse-symbol classsubparts) [6396 6468])) :type "class") nil [581 6472]))
+    :file "MainSolver.h"
+    :pointmax 6503
+    :unmatched-syntax 'nil
+    )
+   (semanticdb-table "MainSolver.cpp"
+    :major-mode 'c++-mode
+    :tags '(("MainSolver.h" include nil nil [1 24]) ("CMainSolver" function (:constructor-flag t :parent "CMainSolver" :type ("CMainSolver" type "class")) nil [70 189]) ("CMainSolver" function (:destructor-flag t :parent "CMainSolver" :type "void") nil [211 292]) ("performPreProcessing" function (:parent "CMainSolver" :type ("bool" type (:type "class") nil nil)) nil [296 1080]) ("solve" function (:parent "CMainSolver" :arguments (("lpstrFileName" variable (:pointer 1 :constant-flag t :type "char") (reparse-symbol arg-sub-list) [1106 1132])) :type "void") nil [1082 2618]) ("countSAT" function (:parent "CMainSolver" :type ("SOLVER_StateT" type (:type "class") nil nil)) nil [2621 3225]) ("findVSADSDecVar" function (:parent "CMainSolver" :arguments (("theLit" variable (:type ("LiteralIdT" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [3263 3282]) ("superComp" variable (:constant-flag t :type ("CComponentId" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [3283 3314])) :type ("bool" type (:type "class") nil nil)) nil [3229 3927]) ("decide" function (:parent "CMainSolver" :type ("bool" type (:type "class") nil nil)) nil [3930 5504]) ("removeAllCachePollutions" function (:parent "CMainSolver" :type "void") nil [5506 6634]) ("backTrack" function (:parent "CMainSolver" :type ("retStateT" type (:type "class") nil nil)) nil [6636 7973]) ("bcp" function (:parent "CMainSolver" :type ("bool" type (:type "class") nil nil)) nil [7977 8899]) ("resolveConflict" function (:parent "CMainSolver" :type ("retStateT" type (:type "class") nil nil)) nil [8902 10619]) ("recordRemainingComps" function (:parent "CMainSolver" :type ("bool" type (:type "class") nil nil)) nil [10762 12132]) ("getComp" function (:parent "CMainSolver" :arguments (("theVar" variable (:constant-flag t :type ("VarIdT" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [12163 12184]) ("superComp" variable (:constant-flag t :type ("CComponentId" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [12207 12237]) ("lookUpCls" variable (:dereference 1 :type ("viewStateT" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [12245 12268]) ("lookUpVars" variable (:dereference 1 :type ("viewStateT" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [12277 12301])) :type ("bool" type (:type "class") nil nil)) nil [12137 16045]) ("makeCompIdFromActGraph" function (:parent "CMainSolver" :arguments (("rComp" variable (:type ("CComponentId" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [16226 16246])) :type "void") nil [16185 17052]) ("printComponent" function (:parent "CMainSolver" :arguments (("rComp" variable (:constant-flag t :type ("CComponentId" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [17088 17114])) :type "void") nil [17055 17250]) ("BCP" function (:parent "CMainSolver" :arguments (("thePairsOfImpl" variable (:type ("vector" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [17326 17360])) :type ("bool" type (:type "class") nil nil)) nil [17304 20632]) ("createAntClauseFor" function (:parent "CMainSolver" :arguments (("Lit" variable (:constant-flag t :type ("LiteralIdT" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [20672 20694])) :type ("bool" type (:type "class") nil nil)) nil [20635 21562]) ("implicitBCP" function (:parent "CMainSolver" :type ("bool" type (:type "class") nil nil)) nil [21564 24929]) ("caIncludeCauses" function (:parent "CMainSolver" :arguments (("theLit" variable (:type ("LiteralIdT" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [25192 25210]) ("viewedVars" variable (:dereference 1 :type ("bool" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [25211 25229])) :type "void") nil [25158 26026]) ("caAddtoCauses" function (:parent "CMainSolver" :arguments (("theLit" variable (:type ("LiteralIdT" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [26219 26237]) ("viewedVars" variable (:dereference 1 :type ("bool" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [26238 26256])) :type "void") nil [26187 26447]) ("caIncorporateLit" function (:parent "CMainSolver" :arguments (("Lit" variable (:constant-flag t :type ("LiteralIdT" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [26484 26506]) ("viewedVars" variable (:dereference 1 :type ("bool" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [26507 26525])) :type "void") nil [26449 26934]) ("caInit" function (:parent "CMainSolver" :arguments (("theConflicted" variable (:type ("vector" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [26961 26997]) ("viewedVars" variable (:dereference 1 :type ("bool" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [26998 27016])) :type ("bool" type (:type "class") nil nil)) nil [26936 27787]) ("caGetCauses_lastUIP" function (:parent "CMainSolver" :arguments (("theConflicted" variable (:type ("vector" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [27827 27863])) :type ("bool" type (:type "class") nil nil)) nil [27789 28337]) ("caGetCauses_firstUIP" function (:parent "CMainSolver" :arguments (("theConflicted" variable (:type ("vector" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [28379 28415])) :type ("bool" type (:type "class") nil nil)) nil [28340 29216]) ("prep_IBCP" function (:parent "CMainSolver" :arguments (("impls" variable (:type ("vector" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [29660 29685])) :type ("bool" type (:type "class") nil nil)) nil [29632 30046]) ("prepFindHiddenBackBoneLits" function (:parent "CMainSolver" :type ("bool" type (:type "class") nil nil)) nil [30048 31197]) ("prepBCP" function (:parent "CMainSolver" :arguments (("firstLit" variable (:type ("LiteralIdT" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [31225 31245])) :type ("bool" type (:type "class") nil nil)) nil [31199 35099]) ("printUnitClauses" function (:parent "CMainSolver" :type ("bool" type (:type "class") nil nil)) nil [35289 35605]))
+    :file "MainSolver.cpp"
+    :pointmax 35606
+    )
+   (semanticdb-table "FormulaCache.h"
+    :major-mode 'c-mode
+    :tags 'nil
+    :file "FormulaCache.h"
+    )
+   )
+  :file "semantic.cache"
+  :semantic-tag-version "2.0beta3"
+  :semanticdb-version "2.0beta3"
+  )
Index: /vis_dev/sharpSAT/src/src_sharpSAT/main.cpp
===================================================================
--- /vis_dev/sharpSAT/src/src_sharpSAT/main.cpp	(revision 9)
+++ /vis_dev/sharpSAT/src/src_sharpSAT/main.cpp	(revision 9)
@@ -0,0 +1,173 @@
+#include <iostream>
+
+#include <ctime> // To seed random generator
+#include <sys/time.h> // To seed random generator
+
+//include shared files
+#include <SomeTime.h>
+#include <Interface/AnalyzerData.h>
+
+#include "MainSolver/MainSolver.h"
+#include "Basics.h"
+
+
+using namespace std;
+
+
+CMainSolver theSolver;
+
+// No description
+void finalcSATEvaluation()
+{
+   const AnalyzerData &rAda = theRunAn.getData();  
+	
+   if(rAda.theExitState == TIMEOUT)
+   {
+     toSTDOUT(endl << " TIMEOUT !"<<endl);
+     return;
+   } 
+        
+   toSTDOUT(endl<<endl);
+   toSTDOUT("#Variables:\t\t"<< rAda.nVars<<endl);
+   
+   if(rAda.nVars != rAda.nUsedVars)
+      toSTDOUT("#used Variables:\t"<< rAda.nUsedVars<<endl);
+   toSTDOUT("#Clauses:\t\t"<< rAda.nOriginalClauses<<endl);
+   toSTDOUT("#Clauses removed:\t"<< rAda.nRemovedClauses<<endl);
+   toSTDOUT("\n#added Clauses: \t"<< rAda.nAddedClauses<<endl);
+   
+   toSTDOUT("\n# of all assignments:\t" << rAda.getAllAssignments() 
+       << " = 2^(" << rAda.nVars<<")" <<endl);   
+
+   toSTDOUT("Pr[satisfaction]:\t" << rAda.rnProbOfSat <<endl);   
+
+   toSTDOUT("# of solutions:\t\t" << rAda.getNumSatAssignments() <<endl);
+   toSTDOUT("#SAT (full):   \t\t"); 
+    if(!CSolverConf::quietMode) rAda.printNumSatAss_whole();
+    toSTDOUT(endl);
+   	
+    toDEBUGOUT(".. found in:\t\t" << rAda.nReceivedSatAssignments << " units"<<endl);
+   
+    toSTDOUT(endl);
+    
+    toSTDOUT("Num. conflicts:\t\t" << rAda.nConflicts<<endl);
+    toSTDOUT("Num. implications:\t" << rAda.nImplications<<endl);
+    toSTDOUT("Num. decisions:\t\t" << rAda.nDecisions<<endl);    
+    toSTDOUT("max decision level:\t" << rAda.maxDecLevel<<"\t\t");
+    toSTDOUT("avg decision level:\t"<< rAda.get(AVG_DEC_LEV)<<endl); 
+    toSTDOUT("avg conflict level:\t"<< rAda.get(AVG_CONFLICT_LEV)<<endl);
+    toSTDOUT("avg solution level:\t"<< rAda.get(AVG_SOLUTION_LEV)<<endl);
+    
+    toSTDOUT("CCLLen 1stUIP - max:\t"<< rAda.get(LONGEST_CCL_1stUIP));
+    toSTDOUT("\t avg:\t"<< rAda.get(AVG_CCL_1stUIP)<<endl);
+    toSTDOUT("CCLLen lastUIP - max:\t"<< rAda.get(LONGEST_CCL_lastUIP));
+    toSTDOUT("\t avg:\t"<< rAda.get(AVG_CCL_lastUIP)<<endl);
+    
+    
+    toSTDOUT(endl);
+    toSTDOUT("FormulaCache stats:"<<endl);
+    toSTDOUT("memUse:\t\t\t"<<rAda.get(FCACHE_MEMUSE) <<endl);    
+    toSTDOUT("cached:\t\t\t"<<rAda.get(FCACHE_CACHEDCOMPS)<<endl);
+    toSTDOUT("used Buckets:\t\t"<<rAda.get(FCACHE_USEDBUCKETS)<<endl);
+    toSTDOUT("cache retrievals:\t"<<rAda.get(FCACHE_RETRIEVALS)<<endl);
+    toSTDOUT("cache tries:\t\t"<<rAda.get(FCACHE_INCLUDETRIES)<<endl);
+    
+    toSTDOUT("\n\nZeit: "<<rAda.elapsedTime<<"s\n\n");  
+   
+}
+
+void finalcSATEvaluationfor_vis()
+{
+  const AnalyzerData &rAda = theRunAn.getData();  
+  char* buf=rAda.printNumSatAss_vis();
+  char time[50];
+  sprintf(time,"%f",rAda.elapsedTime);
+  strcat(buf," [Time=");strcat(buf,time);
+  strcat(buf,"s]");
+  fprintf(stdout,"%s",buf);
+  free(buf); 
+  
+}
+int main(int argc, char *argv[])
+{ 
+ char *s;
+ char dataFile[1024];
+ memset(dataFile,0,1024);
+ strcpy(dataFile,"data.txt"); 
+ bool fileout = false;
+ 
+ CSolverConf::analyzeConflicts = true;
+ CSolverConf::doNonChronBackTracking = true;
+ 
+ CSolverConf::count = true;
+  
+ //toSTDOUT ("sharpSAT v1.1, July 1st, 2006"<<endl);
+ //toSTDOUT ("copyright 2006, Humboldt UniversitÃ€t zu Berlin"<<endl);
+  
+ if (argc <= 1){
+    
+  cout << "Usage: sharpSAT [options] [CNF_File]"<<endl;
+  cout << "Options: "<<endl;
+  cout << "\t -noPP  \t turn off preprocessing"<<endl;
+  cout << "\t -noCA  \t no conflict analysis nor -clauses"<<endl;
+  cout << "\t -noNCB \t turn off nonchronological backtracking"<<endl;
+  cout << "\t -q     \t quiet mode"<<endl;
+  cout << "\t -t [s] \t set time bound to s seconds"<<endl;
+  cout << "\t -noCC  \t turn off component caching"<<endl;
+  cout << "\t -cs [n]\t set max cache size to n MB"<<endl;
+  cout << "\t -noIBCP\t turn off implicit BCP"<<endl;
+  cout << "\t"<<endl;
+  
+  return -1;
+ }   
+
+ for(int i = 1; i < argc; i++)
+ {
+   if(strcmp(argv[i],"-noNCB") == 0) CSolverConf::doNonChronBackTracking = false;
+   if(strcmp(argv[i],"-noCC") == 0) CSolverConf::allowComponentCaching = false;   
+   if(strcmp(argv[i],"-noIBCP") == 0) CSolverConf::allowImplicitBCP = false;
+   if(strcmp(argv[i],"-noPP") == 0) CSolverConf::allowPreProcessing = false;
+   if(strcmp(argv[i],"-nocount") == 0) CSolverConf::count = false;
+
+   else if(strcmp(argv[i],"-noCA") == 0)
+   { 
+     CSolverConf::analyzeConflicts = false;      
+   }   
+   else if(strcmp(argv[i],"-q") == 0) CSolverConf::quietMode = true;   
+   else if(strcmp(argv[i],"-FrA") == 0)
+   {
+      memset(dataFile,0,1024);
+      fileout = true;
+      if(argc <= i+1){ toSTDOUT("wrong parameters"<<endl); return -1;}
+      strcpy(dataFile,argv[i+1]); 
+   }
+   else if(strcmp(argv[i],"-t") == 0)
+   {
+      if(argc <= i+1){ toSTDOUT("wrong parameters"<<endl); return -1;}
+      CSolverConf::secsTimeBound = atoi(argv[i+1]);
+      toSTDOUT("time bound:" <<CSolverConf::secsTimeBound<<"s\n");
+      theSolver.setTimeBound(CSolverConf::secsTimeBound);
+   }         
+   else if(strcmp(argv[i],"-cs") == 0)
+   {
+      if(argc <= i+1){toSTDOUT("wrong parameters"<<endl); return -1;}
+      CSolverConf::maxCacheSize = atoi(argv[i+1])*1024*1024;   
+      //cout <<"maxCacheSize:" <<CSolverConf::maxCacheSize<<"bytes\n";   
+   }      
+   else s = argv[i];   
+ }
+
+ toSTDOUT("cachesize Max:\t"<<CSolverConf::maxCacheSize/1024 << " kbytes"<<endl);   
+ 
+ // first: delete all data in the output 
+ if(fileout) theRunAn.getData().writeToFile(dataFile); 
+ 
+ theRunAn = CRunAnalyzer();  
+ 
+ theSolver.solve(s);
+ 
+ theRunAn.finishcountSATAnalysis();
+ finalcSATEvaluationfor_vis();
+ if(fileout) theRunAn.getData().writeToFile(dataFile);
+ return 0;
+}
Index: /vis_dev/sharpSAT/src/src_sharpSAT/main_.cpp
===================================================================
--- /vis_dev/sharpSAT/src/src_sharpSAT/main_.cpp	(revision 9)
+++ /vis_dev/sharpSAT/src/src_sharpSAT/main_.cpp	(revision 9)
@@ -0,0 +1,158 @@
+#include <iostream>
+
+#include <ctime> // To seed random generator
+#include <sys/time.h> // To seed random generator
+
+//include shared files
+#include <SomeTime.h>
+#include <Interface/AnalyzerData.h>
+
+#include "MainSolver/MainSolver.h"
+#include "Basics.h"
+
+
+using namespace std;
+
+
+CMainSolver theSolver;
+
+// No description
+void finalcSATEvaluation()
+{
+   const AnalyzerData &rAda = theRunAn.getData();  
+
+   if(rAda.theExitState == TIMEOUT)
+   {
+     toSTDOUT(endl << " TIMEOUT !"<<endl);
+     return;
+   } 
+        
+   toSTDOUT(endl<<endl);
+   toSTDOUT("#Variables:\t\t"<< rAda.nVars<<endl);
+   
+   if(rAda.nVars != rAda.nUsedVars)
+      toSTDOUT("#used Variables:\t"<< rAda.nUsedVars<<endl);
+   toSTDOUT("#Clauses:\t\t"<< rAda.nOriginalClauses<<endl);
+   toSTDOUT("#Clauses removed:\t"<< rAda.nRemovedClauses<<endl);
+   toSTDOUT("\n#added Clauses: \t"<< rAda.nAddedClauses<<endl);
+   
+   toSTDOUT("\n# of all assignments:\t" << rAda.getAllAssignments() 
+       << " = 2^(" << rAda.nVars<<")" <<endl);   
+
+   toSTDOUT("Pr[satisfaction]:\t" << rAda.rnProbOfSat <<endl);   
+
+   toSTDOUT("# of solutions:\t\t" << rAda.getNumSatAssignments() <<endl);
+   toSTDOUT("#SAT (full):   \t\t"); 
+    if(!CSolverConf::quietMode) rAda.printNumSatAss_whole();
+    toSTDOUT(endl);
+   	
+    toDEBUGOUT(".. found in:\t\t" << rAda.nReceivedSatAssignments << " units"<<endl);
+   
+    toSTDOUT(endl);
+    
+    toSTDOUT("Num. conflicts:\t\t" << rAda.nConflicts<<endl);
+    toSTDOUT("Num. implications:\t" << rAda.nImplications<<endl);
+    toSTDOUT("Num. decisions:\t\t" << rAda.nDecisions<<endl);    
+    toSTDOUT("max decision level:\t" << rAda.maxDecLevel<<"\t\t");
+    toSTDOUT("avg decision level:\t"<< rAda.get(AVG_DEC_LEV)<<endl); 
+    toSTDOUT("avg conflict level:\t"<< rAda.get(AVG_CONFLICT_LEV)<<endl);
+    toSTDOUT("avg solution level:\t"<< rAda.get(AVG_SOLUTION_LEV)<<endl);
+    
+    toSTDOUT("CCLLen 1stUIP - max:\t"<< rAda.get(LONGEST_CCL_1stUIP));
+    toSTDOUT("\t avg:\t"<< rAda.get(AVG_CCL_1stUIP)<<endl);
+    toSTDOUT("CCLLen lastUIP - max:\t"<< rAda.get(LONGEST_CCL_lastUIP));
+    toSTDOUT("\t avg:\t"<< rAda.get(AVG_CCL_lastUIP)<<endl);
+    
+    
+    toSTDOUT(endl);
+    toSTDOUT("FormulaCache stats:"<<endl);
+    toSTDOUT("memUse:\t\t\t"<<rAda.get(FCACHE_MEMUSE) <<endl);    
+    toSTDOUT("cached:\t\t\t"<<rAda.get(FCACHE_CACHEDCOMPS)<<endl);
+    toSTDOUT("used Buckets:\t\t"<<rAda.get(FCACHE_USEDBUCKETS)<<endl);
+    toSTDOUT("cache retrievals:\t"<<rAda.get(FCACHE_RETRIEVALS)<<endl);
+    toSTDOUT("cache tries:\t\t"<<rAda.get(FCACHE_INCLUDETRIES)<<endl);
+    
+    toSTDOUT("\n\nZeit: "<<rAda.elapsedTime<<"s\n\n");  
+    
+}
+
+
+int main_(int argc, char *argv[])
+{ 
+ char *s;
+ char dataFile[1024];
+ memset(dataFile,0,1024);
+ strcpy(dataFile,"data.txt"); 
+ bool fileout = false;
+ 
+ CSolverConf::analyzeConflicts = true;
+ CSolverConf::doNonChronBackTracking = true;
+ 
+ //toSTDOUT ("sharpSAT v1.1, July 1st, 2006"<<endl);
+ //toSTDOUT ("copyright 2006, Humboldt UniversitÃ€t zu Berlin"<<endl);
+  
+ if (argc <= 1){
+    
+  cout << "Usage: sharpSAT [options] [CNF_File]"<<endl;
+  cout << "Options: "<<endl;
+  cout << "\t -noPP  \t turn off preprocessing"<<endl;
+  cout << "\t -noCA  \t no conflict analysis nor -clauses"<<endl;
+  cout << "\t -noNCB \t turn off nonchronological backtracking"<<endl;
+  cout << "\t -q     \t quiet mode"<<endl;
+  cout << "\t -t [s] \t set time bound to s seconds"<<endl;
+  cout << "\t -noCC  \t turn off component caching"<<endl;
+  cout << "\t -cs [n]\t set max cache size to n MB"<<endl;
+  cout << "\t -noIBCP\t turn off implicit BCP"<<endl;
+  cout << "\t"<<endl;
+  
+  return -1;
+ }   
+
+ for(int i = 1; i < argc; i++)
+ {
+   if(strcmp(argv[i],"-noNCB") == 0) CSolverConf::doNonChronBackTracking = false;
+   if(strcmp(argv[i],"-noCC") == 0) CSolverConf::allowComponentCaching = false;   
+   if(strcmp(argv[i],"-noIBCP") == 0) CSolverConf::allowImplicitBCP = false;
+   if(strcmp(argv[i],"-noPP") == 0) CSolverConf::allowPreProcessing = false;
+   else if(strcmp(argv[i],"-noCA") == 0)
+   { 
+     CSolverConf::analyzeConflicts = false;      
+   }   
+   else if(strcmp(argv[i],"-q") == 0) CSolverConf::quietMode = true;   
+   else if(strcmp(argv[i],"-FrA") == 0)
+   {
+      memset(dataFile,0,1024);
+      fileout = true;
+      if(argc <= i+1){ toSTDOUT("wrong parameters"<<endl); return -1;}
+      strcpy(dataFile,argv[i+1]); 
+   }
+   else if(strcmp(argv[i],"-t") == 0)
+   {
+      if(argc <= i+1){ toSTDOUT("wrong parameters"<<endl); return -1;}
+      CSolverConf::secsTimeBound = atoi(argv[i+1]);
+      toSTDOUT("time bound:" <<CSolverConf::secsTimeBound<<"s\n");
+      theSolver.setTimeBound(CSolverConf::secsTimeBound);
+   }         
+   else if(strcmp(argv[i],"-cs") == 0)
+   {
+      if(argc <= i+1){toSTDOUT("wrong parameters"<<endl); return -1;}
+      CSolverConf::maxCacheSize = atoi(argv[i+1])*1024*1024;   
+      //cout <<"maxCacheSize:" <<CSolverConf::maxCacheSize<<"bytes\n";   
+   }      
+   else s = argv[i];   
+ }
+
+ toSTDOUT("cachesize Max:\t"<<CSolverConf::maxCacheSize/1024 << " kbytes"<<endl);   
+ 
+ // first: delete all data in the output 
+ if(fileout) theRunAn.getData().writeToFile(dataFile); 
+ 
+ theRunAn = CRunAnalyzer();  
+ 
+ theSolver.solve(s);
+ 
+ theRunAn.finishcountSATAnalysis();
+ finalcSATEvaluation();
+ if(fileout) theRunAn.getData().writeToFile(dataFile);
+ return 0;
+}
Index: /vis_dev/sharpSAT/src/src_sharpSAT/semantic.cache
===================================================================
--- /vis_dev/sharpSAT/src/src_sharpSAT/semantic.cache	(revision 9)
+++ /vis_dev/sharpSAT/src/src_sharpSAT/semantic.cache	(revision 9)
@@ -0,0 +1,28 @@
+;; Object src_sharpSAT/
+;; SEMANTICDB Tags save file
+(semanticdb-project-database-file "src_sharpSAT/"
+  :tables (list 
+   (semanticdb-table "main.cpp"
+    :major-mode 'c++-mode
+    :tags '(("iostream" include (:system-flag t) nil [1 20]) ("ctime" include (:system-flag t) nil [22 38]) ("sys/time.h" include (:system-flag t) nil [67 88]) ("SomeTime.h" include (:system-flag t) nil [141 162]) ("Interface/AnalyzerData.h" include (:system-flag t) nil [163 198]) ("MainSolver/MainSolver.h" include nil nil [200 234]) ("Basics.h" include nil nil [235 254]) ("theSolver" variable (:type ("CMainSolver" type (:type "class") nil nil)) nil [280 302]) ("finalcSATEvaluation" function (:type "void") nil [322 2623]) ("finalcSATEvaluationfor_vis" function (:type "void") nil [2625 2915]) ("main" function (:arguments (("argc" variable (:type "int") (reparse-symbol arg-sub-list) [2925 2934]) ("argv" variable (:pointer 1 :dereference 1 :type "char") (reparse-symbol arg-sub-list) [2935 2948])) :type "int") nil [2916 5609]))
+    :file "main.cpp"
+    :pointmax 5610
+    )
+   (semanticdb-table "Basics.h"
+    :major-mode 'c-mode
+    :tags '(("COMPILE_FOR_GUI" variable (:constant-flag t) nil [37 40]) ("CSolverConf" type (:members (("public" label nil (reparse-symbol classsubparts) [139 146]) ("analyzeConflicts" variable (:typemodifiers ("static") :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [149 178]) ("doNonChronBackTracking" variable (:typemodifiers ("static") :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [181 216]) ("quietMode" variable (:typemodifiers ("static") :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [223 245]) ("allowComponentCaching" variable (:typemodifiers ("static") :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [251 285]) ("allowImplicitBCP" variable (:typemodifiers ("static") :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [288 317]) ("allowPreProcessing" variable (:typemodifiers ("static") :type ("bool" type (:type "class") nil nil)) (reparse-symbol classsubparts) [323 354]) ("secsTimeBound" variable (:typemodifiers ("static") :type "unsigned int") (reparse-symbol classsubparts) [360 394]) ("maxCacheSize" variable (:typemodifiers ("static") :type "unsigned int") (reparse-symbol classsubparts) [403 436]) ("CSolverConf" function (:prototype-flag t :constructor-flag t :type ("CSolverConf" type "class")) (reparse-symbol classsubparts) [473 487]) ("CSolverConf" function (:prototype-flag t :destructor-flag t :type "void") (reparse-symbol classsubparts) [491 506])) :type "class") nil [117 510]) ("toSTDOUT" variable (:constant-flag t) nil [543 563]) ("toSTDOUT" variable (:constant-flag t) nil [571 593]) ("X" variable (:type "int") nil [627 629]) ("toERROUT" variable (:constant-flag t) nil [670 690]) ("toERROUT" variable (:constant-flag t) nil [698 720]) ("X" variable (:type "int") nil [754 756]) ("toDEBUGOUT" variable (:constant-flag t) nil [781 805]) ("X" variable (:type "int") nil [839 841]) ("toDEBUGOUT" variable (:constant-flag t) nil [856 878]) ("SOLVER_StateT" type (:members (("SUCCESS" variable (:constant-flag t :type "int") (reparse-symbol enumsubparts) [913 921]) ("TIMEOUT" variable (:constant-flag t :type "int") (reparse-symbol enumsubparts) [923 931]) ("ABORTED" variable (:constant-flag t :type "int") (reparse-symbol enumsubparts) [933 942])) :type "enum") nil [891 943]) ("TriValue" type (:members (("F" variable (:constant-flag t :default-value (969 970) :type "int") (reparse-symbol enumsubparts) [965 970]) ("W" variable (:constant-flag t :default-value (977 978) :type "int") (reparse-symbol enumsubparts) [973 978]) ("X" variable (:constant-flag t :default-value (985 986) :type "int") (reparse-symbol enumsubparts) [981 986])) :type "enum") nil [948 990]) ("TriValuetoChar" function (:prototype-flag t :typemodifiers ("extern") :arguments (("v" variable (:type ("TriValue" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [1024 1035])) :type "char") nil [997 1036]))
+    :file "Basics.h"
+    :pointmax 1044
+    )
+   (semanticdb-table "Basics.cpp"
+    :major-mode 'c++-mode
+    :tags '(("Basics.h" include nil nil [1 20]) ("CSolverConf::analyzeConflicts" variable (:default-value "true;" :type ("bool" type (:type "class") nil nil)) nil [23 65]) ("CSolverConf::doNonChronBackTracking" variable (:default-value "true;" :type ("bool" type (:type "class") nil nil)) nil [66 114]) ("CSolverConf::allowComponentCaching" variable (:default-value "true;" :type ("bool" type (:type "class") nil nil)) nil [116 163]) ("CSolverConf::allowImplicitBCP" variable (:default-value "true;" :type ("bool" type (:type "class") nil nil)) nil [164 206]) ("CSolverConf::allowPreProcessing" variable (:default-value "true;" :type ("bool" type (:type "class") nil nil)) nil [208 252]) ("CSolverConf::quietMode" variable (:default-value "false;" :type ("bool" type (:type "class") nil nil)) nil [254 290]) ("CSolverConf::secsTimeBound" variable (:default-value "10000000" :type "unsigned int") nil [292 343]) ("CSolverConf::maxCacheSize" variable (:default-value "0" :type "unsigned int") nil [348 391]) ("TriValuetoChar" function (:arguments (("v" variable (:type ("TriValue" type (:type "class") nil nil)) (reparse-symbol arg-sub-list) [417 428])) :type "char") nil [397 560]))
+    :file "Basics.cpp"
+    :pointmax 566
+    :unmatched-syntax 'nil
+    )
+   )
+  :file "semantic.cache"
+  :semantic-tag-version "2.0beta3"
+  :semanticdb-version "2.0beta3"
+  )
Index: /vis_dev/sharpSAT/test
===================================================================
--- /vis_dev/sharpSAT/test	(revision 9)
+++ /vis_dev/sharpSAT/test	(revision 9)
@@ -0,0 +1,1139 @@
+p cnf 420 1138 
+ 1 0
+ 2  -3  4 0
+ -2  -4 0
+ 3  -4 0
+ -5  -4  6 0
+ 5  -6 0
+ 4  -6 0
+ -7  -6  8 0
+ 7  -8 0
+ 6  -8 0
+ -2  -3  9 0
+ 2  -9 0
+ 3  -9 0
+ 5  -9  10 0
+ -5  -10 0
+ 9  -10 0
+ 5  -4  11 0
+ -5  -11 0
+ 4  -11 0
+ -12  -11  13 0
+ 12  -13 0
+ 11  -13 0
+ 14  -13  15 0
+ -14  -15 0
+ 13  -15 0
+ 10  15  16 0
+ -10  -16 0
+ -15  -16 0
+ 8  -16  17 0
+ -8  -17 0
+ 16  -17 0
+ -2  3  18 0
+ 2  -18 0
+ -3  -18 0
+ 5  -18  19 0
+ -5  -19 0
+ 18  -19 0
+ -20  21  22 0
+ 20  -22 0
+ -21  -22 0
+ 20  -21  23 0
+ -20  -23 0
+ 21  -23 0
+ 22  23  24 0
+ -22  -24 0
+ -23  -24 0
+ -25  26  27 0
+ 25  -27 0
+ -26  -27 0
+ 25  -26  28 0
+ -25  -28 0
+ 26  -28 0
+ 27  28  29 0
+ -27  -29 0
+ -28  -29 0
+ -30  31  32 0
+ 30  -32 0
+ -31  -32 0
+ 30  -31  33 0
+ -30  -33 0
+ 31  -33 0
+ 32  33  34 0
+ -32  -34 0
+ -33  -34 0
+ -29  -34  35 0
+ 29  -35 0
+ 34  -35 0
+ -24  -35  36 0
+ 24  -36 0
+ 35  -36 0
+ -19  -36  37 0
+ 19  -37 0
+ 36  -37 0
+ 2  3  38 0
+ -2  -38 0
+ -3  -38 0
+ -5  -38  39 0
+ 5  -39 0
+ 38  -39 0
+ 14  -39  40 0
+ -14  -40 0
+ 39  -40 0
+ 41  -40  42 0
+ -41  -42 0
+ 40  -42 0
+ 37  42  43 0
+ -37  -43 0
+ -42  -43 0
+ -44  -45  46 0
+ 44  -46 0
+ 45  -46 0
+ 47  46  48 0
+ -47  -48 0
+ -46  -48 0
+ 36  -48  49 0
+ -36  -49 0
+ 48  -49 0
+ -19  -49  50 0
+ 19  -50 0
+ 49  -50 0
+ 44  -50  51 0
+ -44  -51 0
+ 50  -51 0
+ -44  50  52 0
+ 44  -52 0
+ -50  -52 0
+ 51  52  53 0
+ -51  -53 0
+ -52  -53 0
+ -50  -53  54 0
+ 50  -54 0
+ 53  -54 0
+ 5  -38  55 0
+ -5  -55 0
+ 38  -55 0
+ -56  -55  57 0
+ 56  -57 0
+ 55  -57 0
+ 50  57  58 0
+ -50  -58 0
+ -57  -58 0
+ 44  -58  59 0
+ -44  -59 0
+ 58  -59 0
+ 54  59  60 0
+ -54  -60 0
+ -59  -60 0
+ -44  45  61 0
+ 44  -61 0
+ -45  -61 0
+ 44  -45  62 0
+ -44  -62 0
+ 45  -62 0
+ 61  62  63 0
+ -61  -63 0
+ -62  -63 0
+ -50  -63  64 0
+ 50  -64 0
+ 63  -64 0
+ 57  64  65 0
+ -57  -65 0
+ -64  -65 0
+ 45  -58  66 0
+ -45  -66 0
+ 58  -66 0
+ -65  66  67 0
+ 65  -67 0
+ -66  -67 0
+ -47  -58  68 0
+ 47  -68 0
+ 58  -68 0
+ 69  -57  70 0
+ -69  -70 0
+ 57  -70 0
+ 8  10  71 0
+ -8  -71 0
+ -10  -71 0
+ -30  -71  72 0
+ 30  -72 0
+ 71  -72 0
+ 57  72  73 0
+ -57  -73 0
+ -72  -73 0
+ 70  73  74 0
+ -70  -74 0
+ -73  -74 0
+ 75  -57  76 0
+ -75  -76 0
+ 57  -76 0
+ -25  -71  77 0
+ 25  -77 0
+ 71  -77 0
+ 57  77  78 0
+ -57  -78 0
+ -77  -78 0
+ 76  78  79 0
+ -76  -79 0
+ -78  -79 0
+ 80  -57  81 0
+ -80  -81 0
+ 57  -81 0
+ -20  -71  82 0
+ 20  -82 0
+ 71  -82 0
+ 57  82  83 0
+ -57  -83 0
+ -82  -83 0
+ 81  83  84 0
+ -81  -84 0
+ -83  -84 0
+ 85  -15  86 0
+ -85  -86 0
+ 15  -86 0
+ -31  -71  87 0
+ 31  -87 0
+ 71  -87 0
+ 15  87  88 0
+ -15  -88 0
+ -87  -88 0
+ 86  88  89 0
+ -86  -89 0
+ -88  -89 0
+ 90  -15  91 0
+ -90  -91 0
+ 15  -91 0
+ -26  -71  92 0
+ 26  -92 0
+ 71  -92 0
+ 15  92  93 0
+ -15  -93 0
+ -92  -93 0
+ 91  93  94 0
+ -91  -94 0
+ -93  -94 0
+ 95  -15  96 0
+ -95  -96 0
+ 15  -96 0
+ -21  -71  97 0
+ 21  -97 0
+ 71  -97 0
+ 15  97  98 0
+ -15  -98 0
+ -97  -98 0
+ 96  98  99 0
+ -96  -99 0
+ -98  -99 0
+ 14  -11  100 0
+ -14  -100 0
+ 11  -100 0
+ -19  36  101 0
+ 19  -101 0
+ -36  -101 0
+ -5  8  102 0
+ 5  -102 0
+ -8  -102 0
+ 19  102  103 0
+ -19  -103 0
+ -102  -103 0
+ 101  103  104 0
+ -101  -104 0
+ -103  -104 0
+ 11  104  105 0
+ -11  -105 0
+ -104  -105 0
+ 100  105  106 0
+ -100  -106 0
+ -105  -106 0
+ 14  -12  107 0
+ -14  -107 0
+ 12  -107 0
+ -11  107  108 0
+ 11  -108 0
+ -107  -108 0
+ 36  48  109 0
+ -36  -109 0
+ -48  -109 0
+ -19  109  110 0
+ 19  -110 0
+ -109  -110 0
+ -2  6  111 0
+ 2  -111 0
+ -6  -111 0
+ 10  -111  112 0
+ -10  -112 0
+ 111  -112 0
+ 110  -112  113 0
+ -110  -113 0
+ 112  -113 0
+ 11  113  114 0
+ -11  -114 0
+ -113  -114 0
+ 108  114  115 0
+ -108  -115 0
+ -114  -115 0
+ 56  -55  116 0
+ -56  -116 0
+ 55  -116 0
+ 3  6  117 0
+ -3  -117 0
+ -6  -117 0
+ 8  117  118 0
+ -8  -118 0
+ -117  -118 0
+ 39  118  119 0
+ -39  -119 0
+ -118  -119 0
+ 42  119  120 0
+ -42  -120 0
+ -119  -120 0
+ 10  -120  121 0
+ -10  -121 0
+ 120  -121 0
+ 19  121  122 0
+ -19  -122 0
+ -121  -122 0
+ 37  122  123 0
+ -37  -123 0
+ -122  -123 0
+ 15  -123  124 0
+ -15  -124 0
+ 123  -124 0
+ 55  124  125 0
+ -55  -125 0
+ -124  -125 0
+ 116  125  126 0
+ -116  -126 0
+ -125  -126 0
+ 115  -126  127 0
+ -115  -127 0
+ 126  -127 0
+ -106  -127  128 0
+ 106  -128 0
+ 127  -128 0
+ -129  -128  130 0
+ 129  -130 0
+ 128  -130 0
+ -115  -126  131 0
+ 115  -131 0
+ 126  -131 0
+ 106  -131  132 0
+ -106  -132 0
+ 131  -132 0
+ 106  -127  133 0
+ -106  -133 0
+ 127  -133 0
+ -134  -133  135 0
+ 134  -135 0
+ 133  -135 0
+ 136  -135  137 0
+ -136  -137 0
+ 135  -137 0
+ 132  137  138 0
+ -132  -138 0
+ -137  -138 0
+ 130  -138  139 0
+ -130  -139 0
+ 138  -139 0
+ -115  126  140 0
+ 115  -140 0
+ -126  -140 0
+ 106  -140  141 0
+ -106  -141 0
+ 140  -141 0
+ -84  99  142 0
+ 84  -142 0
+ -99  -142 0
+ 84  -99  143 0
+ -84  -143 0
+ 99  -143 0
+ 142  143  144 0
+ -142  -144 0
+ -143  -144 0
+ -79  94  145 0
+ 79  -145 0
+ -94  -145 0
+ 79  -94  146 0
+ -79  -146 0
+ 94  -146 0
+ 145  146  147 0
+ -145  -147 0
+ -146  -147 0
+ -74  89  148 0
+ 74  -148 0
+ -89  -148 0
+ 74  -89  149 0
+ -74  -149 0
+ 89  -149 0
+ 148  149  150 0
+ -148  -150 0
+ -149  -150 0
+ -147  -150  151 0
+ 147  -151 0
+ 150  -151 0
+ -144  -151  152 0
+ 144  -152 0
+ 151  -152 0
+ -141  -152  153 0
+ 141  -153 0
+ 152  -153 0
+ 115  126  154 0
+ -115  -154 0
+ -126  -154 0
+ -106  -154  155 0
+ 106  -155 0
+ 154  -155 0
+ 136  -155  156 0
+ -136  -156 0
+ 155  -156 0
+ 157  -156  158 0
+ -157  -158 0
+ 156  -158 0
+ 153  158  159 0
+ -153  -159 0
+ -158  -159 0
+ -60  -67  160 0
+ 60  -160 0
+ 67  -160 0
+ 68  160  161 0
+ -68  -161 0
+ -160  -161 0
+ 152  -161  162 0
+ -152  -162 0
+ 161  -162 0
+ -141  -162  163 0
+ 141  -163 0
+ 162  -163 0
+ 60  -163  164 0
+ -60  -164 0
+ 163  -164 0
+ -60  163  165 0
+ 60  -165 0
+ -163  -165 0
+ 164  165  166 0
+ -164  -166 0
+ -165  -166 0
+ -163  -166  167 0
+ 163  -167 0
+ 166  -167 0
+ 106  -154  168 0
+ -106  -168 0
+ 154  -168 0
+ -169  -168  170 0
+ 169  -170 0
+ 168  -170 0
+ 163  170  171 0
+ -163  -171 0
+ -170  -171 0
+ 60  -171  172 0
+ -60  -172 0
+ 171  -172 0
+ 167  172  173 0
+ -167  -173 0
+ -172  -173 0
+ -60  67  174 0
+ 60  -174 0
+ -67  -174 0
+ 60  -67  175 0
+ -60  -175 0
+ 67  -175 0
+ 174  175  176 0
+ -174  -176 0
+ -175  -176 0
+ -163  -176  177 0
+ 163  -177 0
+ 176  -177 0
+ 170  177  178 0
+ -170  -178 0
+ -177  -178 0
+ 67  -171  179 0
+ -67  -179 0
+ 171  -179 0
+ -178  179  180 0
+ 178  -180 0
+ -179  -180 0
+ -68  -171  181 0
+ 68  -181 0
+ 171  -181 0
+ 182  -170  183 0
+ -182  -183 0
+ 170  -183 0
+ 130  132  184 0
+ -130  -184 0
+ -132  -184 0
+ -74  -184  185 0
+ 74  -185 0
+ 184  -185 0
+ 170  185  186 0
+ -170  -186 0
+ -185  -186 0
+ 183  186  187 0
+ -183  -187 0
+ -186  -187 0
+ 188  -170  189 0
+ -188  -189 0
+ 170  -189 0
+ -79  -184  190 0
+ 79  -190 0
+ 184  -190 0
+ 170  190  191 0
+ -170  -191 0
+ -190  -191 0
+ 189  191  192 0
+ -189  -192 0
+ -191  -192 0
+ 193  -170  194 0
+ -193  -194 0
+ 170  -194 0
+ -84  -184  195 0
+ 84  -195 0
+ 184  -195 0
+ 170  195  196 0
+ -170  -196 0
+ -195  -196 0
+ 194  196  197 0
+ -194  -197 0
+ -196  -197 0
+ 198  -137  199 0
+ -198  -199 0
+ 137  -199 0
+ -89  -184  200 0
+ 89  -200 0
+ 184  -200 0
+ 137  200  201 0
+ -137  -201 0
+ -200  -201 0
+ 199  201  202 0
+ -199  -202 0
+ -201  -202 0
+ 203  -137  204 0
+ -203  -204 0
+ 137  -204 0
+ -94  -184  205 0
+ 94  -205 0
+ 184  -205 0
+ 137  205  206 0
+ -137  -206 0
+ -205  -206 0
+ 204  206  207 0
+ -204  -207 0
+ -206  -207 0
+ 208  -137  209 0
+ -208  -209 0
+ 137  -209 0
+ -99  -184  210 0
+ 99  -210 0
+ 184  -210 0
+ 137  210  211 0
+ -137  -211 0
+ -210  -211 0
+ 209  211  212 0
+ -209  -212 0
+ -211  -212 0
+ 136  -133  213 0
+ -136  -213 0
+ 133  -213 0
+ -141  152  214 0
+ 141  -214 0
+ -152  -214 0
+ -106  130  215 0
+ 106  -215 0
+ -130  -215 0
+ 141  215  216 0
+ -141  -216 0
+ -215  -216 0
+ 214  216  217 0
+ -214  -217 0
+ -216  -217 0
+ 133  217  218 0
+ -133  -218 0
+ -217  -218 0
+ 213  218  219 0
+ -213  -219 0
+ -218  -219 0
+ 136  -134  220 0
+ -136  -220 0
+ 134  -220 0
+ -133  220  221 0
+ 133  -221 0
+ -220  -221 0
+ 152  161  222 0
+ -152  -222 0
+ -161  -222 0
+ -141  222  223 0
+ 141  -223 0
+ -222  -223 0
+ -115  128  224 0
+ 115  -224 0
+ -128  -224 0
+ 132  -224  225 0
+ -132  -225 0
+ 224  -225 0
+ 223  -225  226 0
+ -223  -226 0
+ 225  -226 0
+ 133  226  227 0
+ -133  -227 0
+ -226  -227 0
+ 221  227  228 0
+ -221  -228 0
+ -227  -228 0
+ 169  -168  229 0
+ -169  -229 0
+ 168  -229 0
+ 126  128  230 0
+ -126  -230 0
+ -128  -230 0
+ 130  230  231 0
+ -130  -231 0
+ -230  -231 0
+ 155  231  232 0
+ -155  -232 0
+ -231  -232 0
+ 158  232  233 0
+ -158  -233 0
+ -232  -233 0
+ 132  -233  234 0
+ -132  -234 0
+ 233  -234 0
+ 141  234  235 0
+ -141  -235 0
+ -234  -235 0
+ 153  235  236 0
+ -153  -236 0
+ -235  -236 0
+ 137  -236  237 0
+ -137  -237 0
+ 236  -237 0
+ 168  237  238 0
+ -168  -238 0
+ -237  -238 0
+ 229  238  239 0
+ -229  -239 0
+ -238  -239 0
+ -30  -29  240 0
+ 30  -240 0
+ 29  -240 0
+ -31  240  241 0
+ 31  -241 0
+ -240  -241 0
+ 30  -29  242 0
+ -30  -242 0
+ 29  -242 0
+ 31  242  243 0
+ -31  -243 0
+ -242  -243 0
+ 241  243  244 0
+ -241  -244 0
+ -243  -244 0
+ -20  -244  245 0
+ 20  -245 0
+ 244  -245 0
+ -21  245  246 0
+ 21  -246 0
+ -245  -246 0
+ 20  -244  247 0
+ -20  -247 0
+ 244  -247 0
+ 21  247  248 0
+ -21  -248 0
+ -247  -248 0
+ 246  248  249 0
+ -246  -249 0
+ -248  -249 0
+ 5  249  250 0
+ -5  -250 0
+ -249  -250 0
+ -2  -250  251 0
+ 2  -251 0
+ 250  -251 0
+ -25  -26  252 0
+ 25  -252 0
+ 26  -252 0
+ 30  -252  253 0
+ -30  -253 0
+ 252  -253 0
+ 31  253  254 0
+ -31  -254 0
+ -253  -254 0
+ 241  254  255 0
+ -241  -255 0
+ -254  -255 0
+ 20  -255  256 0
+ -20  -256 0
+ 255  -256 0
+ 21  256  257 0
+ -21  -257 0
+ -256  -257 0
+ 246  257  258 0
+ -246  -258 0
+ -257  -258 0
+ 5  -258  259 0
+ -5  -259 0
+ 258  -259 0
+ 2  259  260 0
+ -2  -260 0
+ -259  -260 0
+ 251  260  261 0
+ -251  -261 0
+ -260  -261 0
+ -3  261  262 0
+ 3  -262 0
+ -261  -262 0
+ 5  -2  263 0
+ -5  -263 0
+ 2  -263 0
+ 25  26  264 0
+ -25  -264 0
+ -26  -264 0
+ -31  -240  265 0
+ 31  -265 0
+ 240  -265 0
+ 31  -242  266 0
+ -31  -266 0
+ 242  -266 0
+ 265  266  267 0
+ -265  -267 0
+ -266  -267 0
+ -20  267  268 0
+ 20  -268 0
+ -267  -268 0
+ -21  -268  269 0
+ 21  -269 0
+ 268  -269 0
+ 20  267  270 0
+ -20  -270 0
+ -267  -270 0
+ 21  -270  271 0
+ -21  -271 0
+ 270  -271 0
+ 269  271  272 0
+ -269  -272 0
+ -271  -272 0
+ -5  272  273 0
+ 5  -273 0
+ -272  -273 0
+ 30  -264  274 0
+ -30  -274 0
+ 264  -274 0
+ 31  -274  275 0
+ -31  -275 0
+ 274  -275 0
+ 20  -275  276 0
+ -20  -276 0
+ 275  -276 0
+ 21  -276  277 0
+ -21  -277 0
+ 276  -277 0
+ 5  -277  278 0
+ -5  -278 0
+ 277  -278 0
+ 273  278  279 0
+ -273  -279 0
+ -278  -279 0
+ 2  279  280 0
+ -2  -280 0
+ -279  -280 0
+ 263  280  281 0
+ -263  -281 0
+ -280  -281 0
+ 3  281  282 0
+ -3  -282 0
+ -281  -282 0
+ 262  282  283 0
+ -262  -283 0
+ -282  -283 0
+ -5  2  284 0
+ 5  -284 0
+ -2  -284 0
+ 263  284  285 0
+ -263  -285 0
+ -284  -285 0
+ -3  285  286 0
+ 3  -286 0
+ -285  -286 0
+ 106  -115  287 0
+ -106  -287 0
+ 115  -287 0
+ -106  115  288 0
+ 106  -288 0
+ -115  -288 0
+ 287  288  289 0
+ -287  -289 0
+ -288  -289 0
+ -126  289  290 0
+ 126  -290 0
+ -289  -290 0
+ 286  290  291 0
+ -286  -291 0
+ -290  -291 0
+ 283  -291  292 0
+ -283  -292 0
+ 291  -292 0
+ -293  -56  294 0
+ 293  -294 0
+ 56  -294 0
+ 293  56  295 0
+ -293  -295 0
+ -56  -295 0
+ 296  12  297 0
+ -296  -297 0
+ -12  -297 0
+ -296  -12  298 0
+ 296  -298 0
+ 12  -298 0
+ -299  -41  300 0
+ 299  -300 0
+ 41  -300 0
+ 299  41  301 0
+ -299  -301 0
+ -41  -301 0
+ -302  139  303 0
+ 302  -303 0
+ -139  -303 0
+ 302  -139  304 0
+ -302  -304 0
+ 139  -304 0
+ 303  304  305 0
+ -303  -305 0
+ -304  -305 0
+ 299  -157  306 0
+ -299  -306 0
+ 157  -306 0
+ -299  157  307 0
+ 299  -307 0
+ -157  -307 0
+ 306  307  308 0
+ -306  -308 0
+ -307  -308 0
+ 305  -308  309 0
+ -305  -309 0
+ 308  -309 0
+ 296  -134  310 0
+ -296  -310 0
+ 134  -310 0
+ -296  134  311 0
+ 296  -311 0
+ -134  -311 0
+ 310  311  312 0
+ -310  -312 0
+ -311  -312 0
+ -309  -312  313 0
+ 309  -313 0
+ 312  -313 0
+ -314  159  315 0
+ 314  -315 0
+ -159  -315 0
+ 314  -159  316 0
+ -314  -316 0
+ 159  -316 0
+ 315  316  317 0
+ -315  -317 0
+ -316  -317 0
+ -313  317  318 0
+ 313  -318 0
+ -317  -318 0
+ 319  -318  320 0
+ -319  -320 0
+ 318  -320 0
+ 321  -136  322 0
+ -321  -322 0
+ 136  -322 0
+ -321  136  323 0
+ 321  -323 0
+ -136  -323 0
+ 322  323  324 0
+ -322  -324 0
+ -323  -324 0
+ -320  -324  325 0
+ 320  -325 0
+ 324  -325 0
+ 293  -169  326 0
+ -293  -326 0
+ 169  -326 0
+ -293  169  327 0
+ 293  -327 0
+ -169  -327 0
+ 326  327  328 0
+ -326  -328 0
+ -327  -328 0
+ -325  -328  329 0
+ 325  -329 0
+ 328  -329 0
+ 44  -173  330 0
+ -44  -330 0
+ 173  -330 0
+ -44  173  331 0
+ 44  -331 0
+ -173  -331 0
+ 330  331  332 0
+ -330  -332 0
+ -331  -332 0
+ -329  -332  333 0
+ 329  -333 0
+ 332  -333 0
+ 45  -180  334 0
+ -45  -334 0
+ 180  -334 0
+ -45  180  335 0
+ 45  -335 0
+ -180  -335 0
+ 334  335  336 0
+ -334  -336 0
+ -335  -336 0
+ -333  -336  337 0
+ 333  -337 0
+ 336  -337 0
+ 47  -181  338 0
+ -47  -338 0
+ 181  -338 0
+ -47  181  339 0
+ 47  -339 0
+ -181  -339 0
+ 338  339  340 0
+ -338  -340 0
+ -339  -340 0
+ -337  -340  341 0
+ 337  -341 0
+ 340  -341 0
+ 30  -187  342 0
+ -30  -342 0
+ 187  -342 0
+ -30  187  343 0
+ 30  -343 0
+ -187  -343 0
+ 342  343  344 0
+ -342  -344 0
+ -343  -344 0
+ -341  -344  345 0
+ 341  -345 0
+ 344  -345 0
+ 25  -192  346 0
+ -25  -346 0
+ 192  -346 0
+ -25  192  347 0
+ 25  -347 0
+ -192  -347 0
+ 346  347  348 0
+ -346  -348 0
+ -347  -348 0
+ -345  -348  349 0
+ 345  -349 0
+ 348  -349 0
+ 20  -197  350 0
+ -20  -350 0
+ 197  -350 0
+ -20  197  351 0
+ 20  -351 0
+ -197  -351 0
+ 350  351  352 0
+ -350  -352 0
+ -351  -352 0
+ -349  -352  353 0
+ 349  -353 0
+ 352  -353 0
+ 31  -202  354 0
+ -31  -354 0
+ 202  -354 0
+ -31  202  355 0
+ 31  -355 0
+ -202  -355 0
+ 354  355  356 0
+ -354  -356 0
+ -355  -356 0
+ -353  -356  357 0
+ 353  -357 0
+ 356  -357 0
+ 26  -207  358 0
+ -26  -358 0
+ 207  -358 0
+ -26  207  359 0
+ 26  -359 0
+ -207  -359 0
+ 358  359  360 0
+ -358  -360 0
+ -359  -360 0
+ -357  -360  361 0
+ 357  -361 0
+ 360  -361 0
+ 21  -212  362 0
+ -21  -362 0
+ 212  -362 0
+ -21  212  363 0
+ 21  -363 0
+ -212  -363 0
+ 362  363  364 0
+ -362  -364 0
+ -363  -364 0
+ -361  -364  365 0
+ 361  -365 0
+ 364  -365 0
+ 5  -219  366 0
+ -5  -366 0
+ 219  -366 0
+ -5  219  367 0
+ 5  -367 0
+ -219  -367 0
+ 366  367  368 0
+ -366  -368 0
+ -367  -368 0
+ -365  -368  369 0
+ 365  -369 0
+ 368  -369 0
+ 2  -228  370 0
+ -2  -370 0
+ 228  -370 0
+ -2  228  371 0
+ 2  -371 0
+ -228  -371 0
+ 370  371  372 0
+ -370  -372 0
+ -371  -372 0
+ -369  -372  373 0
+ 369  -373 0
+ 372  -373 0
+ 3  -239  374 0
+ -3  -374 0
+ 239  -374 0
+ -3  239  375 0
+ 3  -375 0
+ -239  -375 0
+ 374  375  376 0
+ -374  -376 0
+ -375  -376 0
+ -373  -376  377 0
+ 373  -377 0
+ 376  -377 0
+ 292  -377  378 0
+ -292  -378 0
+ 377  -378 0
+ 294  -378  379 0
+ -294  -379 0
+ 378  -379 0
+ 295  -379  380 0
+ -295  -380 0
+ 379  -380 0
+ 297  -380  381 0
+ -297  -381 0
+ 380  -381 0
+ 298  -381  382 0
+ -298  -382 0
+ 381  -382 0
+ 300  -382  383 0
+ -300  -383 0
+ 382  -383 0
+ 301  -383  384 0
+ -301  -384 0
+ 383  -384 0
+ 302  -299  385 0
+ -302  -385 0
+ 299  -385 0
+ 296  -385  386 0
+ -296  -386 0
+ 385  -386 0
+ 314  -386  387 0
+ -314  -387 0
+ 386  -387 0
+ 319  -387  388 0
+ -319  -388 0
+ 387  -388 0
+ -321  -388  389 0
+ 321  -389 0
+ 388  -389 0
+ 293  -389  390 0
+ -293  -390 0
+ 389  -390 0
+ 44  -390  391 0
+ -44  -391 0
+ 390  -391 0
+ 45  -391  392 0
+ -45  -392 0
+ 391  -392 0
+ 47  -392  393 0
+ -47  -393 0
+ 392  -393 0
+ -30  -393  394 0
+ 30  -394 0
+ 393  -394 0
+ 25  -394  395 0
+ -25  -395 0
+ 394  -395 0
+ -20  -395  396 0
+ 20  -396 0
+ 395  -396 0
+ -31  -396  397 0
+ 31  -397 0
+ 396  -397 0
+ 26  -397  398 0
+ -26  -398 0
+ 397  -398 0
+ -21  -398  399 0
+ 21  -399 0
+ 398  -399 0
+ -5  -399  400 0
+ 5  -400 0
+ 399  -400 0
+ 2  -400  401 0
+ -2  -401 0
+ 400  -401 0
+ -3  -401  402 0
+ 3  -402 0
+ 401  -402 0
+ -17  -402  403 0
+ 17  -403 0
+ 402  -403 0
+ 41  -403  404 0
+ -41  -404 0
+ 403  -404 0
+ -12  -404  405 0
+ 12  -405 0
+ 404  -405 0
+ -43  -405  406 0
+ 43  -406 0
+ 405  -406 0
+ -14  -406  407 0
+ 14  -407 0
+ 406  -407 0
+ -56  -407  408 0
+ 56  -408 0
+ 407  -408 0
+ 60  -408  409 0
+ -60  -409 0
+ 408  -409 0
+ 67  -409  410 0
+ -67  -410 0
+ 409  -410 0
+ 68  -410  411 0
+ -68  -411 0
+ 410  -411 0
+ -74  -411  412 0
+ 74  -412 0
+ 411  -412 0
+ 79  -412  413 0
+ -79  -413 0
+ 412  -413 0
+ -84  -413  414 0
+ 84  -414 0
+ 413  -414 0
+ -89  -414  415 0
+ 89  -415 0
+ 414  -415 0
+ 94  -415  416 0
+ -94  -416 0
+ 415  -416 0
+ -99  -416  417 0
+ 99  -417 0
+ 416  -417 0
+ -106  -417  418 0
+ 106  -418 0
+ 417  -418 0
+ 115  -418  419 0
+ -115  -419 0
+ 418  -419 0
+ -126  -419  420 0
+ 126  -420 0
+ 419  -420 0
+ -384  420  1 0
+ 384  -1 0
+ -420  -1 0
