summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--i10.aig752
-rw-r--r--readme41
-rw-r--r--src/base/main/mainUtils.c6
3 files changed, 785 insertions, 14 deletions
diff --git a/i10.aig b/i10.aig
new file mode 100644
index 00000000..203a607e
--- /dev/null
+++ b/i10.aig
@@ -0,0 +1,752 @@
+aig 2932 257 0 224 2675
+886
+1864
+2106
+2108
+2155
+2164
+2389
+2491
+2509
+2461
+2754
+2787
+2789
+2817
+2821
+2834
+2864
+2866
+2868
+2870
+2872
+2912
+2958
+3004
+3056
+3108
+3160
+3214
+3262
+3303
+3325
+3349
+3417
+3487
+3557
+3651
+3745
+3841
+3873
+67
+3876
+3887
+3897
+3907
+3917
+3940
+3948
+2784
+3962
+3955
+93
+766
+578
+4068
+2126
+4072
+2124
+4082
+4084
+4086
+4088
+2128
+2116
+4233
+4234
+555
+4243
+4255
+4276
+4298
+3261
+3213
+3159
+3107
+3055
+3003
+2957
+2911
+979
+1367
+1199
+1319
+2355
+2279
+2317
+3393
+3461
+3531
+3639
+3733
+3829
+887
+4300
+4330
+2136
+2120
+4332
+4334
+4336
+2118
+4338
+4340
+4342
+4344
+4381
+4437
+4449
+4461
+4473
+4485
+4497
+4512
+317
+4516
+4546
+4554
+4564
+4574
+2122
+4595
+2132
+4596
+4598
+4600
+2134
+4604
+4611
+4613
+4635
+4651
+4667
+4672
+4683
+45
+4699
+353
+4755
+4779
+4799
+4735
+4802
+4808
+4823
+4841
+5120
+5266
+5279
+5295
+5301
+5311
+5364
+383
+5367
+5399
+5411
+5423
+5435
+5447
+5459
+5477
+2178
+5487
+5492
+4209
+5499
+2505
+5503
+5517
+413
+5527
+5537
+5547
+5557
+5567
+5577
+5587
+5597
+5607
+5617
+5627
+5637
+5647
+5653
+5662
+385
+423
+81
+5671
+5677
+5683
+5689
+5693
+5697
+4895
+4933
+4983
+5021
+5065
+5103
+4846
+5161
+5175
+5201
+5215
+5235
+5249
+4861
+5131
+5141
+5717
+5735
+5755
+5773
+5785
+5795
+5805
+5813
+5821
+5827
+5833
+5843
+5851
+5859
+5865
+1
+!U Xjr0
+ /)2:7!-2M=!
+X*^j6
+  > 89,E% r
+
+')*[`bcR[c Yg\82 4  !#229;VXWXVV $D  34    tt U6ABcdd#<8?B88(( uE<DD IJU\\<8?B88(( eE<D
+DO  @@ad
+::A?
+44IK35
+wmM- #%79')
+ ][
+ 
+P?A}ac
+9;qsQS
+35egAC 
+ wmM-  ,&$*,
+n 
+   }               
+
+
+
+                          sM)  6            5 Q   aw M70
+
+       zU ,0}n  Gl       
+
+
+
+  OGI    #  .-8;1 rq|u    
+ A
+
+ A
+
+ A        ! %
+     
+     
+   ) [T<  .             E Q  s  d1 ! ! "! !!  !    8    !!!!  "!"$ ').!.0 35:!:< ?AF!FH KMR!R # N  ## ##""""# ""V"T!!!!!! 4!"!"B""!!!!!!!"!"!!!$!" !"$$&$ ").=#" #!##!  %'GI%'%'QS   !#  !#IK& $&&
+$)&(&&(&T&$   ) 
+
+%-$ %(%''  ' ( '%',),&'138)82&=?D)D>&IKP(P$
+'' &'d%&)&*&'&&
+ '(%%%%%%%%%%%%%%+$+++++++++++++++++!
++V&)) ( ( ( ((') (*'((   ()  ,,,,,,++,,,,,,,,,(,,,,2,,,, ,,, ,   !+++ !+++++++ i0 V32(0)
+i1 V32(1)
+i2 V32(2)
+i3 V32(3)
+i4 V56(0)
+i5 V289(0)
+i6 V10(0)
+i7 V13(0)
+i8 V35(0)
+i9 V203(0)
+i10 V288(6)
+i11 V288(7)
+i12 V248(0)
+i13 V249(0)
+i14 V62(0)
+i15 V59(0)
+i16 V174(0)
+i17 V215(0)
+i18 V66(0)
+i19 V70(0)
+i20 V43(0)
+i21 V214(0)
+i22 V37(0)
+i23 V271(0)
+i24 V40(0)
+i25 V45(0)
+i26 V149(7)
+i27 V149(6)
+i28 V149(5)
+i29 V149(4)
+i30 V1(0)
+i31 V7(0)
+i32 V34(0)
+i33 V243(0)
+i34 V244(0)
+i35 V245(0)
+i36 V246(0)
+i37 V247(0)
+i38 V293(0)
+i39 V302(0)
+i40 V270(0)
+i41 V269(0)
+i42 V274(0)
+i43 V202(0)
+i44 V275(0)
+i45 V257(7)
+i46 V257(5)
+i47 V257(3)
+i48 V257(1)
+i49 V257(2)
+i50 V257(4)
+i51 V257(6)
+i52 V9(0)
+i53 V149(0)
+i54 V149(1)
+i55 V149(2)
+i56 V149(3)
+i57 V169(1)
+i58 V165(0)
+i59 V165(2)
+i60 V165(4)
+i61 V165(5)
+i62 V165(6)
+i63 V165(7)
+i64 V165(1)
+i65 V88(2)
+i66 V88(3)
+i67 V55(0)
+i68 V169(0)
+i69 V52(0)
+i70 V5(0)
+i71 V6(0)
+i72 V12(0)
+i73 V11(0)
+i74 V4(0)
+i75 V165(3)
+i76 V51(0)
+i77 V65(0)
+i78 V290(0)
+i79 V279(0)
+i80 V280(0)
+i81 V288(4)
+i82 V288(2)
+i83 V288(0)
+i84 V258(0)
+i85 V229(5)
+i86 V229(4)
+i87 V229(3)
+i88 V229(2)
+i89 V229(1)
+i90 V229(0)
+i91 V223(5)
+i92 V223(4)
+i93 V223(3)
+i94 V223(2)
+i95 V223(1)
+i96 V223(0)
+i97 V189(5)
+i98 V189(4)
+i99 V189(3)
+i100 V189(2)
+i101 V189(1)
+i102 V189(0)
+i103 V183(5)
+i104 V183(4)
+i105 V183(3)
+i106 V183(2)
+i107 V183(1)
+i108 V183(0)
+i109 V239(4)
+i110 V239(3)
+i111 V239(2)
+i112 V239(1)
+i113 V239(0)
+i114 V234(4)
+i115 V234(3)
+i116 V234(2)
+i117 V234(1)
+i118 V234(0)
+i119 V199(4)
+i120 V199(3)
+i121 V199(2)
+i122 V199(1)
+i123 V199(0)
+i124 V194(4)
+i125 V194(3)
+i126 V194(2)
+i127 V194(1)
+i128 V194(0)
+i129 V257(0)
+i130 V32(8)
+i131 V32(7)
+i132 V32(6)
+i133 V32(5)
+i134 V32(4)
+i135 V32(11)
+i136 V32(10)
+i137 V32(9)
+i138 V88(1)
+i139 V88(0)
+i140 V84(5)
+i141 V84(4)
+i142 V84(3)
+i143 V84(2)
+i144 V84(1)
+i145 V84(0)
+i146 V78(5)
+i147 V78(4)
+i148 V2(0)
+i149 V3(0)
+i150 V14(0)
+i151 V213(0)
+i152 V213(5)
+i153 V213(4)
+i154 V213(3)
+i155 V213(2)
+i156 V213(1)
+i157 V268(5)
+i158 V268(3)
+i159 V268(1)
+i160 V268(2)
+i161 V268(4)
+i162 V8(0)
+i163 V60(0)
+i164 V53(0)
+i165 V57(0)
+i166 V109(0)
+i167 V277(0)
+i168 V278(0)
+i169 V259(0)
+i170 V260(0)
+i171 V67(0)
+i172 V68(0)
+i173 V69(0)
+i174 V216(0)
+i175 V175(0)
+i176 V177(0)
+i177 V172(0)
+i178 V171(0)
+i179 V50(0)
+i180 V63(0)
+i181 V71(0)
+i182 V292(0)
+i183 V291(0)
+i184 V91(0)
+i185 V91(1)
+i186 V294(0)
+i187 V207(0)
+i188 V295(0)
+i189 V204(0)
+i190 V205(0)
+i191 V261(0)
+i192 V262(0)
+i193 V100(0)
+i194 V100(5)
+i195 V100(4)
+i196 V100(3)
+i197 V100(2)
+i198 V100(1)
+i199 V240(0)
+i200 V242(0)
+i201 V241(0)
+i202 V33(0)
+i203 V16(0)
+i204 V15(0)
+i205 V101(0)
+i206 V268(0)
+i207 V288(1)
+i208 V288(3)
+i209 V288(5)
+i210 V301(0)
+i211 V108(0)
+i212 V108(1)
+i213 V108(2)
+i214 V108(3)
+i215 V108(4)
+i216 V108(5)
+i217 V124(5)
+i218 V124(4)
+i219 V124(3)
+i220 V124(2)
+i221 V124(1)
+i222 V124(0)
+i223 V132(7)
+i224 V132(6)
+i225 V132(5)
+i226 V132(4)
+i227 V132(3)
+i228 V132(2)
+i229 V132(1)
+i230 V132(0)
+i231 V118(5)
+i232 V118(4)
+i233 V118(3)
+i234 V118(2)
+i235 V118(1)
+i236 V118(0)
+i237 V118(7)
+i238 V118(6)
+i239 V46(0)
+i240 V48(0)
+i241 V102(0)
+i242 V110(0)
+i243 V134(1)
+i244 V134(0)
+i245 V272(0)
+i246 V78(2)
+i247 V78(3)
+i248 V39(0)
+i249 V38(0)
+i250 V42(0)
+i251 V44(0)
+i252 V41(0)
+i253 V78(1)
+i254 V78(0)
+i255 V94(0)
+i256 V94(1)
+o0 V321(2)
+o1 V356
+o2 V357
+o3 V373
+o4 V375(0)
+o5 V377
+o6 V393(0)
+o7 V398(0)
+o8 V410(0)
+o9 V423(0)
+o10 V432
+o11 V435(0)
+o12 V500(0)
+o13 V508(0)
+o14 V511(0)
+o15 V512
+o16 V527
+o17 V537
+o18 V538
+o19 V539
+o20 V540
+o21 V541
+o22 V542
+o23 V543
+o24 V544
+o25 V545
+o26 V546
+o27 V547
+o28 V548
+o29 V572(9)
+o30 V572(8)
+o31 V572(7)
+o32 V572(6)
+o33 V572(5)
+o34 V572(4)
+o35 V572(3)
+o36 V572(2)
+o37 V572(1)
+o38 V572(0)
+o39 V585(0)
+o40 V587
+o41 V591(0)
+o42 V597(0)
+o43 V603(0)
+o44 V609(0)
+o45 V620
+o46 V621
+o47 V630
+o48 V634(0)
+o49 V640(0)
+o50 V657
+o51 V707
+o52 V763
+o53 V775
+o54 V778
+o55 V779
+o56 V780
+o57 V781
+o58 V782
+o59 V783
+o60 V784
+o61 V787
+o62 V789
+o63 V798(0)
+o64 V801
+o65 V802(0)
+o66 V821(0)
+o67 V826(0)
+o68 V966
+o69 V986
+o70 V1213(11)
+o71 V1213(10)
+o72 V1213(9)
+o73 V1213(8)
+o74 V1213(7)
+o75 V1213(6)
+o76 V1213(5)
+o77 V1213(4)
+o78 V1213(3)
+o79 V1213(2)
+o80 V1213(1)
+o81 V1213(0)
+o82 V1243(9)
+o83 V1243(8)
+o84 V1243(7)
+o85 V1243(6)
+o86 V1243(5)
+o87 V1243(4)
+o88 V1243(3)
+o89 V1243(2)
+o90 V1243(1)
+o91 V1243(0)
+o92 V1256
+o93 V1257
+o94 V1258
+o95 V1259
+o96 V1260
+o97 V1261
+o98 V1262
+o99 V1263
+o100 V1264
+o101 V1265
+o102 V1266
+o103 V1267
+o104 V1274(0)
+o105 V1281(0)
+o106 V1297(4)
+o107 V1297(3)
+o108 V1297(2)
+o109 V1297(1)
+o110 V1297(0)
+o111 V1365
+o112 V1375
+o113 V1378
+o114 V1380
+o115 V1382
+o116 V1384
+o117 V1386
+o118 V1387
+o119 V1392(0)
+o120 V1423
+o121 V1426
+o122 V1428
+o123 V1429
+o124 V1431
+o125 V1432
+o126 V1439(0)
+o127 V1440(0)
+o128 V1451(0)
+o129 V1459(0)
+o130 V1467(0)
+o131 V1470
+o132 V1480(0)
+o133 V1481(0)
+o134 V1492(0)
+o135 V1495(0)
+o136 V1512(3)
+o137 V1512(2)
+o138 V1512(1)
+o139 V1536(0)
+o140 V1537
+o141 V1539
+o142 V1552(1)
+o143 V1552(0)
+o144 V1613(0)
+o145 V1613(1)
+o146 V1620(0)
+o147 V1629(0)
+o148 V1645(0)
+o149 V1652(0)
+o150 V1669
+o151 V1671(0)
+o152 V1679(0)
+o153 V1693(0)
+o154 V1709(4)
+o155 V1709(3)
+o156 V1709(2)
+o157 V1709(1)
+o158 V1709(0)
+o159 V1717(0)
+o160 V1719
+o161 V1726(0)
+o162 V1736
+o163 V1741(0)
+o164 V1745(0)
+o165 V1757(0)
+o166 V1758(0)
+o167 V1759(0)
+o168 V1760(0)
+o169 V1771(1)
+o170 V1771(0)
+o171 V1781(1)
+o172 V1781(0)
+o173 V1829(9)
+o174 V1829(8)
+o175 V1829(7)
+o176 V1829(6)
+o177 V1829(5)
+o178 V1829(4)
+o179 V1829(3)
+o180 V1829(2)
+o181 V1829(1)
+o182 V1829(0)
+o183 V1832
+o184 V1833(0)
+o185 V1863(0)
+o186 V1864(0)
+o187 V1896(0)
+o188 V1897(0)
+o189 V1898(0)
+o190 V1899(0)
+o191 V1900(0)
+o192 V1901(0)
+o193 V1921(5)
+o194 V1921(4)
+o195 V1921(3)
+o196 V1921(2)
+o197 V1921(1)
+o198 V1921(0)
+o199 V1953(1)
+o200 V1953(7)
+o201 V1953(6)
+o202 V1953(5)
+o203 V1953(4)
+o204 V1953(3)
+o205 V1953(2)
+o206 V1953(0)
+o207 V1960(1)
+o208 V1960(0)
+o209 V1968(0)
+o210 V1992(1)
+o211 V1992(0)
+o212 V650
+o213 V651
+o214 V652
+o215 V653
+o216 V654
+o217 V655
+o218 V656
+o219 V1370
+o220 V1371
+o221 V1372
+o222 V1373
+o223 V1374
+c
+i10
+This file was written by ABC on Sat Mar 12 12:08:09 2011
+For information about AIGER format, refer to http://fmv.jku.at/aiger
diff --git a/readme b/readme
index e2ba3573..3060ce43 100644
--- a/readme
+++ b/readme
@@ -15,24 +15,41 @@ the calling application. A simple demo program (file src/demo.c) shows how to
create a stand-alone program performing DAG-aware AIG rewriting, by calling
APIs of ABC compiled as a static library.
-To build demo program
+To build the demo program
- Copy demo.cc and libabc.a to the working directory
- Run "gcc -Wall -g -c demo.c -o demo.o"
- Run "gcc -g -o demo demo.o libabc.a -lm -ldl -rdynamic -lreadline -ltermcap -lpthread"
-To run demo program, give it a file with the logic network in AIGER or BLIF. For example:
+To run the demo program, give it a file with the logic network in AIGER or BLIF. For example:
-[alanmi@mima] ~/abc> demo i10.aig
-i10 : i/o = 257/ 224 lat = 0 and = 2396 lev = 37
-i10 : i/o = 257/ 224 lat = 0 and = 1851 lev = 35
-Networks are equivalent.
-Reading = 0.00 sec Rewriting = 0.18 sec Verification = 0.41 sec
+> [alanmi@mima] ~/abc> demo i10.aig
+> i10 : i/o = 257/ 224 lat = 0 and = 2396 lev = 37
+> i10 : i/o = 257/ 224 lat = 0 and = 1851 lev = 35
+> Networks are equivalent.
+> Reading = 0.00 sec Rewriting = 0.18 sec Verification = 0.41 sec
+
+The same can be produced by running the binary in the command-line mode:
+
+> [alanmi@mima] ~/abc> ./abc
+> UC Berkeley, ABC 1.01 (compiled Oct 6 2012 19:05:18)
+> abc 01> r i10.aig; b; ps; b; rw -l; rw -lz; b; rw -lz; b; ps; cec
+> i10 : i/o = 257/ 224 lat = 0 and = 2396 lev = 37
+> i10 : i/o = 257/ 224 lat = 0 and = 1851 lev = 35
+> Networks are equivalent.
+
+or in the batch mode:
+
+> [alanmi@mima] ~/abc> ./abc -c "r i10.aig; b; ps; b; rw -l; rw -lz; b; rw -lz; b; ps; cec"
+> ABC command line: "r i10.aig; b; ps; b; rw -l; rw -lz; b; rw -lz; b; ps; cec".
+> i10 : i/o = 257/ 224 lat = 0 and = 2396 lev = 37
+> i10 : i/o = 257/ 224 lat = 0 and = 1851 lev = 35
+> Networks are equivalent.
Compiling as C or C++
-The current version of ABC can be compiled with both C compiler and C++ compiler.
+The current version of ABC can be compiled with C compiler or C++ compiler.
To compile as C code (default): make sure that CC=gcc and ABC_NAMESPACE is not defined.
To compile as C++ code without namespaces: make sure that CC=g++ and ABC_NAMESPACE is not defined.
@@ -58,10 +75,10 @@ Trouble shooting:
(1) If compilation does not start because of the cyclic dependency check,
try touching all files as follows: find ./ -type f -exec touch "{}" \;
-(2) If compilation fails because 'readline' is missing, install 'readline' or
-comment out line 26 "#define ABC_USE_READ_LINE" in file "src/base/main/mainUtils.c"
+(2) If compilation fails because readline is missing, install 'readline' library or
+comment out line 26 "#define ABC_USE_READLINE" in file "src/base/main/mainUtils.c"
-(4) If compilation fails because 'pthread' is missing, install 'pthreads' library or
+(4) If compilation fails because pthreads are missing, install 'pthread' library or
comment out line 29 "#define ABC_USE_PTHREADS" in file "src/base/cmd/cmdStarter.c"
and in file "src/proof/abs/absPth.c"
@@ -69,6 +86,8 @@ and in file "src/proof/abs/absPth.c"
- Remove "src/base/main/libSupport.c" from "src/base/main/module.make"
- Comment out calls to Libs_Init() and Libs_End() in "src/base/main/mainInit.c"
+(6) On some systems, readline requires adding '-lcurses' to Makefile.
+
The following comment was added by Krish Sundaresan:
diff --git a/src/base/main/mainUtils.c b/src/base/main/mainUtils.c
index 67bf3664..8d24a123 100644
--- a/src/base/main/mainUtils.c
+++ b/src/base/main/mainUtils.c
@@ -23,10 +23,10 @@
#if !defined(_WIN32) && !defined(AIX)
// comment out the following line if 'readline' is not available
-#define ABC_USE_READ_LINE
+#define ABC_USE_READLINE
#endif
-#ifdef ABC_USE_READ_LINE
+#ifdef ABC_USE_READLINE
#include <readline/readline.h>
#include <readline/history.h>
#endif
@@ -76,7 +76,7 @@ char * Abc_UtilsGetUsersInput( Abc_Frame_t * pAbc )
{
static char Prompt[5000];
sprintf( Prompt, "abc %02d> ", pAbc->nSteps );
-#ifdef ABC_USE_READ_LINE
+#ifdef ABC_USE_READLINE
{
static char * line = NULL;
if (line != NULL) ABC_FREE(line);