From a461b361793bd1ce6e46f074dcdfab3f79ffd468 Mon Sep 17 00:00:00 2001 From: Stephen L Arnold Date: Tue, 9 Nov 2021 18:37:48 -0800 Subject: [PATCH] new: dev: demonstrate tox/ci workflow options, cleanup build cfg * define HAVE_STRUCT_TIMESPEC and _XKEYCHECK_H on msvc * avoid LIBSTDCXX linking (msvc only), pass build config to all steps * add optional lto support; note clang lto requires llvm-config and lld * add llvm source-based coverage build, fix uninitialzed variable * update cmake-posix workflow configure, bin path, emulate in tox * add conda devenv file and workflow => use platform compilers and Ninja * update build instructions in readme file, cleanup tox/ci files Signed-off-by: Stephen L Arnold --- .github/workflows/build-posix-cmake.yml | 29 ++-- .github/workflows/build-posix.yml | 13 +- .github/workflows/build-windows.yml | 6 +- .github/workflows/ci.yml | 93 ++++++++---- .github/workflows/conda-dev.yml | 86 ++++++++++++ .github/workflows/win.yml | 1 + .gitignore | 1 - CMakeLists.txt | 115 ++++++++++++--- Makefile | 32 +++-- README.md | 87 +++++++++++- cmake/coverage.cmake | 125 +++++++++++++++++ environment.devenv.yml | 13 ++ src/aig/aig/CMakeLists.txt | 46 +++--- src/aig/gia/CMakeLists.txt | 179 ++++++++++++------------ src/aig/gia/giaKf.c | 2 +- src/aig/hop/CMakeLists.txt | 12 +- src/aig/ioa/CMakeLists.txt | 4 +- src/aig/ivy/CMakeLists.txt | 28 ++-- src/aig/saig/CMakeLists.txt | 38 ++--- src/base/abc/CMakeLists.txt | 34 ++--- src/base/abci/CMakeLists.txt | 124 ++++++++-------- src/base/acb/CMakeLists.txt | 10 +- src/base/bac/CMakeLists.txt | 22 +-- src/base/cba/CMakeLists.txt | 10 +- src/base/cmd/CMakeLists.txt | 10 +- src/base/cmd/cmdAuto.c | 2 +- src/base/cmd/cmdStarter.c | 2 +- src/base/exor/CMakeLists.txt | 6 +- src/base/io/CMakeLists.txt | 46 +++--- src/base/main/CMakeLists.txt | 19 +-- src/base/main/abcapis.h | 2 + src/base/pla/CMakeLists.txt | 10 +- src/base/ver/CMakeLists.txt | 4 +- src/base/wlc/CMakeLists.txt | 28 ++-- src/base/wlc/wlcPth.c | 2 +- src/base/wlc/wlcReadSmt.c | 2 +- src/base/wln/CMakeLists.txt | 11 +- src/bdd/bbr/CMakeLists.txt | 4 +- src/bdd/cudd/CMakeLists.txt | 100 ++++++------- src/bdd/dsd/CMakeLists.txt | 4 +- src/bdd/extrab/CMakeLists.txt | 16 +-- src/bdd/llb/CMakeLists.txt | 30 ++-- src/bdd/reo/CMakeLists.txt | 12 +- src/bool/bdc/CMakeLists.txt | 4 +- src/bool/dec/CMakeLists.txt | 6 +- src/bool/kit/CMakeLists.txt | 8 +- src/bool/lucky/CMakeLists.txt | 6 +- src/bool/rsb/CMakeLists.txt | 2 +- src/map/amap/CMakeLists.txt | 18 +-- src/map/cov/CMakeLists.txt | 6 +- src/map/fpga/CMakeLists.txt | 16 +-- src/map/if/CMakeLists.txt | 32 ++--- src/map/if/ifDsd.c | 2 +- src/map/if/ifTest.c | 2 +- src/map/mapper/CMakeLists.txt | 20 +-- src/map/mio/CMakeLists.txt | 8 +- src/map/mpm/CMakeLists.txt | 14 +- src/map/scl/CMakeLists.txt | 16 +-- src/map/super/CMakeLists.txt | 4 +- src/misc/bzlib/CMakeLists.txt | 10 +- src/misc/espresso/CMakeLists.txt | 60 ++++---- src/misc/extra/CMakeLists.txt | 22 +-- src/misc/mvc/CMakeLists.txt | 20 +-- src/misc/nm/CMakeLists.txt | 2 +- src/misc/tim/CMakeLists.txt | 4 +- src/misc/util/CMakeLists.txt | 6 +- src/misc/zlib/CMakeLists.txt | 20 +-- src/opt/cgt/CMakeLists.txt | 2 +- src/opt/csw/CMakeLists.txt | 2 +- src/opt/cut/CMakeLists.txt | 8 +- src/opt/dar/CMakeLists.txt | 8 +- src/opt/dau/CMakeLists.txt | 12 +- src/opt/fret/CMakeLists.txt | 4 +- src/opt/fsim/CMakeLists.txt | 2 +- src/opt/fxch/CMakeLists.txt | 2 +- src/opt/fxu/CMakeLists.txt | 10 +- src/opt/lpk/CMakeLists.txt | 12 +- src/opt/mfs/CMakeLists.txt | 8 +- src/opt/nwk/CMakeLists.txt | 18 +-- src/opt/res/CMakeLists.txt | 8 +- src/opt/ret/CMakeLists.txt | 10 +- src/opt/rwr/CMakeLists.txt | 8 +- src/opt/rwt/CMakeLists.txt | 2 +- src/opt/sbd/CMakeLists.txt | 10 +- src/opt/sfm/CMakeLists.txt | 12 +- src/opt/sim/CMakeLists.txt | 12 +- src/phys/place/CMakeLists.txt | 8 +- src/proof/abs/CMakeLists.txt | 22 +-- src/proof/abs/absPth.c | 6 +- src/proof/acec/CMakeLists.txt | 26 ++-- src/proof/cec/CMakeLists.txt | 25 ++-- src/proof/cec/cecSplit.c | 2 +- src/proof/dch/CMakeLists.txt | 10 +- src/proof/fra/CMakeLists.txt | 22 +-- src/proof/fraig/CMakeLists.txt | 16 +-- src/proof/int/CMakeLists.txt | 8 +- src/proof/int2/CMakeLists.txt | 4 +- src/proof/live/CMakeLists.txt | 12 +- src/proof/pdr/CMakeLists.txt | 14 +- src/proof/ssc/CMakeLists.txt | 2 +- src/proof/ssw/CMakeLists.txt | 26 ++-- src/sat/bmc/CMakeLists.txt | 46 +++--- src/sat/bmc/bmcBmcS.c | 2 +- src/sat/bsat/CMakeLists.txt | 20 +-- src/sat/bsat2/CMakeLists.txt | 8 +- src/sat/cnf/CMakeLists.txt | 10 +- src/sat/glucose/CMakeLists.txt | 8 +- src/sat/glucose2/CMakeLists.txt | 8 +- src/sat/msat/CMakeLists.txt | 18 +-- src/sat/satoko/CMakeLists.txt | 2 +- src/sat/xsat/CMakeLists.txt | 2 +- tox.ini | 71 +++++++--- 112 files changed, 1374 insertions(+), 902 deletions(-) create mode 100644 .github/workflows/conda-dev.yml create mode 100644 cmake/coverage.cmake create mode 100644 environment.devenv.yml diff --git a/.github/workflows/build-posix-cmake.yml b/.github/workflows/build-posix-cmake.yml index ea31fe0bc1..e27aa95459 100644 --- a/.github/workflows/build-posix-cmake.yml +++ b/.github/workflows/build-posix-cmake.yml @@ -1,4 +1,6 @@ -on: [push] +on: + workflow_dispatch: + push: jobs: @@ -9,6 +11,9 @@ jobs: use_namespace: [false, true] runs-on: ${{ matrix.os }} + defaults: + run: + shell: bash env: CMAKE_ARGS: ${{ matrix.use_namespace && '-DABC_USE_NAMESPACE=xxx' || '' }} @@ -20,7 +25,10 @@ jobs: - name: Git Checkout uses: actions/checkout@v2 with: - submodules: recursive + fetch-depth: 0 + + - name: Update CMake + uses: jwlawson/actions-setup-cmake@v1.8 - name: Install brew dependencies run: | @@ -33,8 +41,12 @@ jobs: if: ${{ !contains(matrix.os, 'macos') }} - name: Configure CMake - run: | - cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ${CMAKE_ARGS} -B build + run: > + cmake -S . -B build + -G Ninja + ${CMAKE_ARGS} + -DCMAKE_BUILD_TYPE=Release + -DCMAKE_INSTALL_PREFIX=./staging - name: Build CMake run: | @@ -42,7 +54,7 @@ jobs: - name: Test Executable run: | - ./build/abc -c "r i10.aig; b; ps; b; rw -l; rw -lz; b; rw -lz; b; ps; cec" + ./build/src/base/main/abc -c "r i10.aig; b; ps; b; rw -l; rw -lz; b; rw -lz; b; ps; cec" - name: Test Library run: | @@ -52,11 +64,10 @@ jobs: - name: Stage Executable run: | - mkdir staging - cp build/abc build/libabc.a staging/ + cmake --build build --target install - - name: Upload pacakge artifact + - name: Upload package artifact uses: actions/upload-artifact@v1 with: - name: package + name: package-${{ matrix.os }}-${{ matrix.use_namespace }} path: staging/ diff --git a/.github/workflows/build-posix.yml b/.github/workflows/build-posix.yml index aa97aca20c..760612e71c 100644 --- a/.github/workflows/build-posix.yml +++ b/.github/workflows/build-posix.yml @@ -1,4 +1,6 @@ -on: [push] +on: + workflow_dispatch: + push: jobs: @@ -29,12 +31,13 @@ jobs: - name: Install APT dependencies run: | - sudo apt install -y libreadline-dev + sudo apt-get -y -qq update + sudo apt-get install -y libreadline-dev if: ${{ !contains(matrix.os, 'macos') }} - name: Build Executable run: | - make -j3 ${MAKE_ARGS} abc + make -j3 ABC_USE_PIC=1 ${MAKE_ARGS} abc - name: Test Executable run: | @@ -55,8 +58,8 @@ jobs: mkdir staging cp abc libabc.a staging/ - - name: Upload pacakge artifact + - name: Upload package artifact uses: actions/upload-artifact@v1 with: - name: package + name: package-${{ matrix.os }}-${{ matrix.use_namespace }} path: staging/ diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 21cd1b26d5..89d7bf420d 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -1,4 +1,6 @@ -on: [push] +on: + workflow_dispatch: + push: jobs: @@ -41,7 +43,7 @@ jobs: copy _TEST/abc.exe staging/ copy UpgradeLog.htm staging/ - - name: Upload pacakge artifact + - name: Upload package artifact uses: actions/upload-artifact@v1 with: name: package diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e365685b38..89738ac311 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,7 @@ on: push: branches: - master + - develop paths-ignore: - '**.md' - '**.rst' @@ -22,22 +23,27 @@ jobs: strategy: fail-fast: false matrix: - python-version: [3.8] + python-version: [3.9] name: [ + windows-2019-cl, ubuntu-20.04-gcc, ubuntu-20.04-clang, - ubuntu-18.04-gcc, - macOS-10.15-gcc, - macOS-10.15-clang, + ubuntu-22.04-clang, + macOS-11-gcc, + macOS-11-clang, ] include: + - name: windows-2019-cl + os: windows-2019 + compiler: cl + - name: ubuntu-20.04-gcc os: ubuntu-20.04 compiler: gcc - version: "10" - toxcmd: build + version: "11" + toxcmd: soname,tests - name: ubuntu-20.04-clang os: ubuntu-20.04 @@ -45,23 +51,23 @@ jobs: version: "10" toxcmd: clang - - name: ubuntu-18.04-gcc - os: ubuntu-18.04 - compiler: gcc - version: "9" - toxcmd: abc,tests + - name: ubuntu-22.04-clang + os: ubuntu-22.04 + compiler: clang + version: "12" + toxcmd: build - - name: macOS-10.15-gcc - os: macOS-10.15 + - name: macOS-11-gcc + os: macOS-11 compiler: gcc version: "11" - toxcmd: ctest + toxcmd: abc,tests - - name: macOS-10.15-clang - os: macOS-10.15 + - name: macOS-11-clang + os: macOS-11 compiler: xcode - version: "12.3" - toxcmd: clang + version: "12.4" + toxcmd: "base Xcode" steps: - uses: actions/checkout@v2 @@ -72,6 +78,9 @@ jobs: with: python-version: ${{ matrix.python-version }} + - name: Update CMake + uses: jwlawson/actions-setup-cmake@v1.8 + - name: Install Tox run: | python -m pip install --upgrade pip @@ -82,12 +91,12 @@ jobs: run: | sudo apt-get -y -qq update sudo apt-get install -y libreadline-dev ncurses-dev - if [ "${{ matrix.compiler }}" = "gcc" ]; then + if [ "${{ matrix.compiler }}" = gcc ]; then sudo apt-get install -y g++-${{ matrix.version }} g++-${{ matrix.version }}-multilib echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV else - sudo apt-get install -y clang-${{ matrix.version }} g++-multilib + sudo apt-get install -y clang-${{ matrix.version }} llvm-${{ matrix.version }} lld-${{ matrix.version }} g++-multilib echo "CC=clang-${{ matrix.version }}" >> $GITHUB_ENV echo "CXX=clang++-${{ matrix.version }}" >> $GITHUB_ENV fi @@ -97,27 +106,59 @@ jobs: env: CC: ${{ env.CC }} CXX: ${{ env.CXX }} + PREFIX: ../staging run: | tox -e ${{ matrix.toxcmd }} + - uses: actions/upload-artifact@v2 + if: matrix.name == 'ubuntu-20.04-clang' + with: + name: src_coverage_data + path: | + build/coverage/html + build/coverage/lcov.info + - name: Install and setup MacOS packages if: runner.os == 'macOS' run: | - if [ "${{ matrix.compiler }}" = "gcc" ]; then + if [ "${{ matrix.compiler }}" = gcc ]; then brew install gcc@${{ matrix.version }} echo "CC=gcc-${{ matrix.version }}" >> $GITHUB_ENV echo "CXX=g++-${{ matrix.version }}" >> $GITHUB_ENV else ls -ls /Applications/ sudo xcode-select -switch /Applications/Xcode_${{ matrix.version }}.app - echo "CC=clang-${{ matrix.version }}" >> $GITHUB_ENV - echo "CXX=clang++-${{ matrix.version }}" >> $GITHUB_ENV fi - name: Build and test MacOS if: runner.os == 'macOS' + run: | + if [ "${{ matrix.compiler }}" = gcc ]; then + CC=${{ env.CC }} CXX=${{ env.CXX }} tox -e ${{ matrix.toxcmd }} + else + tox -e ${{ matrix.toxcmd }} + fi + + - name: Configure Windows + if: runner.os == 'Windows' + run: > + cmake -S . -B build + -DBUILD_SHARED_LIBS=ON + -DABC_USE_NO_PTHREADS=ON + -DABC_USE_NO_READLINE=ON + -DCMAKE_BUILD_TYPE=Release + -DCMAKE_INSTALL_PREFIX=${{ env.PREFIX }} env: - CC: ${{ env.CC }} - CXX: ${{ env.CXX }} + CC: cl + CXX: cl + PREFIX: staging + + - name: Build Windows + if: runner.os == 'Windows' + run: cmake --build build --config Release -j 2 --target install + + - name: Test Windows + if: runner.os == 'Windows' run: | - tox -e ${{ matrix.toxcmd }} + ctest -V -C Release --test-dir build/ + ls -lh staging/ || true diff --git a/.github/workflows/conda-dev.yml b/.github/workflows/conda-dev.yml new file mode 100644 index 0000000000..6e7c6379c3 --- /dev/null +++ b/.github/workflows/conda-dev.yml @@ -0,0 +1,86 @@ +name: CondaDev + +on: + workflow_dispatch: + pull_request: + push: + branches: + - master + - develop + +jobs: + build: + name: abc ${{ matrix.python-version }} ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + python-version: ['3.9'] + use_namespace: [false, true] + include: + - os: 'ubuntu-22.04' + generator: 'Ninja' + build_type: 'Release' + - os: 'ubuntu-20.04' + generator: 'Ninja' + build_type: 'RelWithDebInfo' + - os: 'macOS-11' + generator: 'Ninja' + build_type: 'Release' + - os: 'windows-2019' + generator: 'Ninja' + build_type: 'Release' + extra_args: '-DABC_USE_NO_PTHREADS=ON -DABC_USE_NO_READLINE=ON' + env: + OS: ${{ matrix.os }} + PYTHON: ${{ matrix.python-version }} + PYTHONIOENCODING: utf-8 + CMAKE_ARGS: ${{ matrix.use_namespace && '-DABC_USE_NAMESPACE=xxx' || '' }} + + steps: + - uses: actions/checkout@v2 + + - name: Setup base python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + + - name: Cache conda + id: cache + uses: actions/cache@v2 + env: + # Increase this value to reset cache if environment.devenv.yml has not changed + CACHE_NUMBER: 1 + with: + path: ~/conda_pkgs_dir + key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('environment.devenv.yml') }} + + - uses: conda-incubator/setup-miniconda@v2 + with: + auto-update-conda: true + python-version: ${{ matrix.python-version }} + channels: conda-forge + channel-priority: strict + use-only-tar-bz2: true + + - name: Configure condadev environment + shell: bash -l {0} + env: + PY_VER: ${{ matrix.python-version }} + run: | + conda config --set always_yes yes --set changeps1 no + conda config --add channels conda-forge + conda install conda-devenv=2.1.1 + conda devenv + + - name: Build and test + shell: bash -l {0} + env: + PY_VER: ${{ matrix.python-version }} + run: | + source activate abc-test + ctest --build-generator "${{ matrix.generator }}" \ + --build-and-test . build \ + --build-options ${CMAKE_ARGS} ${{ matrix.extra_args }} \ + -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ + --test-command ctest --rerun-failed --output-on-failure -V diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml index 39c2972029..855fd6820c 100644 --- a/.github/workflows/win.yml +++ b/.github/workflows/win.yml @@ -6,6 +6,7 @@ on: push: branches: - master + - develop jobs: msys2-build: diff --git a/.gitignore b/.gitignore index f15ce2c79e..c26667e4f7 100644 --- a/.gitignore +++ b/.gitignore @@ -57,5 +57,4 @@ tags /arch_flags -/cmake /cscope diff --git a/CMakeLists.txt b/CMakeLists.txt index 18ca6e62b0..9b6b02e57a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,7 @@ -cmake_minimum_required(VERSION 3.3.0 FATAL_ERROR) +cmake_minimum_required(VERSION 3.10.0) + +# Add cmake modules of this project to the module path +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) # with at least one base tag, this can have dynamic (git) versioning: # git describe last tag = 1.1.0 @@ -40,13 +43,35 @@ include(CMakeParseArguments) include(CTest) include(GNUInstallDirs) +# LTO requires cmake min version 3.9 and clang LTO requires lld +if(ABC_ENABLE_LTO AND CMAKE_BUILD_TYPE MATCHES "Release") + if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + find_package(LLVM CONFIG) + endif() + + include(CheckIPOSupported) + check_ipo_supported(RESULT ipo_supported OUTPUT error) + + if(ipo_supported) + message(STATUS "IPO / LTO supported") + set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) + else() + message(WARNING "IPO / LTO not supported: <${error}>") + endif() +endif() + + set(ABC_USE_NAMESPACE "" CACHE STRING "ABC namespace") option(ABC_USE_STDINT_H "Use C99 stdint.h header for platform-dependent types") option(ABC_USE_NO_CUDD "Compile CUDD with ABC") option(ABC_USE_NO_READLINE "Whether to use libreadline") -option(ABC_USE_NO_PTHREADS "Whether to compile with thread support") +option(ABC_USE_NO_PTHREADS "Whether to compile with pthread support") option(ABC_USE_PIC "Whether to compile into position independent code") option(ABC_USE_LIBSTDCXX "Link explicitly to stdc++") +option(ABC_USE_SONAME "Set library soname") +option(BUILD_TESTING "Build and run tests" ON) +option(COVERAGE_BUILD "Enable source-based LLVM code coverage" OFF) +option(ABC_SKIP_EXE "Skip building executable (build libs only)" OFF) add_library(abc_interface INTERFACE) @@ -85,6 +110,14 @@ set(ABC_MODULES src/aig/miniaig ) +if(NOT ABC_SKIP_EXE) + message(STATUS "Building abc main executable") + set(BUILD_MAIN_EXE + TRUE + CACHE BOOL "Building executable" FORCE + ) +endif() + file(GLOB "src/ext*" ABC_EXTERNAL_MODULES) if(ABC_EXTERNAL_MODULES) @@ -99,9 +132,7 @@ target_include_directories( $ ) -target_link_libraries(abc_interface - INTERFACE ${CMAKE_DL_LIBS} -) +target_link_libraries(abc_interface INTERFACE ${CMAKE_DL_LIBS}) if(NOT ABC_USE_NO_CUDD) message(STATUS "Compiling with CUDD") @@ -113,7 +144,7 @@ endif() if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.6.0")) target_compile_options(abc_interface - INTERFACE -Wno-unused-but-set-variable + INTERFACE -fno-aggressive-loop-optimizations -Wno-unused-but-set-variable ) endif() @@ -137,6 +168,8 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") "_MBCS" "_SCL_SECURE_NO_WARNINGS" "_CRT_SECURE_NO_WARNINGS" + "HAVE_STRUCT_TIMESPEC" + "_XKEYCHECK_H" ) endif() if(WIN32) @@ -259,8 +292,11 @@ if(NOT ABC_USE_NO_PTHREADS) if(NOT ABC_PTHREAD_INCLUDES OR NOT ABC_PTHREAD_LIBRARIES) message(FATAL_ERROR "Could not find pthread") endif() - target_include_directories(abc_interface INTERFACE "${ABC_PTHREAD_INCLUDES}") - target_link_libraries(abc_interface INTERFACE "${ABC_PTHREAD_LIBRARIES}") + target_include_directories( + abc_interface + INTERFACE $ + ) + target_link_libraries(abc_interface INTERFACE ${ABC_PTHREAD_LIBRARIES}) else() set(CMAKE_THREAD_PREFER_PTHREAD ON) set(THREADS_PREFER_PTHREAD_FLAG ON) @@ -277,10 +313,12 @@ if(ABC_USE_PIC) endif() if(ABC_USE_LIBSTDCXX OR NOT ABC_USE_NAMESPACE) - message(STATUS "Using explicit -lstdc++") - target_link_libraries(abc_interface - INTERFACE stdc++ - ) + if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") + message(STATUS "Using explicit -lstdc++") + target_link_libraries(abc_interface + INTERFACE stdc++ + ) + endif() endif() define_property(GLOBAL @@ -345,15 +383,17 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") endif() if(BUILD_SHARED_LIBS) - set_target_properties( - libabc PROPERTIES VERSION ${LIBRARY_VERSION} - SOVERSION ${LIBRARY_SOVERSION} - WINDOWS_EXPORT_ALL_SYMBOLS TRUE - ) + if(ABC_USE_SONAME) + set_target_properties( + libabc PROPERTIES VERSION ${LIBRARY_VERSION} + SOVERSION ${LIBRARY_SOVERSION} + WINDOWS_EXPORT_ALL_SYMBOLS TRUE + ) + endif() endif() install(FILES ${ABC_HEADERS} - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/abc + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/abc ) install( @@ -375,11 +415,40 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") endif() endif() -enable_testing() -add_test(NAME base_i10 - COMMAND abc -c "r i10.aig; b; ps; b; rw -l; rw -lz; b; rw -lz; b; ps; cec" - WORKING_DIRECTORY "${abc_SOURCE_DIR}" -) +if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + if(ABC_ENABLE_LTO AND ipo_supported) + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=lld") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fuse-ld=lld") + endif() +endif() + +if(BUILD_TESTING) + set(test_SRCS src/demo.c) + if(ABC_USE_NAMESPACE) + set_source_files_properties(${test_SRCS} PROPERTIES LANGUAGE CXX) + endif() + add_executable(base_test ${test_SRCS}) + target_link_libraries(base_test PUBLIC libabc) + + enable_testing() + add_test(NAME base_test + COMMAND base_test i10.aig + WORKING_DIRECTORY "${abc_SOURCE_DIR}" + ) + + # Add source-based llvm code coverage targets. + # Note this requires recent clang/llvm tooling. + if(COVERAGE_BUILD) + add_test(NAME main_test + COMMAND abc -c "r i10.aig; b; ps; b; rw -l; rw -lz; b; rw -lz; b; ps; cec" + WORKING_DIRECTORY "${abc_SOURCE_DIR}" + ) + + include(coverage) + add_coverage(abc) + add_coverage(base_test) + endif() +endif() add_custom_target(etags etags ${LIBABC_SOURCES} ${ABC_SOURCES} diff --git a/Makefile b/Makefile index 2a48a26864..553b0850c8 100644 --- a/Makefile +++ b/Makefile @@ -167,7 +167,7 @@ CXXFLAGS += $(CFLAGS) $(info $(MSG_PREFIX)Using CXXFLAGS=$(CXXFLAGS)) SRC := -GARBAGE := core core.* *.stackdump ./tags $(PROG) demo arch_flags result.blif +GARBAGE := core core.* *.stackdump ./tags $(PROG) demo* arch_flags result.blif .PHONY: all default tags clean docs cmake_info @@ -180,7 +180,6 @@ OBJ := \ $(patsubst %.y, %.o, $(filter %.y, $(SRC))) LIBOBJ := $(filter-out src/base/main/main.o,$(OBJ)) -MAINOBJ := src/base/main/main.o DEMOOBJ := src/demo.o DEP := $(OBJ:.o=.d) @@ -226,32 +225,35 @@ clean: tags: etags `find . -type f -regex '.*\.\(c\|h\)'` -lib: lib$(PROG).so.$(VERSION) - -test: demo - ./demo i10.aig - -demo: $(DEMOOBJ) lib$(PROG).a - @echo "$(MSG_PREFIX)\`\` Linking binary:" $(notdir $@) - +$(VERBOSE)$(LD) -o $@ $(DEMOOBJ) lib$(PROG).a $(LDFLAGS) $(DLIBS) $(LIBS) +test: $(PROG) + ./abc -c "r i10.aig; b; ps; b; rw -l; rw -lz; b; rw -lz; b; ps; cec" -$(PROG): $(MAINOBJ) lib$(PROG).so - @echo "$(MSG_PREFIX)\`\` Linking binary:" $(notdir $@) - +$(VERBOSE)$(LD) -o $@ $(MAINOBJ) -L. -l$(PROG) $(LDFLAGS) $(LIBS) +$(PROG): $(OBJ) + @echo "$(MSG_PREFIX)\`\` Building binary:" $(notdir $@) + $(VERBOSE)$(LD) -o $@ $^ $(LDFLAGS) $(LIBS) lib$(PROG).a: $(LIBOBJ) @echo "$(MSG_PREFIX)\`\` Linking:" $(notdir $@) $(VERBOSE)$(AR) rsv $@ $? +ifdef ABC_USE_SONAME +lib: lib$(PROG).so.$(VERSION) + lib$(PROG).so.$(VERSION): $(LIBOBJ) @echo "$(MSG_PREFIX)\`\` Linking:" $(notdir $@) +$(VERBOSE)$(LD) -shared -Wl,-soname=$(SONAME) -o $@ $^ $(LIBS) - -lib$(PROG).so: lib$(PROG).so.$(VERSION) ldconfig -v -n . @$(LN) -sf lib$(PROG).so.$(VERSION) lib$(PROG).so @$(LN) -sf lib$(PROG).so.$(VERSION) $(SONAME) +else +lib: lib$(PROG).so + +lib$(PROG).so: $(LIBOBJ) + @echo "$(MSG_PREFIX)\`\` Linking:" $(notdir $@) + +$(VERBOSE)$(LD) -shared -o $@ $^ $(LIBS) +endif + docs: @echo "$(MSG_PREFIX)\`\` Building documentation." $(notdir $@) $(VERBOSE)doxygen doxygen.conf diff --git a/README.md b/README.md index 358f5ce9a1..d63ee8fae1 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,84 @@ +# ABC: System for Sequential Logic Synthesis and Formal Verification + +[![ci](https://github.com/sarnold/abc-fork/actions/workflows/ci.yml/badge.svg)](https://github.com/sarnold/abc-fork/actions/workflows/ci.yml) +[![msystem](https://github.com/sarnold/abc-fork/actions/workflows/win.yml/badge.svg)](https://github.com/sarnold/abc-fork/actions/workflows/win.yml) +[![CondaDev](https://github.com/sarnold/abc-fork/actions/workflows/conda-dev.yml/badge.svg)](https://github.com/sarnold/abc-fork/actions/workflows/conda-dev.yml) + [![.github/workflows/build-posix.yml](https://github.com/berkeley-abc/abc/actions/workflows/build-posix.yml/badge.svg)](https://github.com/berkeley-abc/abc/actions/workflows/build-posix.yml) [![.github/workflows/build-windows.yml](https://github.com/berkeley-abc/abc/actions/workflows/build-windows.yml/badge.svg)](https://github.com/berkeley-abc/abc/actions/workflows/build-windows.yml) [![.github/workflows/build-posix-cmake.yml](https://github.com/berkeley-abc/abc/actions/workflows/build-posix-cmake.yml/badge.svg)](https://github.com/berkeley-abc/abc/actions/workflows/build-posix-cmake.yml) -# ABC: System for Sequential Logic Synthesis and Formal Verification +## Requirements: + + * A recent toolchain for your platform: GNU/Clang/Xcode, MSVC/MSYS + * Make and/or CMake/Ninja: the latter can be installed via Tox + +Optional: + + * libstdc++ + * readline/ncurses + * pthreads + * If using Tox, a recent Python for your platform + * If using Conda, install `conda-devenv` and use the `environment.devenv.yml` file + +ABC can be built in multiple ways on each platform; see the github workflow +files for specific build methods and tools/packages. The easiest (local) build +workflow is to install a toolchain, make utilities, and Tox using your system +package manager; you *can* build from source on MacOS/Windows using the usual +developer tools, ie, Apple Xcode or Windows Visual Studio tools (as shown in +the `ci.yml` workflow and `tox.ini` files). + +For non-Linux platforms, if you don't have tools installed yet, an (extra) +package manager should be used to install GNU tools and dependencies. Note +this is exactly what the Github workflow runners use: + + * Windows: `Chocolatey` or `MSYS2` + * MacOS: `brew` -ABC is always changing but the current snapshot is believed to be stable. +### Build and test with Tox -## Compiling: +With at least Python 3.6 installed, install [![tox](tox)](https://github.com/tox-dev/tox) -To compile ABC as a binary, download and unzip the code, then type `make`. +After cloning the repository, you can run the current tests using either +cmake or (just) make with the `tox` command. Tox will build a virtual +python environment with most of the build dependencies (except the shared +libraries above) and then run the tests. For cmake plus a simple unittest, +run something like the following: + + $ git clone https://github.com/berkeley-abc/abc.git + $ cd abc/ + $ tox -e ctest + +Note for some Tox targets, eg `demo` and `clang`, both `CC` and `CXX` should +either be set in the shell environment or passed on the command line, eg: + + $ CC=gcc CXX=g++ tox -e abc,demo --or-- + $ CC=clang CXX=clang++ tox -e clang + +There are several `tox -e` environment commands available in the current tox file: + +* Make-based args: + * `abc` - run make build => abc executable and static lib + * `soname` - run make build => shared lib with soname + * `tests` - build/run abc executable as simple test + * `demo` - build/run demo executable against static lib using make +* CMake-based args: + * `base` - run cmake Release build with namespace and staging dir install + * `build` - run cmake Debug build with shared libs, namespace, soname, LTO + * `clang` - run cmake RelWithDebInfo build with clang/LLVM source coverage, namespace, static lib + * `ctest` - build/run tests using ctest => static lib and "test" executable + * `grind` - run cmake Debug build with valgrind +* Misc utility commands: + * `clean` - clean the make build files + * `unbuild` - clean the cmake build/ directory/files + * `lint` - run cpplint style checks + +### Compiling manually: + +To compile ABC as a binary, clone/download and unzip the code, then type `make`. To compile ABC as a static library, type `make libabc.a`. +To compile ABC as a shared library, type `make lib`. +To compile ABC as a shared library with soname, type `ABC_USE_SONAME=1 make lib`. When ABC is used as a static library, two additional procedures, `Abc_Start()` and `Abc_Stop()`, are provided for starting and quitting the ABC framework in @@ -62,7 +131,15 @@ The current version of ABC can be compiled with C compiler or C++ compiler. * Compile the code as position-independent by adding `ABC_USE_PIC=1`. * Build the `libabc.so` target: - make ABC_USE_PIC=1 libabc.so + make ABC_USE_PIC=1 lib + +## Adding new source files + +For each module with new sources: + + * Add new source files to the corresponding `module.make` file + * Run `tools/mk-cmakelists.py` and then `git diff` to review changes + * Make sure new object files exist in your build ## Bug reporting: diff --git a/cmake/coverage.cmake b/cmake/coverage.cmake new file mode 100644 index 0000000000..57829c2df4 --- /dev/null +++ b/cmake/coverage.cmake @@ -0,0 +1,125 @@ +option(COVERAGE_TEXT "Show text summary of the coverage" OFF) +option(COVERAGE_LCOV "Export coverage data in lcov trace file" ON) +option(COVERAGE_HTML "Detailed html report of the coverage" ON) + +set(COVERAGE_EXCLUDE_REGEX "(lib/)") +set(COVERAGE_PATH ${PROJECT_BINARY_DIR}/coverage) + +if(COVERAGE_BUILD) + message( + STATUS + "Source coverage is enabled. TEXT=${COVERAGE_TEXT}, LCOV=${COVERAGE_LCOV}, HTML=${COVERAGE_HTML}" + ) + + find_package(LLVM REQUIRED CONFIG) + get_filename_component(LLVM_PREFIX "${LLVM_DIR}" DIRECTORY) + message(STATUS "Found llvm directory: ${LLVM_PREFIX}") + + find_program( + LLVM_COV_PATH + NAMES llvm-cov + HINTS ${LLVM_PREFIX} + PATH_SUFFIXES bin + ) + find_program( + LLVM_PROFDATA_PATH + NAMES llvm-profdata + HINTS ${LLVM_PREFIX} + PATH_SUFFIXES bin + ) + + if(LLVM_COV_PATH AND LLVM_PROFDATA_PATH) + set(ABC_HAVE_LLVM_COVERAGE_TOOLS TRUE) + + message(STATUS "Found llvm-cov: ${LLVM_COV_PATH}") + message(STATUS "Found llvm-profdata: ${LLVM_PROFDATA_PATH}") + else() + message(FATAL_ERROR "llvm-cov stack required for coverage!") + endif() + + set(CMAKE_C_FLAGS + "${CMAKE_C_FLAGS} -fprofile-instr-generate -fcoverage-mapping" + ) + set(CMAKE_CXX_FLAGS + "${CMAKE_CXX_FLAGS} -fprofile-instr-generate -fcoverage-mapping" + ) + + set(COVERAGE_TARGETS ${COVERAGE_PATH}/targets.list) + set(COVERAGE_PROFDATA ${COVERAGE_PATH}/all.profdata) + mark_as_advanced(COVERAGE_TARGETS COVERAGE_PROFDATA) +endif() + +function(add_coverage TARGET) + if(NOT COVERAGE_BUILD) + return() + endif() + + if(NOT TARGET coverage) + add_custom_target( + coverage-clear + COMMAND ${CMAKE_COMMAND} -E rm -rf ${COVERAGE_PATH} + COMMAND ${CMAKE_COMMAND} -E make_directory ${COVERAGE_PATH} + ) + + add_custom_target( + coverage-profdata + COMMAND + ${CMAKE_COMMAND} -E env + LLVM_PROFILE_FILE="${COVERAGE_PATH}/test_%p.profraw" + ${CMAKE_CTEST_COMMAND} ${CMAKE_CTEST_ARGUMENTS} + COMMAND ${LLVM_PROFDATA_PATH} merge -sparse + ${COVERAGE_PATH}/*.profraw -o ${COVERAGE_PROFDATA} + WORKING_DIRECTORY ${PROJECT_BINARY_DIR} + ) + + add_custom_target(coverage) + + if(COVERAGE_TEXT) + add_custom_target( + coverage-text + COMMAND + ${LLVM_COV_PATH} report `cat ${COVERAGE_TARGETS}` + -instr-profile=${COVERAGE_PROFDATA} + -ignore-filename-regex="${COVERAGE_EXCLUDE_REGEX}" + DEPENDS coverage-profdata + ) + add_dependencies(coverage coverage-text) + endif() + + if(COVERAGE_HTML) + add_custom_target( + coverage-html + COMMAND + ${LLVM_COV_PATH} show `cat ${COVERAGE_TARGETS}` + -instr-profile=${COVERAGE_PROFDATA} + -show-line-counts-or-regions + -output-dir=${COVERAGE_PATH}/html -format="html" + -ignore-filename-regex="${COVERAGE_EXCLUDE_REGEX}" + DEPENDS coverage-profdata + ) + add_dependencies(coverage coverage-html) + endif() + + if(COVERAGE_LCOV) + add_custom_target( + coverage-lcov + COMMAND + ${LLVM_COV_PATH} export `cat ${COVERAGE_TARGETS}` + -format="lcov" -instr-profile=${COVERAGE_PROFDATA} + -ignore-filename-regex="${COVERAGE_EXCLUDE_REGEX}" > + ${COVERAGE_PATH}/lcov.info + DEPENDS coverage-profdata + ) + add_dependencies(coverage coverage-lcov) + endif() + endif() + + add_custom_target( + coverage-${TARGET} + COMMAND ${CMAKE_COMMAND} -E echo "-object=$" >> + ${COVERAGE_TARGETS} + DEPENDS coverage-clear + ) + add_dependencies(coverage-profdata coverage-${TARGET}) + +endfunction() diff --git a/environment.devenv.yml b/environment.devenv.yml new file mode 100644 index 0000000000..a1d25367bf --- /dev/null +++ b/environment.devenv.yml @@ -0,0 +1,13 @@ +name: abc-test + +dependencies: + - python ={{ get_env("PY_VER", default="3.9") }} + - cmake>=3.18 + - ninja + - c-compiler + - cxx-compiler + - make # [unix] + - readline=8.1 # [unix] + - zlib + - libpng + - dirent # [win] diff --git a/src/aig/aig/CMakeLists.txt b/src/aig/aig/CMakeLists.txt index 544a97338e..1db00e8266 100644 --- a/src/aig/aig/CMakeLists.txt +++ b/src/aig/aig/CMakeLists.txt @@ -1,35 +1,35 @@ abc_libabc_add_sources( NAME aig_aig SOURCES - aigRet.c - aigDup.c - aigPack.c - aigSplit.c - aigRetF.c - aigObj.c + aigCuts.c aigCheck.c - aigPartReg.c - aigTsim.c - aigJust.c - aigTiming.c - aigScl.c - aigTable.c - aigWin.c - aigShow.c - aigFanout.c + aigUtil.c aigOper.c - aigMffc.c - aigFrames.c aigMem.c + aigTable.c + aigMffc.c + aigInter.c + aigRepr.c + aigPack.c aigOrder.c + aigWin.c + aigRetF.c + aigSplit.c + aigPartSat.c + aigScl.c + aigDup.c aigPart.c - aigUtil.c aigCanon.c - aigDfs.c + aigPartReg.c + aigShow.c + aigFrames.c + aigJust.c + aigObj.c aigTruth.c - aigCuts.c - aigPartSat.c - aigRepr.c + aigTsim.c + aigRet.c + aigFanout.c + aigDfs.c + aigTiming.c aigMan.c - aigInter.c ) diff --git a/src/aig/gia/CMakeLists.txt b/src/aig/gia/CMakeLists.txt index cb6421cb29..916941dc6b 100644 --- a/src/aig/gia/CMakeLists.txt +++ b/src/aig/gia/CMakeLists.txt @@ -1,110 +1,115 @@ abc_libabc_add_sources( NAME aig_gia SOURCES - giaSplit.c - giaHash.c - giaIso.c + giaRetime.c + giaCCof.c + giaSupp.c + giaEsop.c + giaCSatOld.c + giaPf.c + giaOf.c + giaDup.c + giaCTas.c + giaShrink.c giaSweeper.c - giaSim2.c - giaSupMin.c - giaSweep.c - giaCSat2.c - giaSatLut.c + giaIso.c + giaAigerExt.c giaKf.c - giaMini.c - giaCSat3.c - giaPat.c - giaDeep.c + giaQbf.c + giaUnate.c + giaBalLut.c + giaCone.c + giaSim2.c + giaFront.c + giaBalAig.c + giaTis.c giaAig.c - giaSatoko.c + giaSat3.c + giaSimBase.c giaGen.c giaMfs.c - giaReshape1.c - giaClp.c - giaUtil.c - giaGig.c - giaTruth.c - giaTsim.c - giaTim.c - giaShrink.c - giaSatMap.c - giaDfs.c - giaAgi.c - giaExist.c - giaMem.c - giaSwitch.c - giaSim.c - giaCut.c - giaShow.c - giaFalse.c - giaOf.c - giaBalLut.c - giaCof.c + giaIso2.c + giaCex.c + giaTtopt.cpp + giaScript.c + giaIf.c + giaReshape2.c + giaSatLut.c giaStr.c - giaPat2.c + giaMini.c + giaAgi.c + giaSif.c + giaFanout.c + giaTsim.c + giaSatSyn.c giaBalMap.c - giaMinLut.c - giaEmbed.c - giaSupps.c - giaAigerExt.c + giaFrames.c + giaExist.c + giaEra.c + giaSplit.c giaIiff.c - giaResub2.c - giaAiger.c - giaIff.c - giaRetime.c - giaGlitch.c - giaResub3.c - giaStg.c + giaEquiv.c + giaShow.c giaMan.c + giaHash.c + giaPat.c + giaIso3.c + giaFx.c + giaScl.c + giaResub6.c giaResub.c - giaFront.c - giaEra.c - giaPf.c - giaQbf.c - giaBidec.c - giaCex.c - giaCCof.c - giaDup.c - giaPack.c - giaEnable.c - giaCSat.c + giaSatLE.c + giaMuxes.c + giaTruth.c + giaGlitch.c giaSatEdge.c - giaSpeedup.c - giaSimBase.c - giaBalAig.c - giaFrames.c - giaScl.c - giaSupp.c - giaShrink7.c - giaFanout.c - giaEsop.c - giaSat3.c - giaForce.c - giaEra2.c giaSort.c - giaFx.c - giaSatLE.c - giaEquiv.c - giaIso2.c + giaFalse.c + giaResub2.c + giaGig.c giaMinLut2.c + giaBidec.c + giaSupps.c + giaSatMap.c + giaStg.c + giaEnable.c + giaCof.c + giaReshape1.c + giaMf.c + giaPack.c + giaSim.c + giaCSatP.c + giaUtil.c + giaDeep.c + giaRex.c + giaCSat3.c + giaEra2.c + giaIff.c + giaSpeedup.c + giaAiger.c gia.c + giaDfs.c + giaShrink7.c + giaMem.c + giaSupMin.c + giaStoch.c giaJf.c - giaNf.c - giaIf.c - giaScript.c + giaSatoko.c + giaResub3.c + giaCSat.c + giaTim.c giaEdge.c giaShrink6.c - giaIso3.c - giaMuxes.c giaLf.c - giaCSatOld.c - giaRex.c - giaMf.c - giaStoch.c - giaTis.c - giaCTas.c - giaCone.c - giaReshape2.c - giaUnate.c giaDecs.c + giaSwitch.c + giaForce.c + giaMinLut.c + giaCut.c + giaNf.c + giaCSat2.c + giaPat2.c + giaClp.c + giaEmbed.c + giaSweep.c ) diff --git a/src/aig/gia/giaKf.c b/src/aig/gia/giaKf.c index a823f72621..a023c34ee7 100644 --- a/src/aig/gia/giaKf.c +++ b/src/aig/gia/giaKf.c @@ -23,7 +23,7 @@ #ifdef ABC_USE_PTHREADS -#ifdef _WIN32 +#ifdef _MSC_VER #include "../lib/pthread.h" #else #include diff --git a/src/aig/hop/CMakeLists.txt b/src/aig/hop/CMakeLists.txt index 1db86faf3c..0e51ac19a9 100644 --- a/src/aig/hop/CMakeLists.txt +++ b/src/aig/hop/CMakeLists.txt @@ -1,14 +1,14 @@ abc_libabc_add_sources( NAME aig_hop SOURCES - hopUtil.c - hopOper.c - hopMem.c hopDfs.c - hopTruth.c + hopUtil.c + hopObj.c + hopCheck.c hopBalance.c hopTable.c - hopCheck.c - hopObj.c + hopOper.c + hopMem.c hopMan.c + hopTruth.c ) diff --git a/src/aig/ioa/CMakeLists.txt b/src/aig/ioa/CMakeLists.txt index 040b8625c8..c547a36b6c 100644 --- a/src/aig/ioa/CMakeLists.txt +++ b/src/aig/ioa/CMakeLists.txt @@ -1,7 +1,7 @@ abc_libabc_add_sources( NAME aig_ioa SOURCES - ioaWriteAig.c - ioaReadAig.c ioaUtil.c + ioaReadAig.c + ioaWriteAig.c ) diff --git a/src/aig/ivy/CMakeLists.txt b/src/aig/ivy/CMakeLists.txt index 4a70d8697b..2d341be20f 100644 --- a/src/aig/ivy/CMakeLists.txt +++ b/src/aig/ivy/CMakeLists.txt @@ -1,26 +1,26 @@ abc_libabc_add_sources( NAME aig_ivy SOURCES - ivyBalance.c ivyDsd.c - ivyCanon.c - ivyHaig.c - ivyCheck.c - ivyUtil.c + ivyBalance.c + ivyRwr.c + ivyMan.c ivyDfs.c - ivyObj.c + ivyShow.c ivyCutTrav.c + ivyHaig.c ivyFanout.c - ivyShow.c - ivySeq.c - ivyMem.c + ivyResyn.c + ivyFastMap.c + ivyObj.c + ivyCheck.c + ivyUtil.c ivyCut.c + ivyMulti.c + ivySeq.c ivyOper.c ivyFraig.c - ivyRwr.c - ivyMan.c - ivyResyn.c - ivyMulti.c - ivyFastMap.c ivyTable.c + ivyCanon.c + ivyMem.c ) diff --git a/src/aig/saig/CMakeLists.txt b/src/aig/saig/CMakeLists.txt index 01625652db..f881487197 100644 --- a/src/aig/saig/CMakeLists.txt +++ b/src/aig/saig/CMakeLists.txt @@ -1,30 +1,30 @@ abc_libabc_add_sources( NAME aig_saig SOURCES - saigRetStep.c - saigSwitch.c - saigStrSim.c - saigMiter.c - saigConstr2.c - saigConstr.c - saigWnd.c - saigScl.c + saigIsoSlow.c + saigIoa.c + saigInd.c saigCone.c + saigSynch.c + saigWnd.c + saigDual.c + saigConstr.c + saigRetStep.c + saigTempor.c + saigIsoFast.c saigIso.c saigRetFwd.c + saigSimSeq.c saigSimFast.c - saigInd.c - saigDual.c - saigDup.c - saigTrans.c - saigSynch.c - saigIsoFast.c - saigIsoSlow.c saigOutDec.c - saigTempor.c - saigPhase.c - saigSimSeq.c + saigMiter.c saigSimMv.c + saigTrans.c + saigSwitch.c + saigConstr2.c saigRetMin.c - saigIoa.c + saigStrSim.c + saigPhase.c + saigScl.c + saigDup.c ) diff --git a/src/base/abc/CMakeLists.txt b/src/base/abc/CMakeLists.txt index e255c3300f..325293df30 100644 --- a/src/base/abc/CMakeLists.txt +++ b/src/base/abc/CMakeLists.txt @@ -1,27 +1,27 @@ abc_libabc_add_sources( NAME base_abc SOURCES - abcCheck.c - abcHieCec.c + abcFanio.c + abcNames.c + abcHieGia.c abcHie.c - abcLib.c - abcLatch.c abcNtk.c - abcFunc.c - abcFanOrder.c - abcObj.c - abcBarBuf.c + abcMinBase.c + abcHieNew.c abcBlifMv.c - abcAig.c - abcRefs.c - abcNetlist.c + abcHieCec.c + abcCheck.c abcUtil.c abcDfs.c - abcHieNew.c - abcFanio.c - abcNames.c - abcShow.c + abcFunc.c abcSop.c - abcMinBase.c - abcHieGia.c + abcAig.c + abcNetlist.c + abcLatch.c + abcBarBuf.c + abcRefs.c + abcObj.c + abcFanOrder.c + abcShow.c + abcLib.c ) diff --git a/src/base/abci/CMakeLists.txt b/src/base/abci/CMakeLists.txt index be4f3ac226..8ffcbb7eee 100644 --- a/src/base/abci/CMakeLists.txt +++ b/src/base/abci/CMakeLists.txt @@ -1,80 +1,80 @@ abc_libabc_add_sources( NAME base_abci SOURCES - abcBalance.c + abcFx.c abcLutmin.c - abcLut.c - abcRunGen.c - abcSense.c - abcPart.c - abcDec.c - abcMulti.c + abcMap.c + abcExtract.c + abcBm.c + abcOrder.c + abcUnate.c abcQbf.c - abcRewrite.c - abcReconv.c - abcRr.c - abcCut.c + abcMulti.c + abcIvy.c + abcLog.c + abcCollapse.c + abcMerge.c + abcFxu.c + abcLut.c abcReach.c + abcCas.c + abcRpo.c + abcRec3.c abcSymm.c - abcSweep.c - abcDsd.c + abcDebug.c + abcScorr.c + abcEco.c + abcResub.c + abcReconv.c + abcIf.c + abcGen.c + abcTim.c + abcRestruct.c + abcExact.c + abcNtbdd.c + abcReorder.c + abcDress.c + abcHaig.c + abcQuant.c + abcDress3.c abcDress2.c - abcStrash.c + abcIfMux.c + abcDec.c + abcNpnSave.c + abcRr.c + abcAttach.c + abcNpn.c abcOdc.c - abcUnreach.c - abcRestruct.c - abc.c - abcMfs.c - abcGen.c + abcStrash.c + abcMini.c abcSaucy.c - abcHaig.c + abcDsd.c abcSpeedup.c - abcCas.c - abcDebug.c - abcRpo.c - abcExtract.c - abcDar.c + abcRewrite.c + abcMfs.c + abcDetect.c + abcBidec.c + abcFraig.c + abcMiter.c + abcPrint.c + abcSat.c abcXsim.c - abcReorder.c - abcEco.c - abcExact.c - abcIfif.c - abcCascade.c - abcBm.c - abcBmc.c abcRefactor.c - abcResub.c - abcIvy.c - abcFx.c - abcMap.c - abcDetect.c - abcMini.c - abcMerge.c - abcRec3.c + abcRunGen.c + abc.c + abcBalance.c + abcCascade.c + abcRenode.c + abcSweep.c + abcIfif.c abcProve.c + abcUnreach.c + abcBmc.c abcVerify.c - abcFxu.c - abcRenode.c - abcLog.c - abcDress.c + abcCut.c + abcPart.c abcTiming.c - abcOrder.c - abcBidec.c - abcSat.c - abcIf.c - abcPrint.c - abcUnate.c - abcFraig.c - abcScorr.c - abcMiter.c - abcTim.c - abcCollapse.c - abcAttach.c - abcNpn.c - abcDress3.c - abcNpnSave.c - abcIfMux.c - abcNtbdd.c - abcQuant.c + abcDar.c + abcSense.c abcAuto.c ) diff --git a/src/base/acb/CMakeLists.txt b/src/base/acb/CMakeLists.txt index 5d63a9bf83..1576b7687c 100644 --- a/src/base/acb/CMakeLists.txt +++ b/src/base/acb/CMakeLists.txt @@ -1,13 +1,13 @@ abc_libabc_add_sources( NAME base_acb SOURCES - acbTest.c - acbFunc.c - acbAbc.c acbCom.c + acbSets.c + acbAbc.c acbMfs.c acbAig.c - acbUtil.c - acbSets.c acbPush.c + acbTest.c + acbUtil.c + acbFunc.c ) diff --git a/src/base/bac/CMakeLists.txt b/src/base/bac/CMakeLists.txt index 74925d1834..36b6d7c7a4 100644 --- a/src/base/bac/CMakeLists.txt +++ b/src/base/bac/CMakeLists.txt @@ -1,19 +1,19 @@ abc_libabc_add_sources( NAME base_bac SOURCES - bacWriteVer.c - bacReadSmt.c - bacPrsTrans.c - bacPtr.c - bacBlast.c - bacReadVer.c + bacWriteBlif.c + bacBac.c + bacWriteSmt.c bacReadBlif.c - bacPtrAbc.c + bacReadSmt.c bacCom.c - bacWriteSmt.c - bacNtk.c - bacBac.c bacPrsBuild.c + bacPrsTrans.c bacLib.c - bacWriteBlif.c + bacPtrAbc.c + bacNtk.c + bacReadVer.c + bacPtr.c + bacWriteVer.c + bacBlast.c ) diff --git a/src/base/cba/CMakeLists.txt b/src/base/cba/CMakeLists.txt index 4a06959f45..befac34d35 100644 --- a/src/base/cba/CMakeLists.txt +++ b/src/base/cba/CMakeLists.txt @@ -1,12 +1,12 @@ abc_libabc_add_sources( NAME base_cba SOURCES - cbaBlast.c - cbaWriteBlif.c cbaNtk.c - cbaReadVer.c - cbaWriteVer.c - cbaReadBlif.c cbaCba.c cbaCom.c + cbaWriteVer.c + cbaBlast.c + cbaWriteBlif.c + cbaReadBlif.c + cbaReadVer.c ) diff --git a/src/base/cmd/CMakeLists.txt b/src/base/cmd/CMakeLists.txt index 834faf0a56..64d2799714 100644 --- a/src/base/cmd/CMakeLists.txt +++ b/src/base/cmd/CMakeLists.txt @@ -1,14 +1,14 @@ abc_libabc_add_sources( NAME base_cmd SOURCES + cmdHist.c cmd.c - cmdAuto.c + cmdUtils.c cmdStarter.c - cmdPlugin.c + cmdAuto.c cmdApi.c - cmdUtils.c - cmdAlias.c - cmdHist.c + cmdPlugin.c cmdLoad.c cmdFlag.c + cmdAlias.c ) diff --git a/src/base/cmd/cmdAuto.c b/src/base/cmd/cmdAuto.c index 8151c2e534..ecbe094362 100644 --- a/src/base/cmd/cmdAuto.c +++ b/src/base/cmd/cmdAuto.c @@ -29,7 +29,7 @@ #ifdef ABC_USE_PTHREADS -#ifdef _WIN32 +#ifdef _MSC_VER #include "../lib/pthread.h" #else #include diff --git a/src/base/cmd/cmdStarter.c b/src/base/cmd/cmdStarter.c index ffb2b75220..8176b47b4f 100644 --- a/src/base/cmd/cmdStarter.c +++ b/src/base/cmd/cmdStarter.c @@ -27,7 +27,7 @@ #ifdef ABC_USE_PTHREADS -#ifdef _WIN32 +#ifdef _MSC_VER #include "../lib/pthread.h" #else #include diff --git a/src/base/exor/CMakeLists.txt b/src/base/exor/CMakeLists.txt index 0db3a82cb9..1b557068d6 100644 --- a/src/base/exor/CMakeLists.txt +++ b/src/base/exor/CMakeLists.txt @@ -1,10 +1,10 @@ abc_libabc_add_sources( NAME base_exor SOURCES - exorLink.c exorList.c - exorCubes.c exorBits.c - exor.c + exorCubes.c exorUtil.c + exor.c + exorLink.c ) diff --git a/src/base/io/CMakeLists.txt b/src/base/io/CMakeLists.txt index 0198a6ec06..118c9f9d94 100644 --- a/src/base/io/CMakeLists.txt +++ b/src/base/io/CMakeLists.txt @@ -2,34 +2,34 @@ abc_libabc_add_sources( NAME base_io SOURCES ioReadAiger.c - ioWriteBlif.c - ioWriteBblif.c - ioWriteList.c + ioWriteGml.c + ioReadBlif.c + ioReadBlifMv.c + io.c + ioWriteBook.c + ioWriteBlifMv.c + ioReadEqn.c + ioReadBlifAig.c + ioWriteVerilog.c + ioReadPlaMo.c ioWritePla.c + ioWriteBaf.c + ioWriteBench.c + ioReadEdif.c ioJson.c - ioReadBench.c - ioWriteSmv.c - ioReadBlifAig.c - ioReadVerilog.c ioReadPla.c - ioReadBblif.c + ioWriteList.c + ioWriteEqn.c + ioUtil.c + ioReadBench.c ioWriteCnf.c - ioReadPlaMo.c + ioWriteBlif.c ioReadBaf.c - ioWriteAiger.c - ioWriteBook.c - ioReadBlif.c - ioReadBlifMv.c - ioWriteVerilog.c - ioWriteGml.c - ioWriteBlifMv.c - ioWriteEqn.c ioWriteDot.c - ioWriteBaf.c - ioReadEdif.c + ioReadVerilog.c + ioReadBblif.c + ioWriteSmv.c ioReadDsd.c - ioWriteBench.c - ioReadEqn.c - io.c - ioUtil.c + ioWriteAiger.c + ioWriteBblif.c ) diff --git a/src/base/main/CMakeLists.txt b/src/base/main/CMakeLists.txt index 4c5e9ae5c1..77c52564f1 100644 --- a/src/base/main/CMakeLists.txt +++ b/src/base/main/CMakeLists.txt @@ -9,15 +9,18 @@ abc_libabc_add_sources( mainUtils.c ) -abc_add_executable( - NAME abc - SOURCES - main.c -) +if(BUILD_MAIN_EXE) + abc_add_executable( + NAME abc + SOURCES + main.c + ) + + install(TARGETS abc + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + ) +endif() -install(TARGETS abc - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" -) if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") install(FILES $ DESTINATION bin OPTIONAL) endif() diff --git a/src/base/main/abcapis.h b/src/base/main/abcapis.h index d34306bafe..9bbbe1738b 100644 --- a/src/base/main/abcapis.h +++ b/src/base/main/abcapis.h @@ -57,6 +57,7 @@ typedef struct Abc_Frame_t_ Abc_Frame_t; #define ABC_DLL ABC_DLLIMPORT #endif +#pragma GCC visibility push(default) //////////////////////////////////////////////////////////////////////// /// FUNCTION DECLARATIONS /// //////////////////////////////////////////////////////////////////////// @@ -109,6 +110,7 @@ extern ABC_DLL void * Abc_FrameReadCex( Abc_Frame_t * pAbc ); // procedure to return sequential equivalences extern ABC_DLL int * Abc_FrameReadMiniAigEquivClasses( Abc_Frame_t * pAbc ); +#pragma GCC visibility pop ABC_NAMESPACE_HEADER_END #endif diff --git a/src/base/pla/CMakeLists.txt b/src/base/pla/CMakeLists.txt index b7ed90098b..982ab09501 100644 --- a/src/base/pla/CMakeLists.txt +++ b/src/base/pla/CMakeLists.txt @@ -1,11 +1,11 @@ abc_libabc_add_sources( NAME base_pla SOURCES - plaCom.c - plaWrite.c - plaSimple.c plaMerge.c - plaMan.c - plaHash.c plaRead.c + plaSimple.c + plaWrite.c + plaHash.c + plaMan.c + plaCom.c ) diff --git a/src/base/ver/CMakeLists.txt b/src/base/ver/CMakeLists.txt index 34272103a1..76cd3f567e 100644 --- a/src/base/ver/CMakeLists.txt +++ b/src/base/ver/CMakeLists.txt @@ -1,8 +1,8 @@ abc_libabc_add_sources( NAME base_ver SOURCES - verCore.c - verStream.c verFormula.c verParse.c + verStream.c + verCore.c ) diff --git a/src/base/wlc/CMakeLists.txt b/src/base/wlc/CMakeLists.txt index de2efee12f..0002d18251 100644 --- a/src/base/wlc/CMakeLists.txt +++ b/src/base/wlc/CMakeLists.txt @@ -1,23 +1,23 @@ abc_libabc_add_sources( NAME base_wlc SOURCES - wlcMem.c - wlcStdin.c + wlcBlast.c wlcAbs.c - wlcSim.c - wlcCom.c - wlcAbs2.c + wlcPth.c + wlcGraft.c + wlcShow.c wlcReadSmt.c - wlcReadVer.c + wlcUif.c + wlcStdin.c + wlcCom.c wlcJson.c - wlcWin.c + wlcNtk.c + wlcNdr.c + wlcSim.c + wlcReadVer.c + wlcMem.c + wlcAbs2.c wlcAbc.c - wlcPth.c - wlcBlast.c - wlcUif.c + wlcWin.c wlcWriteVer.c - wlcGraft.c - wlcNdr.c - wlcNtk.c - wlcShow.c ) diff --git a/src/base/wlc/wlcPth.c b/src/base/wlc/wlcPth.c index ddafab23ca..364f857cda 100644 --- a/src/base/wlc/wlcPth.c +++ b/src/base/wlc/wlcPth.c @@ -23,7 +23,7 @@ #ifdef ABC_USE_PTHREADS -#ifdef _WIN32 +#ifdef _MSC_VER #include "../lib/pthread.h" #else #include diff --git a/src/base/wlc/wlcReadSmt.c b/src/base/wlc/wlcReadSmt.c index 768ceb3ee8..9a44f01fba 100644 --- a/src/base/wlc/wlcReadSmt.c +++ b/src/base/wlc/wlcReadSmt.c @@ -548,7 +548,7 @@ static inline char * Smt_GetHexFromDecimalString(char * pStr) for (k=0;k diff --git a/src/map/if/ifTest.c b/src/map/if/ifTest.c index fa9a644437..626cb9a6e6 100644 --- a/src/map/if/ifTest.c +++ b/src/map/if/ifTest.c @@ -23,7 +23,7 @@ #ifdef ABC_USE_PTHREADS -#ifdef _WIN32 +#ifdef _MSC_VER #include "../lib/pthread.h" #else #include diff --git a/src/map/mapper/CMakeLists.txt b/src/map/mapper/CMakeLists.txt index 665145bd98..21a7465424 100644 --- a/src/map/mapper/CMakeLists.txt +++ b/src/map/mapper/CMakeLists.txt @@ -1,21 +1,21 @@ abc_libabc_add_sources( NAME map_mapper SOURCES - mapperTable.c - mapperTime.c mapperRefs.c - mapperSuper.c + mapperTime.c + mapperLib.c + mapperTable.c mapper.c + mapperUtils.c + mapperCutUtils.c + mapperTree.c + mapperTruth.c mapperCreate.c mapperSwitch.c mapperCore.c - mapperCanon.c - mapperTruth.c - mapperUtils.c - mapperLib.c + mapperCut.c mapperVec.c - mapperTree.c - mapperCutUtils.c + mapperSuper.c mapperMatch.c - mapperCut.c + mapperCanon.c ) diff --git a/src/map/mio/CMakeLists.txt b/src/map/mio/CMakeLists.txt index 72d5e71ad9..c727791989 100644 --- a/src/map/mio/CMakeLists.txt +++ b/src/map/mio/CMakeLists.txt @@ -1,11 +1,11 @@ abc_libabc_add_sources( NAME map_mio SOURCES - mioSop.c mioParse.c - mioFunc.c mioRead.c - mioApi.c - mioUtils.c mio.c + mioUtils.c + mioSop.c + mioApi.c + mioFunc.c ) diff --git a/src/map/mpm/CMakeLists.txt b/src/map/mpm/CMakeLists.txt index 6ca6eab7ce..80b8eedeee 100644 --- a/src/map/mpm/CMakeLists.txt +++ b/src/map/mpm/CMakeLists.txt @@ -1,15 +1,15 @@ abc_libabc_add_sources( NAME map_mpm SOURCES - mpmMan.c + mpmUtil.c + mpmAbc.c + mpmPre.c mpmDsd.c - mpmLib.c mpmMig.c - mpmUtil.c - mpmTruth.c + mpmGates.c + mpmMan.c mpmMap.c + mpmLib.c mpmCore.c - mpmGates.c - mpmPre.c - mpmAbc.c + mpmTruth.c ) diff --git a/src/map/scl/CMakeLists.txt b/src/map/scl/CMakeLists.txt index 5e95dbf1c4..196bf147be 100644 --- a/src/map/scl/CMakeLists.txt +++ b/src/map/scl/CMakeLists.txt @@ -1,15 +1,15 @@ abc_libabc_add_sources( NAME map_scl SOURCES - sclLiberty.c - sclLibScl.c - sclBuffer.c - sclLibUtil.c + sclLoad.c scl.c - sclUpsize.c - sclBufSize.c sclSize.c - sclUtil.c - sclLoad.c sclDnsize.c + sclLibUtil.c + sclUpsize.c + sclUtil.c + sclLibScl.c + sclBufSize.c + sclBuffer.c + sclLiberty.c ) diff --git a/src/map/super/CMakeLists.txt b/src/map/super/CMakeLists.txt index 97828f5a50..f827cecf65 100644 --- a/src/map/super/CMakeLists.txt +++ b/src/map/super/CMakeLists.txt @@ -1,7 +1,7 @@ abc_libabc_add_sources( NAME map_super SOURCES - superGate.c - superAnd.c super.c + superAnd.c + superGate.c ) diff --git a/src/misc/bzlib/CMakeLists.txt b/src/misc/bzlib/CMakeLists.txt index 0f45852e56..c81fe80bf0 100644 --- a/src/misc/bzlib/CMakeLists.txt +++ b/src/misc/bzlib/CMakeLists.txt @@ -1,11 +1,11 @@ abc_libabc_add_sources( NAME misc_bzlib SOURCES - huffman.c - compress.c decompress.c - bzlib.c - blocksort.c - randtable.c crctable.c + randtable.c + compress.c + blocksort.c + bzlib.c + huffman.c ) diff --git a/src/misc/espresso/CMakeLists.txt b/src/misc/espresso/CMakeLists.txt index 8aec1478ce..2c96cbb42c 100644 --- a/src/misc/espresso/CMakeLists.txt +++ b/src/misc/espresso/CMakeLists.txt @@ -1,43 +1,43 @@ abc_libabc_add_sources( NAME misc_espresso SOURCES - cols.c - matrix.c - sminterf.c - cvrmisc.c - unate.c - essen.c - gasp.c - sharp.c - map.c - indep.c - reduce.c - expand.c setc.c exact.c - cofactor.c - cubehack.c - gimpel.c - globals.c equiv.c - cvrin.c - verify.c - compl.c - solution.c - rows.c - mincov.c - cvrm.c + sparse.c + essen.c + globals.c + cvrmisc.c cvrout.c - opo.c + indep.c + primes.c part.c - sparse.c - contain.c + expand.c + cvrm.c + unate.c + espresso.c + rows.c + reduce.c + map.c + cols.c + irred.c + cubehack.c + cvrin.c pair.c + sminterf.c hack.c - primes.c - set.c - espresso.c + matrix.c cubestr.c + contain.c + set.c + sharp.c + mincov.c + gasp.c + gimpel.c + opo.c dominate.c - irred.c + cofactor.c + verify.c + compl.c + solution.c ) diff --git a/src/misc/extra/CMakeLists.txt b/src/misc/extra/CMakeLists.txt index 2454afd7d4..76484819d6 100644 --- a/src/misc/extra/CMakeLists.txt +++ b/src/misc/extra/CMakeLists.txt @@ -1,24 +1,24 @@ abc_libabc_add_sources( NAME misc_extra SOURCES - extraUtilFile.c - extraUtilGen.c + extraUtilTruth.c extraUtilMaj.c - extraUtilEnum.c - extraUtilCube.c + extraUtilMemory.c + extraUtilProgress.c extraUtilUtil.c extraUtilReader.c - extraUtilTruth.c - extraUtilMacc.c + extraUtilPath.c + extraUtilBitMatrix.c + extraUtilGen.c extraUtilCanon.c extraUtilDsd.c extraUtilCfs.c - extraUtilPath.c - extraUtilPerm.c - extraUtilProgress.c + extraUtilEnum.c extraUtilMisc.c + extraUtilFile.c extraUtilMult.c - extraUtilBitMatrix.c - extraUtilMemory.c + extraUtilMacc.c + extraUtilCube.c extraUtilSupp.c + extraUtilPerm.c ) diff --git a/src/misc/mvc/CMakeLists.txt b/src/misc/mvc/CMakeLists.txt index 8900ec3707..496140f9f2 100644 --- a/src/misc/mvc/CMakeLists.txt +++ b/src/misc/mvc/CMakeLists.txt @@ -1,19 +1,19 @@ abc_libabc_add_sources( NAME misc_mvc SOURCES + mvcApi.c + mvcOpAlg.c mvcMan.c - mvcCover.c + mvcCompare.c + mvcPrint.c + mvcDivide.c + mvcLits.c mvcDivisor.c - mvcOpAlg.c + mvcList.c + mvcOpBool.c mvcContain.c - mvcLits.c + mvcSort.c mvcUtils.c mvcCube.c - mvcCompare.c - mvcOpBool.c - mvcPrint.c - mvcSort.c - mvcList.c - mvcApi.c - mvcDivide.c + mvcCover.c ) diff --git a/src/misc/nm/CMakeLists.txt b/src/misc/nm/CMakeLists.txt index ef2789c4fd..bf4706f5fd 100644 --- a/src/misc/nm/CMakeLists.txt +++ b/src/misc/nm/CMakeLists.txt @@ -1,6 +1,6 @@ abc_libabc_add_sources( NAME misc_nm SOURCES - nmApi.c nmTable.c + nmApi.c ) diff --git a/src/misc/tim/CMakeLists.txt b/src/misc/tim/CMakeLists.txt index f430ed9557..d3cd3dd31b 100644 --- a/src/misc/tim/CMakeLists.txt +++ b/src/misc/tim/CMakeLists.txt @@ -2,8 +2,8 @@ abc_libabc_add_sources( NAME misc_tim SOURCES timDump.c - timTrav.c - timTime.c timMan.c timBox.c + timTime.c + timTrav.c ) diff --git a/src/misc/util/CMakeLists.txt b/src/misc/util/CMakeLists.txt index b38e24dafd..d187da49b5 100644 --- a/src/misc/util/CMakeLists.txt +++ b/src/misc/util/CMakeLists.txt @@ -1,12 +1,12 @@ abc_libabc_add_sources( NAME misc_util SOURCES - utilColor.c utilIsop.c + utilNam.c + utilFile.c utilSort.c utilCex.c - utilNam.c utilSignal.c + utilColor.c utilBridge.c - utilFile.c ) diff --git a/src/misc/zlib/CMakeLists.txt b/src/misc/zlib/CMakeLists.txt index a661bb86d5..22adb0ee78 100644 --- a/src/misc/zlib/CMakeLists.txt +++ b/src/misc/zlib/CMakeLists.txt @@ -1,19 +1,19 @@ abc_libabc_add_sources( NAME misc_zlib SOURCES - zutil.c + deflate.c + compress_.c inflate.c - inftrees.c - gzclose.c - crc32.c - inffast.c - gzlib.c - infback.c uncompr.c - compress_.c - deflate.c + gzclose.c gzread.c - trees.c + inftrees.c + inffast.c + crc32.c adler32.c gzwrite.c + zutil.c + trees.c + gzlib.c + infback.c ) diff --git a/src/opt/cgt/CMakeLists.txt b/src/opt/cgt/CMakeLists.txt index bd10d557e0..09618127a4 100644 --- a/src/opt/cgt/CMakeLists.txt +++ b/src/opt/cgt/CMakeLists.txt @@ -2,8 +2,8 @@ abc_libabc_add_sources( NAME opt_cgt SOURCES cgtCore.c - cgtMan.c cgtSat.c cgtAig.c + cgtMan.c cgtDecide.c ) diff --git a/src/opt/csw/CMakeLists.txt b/src/opt/csw/CMakeLists.txt index e24c9df53e..ec48bba053 100644 --- a/src/opt/csw/CMakeLists.txt +++ b/src/opt/csw/CMakeLists.txt @@ -2,7 +2,7 @@ abc_libabc_add_sources( NAME opt_csw SOURCES cswCut.c + cswTable.c cswCore.c cswMan.c - cswTable.c ) diff --git a/src/opt/cut/CMakeLists.txt b/src/opt/cut/CMakeLists.txt index dfc052ed2c..8720329caa 100644 --- a/src/opt/cut/CMakeLists.txt +++ b/src/opt/cut/CMakeLists.txt @@ -1,13 +1,13 @@ abc_libabc_add_sources( NAME opt_cut SOURCES - cutSeq.c - cutNode.c + cutPre22.c cutCut.c - cutMerge.c cutApi.c cutOracle.c + cutNode.c + cutMerge.c cutTruth.c - cutPre22.c + cutSeq.c cutMan.c ) diff --git a/src/opt/dar/CMakeLists.txt b/src/opt/dar/CMakeLists.txt index f9f62f3607..f391522599 100644 --- a/src/opt/dar/CMakeLists.txt +++ b/src/opt/dar/CMakeLists.txt @@ -3,11 +3,11 @@ abc_libabc_add_sources( SOURCES darCore.c darPrec.c + darData.c + darCut.c darBalance.c + darRefact.c + darMan.c darLib.c darScript.c - darCut.c - darData.c - darMan.c - darRefact.c ) diff --git a/src/opt/dau/CMakeLists.txt b/src/opt/dau/CMakeLists.txt index e60a257016..7df058a12f 100644 --- a/src/opt/dau/CMakeLists.txt +++ b/src/opt/dau/CMakeLists.txt @@ -1,16 +1,16 @@ abc_libabc_add_sources( NAME opt_dau SOURCES - dauTree.c dauDsd.c - dauEnum.c - dauNonDsd.c - dauCount.c dauDivs.c + dauCore.c + dauGia.c dauCanon.c + dauNonDsd.c dauMerge.c - dauGia.c - dauCore.c + dauTree.c + dauCount.c + dauEnum.c dauNpn.c dauNpn2.c ) diff --git a/src/opt/fret/CMakeLists.txt b/src/opt/fret/CMakeLists.txt index d01604ac6d..14a14d03a4 100644 --- a/src/opt/fret/CMakeLists.txt +++ b/src/opt/fret/CMakeLists.txt @@ -1,8 +1,8 @@ abc_libabc_add_sources( NAME opt_fret SOURCES - fretMain.c fretInit.c - fretFlow.c fretTime.c + fretMain.c + fretFlow.c ) diff --git a/src/opt/fsim/CMakeLists.txt b/src/opt/fsim/CMakeLists.txt index cdae7250d8..ea8a9d3b17 100644 --- a/src/opt/fsim/CMakeLists.txt +++ b/src/opt/fsim/CMakeLists.txt @@ -1,10 +1,10 @@ abc_libabc_add_sources( NAME opt_fsim SOURCES + fsimFront.c fsimSwitch.c fsimCore.c fsimSim.c - fsimFront.c fsimMan.c fsimTsim.c ) diff --git a/src/opt/fxch/CMakeLists.txt b/src/opt/fxch/CMakeLists.txt index bd218f1522..1ba0e72e8c 100644 --- a/src/opt/fxch/CMakeLists.txt +++ b/src/opt/fxch/CMakeLists.txt @@ -2,7 +2,7 @@ abc_libabc_add_sources( NAME opt_fxch SOURCES Fxch.c + FxchDiv.c FxchSCHashTable.c FxchMan.c - FxchDiv.c ) diff --git a/src/opt/fxu/CMakeLists.txt b/src/opt/fxu/CMakeLists.txt index ec59dcfba5..c8dac35096 100644 --- a/src/opt/fxu/CMakeLists.txt +++ b/src/opt/fxu/CMakeLists.txt @@ -2,15 +2,15 @@ abc_libabc_add_sources( NAME opt_fxu SOURCES fxuHeapD.c - fxuPair.c - fxuUpdate.c + fxuHeapS.c fxuList.c - fxuPrint.c + fxuMatrix.c + fxuUpdate.c fxuSelect.c + fxuPrint.c fxuCreate.c fxu.c - fxuHeapS.c fxuReduce.c + fxuPair.c fxuSingle.c - fxuMatrix.c ) diff --git a/src/opt/lpk/CMakeLists.txt b/src/opt/lpk/CMakeLists.txt index 1688146617..3a9e5e8cb3 100644 --- a/src/opt/lpk/CMakeLists.txt +++ b/src/opt/lpk/CMakeLists.txt @@ -1,15 +1,15 @@ abc_libabc_add_sources( NAME opt_lpk SOURCES - lpkMux.c + lpkCore.c + lpkMan.c lpkSets.c + lpkAbcUtil.c lpkAbcDsd.c - lpkAbcDec.c - lpkCore.c lpkMulti.c - lpkAbcUtil.c - lpkMan.c lpkCut.c - lpkAbcMux.c lpkMap.c + lpkAbcMux.c + lpkMux.c + lpkAbcDec.c ) diff --git a/src/opt/mfs/CMakeLists.txt b/src/opt/mfs/CMakeLists.txt index ee2d4a1ec6..1c62f0f68b 100644 --- a/src/opt/mfs/CMakeLists.txt +++ b/src/opt/mfs/CMakeLists.txt @@ -1,12 +1,12 @@ abc_libabc_add_sources( NAME opt_mfs SOURCES - mfsStrash.c + mfsSat.c + mfsResub.c mfsWin.c + mfsStrash.c mfsCore.c mfsMan.c - mfsDiv.c - mfsSat.c mfsInter.c - mfsResub.c + mfsDiv.c ) diff --git a/src/opt/nwk/CMakeLists.txt b/src/opt/nwk/CMakeLists.txt index 75b7caa0f1..9d31400c50 100644 --- a/src/opt/nwk/CMakeLists.txt +++ b/src/opt/nwk/CMakeLists.txt @@ -1,18 +1,18 @@ abc_libabc_add_sources( NAME opt_nwk SOURCES - nwkStrash.c - nwkDfs.c - nwkFlow.c - nwkFanio.c + nwkAig.c nwkMap.c - nwkObj.c nwkTiming.c - nwkMerge.c + nwkFanio.c + nwkFlow.c + nwkCheck.c nwkUtil.c - nwkAig.c nwkSpeedup.c - nwkCheck.c - nwkMan.c + nwkMerge.c nwkBidec.c + nwkObj.c + nwkDfs.c + nwkMan.c + nwkStrash.c ) diff --git a/src/opt/res/CMakeLists.txt b/src/opt/res/CMakeLists.txt index 0ea35b4a1a..34a95ca143 100644 --- a/src/opt/res/CMakeLists.txt +++ b/src/opt/res/CMakeLists.txt @@ -1,11 +1,11 @@ abc_libabc_add_sources( NAME opt_res SOURCES - resWin.c - resStrash.c resSat.c + resDivs.c + resFilter.c + resStrash.c + resWin.c resSim.c resCore.c - resFilter.c - resDivs.c ) diff --git a/src/opt/ret/CMakeLists.txt b/src/opt/ret/CMakeLists.txt index fa28ff4566..f8833f0255 100644 --- a/src/opt/ret/CMakeLists.txt +++ b/src/opt/ret/CMakeLists.txt @@ -1,11 +1,11 @@ abc_libabc_add_sources( NAME opt_ret SOURCES - retInit.c - retIncrem.c - retLvalue.c - retDelay.c + retCore.c retArea.c + retLvalue.c retFlow.c - retCore.c + retDelay.c + retIncrem.c + retInit.c ) diff --git a/src/opt/rwr/CMakeLists.txt b/src/opt/rwr/CMakeLists.txt index f04575f099..102e1b3495 100644 --- a/src/opt/rwr/CMakeLists.txt +++ b/src/opt/rwr/CMakeLists.txt @@ -1,11 +1,11 @@ abc_libabc_add_sources( NAME opt_rwr SOURCES - rwrLib.c + rwrPrint.c + rwrDec.c rwrExp.c rwrEva.c - rwrDec.c - rwrMan.c + rwrLib.c rwrUtil.c - rwrPrint.c + rwrMan.c ) diff --git a/src/opt/rwt/CMakeLists.txt b/src/opt/rwt/CMakeLists.txt index eef2fd3fd4..29f1e55cf4 100644 --- a/src/opt/rwt/CMakeLists.txt +++ b/src/opt/rwt/CMakeLists.txt @@ -1,7 +1,7 @@ abc_libabc_add_sources( NAME opt_rwt SOURCES - rwtDec.c rwtMan.c + rwtDec.c rwtUtil.c ) diff --git a/src/opt/sbd/CMakeLists.txt b/src/opt/sbd/CMakeLists.txt index a2fc55d484..0259254c8b 100644 --- a/src/opt/sbd/CMakeLists.txt +++ b/src/opt/sbd/CMakeLists.txt @@ -1,13 +1,13 @@ abc_libabc_add_sources( NAME opt_sbd SOURCES - sbdLut.c - sbdSat.c - sbdCut2.c - sbdCnf.c - sbdCore.c sbdWin.c sbdPath.c + sbdCut2.c sbd.c + sbdCnf.c + sbdLut.c sbdCut.c + sbdSat.c + sbdCore.c ) diff --git a/src/opt/sfm/CMakeLists.txt b/src/opt/sfm/CMakeLists.txt index a4200e0143..3d033d67d6 100644 --- a/src/opt/sfm/CMakeLists.txt +++ b/src/opt/sfm/CMakeLists.txt @@ -1,14 +1,14 @@ abc_libabc_add_sources( NAME opt_sfm SOURCES - sfmNtk.c - sfmArea.c - sfmMit.c - sfmTim.c - sfmDec.c sfmCore.c + sfmDec.c + sfmTim.c sfmSat.c - sfmCnf.c sfmLib.c + sfmNtk.c + sfmArea.c sfmWin.c + sfmMit.c + sfmCnf.c ) diff --git a/src/opt/sim/CMakeLists.txt b/src/opt/sim/CMakeLists.txt index d7ae044c12..126a3863e2 100644 --- a/src/opt/sim/CMakeLists.txt +++ b/src/opt/sim/CMakeLists.txt @@ -1,13 +1,13 @@ abc_libabc_add_sources( NAME opt_sim SOURCES - simSymSat.c - simMan.c simSwitch.c - simSymStr.c + simSymSat.c + simSymSim.c simSym.c - simSupp.c - simUtils.c + simMan.c simSeq.c - simSymSim.c + simUtils.c + simSupp.c + simSymStr.c ) diff --git a/src/phys/place/CMakeLists.txt b/src/phys/place/CMakeLists.txt index a58875f98b..0b92918631 100644 --- a/src/phys/place/CMakeLists.txt +++ b/src/phys/place/CMakeLists.txt @@ -3,12 +3,12 @@ abc_libabc_add_sources( SOURCES place_bin.c place_genqp.c - place_base.c - place_inc.c - place_io.c place_legalize.c + place_partition.c + place_base.c place_gordian.c + place_inc.c place_qpsolver.c + place_io.c place_pads.c - place_partition.c ) diff --git a/src/proof/abs/CMakeLists.txt b/src/proof/abs/CMakeLists.txt index d9991ddb5d..4544c4e3f9 100644 --- a/src/proof/abs/CMakeLists.txt +++ b/src/proof/abs/CMakeLists.txt @@ -1,20 +1,20 @@ abc_libabc_add_sources( NAME proof_abs SOURCES - absRpm.c - absVta.c - absPth.c absIter.c + absRefSelect.c + absOut.c + absGla.c + absOldSim.c absOldRef.c - absRef.c - absUtil.c absOldCex.c - absGla.c - absRpmOld.c - absOut.c absDup.c - absOldSim.c - absGlaOld.c - absRefSelect.c + absPth.c + absRef.c + absUtil.c + absVta.c absOldSat.c + absGlaOld.c + absRpm.c + absRpmOld.c ) diff --git a/src/proof/abs/absPth.c b/src/proof/abs/absPth.c index f04a20d1c6..cd2301a2d8 100644 --- a/src/proof/abs/absPth.c +++ b/src/proof/abs/absPth.c @@ -17,7 +17,7 @@ Revision [$Id: absPth.c,v 1.00 2005/06/20 00:00:00 alanmi Exp $] ***********************************************************************/ - + #include "abs.h" #include "proof/pdr/pdr.h" #include "proof/ssw/ssw.h" @@ -25,7 +25,7 @@ #ifdef ABC_USE_PTHREADS -#ifdef _WIN32 +#ifdef _MSC_VER #include "../lib/pthread.h" #else #include @@ -34,7 +34,7 @@ #endif -ABC_NAMESPACE_IMPL_START +ABC_NAMESPACE_IMPL_START //////////////////////////////////////////////////////////////////////// /// DECLARATIONS /// diff --git a/src/proof/acec/CMakeLists.txt b/src/proof/acec/CMakeLists.txt index adc4690ad4..bb8185d450 100644 --- a/src/proof/acec/CMakeLists.txt +++ b/src/proof/acec/CMakeLists.txt @@ -1,23 +1,23 @@ abc_libabc_add_sources( NAME proof_acec SOURCES - acecRe.c - acecNorm.c - acecTree.c - acecPa.c - acecUtil.c acecCl.c acec2Mult.c - acecOrder.c - acecMult.c - acecSt.c + acecCore.c + acecXor.c + acecPo.c acecPool.c + acecUtil.c + acecSt.c + acecRe.c acecBo.c - acecCover.c - acecPo.c - acecFadds.c - acecCore.c acecCo.c - acecXor.c + acecNorm.c + acecPa.c + acecTree.c + acecFadds.c + acecCover.c + acecMult.c acecPolyn.c + acecOrder.c ) diff --git a/src/proof/cec/CMakeLists.txt b/src/proof/cec/CMakeLists.txt index 3e001162f0..fd15a4a94d 100644 --- a/src/proof/cec/CMakeLists.txt +++ b/src/proof/cec/CMakeLists.txt @@ -1,22 +1,23 @@ abc_libabc_add_sources( NAME proof_cec SOURCES - cecSat.c - cecSynth.c + cecSatG3.c cecSim.c - cecCec.c - cecChoice.c - cecSatG2.c cecCorr.c + cecSynth.c + cecIso.c + cecMan.c + cecPat.c + cecSatG2.c + cecSeq.c cecSatG.c - cecClass.c + cecSweep.c cecSolve.c + cecSat.c + cecChoice.c + cecSolveG.c + cecCec.c cecCore.c - cecSweep.c - cecPat.c + cecClass.c cecSplit.c - cecSeq.c - cecMan.c - cecSolveG.c - cecIso.c ) diff --git a/src/proof/cec/cecSplit.c b/src/proof/cec/cecSplit.c index e2fa8ff1da..b1e970a97b 100644 --- a/src/proof/cec/cecSplit.c +++ b/src/proof/cec/cecSplit.c @@ -28,7 +28,7 @@ #ifdef ABC_USE_PTHREADS -#ifdef _WIN32 +#ifdef _MSC_VER #include "../lib/pthread.h" #else #include diff --git a/src/proof/dch/CMakeLists.txt b/src/proof/dch/CMakeLists.txt index be96316bf1..e32871b935 100644 --- a/src/proof/dch/CMakeLists.txt +++ b/src/proof/dch/CMakeLists.txt @@ -2,13 +2,13 @@ abc_libabc_add_sources( NAME proof_dch SOURCES dchSweep.c + dchChoice.c dchAig.c - dchSimSat.c - dchMan.c - dchClass.c dchSim.c + dchSat.c dchCnf.c + dchClass.c dchCore.c - dchChoice.c - dchSat.c + dchMan.c + dchSimSat.c ) diff --git a/src/proof/fra/CMakeLists.txt b/src/proof/fra/CMakeLists.txt index 17750074cf..7e4755bb4c 100644 --- a/src/proof/fra/CMakeLists.txt +++ b/src/proof/fra/CMakeLists.txt @@ -1,21 +1,21 @@ abc_libabc_add_sources( NAME proof_fra SOURCES + fraSat.c fraImp.c - fraClass.c - fraSim.c - fraHot.c + fraSec.c + fraLcr.c fraBmc.c + fraSim.c + fraClass.c + fraClaus.c fraCec.c - fraCore.c - fraLcr.c + fraMan.c + fraInd.c fraPart.c + fraHot.c + fraIndVer.c + fraCore.c fraClau.c - fraMan.c fraCnf.c - fraClaus.c - fraIndVer.c - fraSat.c - fraSec.c - fraInd.c ) diff --git a/src/proof/fraig/CMakeLists.txt b/src/proof/fraig/CMakeLists.txt index 5fadae228a..1238302f0d 100644 --- a/src/proof/fraig/CMakeLists.txt +++ b/src/proof/fraig/CMakeLists.txt @@ -1,16 +1,16 @@ abc_libabc_add_sources( NAME proof_fraig SOURCES - fraigMan.c - fraigCanon.c - fraigFeed.c - fraigVec.c fraigUtil.c - fraigMem.c - fraigTable.c + fraigFanout.c + fraigFeed.c + fraigMan.c fraigNode.c - fraigPrime.c fraigApi.c - fraigFanout.c + fraigVec.c + fraigPrime.c + fraigCanon.c fraigSat.c + fraigMem.c + fraigTable.c ) diff --git a/src/proof/int/CMakeLists.txt b/src/proof/int/CMakeLists.txt index 7a425b6495..d83124a90e 100644 --- a/src/proof/int/CMakeLists.txt +++ b/src/proof/int/CMakeLists.txt @@ -1,14 +1,14 @@ abc_libabc_add_sources( NAME proof_int SOURCES + intFrames.c + intInter.c intCore.c - intDup.c intM114.c intUtil.c + intDup.c intCtrex.c - intMan.c intContain.c - intFrames.c intCheck.c - intInter.c + intMan.c ) diff --git a/src/proof/int2/CMakeLists.txt b/src/proof/int2/CMakeLists.txt index b8e15c4de5..e76bac5087 100644 --- a/src/proof/int2/CMakeLists.txt +++ b/src/proof/int2/CMakeLists.txt @@ -1,8 +1,8 @@ abc_libabc_add_sources( NAME proof_int2 SOURCES - int2Bmc.c + int2Core.c int2Util.c int2Refine.c - int2Core.c + int2Bmc.c ) diff --git a/src/proof/live/CMakeLists.txt b/src/proof/live/CMakeLists.txt index a2385f68b2..aa92acb388 100644 --- a/src/proof/live/CMakeLists.txt +++ b/src/proof/live/CMakeLists.txt @@ -1,13 +1,13 @@ abc_libabc_add_sources( NAME proof_live SOURCES - combination.c - liveness.c - liveness_sim.c - disjunctiveMonotone.c arenaViolation.c - kliveness.c - monotone.c + disjunctiveMonotone.c kLiveConstraints.c + monotone.c + liveness.c ltl_parser.c + liveness_sim.c + combination.c + kliveness.c ) diff --git a/src/proof/pdr/CMakeLists.txt b/src/proof/pdr/CMakeLists.txt index 06d7edfbf5..9cd811b3d9 100644 --- a/src/proof/pdr/CMakeLists.txt +++ b/src/proof/pdr/CMakeLists.txt @@ -1,14 +1,14 @@ abc_libabc_add_sources( NAME proof_pdr SOURCES - pdrMan.c - pdrIncr.c - pdrSat.c - pdrCore.c - pdrInv.c - pdrUtil.c pdrCnf.c - pdrTsim3.c pdrTsim.c + pdrTsim3.c + pdrSat.c pdrTsim2.c + pdrMan.c + pdrUtil.c + pdrInv.c + pdrCore.c + pdrIncr.c ) diff --git a/src/proof/ssc/CMakeLists.txt b/src/proof/ssc/CMakeLists.txt index a90d29d189..441c4730ea 100644 --- a/src/proof/ssc/CMakeLists.txt +++ b/src/proof/ssc/CMakeLists.txt @@ -3,7 +3,7 @@ abc_libabc_add_sources( SOURCES sscCore.c sscSat.c - sscUtil.c sscSim.c + sscUtil.c sscClass.c ) diff --git a/src/proof/ssw/CMakeLists.txt b/src/proof/ssw/CMakeLists.txt index 8eb301fee6..e42b02517d 100644 --- a/src/proof/ssw/CMakeLists.txt +++ b/src/proof/ssw/CMakeLists.txt @@ -1,24 +1,24 @@ abc_libabc_add_sources( NAME proof_ssw SOURCES - sswClass.c + sswDyn.c sswCnf.c - sswSimSat.c - sswConstr.c + sswAig.c sswPart.c sswRarity.c - sswFilter.c - sswAig.c - sswCore.c + sswSimSat.c sswMan.c - sswDyn.c - sswSemi.c - sswSat.c - sswUnique.c sswLcorr.c - sswBmc.c + sswPairs.c + sswSemi.c + sswSweep.c sswIslands.c sswSim.c - sswSweep.c - sswPairs.c + sswConstr.c + sswUnique.c + sswClass.c + sswCore.c + sswFilter.c + sswSat.c + sswBmc.c ) diff --git a/src/sat/bmc/CMakeLists.txt b/src/sat/bmc/CMakeLists.txt index dfd7e3b23b..545fd83c6e 100644 --- a/src/sat/bmc/CMakeLists.txt +++ b/src/sat/bmc/CMakeLists.txt @@ -1,36 +1,36 @@ abc_libabc_add_sources( NAME sat_bmc SOURCES - bmcClp.c - bmcCexDepth.c + bmcCexTools.c + bmcMaj3.c + bmcUnroll.c + bmcEco.c + bmcMaj.c + bmcInse.c bmcChain.c - bmcBmcS.c - bmcMaxi.c - bmcBmc.c + bmcClp.c + bmcGen.c + bmcCexMin2.c + bmcBmcG.c + bmcBCore.c bmcCexMin1.c - bmcMesh2.c - bmcInse.c - bmcMesh.c - bmcMaj.c + bmcMaxi.c bmcExpand.c - bmcBmc3.c - bmcEco.c - bmcCexTools.c bmcBmci.c - bmcCexMin2.c - bmcGen.c - bmcICheck.c - bmcCexCut.c - bmcBmc2.c - bmcFault.c bmcLoad.c + bmcFx.c + bmcCexDepth.c + bmcBmc.c bmcMaj2.c - bmcUnroll.c + bmcFault.c + bmcBmc2.c bmcMulti.c - bmcBCore.c + bmcBmc3.c bmcCexCare.c - bmcBmcG.c bmcBmcAnd.c - bmcFx.c - bmcMaj3.c + bmcMesh.c + bmcCexCut.c + bmcBmcS.c + bmcMesh2.c + bmcICheck.c ) diff --git a/src/sat/bmc/bmcBmcS.c b/src/sat/bmc/bmcBmcS.c index 8bfda56ba7..039527967d 100644 --- a/src/sat/bmc/bmcBmcS.c +++ b/src/sat/bmc/bmcBmcS.c @@ -48,7 +48,7 @@ #ifdef ABC_USE_PTHREADS -#ifdef _WIN32 +#ifdef _MSC_VER #include "../lib/pthread.h" #else #include diff --git a/src/sat/bsat/CMakeLists.txt b/src/sat/bsat/CMakeLists.txt index d279844ada..2ef211b455 100644 --- a/src/sat/bsat/CMakeLists.txt +++ b/src/sat/bsat/CMakeLists.txt @@ -1,18 +1,18 @@ abc_libabc_add_sources( NAME sat_bsat SOURCES - satMem.c - satTrace.c - satProof.c - satSolver2.c - satSolver3.c + satInter.c satStore.c + satSolver2.c + satInterA.c + satSolver.c satUtil.c + satSolver2i.c + satInterP.c satTruth.c + satMem.c satInterB.c - satInterA.c - satInterP.c - satInter.c - satSolver2i.c - satSolver.c + satSolver3.c + satProof.c + satTrace.c ) diff --git a/src/sat/bsat2/CMakeLists.txt b/src/sat/bsat2/CMakeLists.txt index a40ee9595c..d097c47460 100644 --- a/src/sat/bsat2/CMakeLists.txt +++ b/src/sat/bsat2/CMakeLists.txt @@ -1,11 +1,11 @@ abc_libabc_add_sources( NAME sat_bsat2 SOURCES - System.cpp + MainSat.cpp + Options.cpp AbcApi.cpp SimpSolver.cpp - Options.cpp - MainSimp.cpp - MainSat.cpp Solver.cpp + System.cpp + MainSimp.cpp ) diff --git a/src/sat/cnf/CMakeLists.txt b/src/sat/cnf/CMakeLists.txt index 5ab43ddd76..2f068190a8 100644 --- a/src/sat/cnf/CMakeLists.txt +++ b/src/sat/cnf/CMakeLists.txt @@ -1,13 +1,13 @@ abc_libabc_add_sources( NAME sat_cnf SOURCES - cnfUtil.c - cnfWrite.c - cnfData.c - cnfCore.c + cnfFast.c cnfMap.c + cnfCore.c + cnfData.c + cnfUtil.c cnfMan.c cnfCut.c + cnfWrite.c cnfPost.c - cnfFast.c ) diff --git a/src/sat/glucose/CMakeLists.txt b/src/sat/glucose/CMakeLists.txt index 5922ee85ba..aea0027648 100644 --- a/src/sat/glucose/CMakeLists.txt +++ b/src/sat/glucose/CMakeLists.txt @@ -1,10 +1,10 @@ abc_libabc_add_sources( NAME sat_glucose SOURCES - System.cpp + AbcGlucose.cpp + Options.cpp + SimpSolver.cpp Glucose.cpp + System.cpp AbcGlucoseCmd.cpp - SimpSolver.cpp - Options.cpp - AbcGlucose.cpp ) diff --git a/src/sat/glucose2/CMakeLists.txt b/src/sat/glucose2/CMakeLists.txt index 8f0dd551d3..9c00826407 100644 --- a/src/sat/glucose2/CMakeLists.txt +++ b/src/sat/glucose2/CMakeLists.txt @@ -1,10 +1,10 @@ abc_libabc_add_sources( NAME sat_glucose2 SOURCES - SimpSolver2.cpp - Options2.cpp - AbcGlucose2.cpp + AbcGlucoseCmd2.cpp System2.cpp + AbcGlucose2.cpp Glucose2.cpp - AbcGlucoseCmd2.cpp + Options2.cpp + SimpSolver2.cpp ) diff --git a/src/sat/msat/CMakeLists.txt b/src/sat/msat/CMakeLists.txt index e5c1f5fe2c..6c7fd78ccc 100644 --- a/src/sat/msat/CMakeLists.txt +++ b/src/sat/msat/CMakeLists.txt @@ -1,17 +1,17 @@ abc_libabc_add_sources( NAME sat_msat SOURCES - msatSolverApi.c - msatOrderH.c - msatRead.c - msatQueue.c - msatSolverSearch.c msatClauseVec.c + msatSolverSearch.c + msatSolverApi.c msatVec.c - msatClause.c - msatMem.c + msatSolverIo.c msatSort.c - msatSolverCore.c + msatMem.c + msatClause.c + msatOrderH.c + msatQueue.c + msatRead.c msatActivity.c - msatSolverIo.c + msatSolverCore.c ) diff --git a/src/sat/satoko/CMakeLists.txt b/src/sat/satoko/CMakeLists.txt index a45c747644..564d8938e3 100644 --- a/src/sat/satoko/CMakeLists.txt +++ b/src/sat/satoko/CMakeLists.txt @@ -1,7 +1,7 @@ abc_libabc_add_sources( NAME sat_satoko SOURCES - cnf_reader.c solver_api.c + cnf_reader.c solver.c ) diff --git a/src/sat/xsat/CMakeLists.txt b/src/sat/xsat/CMakeLists.txt index 4a2aa655c6..97cc44e5d3 100644 --- a/src/sat/xsat/CMakeLists.txt +++ b/src/sat/xsat/CMakeLists.txt @@ -2,6 +2,6 @@ abc_libabc_add_sources( NAME sat_xsat SOURCES xsatCnfReader.c - xsatSolver.c xsatSolverAPI.c + xsatSolver.c ) diff --git a/tox.ini b/tox.ini index 3f2fbba8f8..2cfc08cc84 100644 --- a/tox.ini +++ b/tox.ini @@ -5,14 +5,25 @@ skipsdist = true [base] setenv = - {abc,tests}: CFLAGS=-march=native -O2 -g -DNDEBUG - {abc,tests}: CXXFLAGS={env:CFLAGS:-march=native -O2 -g -DNDEBUG} - {abc,tests}: LDFLAGS={env:CFLAGS:-march=native -O2 -g -DNDEBUG -Wl,-O1 -Wl,--as-needed} - {build}: PREFIX={env:PREFIX:./install} + {abc,demo,soname,tests}: CFLAGS={env:CFLAGS:-march=native -O2 -g -DNDEBUG} + {abc,demo,soname,tests}: CXXFLAGS={env:CFLAGS:-march=native -O2 -g -DNDEBUG} + {abc,demo,soname,tests}: LDFLAGS={env:CFLAGS:-march=native -O2 -g -DNDEBUG -Wl,-O1 -Wl,--as-needed} + {base,build,clang,ctest}: ABC_USE_NAMESPACE={env:ABC_USE_NAMESPACE:xxxx} + {base,build,clang,ctest}: ABC_USE_SONAME={env:ABC_USE_SONAME:ON} + {base,build,clang,ctest}: ABC_USE_PIC={env:ABC_USE_PIC:ON} + base: PREFIX={env:PREFIX:staging} + build: PREFIX={env:PREFIX:../staging} + build: BUILD_TYPE={env:BUILD_TYPE:Release} + clang: BUILD_TYPE={env:BUILD_TYPE:RelWithDebInfo} + ctest: BUILD_TYPE={env:BUILD_TYPE:Release} + ctestwin: BUILD_TYPE={env:BUILD_TYPE:Debug} passenv = CC CXX + LD + AR + NM PYTHON DISPLAY XAUTHORITY @@ -30,44 +41,60 @@ skip_install = true setenv = {abc,tests}: {[base]setenv} - {build}: {[base]setenv} + {build,base}: {[base]setenv} passenv = {[base]passenv} whitelist_externals = - {abc,tests,lint,build,clang,ctest,grind,unbuild}: bash - {abc,tests,clean}: make - {build,clang}: mkdir + {abc,demo,soname,tests,lint,base,build,clang,ctest,grind,unbuild}: bash + {abc,demo,soname,tests,clean}: make changedir = {build,clang}: build deps = - {abc,tests,lint,build,clang,ctest,grind}: pip>=21.3 - {abc,tests}: this-cli - {build,clang,ctest,grind}: cmake - {build,clang,ctest,grind}: ninja + {abc,demo,soname,tests,lint,base,build,clang,ctest,grind,ctestwin}: pip>=21.3 + {abc,demo,soname,tests}: this-cli + {base,build,clang,ctest,grind,ctestwin}: cmake + {base,build,clang,ctest,grind,ctestwin}: ninja lint: cpplint grind: ValgrindCI + lcov: lcov_cobertura commands_pre = - {build,clang}: mkdir -p {toxinidir}/build + {build,clang}: cmake -E make_directory {toxinidir}/build commands = - abc: make -j4 ABC_USE_PIC=1 {posargs:'ABC_USE_NAMESPACE=xxx'} abc - tests: make -j4 ABC_USE_PIC=1 {posargs:'ABC_USE_NAMESPACE=xxx'} test - clang: bash -c 'cmake -G {posargs:"Unix Makefiles"} -DABC_USE_NAMESPACE=xxx -DCMAKE_TOOLCHAIN_FILE=../tools/clang_toolchain.cmake ..' - build: bash -c 'cmake -G {posargs:"Unix Makefiles"} -DABC_USE_NAMESPACE=xxx -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=$PREFIX ..' - {build,clang}: bash -c 'cmake --build . --target abc -j $(nproc)' - {build,clang}: bash -c 'ctest -V --test-dir ./' + abc: make -j4 ABC_USE_PIC=1 {posargs} abc + abc: make -j4 {posargs} libabc.a + soname: make -j4 ABC_USE_PIC=1 ABC_USE_SONAME=1 {posargs} lib + tests: make test + # demo requires CC, CXX set in environment or on cmd line + # eg: CC=gcc CXX=g++ tox -e demo + demo: bash -c '$CC {posargs} -Wall -c src/demo.c -o demo.o' + demo: bash -c '$CXX -o demo demo.o libabc.a -lm -ldl -lreadline -lpthread' + demo: ./demo i10.aig + {abc,soname,tests}: bash -c 'ls -lh *abc* demo || true' + base: bash -c 'cmake -G {posargs:"Ninja"} -DABC_USE_NAMESPACE=$ABC_USE_NAMESPACE -DCMAKE_INSTALL_PREFIX=$PREFIX -S . -B build' + base: cmake --build build --target install + build: bash -c 'cmake -G {posargs:"Unix Makefiles"} -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DABC_USE_NAMESPACE=$ABC_USE_NAMESPACE -DABC_ENABLE_LTO=ON -DBUILD_SHARED_LIBS=ON -DABC_USE_SONAME=$ABC_USE_SONAME -DCMAKE_INSTALL_PREFIX=$PREFIX ..' + clang: bash -c 'cmake -G {posargs:"Unix Makefiles"} -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DABC_USE_NAMESPACE=$ABC_USE_NAMESPACE -DCOVERAGE_BUILD=ON -DBUILD_SHARED_LIBS=OFF ..' + {build}: bash -c 'cmake --build . -j $(nproc)' + {clang}: bash -c 'cmake --build . --target coverage -j $(nproc)' + {build}: bash -c 'ctest -V -C $BUILD_TYPE --test-dir ./' + {clang}: bash -c 'ctest -V -C $BUILD_TYPE --test-dir ./' + lcov: lcov_cobertura build/coverage/lcov.info --base-dir {toxinidir}/src --output coverage.xml build: cmake --build . --target install - ctest: bash -c 'ctest -j $(nproc) --build-generator {posargs:"Ninja"} --build-and-test . build --build-options -DABC_USE_NAMESPACE=xxx -DCMAKE_BUILD_TYPE=Debug --test-command ctest --rerun-failed --output-on-failure -V' + {base,build}: bash -c 'find $PREFIX/ -type f -name \*abc\* -o -name demo | xargs ls -lh' + ctest: bash -c 'ctest -j $(nproc) --build-generator {posargs:"Ninja"} --build-and-test . build --build-options -DABC_USE_NAMESPACE=$ABC_USE_NAMESPACE -DABC_SKIP_EXE=ON -DCMAKE_BUILD_TYPE=$BUILD_TYPE --test-command ctest --rerun-failed --output-on-failure -V' + ctestwin: ctest --build-generator {posargs:"Visual Studio 16 2019"} --build-and-test . build --build-options -DBUILD_SHARED_LIBS=ON -DABC_USE_NO_PTHREADS=ON -DABC_USE_NO_READLINE=ON -DCMAKE_BUILD_TYPE={env:BUILD_TYPE} --test-command ctest --rerun-failed --output-on-failure -V + ctest: bash -c 'ls -lh build/base_test build/libabc.* || true' lint: bash -c 'cpplint --output=gsed {toxinidir}/src/base/main/* {toxinidir}/lib/*' - grind: bash -c 'cmake -G {posargs:"Ninja"} -S . -B build -DABC_USE_NAMESPACE=xxx -DCMAKE_BUILD_TYPE=Debug' + grind: bash -c 'cmake -G {posargs:"Ninja"} -S . -B build -DCMAKE_BUILD_TYPE=Debug' grind: bash -c 'cmake --build build --target abc -j $(nproc)' grind: bash -c 'valgrind --tool=memcheck --xml=yes --xml-file=abc_check.xml --leak-check=full --show-leak-kinds=definite,possible --error-exitcode=127 ./build/src/base/main/abc "-c" "r i10.aig; b; ps; b; rw -l; rw -lz; b; rw -lz; b; ps; cec"' grind: valgrind-ci abc_check.xml --number-of-errors grind: valgrind-ci abc_check.xml --summary - unbuild: bash -c 'rm -rf build/ abc_check.xml' + unbuild: bash -c 'rm -rf build/ *.xml *.blif *.profraw' clean: make clean