STP: Simple Theorem Prover (a SMT solver for bitvectors & arrays).

+262
+23
pkgs/applications/science/logic/stp/default.nix
··· 1 + {stdenv, cmake, boost, bison, flex, fetchgit, perl, zlib}: 2 + stdenv.mkDerivation rec { 3 + version = "2014.01.07"; 4 + name = "stp-${version}"; 5 + src = fetchgit { 6 + url = "git://github.com/stp/stp"; 7 + rev = "3aa11620a823d617fc033d26aedae91853d18635"; 8 + sha256 = "832520787f57f63cf47364d080f30ad10d6d6e00f166790c19b125be3d6dd45c"; 9 + }; 10 + buildInputs = [ cmake boost bison flex perl zlib ]; 11 + cmakeFlags = [ "-DBUILD_SHARED_LIBS=ON" ]; 12 + patchPhase = '' 13 + sed -e 's,^export(PACKAGE.*,,' -i CMakeLists.txt 14 + patch -p1 < ${./fixbuild.diff} 15 + patch -p1 < ${./fixrefs.diff} 16 + ''; 17 + meta = { 18 + description = ''Simple Theorem Prover''; 19 + maintainers = with stdenv.lib.maintainers; [mornfall]; 20 + platforms = with stdenv.lib.platforms; linux; 21 + license = with stdenv.lib.licenses; mit; 22 + }; 23 + }
+45
pkgs/applications/science/logic/stp/fixbuild.diff
··· 1 + diff --git a/src/libstp/CMakeLists.txt b/src/libstp/CMakeLists.txt 2 + index 83bd03a..9c0304b 100644 3 + --- a/src/libstp/CMakeLists.txt 4 + +++ b/src/libstp/CMakeLists.txt 5 + @@ -23,6 +23,15 @@ set(stp_lib_targets 6 + printer 7 + ) 8 + 9 + +include_directories(${CMAKE_SOURCE_DIR}/src/AST/) 10 + +include_directories(${CMAKE_BINARY_DIR}/src/AST/) 11 + + 12 + +add_library(globalstp OBJECT 13 + + ../main/Globals.cpp 14 + + ${CMAKE_CURRENT_BINARY_DIR}/../main/GitSHA1.cpp 15 + +) 16 + +add_dependencies(globalstp ASTKind_header) 17 + + 18 + # Create list of objects and gather list of 19 + # associated public headers. 20 + set(stp_lib_objects "") 21 + @@ -31,6 +40,7 @@ foreach(target ${stp_lib_targets}) 22 + list(APPEND stp_lib_objects $<TARGET_OBJECTS:${target}>) 23 + 24 + get_target_property(TARGETS_PUBLIC_HEADERS ${target} PUBLIC_HEADER) 25 + + set_target_properties(${target} PROPERTIES POSITION_INDEPENDENT_CODE ON) 26 + if (EXISTS "${TARGETS_PUBLIC_HEADERS}") 27 + list(APPEND stp_public_headers "${TARGETS_PUBLIC_HEADERS}") 28 + message("Adding public header(s) ${TARGETS_PUBLIC_HEADERS} to target libstp") 29 + diff --git a/src/main/CMakeLists.txt b/src/main/CMakeLists.txt 30 + index 0735137..73039f5 100644 31 + --- a/src/main/CMakeLists.txt 32 + +++ b/src/main/CMakeLists.txt 33 + @@ -3,12 +3,6 @@ include_directories(${CMAKE_BINARY_DIR}/src/AST/) 34 + 35 + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/GitSHA1.cpp.in" "${CMAKE_CURRENT_BINARY_DIR}/GitSHA1.cpp" @ONLY) 36 + 37 + -add_library(globalstp OBJECT 38 + - Globals.cpp 39 + - ${CMAKE_CURRENT_BINARY_DIR}/GitSHA1.cpp 40 + -) 41 + -add_dependencies(globalstp ASTKind_header) 42 + - 43 + # ----------------------------------------------------------------------------- 44 + # Create binary 45 + # -----------------------------------------------------------------------------
+192
pkgs/applications/science/logic/stp/fixrefs.diff
··· 1 + commit 53b6043e25b2eba264faab845077fbf6736cf22f 2 + Author: Petr Rockai <me@mornfall.net> 3 + Date: Tue Jan 7 13:30:07 2014 +0100 4 + 5 + aig: Comment out unused functions with undefined references in them. 6 + 7 + diff --git a/src/extlib-abc/aig/aig/aigPart.c b/src/extlib-abc/aig/aig/aigPart.c 8 + index a4cc116..5bd5f08 100644 9 + --- a/src/extlib-abc/aig/aig/aigPart.c 10 + +++ b/src/extlib-abc/aig/aig/aigPart.c 11 + @@ -869,6 +869,7 @@ Vec_Ptr_t * Aig_ManMiterPartitioned( Aig_Man_t * p1, Aig_Man_t * p2, int nPartSi 12 + SeeAlso [] 13 + 14 + ***********************************************************************/ 15 + +#if 0 16 + Aig_Man_t * Aig_ManChoicePartitioned( Vec_Ptr_t * vAigs, int nPartSize ) 17 + { 18 + extern int Cmd_CommandExecute( void * pAbc, char * sCommand ); 19 + @@ -981,6 +982,7 @@ Aig_Man_t * Aig_ManChoicePartitioned( Vec_Ptr_t * vAigs, int nPartSize ) 20 + Aig_ManMarkValidChoices( pAig ); 21 + return pAig; 22 + } 23 + +#endif 24 + 25 + 26 + //////////////////////////////////////////////////////////////////////// 27 + diff --git a/src/extlib-abc/aig/aig/aigShow.c b/src/extlib-abc/aig/aig/aigShow.c 28 + index ae8fa8b..f04eedc 100644 29 + --- a/src/extlib-abc/aig/aig/aigShow.c 30 + +++ b/src/extlib-abc/aig/aig/aigShow.c 31 + @@ -326,6 +326,7 @@ void Aig_WriteDotAig( Aig_Man_t * pMan, char * pFileName, int fHaig, Vec_Ptr_t * 32 + SeeAlso [] 33 + 34 + ***********************************************************************/ 35 + +#if 0 36 + void Aig_ManShow( Aig_Man_t * pMan, int fHaig, Vec_Ptr_t * vBold ) 37 + { 38 + extern void Abc_ShowFile( char * FileNameDot ); 39 + @@ -347,7 +348,7 @@ void Aig_ManShow( Aig_Man_t * pMan, int fHaig, Vec_Ptr_t * vBold ) 40 + // visualize the file 41 + Abc_ShowFile( FileNameDot ); 42 + } 43 + - 44 + +#endif 45 + 46 + //////////////////////////////////////////////////////////////////////// 47 + /// END OF FILE /// 48 + diff --git a/src/extlib-abc/aig/dar/darRefact.c b/src/extlib-abc/aig/dar/darRefact.c 49 + index d744b4f..23fc3d5 100644 50 + --- a/src/extlib-abc/aig/dar/darRefact.c 51 + +++ b/src/extlib-abc/aig/dar/darRefact.c 52 + @@ -340,6 +340,7 @@ printf( "\n" ); 53 + SeeAlso [] 54 + 55 + ***********************************************************************/ 56 + +#if 0 57 + int Dar_ManRefactorTryCuts( Ref_Man_t * p, Aig_Obj_t * pObj, int nNodesSaved, int Required ) 58 + { 59 + Vec_Ptr_t * vCut; 60 + @@ -428,6 +429,7 @@ int Dar_ManRefactorTryCuts( Ref_Man_t * p, Aig_Obj_t * pObj, int nNodesSaved, in 61 + } 62 + return p->GainBest; 63 + } 64 + +#endif 65 + 66 + /**Function************************************************************* 67 + 68 + @@ -461,6 +463,7 @@ int Dar_ObjCutLevelAchieved( Vec_Ptr_t * vCut, int nLevelMin ) 69 + SeeAlso [] 70 + 71 + ***********************************************************************/ 72 + +#if 0 73 + int Dar_ManRefactor( Aig_Man_t * pAig, Dar_RefPar_t * pPars ) 74 + { 75 + // Bar_Progress_t * pProgress; 76 + @@ -583,6 +586,7 @@ p->timeOther = p->timeTotal - p->timeCuts - p->timeEval; 77 + return 1; 78 + 79 + } 80 + +#endif 81 + 82 + //////////////////////////////////////////////////////////////////////// 83 + /// END OF FILE /// 84 + diff --git a/src/extlib-abc/aig/dar/darScript.c b/src/extlib-abc/aig/dar/darScript.c 85 + index e60df00..1b9c24f 100644 86 + --- a/src/extlib-abc/aig/dar/darScript.c 87 + +++ b/src/extlib-abc/aig/dar/darScript.c 88 + @@ -64,6 +64,7 @@ Aig_Man_t * Dar_ManRewriteDefault( Aig_Man_t * pAig ) 89 + SeeAlso [] 90 + 91 + ***********************************************************************/ 92 + +#if 0 93 + Aig_Man_t * Dar_ManRwsat( Aig_Man_t * pAig, int fBalance, int fVerbose ) 94 + //alias rwsat "st; rw -l; b -l; rw -l; rf -l" 95 + { 96 + @@ -108,7 +109,7 @@ Aig_Man_t * Dar_ManRwsat( Aig_Man_t * pAig, int fBalance, int fVerbose ) 97 + 98 + return pAig; 99 + } 100 + - 101 + +#endif 102 + 103 + /**Function************************************************************* 104 + 105 + @@ -121,6 +122,7 @@ Aig_Man_t * Dar_ManRwsat( Aig_Man_t * pAig, int fBalance, int fVerbose ) 106 + SeeAlso [] 107 + 108 + ***********************************************************************/ 109 + +#if 0 110 + Aig_Man_t * Dar_ManCompress( Aig_Man_t * pAig, int fBalance, int fUpdateLevel, int fVerbose ) 111 + //alias compress2 "b -l; rw -l; rwz -l; b -l; rwz -l; b -l" 112 + { 113 + @@ -180,6 +182,7 @@ Aig_Man_t * Dar_ManCompress( Aig_Man_t * pAig, int fBalance, int fUpdateLevel, i 114 + 115 + return pAig; 116 + } 117 + +#endif 118 + 119 + /**Function************************************************************* 120 + 121 + @@ -192,6 +195,7 @@ Aig_Man_t * Dar_ManCompress( Aig_Man_t * pAig, int fBalance, int fUpdateLevel, i 122 + SeeAlso [] 123 + 124 + ***********************************************************************/ 125 + +#if 0 126 + Aig_Man_t * Dar_ManCompress2( Aig_Man_t * pAig, int fBalance, int fUpdateLevel, int fVerbose ) 127 + //alias compress2 "b -l; rw -l; rf -l; b -l; rw -l; rwz -l; b -l; rfz -l; rwz -l; b -l" 128 + { 129 + @@ -285,6 +289,7 @@ Aig_Man_t * Dar_ManCompress2( Aig_Man_t * pAig, int fBalance, int fUpdateLevel, 130 + } 131 + return pAig; 132 + } 133 + +#endif 134 + 135 + /**Function************************************************************* 136 + 137 + @@ -297,6 +302,7 @@ Aig_Man_t * Dar_ManCompress2( Aig_Man_t * pAig, int fBalance, int fUpdateLevel, 138 + SeeAlso [] 139 + 140 + ***********************************************************************/ 141 + +#if 0 142 + Vec_Ptr_t * Dar_ManChoiceSynthesis( Aig_Man_t * pAig, int fBalance, int fUpdateLevel, int fVerbose ) 143 + //alias resyn "b; rw; rwz; b; rwz; b" 144 + //alias resyn2 "b; rw; rf; b; rw; rwz; b; rfz; rwz; b" 145 + @@ -311,6 +317,7 @@ Vec_Ptr_t * Dar_ManChoiceSynthesis( Aig_Man_t * pAig, int fBalance, int fUpdateL 146 + Vec_PtrPush( vAigs, pAig ); 147 + return vAigs; 148 + } 149 + +#endif 150 + 151 + /**Function************************************************************* 152 + 153 + diff --git a/src/extlib-abc/aig/kit/kitAig.c b/src/extlib-abc/aig/kit/kitAig.c 154 + index de301f2..7e5df0f 100644 155 + --- a/src/extlib-abc/aig/kit/kitAig.c 156 + +++ b/src/extlib-abc/aig/kit/kitAig.c 157 + @@ -95,6 +95,7 @@ Aig_Obj_t * Kit_GraphToAig( Aig_Man_t * pMan, Aig_Obj_t ** pFanins, Kit_Graph_t 158 + SeeAlso [] 159 + 160 + ***********************************************************************/ 161 + +#if 0 162 + Aig_Obj_t * Kit_TruthToAig( Aig_Man_t * pMan, Aig_Obj_t ** pFanins, unsigned * pTruth, int nVars, Vec_Int_t * vMemory ) 163 + { 164 + Aig_Obj_t * pObj; 165 + @@ -113,6 +114,7 @@ Aig_Obj_t * Kit_TruthToAig( Aig_Man_t * pMan, Aig_Obj_t ** pFanins, unsigned * p 166 + Kit_GraphFree( pGraph ); 167 + return pObj; 168 + } 169 + +#endif 170 + 171 + //////////////////////////////////////////////////////////////////////// 172 + /// END OF FILE /// 173 + diff --git a/src/extlib-abc/aig/kit/kitGraph.c b/src/extlib-abc/aig/kit/kitGraph.c 174 + index 39ef587..0485c66 100644 175 + --- a/src/extlib-abc/aig/kit/kitGraph.c 176 + +++ b/src/extlib-abc/aig/kit/kitGraph.c 177 + @@ -349,6 +349,7 @@ unsigned Kit_GraphToTruth( Kit_Graph_t * pGraph ) 178 + SeeAlso [] 179 + 180 + ***********************************************************************/ 181 + +#if 0 182 + Kit_Graph_t * Kit_TruthToGraph( unsigned * pTruth, int nVars, Vec_Int_t * vMemory ) 183 + { 184 + Kit_Graph_t * pGraph; 185 + @@ -365,6 +366,7 @@ Kit_Graph_t * Kit_TruthToGraph( unsigned * pTruth, int nVars, Vec_Int_t * vMemor 186 + pGraph = Kit_SopFactor( vMemory, RetValue, nVars, vMemory ); 187 + return pGraph; 188 + } 189 + +#endif 190 + 191 + /**Function************************************************************* 192 +
+2
pkgs/top-level/all-packages.nix
··· 8711 8711 8712 8712 stalonetray = callPackage ../applications/window-managers/stalonetray {}; 8713 8713 8714 + stp = callPackage ../applications/science/logic/stp {}; 8715 + 8714 8716 stumpwm = lispPackages.stumpwm; 8715 8717 8716 8718 sublime = callPackage ../applications/editors/sublime { };