Commit 7169e8d5 authored by VIGNET Pierre's avatar VIGNET Pierre

Remove svn data

parent cc1f43c7
K 25
svn:wc:ra_dav:version-url
V 51
/svn/cadbiom/!svn/ver/198/sat/pycrypto/cmake_macros
END
FindOpenMP.cmake
K 25
svn:wc:ra_dav:version-url
V 68
/svn/cadbiom/!svn/ver/198/sat/pycrypto/cmake_macros/FindOpenMP.cmake
END
10
dir
674
https://scm.gforge.inria.fr/svn/cadbiom/sat/pycrypto/cmake_macros
https://scm.gforge.inria.fr/svn/cadbiom
2011-02-21T11:04:43.034861Z
198
leborgne
e6bb357a-1559-4ef0-aaf3-aa4d7140970a
FindOpenMP.cmake
file
2013-04-21T10:35:06.000000Z
c108f35bad56939bc8831ab1eb6d64be
2011-02-21T11:04:43.034861Z
198
leborgne
has-props
3274
# - Finds OpenMP support
# This module can be used to detect OpenMP support in a compiler.
# If the compiler supports OpenMP, the flags required to compile with
# openmp support are set.
#
# The following variables are set:
# OpenMP_C_FLAGS - flags to add to the C compiler for OpenMP support
# OpenMP_CXX_FLAGS - flags to add to the CXX compiler for OpenMP support
# OPENMP_FOUND - true if openmp is detected
#
# Supported compilers can be found at http://openmp.org/wp/openmp-compilers/
# Copyright 2008, 2009 <André Rigland Brodtkorb> Andre.Brodtkorb@ifi.uio.no
#
# Redistribution AND use is allowed according to the terms of the New
# BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
# Modified by Marc-Andre Gardner
# 31/07/2009
# Fix unset uses
include(CheckCSourceCompiles)
include(CheckCXXSourceCompiles)
include(FindPackageHandleStandardArgs)
set(OpenMP_C_FLAG_CANDIDATES
#Gnu
"-fopenmp"
#Microsoft Visual Studio
"/openmp"
#Intel windows
"-Qopenmp"
#Intel
"-openmp"
#Empty, if compiler automatically accepts openmp
" "
#Sun
"-xopenmp"
#HP
"+Oopenmp"
#IBM XL C/c++
"-qsmp"
#Portland Group
"-mp"
)
set(OpenMP_CXX_FLAG_CANDIDATES ${OpenMP_C_FLAG_CANDIDATES})
# sample openmp source code to test
set(OpenMP_C_TEST_SOURCE
"
#include <omp.h>
int main() {
#ifdef _OPENMP
return 0;
#else
breaks_on_purpose
#endif
}
")
# use the same source for CXX as C for now
set(OpenMP_CXX_TEST_SOURCE ${OpenMP_C_TEST_SOURCE})
# if these are set then do not try to find them again,
# by avoiding any try_compiles for the flags
if(DEFINED OpenMP_C_FLAGS AND DEFINED OpenMP_CXX_FLAGS)
set(OpenMP_C_FLAG_CANDIDATES)
set(OpenMP_CXX_FLAG_CANDIDATES)
endif(DEFINED OpenMP_C_FLAGS AND DEFINED OpenMP_CXX_FLAGS)
# check c compiler
foreach(FLAG ${OpenMP_C_FLAG_CANDIDATES})
set(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
set(CMAKE_REQUIRED_FLAGS "${FLAG}")
set(OpenMP_FLAG_DETECTED)
message(STATUS "Try OpenMP C flag = [${FLAG}]")
check_c_source_compiles("${OpenMP_CXX_TEST_SOURCE}" OpenMP_FLAG_DETECTED)
set(CMAKE_REQUIRED_FLAGS "${SAFE_CMAKE_REQUIRED_FLAGS}")
if(OpenMP_FLAG_DETECTED)
set(OpenMP_C_FLAGS_INTERNAL "${FLAG}")
break()
endif(OpenMP_FLAG_DETECTED)
endforeach(FLAG ${OpenMP_C_FLAG_CANDIDATES})
# check cxx compiler
foreach(FLAG ${OpenMP_CXX_FLAG_CANDIDATES})
set(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
set(CMAKE_REQUIRED_FLAGS "${FLAG}")
set(OpenMP_FLAG_DETECTED)
message(STATUS "Try OpenMP CXX flag = [${FLAG}]")
check_cxx_source_compiles("${OpenMP_C_TEST_SOURCE}" OpenMP_FLAG_DETECTED)
set(CMAKE_REQUIRED_FLAGS "${SAFE_CMAKE_REQUIRED_FLAGS}")
if(OpenMP_FLAG_DETECTED)
set(OpenMP_CXX_FLAGS_INTERNAL "${FLAG}")
break()
endif(OpenMP_FLAG_DETECTED)
endforeach(FLAG ${OpenMP_CXX_FLAG_CANDIDATES})
set(OpenMP_C_FLAGS "${OpenMP_C_FLAGS_INTERNAL}"
CACHE STRING "C compiler flags for OpenMP parallization")
set(OpenMP_CXX_FLAGS "${OpenMP_CXX_FLAGS_INTERNAL}"
CACHE STRING "C++ compiler flags for OpenMP parallization")
# handle the standard arguments for find_package
find_package_handle_standard_args(OpenMP DEFAULT_MSG
OpenMP_C_FLAGS OpenMP_CXX_FLAGS )
mark_as_advanced(
OpenMP_C_FLAGS
OpenMP_CXX_FLAGS
)
K 25
svn:wc:ra_dav:version-url
V 43
/svn/cadbiom/!svn/ver/198/sat/pycrypto/docs
END
10
dir
674
https://scm.gforge.inria.fr/svn/cadbiom/sat/pycrypto/docs
https://scm.gforge.inria.fr/svn/cadbiom
2011-02-21T11:04:43.034861Z
198
leborgne
e6bb357a-1559-4ef0-aaf3-aa4d7140970a
K 25
svn:wc:ra_dav:version-url
V 50
/svn/cadbiom/!svn/ver/530/sat/pycrypto/src/Binding
END
CryptoMS.cpp
K 25
svn:wc:ra_dav:version-url
V 63
/svn/cadbiom/!svn/ver/530/sat/pycrypto/src/Binding/CryptoMS.cpp
END
CryptoMS.h
K 25
svn:wc:ra_dav:version-url
V 61
/svn/cadbiom/!svn/ver/530/sat/pycrypto/src/Binding/CryptoMS.h
END
CryptoMS.i
K 25
svn:wc:ra_dav:version-url
V 61
/svn/cadbiom/!svn/ver/530/sat/pycrypto/src/Binding/CryptoMS.i
END
CMakeLists.txt
K 25
svn:wc:ra_dav:version-url
V 65
/svn/cadbiom/!svn/ver/198/sat/pycrypto/src/Binding/CMakeLists.txt
END
10
dir
674
https://scm.gforge.inria.fr/svn/cadbiom/sat/pycrypto/src/Binding
https://scm.gforge.inria.fr/svn/cadbiom
2012-09-13T14:53:59.725987Z
530
leborgne
e6bb357a-1559-4ef0-aaf3-aa4d7140970a
CryptoMS.cpp
file
2013-04-21T10:35:06.000000Z
d503036b8cadc09ad32b1bacd14e013a
2012-09-13T14:53:59.725987Z
530
leborgne
has-props
15672
tests
dir
CryptoMS.h
file
2013-04-21T10:35:06.000000Z
9a1c1d607cd3aa91c9e70eadf1f002a1
2012-09-13T14:53:59.725987Z
530
leborgne
has-props
1907
CryptoMS.i
file
2013-04-21T10:35:06.000000Z
4e4fb33028fd9ced2cb640c726c99640
2012-09-13T14:53:59.725987Z
530
leborgne
has-props
1308
CMakeLists.txt
file
2013-04-21T10:35:06.000000Z
4d6c17e90b1ec8521bbf9dca17907e0d
2011-02-21T11:04:43.034861Z
198
leborgne
has-props
909
# for binding
add_subdirectory(tests)
set(CMAKE_C_COMPILER /usr/bin/g++)
#add_definitions( -g -Wall -fopenmp -MD -MP -MF -O2)
#ADD_LIBRARY(CryptoMS SHARED CryptoMS.cpp )
# cmake use swig
find_package(SWIG REQUIRED)
include(${SWIG_USE_FILE})
find_package(PythonLibs)
include_directories(${PYTHON_INCLUDE_PATH})
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../Solver)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../mtl)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../MTRand)
set(CMAKE_SWIG_FLAGS "-c++")
set(CMAKE_SWIG_OUTDIR ${PROJECT_DIR})
set_source_files_properties(CryptoMS.i PROPERTIES CPLUSPLUS ON)
set_source_files_properties(CryptoMS.i PROPERTIES SWIG_FLAGS "-includeall")
swig_add_module(pyCryptoMS python CryptoMS.i CryptoMS.cpp)
swig_link_libraries(pyCryptoMS ${PYTHON_LIBRARIES} CryptoSolv ${ZLIB_LIBRARY})
#ENABLE_TESTING()
/*****************************************************************************
MiniSat -- Copyright (c) 2003-2006, Niklas Een, Niklas Sorensson
CryptoMiniSat -- Copyright (c) 2009 Mate Soos
PyCryptoMS -- Copyright (c) 2011 Michel Le Borgne
Original code by MiniSat authors are under an MIT licence.
Modifications for CryptoMiniSat are under GPLv3 licence.
Modification for PyCryptoMS are under GPLv3 licence.
******************************************************************************/
#ifndef CRYPTOMS_H
#define CRYPTOMS_H
#include <string>
using std::string;
#include <vector>
//#ifndef DISABLE_ZLIB
//#include <zlib.h>
//#endif // DISABLE_ZLIB
#include "Solver.h"
class CryptoMS
{
public:
CryptoMS();
CryptoMS(std::vector<std::string> options);
~CryptoMS(void);
// management and statistiss
void set_options(std::vector<std::string> options);
void clear_solver();
void print_stats(); // for debug
void print_nb_clauses_vars(); // for debug
int nb_clauses();
int nb_vars();
// clauses loading
bool add_clause(std::vector<int> dim);
void read_in_a_file(const std::string& filename);
// problem solving
const std::vector<int> solve(void);
const std::vector<std::vector<int> > msolve(int max_nb_sol);
const std::vector<std::vector<int> > msolve_selected(int max_nr_of_solutions, std::vector<int> var_selected);
bool is_satisfiable();
private:
const char* has_prefix(const char*, const char* prefix);
void acc_models(const lbool ret);
void set_double_precision(const uint32_t verbosity);
int correct_return_value(const lbool ret) const;
SolverConf conf;
GaussConf gaussconfig;
Solver *solver;
std::vector<std::vector<int> > solutions;
};
//class for exceptions
class CryptoMSError{
public:
std::string message;
CryptoMSError();
CryptoMSError(char* _message);
CryptoMSError(std::string _message);
};
#endif //CRYPTOMS_H
%module pyCryptoMS
%include "typemaps.i"
%include "std_string.i"
%include "exception.i"
%include "std_vector.i"
%{
#include "CryptoMS.h"
%}
// Instantiate templates used by example
namespace std {
%template(IntVector) vector<int>;
%template(IntVectorVector) vector<vector<int> >;
%template(StringVector)vector<string>;
}
%exception {
try {
$function;
}
catch (CryptoMSError e)
{
PyErr_SetString(PyExc_Exception, e.message.c_str());
return NULL;
}
}
class CryptoMS
{
public:
CryptoMS();
~CryptoMS(void);
// management and statistisc
void set_options(std::vector<std::string> options);
void clear_solver();
void print_stats(); // for debug
void print_nb_clauses_vars(); // for debug
int nb_clauses();
int nb_vars();
// clauses loading
bool add_clause(std::vector<int> dim);
void read_in_a_file(const std::string& filename);
// problem solving
const std::vector<int> solve(void);
const std::vector<std::vector<int> > msolve(int max_nb_sol);
const std::vector<std::vector<int> > msolve_selected(int max_nr_of_solutions, std::vector<int> var_selected);
bool is_satisfiable();
};
class CryptoMSError{
public:
std::string message;
CryptoMSError();
CryptoMSError(char* _message);
CryptoMSError(std::string _message);
};
K 25
svn:wc:ra_dav:version-url
V 56
/svn/cadbiom/!svn/ver/530/sat/pycrypto/src/Binding/tests
END
crypto_test.cpp
K 25
svn:wc:ra_dav:version-url
V 72
/svn/cadbiom/!svn/ver/530/sat/pycrypto/src/Binding/tests/crypto_test.cpp
END
test_solver.py
K 25
svn:wc:ra_dav:version-url
V 71
/svn/cadbiom/!svn/ver/530/sat/pycrypto/src/Binding/tests/test_solver.py
END
test_solver.cpp
K 25
svn:wc:ra_dav:version-url
V 72
/svn/cadbiom/!svn/ver/199/sat/pycrypto/src/Binding/tests/test_solver.cpp
END
CMakeLists.txt
K 25
svn:wc:ra_dav:version-url
V 71
/svn/cadbiom/!svn/ver/198/sat/pycrypto/src/Binding/tests/CMakeLists.txt
END