Skip to content

Commit 4e3487b

Browse files
committed
Add latest abc and update ace dependence
1 parent 70b66e0 commit 4e3487b

File tree

1,752 files changed

+929895
-2120
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,752 files changed

+929895
-2120
lines changed

abc/.appveyor.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
version: '{build}'
2+
3+
environment:
4+
5+
matrix:
6+
7+
- APPVEYOR_BUILD_WORKER_IMAGE: "Visual Studio 2017"
8+
VCVARS_SCRIPT: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Auxiliary\\Build\\vcvarsall.bat"
9+
VCVARS_PLATFORM: x86
10+
11+
init:
12+
13+
- cmd: '"%VCVARS_SCRIPT%" %VCVARS_PLATFORM%'
14+
15+
build_script:
16+
17+
- cmd: |
18+
sed -i 's#ABC_USE_PTHREADS"#ABC_DONT_USE_PTHREADS" /D "_XKEYCHECK_H"#g' *.dsp
19+
awk 'BEGIN { del=0; } /# Begin Group "uap"/ { del=1; } /# End Group/ { if( del > 0 ) {del=0; next;} } del==0 {print;} ' abclib.dsp > tmp.dsp
20+
copy tmp.dsp abclib.dsp
21+
del tmp.dsp
22+
unix2dos *.dsp
23+
24+
- cmd: |
25+
appveyor PushArtifact abcspace.dsw
26+
appveyor PushArtifact abclib.dsp
27+
appveyor PushArtifact abcexe.dsp
28+
29+
- cmd: |
30+
devenv abcspace.dsw /upgrade || dir
31+
appveyor PushArtifact UpgradeLog.htm
32+
msbuild abcspace.sln /m /nologo /p:Configuration=Release
33+
34+
- cmd: |
35+
_TEST\abc.exe -c "r i10.aig; b; ps; b; rw -l; rw -lz; b; rw -lz; b; ps; cec"
36+
37+
- cmd: |
38+
appveyor PushArtifact _TEST/abc.exe
39+

abc/.gitattributes

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
* text=auto
2+
3+
*.c text
4+
*.cpp text
5+
*.h text
6+
7+
*.py text
8+
*.sh text
9+
10+
*.make text
11+
Makefile text
12+
13+
*.txt text
14+
*.md text
15+
*.html text
16+
17+
readmeaig text
18+
LICENSE text
19+
license text
20+
CHANGES text
21+
README text
22+
23+
.hgignore text
24+
.gitignore text
25+
.gitattributes text
26+
27+
*.dsp text eol=crlf
28+
*.dsw text eol=crlf
29+
30+
*.aig binary
31+
*.lib binary
32+
*.dll binary

abc/.gitignore

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
DebugLib/
2+
DebugExe/
3+
DebugExt/
4+
5+
ReleaseLib/
6+
ReleaseExe/
7+
ReleaseExt/
8+
9+
_TEST/
10+
lib/abc*
11+
lib/m114*
12+
lib/bip*
13+
docs/
14+
15+
src/ext*
16+
src/xxx/
17+
src/aig/au/
18+
src/aig/ssm/
19+
src/aig/ddb/
20+
21+
*~
22+
*.orig
23+
24+
*.[od]
25+
26+
*.ncb
27+
*.opt
28+
*.plg
29+
30+
*.zip
31+
32+
abcspaceext.dsw
33+
abcext.dsp
34+
35+
abcexe.vcproj*
36+
abclib.vcproj*
37+
abcspace.sln
38+
abcspace.suo
39+
40+
*.pyc
41+
42+
src/python/build
43+
src/python/bdist
44+
src/python/pyabc.py
45+
src/python/pyabc_wrap.*
46+
47+
.idea/
48+
build/
49+
50+
*.rej
51+
*.orig
52+
53+
tags
54+
55+
/libabc.a
56+
/abc
57+
58+
/arch_flags
59+
60+
/cmake
61+
/cscope

abc/.hgignore

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
syntax:glob
2+
3+
DebugLib/
4+
DebugExe/
5+
DebugExt/
6+
7+
ReleaseLib/
8+
ReleaseExe/
9+
ReleaseExt/
10+
11+
_TEST/
12+
lib/abc*
13+
lib/m114*
14+
lib/bip*
15+
docs/
16+
17+
src/ext*
18+
src/xxx/
19+
src/aig/au/
20+
src/aig/ssm/
21+
src/aig/ddb/
22+
23+
*~
24+
*.orig
25+
26+
*.[od]
27+
28+
*.ncb
29+
*.opt
30+
*.plg
31+
32+
*.zip
33+
34+
abcspaceext.dsw
35+
abcext.dsp
36+
37+
abcexe.vcproj*
38+
abclib.vcproj*
39+
abcspace.sln
40+
abcspace.suo
41+
42+
*.pyc
43+
44+
src/python/build
45+
src/python/bdist
46+
src/python/pyabc.py
47+
src/python/pyabc_wrap.*
48+
49+
.idea/
50+
build/
51+
52+
*.rej
53+
*.orig
54+
55+
tags
56+
57+
syntax: regexp
58+
59+
^libabc.a$
60+
^abc$
61+
62+
^arch_flags$
63+
64+
^cmake
65+
^cscope

abc/.travis.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
language: cpp
2+
3+
matrix:
4+
include:
5+
6+
- os: linux
7+
addons:
8+
apt:
9+
packages:
10+
- libreadline-dev
11+
12+
- os: osx
13+
osx_image: xcode8
14+
before_install:
15+
- brew update
16+
- brew install readline
17+
18+
script:
19+
20+
- make -j2 abc
21+
- ./abc -c "r i10.aig; b; ps; b; rw -l; rw -lz; b; rw -lz; b; ps; cec"
22+
23+
- make libabc.a
24+
- gcc -Wall -c src/demo.c -o demo.o
25+
- g++ -o demo demo.o libabc.a -lm -ldl -lreadline -lpthread
26+
- ./demo i10.aig

abc/CMakeLists.txt

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
cmake_minimum_required(VERSION 3.3.0)
2+
3+
include(CMakeParseArguments)
4+
include(CheckCCompilerFlag)
5+
include(CheckCXXCompilerFlag)
6+
7+
function(addprefix var prefix)
8+
foreach( s ${ARGN} )
9+
list(APPEND tmp "-I${s}")
10+
endforeach()
11+
set(${var} ${tmp} PARENT_SCOPE)
12+
endfunction()
13+
14+
# filter out flags that are not appropriate for the compiler being used
15+
function(target_compile_options_filtered target visibility)
16+
foreach( flag ${ARGN} )
17+
if( flag MATCHES "^-D.*" )
18+
target_compile_options( ${target} ${visibility} ${flag} )
19+
else()
20+
check_c_compiler_flag( ${flag} C_COMPILER_SUPPORTS__${flag} )
21+
if( C_COMPILER_SUPPORTS__${flag} )
22+
target_compile_options( ${target} ${visibility} $<$<COMPILE_LANGUAGE:C>:${flag}> )
23+
endif()
24+
25+
check_cxx_compiler_flag( ${flag} CXX_COMPILER_SUPPORTS__${flag} )
26+
if( CXX_COMPILER_SUPPORTS__${flag} )
27+
target_compile_options( ${target} ${visibility} $<$<COMPILE_LANGUAGE:CXX>:${flag}> )
28+
endif()
29+
endif()
30+
endforeach()
31+
endfunction()
32+
33+
project(abc)
34+
35+
if(READLINE_FOUND MATCHES TRUE)
36+
addprefix(ABC_READLINE_INCLUDES_FLAGS "-I" ${READLINE_INCLUDE})
37+
string(REPLACE ";" " " ABC_READLINE_INCLUDES_FLAGS "${ABC_READLINE_INCLUDES_FLAGS}")
38+
list(APPEND ABC_READLINE_FLAGS "ABC_READLINE_INCLUDES=${ABC_READLINE_INCLUDES_FLAGS}")
39+
40+
string(REPLACE ";" " " ABC_READLINE_LIBRARIES_FLAGS "${READLINE_LIBRARIES}")
41+
list(APPEND ABC_READLINE_FLAGS "ABC_READLINE_LIBRARIES=${ABC_READLINE_LIBRARIES_FLAGS}")
42+
elseif(READLINE_FOUND MATCHES FALSE)
43+
list(APPEND ABC_READLINE_FLAGS "ABC_USE_NO_READLINE=1")
44+
endif()
45+
46+
if(ABC_USE_NAMESPACE)
47+
set(ABC_USE_NAMESPACE_FLAGS "ABC_USE_NAMESPACE=${ABC_USE_NAMESPACE}")
48+
endif()
49+
50+
# run make to extract compiler options, linker options and list of source files
51+
execute_process(
52+
COMMAND
53+
make
54+
${ABC_READLINE_FLAGS}
55+
${ABC_USE_NAMESPACE_FLAGS}
56+
ARCHFLAGS_EXE=${CMAKE_CURRENT_BINARY_DIR}/abc_arch_flags_program.exe
57+
ABC_MAKE_NO_DEPS=1
58+
CC=${CMAKE_C_COMPILER}
59+
CXX=${CMAKE_CXX_COMPILER}
60+
LD=${CMAKE_CXX_COMPILER}
61+
cmake_info
62+
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
63+
OUTPUT_VARIABLE MAKE_OUTPUT
64+
)
65+
66+
# extract options from make output
67+
function(extract_var SEPARATOR DEST_VARIABLE MAKE_OUTPUT)
68+
string(REGEX MATCH "${SEPARATOR} .* ${SEPARATOR}" TMP "${MAKE_OUTPUT}")
69+
string(REGEX REPLACE "${SEPARATOR} (.*) ${SEPARATOR}" "\\1" TMP "${TMP}")
70+
71+
separate_arguments(TMP)
72+
73+
set(${DEST_VARIABLE} ${TMP} PARENT_SCOPE)
74+
endfunction()
75+
76+
extract_var(SEPARATOR_SRC ABC_SRC ${MAKE_OUTPUT})
77+
extract_var(SEPARATOR_LIBS ABC_LIBS ${MAKE_OUTPUT})
78+
extract_var(SEPARATOR_CFLAGS ABC_CFLAGS ${MAKE_OUTPUT})
79+
extract_var(SEPARATOR_CXXFLAGS ABC_CXXFLAGS ${MAKE_OUTPUT})
80+
81+
if(ABC_USE_NAMESPACE)
82+
set_source_files_properties(${ABC_SRC} PROPERTIES LANGUAGE CXX)
83+
endif()
84+
85+
function(abc_properties target visibility)
86+
target_include_directories(${target} ${visibility} ${CMAKE_CURRENT_SOURCE_DIR}/src )
87+
target_compile_options_filtered(${target} ${visibility} ${ABC_CFLAGS} ${ABC_CXXFLAGS} -Wno-unused-but-set-variable )
88+
target_link_libraries(${target} ${visibility} ${ABC_LIBS})
89+
endfunction()
90+
91+
set(ABC_MAIN_SRC src/base/main/main.c)
92+
list(REMOVE_ITEM ABC_SRC ${ABC_MAIN_SRC})
93+
94+
add_library(libabc EXCLUDE_FROM_ALL ${ABC_SRC})
95+
abc_properties(libabc PUBLIC)
96+
set_property(TARGET libabc PROPERTY OUTPUT_NAME abc)
97+
98+
add_executable(abc ${ABC_MAIN_SRC})
99+
target_link_libraries(abc PRIVATE libabc)
100+
abc_properties(abc PRIVATE)
101+
102+
add_library(libabc-pic EXCLUDE_FROM_ALL ${ABC_SRC})
103+
abc_properties(libabc-pic PUBLIC)
104+
set_property(TARGET libabc-pic PROPERTY POSITION_INDEPENDENT_CODE ON)
105+
set_property(TARGET libabc-pic PROPERTY OUTPUT_NAME abc-pic)

0 commit comments

Comments
 (0)