summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2016-09-19 11:52:51 -0600
committerTuowen Zhao <ztuowen@gmail.com>2016-09-19 11:52:51 -0600
commit372c92e7c1901dd7bdd1d2fd48bff205c31dca2d (patch)
tree439073a6481f50b26e2e881999cc568619628987
parent62f7acd88465f4f20b9b25c3f7edd4e3b7ce453b (diff)
downloadchill-372c92e7c1901dd7bdd1d2fd48bff205c31dca2d.tar.gz
chill-372c92e7c1901dd7bdd1d2fd48bff205c31dca2d.tar.bz2
chill-372c92e7c1901dd7bdd1d2fd48bff205c31dca2d.zip
remove omegacalc as subproject
-rw-r--r--omegalib/CMakeLists.txt1
-rw-r--r--omegalib/examples/basics30
-rw-r--r--omegalib/examples/basics.out76
-rw-r--r--omegalib/examples/c_code/Makefile21
-rw-r--r--omegalib/examples/c_code/PT-example.c12
-rw-r--r--omegalib/examples/c_code/example.c89
-rw-r--r--omegalib/examples/c_code/library_example.c190
-rw-r--r--omegalib/examples/code_gen60
-rw-r--r--omegalib/examples/code_gen.out33
-rwxr-xr-xomegalib/examples/experiments/gemm/codegen.input14
-rw-r--r--omegalib/examples/experiments/gemm/gemm.out58
-rwxr-xr-xomegalib/examples/experiments/gemv/codegen.input14
-rw-r--r--omegalib/examples/experiments/gemv/gemv.out40
-rwxr-xr-xomegalib/examples/experiments/lu/codegen.input33
-rw-r--r--omegalib/examples/experiments/lu/lu.out141
-rwxr-xr-xomegalib/examples/experiments/qr/codegen.input17
-rw-r--r--omegalib/examples/experiments/qr/qr.out54
-rwxr-xr-xomegalib/examples/experiments/swim/swim-codegen.input53
-rw-r--r--omegalib/examples/experiments/swim/swim.out176
-rw-r--r--omegalib/examples/floor_bound46
-rw-r--r--omegalib/examples/floor_bound.out76
-rw-r--r--omegalib/examples/gist60
-rw-r--r--omegalib/examples/gist.out110
-rw-r--r--omegalib/examples/hpf49
-rw-r--r--omegalib/examples/hpf.out59
-rw-r--r--omegalib/examples/hull102
-rw-r--r--omegalib/examples/hull.out40
-rwxr-xr-xomegalib/examples/if_then19
-rw-r--r--omegalib/examples/interface15
-rw-r--r--omegalib/examples/interface.out36
-rw-r--r--omegalib/examples/lu41
-rw-r--r--omegalib/examples/lu.out117
-rw-r--r--omegalib/examples/old_test/affineClosure19
-rw-r--r--omegalib/examples/old_test/affineClosure.oc-rt32
-rw-r--r--omegalib/examples/old_test/affineClosure255
-rw-r--r--omegalib/examples/old_test/affineClosure2.oc-rt70
-rw-r--r--omegalib/examples/old_test/beatrice251
-rw-r--r--omegalib/examples/old_test/beatrice2.oc-rt56
-rw-r--r--omegalib/examples/old_test/blume1.w6
-rw-r--r--omegalib/examples/old_test/blume1.w.oc-rt12
-rw-r--r--omegalib/examples/old_test/cfft2d121
-rw-r--r--omegalib/examples/old_test/cfft2d1.oc-rt29
-rw-r--r--omegalib/examples/old_test/chosol11
-rw-r--r--omegalib/examples/old_test/chosol.oc-rt32
-rw-r--r--omegalib/examples/old_test/closure18
-rw-r--r--omegalib/examples/old_test/closure1.oc-rt31
-rw-r--r--omegalib/examples/old_test/closure24
-rw-r--r--omegalib/examples/old_test/closure2.oc-rt22
-rw-r--r--omegalib/examples/old_test/closure310
-rw-r--r--omegalib/examples/old_test/closure3.oc-rt48
-rw-r--r--omegalib/examples/old_test/closure48
-rw-r--r--omegalib/examples/old_test/closure4.oc-rt28
-rw-r--r--omegalib/examples/old_test/closure56
-rw-r--r--omegalib/examples/old_test/closure5.oc-rt18
-rw-r--r--omegalib/examples/old_test/closure613
-rw-r--r--omegalib/examples/old_test/closure6.oc-rt29
-rw-r--r--omegalib/examples/old_test/closure712
-rw-r--r--omegalib/examples/old_test/closure7.oc-rt36
-rw-r--r--omegalib/examples/old_test/closure81
-rw-r--r--omegalib/examples/old_test/closure8.oc-rt6
-rw-r--r--omegalib/examples/old_test/collard16
-rw-r--r--omegalib/examples/old_test/collard.oc-rt49
-rw-r--r--omegalib/examples/old_test/cover6
-rw-r--r--omegalib/examples/old_test/cover.oc-rt16
-rw-r--r--omegalib/examples/old_test/dagstuhl17
-rw-r--r--omegalib/examples/old_test/dagstuhl1.oc-rt23
-rw-r--r--omegalib/examples/old_test/dagstuhl26
-rw-r--r--omegalib/examples/old_test/dagstuhl2.oc-rt11
-rw-r--r--omegalib/examples/old_test/dagstuhl34
-rw-r--r--omegalib/examples/old_test/dagstuhl3.oc-rt9
-rw-r--r--omegalib/examples/old_test/davew125
-rw-r--r--omegalib/examples/old_test/davew1.oc-rt67
-rw-r--r--omegalib/examples/old_test/ddtest97
-rw-r--r--omegalib/examples/old_test/ddtest.oc-rt152
-rw-r--r--omegalib/examples/old_test/emit38
-rw-r--r--omegalib/examples/old_test/emit.oc-rt61
-rw-r--r--omegalib/examples/old_test/example14
-rw-r--r--omegalib/examples/old_test/example1.oc-rt10
-rw-r--r--omegalib/examples/old_test/farkas8
-rw-r--r--omegalib/examples/old_test/farkas.oc-rt17
-rw-r--r--omegalib/examples/old_test/farkas26
-rw-r--r--omegalib/examples/old_test/farkas2.oc-rt22
-rw-r--r--omegalib/examples/old_test/farkas33
-rw-r--r--omegalib/examples/old_test/farkas3.oc-rt9
-rw-r--r--omegalib/examples/old_test/fc123
-rw-r--r--omegalib/examples/old_test/fc1.oc-rt89
-rw-r--r--omegalib/examples/old_test/fc229
-rw-r--r--omegalib/examples/old_test/fc2.oc-rt115
-rw-r--r--omegalib/examples/old_test/foo13
-rw-r--r--omegalib/examples/old_test/foo.oc-rt37
-rw-r--r--omegalib/examples/old_test/foo23
-rw-r--r--omegalib/examples/old_test/foo2.oc-rt8
-rw-r--r--omegalib/examples/old_test/foo61
-rw-r--r--omegalib/examples/old_test/foo6.oc-rt6
-rw-r--r--omegalib/examples/old_test/forall21
-rw-r--r--omegalib/examples/old_test/forall.oc-rt28
-rw-r--r--omegalib/examples/old_test/gc6
-rw-r--r--omegalib/examples/old_test/gc.oc-rt20
-rw-r--r--omegalib/examples/old_test/ge9
-rw-r--r--omegalib/examples/old_test/ge.oc-rt38
-rw-r--r--omegalib/examples/old_test/givens215
-rw-r--r--omegalib/examples/old_test/givens2.oc-rt38
-rw-r--r--omegalib/examples/old_test/guard111
-rw-r--r--omegalib/examples/old_test/guard1.oc-rt25
-rw-r--r--omegalib/examples/old_test/hull14
-rw-r--r--omegalib/examples/old_test/hull1.oc-rt14
-rw-r--r--omegalib/examples/old_test/hull23
-rw-r--r--omegalib/examples/old_test/hull2.oc-rt14
-rw-r--r--omegalib/examples/old_test/hull317
-rw-r--r--omegalib/examples/old_test/hull3.oc-rt40
-rw-r--r--omegalib/examples/old_test/ip113
-rw-r--r--omegalib/examples/old_test/ip1.oc-rt15
-rw-r--r--omegalib/examples/old_test/ip211
-rw-r--r--omegalib/examples/old_test/ip2.oc-rt13
-rw-r--r--omegalib/examples/old_test/ip318
-rw-r--r--omegalib/examples/old_test/ip3.oc-rt23
-rw-r--r--omegalib/examples/old_test/iter12
-rw-r--r--omegalib/examples/old_test/iter1.oc-rt9
-rw-r--r--omegalib/examples/old_test/iter22
-rw-r--r--omegalib/examples/old_test/iter2.oc-rt11
-rw-r--r--omegalib/examples/old_test/iter32
-rw-r--r--omegalib/examples/old_test/iter3.oc-rt11
-rw-r--r--omegalib/examples/old_test/iter42
-rw-r--r--omegalib/examples/old_test/iter4.oc-rt11
-rw-r--r--omegalib/examples/old_test/iter52
-rw-r--r--omegalib/examples/old_test/iter5.oc-rt11
-rw-r--r--omegalib/examples/old_test/iter66
-rw-r--r--omegalib/examples/old_test/iter6.oc-rt22
-rw-r--r--omegalib/examples/old_test/iter73
-rw-r--r--omegalib/examples/old_test/iter7.oc-rt15
-rw-r--r--omegalib/examples/old_test/iter812
-rw-r--r--omegalib/examples/old_test/iter8.oc-rt23
-rw-r--r--omegalib/examples/old_test/iter940
-rw-r--r--omegalib/examples/old_test/iter9.oc-rt121
-rw-r--r--omegalib/examples/old_test/lefur0015
-rw-r--r--omegalib/examples/old_test/lefur00.oc-rt28
-rw-r--r--omegalib/examples/old_test/lefur0114
-rw-r--r--omegalib/examples/old_test/lefur01.oc-rt103
-rw-r--r--omegalib/examples/old_test/lefur0316
-rw-r--r--omegalib/examples/old_test/lefur03-320
-rw-r--r--omegalib/examples/old_test/lefur03-3.oc-rt107
-rw-r--r--omegalib/examples/old_test/lefur03.c36
-rw-r--r--omegalib/examples/old_test/lefur03.oc-rt35
-rw-r--r--omegalib/examples/old_test/lefur0419
-rw-r--r--omegalib/examples/old_test/lefur04.oc-rt42
-rw-r--r--omegalib/examples/old_test/lefur0549
-rw-r--r--omegalib/examples/old_test/lefur05.oc-rt118
-rw-r--r--omegalib/examples/old_test/lift116
-rw-r--r--omegalib/examples/old_test/lift1.oc-rt147
-rw-r--r--omegalib/examples/old_test/lift216
-rw-r--r--omegalib/examples/old_test/lift2.oc-rt190
-rw-r--r--omegalib/examples/old_test/long_input2
-rw-r--r--omegalib/examples/old_test/long_input.oc-rt11
-rw-r--r--omegalib/examples/old_test/lu_ijk17
-rw-r--r--omegalib/examples/old_test/lu_ijk.oc-rt81
-rw-r--r--omegalib/examples/old_test/lu_spmd19
-rw-r--r--omegalib/examples/old_test/lu_spmd.oc-rt58
-rw-r--r--omegalib/examples/old_test/m16
-rw-r--r--omegalib/examples/old_test/m1.oc-rt41
-rw-r--r--omegalib/examples/old_test/m105
-rw-r--r--omegalib/examples/old_test/m10.oc-rt47
-rw-r--r--omegalib/examples/old_test/m1110
-rw-r--r--omegalib/examples/old_test/m11.oc-rt32
-rw-r--r--omegalib/examples/old_test/m128
-rw-r--r--omegalib/examples/old_test/m12.oc-rt54
-rw-r--r--omegalib/examples/old_test/m24
-rw-r--r--omegalib/examples/old_test/m2.oc-rt35
-rw-r--r--omegalib/examples/old_test/m32
-rw-r--r--omegalib/examples/old_test/m3.oc-rt11
-rw-r--r--omegalib/examples/old_test/m411
-rw-r--r--omegalib/examples/old_test/m4.oc-rt28
-rw-r--r--omegalib/examples/old_test/m76
-rw-r--r--omegalib/examples/old_test/m7.oc-rt35
-rw-r--r--omegalib/examples/old_test/m86
-rw-r--r--omegalib/examples/old_test/m8.oc-rt35
-rw-r--r--omegalib/examples/old_test/m95
-rw-r--r--omegalib/examples/old_test/m9.oc-rt20
-rw-r--r--omegalib/examples/old_test/maximize7
-rw-r--r--omegalib/examples/old_test/maximize.oc-rt24
-rw-r--r--omegalib/examples/old_test/olda9
-rw-r--r--omegalib/examples/old_test/olda.oc-rt52
-rw-r--r--omegalib/examples/old_test/p.delft22
-rw-r--r--omegalib/examples/old_test/p.delft.oc-rt43
-rw-r--r--omegalib/examples/old_test/p.delft224
-rw-r--r--omegalib/examples/old_test/p.delft2.oc-rt80
-rw-r--r--omegalib/examples/old_test/p.delft320
-rw-r--r--omegalib/examples/old_test/p.delft3.oc-rt29
-rw-r--r--omegalib/examples/old_test/p.subset3
-rw-r--r--omegalib/examples/old_test/p.subset.oc-rt10
-rw-r--r--omegalib/examples/old_test/p11
-rw-r--r--omegalib/examples/old_test/p1.oc-rt6
-rw-r--r--omegalib/examples/old_test/p101
-rw-r--r--omegalib/examples/old_test/p10.oc-rt6
-rw-r--r--omegalib/examples/old_test/p1110
-rw-r--r--omegalib/examples/old_test/p11.oc-rt17
-rw-r--r--omegalib/examples/old_test/p127
-rw-r--r--omegalib/examples/old_test/p12.oc-rt33
-rw-r--r--omegalib/examples/old_test/p133
-rw-r--r--omegalib/examples/old_test/p13.oc-rt13
-rw-r--r--omegalib/examples/old_test/p21
-rw-r--r--omegalib/examples/old_test/p2.oc-rt6
-rw-r--r--omegalib/examples/old_test/p32
-rw-r--r--omegalib/examples/old_test/p3.oc-rt8
-rw-r--r--omegalib/examples/old_test/p45
-rw-r--r--omegalib/examples/old_test/p4.oc-rt22
-rw-r--r--omegalib/examples/old_test/p58
-rw-r--r--omegalib/examples/old_test/p5.oc-rt16
-rw-r--r--omegalib/examples/old_test/p625
-rw-r--r--omegalib/examples/old_test/p6.oc-rt129
-rw-r--r--omegalib/examples/old_test/p71
-rw-r--r--omegalib/examples/old_test/p7.oc-rt7
-rw-r--r--omegalib/examples/old_test/p86
-rw-r--r--omegalib/examples/old_test/p8.oc-rt21
-rw-r--r--omegalib/examples/old_test/p97
-rw-r--r--omegalib/examples/old_test/p9.oc-rt13
-rw-r--r--omegalib/examples/old_test/pufs12
-rw-r--r--omegalib/examples/old_test/pufs1.oc-rt9
-rw-r--r--omegalib/examples/old_test/pufs29
-rw-r--r--omegalib/examples/old_test/pufs2.oc-rt35
-rw-r--r--omegalib/examples/old_test/pufs38
-rw-r--r--omegalib/examples/old_test/pufs3.oc-rt29
-rw-r--r--omegalib/examples/old_test/pufs416
-rw-r--r--omegalib/examples/old_test/pufs4.oc-rt26
-rw-r--r--omegalib/examples/old_test/pufs522
-rw-r--r--omegalib/examples/old_test/pufs5.oc-rt98
-rw-r--r--omegalib/examples/old_test/pufs619
-rw-r--r--omegalib/examples/old_test/pufs6.oc-rt42
-rw-r--r--omegalib/examples/old_test/pufs76
-rw-r--r--omegalib/examples/old_test/pufs7.oc-rt18
-rw-r--r--omegalib/examples/old_test/reach15
-rw-r--r--omegalib/examples/old_test/reach1.oc-rt9
-rw-r--r--omegalib/examples/old_test/reach229
-rw-r--r--omegalib/examples/old_test/reach2.oc-rt61
-rw-r--r--omegalib/examples/old_test/reach318
-rw-r--r--omegalib/examples/old_test/reach3.oc-rt40
-rw-r--r--omegalib/examples/old_test/red13
-rw-r--r--omegalib/examples/old_test/red1.oc-rt10
-rw-r--r--omegalib/examples/old_test/saman20
-rw-r--r--omegalib/examples/old_test/saman.oc-rt31
-rw-r--r--omegalib/examples/old_test/sample114
-rw-r--r--omegalib/examples/old_test/sample1.oc-rt39
-rw-r--r--omegalib/examples/old_test/sample211
-rw-r--r--omegalib/examples/old_test/sample2.oc-rt33
-rw-r--r--omegalib/examples/old_test/sample311
-rw-r--r--omegalib/examples/old_test/sample3.oc-rt37
-rw-r--r--omegalib/examples/old_test/stodghil21
-rw-r--r--omegalib/examples/old_test/stodghil.oc-rt28
-rw-r--r--omegalib/examples/old_test/stride12
-rw-r--r--omegalib/examples/old_test/stride1.oc-rt9
-rw-r--r--omegalib/examples/old_test/stride24
-rw-r--r--omegalib/examples/old_test/stride2.oc-rt14
-rw-r--r--omegalib/examples/old_test/stride34
-rw-r--r--omegalib/examples/old_test/stride3.oc-rt14
-rw-r--r--omegalib/examples/old_test/stride44
-rw-r--r--omegalib/examples/old_test/stride4.oc-rt12
-rw-r--r--omegalib/examples/old_test/stride54
-rw-r--r--omegalib/examples/old_test/stride5.oc-rt14
-rw-r--r--omegalib/examples/old_test/stride610
-rw-r--r--omegalib/examples/old_test/stride6.oc-rt36
-rw-r--r--omegalib/examples/old_test/stride76
-rw-r--r--omegalib/examples/old_test/stride7.oc-rt47
-rw-r--r--omegalib/examples/old_test/subsets120
-rw-r--r--omegalib/examples/old_test/subsets1.oc-rt70
-rw-r--r--omegalib/examples/old_test/subsets25
-rw-r--r--omegalib/examples/old_test/subsets2.oc-rt18
-rw-r--r--omegalib/examples/old_test/tex149
-rw-r--r--omegalib/examples/old_test/tex1.oc-rt58
-rw-r--r--omegalib/examples/old_test/tricky11
-rw-r--r--omegalib/examples/old_test/tricky.oc-rt25
-rw-r--r--omegalib/examples/old_test/ts1d-check-sblock155
-rw-r--r--omegalib/examples/old_test/ts1d-check-sblock.oc-rt227
-rw-r--r--omegalib/examples/old_test/ts1d-check0176
-rw-r--r--omegalib/examples/old_test/ts1d-check0.oc-rt260
-rw-r--r--omegalib/examples/old_test/ts1d-mp-i_ts-m_b289
-rw-r--r--omegalib/examples/old_test/ts1d-mp-i_ts-m_b.oc-rt430
-rw-r--r--omegalib/examples/old_test/ts1d-orig0151
-rw-r--r--omegalib/examples/old_test/ts1d-orig0.oc-rt220
-rw-r--r--omegalib/examples/old_test/tseng16
-rw-r--r--omegalib/examples/old_test/tseng.oc-rt54
-rw-r--r--omegalib/examples/old_test/verlind144
-rw-r--r--omegalib/examples/old_test/verlind1.oc-rt120
-rw-r--r--omegalib/examples/old_test/verlind1a3
-rw-r--r--omegalib/examples/old_test/verlind1a.oc-rt9
-rw-r--r--omegalib/examples/old_test/wak113
-rw-r--r--omegalib/examples/old_test/wak1.oc-rt87
-rw-r--r--omegalib/examples/old_test/wak210
-rw-r--r--omegalib/examples/old_test/wak2.oc-rt307
-rw-r--r--omegalib/examples/old_test/wak312
-rw-r--r--omegalib/examples/old_test/wak3.oc-rt59
-rw-r--r--omegalib/examples/old_test/wak49
-rw-r--r--omegalib/examples/old_test/wak4.oc-rt20
-rw-r--r--omegalib/examples/old_test/wak54
-rw-r--r--omegalib/examples/old_test/wak5.oc-rt11
-rw-r--r--omegalib/examples/old_test/wak614
-rw-r--r--omegalib/examples/old_test/wak6.oc-rt36
-rw-r--r--omegalib/examples/old_test/wak75
-rw-r--r--omegalib/examples/old_test/wak7.oc-rt11
-rw-r--r--omegalib/examples/old_test/wak815
-rw-r--r--omegalib/examples/old_test/wak8.oc-rt30
-rw-r--r--omegalib/examples/old_test/wielage13
-rw-r--r--omegalib/examples/old_test/wielage.oc-rt22
-rw-r--r--omegalib/examples/old_test/wild13
-rw-r--r--omegalib/examples/old_test/wild.oc-rt43
-rw-r--r--omegalib/examples/old_test/wrap12
-rw-r--r--omegalib/examples/old_test/wrap.oc-rt50
-rw-r--r--omegalib/examples/old_test/wrap07
-rw-r--r--omegalib/examples/old_test/wrap0.oc-rt26
-rw-r--r--omegalib/examples/old_test/wrap18
-rw-r--r--omegalib/examples/old_test/wrap1.oc-rt25
-rw-r--r--omegalib/examples/old_test/x9
-rw-r--r--omegalib/examples/old_test/x.oc-rt84
-rw-r--r--omegalib/examples/pufs20
-rw-r--r--omegalib/examples/pufs.out50
-rw-r--r--omegalib/examples/substitution35
-rw-r--r--omegalib/examples/substitution.out60
-rw-r--r--omegalib/examples/syr2k17
-rw-r--r--omegalib/examples/syr2k.out69
-rw-r--r--omegalib/examples/union64
-rw-r--r--omegalib/examples/union.out96
-rw-r--r--omegalib/omegacalc/CMakeLists.txt34
-rw-r--r--omegalib/omegacalc/doc/calculator.pdfbin108062 -> 0 bytes
-rw-r--r--omegalib/omegacalc/include/omega_calc/AST.h310
-rw-r--r--omegalib/omegacalc/include/omega_calc/PT-omega.c81
-rwxr-xr-xomegalib/omegacalc/include/omega_calc/myflex.h27
-rw-r--r--omegalib/omegacalc/src/AST.cc467
-rwxr-xr-xomegalib/omegacalc/src/myflex.cc421
-rw-r--r--omegalib/omegacalc/src/parser.l350
-rwxr-xr-xomegalib/omegacalc/src/parser.ll350
-rw-r--r--omegalib/omegacalc/src/parser.y1925
-rwxr-xr-xomegalib/omegacalc/src/parser.yy1928
330 files changed, 0 insertions, 17112 deletions
diff --git a/omegalib/CMakeLists.txt b/omegalib/CMakeLists.txt
index 43a2af6..501d67a 100644
--- a/omegalib/CMakeLists.txt
+++ b/omegalib/CMakeLists.txt
@@ -12,4 +12,3 @@ set(OMEGAROOT ${PROJECT_SOURCE_DIR})
add_subdirectory(omega)
add_subdirectory(codegen)
-add_subdirectory(omegacalc)
diff --git a/omegalib/examples/basics b/omegalib/examples/basics
deleted file mode 100644
index 9f0728d..0000000
--- a/omegalib/examples/basics
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# Some examples from the documentation for the Omega Calculator
-# This is the input for figures 2 and 3.
-#
-
-R := { [i] -> [i'] : 1 <= i,i' <= 10 && i' = i+1 };
-R;
-inverse R;
-domain R;
-range R;
-R compose R;
-R+; # closure of R = R union (R compose R) union (R compose R ...
-complement R;
-S := {[i] : 5 <= i <= 25};
-S;
-R(S); # apply R to S
-R \ S; # restrict domain of R to S
-R / S; # restrict range of R to S
-(R\S) union (R/S);
-(R\S) intersection (R/S);
-(R/S) - (R\S);
-S*S; # cross product
-D := S - {[9:16:2]} - {[17:19]};
-D;
-T := { [i] : 1 <= i <= 11 & exists (a : i = 2a) };
-T;
-Hull T;
-Hull D;
-codegen D;
-codegen {[i,j] : 1 <= i+j,j <= 10};
diff --git a/omegalib/examples/basics.out b/omegalib/examples/basics.out
deleted file mode 100644
index 6f8f2bb..0000000
--- a/omegalib/examples/basics.out
+++ /dev/null
@@ -1,76 +0,0 @@
->>> #
->>> # Some examples from the documentation for the Omega Calculator
->>> # This is the input for figures 2 and 3.
->>> #
->>>
->>> R := { [i] -> [i'] : 1 <= i,i' <= 10 && i' = i+1 };
->>> R;
-{[i] -> [i+1] : 1 <= i <= 9}
->>> inverse R;
-{[i] -> [i-1] : 2 <= i <= 10}
->>> domain R;
-{[i]: 1 <= i <= 9}
->>> range R;
-{[i]: 2 <= i <= 10}
->>> R compose R;
-{[i] -> [i+2] : 1 <= i <= 8}
->>> R+;
-{[i] -> [i'] : 1 <= i < i' <= 10}
->>> # closure of R = R union (R compose R) union (R compose R ...
->>> complement R;
-{[i] -> [i'] : i <= 0} union
- {[i] -> [i'] : 10 <= i} union
- {[i] -> [i'] : 1, i' <= i <= 9} union
- {[i] -> [i'] : 1 <= i <= 9, i'-2}
->>> S := {[i] : 5 <= i <= 25};
->>> S;
-{[i]: 5 <= i <= 25}
->>> R(S);
-{[i]: 6 <= i <= 10}
->>> # apply R to S
->>> R \ S;
-{[i] -> [i+1] : 5 <= i <= 9}
->>> # restrict domain of R to S
->>> R / S;
-{[i] -> [i+1] : 4 <= i <= 9}
->>> # restrict range of R to S
->>> (R\S) union (R/S);
-{[i] -> [i+1] : 4 <= i <= 9}
->>> (R\S) intersection (R/S);
-{[i] -> [i+1] : 5 <= i <= 9}
->>> (R/S) - (R\S);
-{[4] -> [5] }
->>> S*S;
-{[i] -> [i'] : 5 <= i <= 25 && 5 <= i' <= 25}
->>> # cross product
->>> D := S - {[9:16:2]} - {[17:19]};
->>> D;
-{[i]: 5 <= i <= 8} union
- {[i]: exists ( alpha : 2alpha = i && 10 <= i <= 16)} union
- {[i]: 20 <= i <= 25}
->>> T := { [i] : 1 <= i <= 11 & exists (a : i = 2a) };
->>> T;
-{[i]: exists ( alpha : 2alpha = i && 2 <= i <= 10)}
->>> Hull T;
-{[i]: exists ( alpha : 2alpha = i && 2 <= i <= 10)}
->>> Hull D;
-{[i]: 5 <= i <= 25}
->>> codegen D;
-for(t1 = 5; t1 <= 8; t1++) {
- s0(t1);
-}
-for(t1 = 10; t1 <= 16; t1 += 2) {
- s0(t1);
-}
-for(t1 = 20; t1 <= 25; t1++) {
- s0(t1);
-}
-
->>> codegen {[i,j] : 1 <= i+j,j <= 10};
-for(t1 = -9; t1 <= 9; t1++) {
- for(t2 = max(1,-t1+1); t2 <= min(-t1+10,10); t2++) {
- s0(t1,t2);
- }
-}
-
->>>
diff --git a/omegalib/examples/c_code/Makefile b/omegalib/examples/c_code/Makefile
deleted file mode 100644
index 5d4dd61..0000000
--- a/omegalib/examples/c_code/Makefile
+++ /dev/null
@@ -1,21 +0,0 @@
-CC = g++
-INC_DIR = -I../../include
-LIB_DIR = -L../../lib
-
-all: example library_example
-
-
-example : example.o ../../lib/libomega.a
- ${CC} -g $(LIB_DIR) example.o -lomega -o example
-
-example.o : example.c
- ${CC} -Wall -g $(INC_DIR) -c example.c
-
-library_example : library_example.o ../../lib/libomega.a
- ${CC} -g $(LIB_DIR) library_example.o -lomega -o library_example
-
-library_example.o : library_example.c
- ${CC} -Wall -g $(INC_DIR) -c library_example.c
-
-clean:
- @rm -fr *.o example library_example
diff --git a/omegalib/examples/c_code/PT-example.c b/omegalib/examples/c_code/PT-example.c
deleted file mode 100644
index c2560e7..0000000
--- a/omegalib/examples/c_code/PT-example.c
+++ /dev/null
@@ -1,12 +0,0 @@
-#if defined DONT_INCLUDE_TEMPLATE_CODE
-
-/* DONT BOTHER COMPILING THIS FILE UNLESS WE ARE USING G++ >= 260
- AND -fno-implicit-templates AND -DDONT_INCLUDE_TEMPLATE_CODE */
-
-#undef DONT_INCLUDE_TEMPLATE_CODE
-
-#include <omega_calc/PT-omega.c>
-
-// If we needed other templates, we would put them here
-
-#endif
diff --git a/omegalib/examples/c_code/example.c b/omegalib/examples/c_code/example.c
deleted file mode 100644
index 8bd84b3..0000000
--- a/omegalib/examples/c_code/example.c
+++ /dev/null
@@ -1,89 +0,0 @@
-#include <omega.h>
-
-// THIS NEEDS TO BE A LOT SIMPLER - I'M CUTTING IT DOWN
-
-// R := { [i,j] -> [i', j'] :
-// 1 <= i, i' <= n && 1 <= j <= L(i) && 1 <= j' <= m &&
-// j = j' && i < i' }
-//
-// S := { [x,y] : 1 <= x <= n && y <= x + 5 && x is divisible by 17 &&
-// there exists z such that y <= z <= x &&
-// ( z is divisible by 8 || z+5x is divisible by 12 ) }
-
-using namespace omega;
-int main() {
- Relation S(2);
- S.name_set_var(1, "x");
- S.name_set_var(2, "y");
-
- assert( S.is_set());
-
- Free_Var_Decl n("n");
-
-
-/* Relation R(2,2); */
-/* assert(!R.is_set()); */
-
-/* Free_Var_Decl m("m"); */
-/* Free_Var_Decl l("L", 1); */
-
-/* Variable_ID local_n = R.get_local(&n); */
-/* Variable_ID local_m = R.get_local(&m); */
-/* Variable_ID l_in = R.get_local(&l, Input_Tuple); */
-/* Variable_ID l_out = R.get_local(&l, Output_Tuple); */
-
-/* Variable_ID in1 = R.input_var(1); */
-/* Variable_ID in2 = R.input_var(2); */
-/* Variable_ID out1 = R.output_var(1); */
-/* Variable_ID out2 = R.output_var(2); */
-
- Variable_ID x = S.set_var(1);
- Variable_ID y = S.set_var(2);
-
- F_And *S_root = S.add_and();
-
- GEQ_Handle xmin = S_root->add_GEQ(); // x-1 >= 0
- xmin.update_coef(x, 1);
- xmin.update_const(-1);
- GEQ_Handle xmax = S_root->add_GEQ(); // n-x >= 0
- xmax.update_coef(x, -1);
- xmax.update_coef(S.get_local(&n), 1);
- GEQ_Handle ymax = S_root->add_GEQ(); // x+5-y >= 0
- ymax.update_coef(x, 1);
- ymax.update_coef(y, -1);
- ymax.update_const(5);
-
- // x is divisible by 17
- S_root->add_stride(17).update_coef(x,1);
-
- F_Exists *e = S_root->add_exists();
-
- Variable_ID z = e->declare("z"); // exists z
- F_And *z_stuff = e->add_and();
-
- GEQ_Handle zmin = z_stuff->add_GEQ(); // z-y >= 0
- zmin.update_coef(z,1);
- zmin.update_coef(y,-1);
- GEQ_Handle zmax = z_stuff->add_GEQ(); // x-z >= 0
- zmax.update_coef(x,1);
- zmax.update_coef(z,-1);
-
- F_Or *o = z_stuff->add_or();
- Stride_Handle z8 = o->add_and()->add_stride(8);
- z8.update_coef(z,1); // z divisible by 8
-
- Stride_Handle z12 = o->add_and()->add_stride(12);
- z12.update_coef(z,1);
- z12.update_coef(x,5); // z+5x divisible by 12
-
-
- S.print();
- S.finalize();
- S.prefix_print();
- S.is_upper_bound_satisfiable();
- S.print();
- S.prefix_print();
-
- return 0;
-}
-
diff --git a/omegalib/examples/c_code/library_example.c b/omegalib/examples/c_code/library_example.c
deleted file mode 100644
index 06f6570..0000000
--- a/omegalib/examples/c_code/library_example.c
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- IF THESE EXAMPLES CHANGE, CHANGE construction.tex CORRESPONDINGLY
-
- S1 := { [t] : 1 <= t <= n }
-
- S2 := { [x] : (0 <= x <= 100 and
- exists y : (2n <= y <= x and y is odd))
- or x = 17 }
-
- R := { [i,j] -> [i',j'] : 1 <= i <= i' <= n and not (F(i) = F(i'))
- and 1 <= j, j' <= m }
-*/
-
-//BEGIN PART 1
-#include <omega.h>
-using namespace omega;
-int main() {
- Relation S1(1), S2(1), R(2,2);
- S1.name_set_var(1, "t");
- S2.name_set_var(1, "x");
-
- assert(!R.is_set());
- assert(S1.is_set());
- assert(S2.is_set());
-
- Free_Var_Decl n("n");
- Free_Var_Decl m("m");
- Free_Var_Decl f("F", 1);
-
- Variable_ID S1s_n = S1.get_local(&n);
- Variable_ID S2s_n = S2.get_local(&n);
-
- Variable_ID Rs_n = R.get_local(&n);
- Variable_ID Rs_m = R.get_local(&m);
- Variable_ID Rs_f_in = R.get_local(&f, Input_Tuple);
- Variable_ID Rs_f_out = R.get_local(&f, Output_Tuple);
-
- R.name_input_var(1, "i");
- R.name_input_var(2, "j");
- R.name_output_var(1, "i'");
- R.name_output_var(2, "j'");
- Variable_ID i = R.input_var(1);
- Variable_ID j = R.input_var(2);
- Variable_ID i2 = R.output_var(1);
- Variable_ID j2 = R.output_var(2);
-
- Variable_ID t = S1.set_var(1);
- Variable_ID x = S2.set_var(1);
-//END PART 1
-//BEGIN PART 2
- F_And *S1_root = S1.add_and();
-
- GEQ_Handle tmin = S1_root->add_GEQ(); // t-1 >= 0
- tmin.update_coef(t, 10);
- tmin.update_coef(t, -9); // t now has coef. 1
- tmin.update_const(-1);
- GEQ_Handle tmax = S1_root->add_GEQ(); // n-t >= 0
- tmax.update_coef(S1s_n,1);
- tmax.update_coef(t, -1);
-
-
- F_Or *S2_root = S2.add_or();
- F_And *part1 = S2_root->add_and();
-
- GEQ_Handle xmin = part1->add_GEQ();
- xmin.update_coef(x,1);
- GEQ_Handle xmax = part1->add_GEQ();
- xmax.update_coef(x,-1);
- xmax.update_const(100);
-
- F_Exists *exists_y = part1->add_exists();
- Variable_ID y = exists_y->declare("y");
-
- F_And *y_stuff = exists_y->add_and();
- GEQ_Handle ymin = y_stuff->add_GEQ();
- ymin.update_coef(y,1);
- ymin.update_coef(S2s_n,-2);
- GEQ_Handle ymax = y_stuff->add_GEQ();
- ymax.update_coef(x,1);
- ymax.update_coef(y,-1);
- Stride_Handle y_even = y_stuff->add_stride(2);
- y_even.update_coef(y,1);
- y_even.update_const(1);
-
- F_And *part2 = S2_root->add_and();
-
- EQ_Handle xvalue = part2->add_EQ();
- xvalue.update_coef(x,1);
- xvalue.update_const(-17);
-//END PART 2
-//BEGIN PART 3
- F_And *R_root = R.add_and();
-
- GEQ_Handle imin = R_root->add_GEQ();
- imin.update_coef(i,1);
- imin.update_const(-1);
- GEQ_Handle imax = R_root->add_GEQ();
- imax.update_coef(i2,1);
- imax.update_coef(i,-1);
- GEQ_Handle i2max = R_root->add_GEQ();
- i2max.update_coef(Rs_n,1);
- i2max.update_coef(i2,-1);
-
- EQ_Handle f_eq = R_root->add_not()->add_and()->add_EQ();
- f_eq.update_coef(Rs_f_in,-1);
- f_eq.update_coef(Rs_f_out,1); // F(In) - F(Out) = 0
-
- GEQ_Handle jmin = R_root->add_GEQ();
- jmin.update_coef(j,1);
- jmin.update_const(-1);
- GEQ_Handle jmax = R_root->add_GEQ();
- jmax.update_coef(Rs_m,1);
- jmax.update_coef(j,-1);
-
- GEQ_Handle j2min = R_root->add_GEQ();
- j2min.update_coef(j2,1);
- j2min.update_const(-1);
- GEQ_Handle j2max = R_root->add_GEQ();
- j2max.update_coef(Rs_m,1);
- j2max.update_coef(j2,-1);
-//END PART 3
-//BEGIN PART 4
- S1.print_with_subs(stdout);
- assert(S1.is_upper_bound_satisfiable());
- assert(!S1.is_tautology());
- S1.print_with_subs(stdout); // same as above print
- printf("\n");
-
- S2.print();
- assert(S2.is_upper_bound_satisfiable());
- assert(!S2.is_tautology());
- S2.print(); // different from above
- printf("\n");
-
- assert(R.is_upper_bound_satisfiable());
- assert(!R.is_tautology());
- R.print_with_subs(stdout);
-
- coef_t lb, ub;
- bool coupled;
- R.query_difference(i2, i, lb, ub, coupled);
- assert(lb == 1); // i < i2: i2 - i1 > 0
- assert(ub == posInfinity);
-
- for(DNF_Iterator di(R.query_DNF()); di; di++) {
- printf("In next conjunct,\n");
- for(EQ_Iterator ei = (*di)->EQs(); ei; ei++) {
- printf(" In next equality constraint,\n");
- for(Constr_Vars_Iter cvi(*ei); cvi; cvi++)
- printf(" Variable %s has coefficient "coef_fmt"\n",
- (*cvi).var->char_name(),
- (*cvi).coef);
- }
- for(GEQ_Iterator gi = (*di)->GEQs(); gi; gi++) {
- printf(" In next inequality constraint,\n");
- for(Constr_Vars_Iter cvi(*gi); cvi; cvi++)
- printf(" Variable %s has coefficient "coef_fmt"\n",
- (*cvi).var->char_name(),
- (*cvi).coef);
- int c = (*gi).get_const();
- if (c != 0)
- printf(" Constant %d\n", c);
- }
-
- printf("\n");
- }
-//END PART 4
-//BEGIN PART 5
- Relation S1_or_S2 = Union(copy(S1), copy(S2));
-
- // NOTE! THE FOLLOWING KILLS S1 AND S2
- Relation S1_and_S2 = Intersection(S1, S2);
-
- S1_or_S2.is_upper_bound_satisfiable();
- S1_and_S2.is_upper_bound_satisfiable();
-
- S1_or_S2.print();
- printf("\n");
-
- S1_and_S2.print();
- printf("\n");
-
- Relation R_R = Composition(copy(R), R);
- R_R.query_difference(i2, i, lb, ub, coupled);
- assert(lb == 2);
- assert(ub == posInfinity);
-
- return 0;
-}
-//END PART 5
diff --git a/omegalib/examples/code_gen b/omegalib/examples/code_gen
deleted file mode 100644
index b3a0b4e..0000000
--- a/omegalib/examples/code_gen
+++ /dev/null
@@ -1,60 +0,0 @@
-# Example taken from http://www.cloog.org
-#
-
-r0:={[i,j]:i>=1 && j<=7 && j>=i-1};
-r1:={[i,j]:2<=i<=6 && 0<=j<=4};
-
-# CLooG optimized for size
-##
-## for (i=1;i<=8;i++) {
-## for (j=i-1;j<=7;j++) {
-## S0(i,j);
-## }
-## if ((i>=2)&&(i<=6)) {
-## for (j=0;j<=4;j++) {
-## S1(i,j);
-## }
-## }
-## }
-##
-## Since CLooG might not preserve the lexcicographical order other than
-## the default code generation strategy (custom -f or -l values). Its
-## generated code might not be correct should there exist reorder-preventing
-## dependence among statements.
-##
-
-# no overhead removal, minimal code size
-codegen 0 r0,r1;
-
-# remove one-deep loop nest (innermost loop) overhead
-codegen 1 r0,r1;
-
-# CLooG optimized for control
-##
-## for (t2=0;t2<=7;t2++) {
-## S0(1,t2);
-## }
-## for (t1=2;t1<=6;t1++) {
-## for (t2=0;t2<=t1-2;t2++) {
-## S1(t1,t2);
-## }
-## for (t2=t1-1;t2<=4;t2++) {
-## S0(t1,t2);
-## S1(t1,t2);
-## }
-## for (t2=5;t2<=7;t2++) {
-## S0(t1,t2);
-## }
-## }
-## for (t1=7;t1<=8;t1++) {
-## for (t2=t1-1;t2<=7;t2++) {
-## S0(t1,t2);
-## }
-## }
-##
-## This is CLooG's default code generation strategy. It guarantees
-## the lexicographical order as shown in input iteration spaces.
-##
-
-# minimal control overhead, removing overhead from 2-deep loop nest
-codegen 2 r0,r1;
diff --git a/omegalib/examples/code_gen.out b/omegalib/examples/code_gen.out
deleted file mode 100644
index 16e1b21..0000000
--- a/omegalib/examples/code_gen.out
+++ /dev/null
@@ -1,33 +0,0 @@
-# Omega Calculator [v1.1, Nov 96]:
-# #
-# # Example of code generation from Omega Calculator documentation
-# #
-#
-# T10:={[i] -> [0,i,0,0]};
-#
-# T20:={[i,j] -> [1,j,0,i]};
-#
-# T30:={[i] -> [1,i-1,1,0]};
-#
-#
-# Symbolic n;
-#
-# IS10 := {[i]: 2 <= i <= n};
-#
-# IS20 := {[i,j]: 2 <= i <= n && 1 <= j <= i-1};
-#
-# IS30 := IS10;
-#
-#
-# codegen T10:IS10,T20:IS20,T30:IS30;
-for(t2 = 2; t2 <= n; t2++) {
- s1(t2);
-}
-for(t2 = 1; t2 <= n-1; t2++) {
- for(t4 = t2+1; t4 <= n; t4++) {
- s2(t4,t2);
- }
- s3(t2+1);
-}
-
-#
diff --git a/omegalib/examples/experiments/gemm/codegen.input b/omegalib/examples/experiments/gemm/codegen.input
deleted file mode 100755
index cf1554b..0000000
--- a/omegalib/examples/experiments/gemm/codegen.input
+++ /dev/null
@@ -1,14 +0,0 @@
-symbolic n, over1, over2;
-s0:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13] : exists ( alpha,beta,gamma,delta,tau : 2tau = 1+t10 && 2alpha = 1+t8 && t2 = 1+512beta && t4 = 1+128gamma && t6 = 1+8delta && t1 = 0 && t3 = 0 && t5 = 1 && t7 = 2 && t9 = 1 && t11 = 0 && t13 = 0 && 1, t12-511 <= t2 <= t12 <= n && 1, t10-6 <= t6 <= t10 && 1, t8-126 <= t4 <= t8 && 0 <= over2 <= 1 && 0 <= over1 <= 1 && over2+t10 <= n && over1+t8 <= n) };
-s1:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9] : exists ( alpha,beta : t4 = 1+128beta && t2 = 1+512alpha && t1 = 0 && t3 = 0 && t5 = 0 && t7 = 0 && t9 = 0 && 1, t8-127 <= t4 <= t8 <= n && 1, t2 <= t6 <= n, t2+511 && 0 <= over2 <= 1 && 0 <= over1 <= 1) };
-s2:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11] : exists ( alpha,beta,gamma : t6 = 1+8gamma && t4 = 1+128alpha && t2 = 1+512beta && t5 = 1 && t9 = 0 && t11 = 0 && t1 = 0 && 1+t7 = 0 && t3 = 0 && 1, t10-511 <= t2 <= t10 <= n && 1, t8-7 <= t6 <= t8 <= n && 0 <= over2 <= 1 && 0 <= over1 <= 1 && 1 <= t4 <= n) };
-s3:= { [t1,t2,t3,t4,t5,t6,t7] : exists ( alpha,beta,gamma : t6 = 1+8gamma && t4 = 1+128alpha && t2 = 1+512beta && t5 = 1 && t1 = 0 && t7 = 0 && t3 = 0 && 0 <= over2 <= 1 && 0 <= over1 <= 1 && 1 <= t2 <= n && 1 <= t4 <= n && 1 <= t6 <= n) };
-s4:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13] : exists ( alpha,beta,gamma : t6 = 1+8beta && t4 = 1+128gamma && t2 = 1+512alpha && n = t8 && over1 = 1 && t5 = 1 && t9 = 0 && t11 = 0 && t13 = 0 && t1 = 0 && t7 = 4 && t3 = 0 && 1, t12-511 <= t2 <= t12 <= t8 <= t4+127 && 1, t10-7 <= t6 <= t10 <= t8 && 0 <= over2 <= 1 && t4 <= t8) };
-s5:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13] : exists ( alpha,beta,gamma,delta,tau : 2tau = 1+t10 && 2alpha = 1+t8 && t2 = 1+512beta && t4 = 1+128gamma && t6 = 1+8delta && t1 = 0 && t3 = 0 && t5 = 1 && t7 = 2 && t9 = 1 && t11 = 0 && t13 = 1 && 1, t12-511 <= t2 <= t12 <= n && 1, t10-6 <= t6 <= t10 && 1, t8-126 <= t4 <= t8 && 0 <= over2 <= 1 && 0 <= over1 <= 1 && over2+t10 <= n && over1+t8 <= n) };
-s6:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9] : exists ( alpha,beta,gamma,delta : t6 = 1+8delta && 2alpha = 1+t8 && t2 = 1+512beta && t4 = 1+128gamma && 1+t9 = 0 && t7 = 2 && t1 = 0 && t3 = 0 && t5 = 1 && 1, t8-126 <= t4 <= t8 && 0 <= over1 <= 1 && 0 <= over2 <= 1 && 1 <= t2 <= n && 1 <= t6 <= n && over1+t8 <= n) };
-s7:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13] : exists ( alpha,beta,gamma,delta : t6 = 1+8beta && 2alpha = t8+t4 && t2 = 1+512delta && 1+128gamma = t4 && t10 = n && over2 = 1 && t5 = 1 && t7 = 2 && t11 = 0 && t13 = 0 && t1 = 0 && t9 = 2 && t3 = 0 && 1, t12-511 <= t2 <= t12 <= n <= t6+7 && 1, t8-126 <= t4 <= t8 && 0 <= over1 <= 1 && t6 <= n && over1+t8 <= n) };
-s8:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13] : exists ( alpha,beta,gamma,delta : t6 = 1+8beta && 2alpha = t8+t4 && t2 = 1+512delta && 1+128gamma = t4 && t10 = n && over2 = 1 && t5 = 1 && t7 = 2 && t11 = 0 && t13 = 1 && t1 = 0 && t9 = 2 && t3 = 0 && 1, t12-511 <= t2 <= t12 <= n <= t6+7 && 1, t8-126 <= t4 <= t8 && 0 <= over1 <= 1 && t6 <= n && over1+t8 <= n) };
-s9:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13] : exists ( alpha,beta,gamma,delta,tau : 2delta = 1+t10 && 2alpha = 1+t8 && t2 = 1+512beta && t4 = 1+128gamma && t6+8tau = 1 && t13 = 2 && t9 = 1 && t11 = 0 && t1 = 0 && t3 = 0 && t5 = 1 && t7 = 2 && 1, t12-511 <= t2 <= t12 <= n && 1, t10-6 <= t6 <= t10 && 1, t8-126 <= t4 <= t8 && 0 <= over1 <= 1 && 0 <= over2 <= 1 && over2+t10 <= n && over1+t8 <= n) };
-
-codegen 1 s0,s1,s2,s3,s4,s5,s6,s7,s8,s9;
-
diff --git a/omegalib/examples/experiments/gemm/gemm.out b/omegalib/examples/experiments/gemm/gemm.out
deleted file mode 100644
index dfd0156..0000000
--- a/omegalib/examples/experiments/gemm/gemm.out
+++ /dev/null
@@ -1,58 +0,0 @@
->>> symbolic n, over1, over2;
->>> s0:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13] : exists ( alpha,beta,gamma,delta,tau : 2tau = 1+t10 && 2alpha = 1+t8 && t2 = 1+512beta && t4 = 1+128gamma && t6 = 1+8delta && t1 = 0 && t3 = 0 && t5 = 1 && t7 = 2 && t9 = 1 && t11 = 0 && t13 = 0 && 1, t12-511 <= t2 <= t12 <= n && 1, t10-6 <= t6 <= t10 && 1, t8-126 <= t4 <= t8 && 0 <= over2 <= 1 && 0 <= over1 <= 1 && over2+t10 <= n && over1+t8 <= n) };
->>> s1:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9] : exists ( alpha,beta : t4 = 1+128beta && t2 = 1+512alpha && t1 = 0 && t3 = 0 && t5 = 0 && t7 = 0 && t9 = 0 && 1, t8-127 <= t4 <= t8 <= n && 1, t2 <= t6 <= n, t2+511 && 0 <= over2 <= 1 && 0 <= over1 <= 1) };
->>> s2:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11] : exists ( alpha,beta,gamma : t6 = 1+8gamma && t4 = 1+128alpha && t2 = 1+512beta && t5 = 1 && t9 = 0 && t11 = 0 && t1 = 0 && 1+t7 = 0 && t3 = 0 && 1, t10-511 <= t2 <= t10 <= n && 1, t8-7 <= t6 <= t8 <= n && 0 <= over2 <= 1 && 0 <= over1 <= 1 && 1 <= t4 <= n) };
->>> s3:= { [t1,t2,t3,t4,t5,t6,t7] : exists ( alpha,beta,gamma : t6 = 1+8gamma && t4 = 1+128alpha && t2 = 1+512beta && t5 = 1 && t1 = 0 && t7 = 0 && t3 = 0 && 0 <= over2 <= 1 && 0 <= over1 <= 1 && 1 <= t2 <= n && 1 <= t4 <= n && 1 <= t6 <= n) };
->>> s4:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13] : exists ( alpha,beta,gamma : t6 = 1+8beta && t4 = 1+128gamma && t2 = 1+512alpha && n = t8 && over1 = 1 && t5 = 1 && t9 = 0 && t11 = 0 && t13 = 0 && t1 = 0 && t7 = 4 && t3 = 0 && 1, t12-511 <= t2 <= t12 <= t8 <= t4+127 && 1, t10-7 <= t6 <= t10 <= t8 && 0 <= over2 <= 1 && t4 <= t8) };
->>> s5:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13] : exists ( alpha,beta,gamma,delta,tau : 2tau = 1+t10 && 2alpha = 1+t8 && t2 = 1+512beta && t4 = 1+128gamma && t6 = 1+8delta && t1 = 0 && t3 = 0 && t5 = 1 && t7 = 2 && t9 = 1 && t11 = 0 && t13 = 1 && 1, t12-511 <= t2 <= t12 <= n && 1, t10-6 <= t6 <= t10 && 1, t8-126 <= t4 <= t8 && 0 <= over2 <= 1 && 0 <= over1 <= 1 && over2+t10 <= n && over1+t8 <= n) };
->>> s6:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9] : exists ( alpha,beta,gamma,delta : t6 = 1+8delta && 2alpha = 1+t8 && t2 = 1+512beta && t4 = 1+128gamma && 1+t9 = 0 && t7 = 2 && t1 = 0 && t3 = 0 && t5 = 1 && 1, t8-126 <= t4 <= t8 && 0 <= over1 <= 1 && 0 <= over2 <= 1 && 1 <= t2 <= n && 1 <= t6 <= n && over1+t8 <= n) };
->>> s7:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13] : exists ( alpha,beta,gamma,delta : t6 = 1+8beta && 2alpha = t8+t4 && t2 = 1+512delta && 1+128gamma = t4 && t10 = n && over2 = 1 && t5 = 1 && t7 = 2 && t11 = 0 && t13 = 0 && t1 = 0 && t9 = 2 && t3 = 0 && 1, t12-511 <= t2 <= t12 <= n <= t6+7 && 1, t8-126 <= t4 <= t8 && 0 <= over1 <= 1 && t6 <= n && over1+t8 <= n) };
->>> s8:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13] : exists ( alpha,beta,gamma,delta : t6 = 1+8beta && 2alpha = t8+t4 && t2 = 1+512delta && 1+128gamma = t4 && t10 = n && over2 = 1 && t5 = 1 && t7 = 2 && t11 = 0 && t13 = 1 && t1 = 0 && t9 = 2 && t3 = 0 && 1, t12-511 <= t2 <= t12 <= n <= t6+7 && 1, t8-126 <= t4 <= t8 && 0 <= over1 <= 1 && t6 <= n && over1+t8 <= n) };
->>> s9:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13] : exists ( alpha,beta,gamma,delta,tau : 2delta = 1+t10 && 2alpha = 1+t8 && t2 = 1+512beta && t4 = 1+128gamma && t6+8tau = 1 && t13 = 2 && t9 = 1 && t11 = 0 && t1 = 0 && t3 = 0 && t5 = 1 && t7 = 2 && 1, t12-511 <= t2 <= t12 <= n && 1, t10-6 <= t6 <= t10 && 1, t8-126 <= t4 <= t8 && 0 <= over1 <= 1 && 0 <= over2 <= 1 && over2+t10 <= n && over1+t8 <= n) };
->>>
->>> codegen 1 s0,s1,s2,s3,s4,s5,s6,s7,s8,s9;
-if (over1 >= 0 && over2 >= 0 && over2 <= 1 && over1 <= 1) {
- for(t2 = 1; t2 <= n; t2 += 512) {
- for(t4 = 1; t4 <= n; t4 += 128) {
- for(t6 = t2; t6 <= min(n,t2+511); t6++) {
- for(t8 = t4; t8 <= min(t4+127,n); t8++) {
- s1(0,t2,0,t4,0,t6,0,t8,0);
- }
- }
- for(t6 = 1; t6 <= n; t6 += 8) {
- for(t8 = t6; t8 <= min(n,t6+7); t8++) {
- for(t10 = t2; t10 <= min(t2+511,n); t10++) {
- s2(0,t2,0,t4,1,t6,-1,t8,0,t10,0);
- }
- }
- s3(0,t2,0,t4,1,t6,0);
- for(t8 = t4; t8 <= min(-over1+n,t4+126); t8 += 2) {
- s6(0,t2,0,t4,1,t6,2,t8,-1);
- for(t10 = t6; t10 <= min(t6+6,-over2+n); t10 += 2) {
- for(t12 = t2; t12 <= min(n,t2+511); t12++) {
- s0(0,t2,0,t4,1,t6,2,t8,1,t10,0,t12,0);
- s5(0,t2,0,t4,1,t6,2,t8,1,t10,0,t12,1);
- s9(0,t2,0,t4,1,t6,2,t8,1,t10,0,t12,2);
- }
- }
- if (over2 >= 1 && t6 >= n-7) {
- for(t12 = t2; t12 <= min(n,t2+511); t12++) {
- s7(0,t2,0,t4,1,t6,2,t8,2,n,0,t12,0);
- s8(0,t2,0,t4,1,t6,2,t8,2,n,0,t12,1);
- }
- }
- }
- if (t4 >= n-127 && over1 >= 1) {
- for(t10 = t6; t10 <= min(n,t6+7); t10++) {
- for(t12 = t2; t12 <= min(n,t2+511); t12++) {
- s4(0,t2,0,t4,1,t6,4,n,0,t10,0,t12,0);
- }
- }
- }
- }
- }
- }
-}
-
->>>
->>>
diff --git a/omegalib/examples/experiments/gemv/codegen.input b/omegalib/examples/experiments/gemv/codegen.input
deleted file mode 100755
index 4152560..0000000
--- a/omegalib/examples/experiments/gemv/codegen.input
+++ /dev/null
@@ -1,14 +0,0 @@
-symbolic n, over1, over2;
-
-s0:= { [t1,t2,t3,t4,t5] : exists ( alpha,beta : t2 = 1+4beta && t4 = 1+4alpha && t1 = 1 && t3 = 1 && t5 = 0 && 0 <= over2 <= 3 && 0 <= over1 <= 3 && 1 <= t4 && 1 <= t2 && over1+t2 <= n && over2+t4 <= n) };
-s1:= { [t1] : 1+t1 = 0 && 0 <= over2 <= 3 && 0 <= over1 <= 3 && 1 <= n };
-s2:= { [t1,t2,t3,t4,t5] : t1 = 2 && t3 = 0 && t5 = 0 && 1 <= t2 <= n && 1 <= t4 <= n && 0 <= over2 <= 3 && over1 <= 3 && n < over1+t2 };
-s3:= { [t1,t2,t3,t4,t5] : exists ( alpha,beta : t2 = 1+4beta && t4 = 1+4alpha && t1 = 1 && t3 = 1 && t5 = 1 && 0 <= over2 <= 3 && 0 <= over1 <= 3 && 1 <= t4 && 1 <= t2 && over1+t2 <= n && over2+t4 <= n) };
-s4:= { [t1,t2,t3] : exists ( alpha : t2 = 1+4alpha && 1+t3 = 0 && t1 = 1 && 0 <= over1 <= 3 && 0 <= over2 <= 3 && over1+t2 <= n && 1 <= t2) };
-s5:= { [t1,t2,t3,t4,t5] : exists ( alpha : t2 = 1+4alpha && t5 = 0 && t1 = 1 && t3 = 2 && 0 <= over1 <= 3 && 1 <= t4 <= n && over2 <= 3 && 1 <= t2 && over1+t2 <= n && n < over2+t4) };
-s6:= { [t1,t2,t3,t4,t5] : exists ( alpha : t2 = 1+4alpha && t5 = 1 && t1 = 1 && t3 = 2 && 0 <= over1 <= 3 && 1 <= t4 <= n && over2 <= 3 && 1 <= t2 && over1+t2 <= n && n < over2+t4) };
-s7:= { [t1,t2,t3,t4,t5] : exists ( alpha,beta : t2 = 1+4beta && t4 = 1+4alpha && t5 = 2 && t1 = 1 && t3 = 1 && 0 <= over1 <= 3 && 0 <= over2 <= 3 && 1 <= t4 && 1 <= t2 && over1+t2 <= n && over2+t4 <= n) };
-
-codegen s0,s1,s2,s3,s4,s5,s6,s7;
-
-
diff --git a/omegalib/examples/experiments/gemv/gemv.out b/omegalib/examples/experiments/gemv/gemv.out
deleted file mode 100644
index b9dd445..0000000
--- a/omegalib/examples/experiments/gemv/gemv.out
+++ /dev/null
@@ -1,40 +0,0 @@
->>> symbolic n, over1, over2;
->>>
->>> s0:= { [t1,t2,t3,t4,t5] : exists ( alpha,beta : t2 = 1+4beta && t4 = 1+4alpha && t1 = 1 && t3 = 1 && t5 = 0 && 0 <= over2 <= 3 && 0 <= over1 <= 3 && 1 <= t4 && 1 <= t2 && over1+t2 <= n && over2+t4 <= n) };
->>> s1:= { [t1] : 1+t1 = 0 && 0 <= over2 <= 3 && 0 <= over1 <= 3 && 1 <= n };
->>> s2:= { [t1,t2,t3,t4,t5] : t1 = 2 && t3 = 0 && t5 = 0 && 1 <= t2 <= n && 1 <= t4 <= n && 0 <= over2 <= 3 && over1 <= 3 && n < over1+t2 };
->>> s3:= { [t1,t2,t3,t4,t5] : exists ( alpha,beta : t2 = 1+4beta && t4 = 1+4alpha && t1 = 1 && t3 = 1 && t5 = 1 && 0 <= over2 <= 3 && 0 <= over1 <= 3 && 1 <= t4 && 1 <= t2 && over1+t2 <= n && over2+t4 <= n) };
->>> s4:= { [t1,t2,t3] : exists ( alpha : t2 = 1+4alpha && 1+t3 = 0 && t1 = 1 && 0 <= over1 <= 3 && 0 <= over2 <= 3 && over1+t2 <= n && 1 <= t2) };
->>> s5:= { [t1,t2,t3,t4,t5] : exists ( alpha : t2 = 1+4alpha && t5 = 0 && t1 = 1 && t3 = 2 && 0 <= over1 <= 3 && 1 <= t4 <= n && over2 <= 3 && 1 <= t2 && over1+t2 <= n && n < over2+t4) };
->>> s6:= { [t1,t2,t3,t4,t5] : exists ( alpha : t2 = 1+4alpha && t5 = 1 && t1 = 1 && t3 = 2 && 0 <= over1 <= 3 && 1 <= t4 <= n && over2 <= 3 && 1 <= t2 && over1+t2 <= n && n < over2+t4) };
->>> s7:= { [t1,t2,t3,t4,t5] : exists ( alpha,beta : t2 = 1+4beta && t4 = 1+4alpha && t5 = 2 && t1 = 1 && t3 = 1 && 0 <= over1 <= 3 && 0 <= over2 <= 3 && 1 <= t4 && 1 <= t2 && over1+t2 <= n && over2+t4 <= n) };
->>>
->>> codegen s0,s1,s2,s3,s4,s5,s6,s7;
-if (over2 >= 0 && over1 <= 3 && over2 <= 3) {
- if (over1 >= 0) {
- if (n >= 1) {
- s1(-1);
- }
- for(t2 = 1; t2 <= n-over1; t2 += 4) {
- s4(1,t2,-1);
- for(t4 = 1; t4 <= n-over2; t4 += 4) {
- s0(1,t2,1,t4,0);
- s3(1,t2,1,t4,1);
- s7(1,t2,1,t4,2);
- }
- for(t4 = max(1,n-over2+1); t4 <= n; t4++) {
- s5(1,t2,2,t4,0);
- s6(1,t2,2,t4,1);
- }
- }
- }
- for(t2 = max(1,n-over1+1); t2 <= n; t2++) {
- for(t4 = 1; t4 <= n; t4++) {
- s2(2,t2,0,t4,0);
- }
- }
-}
-
->>>
->>>
->>>
diff --git a/omegalib/examples/experiments/lu/codegen.input b/omegalib/examples/experiments/lu/codegen.input
deleted file mode 100755
index 0505f2d..0000000
--- a/omegalib/examples/experiments/lu/codegen.input
+++ /dev/null
@@ -1,33 +0,0 @@
-symbolic n, over1, over2, over3;
-
-s0:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15] : 1=2 };
-s1:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15] : exists ( alpha,beta,gamma,delta,tau,sigma : 2sigma = t12 && t2 = 1+t6+256alpha && 2beta = 1+t10 && t4 = 1+256gamma && t6 = 1+64delta && t8 = 2+8tau && t15 = 1 && t9 = 2 && t11 = 1 && t13 = 0 && t1 = 0 && t3 = 0 && t5 = 0 && t7 = 1 && t12-62, t14+2 <= t2 <= t8 <= t12 <= t8+6 && t2-1, t10-254 <= t6 <= t10 && 1, t14-255 <= t4 <= t14 && 0 <= over2 <= 1 && 0 <= over3 <= 1 && 0 <= over1 <= 1 && over3+t12 <= n && over2+t10 <= n) };
-s2:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9] : exists ( alpha : t2 = 2+64alpha && 1+t4 = t6 && t7 = 0 && t9 = 0 && t1 = 0 && t3 = 2 && t5 = 0 && 2, t6-63 <= t2 <= t6 <= t8 <= n && 0 <= over3 <= 1 && 0 <= over2 <= 1 && 0 <= over1 <= 1) };
-s3:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9] : exists ( alpha : t2 = 2+64alpha && t5 = 1 && t7 = 0 && t9 = 0 && t1 = 0 && t3 = 2 && t2-1 <= t4 < t6 <= t2+63, n && t4 < t8 <= n && 0 <= over3 <= 1 && 0 <= over2 <= 1 && 0 <= over1 <= 1 && 2 <= t2) };
-s4:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15] : exists ( alpha,beta,gamma,delta,tau,sigma : 2tau = t12 && 2alpha = t10 && t6 = 1+256beta && t2 = 2+64gamma && t4 = 2+256delta && t8+8sigma = 2 && t1 = 0 && 1+t3 = 0 && 1+t5 = 0 && t7 = 0 && t9 = 0 && t11 = 1 && t13 = 0 && t15 = 0 && 1, t14-255 <= t6 <= t14 < t4 <= t10 <= t4+254, t2-4 && t2, t12-6 <= t8 <= t12 <= t2+62 && 0 <= over1 <= 1 && 0 <= over3 <= 1 && 0 <= over2 <= 1 && over1+t12 <= n) };
-s5:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11] : exists ( alpha,beta : t2 = 2+64beta && t4 = 2+256alpha && 1+t3 = 0 && t7 = 0 && t9 = 0 && t11 = 1 && t1 = 0 && t5 = 1 && 2, t6-255 <= t4 <= t10 < t6 <= t2-2 && t8-63 <= t2 <= t8 <= n && 0 <= over3 <= 1 && 0 <= over2 <= 1 && 0 <= over1 <= 1) };
-s6:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11] : exists ( alpha,beta,gamma : t4 = 2+256gamma && t6 = 1+256alpha && t2 = 2+64beta && t1 = 0 && 1+t3 = 0 && 1+t5 = 0 && 1+t7 = 0 && t9 = 0 && t11 = 0 && 1, t8-255 <= t6 <= t8 < t4 <= t10 <= t2-2, t4+255 && 0 <= over3 <= 1 && 0 <= over2 <= 1 && 0 <= over1 <= 1 && t2 <= n) };
-s7:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13] : exists ( alpha,beta,gamma,delta : t8 = 2+8delta && t4 = 2+256alpha && t6 = 1+256beta && t2 = 2+64gamma && 1+t5 = 0 && t7 = 0 && t11 = 0 && t13 = 0 && t1 = 0 && 2+t9 = 0 && 1+t3 = 0 && t4+64, t10-63 <= t2 <= t8 <= t10 <= t8+7, n && 1, t12-255 <= t6 <= t12 <= t4-1 && 0 <= over3 <= 1 && 0 <= over2 <= 1 && 0 <= over1 <= 1) };
-s8:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15] : exists ( alpha,beta,gamma,delta : t8 = 2+8delta && t4 = 2+256alpha && t6 = 1+256beta && 2+t10 = t2 && t2 = 2+64gamma && t7 = 0 && t11 = 0 && t13 = 0 && t15 = 1 && t1 = 0 && t9 = 1 && 1+t3 = 0 && 1+t5 = 0 && t4+64, t12-63 <= t2 <= t8 <= t12 <= t8+7, n && 1, t14-255 <= t6 <= t14 <= t4-1 && 0 <= over3 <= 1 && 0 <= over2 <= 1 && 0 <= over1 <= 1 && t2 <= t4+256) };
-s9:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15] : exists ( alpha,beta,gamma,delta,tau,sigma : 2sigma = t12 && 2alpha = t10 && t6 = 1+256beta && t2 = 2+64gamma && t4 = 2+256delta && t8 = 2+8tau && t1 = 0 && 1+t3 = 0 && 1+t5 = 0 && t7 = 0 && t9 = 0 && t11 = 1 && t13 = 0 && t15 = 1 && 1, t14-255 <= t6 <= t14 < t4 <= t10 <= t4+254, t2-4 && t2, t12-6 <= t8 <= t12 && 0 <= over1 <= 1 && 0 <= over3 <= 1 && 0 <= over2 <= 1 && t8 <= t2+56 && over1+t12 <= n) };
-s10:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11] : exists ( alpha,beta,gamma,delta,tau : t8 = 2+8tau && 2alpha = t10 && t6 = 1+256beta && t2 = 2+64gamma && t4 = 2+256delta && t7 = 0 && t9 = 0 && t1 = 0 && 1+t11 = 0 && 1+t3 = 0 && 1+t5 = 0 && t6+1, t10-254 <= t4 <= t10 <= t2-4 && t8-56 <= t2 <= t8 <= n && 0 <= over3 <= 1 && 0 <= over2 <= 1 && 0 <= over1 <= 1 && 1 <= t6) };
-s11:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15] : exists ( alpha,beta,gamma,delta,tau : t8 = 2+8beta && 2gamma = t10 && t6 = 1+256delta && t2 = 2+64tau && t4 = 2+256alpha && n = t12 && over1 = 1 && t7 = 0 && t9 = 0 && t13 = 0 && t15 = 0 && t1 = 0 && t11 = 2 && 1+t3 = 0 && 1+t5 = 0 && 1, t14-255 <= t6 <= t14 < t4 <= t10 <= t2-4, t4+254 && t12-63 <= t2 <= t8 <= t12 <= t8+7 && 0 <= over2 <= 1 && 0 <= over3 <= 1) };
-s12:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15] : exists ( alpha,beta,gamma,delta,tau : t8 = 2+8beta && 2gamma = t10 && t6 = 1+256delta && t2 = 2+64tau && t4 = 2+256alpha && n = t12 && over1 = 1 && t7 = 0 && t9 = 0 && t13 = 0 && t15 = 1 && t1 = 0 && t11 = 2 && 1+t3 = 0 && 1+t5 = 0 && 1, t14-255 <= t6 <= t14 < t4 <= t10 <= t4+254, t2-4 && t8-56 <= t2 <= t8 <= t12 <= t8+7 && 0 <= over2 <= 1 && 0 <= over3 <= 1) };
-s13:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15] : exists ( alpha,beta,gamma,delta,tau,sigma : 2sigma = t12 && 2alpha = t10 && t6 = 1+256beta && t2 = 2+64gamma && t4 = 2+256delta && t8 = 2+8tau && t7 = 0 && t9 = 0 && t11 = 1 && t13 = 0 && t1 = 0 && t15 = 2 && 1+t3 = 0 && 1+t5 = 0 && 1, t14-255 <= t6 <= t14 < t4 <= t10 <= t4+254, t2-4 && t2, t12-6 <= t8 <= t12 <= t2+62 && 0 <= over1 <= 1 && 0 <= over3 <= 1 && 0 <= over2 <= 1 && over1+t12 <= n) };
-s14:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9] : exists ( alpha,beta : t2 = 2+64beta && t4 = 2+256alpha && t1 = 0 && 1+t3 = 0 && t5 = 0 && t7 = 0 && t9 = 0 && 2, t8-255 <= t4 <= t6 < t8 <= t2-2 && 0 <= over1 <= 1 && 0 <= over3 <= 1 && 0 <= over2 <= 1 && t2 <= n) };
-s15:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11] : exists ( alpha,beta,gamma : t2 = 1+t6+256gamma && t6 = 1+64alpha && t4 = 1+256beta && t1 = 0 && t3 = 0 && t5 = 0 && t7 = 0 && t9 = 0 && t11 = 0 && 1, t8-255 <= t4 <= t8 <= t2-2 && t2-1, t10-255 <= t6 <= t10 <= n && 0 <= over1 <= 1 && 0 <= over3 <= 1 && 0 <= over2 <= 1 && t2 <= n) };
-s16:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13] : exists ( alpha,beta,gamma,delta : t8 = 2+8delta && t2 = 1+t6+256alpha && t6 = 1+64beta && t4 = 1+256gamma && t5 = 0 && t7 = 1 && t11 = 0 && t13 = 0 && t1 = 0 && 1+t9 = 0 && t3 = 0 && t12+2, t10-63 <= t2 <= t8 <= t10 <= t8+7, n && 1, t12-255 <= t4 <= t12 && 0 <= over1 <= 1 && 0 <= over3 <= 1 && 0 <= over2 <= 1 && t2-1 <= t6 <= n) };
-s17:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9] : exists ( alpha,beta,gamma,delta : t8 = 2+8delta && t2 = 1+t6+256alpha && t6 = 1+64beta && t4 = 1+256gamma && t5 = 0 && t7 = 1 && t1 = 0 && t9 = 0 && t3 = 0 && t8-56, t4+65 <= t2 <= t8 <= n && 0 <= over3 <= 1 && 0 <= over2 <= 1 && 0 <= over1 <= 1 && t2-1 <= t6 <= n && 1 <= t4) };
-s18:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15] : exists ( alpha,beta,gamma,delta : t8 = 2+8beta && t2 = 1+t6+256gamma && t6 = 1+64delta && t4 = 1+256alpha && n = t10 && over2 = 1 && t5 = 0 && t7 = 1 && t11 = 0 && t13 = 0 && t15 = 1 && t1 = 0 && t9 = 3 && t3 = 0 && t14+2, t12-63 <= t2 <= t8 <= t12 <= t8+7, t10 && 1, t14-255 <= t4 <= t14 && t10-255 <= t6 <= t10 && 0 <= over1 <= 1 && 0 <= over3 <= 1) };
-s19:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15] : 1=2 };
-s20:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15] : exists ( alpha,beta,gamma,delta,tau,sigma : 2sigma = t12 && t2 = 1+t6+256alpha && 2beta = 1+t10 && t4 = 1+256gamma && t6 = 1+64delta && t8 = 2+8tau && t15 = 3 && t9 = 2 && t11 = 1 && t13 = 0 && t1 = 0 && t3 = 0 && t5 = 0 && t7 = 1 && 1, t14-255 <= t4 <= t14 <= t2-2 && t2, t12-6 <= t8 <= t12 && t2-1, t10-254 <= t6 <= t10 && 0 <= over2 <= 1 && 0 <= over3 <= 1 && 0 <= over1 <= 1 && t8 <= t2+56 && over2+t10 <= n && over3+t12 <= n) };
-s21:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11] : exists ( alpha,beta,gamma,delta,tau : t8 = 2+8tau && t2 = 1+t6+256alpha && t6 = 1+64beta && t4 = 1+256gamma && 2delta = t10+t6 && 1+t11 = 0 && t7 = 1 && t9 = 2 && t1 = 0 && t3 = 0 && t5 = 0 && t8-56, t4+65 <= t2 <= t8 <= n && t2-1, t10-254 <= t6 <= t10 && 0 <= over2 <= 1 && 0 <= over3 <= 1 && 0 <= over1 <= 1 && 1 <= t4 && over2+t10 <= n) };
-s22:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15] : exists ( alpha,beta,gamma,delta : t8 = 2+8beta && 2delta = 1+t10 && t4 = 1+256alpha && t2 = 1+t6 && n = t12 && t6 = 1+64gamma && over3 = 1 && t7 = 1 && t9 = 2 && t13 = 0 && t15 = 1 && t1 = 0 && t11 = 3 && t3 = 0 && t5 = 0 && 1, t14-255 <= t4 <= t14 < t6 < t8 <= t12 <= t8+7, t6+64 && 0 <= over1 <= 1 && 0 <= over2 <= 1 && t6 <= t10 && over2+t10 <= t12) };
-s23:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15] : exists ( alpha,beta,gamma,delta : t8 = 2+8beta && 2delta = 1+t10 && t4 = 1+256alpha && t2 = 1+t6 && t12 = n && t6 = 1+64gamma && over3 = 1 && t7 = 1 && t9 = 2 && t13 = 0 && t15 = 3 && t1 = 0 && t11 = 3 && t3 = 0 && t5 = 0 && 1, t14-255 <= t4 <= t14 < t6 < t8 <= n <= t8+7 && 0 <= over1 <= 1 && 0 <= over2 <= 1 && t8-57 <= t6 <= t10 && over2+t10 <= n) };
-s24:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15] : 1=2 };
-s25:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15] : exists ( alpha,beta,gamma,delta,tau,sigma : 2sigma = t12 && t2 = 1+t6+256alpha && 2beta = 1+t10 && t4 = 1+256gamma && t6 = 1+64delta && t8 = 2+8tau && t15 = 5 && t9 = 2 && t11 = 1 && t13 = 0 && t1 = 0 && t3 = 0 && t5 = 0 && t7 = 1 && t12-62, t14+2 <= t2 <= t8 <= t12 <= t8+6 && t2-1, t10-254 <= t6 <= t10 && 1, t14-255 <= t4 <= t14 && 0 <= over2 <= 1 && 0 <= over3 <= 1 && 0 <= over1 <= 1 && over2+t10 <= n && over3+t12 <= n) };
-s26:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15] : 1=2 };
-s27:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15] : exists ( alpha,beta,gamma,delta,tau,sigma : 2sigma = t12 && t2 = 1+t6+256alpha && 2beta = 1+t10 && t4 = 1+256gamma && t6 = 1+64delta && t8 = 2+8tau && t15 = 7 && t9 = 2 && t11 = 1 && t13 = 0 && t1 = 0 && t3 = 0 && t5 = 0 && t7 = 1 && 1, t14-255 <= t4 <= t14 <= t2-2 && t12-6, t2 <= t8 <= t12 && t2-1, t10-254 <= t6 <= t10 && 0 <= over2 <= 1 && 0 <= over3 <= 1 && 0 <= over1 <= 1 && t8 <= t2+56 && over2+t10 <= n && over3+t12 <= n) };
-
-codegen 1 s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12,s13,s14,s15,s16,s17,s18,s19,s20,s21,s22,s23,s24,s25,s26,s27;
-
diff --git a/omegalib/examples/experiments/lu/lu.out b/omegalib/examples/experiments/lu/lu.out
deleted file mode 100644
index 443a4db..0000000
--- a/omegalib/examples/experiments/lu/lu.out
+++ /dev/null
@@ -1,141 +0,0 @@
->>> symbolic n, over1, over2, over3;
->>>
->>> s0:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15] : 1=2 };
->>> s1:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15] : exists ( alpha,beta,gamma,delta,tau,sigma : 2sigma = t12 && t2 = 1+t6+256alpha && 2beta = 1+t10 && t4 = 1+256gamma && t6 = 1+64delta && t8 = 2+8tau && t15 = 1 && t9 = 2 && t11 = 1 && t13 = 0 && t1 = 0 && t3 = 0 && t5 = 0 && t7 = 1 && t12-62, t14+2 <= t2 <= t8 <= t12 <= t8+6 && t2-1, t10-254 <= t6 <= t10 && 1, t14-255 <= t4 <= t14 && 0 <= over2 <= 1 && 0 <= over3 <= 1 && 0 <= over1 <= 1 && over3+t12 <= n && over2+t10 <= n) };
->>> s2:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9] : exists ( alpha : t2 = 2+64alpha && 1+t4 = t6 && t7 = 0 && t9 = 0 && t1 = 0 && t3 = 2 && t5 = 0 && 2, t6-63 <= t2 <= t6 <= t8 <= n && 0 <= over3 <= 1 && 0 <= over2 <= 1 && 0 <= over1 <= 1) };
->>> s3:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9] : exists ( alpha : t2 = 2+64alpha && t5 = 1 && t7 = 0 && t9 = 0 && t1 = 0 && t3 = 2 && t2-1 <= t4 < t6 <= t2+63, n && t4 < t8 <= n && 0 <= over3 <= 1 && 0 <= over2 <= 1 && 0 <= over1 <= 1 && 2 <= t2) };
->>> s4:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15] : exists ( alpha,beta,gamma,delta,tau,sigma : 2tau = t12 && 2alpha = t10 && t6 = 1+256beta && t2 = 2+64gamma && t4 = 2+256delta && t8+8sigma = 2 && t1 = 0 && 1+t3 = 0 && 1+t5 = 0 && t7 = 0 && t9 = 0 && t11 = 1 && t13 = 0 && t15 = 0 && 1, t14-255 <= t6 <= t14 < t4 <= t10 <= t4+254, t2-4 && t2, t12-6 <= t8 <= t12 <= t2+62 && 0 <= over1 <= 1 && 0 <= over3 <= 1 && 0 <= over2 <= 1 && over1+t12 <= n) };
->>> s5:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11] : exists ( alpha,beta : t2 = 2+64beta && t4 = 2+256alpha && 1+t3 = 0 && t7 = 0 && t9 = 0 && t11 = 1 && t1 = 0 && t5 = 1 && 2, t6-255 <= t4 <= t10 < t6 <= t2-2 && t8-63 <= t2 <= t8 <= n && 0 <= over3 <= 1 && 0 <= over2 <= 1 && 0 <= over1 <= 1) };
->>> s6:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11] : exists ( alpha,beta,gamma : t4 = 2+256gamma && t6 = 1+256alpha && t2 = 2+64beta && t1 = 0 && 1+t3 = 0 && 1+t5 = 0 && 1+t7 = 0 && t9 = 0 && t11 = 0 && 1, t8-255 <= t6 <= t8 < t4 <= t10 <= t2-2, t4+255 && 0 <= over3 <= 1 && 0 <= over2 <= 1 && 0 <= over1 <= 1 && t2 <= n) };
->>> s7:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13] : exists ( alpha,beta,gamma,delta : t8 = 2+8delta && t4 = 2+256alpha && t6 = 1+256beta && t2 = 2+64gamma && 1+t5 = 0 && t7 = 0 && t11 = 0 && t13 = 0 && t1 = 0 && 2+t9 = 0 && 1+t3 = 0 && t4+64, t10-63 <= t2 <= t8 <= t10 <= t8+7, n && 1, t12-255 <= t6 <= t12 <= t4-1 && 0 <= over3 <= 1 && 0 <= over2 <= 1 && 0 <= over1 <= 1) };
->>> s8:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15] : exists ( alpha,beta,gamma,delta : t8 = 2+8delta && t4 = 2+256alpha && t6 = 1+256beta && 2+t10 = t2 && t2 = 2+64gamma && t7 = 0 && t11 = 0 && t13 = 0 && t15 = 1 && t1 = 0 && t9 = 1 && 1+t3 = 0 && 1+t5 = 0 && t4+64, t12-63 <= t2 <= t8 <= t12 <= t8+7, n && 1, t14-255 <= t6 <= t14 <= t4-1 && 0 <= over3 <= 1 && 0 <= over2 <= 1 && 0 <= over1 <= 1 && t2 <= t4+256) };
->>> s9:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15] : exists ( alpha,beta,gamma,delta,tau,sigma : 2sigma = t12 && 2alpha = t10 && t6 = 1+256beta && t2 = 2+64gamma && t4 = 2+256delta && t8 = 2+8tau && t1 = 0 && 1+t3 = 0 && 1+t5 = 0 && t7 = 0 && t9 = 0 && t11 = 1 && t13 = 0 && t15 = 1 && 1, t14-255 <= t6 <= t14 < t4 <= t10 <= t4+254, t2-4 && t2, t12-6 <= t8 <= t12 && 0 <= over1 <= 1 && 0 <= over3 <= 1 && 0 <= over2 <= 1 && t8 <= t2+56 && over1+t12 <= n) };
->>> s10:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11] : exists ( alpha,beta,gamma,delta,tau : t8 = 2+8tau && 2alpha = t10 && t6 = 1+256beta && t2 = 2+64gamma && t4 = 2+256delta && t7 = 0 && t9 = 0 && t1 = 0 && 1+t11 = 0 && 1+t3 = 0 && 1+t5 = 0 && t6+1, t10-254 <= t4 <= t10 <= t2-4 && t8-56 <= t2 <= t8 <= n && 0 <= over3 <= 1 && 0 <= over2 <= 1 && 0 <= over1 <= 1 && 1 <= t6) };
->>> s11:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15] : exists ( alpha,beta,gamma,delta,tau : t8 = 2+8beta && 2gamma = t10 && t6 = 1+256delta && t2 = 2+64tau && t4 = 2+256alpha && n = t12 && over1 = 1 && t7 = 0 && t9 = 0 && t13 = 0 && t15 = 0 && t1 = 0 && t11 = 2 && 1+t3 = 0 && 1+t5 = 0 && 1, t14-255 <= t6 <= t14 < t4 <= t10 <= t2-4, t4+254 && t12-63 <= t2 <= t8 <= t12 <= t8+7 && 0 <= over2 <= 1 && 0 <= over3 <= 1) };
->>> s12:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15] : exists ( alpha,beta,gamma,delta,tau : t8 = 2+8beta && 2gamma = t10 && t6 = 1+256delta && t2 = 2+64tau && t4 = 2+256alpha && n = t12 && over1 = 1 && t7 = 0 && t9 = 0 && t13 = 0 && t15 = 1 && t1 = 0 && t11 = 2 && 1+t3 = 0 && 1+t5 = 0 && 1, t14-255 <= t6 <= t14 < t4 <= t10 <= t4+254, t2-4 && t8-56 <= t2 <= t8 <= t12 <= t8+7 && 0 <= over2 <= 1 && 0 <= over3 <= 1) };
->>> s13:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15] : exists ( alpha,beta,gamma,delta,tau,sigma : 2sigma = t12 && 2alpha = t10 && t6 = 1+256beta && t2 = 2+64gamma && t4 = 2+256delta && t8 = 2+8tau && t7 = 0 && t9 = 0 && t11 = 1 && t13 = 0 && t1 = 0 && t15 = 2 && 1+t3 = 0 && 1+t5 = 0 && 1, t14-255 <= t6 <= t14 < t4 <= t10 <= t4+254, t2-4 && t2, t12-6 <= t8 <= t12 <= t2+62 && 0 <= over1 <= 1 && 0 <= over3 <= 1 && 0 <= over2 <= 1 && over1+t12 <= n) };
->>> s14:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9] : exists ( alpha,beta : t2 = 2+64beta && t4 = 2+256alpha && t1 = 0 && 1+t3 = 0 && t5 = 0 && t7 = 0 && t9 = 0 && 2, t8-255 <= t4 <= t6 < t8 <= t2-2 && 0 <= over1 <= 1 && 0 <= over3 <= 1 && 0 <= over2 <= 1 && t2 <= n) };
->>> s15:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11] : exists ( alpha,beta,gamma : t2 = 1+t6+256gamma && t6 = 1+64alpha && t4 = 1+256beta && t1 = 0 && t3 = 0 && t5 = 0 && t7 = 0 && t9 = 0 && t11 = 0 && 1, t8-255 <= t4 <= t8 <= t2-2 && t2-1, t10-255 <= t6 <= t10 <= n && 0 <= over1 <= 1 && 0 <= over3 <= 1 && 0 <= over2 <= 1 && t2 <= n) };
->>> s16:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13] : exists ( alpha,beta,gamma,delta : t8 = 2+8delta && t2 = 1+t6+256alpha && t6 = 1+64beta && t4 = 1+256gamma && t5 = 0 && t7 = 1 && t11 = 0 && t13 = 0 && t1 = 0 && 1+t9 = 0 && t3 = 0 && t12+2, t10-63 <= t2 <= t8 <= t10 <= t8+7, n && 1, t12-255 <= t4 <= t12 && 0 <= over1 <= 1 && 0 <= over3 <= 1 && 0 <= over2 <= 1 && t2-1 <= t6 <= n) };
->>> s17:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9] : exists ( alpha,beta,gamma,delta : t8 = 2+8delta && t2 = 1+t6+256alpha && t6 = 1+64beta && t4 = 1+256gamma && t5 = 0 && t7 = 1 && t1 = 0 && t9 = 0 && t3 = 0 && t8-56, t4+65 <= t2 <= t8 <= n && 0 <= over3 <= 1 && 0 <= over2 <= 1 && 0 <= over1 <= 1 && t2-1 <= t6 <= n && 1 <= t4) };
->>> s18:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15] : exists ( alpha,beta,gamma,delta : t8 = 2+8beta && t2 = 1+t6+256gamma && t6 = 1+64delta && t4 = 1+256alpha && n = t10 && over2 = 1 && t5 = 0 && t7 = 1 && t11 = 0 && t13 = 0 && t15 = 1 && t1 = 0 && t9 = 3 && t3 = 0 && t14+2, t12-63 <= t2 <= t8 <= t12 <= t8+7, t10 && 1, t14-255 <= t4 <= t14 && t10-255 <= t6 <= t10 && 0 <= over1 <= 1 && 0 <= over3 <= 1) };
->>> s19:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15] : 1=2 };
->>> s20:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15] : exists ( alpha,beta,gamma,delta,tau,sigma : 2sigma = t12 && t2 = 1+t6+256alpha && 2beta = 1+t10 && t4 = 1+256gamma && t6 = 1+64delta && t8 = 2+8tau && t15 = 3 && t9 = 2 && t11 = 1 && t13 = 0 && t1 = 0 && t3 = 0 && t5 = 0 && t7 = 1 && 1, t14-255 <= t4 <= t14 <= t2-2 && t2, t12-6 <= t8 <= t12 && t2-1, t10-254 <= t6 <= t10 && 0 <= over2 <= 1 && 0 <= over3 <= 1 && 0 <= over1 <= 1 && t8 <= t2+56 && over2+t10 <= n && over3+t12 <= n) };
->>> s21:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11] : exists ( alpha,beta,gamma,delta,tau : t8 = 2+8tau && t2 = 1+t6+256alpha && t6 = 1+64beta && t4 = 1+256gamma && 2delta = t10+t6 && 1+t11 = 0 && t7 = 1 && t9 = 2 && t1 = 0 && t3 = 0 && t5 = 0 && t8-56, t4+65 <= t2 <= t8 <= n && t2-1, t10-254 <= t6 <= t10 && 0 <= over2 <= 1 && 0 <= over3 <= 1 && 0 <= over1 <= 1 && 1 <= t4 && over2+t10 <= n) };
->>> s22:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15] : exists ( alpha,beta,gamma,delta : t8 = 2+8beta && 2delta = 1+t10 && t4 = 1+256alpha && t2 = 1+t6 && n = t12 && t6 = 1+64gamma && over3 = 1 && t7 = 1 && t9 = 2 && t13 = 0 && t15 = 1 && t1 = 0 && t11 = 3 && t3 = 0 && t5 = 0 && 1, t14-255 <= t4 <= t14 < t6 < t8 <= t12 <= t8+7, t6+64 && 0 <= over1 <= 1 && 0 <= over2 <= 1 && t6 <= t10 && over2+t10 <= t12) };
->>> s23:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15] : exists ( alpha,beta,gamma,delta : t8 = 2+8beta && 2delta = 1+t10 && t4 = 1+256alpha && t2 = 1+t6 && t12 = n && t6 = 1+64gamma && over3 = 1 && t7 = 1 && t9 = 2 && t13 = 0 && t15 = 3 && t1 = 0 && t11 = 3 && t3 = 0 && t5 = 0 && 1, t14-255 <= t4 <= t14 < t6 < t8 <= n <= t8+7 && 0 <= over1 <= 1 && 0 <= over2 <= 1 && t8-57 <= t6 <= t10 && over2+t10 <= n) };
->>> s24:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15] : 1=2 };
->>> s25:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15] : exists ( alpha,beta,gamma,delta,tau,sigma : 2sigma = t12 && t2 = 1+t6+256alpha && 2beta = 1+t10 && t4 = 1+256gamma && t6 = 1+64delta && t8 = 2+8tau && t15 = 5 && t9 = 2 && t11 = 1 && t13 = 0 && t1 = 0 && t3 = 0 && t5 = 0 && t7 = 1 && t12-62, t14+2 <= t2 <= t8 <= t12 <= t8+6 && t2-1, t10-254 <= t6 <= t10 && 1, t14-255 <= t4 <= t14 && 0 <= over2 <= 1 && 0 <= over3 <= 1 && 0 <= over1 <= 1 && over2+t10 <= n && over3+t12 <= n) };
->>> s26:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15] : 1=2 };
->>> s27:= { [t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,t11,t12,t13,t14,t15] : exists ( alpha,beta,gamma,delta,tau,sigma : 2sigma = t12 && t2 = 1+t6+256alpha && 2beta = 1+t10 && t4 = 1+256gamma && t6 = 1+64delta && t8 = 2+8tau && t15 = 7 && t9 = 2 && t11 = 1 && t13 = 0 && t1 = 0 && t3 = 0 && t5 = 0 && t7 = 1 && 1, t14-255 <= t4 <= t14 <= t2-2 && t12-6, t2 <= t8 <= t12 && t2-1, t10-254 <= t6 <= t10 && 0 <= over2 <= 1 && 0 <= over3 <= 1 && 0 <= over1 <= 1 && t8 <= t2+56 && over2+t10 <= n && over3+t12 <= n) };
->>>
->>> codegen 1 s0,s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12,s13,s14,s15,s16,s17,s18,s19,s20,s21,s22,s23,s24,s25,s26,s27;
-if (over1 >= 0 && over1 <= 1 && over3 <= 1 && over3 >= 0 && over2 >= 0 && over2 <= 1) {
- for(t2 = 2; t2 <= n; t2 += 64) {
- for(t4 = 2; t4 <= t2-64; t4 += 256) {
- for(t6 = 1; t6 <= t4-1; t6 += 256) {
- for(t8 = t6; t8 <= min(t6+255,t4-1); t8++) {
- for(t10 = t4; t10 <= min(t2-2,t4+255); t10++) {
- s6(0,t2,-1,t4,-1,t6,-1,t8,0,t10,0);
- }
- }
- for(t8 = t2; t8 <= min(n,t2+56); t8 += 8) {
- for(t10 = t8; t10 <= min(t8+7,n); t10++) {
- for(t12 = t6; t12 <= min(t6+255,t4-1); t12++) {
- s7(0,t2,-1,t4,-1,t6,0,t8,-2,t10,0,t12,0);
- }
- }
- for(t10 = t4; t10 <= min(t2-4,t4+254); t10 += 2) {
- s10(0,t2,-1,t4,-1,t6,0,t8,0,t10,-1);
- for(t12 = t8; t12 <= min(-over1+n,t8+6); t12 += 2) {
- for(t14 = t6; t14 <= min(t4-1,t6+255); t14++) {
- s4(0,t2,-1,t4,-1,t6,0,t8,0,t10,1,t12,0,t14,0);
- s9(0,t2,-1,t4,-1,t6,0,t8,0,t10,1,t12,0,t14,1);
- s13(0,t2,-1,t4,-1,t6,0,t8,0,t10,1,t12,0,t14,2);
- }
- }
- if (t8 >= n-7 && over1 >= 1) {
- for(t14 = t6; t14 <= min(t4-1,t6+255); t14++) {
- s11(0,t2,-1,t4,-1,t6,0,t8,0,t10,2,n,0,t14,0);
- s12(0,t2,-1,t4,-1,t6,0,t8,0,t10,2,n,0,t14,1);
- }
- }
- }
- if (t4 >= t2-256) {
- for(t12 = t8; t12 <= min(t8+7,n); t12++) {
- for(t14 = t6; t14 <= min(t6+255,t4-1); t14++) {
- s8(0,t2,-1,t4,-1,t6,0,t8,1,t2-2,0,t12,0,t14,1);
- }
- }
- }
- }
- }
- for(t6 = t4; t6 <= min(t4+254,t2-3); t6++) {
- for(t8 = t6+1; t8 <= min(t2-2,t4+255); t8++) {
- s14(0,t2,-1,t4,0,t6,0,t8,0);
- }
- }
- for(t6 = t4+1; t6 <= min(t2-2,t4+255); t6++) {
- for(t8 = t2; t8 <= min(n,t2+63); t8++) {
- for(t10 = t4; t10 <= t6-1; t10++) {
- s5(0,t2,-1,t4,1,t6,0,t8,0,t10,1);
- }
- }
- }
- }
- for(t4 = 1; t4 <= t2-65; t4 += 256) {
- for(t6 = t2-1; t6 <= n; t6 += 256) {
- for(t8 = t4; t8 <= min(t4+255,t2-2); t8++) {
- for(t10 = t6; t10 <= min(n,t6+255); t10++) {
- s15(0,t2,0,t4,0,t6,0,t8,0,t10,0);
- }
- }
- for(t8 = t2; t8 <= min(t2+56,n); t8 += 8) {
- for(t10 = t8; t10 <= min(n,t8+7); t10++) {
- for(t12 = t4; t12 <= min(t4+255,t2-2); t12++) {
- s16(0,t2,0,t4,0,t6,1,t8,-1,t10,0,t12,0);
- }
- }
- s17(0,t2,0,t4,0,t6,1,t8,0);
- for(t10 = t6; t10 <= min(n-over2,t6+254); t10 += 2) {
- s21(0,t2,0,t4,0,t6,1,t8,2,t10,-1);
- for(t12 = t8; t12 <= min(t8+6,n-over3); t12 += 2) {
- for(t14 = t4; t14 <= min(t2-2,t4+255); t14++) {
- s1(0,t2,0,t4,0,t6,1,t8,2,t10,1,t12,0,t14,1);
- s20(0,t2,0,t4,0,t6,1,t8,2,t10,1,t12,0,t14,3);
- s25(0,t2,0,t4,0,t6,1,t8,2,t10,1,t12,0,t14,5);
- s27(0,t2,0,t4,0,t6,1,t8,2,t10,1,t12,0,t14,7);
- }
- }
- if (over3 >= 1 && t8 >= n-7) {
- for(t14 = t4; t14 <= min(t6-1,t4+255); t14++) {
- s22(0,t2,0,t4,0,t6,1,t8,2,t10,3,n,0,t14,1);
- s23(0,t2,0,t4,0,t6,1,t8,2,t10,3,n,0,t14,3);
- }
- }
- }
- if (t6 >= n-255 && over2 >= 1) {
- for(t12 = t8; t12 <= min(t8+7,n); t12++) {
- for(t14 = t4; t14 <= min(t2-2,t4+255); t14++) {
- s18(0,t2,0,t4,0,t6,1,t8,3,n,0,t12,0,t14,1);
- }
- }
- }
- }
- }
- }
- for(t4 = t2-1; t4 <= min(t2+62,n-1); t4++) {
- for(t8 = t4+1; t8 <= n; t8++) {
- s2(0,t2,2,t4,0,t4+1,0,t8,0);
- }
- for(t6 = t4+1; t6 <= min(n,t2+63); t6++) {
- for(t8 = t4+1; t8 <= n; t8++) {
- s3(0,t2,2,t4,1,t6,0,t8,0);
- }
- }
- }
- }
-}
-
->>>
->>>
diff --git a/omegalib/examples/experiments/qr/codegen.input b/omegalib/examples/experiments/qr/codegen.input
deleted file mode 100755
index 01f8496..0000000
--- a/omegalib/examples/experiments/qr/codegen.input
+++ /dev/null
@@ -1,17 +0,0 @@
-symbolic M, N;
-
-s1:= { [In_1,In_2,In_3,In_4,In_5,In_6,In_7] : 1+In_3 = 0 && In_4 = 1+In_6 && In_2 = In_6 && In_7 = 0 && In_1 = 0 && In_5 = 0 && 0 <= In_6 < N };
-s2:= { [In_1,In_2,In_3,In_4,In_5,In_6,In_7] : In_3 = 0 && 1+In_2 = In_4 && In_7 = 0 && In_1 = 0 && In_5 = 0 && 1 <= In_4 <= In_6+1, N && In_6 < M };
-s3:= { [In_1,In_2,In_3,In_4,In_5,In_6,In_7] : In_3 = 0 && In_4 = 1+In_6 && In_2 = In_6 && In_7 = 0 && In_1 = 0 && In_5 = 1 && 0 <= In_6 < N };
-s4:= { [In_1,In_2,In_3,In_4,In_5,In_6,In_7] : In_3 = 0 && 1+In_2 = In_4 && In_7 = 0 && In_1 = 0 && In_5 = 2 && 1 <= In_4 <= In_6+1, N && In_6 < M };
-s5:= { [In_1,In_2,In_3,In_4,In_5,In_6,In_7] : In_3 = 1 && In_4 = 1+In_6 && In_2 = In_6 && In_7 = 0 && In_1 = 0 && In_5 = 0 && 0 <= In_6 < N };
-s6:= { [In_1,In_2,In_3,In_4,In_5,In_6,In_7] : In_1 = 0 && In_3 = 4 && In_5 = 0 && In_7 = 0 && In_6 = In_2 && 0 <= In_2 <= In_4-2 && In_4 < N };
-s7:= { [In_1,In_2,In_3,In_4,In_5,In_6,In_7] : In_1 = 0 && In_3 = 4 && In_5 = 3 && In_7 = 0 && 0 <= In_2 <= In_6 < M && In_2+2 <= In_4 < N };
-s8:= { [In_1,In_2,In_3,In_4,In_5,In_6,In_7] : In_1 = 0 && In_3 = 4 && In_5 = 2 && In_7 = 0 && In_6 = M && In_2+2 <= In_4 <= N && 0 <= In_2 };
-s9:= { [In_1,In_2,In_3,In_4,In_5,In_6,In_7] : In_1 = 0 && In_3 = 4 && In_5 = 3 && In_7 = 1 && 0 <= In_2 <= In_6 < M && In_2+2 <= In_4 <= N };
-s10:= {[In_1,In_2,In_3,In_4,In_5,In_6,In_7] : In_3 = 2 && In_4 = N && In_6 = M && In_5 = 0 && In_7 = 0 && In_1 = 0 && 0 <= In_2 < N };
-s11:= {[In_1,In_2,In_3,In_4,In_5,In_6,In_7] : In_5 = 0 && In_3 = 3 && In_7 = 0 && In_1 = 0 && In_6 = In_2 && In_4 = 1+In_2 && 0 <= In_2 <= N-2 };
-s12:= {[In_1,In_2,In_3,In_4,In_5,In_6,In_7] : In_5 = 3 && In_3 = 3 && In_7 = 0 && In_1 = 0 && In_4 = 1+In_2 && 0 <= In_2 <= In_6 < M && In_2 <= N-2 };
-
-
-codegen s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12;
diff --git a/omegalib/examples/experiments/qr/qr.out b/omegalib/examples/experiments/qr/qr.out
deleted file mode 100644
index e09cc75..0000000
--- a/omegalib/examples/experiments/qr/qr.out
+++ /dev/null
@@ -1,54 +0,0 @@
->>> symbolic M, N;
->>>
->>> s1:= { [In_1,In_2,In_3,In_4,In_5,In_6,In_7] : 1+In_3 = 0 && In_4 = 1+In_6 && In_2 = In_6 && In_7 = 0 && In_1 = 0 && In_5 = 0 && 0 <= In_6 < N };
->>> s2:= { [In_1,In_2,In_3,In_4,In_5,In_6,In_7] : In_3 = 0 && 1+In_2 = In_4 && In_7 = 0 && In_1 = 0 && In_5 = 0 && 1 <= In_4 <= In_6+1, N && In_6 < M };
->>> s3:= { [In_1,In_2,In_3,In_4,In_5,In_6,In_7] : In_3 = 0 && In_4 = 1+In_6 && In_2 = In_6 && In_7 = 0 && In_1 = 0 && In_5 = 1 && 0 <= In_6 < N };
->>> s4:= { [In_1,In_2,In_3,In_4,In_5,In_6,In_7] : In_3 = 0 && 1+In_2 = In_4 && In_7 = 0 && In_1 = 0 && In_5 = 2 && 1 <= In_4 <= In_6+1, N && In_6 < M };
->>> s5:= { [In_1,In_2,In_3,In_4,In_5,In_6,In_7] : In_3 = 1 && In_4 = 1+In_6 && In_2 = In_6 && In_7 = 0 && In_1 = 0 && In_5 = 0 && 0 <= In_6 < N };
->>> s6:= { [In_1,In_2,In_3,In_4,In_5,In_6,In_7] : In_1 = 0 && In_3 = 4 && In_5 = 0 && In_7 = 0 && In_6 = In_2 && 0 <= In_2 <= In_4-2 && In_4 < N };
->>> s7:= { [In_1,In_2,In_3,In_4,In_5,In_6,In_7] : In_1 = 0 && In_3 = 4 && In_5 = 3 && In_7 = 0 && 0 <= In_2 <= In_6 < M && In_2+2 <= In_4 < N };
->>> s8:= { [In_1,In_2,In_3,In_4,In_5,In_6,In_7] : In_1 = 0 && In_3 = 4 && In_5 = 2 && In_7 = 0 && In_6 = M && In_2+2 <= In_4 <= N && 0 <= In_2 };
->>> s9:= { [In_1,In_2,In_3,In_4,In_5,In_6,In_7] : In_1 = 0 && In_3 = 4 && In_5 = 3 && In_7 = 1 && 0 <= In_2 <= In_6 < M && In_2+2 <= In_4 <= N };
->>> s10:= {[In_1,In_2,In_3,In_4,In_5,In_6,In_7] : In_3 = 2 && In_4 = N && In_6 = M && In_5 = 0 && In_7 = 0 && In_1 = 0 && 0 <= In_2 < N };
->>> s11:= {[In_1,In_2,In_3,In_4,In_5,In_6,In_7] : In_5 = 0 && In_3 = 3 && In_7 = 0 && In_1 = 0 && In_6 = In_2 && In_4 = 1+In_2 && 0 <= In_2 <= N-2 };
->>> s12:= {[In_1,In_2,In_3,In_4,In_5,In_6,In_7] : In_5 = 3 && In_3 = 3 && In_7 = 0 && In_1 = 0 && In_4 = 1+In_2 && 0 <= In_2 <= In_6 < M && In_2 <= N-2 };
->>>
->>>
->>> codegen s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12;
-for(t2 = 0; t2 <= N-1; t2++) {
- s0(0,t2,-1,t2+1,0,t2,0);
- for(t6 = t2+1-1; t6 <= M-1; t6++) {
- s1(0,t2,0,t2+1,0,t6,0);
- }
- s2(0,t2,0,t2+1,1,t2,0);
- for(t6 = t2+1-1; t6 <= M-1; t6++) {
- s3(0,t2,0,t2+1,2,t6,0);
- }
- s4(0,t2,1,t2+1,0,t2,0);
- s9(0,t2,2,N,0,M,0);
- if (N >= t2+2) {
- s10(0,t2,3,t2+1,0,t2+1-1,0);
- for(t6 = t2; t6 <= M-1; t6++) {
- s11(0,t2,3,t2+1,3,t6,0);
- }
- }
- for(t4 = t2+2; t4 <= N; t4++) {
- if (N >= t4+1) {
- s5(0,t2,4,t4,0,t2,0);
- }
- s7(0,t2,4,t4,2,M,0);
- if (N >= t4+1) {
- for(t6 = t2; t6 <= M-1; t6++) {
- s6(0,t2,4,t4,3,t6,0);
- s8(0,t2,4,t4,3,t6,1);
- }
- }
- else {
- for(t6 = t2; t6 <= M-1; t6++) {
- s8(0,t2,4,t4,3,t6,1);
- }
- }
- }
-}
-
->>>
diff --git a/omegalib/examples/experiments/swim/swim-codegen.input b/omegalib/examples/experiments/swim/swim-codegen.input
deleted file mode 100755
index 4e558bc..0000000
--- a/omegalib/examples/experiments/swim/swim-codegen.input
+++ /dev/null
@@ -1,53 +0,0 @@
-symbolic N3,M,N;
-
-
-s0:= {[t,i,j] : 0 <= j <= N-1 && 0 <= i <= M-1 && 0 <= t <= N3-1 };
-t0:={[t,i,j] -> [0,t,0,i,0,j,0]};
-s1:= {[t,j] : 0 <= j <= N-1 && 0 <= t <= N3-1};
-t1:={[t,j] -> [0,t,1,j,0,0,0]};
-s2:= {[t,i] : 0 <= i <= M-1 && 0 <= t <= N3-1};
-t2:={[t,i] -> [0,t,2,i,0,0,0]};
-s3:= {[t] : 0 <= t <= N3-1 };
-t3:={[t] -> [0,t,3,0,0,0,0]};
-s4:= {[t,i,j] : 0 <= j <= N-1 && i=M-1 && 0 <= t <= N3-1 };
-t4:={[t,i,j] -> [0,t,4,i,0,j,0] };
-s5:= {[t,j] : 0 <= j <= N-1 && 0 <= t <= N3-1 };
-t5:={[t,j] -> [0,t,8,j,0,0,0]};
-s6:= {[t,i] : 0 <= i <= M-1 && 0 <= t <= N3-1 };
-t6:={[t,i] -> [0,t,9,i,0,0,0]};
-s7:= {[t] : 0 <= t <= N3-1 };
-t7:={[t] -> [0,t,10,0,0,0,0]};
-s8:= {[t,i,j] : 0 <= j <= N-1 && M-2 <= i <= M-1 && 0 <= t <= N3-1 };
-t8:= {[t,i,j] -> [0,t,12,i,0,j,0]};
-s9:= {[t,j] : 0 <= j <= N-1 && 0 <= t <= N3-1 };
-t9:={[t,j] -> [0,t,15,j,0,0,0]};
-s10:= {[t,i] : 0 <= i <= M-1 && 0 <= t <= N3-1 };
-t10:={[t,i] -> [0,t,16,i,3,0,0]};
-s11:= {[t] : 0 <= t <= N3-1 };
-t11:={[t] -> [0,t,17,0,0,0,0]};
-s12:= {[t,i,j] : 0 <= j <= N-1 && 0 <= i <= 1 && 0 <= t <= N3-1 };
-t12:= {[t,i,j] -> [0,t,11,i,0,j,0]};
-s13:= {[t,i,j] : N-2 <= j <= N-1 && 2 <= i <= M-3 && 0 <= t <= N3-1 };
-t13:= {[t,i,j] -> [0,t,14,i,0,j,0]};
-s14:= {[t,i,j] : 0 <= j <= 1 && 2 <= i <= M-3 && 0 <= t <= N3-1 };
-t14:= {[t,i,j] -> [0,t,13,i,0,j,0]};
-s15:= {[t,i,j] : 2 <= j <= N-3 && 2 <= i <= M-3 && 0 <= t <= N3-1 };
-t15:={[t,i,j] -> [0,t,0,i+3,0,j+2,2]};
-
-s16:= {[t,i,j] : 0 <= j <= N-1 && i=0 && 0 <= t <= N3-1 };
-t16:={[t,i,j] -> [0,t,5,i,0,j,0] };
-
-s17:= {[t,i,j] : j =N-1 && 1<= i <=M-2 && 0 <= t <= N3-1 };
-t17:={[t,i,j] -> [0,t,6,i,0,j,0] };
-
-s18:= {[t,i,j] : j =0 && 1<= i <=M-2 && 0 <= t <= N3-1};
-t18:={[t,i,j] -> [0,t,7,i,0,j,0] };
-
-s19:= {[t,i,j] :1 <= j <= N-2 && 1 <= i <= M-2 && 0 <= t <= N3-1 };
-t19:={[t,i,j] -> [0,t,0,i+2,0,j+1,1]};
-
-
-
-codegen 2 t0:s0,t1:s1,t2:s2,t3:s3,t4:s4,t5:s5,t6:s6,t7:s7,t8:s8,t9:s9,t10:s10,t11:s11,t12:s12,t13:s13,t14:s14,t15:s15,t16:s16,t17:s17,t18:s18,t19:s19;
-#codegen 2 s0,t1:s1,t2:s2,t3:s3,t4:s4,t5:s5,t6:s6,t7:s7,t8:s8,t9:s9,t10:s10,t11:s11,t12:s12,t13:s13,t14:s14,t15:s15,t16:s16,t17:s17,t18:s18,t19:s19;
-
diff --git a/omegalib/examples/experiments/swim/swim.out b/omegalib/examples/experiments/swim/swim.out
deleted file mode 100644
index 6adffdb..0000000
--- a/omegalib/examples/experiments/swim/swim.out
+++ /dev/null
@@ -1,176 +0,0 @@
->>> symbolic N3,M,N;
->>>
->>>
->>> s0:= {[t,i,j] : 0 <= j <= N-1 && 0 <= i <= M-1 && 0 <= t <= N3-1 };
->>> t0:={[t,i,j] -> [0,t,0,i,0,j,0]};
->>> s1:= {[t,j] : 0 <= j <= N-1 && 0 <= t <= N3-1};
->>>
->>> t1:={[t,j] -> [0,t,1,j,0,0,0]};
->>> s2:= {[t,i] : 0 <= i <= M-1 && 0 <= t <= N3-1};
->>> t2:={[t,i] -> [0,t,2,i,0,0,0]};
->>>
->>> s3:= {[t] : 0 <= t <= N3-1 };
->>>
->>> t3:={[t] -> [0,t,3,0,0,0,0]};
->>>
->>> s4:= {[t,i,j] : 0 <= j <= N-1 && i=M-1 && 0 <= t <= N3-1 };
->>> t4:={[t,i,j] -> [0,t,4,i,0,j,0] };
->>> s5:= {[t,j] : 0 <= j <= N-1 && 0 <= t <= N3-1 };
->>>
->>> t5:={[t,j] -> [0,t,8,j,0,0,0]};
->>>
->>> s6:= {[t,i] : 0 <= i <= M-1 && 0 <= t <= N3-1 };
->>>
->>> t6:={[t,i] -> [0,t,9,i,0,0,0]};
->>>
->>> s7:= {[t] : 0 <= t <= N3-1 };
->>>
->>> t7:={[t] -> [0,t,10,0,0,0,0]};
->>>
->>> s8:= {[t,i,j] : 0 <= j <= N-1 && M-2 <= i <= M-1 && 0 <= t <= N3-1 };
->>> t8:= {[t,i,j] -> [0,t,12,i,0,j,0]};
->>> s9:= {[t,j] : 0 <= j <= N-1 && 0 <= t <= N3-1 };
->>>
->>> t9:={[t,j] -> [0,t,15,j,0,0,0]};
->>> s10:= {[t,i] : 0 <= i <= M-1 && 0 <= t <= N3-1 };
->>> t10:={[t,i] -> [0,t,16,i,3,0,0]};
->>>
->>> s11:= {[t] : 0 <= t <= N3-1 };
->>>
->>> t11:={[t] -> [0,t,17,0,0,0,0]};
->>>
->>> s12:= {[t,i,j] : 0 <= j <= N-1 && 0 <= i <= 1 && 0 <= t <= N3-1 };
->>> t12:= {[t,i,j] -> [0,t,11,i,0,j,0]};
->>> s13:= {[t,i,j] : N-2 <= j <= N-1 && 2 <= i <= M-3 && 0 <= t <= N3-1 };
->>> t13:= {[t,i,j] -> [0,t,14,i,0,j,0]};
->>> s14:= {[t,i,j] : 0 <= j <= 1 && 2 <= i <= M-3 && 0 <= t <= N3-1 };
->>> t14:= {[t,i,j] -> [0,t,13,i,0,j,0]};
->>> s15:= {[t,i,j] : 2 <= j <= N-3 && 2 <= i <= M-3 && 0 <= t <= N3-1 };
->>> t15:={[t,i,j] -> [0,t,0,i+3,0,j+2,2]};
->>>
->>> s16:= {[t,i,j] : 0 <= j <= N-1 && i=0 && 0 <= t <= N3-1 };
->>> t16:={[t,i,j] -> [0,t,5,i,0,j,0] };
->>>
->>> s17:= {[t,i,j] : j =N-1 && 1<= i <=M-2 && 0 <= t <= N3-1 };
->>> t17:={[t,i,j] -> [0,t,6,i,0,j,0] };
->>>
->>> s18:= {[t,i,j] : j =0 && 1<= i <=M-2 && 0 <= t <= N3-1};
->>> t18:={[t,i,j] -> [0,t,7,i,0,j,0] };
->>>
->>> s19:= {[t,i,j] :1 <= j <= N-2 && 1 <= i <= M-2 && 0 <= t <= N3-1 };
->>> t19:={[t,i,j] -> [0,t,0,i+2,0,j+1,1]};
->>>
->>>
->>>
->>> codegen 2 t0:s0,t1:s1,t2:s2,t3:s3,t4:s4,t5:s5,t6:s6,t7:s7,t8:s8,t9:s9,t10:s10,t11:s11,t12:s12,t13:s13,t14:s14,t15:s15,t16:s16,t17:s17,t18:s18,t19:s19;
-for(t2 = 0; t2 <= N3-1; t2++) {
- if (N >= 1) {
- for(t4 = 0; t4 <= min(2,M-1); t4++) {
- for(t6 = 0; t6 <= N-1; t6++) {
- s0(t2,t4,t6);
- }
- }
- for(t4 = 3; t4 <= min(M-1,4); t4++) {
- for(t6 = 0; t6 <= min(1,N-1); t6++) {
- s0(t2,t4,t6);
- }
- for(t6 = 2; t6 <= min(3,N-1); t6++) {
- s0(t2,t4,t6);
- s19(t2,t4-2,t6-1);
- }
- for(t6 = 4; t6 <= N-1; t6++) {
- s0(t2,t4,t6);
- s19(t2,t4-2,t6-1);
- }
- }
- for(t4 = 5; t4 <= M-1; t4++) {
- for(t6 = 0; t6 <= min(1,N-1); t6++) {
- s0(t2,t4,t6);
- }
- for(t6 = 2; t6 <= min(N-1,3); t6++) {
- s0(t2,t4,t6);
- s19(t2,t4-2,t6-1);
- }
- for(t6 = 4; t6 <= N-1; t6++) {
- s0(t2,t4,t6);
- s19(t2,t4-2,t6-1);
- s15(t2,t4-3,t6-2);
- }
- }
- }
- if (M >= 3) {
- if (M >= 5) {
- for(t6 = 2; t6 <= min(N-1,3); t6++) {
- s19(t2,M-2,t6-1);
- }
- for(t6 = 4; t6 <= N-1; t6++) {
- s19(t2,M-2,t6-1);
- s15(t2,M-3,t6-2);
- }
- }
- else {
- for(t6 = 2; t6 <= N-1; t6++) {
- s19(t2,M-2,t6-1);
- }
- }
- }
- for(t4 = 0; t4 <= N-1; t4++) {
- s1(t2,t4);
- }
- for(t4 = 0; t4 <= M-1; t4++) {
- s2(t2,t4);
- }
- s3(t2);
- for(t6 = 0; t6 <= N-1; t6++) {
- s4(t2,M-1,t6);
- }
- for(t6 = 0; t6 <= N-1; t6++) {
- s16(t2,0,t6);
- }
- for(t4 = 1; t4 <= M-2; t4++) {
- s17(t2,t4,N-1);
- }
- for(t4 = 1; t4 <= M-2; t4++) {
- s18(t2,t4,0);
- }
- for(t4 = 0; t4 <= N-1; t4++) {
- s5(t2,t4);
- }
- for(t4 = 0; t4 <= M-1; t4++) {
- s6(t2,t4);
- }
- s7(t2);
- if (N >= 1) {
- for(t4 = 0; t4 <= 1; t4++) {
- for(t6 = 0; t6 <= N-1; t6++) {
- s12(t2,t4,t6);
- }
- }
- for(t4 = M-2; t4 <= M-1; t4++) {
- for(t6 = 0; t6 <= N-1; t6++) {
- s8(t2,t4,t6);
- }
- }
- }
- for(t4 = 2; t4 <= M-3; t4++) {
- for(t6 = 0; t6 <= 1; t6++) {
- s14(t2,t4,t6);
- }
- }
- for(t4 = 2; t4 <= M-3; t4++) {
- for(t6 = N-2; t6 <= N-1; t6++) {
- s13(t2,t4,t6);
- }
- }
- for(t4 = 0; t4 <= N-1; t4++) {
- s9(t2,t4);
- }
- for(t4 = 0; t4 <= M-1; t4++) {
- s10(t2,t4);
- }
- s11(t2);
-}
-
->>> #codegen 2 s0,t1:s1,t2:s2,t3:s3,t4:s4,t5:s5,t6:s6,t7:s7,t8:s8,t9:s9,t10:s10,t11:s11,t12:s12,t13:s13,t14:s14,t15:s15,t16:s16,t17:s17,t18:s18,t19:s19;
->>>
->>>
diff --git a/omegalib/examples/floor_bound b/omegalib/examples/floor_bound
deleted file mode 100644
index 3cb0d57..0000000
--- a/omegalib/examples/floor_bound
+++ /dev/null
@@ -1,46 +0,0 @@
-#
-# Test floor/ceiling variable definitions in loop bounds
-# Notes:
-# intFloor, intCeil are strict mathematical definition,
-# intMod(a,b) always has input b>0 and returns [0,b).
-#
-
-symbolic m, n;
-
-# loop is strided
-#
-is := {[i]: exists (alpha: i = 4alpha && m <= 3i <= n)};
-codegen is;
-
-# only one single floor/ceiling variable in bound
-#
-is := {[i]: exists (lb: m-4 < 4*lb <= m && lb <= i <= n)};
-codegen is;
-
-# the floor/ceiling variable in bound has coefficient
-#
-is := {[i]: exists (lb: m-4 < 4*lb <= m && 4*lb <= i <= n)};
-codegen is;
-
-# mutiple floor/ceiling variables in bound
-#
-is := {[i]:exists (alpha,beta: m-4<4alpha<=m && m-3<3beta<=m &&
- 4alpha+3*beta<=i<=n )};
-codegen is;
-
-# non-tight floor/ceiling definition
-#
-is := {[i]: exists (ub: n-2 < 3*ub <= n && m <= i <= 5*ub)};
-codegen is;
-
-# chain floor/ceiling definitions
-#
-is := {[i]: exists (alpha, beta: beta-4<4alpha<=beta &&
- m-8<8beta<=m && 4alpha<=i<=n )};
-codegen is;
-
-# one complicated case
-#
-is := {[i]: exists (alpha, beta: beta-4<4alpha<=beta &&
- m-7<8beta<=m && 4alpha<=i<=n )};
-codegen is;
diff --git a/omegalib/examples/floor_bound.out b/omegalib/examples/floor_bound.out
deleted file mode 100644
index 2d59f65..0000000
--- a/omegalib/examples/floor_bound.out
+++ /dev/null
@@ -1,76 +0,0 @@
->>> #
->>> # Test floor/ceiling variable definitions in loop bounds
->>> #
->>>
->>> symbolic m, n;
->>>
->>> # loop is strided
->>> #
->>> is := {[i]: exists (alpha: i = 4alpha && m <= 3i <= n)};
->>> codegen is;
-for(t1 = 4*intDiv(intDiv(m+2,3)+3,4); t1 <= intDiv(n,3); t1 += 4) {
- s1(t1);
-}
-
->>>
->>> # only one single floor/ceiling variable in bound
->>> #
->>> is := {[i]: exists (lb: m-4 < 4*lb <= m && lb <= i <= n)};
->>> codegen is;
-for(t1 = intDiv(m-3+3,4); t1 <= n; t1++) {
- s1(t1);
-}
-
->>>
->>> # the floor/ceiling variable in bound has coefficient
->>> #
->>> is := {[i]: exists (lb: m-4 < 4*lb <= m && 4*lb <= i <= n)};
->>> codegen is;
-for(t1 = 4*intDiv(m,4); t1 <= n; t1++) {
- s1(t1);
-}
-
->>>
->>> # mutiple floor/ceiling variables in bound
->>> #
->>> is := {[i]:exists (alpha,beta: m-4<4alpha<=m && m-3<3beta<=m &&
->>> 4alpha+3*beta<=i<=n )};
->>> codegen is;
-for(t1 = 3*intDiv(m,3)+4*intDiv(m,4); t1 <= n; t1++) {
- s1(t1);
-}
-
->>>
->>> # non-tight floor/ceiling definition
->>> #
->>> is := {[i]: exists (ub: n-2 < 3*ub <= n && m <= i <= 5*ub)};
->>> codegen is;
-if (n-1 <= 3*intDiv(n,3)) {
- for(t1 = m; t1 <= 5*intDiv(n,3); t1++) {
- s1(t1);
- }
-}
-
->>>
->>> # chain floor/ceiling definitions
->>> #
->>> is := {[i]: exists (alpha, beta: beta-4<4alpha<=beta &&
->>> m-8<8beta<=m && 4alpha<=i<=n )};
->>> codegen is;
-for(t1 = 4*intDiv(m,32); t1 <= n; t1++) {
- s1(t1);
-}
-
->>>
->>> # one complicated case
->>> #
->>> is := {[i]: exists (alpha, beta: beta-4<4alpha<=beta &&
->>> m-7<8beta<=m && 4alpha<=i<=n )};
->>> codegen is;
-if (m-6 <= 8*intDiv(m,8)) {
- for(t1 = 4*intDiv(m,32); t1 <= n; t1++) {
- s1(t1);
- }
-}
-
-
diff --git a/omegalib/examples/gist b/omegalib/examples/gist
deleted file mode 100644
index 5919b88..0000000
--- a/omegalib/examples/gist
+++ /dev/null
@@ -1,60 +0,0 @@
-#
-# Test gist function and code generation for modular equations
-#
-
-symbolic n;
-
-# basic gist function
-#
-R:={[t1,t2]: exists (aa : 2aa = t1 && 2 <= t1 && t1 <= 8)};
-known := {[t1,t2]: 1 <= t1 <= 9};
-gist R given known;
-
-
-# test modulo equations by coprime numbers
-#
-is := { [i,j] : 1 <= i <= n && i <= j <= n && exists (alpha, beta: i= 1+4*alpha && j = i+3*beta) };
-is;
-known := { [i,j] : 1 <= i <= n && exists (alpha: i = 1+4*alpha) };
-gist is given known;
-
-codegen is;
-
-# test modulo equations by numbers in multiple
-#
-is := { [i,j] : 1 <= i <= n && i <= j <= n && exists (alpha, beta: i= 1+4*alpha && j = i+8*beta) };
-is;
-known := { [i,j] : 1 <= i <= n && exists (alpha: i = 1+4*alpha) };
-gist is given known;
-
-codegen is;
-
-is := { [i,j] : 1 <= i <= n && i <= j <= n && exists (alpha, beta: i= 1+256*alpha && j = i+8*beta) };
-is;
-known := { [i,j] : 1 <= i <= n && exists (alpha: i = 1+256*alpha) };
-gist is given known;
-
-codegen is;
-
-# test modulo equations by gcd != 1
-#
-is := { [i,j] : 1 <= i <= n && i <= j <= n && exists (alpha, beta: i= 1+4*alpha && j = i+1+6*beta) };
-is;
-known := { [i,j] : 1 <= i <= n && exists (alpha: i = 1+4*alpha) };
-gist is given known;
-codegen is;
-
-is := { [i,j] : 1 <= i <= n && i <= j <= n && exists (alpha, beta: i= 1+6*alpha && j = i+4*beta) };
-is;
-known := { [i,j] : 1 <= i <= n && exists (alpha: i = 1+6*alpha) };
-gist is given known;
-codegen is;
-
-# gist won't simpilfy to the result we want, but the code generation
-# takes care of it
-#
-is := { [i,j] : 1 <= i <= n && i <= j <= n && exists (alpha, beta: i= 1+12*alpha && j = i+8*beta) };
-is;
-known := { [i,j] : 1 <= i <= n && exists (alpha: i = 1+12*alpha) };
-gist is given known;
-codegen is;
diff --git a/omegalib/examples/gist.out b/omegalib/examples/gist.out
deleted file mode 100644
index 44fa8f7..0000000
--- a/omegalib/examples/gist.out
+++ /dev/null
@@ -1,110 +0,0 @@
->>> #
->>> # Test gist function and code generation for modular equations
->>> #
->>>
->>> symbolic n;
->>>
->>> # basic gist function
->>> #
->>> R:={[t1,t2]: exists (aa : 2aa = t1 && 2 <= t1 && t1 <= 8)};
->>> known := {[t1,t2]: 1 <= t1 <= 9};
->>> gist R given known;
-{[t1,t2]: exists ( alpha : 2alpha = t1)}
->>>
->>>
->>> # test modulo equations by coprime numbers
->>> #
->>> is := { [i,j] : 1 <= i <= n && i <= j <= n && exists (alpha, beta: i= 1+4*alpha && j = i+3*beta) };
->>> is;
-{[i,j]: exists ( alpha : 3+i = 4j+12alpha && 1 <= i <= j <= n)}
->>> known := { [i,j] : 1 <= i <= n && exists (alpha: i = 1+4*alpha) };
->>> gist is given known;
-{[i,j]: exists ( alpha : j = i+3alpha && i <= j <= n)}
->>>
->>> codegen is;
-for(t1 = 1; t1 <= n; t1 += 4) {
- for(t2 = t1; t2 <= n; t2 += 3) {
- s0(t1,t2);
- }
-}
-
->>>
->>> # test modulo equations by numbers in multiple
->>> #
->>> is := { [i,j] : 1 <= i <= n && i <= j <= n && exists (alpha, beta: i= 1+4*alpha && j = i+8*beta) };
->>> is;
-{[i,j]: exists ( alpha,beta : j = i+8alpha && i = 1+4beta && 1 <= i <= j <= n)}
->>> known := { [i,j] : 1 <= i <= n && exists (alpha: i = 1+4*alpha) };
->>> gist is given known;
-{[i,j]: exists ( alpha : j = i+8alpha && i <= j <= n)}
->>>
->>> codegen is;
-for(t1 = 1; t1 <= n; t1 += 4) {
- for(t2 = t1; t2 <= n; t2 += 8) {
- s0(t1,t2);
- }
-}
-
->>>
->>> is := { [i,j] : 1 <= i <= n && i <= j <= n && exists (alpha, beta: i= 1+256*alpha && j = i+8*beta) };
->>> is;
-{[i,j]: exists ( alpha,beta : j = 1+8alpha && i = 1+256beta && 1 <= i <= j <= n)}
->>> known := { [i,j] : 1 <= i <= n && exists (alpha: i = 1+256*alpha) };
->>> gist is given known;
-{[i,j]: exists ( alpha : j = 1+8alpha && i <= j <= n)}
->>>
->>> codegen is;
-for(t1 = 1; t1 <= n; t1 += 256) {
- for(t2 = t1; t2 <= n; t2 += 8) {
- s0(t1,t2);
- }
-}
-
->>>
->>> # test modulo equations by gcd != 1
->>> #
->>> is := { [i,j] : 1 <= i <= n && i <= j <= n && exists (alpha, beta: i= 1+4*alpha && j = i+1+6*beta) };
->>> is;
-{[i,j]: exists ( alpha,beta : i+2j = 5+12alpha && i = 1+4beta && 1 <= i < j <= n)}
->>> known := { [i,j] : 1 <= i <= n && exists (alpha: i = 1+4*alpha) };
->>> gist is given known;
-{[i,j]: exists ( alpha : i+2j = 5+12alpha && i < j <= n)}
->>> codegen is;
-for(t1 = 1; t1 <= n-1; t1 += 4) {
- for(t2 = t1+1; t2 <= n; t2 += 6) {
- s0(t1,t2);
- }
-}
-
->>>
->>> is := { [i,j] : 1 <= i <= n && i <= j <= n && exists (alpha, beta: i= 1+6*alpha && j = i+4*beta) };
->>> is;
-{[i,j]: exists ( alpha,beta : 3j = 2+i+12alpha && i = 1+6beta && 1 <= i <= j <= n)}
->>> known := { [i,j] : 1 <= i <= n && exists (alpha: i = 1+6*alpha) };
->>> gist is given known;
-{[i,j]: exists ( alpha : i+j = 2+4alpha && i <= j <= n)}
->>> codegen is;
-for(t1 = 1; t1 <= n; t1 += 6) {
- for(t2 = t1; t2 <= n; t2 += 4) {
- s0(t1,t2);
- }
-}
-
->>>
->>> # gist won't simpilfy to the result we want, but the code generation
->>> # takes care of it
->>> #
->>> is := { [i,j] : 1 <= i <= n && i <= j <= n && exists (alpha, beta: i= 1+12*alpha && j = i+8*beta) };
->>> is;
-{[i,j]: exists ( alpha,beta : 3j = 2+i+24alpha && i = 1+12beta && 1 <= i <= j <= n)}
->>> known := { [i,j] : 1 <= i <= n && exists (alpha: i = 1+12*alpha) };
->>> gist is given known;
-{[i,j]: exists ( alpha : 2+i = 3j+8alpha && i <= j <= n)}
->>> codegen is;
-for(t1 = 1; t1 <= n; t1 += 12) {
- for(t2 = t1; t2 <= n; t2 += 8) {
- s0(t1,t2);
- }
-}
-
->>>
diff --git a/omegalib/examples/hpf b/omegalib/examples/hpf
deleted file mode 100644
index 8d6eca8..0000000
--- a/omegalib/examples/hpf
+++ /dev/null
@@ -1,49 +0,0 @@
-# Example taken from
-# @INPROCEEDINGS{delft,
-# author = {Corinne Ancourt and Fabien Coelho and Fran\c{c}ois Irigoin
-# and Ronan Keryell},
-# title = {A Linear Algebra Framework for Static HPF Code Distribution},
-# booktitle = {Proceedings of the Fourth International Workshop
-# on Compilers for Parallel Computers},
-# year = 1993,
-# month = dec,
-# pages = {117-132},
-# publisher = {Delft University of Technology}
-# }
-#
-# Generate local code for this HPF code fragment
-# !HPF$ template T(0:150,0:150)
-# !HPF$ align Y(I,J) with T(3*I,3*J)
-A := { [i,j] -> [3i,3j] };
-# !HPF$ processors P(0:3, 0:3)
-# !HPF$ distribute
-# !HPF$ T(cyclic(4), cyclic(4)) onto P
-D := { [t1,t2] -> [p1,p2,c1,c2,o1,o2] :
- t1 = 16c1+4p1+o1
- && t2 = 16c2+4p2+o2
- && 0 <= p1,p2 <= 3
- && 0 <= o1,o2 <= 3 };
-#
-# do I = 0, 14
-# Y(I,I) = 1.0
-# enddo
-#
-I := { [i] : 0 <= i <= 14 };
-Y := { [i] -> [i,i] };
-R := D(A(Y(I)));
-R;
-
-symbolic P1,P2;
-selectLocal := {[P1,P2,c1,c2,o1,o2] -> [c1,c2,o1,o2]};
-# We want to iteration the chunk and offset values
-# of Y touched by this statement.
-# the code given in the above paper is:
-# do u3 = 0, 2
-# do u4 = 0, 2
-# do u5 = max(max(0,intDiv(2+4*p1+16*u3,3)),intDiv(2+4*p2+16*u4),3),
-# min(min(14,intDiv(3+4*p1+16*u3,3)),intDiv(3+4*p2+16*u4,3))
-# u6 = intDiv(3*u5-4*p1-16*u3,3)
-# s1[u3,u4,u5,u6]
-#
-# We generate:
-codegen selectLocal(R);
diff --git a/omegalib/examples/hpf.out b/omegalib/examples/hpf.out
deleted file mode 100644
index 3ee21e7..0000000
--- a/omegalib/examples/hpf.out
+++ /dev/null
@@ -1,59 +0,0 @@
->>> # Example taken from
->>> # @INPROCEEDINGS{delft,
->>> # author = {Corinne Ancourt and Fabien Coelho and Fran\c{c}ois Irigoin
->>> # and Ronan Keryell},
->>> # title = {A Linear Algebra Framework for Static HPF Code Distribution},
->>> # booktitle = {Proceedings of the Fourth International Workshop
->>> # on Compilers for Parallel Computers},
->>> # year = 1993,
->>> # month = dec,
->>> # pages = {117-132},
->>> # publisher = {Delft University of Technology}
->>> # }
->>> #
->>> # Generate local code for this HPF code fragment
->>> # !HPF$ template T(0:150,0:150)
->>> # !HPF$ align Y(I,J) with T(3*I,3*J)
->>> A := { [i,j] -> [3i,3j] };
->>> # !HPF$ processors P(0:3, 0:3)
->>> # !HPF$ distribute
->>> # !HPF$ T(cyclic(4), cyclic(4)) onto P
->>> D := { [t1,t2] -> [p1,p2,c1,c2,o1,o2] :
->>> t1 = 16c1+4p1+o1
->>> && t2 = 16c2+4p2+o2
->>> && 0 <= p1,p2 <= 3
->>> && 0 <= o1,o2 <= 3 };
->>> #
->>> # do I = 0, 14
->>> # Y(I,I) = 1.0
->>> # enddo
->>> #
->>> I := { [i] : 0 <= i <= 14 };
->>> Y := { [i] -> [i,i] };
->>> R := D(A(Y(I)));
->>> R;
-{[p1,p1,c1,c1,o1,o1]: exists ( alpha : p1+o1+c1 = 3alpha && 0 <= p1 <= 3, -c1+4 && 0 <= o1 <= 3 && 0 <= c1 <= 2)}
->>>
->>> symbolic P1,P2;
->>> selectLocal := {[P1,P2,c1,c2,o1,o2] -> [c1,c2,o1,o2]};
->>> # We want to iteration the chunk and offset values
->>> # of Y touched by this statement.
->>> # the code given in the above paper is:
->>> # do u3 = 0, 2
->>> # do u4 = 0, 2
->>> # do u5 = max(max(0,intDiv(2+4*p1+16*u3,3)),intDiv(2+4*p2+16*u4),3),
->>> # min(min(14,intDiv(3+4*p1+16*u3,3)),intDiv(3+4*p2+16*u4,3))
->>> # u6 = intDiv(3*u5-4*p1-16*u3,3)
->>> # s1[u3,u4,u5,u6]
->>> #
->>> # We generate:
->>> codegen selectLocal(R);
-if (P1 == P2 && P1 >= 0 && P1 <= 3) {
- for(t1 = 0; t1 <= min(-P1+4,2); t1++) {
- for(t3 = intMod(-P1-t1,3); t3 <= 3; t3 += 3) {
- s0(t1,t1,t3,t3);
- }
- }
-}
-
->>>
diff --git a/omegalib/examples/hull b/omegalib/examples/hull
deleted file mode 100644
index dbb4d3c..0000000
--- a/omegalib/examples/hull
+++ /dev/null
@@ -1,102 +0,0 @@
-# compare new SimpleHull with legacy hull methods
-
-symbolic m,n;
-
-r1 := {[i,j]: i>=0 && j>=0 && i+j<=1};
-r2 := {[i,j]: j>=0 && i<=1 && j<=i};
-
-ConvexHull (r1 union r2);
-DecoupledConvexHull (r1 union r2);
-RectHull (r1 union r2);
-SimpleHull (r1 union r2);
-QuickHull (r1 union r2);
-Hull (r1 union r2);
-
-r1 := {[i]:i<=n && n>=7};
-r2 := {[i]:i<=n-2 && n>=6};
-
-ConvexHull (r1 union r2);
-DecoupledConvexHull (r1 union r2);
-RectHull (r1 union r2);
-SimpleHull (r1 union r2);
-QuickHull (r1 union r2);
-Hull (r1 union r2);
-
-r1 := {[i,j]:0<=i,j<=2};
-r2 := {[i,j]:0<=i && 1<=j && i+j<=4};
-
-ConvexHull (r1 union r2);
-DecoupledConvexHull (r1 union r2);
-RectHull (r1 union r2);
-SimpleHull (r1 union r2);
-QuickHull (r1 union r2);
-Hull (r1 union r2);
-
-r1 := {[i,j]: 1<=i<=n && j=0};
-r2 := {[i,j]: 2<=i<=n+1 && j=1};
-
-ConvexHull (r1 union r2);
-DecoupledConvexHull (r1 union r2);
-RectHull (r1 union r2);
-SimpleHull (r1 union r2);
-QuickHull (r1 union r2);
-Hull (r1 union r2);
-
-r1 := {[i,j,k]: 1<=i<=n && j=0 && k=17i};
-r2 := {[i,j,k]: 2<=i<=n+5 && j=1 && k=17i+10};
-
-ConvexHull (r1 union r2);
-DecoupledConvexHull (r1 union r2);
-RectHull (r1 union r2);
-SimpleHull (r1 union r2);
-QuickHull (r1 union r2);
-Hull (r1 union r2);
-
-r1:={[x,y]:y<=x && y>=0 && y<=2-x};
-r2:={[x,y]:y>=0 && x<=2 && 2y<=x};
-
-ConvexHull (r1 union r2);
-DecoupledConvexHull (r1 union r2);
-RectHull (r1 union r2);
-SimpleHull (r1 union r2);
-QuickHull (r1 union r2);
-Hull (r1 union r2);
-
-r1 := {[i,j]: 0<=i<=1000 && 500<=j<=600};
-r2 := {[i,j]: 500<=i<=600 && 0<=j<=1000};
-
-ConvexHull (r1 union r2);
-DecoupledConvexHull (r1 union r2);
-RectHull (r1 union r2);
-SimpleHull (r1 union r2);
-QuickHull (r1 union r2);
-Hull (r1 union r2);
-
-r1:= {[t1,t2,t3,t4,t5] : 1+t4 = t3 && 32t1+1 <= t3 <= 499, 32t1+32 && 16t2+1 <= t5 <= 499, 16t2+16 && 0 <= t1 && 0 <= t2};
-r2:= {[t1,t2,t3,t4,t5] : t4 = t3 && 16t2 <= t5 <= 498, 16t2+15 && 32t1+1 <= t3 <= 499, 32t1+32 && 0 <= t1 && 0 <= t2 };
-
-ConvexHull (r1 union r2);
-DecoupledConvexHull (r1 union r2);
-RectHull (r1 union r2);
-SimpleHull (r1 union r2);
-QuickHull (r1 union r2);
-Hull (r1 union r2);
-
-r1:={[i]:i<=n && n<=100 && i>=m-10};
-r2:={[i]:i<=2n && n<=200 && i>=m};
-
-ConvexHull (r1 union r2);
-DecoupledConvexHull (r1 union r2);
-RectHull (r1 union r2);
-SimpleHull (r1 union r2);
-QuickHull (r1 union r2);
-Hull (r1 union r2);
-
-r:= {[1,1]} union {[2,2]} union {[3,3]} union {[4,4]};
-
-ConvexHull r;
-DecoupledConvexHull r;
-RectHull r;
-SimpleHull r;
-QuickHull r;
-Hull r;
diff --git a/omegalib/examples/hull.out b/omegalib/examples/hull.out
deleted file mode 100644
index 8d53f57..0000000
--- a/omegalib/examples/hull.out
+++ /dev/null
@@ -1,40 +0,0 @@
->>> # test new hull calculation method RectHull
->>>
->>> symbolic m,n;
->>>
->>> r1 := {[i,j]: i>=0 && j>=0 && i+j<=1};
->>> r2 := {[i,j]: j>=0 && i<=1 && j<=i};
->>>
->>> ConvexHull (r1 union r2);
-{[i,j]: 0 <= i <= 1 && 0 <= j <= 1}
->>> RectHull (r1 union r2);
-{[i,j]: 0 <= i <= 1 && 0 <= j <= 1}
->>> QuickHull (r1 union r2);
-{[i,j]: 0 <= j}
->>> Hull (r1 union r2);
-{[i,j]: 0 <= i <= 1 && 0 <= j <= 1}
->>>
->>> r1 := {[i]:i<=n && n>=7};
->>> r2 := {[i]:i<=n-2 && n>=6};
->>>
->>> ConvexHull (r1 union r2);
-{[i]: i <= 3n-14, n && 6 <= n}
->>> RectHull (r1 union r2);
-{[i]: i <= n && 6 <= n}
->>> QuickHull (r1 union r2);
-{[i]: i <= n && 6 <= n}
->>> Hull (r1 union r2);
-{[i]: i <= n, 3n-14 && 6 <= n}
->>>
->>> r1 := {[i,j]:0<=i,j<=2};
->>> r2 := {[i,j]:0<=i && 1<=j && i+j<=4};
->>>
->>> ConvexHull (r1 union r2);
-{[i,j]: 0 <= i <= j+2, -j+4 && 0 <= j}
->>> RectHull (r1 union r2);
-{[i,j]: 0 <= i <= -j+4, 3 && 0 <= j}
->>> QuickHull (r1 union r2);
-{[i,j]: 0 <= i && 0 <= j}
->>> Hull (r1 union r2);
-{[i,j]: 0 <= i <= -j+4, j+2 && 0 <= j}
-
diff --git a/omegalib/examples/if_then b/omegalib/examples/if_then
deleted file mode 100755
index 9f159c7..0000000
--- a/omegalib/examples/if_then
+++ /dev/null
@@ -1,19 +0,0 @@
-# test if-then-else generation
-
-symbolic n,m;
-r0:={[i,j]:1<=i,j<=n && m>1 && m<n};
-r1:={[i,j]:1<=i,j<=n && m>1 && m>=n };
-r2:={[i,j]:1<=i,j<=n && m<=1};
-codegen 0 r0,r1,r2;
-
-r0:={[i]:1<=i<=100 && n> 1};
-r1:={[i,j]:1<=i,j<=100 && n>1};
-r2:={[i,j]:1<=i,j<=100};
-codegen 0 r0,r1,r2;
-codegen 1 r0,r1,r2;
-codegen 2 r0,r1,r2;
-
-r0:={[i,j]:1<=i,j<=100 && exists (alpha: i=4alpha)};
-r1:={[i,j]:10<=i,j<=100 && exists (alpha: i=4alpha+2)};
-codegen 0 r0,r1;
-codegen 1 r0,r1;
diff --git a/omegalib/examples/interface b/omegalib/examples/interface
deleted file mode 100644
index 48cac6d..0000000
--- a/omegalib/examples/interface
+++ /dev/null
@@ -1,15 +0,0 @@
-# These are the examples from the documentation for the
-# C++ interface to the Omega Library.
-#
-symbolic n, m, F(1);
-
-S1 := { [t] : 1 <= t <= n };
-S2 := { [x] : (0 <= x <= 100 and
- exists (y : 2n <= y <= x and exists (z : y = 2*z+1)))
- or x = 17 };
-
-R := { [i,j] -> [i',j'] : 1 <= i <= i' <= n and not (F(In) = F(Out))
- and 1 <= j, j' <= m };
-S1;
-S2;
-R;
diff --git a/omegalib/examples/interface.out b/omegalib/examples/interface.out
deleted file mode 100644
index 8b5290f..0000000
--- a/omegalib/examples/interface.out
+++ /dev/null
@@ -1,36 +0,0 @@
-# Omega Calculator [v1.1, Oct 96]:
-# #
-# # These are the examples from the documentation for the
-# # C++ interface to the Omega Library.
-# #
-#
-# symbolic n, m, F(1);
-#
-#
-# S1 := { [t] : 1 <= t <= n };
-#
-# S2 := { [x] : (0 <= x <= 100 and
-# exists (y : 2n <= y <= x and exists (z : y = 2*z+1)))
-# or x = 17 };
-#
-# R := { [i,j] -> [i',j'] : 1 <= i <= i' <= n and not (F(In) = F(Out))
-# and 1 <= j, j' <= m };
-#
-#
-# S1;
-
-{[t]: 1 <= t <= n}
-
-#
-# S2;
-
-{[x]: 0, 2n+1 <= x <= 100} union
- {[x]: x = 17}
-
-#
-# R;
-
-{[i,j] -> [i',j'] : 1 <= i < i' <= n && 1 <= j <= m && 1 <= j' <= m && F(i) < F(i')} union
- {[i,j] -> [i',j'] : 1 <= i < i' <= n && 1 <= j <= m && 1 <= j' <= m && F(i') < F(i)}
-
-#
diff --git a/omegalib/examples/lu b/omegalib/examples/lu
deleted file mode 100644
index 800d8a0..0000000
--- a/omegalib/examples/lu
+++ /dev/null
@@ -1,41 +0,0 @@
-# Perform imperfect loop interchange of LU decomposition
-# to get jki form and then block the k and i loops
-#
-#for k = 1 to n do
-# for i = k+1 to n do
-# a(i,k) = a(i,k) / a(k,k)
-# for j = k+1 to n do
-# a(i,j) = a(i,j) - a(k,j)*a(i,k)
-# endfor
-# endfor
-#endfor
-#
-#
-
-symbolic n;
-
-IS10 := {[k,i] : 1 <= k <= n && k+1 <= i <= n};
-IS20 := {[k,i,j] : 1 <= k <= n && k+1 <= i <= n && k+1 <= j <= n};
-
-T10 := {[k,i] -> [t1,t2,k,k,i]:
-exists (alpha,beta: t1 = 64beta+1 && k-1 = alpha + 64 beta &&
- alpha >= 0 && alpha <= 63)
-&& exists (gamma,delta: t2 = 64delta && i = gamma +64delta &&
- gamma >= 0 && gamma <= 63)};
-
-T20 := {[k,i,j] -> [t1,t2,j,k,i]:
-exists (alpha,beta: t1 = 64beta+1 && k-1 = alpha + 64 beta &&
- alpha >= 0 && alpha <= 63)
-&& exists (gamma,delta: t2 = 64delta && i = gamma +64delta &&
- gamma >= 0 && gamma <= 63)};
-
-T10;
-T20;
-
-# Generate code with different ammounts of overhead remove
-# The more overhead we remove, the more code duplication may occur
-codegen 0 T10:IS10,T20:IS20;
-codegen 1 T10:IS10,T20:IS20;
-codegen 2 T10:IS10,T20:IS20;
-codegen 3 T10:IS10,T20:IS20;
-
diff --git a/omegalib/examples/lu.out b/omegalib/examples/lu.out
deleted file mode 100644
index eecaa51..0000000
--- a/omegalib/examples/lu.out
+++ /dev/null
@@ -1,117 +0,0 @@
->>> # Perform imperfect loop interchange of LU decomposition
->>> # to get jki form and then block the k and i loops
->>> #
->>> #for k = 1 to n do
->>> # for i = k+1 to n do
->>> # a(i,k) = a(i,k) / a(k,k)
->>> # for j = k+1 to n do
->>> # a(i,j) = a(i,j) - a(k,j)*a(i,k)
->>> # endfor
->>> # endfor
->>> #endfor
->>> #
->>> #
->>>
->>> symbolic n;
->>>
->>> IS10 := {[k,i] : 1 <= k <= n && k+1 <= i <= n};
->>> IS20 := {[k,i,j] : 1 <= k <= n && k+1 <= i <= n && k+1 <= j <= n};
->>>
->>> T10 := {[k,i] -> [t1,t2,k,k,i]:
->>> exists (alpha,beta: t1 = 64beta+1 && k-1 = alpha + 64 beta &&
->>> alpha >= 0 && alpha <= 63)
->>> && exists (gamma,delta: t2 = 64delta && i = gamma +64delta &&
->>> gamma >= 0 && gamma <= 63)};
->>>
->>> T20 := {[k,i,j] -> [t1,t2,j,k,i]:
->>> exists (alpha,beta: t1 = 64beta+1 && k-1 = alpha + 64 beta &&
->>> alpha >= 0 && alpha <= 63)
->>> && exists (gamma,delta: t2 = 64delta && i = gamma +64delta &&
->>> gamma >= 0 && gamma <= 63)};
->>>
->>> T10;
-{[k,i] -> [t1,t2,k,k,i] : exists ( alpha,beta : t1 = 1+64alpha && t2 = 64beta && k-63 <= t1 <= k && i-63 <= t2 <= i)}
->>> T20;
-{[k,i,j] -> [t1,t2,j,k,i] : exists ( alpha,beta : t1 = 1+64alpha && t2 = 64beta && k-63 <= t1 <= k && i-63 <= t2 <= i)}
->>>
->>> # Generate code with different ammounts of overhead remove
->>> # The more overhead we remove, the more code duplication may occur
->>> codegen 0 T10:IS10,T20:IS20;
-for(t1 = 1; t1 <= n-1; t1 += 64) {
- for(t2 = t1-1; t2 <= n; t2 += 64) {
- for(t3 = t1; t3 <= n; t3++) {
- for(t4 = t1; t4 <= min(t3-1,t2+62,t1+63); t4++) {
- for(t5 = max(t2,t4+1); t5 <= min(n,t2+63); t5++) {
- s1(t4,t5,t3);
- }
- }
- if (t1 >= t3-63) {
- for(t5 = max(t3+1,t2); t5 <= min(n,t2+63); t5++) {
- s0(t3,t5);
- }
- }
- }
- }
-}
-
->>> codegen 1 T10:IS10,T20:IS20;
-for(t1 = 1; t1 <= n-1; t1 += 64) {
- for(t2 = t1-1; t2 <= n; t2 += 64) {
- for(t3 = t1; t3 <= n; t3++) {
- for(t4 = t1; t4 <= min(t3-1,t2+62,t1+63); t4++) {
- for(t5 = max(t2,t4+1); t5 <= min(n,t2+63); t5++) {
- s1(t4,t5,t3);
- }
- }
- if (t1 >= t3-63) {
- for(t5 = max(t3+1,t2); t5 <= min(n,t2+63); t5++) {
- s0(t3,t5);
- }
- }
- }
- }
-}
-
->>> codegen 2 T10:IS10,T20:IS20;
-for(t1 = 1; t1 <= n-1; t1 += 64) {
- for(t2 = t1-1; t2 <= n; t2 += 64) {
- for(t3 = t1; t3 <= n; t3++) {
- for(t4 = t1; t4 <= min(t3-1,t2+62,t1+63); t4++) {
- for(t5 = max(t2,t4+1); t5 <= min(n,t2+63); t5++) {
- s1(t4,t5,t3);
- }
- }
- if (t1 >= t3-63) {
- for(t5 = max(t3+1,t2); t5 <= min(n,t2+63); t5++) {
- s0(t3,t5);
- }
- }
- }
- }
-}
-
->>> codegen 3 T10:IS10,T20:IS20;
-for(t1 = 1; t1 <= n-1; t1 += 64) {
- for(t2 = t1-1; t2 <= n; t2 += 64) {
- for(t3 = t1; t3 <= min(t1+63,n); t3++) {
- for(t4 = t1; t4 <= min(t2+62,t3-1); t4++) {
- for(t5 = max(t2,t4+1); t5 <= min(t2+63,n); t5++) {
- s1(t4,t5,t3);
- }
- }
- for(t5 = max(t2,t3+1); t5 <= min(n,t2+63); t5++) {
- s0(t3,t5);
- }
- }
- for(t3 = t1+64; t3 <= n; t3++) {
- for(t4 = t1; t4 <= min(t2+62,t1+63); t4++) {
- for(t5 = max(t2,t4+1); t5 <= min(t2+63,n); t5++) {
- s1(t4,t5,t3);
- }
- }
- }
- }
-}
-
->>>
->>>
diff --git a/omegalib/examples/old_test/affineClosure b/omegalib/examples/old_test/affineClosure
deleted file mode 100644
index 1039856..0000000
--- a/omegalib/examples/old_test/affineClosure
+++ /dev/null
@@ -1,19 +0,0 @@
-
-symbolic n;
-symbolic c;
-
-R := {[i,j] : 1 <= i <= 10 && 1 <= j <= n};
-R;
-ac := approximate {[i,j] : exists (lambda0, lambda1,lambda2,lambda3,lambda4 :
- 0 <= lambda0, lambda1,lambda2,lambda3,lambda4
- && c = lambda0-lambda1+ 10 lambda2 - lambda3
- && i = lambda1-lambda2
- && j = lambda3-lambda4
- && n = lambda4)};
-ac;
-
-#ac intersection {[i,j] : i = 1 && c = -1} ;
-#ac intersection {[i,j] : i = -1 && c = 10} ;
-#ac intersection {[i,j] : j = 1 && c = -1 } ;
-#ac intersection {[i,j] : j = -1 && n = 1} ;
-
diff --git a/omegalib/examples/old_test/affineClosure.oc-rt b/omegalib/examples/old_test/affineClosure.oc-rt
deleted file mode 100644
index fbf8bf9..0000000
--- a/omegalib/examples/old_test/affineClosure.oc-rt
+++ /dev/null
@@ -1,32 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-#
-# symbolic n;
-#
-# symbolic c;
-#
-#
-# R := {[i,j] : 1 <= i <= 10 && 1 <= j <= n};
-#
-# R;
-
-{[i,j]: 1 <= i <= 10 && 1 <= j <= n}
-
-#
-# ac := approximate {[i,j] : exists (lambda0, lambda1,lambda2,lambda3,lambda4 :
-# 0 <= lambda0, lambda1,lambda2,lambda3,lambda4
-# && c = lambda0-lambda1+ 10 lambda2 - lambda3
-# && i = lambda1-lambda2
-# && j = lambda3-lambda4
-# && n = lambda4)};
-#
-# ac;
-
-{[i,j]: 0 <= n && 0 <= n+c+i+j && 0 <= n+c+10i+j && 0 <= n+j}
-
-#
-#
-# #ac intersection {[i,j] : i = 1 && c = -1} ;
-# #ac intersection {[i,j] : i = -1 && c = 10} ;
-# #ac intersection {[i,j] : j = 1 && c = -1 } ;
-# #ac intersection {[i,j] : j = -1 && n = 1} ;
-#
diff --git a/omegalib/examples/old_test/affineClosure2 b/omegalib/examples/old_test/affineClosure2
deleted file mode 100644
index 35ae0e1..0000000
--- a/omegalib/examples/old_test/affineClosure2
+++ /dev/null
@@ -1,55 +0,0 @@
-symbolic n;
-symbolic c;
-# # Omega Calculator [v1.00, Mar 96]:
-# #
-# #
-# #
-# # R := {[i,j] : 1 <= i <= 10 && 1 <= j <= n};
-# #
-# # R;
-#
-# {[i,j]: 1 <= i <= 10 && 1 <= j <= n}
-#
-# #
-# # ac := approximate {[i,j] : exists (lambda0, lambda1,lambda2,lambda3,lambda4 :
-# # 0 <= lambda0, lambda1,lambda2,lambda3,lambda4
-# # && c = lambda0-lambda1+ 10 lambda2 - lambda3
-# # && i = lambda1-lambda2
-# # && j = lambda3-lambda4
-# # && n = lambda4)};
-# #
-# # ac;
-#
-# {[i,j]: 0 <= n && 0 <= n+c+i+j && 0 <= n+c+10i+j && 0 <= n+j}
-#
-# #
-# #
-# # #ac intersection {[i,j] : i = 1 && c = -1} ;
-# # #ac intersection {[i,j] : i = -1 && c = 10} ;
-# # #ac intersection {[i,j] : j = 1 && c = -1 } ;
-# # #ac intersection {[i,j] : j = -1 && n = 1} ;
-# #
-
-approximate {[i,j] : exists (lambda0, lambda1,lambda2,lambda3,lambda4 :
- 0 <= lambda0,lambda1,lambda2,lambda3,lambda4
- && n = lambda1+lambda2+lambda3+lambda4
- && i = lambda2+10lambda3
- && j = lambda2+lambda3+lambda4
- && c = lambda0+lambda2+lambda3
- && c = 1
- )};
-approximate {[i,j] : exists (lambda0, lambda1,lambda2,lambda3,lambda4 :
- 0 <= lambda1,lambda2,lambda3,lambda4
- && n = lambda1+lambda2+lambda3+lambda4
- && i = lambda2+10lambda3
- && j = lambda2+lambda3+lambda4
- && c = lambda2+lambda3
- && c = 1
- )};
-approximate {[i,j] : exists (lambda0, lambda1,lambda2,lambda3,lambda4 :
- 0 <= lambda1,lambda2,lambda3,lambda4
- && n = lambda1+lambda2+lambda3+lambda4
- && i = lambda2+10lambda3
- && j = lambda2+lambda3+lambda4
- && c = lambda2+lambda3
- )};
diff --git a/omegalib/examples/old_test/affineClosure2.oc-rt b/omegalib/examples/old_test/affineClosure2.oc-rt
deleted file mode 100644
index b4c1fd7..0000000
--- a/omegalib/examples/old_test/affineClosure2.oc-rt
+++ /dev/null
@@ -1,70 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# symbolic n;
-#
-# symbolic c;
-#
-# # # Omega Calculator [v1.00, Mar 96]:
-# # #
-# # #
-# # #
-# # # R := {[i,j] : 1 <= i <= 10 && 1 <= j <= n};
-# # #
-# # # R;
-# #
-# # {[i,j]: 1 <= i <= 10 && 1 <= j <= n}
-# #
-# # #
-# # # ac := approximate {[i,j] : exists (lambda0, lambda1,lambda2,lambda3,lambda4 :
-# # # 0 <= lambda0, lambda1,lambda2,lambda3,lambda4
-# # # && c = lambda0-lambda1+ 10 lambda2 - lambda3
-# # # && i = lambda1-lambda2
-# # # && j = lambda3-lambda4
-# # # && n = lambda4)};
-# # #
-# # # ac;
-# #
-# # {[i,j]: 0 <= n && 0 <= n+c+i+j && 0 <= n+c+10i+j && 0 <= n+j}
-# #
-# # #
-# # #
-# # # #ac intersection {[i,j] : i = 1 && c = -1} ;
-# # # #ac intersection {[i,j] : i = -1 && c = 10} ;
-# # # #ac intersection {[i,j] : j = 1 && c = -1 } ;
-# # # #ac intersection {[i,j] : j = -1 && n = 1} ;
-# # #
-#
-# approximate {[i,j] : exists (lambda0, lambda1,lambda2,lambda3,lambda4 :
-# 0 <= lambda0,lambda1,lambda2,lambda3,lambda4
-# && n = lambda1+lambda2+lambda3+lambda4
-# && i = lambda2+10lambda3
-# && j = lambda2+lambda3+lambda4
-# && c = lambda0+lambda2+lambda3
-# && c = 1
-# )};
-
-{[i,j]: c = 1 && 0 <= i <= 10j, 10 && j <= n}
-
-#
-# approximate {[i,j] : exists (lambda0, lambda1,lambda2,lambda3,lambda4 :
-# 0 <= lambda1,lambda2,lambda3,lambda4
-# && n = lambda1+lambda2+lambda3+lambda4
-# && i = lambda2+10lambda3
-# && j = lambda2+lambda3+lambda4
-# && c = lambda2+lambda3
-# && c = 1
-# )};
-
-{[i,j]: c = 1 && 1 <= i <= 10 && 1 <= j <= n}
-
-#
-# approximate {[i,j] : exists (lambda0, lambda1,lambda2,lambda3,lambda4 :
-# 0 <= lambda1,lambda2,lambda3,lambda4
-# && n = lambda1+lambda2+lambda3+lambda4
-# && i = lambda2+10lambda3
-# && j = lambda2+lambda3+lambda4
-# && c = lambda2+lambda3
-# )};
-
-{[i,j]: c <= i <= 10c && c <= j <= n}
-
-#
diff --git a/omegalib/examples/old_test/beatrice2 b/omegalib/examples/old_test/beatrice2
deleted file mode 100644
index 7b425fd..0000000
--- a/omegalib/examples/old_test/beatrice2
+++ /dev/null
@@ -1,51 +0,0 @@
-# do i = 1, np {
-# do j = 1, i {
-# ij = ia(i) + j
-# a = 1. / (i + j)
-# do k = 1, i {
-# maxl = k
-# if (k == i) then
-# maxl = j
-# endif
-# do l = 1, maxl {
-# kl = ia(k) + l
-# b = 1. / (k + l)
-# val = a + b
-# if (i == j) then
-# val = val * .5
-# endif
-# if (k == l) then
-# val = val * .5
-# endif
-# x(ij,kl) = val
-# x(kl,ij) = val
-# }
-# }
-# }
-# }
-#!
-#
-#
-# As far as I remember it was the dependence test between X(IJ,KL) and X(IJ,KL).
-#
-# Pips discovered the following precondition:
-#
-
-{[d1,d2,d3,d4] : exists ( NP,
- I,J,K,L,IJ,KJ,MAXL,
- I',J',K',L',IJ',KJ',MAXL' :
- I' = I+d1 &&
- J' = J+d2 &&
- K' = K+d3 &&
- L' = L+d4
- && 1<=L && 1<=J && MAXL<=K && I<=NP && NP<=40 && 10<=NP
- && 10+8K+MAXL<=NP+8I+J && 38K+MAXL<=38I+J
- && J+K<=I+MAXL && L<=MAXL
- && 1 <= J,K <= I <= NP && 1 <=L <= MAXL
-
- && 1<=L' && 1<=J' && MAXL'<=K' && I'<=NP && NP<=40 && 10<=NP
- && 10+8K'+MAXL'<=NP+8I'+J' && 38K'+MAXL'<=38I'+J'
- && J'+K'<=I'+MAXL' && L'<=MAXL'
- && 1 <= J',K' <= I' <= NP && 1 <=L' <= MAXL'
- )};
-
diff --git a/omegalib/examples/old_test/beatrice2.oc-rt b/omegalib/examples/old_test/beatrice2.oc-rt
deleted file mode 100644
index 7952859..0000000
--- a/omegalib/examples/old_test/beatrice2.oc-rt
+++ /dev/null
@@ -1,56 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# # do i = 1, np {
-# # do j = 1, i {
-# # ij = ia(i) + j
-# # a = 1. / (i + j)
-# # do k = 1, i {
-# # maxl = k
-# # if (k == i) then
-# # maxl = j
-# # endif
-# # do l = 1, maxl {
-# # kl = ia(k) + l
-# # b = 1. / (k + l)
-# # val = a + b
-# # if (i == j) then
-# # val = val * .5
-# # endif
-# # if (k == l) then
-# # val = val * .5
-# # endif
-# # x(ij,kl) = val
-# # x(kl,ij) = val
-# # }
-# # }
-# # }
-# # }
-# #!
-# #
-# #
-# # As far as I remember it was the dependence test between X(IJ,KL) and X(IJ,KL).
-# #
-# # Pips discovered the following precondition:
-# #
-#
-# {[d1,d2,d3,d4] : exists ( NP,
-# I,J,K,L,IJ,KJ,MAXL,
-# I',J',K',L',IJ',KJ',MAXL' :
-# I' = I+d1 &&
-# J' = J+d2 &&
-# K' = K+d3 &&
-# L' = L+d4
-# && 1<=L && 1<=J && MAXL<=K && I<=NP && NP<=40 && 10<=NP
-# && 10+8K+MAXL<=NP+8I+J && 38K+MAXL<=38I+J
-# && J+K<=I+MAXL && L<=MAXL
-# && 1 <= J,K <= I <= NP && 1 <=L <= MAXL
-#
-# && 1<=L' && 1<=J' && MAXL'<=K' && I'<=NP && NP<=40 && 10<=NP
-# && 10+8K'+MAXL'<=NP+8I'+J' && 38K'+MAXL'<=38I'+J'
-# && J'+K'<=I'+MAXL' && L'<=MAXL'
-# && 1 <= J',K' <= I' <= NP && 1 <=L' <= MAXL'
-# )};
-
-{[d1,d2,d3,d4]: d2-39, -39, d4-39, d3-39 <= d1 <= d3+39, d2+39, d4+39, 39 && d4-39, -39 <= d3 <= 39, d4+39 && -39 <= d2 <= 39 && 39d4 <= 1521+38d1+d2 && d3 <= 39+d1+d4 && d2 <= 1521+d1+38d3+d4 && 38d1+d2 <= 1521+39d4 && 38d1+d2 <= 1521+38d3+d4 && d2 <= 1521+d1+39d4 && d1+38d3+d4 <= 1521+d2 && d1+d4 <= 39+d3 && 38d3+d4 <= 1521+38d1+d2 && d1+39d4 <= 1521+d2}
-
-#
-#
diff --git a/omegalib/examples/old_test/blume1.w b/omegalib/examples/old_test/blume1.w
deleted file mode 100644
index 14d7329..0000000
--- a/omegalib/examples/old_test/blume1.w
+++ /dev/null
@@ -1,6 +0,0 @@
-symbolic n, line5expr(2);
-
-$$
-\{ [i,j] -> [i',j'] \mid line5expr(In) = line5expr(Out) && 2 <= j <= 1 && 1 <= i <= n && 2 <= j' <= 1 && 1 <= i' <= n \};
-$$
-
diff --git a/omegalib/examples/old_test/blume1.w.oc-rt b/omegalib/examples/old_test/blume1.w.oc-rt
deleted file mode 100644
index 68d6aad..0000000
--- a/omegalib/examples/old_test/blume1.w.oc-rt
+++ /dev/null
@@ -1,12 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# Symbolic n, line5expr(2);
-#
-#
-# $$
-# \{ [i,j] -> [i',j'] \mid line5expr(In) = line5expr(Out) && 2 <= j <= 1 && 1 <= i <= n && 2 <= j' <= 1 && 1 <= i' <= n \};
-
-{[i,j] -> [i',j'] : FALSE }
-
-#
-# $$
-#
diff --git a/omegalib/examples/old_test/cfft2d1 b/omegalib/examples/old_test/cfft2d1
deleted file mode 100644
index 8b59f29..0000000
--- a/omegalib/examples/old_test/cfft2d1
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-# A (memory-based!) data dependence relation from a greatly simplified
-# cfft2d1.t that was causing us trouble.
-#
-
-symbolic line22(1), im_1(2);
-
-flow := { [iii_w,jj_w] -> [iii_r,jj_r] :
- im_1(In) = im_1(Out)
- && 1 <= jj_w
- && jj_w <= line22(In)
- && 1 <= iii_w
- && iii_w <= 200
- && 1 <= jj_r
- && jj_r <= line22(Out)
- && 1 <= iii_r
- && iii_r <= 200 };
-
-zero_plus := { [i1,j1] -> [i2,j2] : i1 = i2 && j1 < j2 };
-
-flow intersection zero_plus;
diff --git a/omegalib/examples/old_test/cfft2d1.oc-rt b/omegalib/examples/old_test/cfft2d1.oc-rt
deleted file mode 100644
index 8f8dd27..0000000
--- a/omegalib/examples/old_test/cfft2d1.oc-rt
+++ /dev/null
@@ -1,29 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# #
-# # A (memory-based!) data dependence relation from a greatly simplified
-# # cfft2d1.t that was causing us trouble.
-# #
-#
-# Symbolic line22(1), im_1(2);
-#
-#
-# flow := { [iii_w,jj_w] -> [iii_r,jj_r] :
-# im_1(In) = im_1(Out)
-# && 1 <= jj_w
-# && jj_w <= line22(In)
-# && 1 <= iii_w
-# && iii_w <= 200
-# && 1 <= jj_r
-# && jj_r <= line22(Out)
-# && 1 <= iii_r
-# && iii_r <= 200 };
-#
-#
-# zero_plus := { [i1,j1] -> [i2,j2] : i1 = i2 && j1 < j2 };
-#
-#
-# flow intersection zero_plus;
-
-{[In_1,In_2] -> [Out_1,Out_2] : im_1(In_1,In_2) = im_1(Out_1,Out_2) && Out_1 = In_1 && 1 <= In_2 < Out_2 <= line22(In_1) && 1 <= In_1 <= 200}
-
-#
diff --git a/omegalib/examples/old_test/chosol b/omegalib/examples/old_test/chosol
deleted file mode 100644
index 134172c..0000000
--- a/omegalib/examples/old_test/chosol
+++ /dev/null
@@ -1,11 +0,0 @@
-T10:={[i] -> [0,i,0,0]};
-T20:={[i,j] -> [1,j,0,i]};
-T30:={[i] -> [1,i-1,1,0]};
-
-symbolic n;
-IS10 := {[i]: 2 <= i <= n};
-IS20 := {[i,j]: 2 <= i <= n && 1 <= j <= i-1};
-IS30 := IS10;
-
-codegen T10:IS10,T20:IS20,T30:IS30;
-codegen 2 T10:IS10,T20:IS20,T30:IS30;
diff --git a/omegalib/examples/old_test/chosol.oc-rt b/omegalib/examples/old_test/chosol.oc-rt
deleted file mode 100644
index 8fa3b38..0000000
--- a/omegalib/examples/old_test/chosol.oc-rt
+++ /dev/null
@@ -1,32 +0,0 @@
->>> T10:={[i] -> [0,i,0,0]};
->>> T20:={[i,j] -> [1,j,0,i]};
->>> T30:={[i] -> [1,i-1,1,0]};
->>>
->>> Symbolic n;
->>> IS10 := {[i]: 2 <= i <= n};
->>> IS20 := {[i,j]: 2 <= i <= n && 1 <= j <= i-1};
->>> IS30 := IS10;
->>>
->>> codegen T10:IS10,T20:IS20,T30:IS30;
-for(t2 = 2; t2 <= n; t2++) {
- s1(t2);
-}
-for(t2 = 1; t2 <= n-1; t2++) {
- for(t4 = t2+1; t4 <= n; t4++) {
- s2(t4,t2);
- }
- s3(t2+1);
-}
-
->>> codegen 2 T10:IS10,T20:IS20,T30:IS30;
-for(t2 = 2; t2 <= n; t2++) {
- s1(t2);
-}
-for(t2 = 1; t2 <= n-1; t2++) {
- for(t4 = t2+1; t4 <= n; t4++) {
- s2(t4,t2);
- }
- s3(t2+1);
-}
-
-
diff --git a/omegalib/examples/old_test/closure1 b/omegalib/examples/old_test/closure1
deleted file mode 100644
index 0e4c541..0000000
--- a/omegalib/examples/old_test/closure1
+++ /dev/null
@@ -1,8 +0,0 @@
-({[i] -> [i+2]} union {[i] -> [i+3]})+;
-R := ({[i] -> [i'] : i'=i+3} union {[i] -> [i'] : i'=i+5} union {[i] -> [i'] : i'=i+7})+;
-R;
-notR := {[i] -> [i'] : i' >= i+3} - R;
-notR;
-{[i] -> [i'] : i' >= i+3} - notR;
-
-
diff --git a/omegalib/examples/old_test/closure1.oc-rt b/omegalib/examples/old_test/closure1.oc-rt
deleted file mode 100644
index 93ecda0..0000000
--- a/omegalib/examples/old_test/closure1.oc-rt
+++ /dev/null
@@ -1,31 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# ({[i] -> [i+2]} union {[i] -> [i+3]})+;
-
-{[i] -> [Out_1] : Exists ( alpha : 2alpha = i+Out_1 && i <= Out_1-2)} union
- {[i] -> [Out_1] : Exists ( alpha : i < Out_1+2alpha && Out_1+3alpha <= i)}
-
-#
-# R := ({[i] -> [i'] : i'=i+3} union {[i] -> [i'] : i'=i+5} union {[i] -> [i'] : i'=i+7})+;
-#
-# R;
-
-{[i] -> [i'] : Exists ( alpha : i+3alpha = i' && i <= i'-3)} union
- {[i] -> [i'] : Exists ( alpha : i < i'+3alpha && 2i'+7alpha <= 2i)} union
- {[i] -> [i'] : Exists ( alpha : i'+3alpha < i && 2i <= 2i'+5alpha)}
-
-#
-# notR := {[i] -> [i'] : i' >= i+3} - R;
-#
-# notR;
-
-{[i] -> [i+4] }
-
-#
-# {[i] -> [i'] : i' >= i+3} - notR;
-
-{[i] -> [i+3] } union
- {[i] -> [i'] : i <= i'-5}
-
-#
-#
-#
diff --git a/omegalib/examples/old_test/closure2 b/omegalib/examples/old_test/closure2
deleted file mode 100644
index 1cfcefd..0000000
--- a/omegalib/examples/old_test/closure2
+++ /dev/null
@@ -1,4 +0,0 @@
-R := {[i,j] -> [i+3,j]} union {[i,j] -> [i+2,j-1]} union {[i,j] -> [i+1,j+1]};
-R+;
-R+ compose R;
-R - (R+ compose R);
diff --git a/omegalib/examples/old_test/closure2.oc-rt b/omegalib/examples/old_test/closure2.oc-rt
deleted file mode 100644
index e10a428..0000000
--- a/omegalib/examples/old_test/closure2.oc-rt
+++ /dev/null
@@ -1,22 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# R := {[i,j] -> [i+3,j]} union {[i,j] -> [i+2,j-1]} union {[i,j] -> [i+1,j+1]};
-#
-# R+;
-
-{[i,j] -> [Out_1,j'] : Out_1+2j' = i+2j && j' < j} union
- {[i,j] -> [Out_1,j'] : Exists ( alpha : i+j' = j+Out_1+3alpha && 3+i+2j <= Out_1+2j' && i+j' <= j+Out_1)}
-
-#
-# R+ compose R;
-
-{[i,j] -> [Out_1,j'] : Out_1+2j' = i+2j && j' <= j-2} union
- {[i,j] -> [Out_1,j'] : Exists ( alpha : i+j' = j+Out_1+3alpha && 3+i+2j <= Out_1+2j' && 3+i+j' <= j+Out_1)} union
- {[i,j] -> [Out_1,j'] : Exists ( alpha : i+j' = j+Out_1+3alpha && 6+i+2j <= Out_1+2j' && i+j' <= j+Out_1)}
-
-#
-# R - (R+ compose R);
-
-{[i,j] -> [i+2,j-1] } union
- {[i,j] -> [i+1,j+1] }
-
-#
diff --git a/omegalib/examples/old_test/closure3 b/omegalib/examples/old_test/closure3
deleted file mode 100644
index 4fdc022..0000000
--- a/omegalib/examples/old_test/closure3
+++ /dev/null
@@ -1,10 +0,0 @@
-symbolic n,m;
-d11 := {[i,j] -> [i,2i+j] : 1 <= i <= n && 1 <= j,2i+j <= m};
-d12 := {[i,j] -> [i,j+4] : 1 <= i <= n && 1 <= j,j+4 <= m};
-d := d11 union d12;
-d+;
-d+ compose d;
-d11 - (d+ compose d);
-gist d11 - (d+ compose d) given d11;
-d12 - (d+ compose d);
-gist d12 - (d+ compose d) given d12;
diff --git a/omegalib/examples/old_test/closure3.oc-rt b/omegalib/examples/old_test/closure3.oc-rt
deleted file mode 100644
index 4d99b34..0000000
--- a/omegalib/examples/old_test/closure3.oc-rt
+++ /dev/null
@@ -1,48 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# symbolic n,m;
-#
-# d11 := {[i,j] -> [i,2i+j] : 1 <= i <= n && 1 <= j,2i+j <= m};
-#
-# d12 := {[i,j] -> [i,j+4] : 1 <= i <= n && 1 <= j,j+4 <= m};
-#
-# d := d11 union d12;
-#
-# d+;
-
-{[1,j] -> [1,j+2] : j+2 <= m <= 4 && 1 <= n && 1 <= j} union
- {[i,j] -> [i,Out_2] : Exists ( alpha : Out_2 = j+4alpha && Out_2+4 <= m <= 2i && 1 <= j <= Out_2-4 && i <= n)} union
- {[i,j] -> [i,Out_2] : Exists ( alpha : Out_2 = 2i+j+4alpha && 1 <= i <= n && Out_2 <= m && 1 <= j && 5 <= m && 2i+j <= Out_2)} union
- {[i,j] -> [i,Out_2] : Exists ( alpha,beta : Out_2 = j+4alpha && 1 <= i <= n && Out_2 <= m && 2i+4beta < Out_2 && 1 <= j && Out_2 <= m+2i+4beta && 4i+j <= Out_2)} union
- {[i,j] -> [i,Out_2] : Exists ( alpha : Out_2 = j+4alpha && 1 <= i <= n && 1 <= j <= Out_2-4 && Out_2 <= m && 2i < m)}
-
-#
-# d+ compose d;
-
-{[i,j] -> [i,Out_2] : Exists ( alpha : Out_2 = j+4alpha && Out_2+4 <= m <= 2i && 1 <= j <= Out_2-8 && i <= n)} union
- {[i,j] -> [i,Out_2] : Exists ( alpha : Out_2 = j+4alpha && 1 <= i <= n && Out_2 <= m && 1 <= j && 4i+j <= Out_2)} union
- {[i,j] -> [i,Out_2] : Exists ( alpha : Out_2 = 2i+j+4alpha && 1 <= i <= n && Out_2 <= m && 4+2i+j <= Out_2 && 1 <= j)} union
- {[i,j] -> [i,Out_2] : Exists ( alpha : Out_2 = j+4alpha && 1 <= i <= n && 1 <= j <= Out_2-8 && Out_2 <= m && 2i < m)}
-
-#
-# d11 - (d+ compose d);
-
-{[i,j] -> [i,2i+j] : 1 <= i <= 3, n && 1 <= j && 2i+j <= m} union
- {[i,j] -> [i,2i+j] : Exists ( alpha : 2alpha = 1+i && 5 <= i <= n && 2i+j <= m && 1 <= j)}
-
-#
-# gist d11 - (d+ compose d) given d11;
-
-{[i,j] -> [i',Out_2] : i' <= 3} union
- {[i,j] -> [i',Out_2] : Exists ( alpha : 0 = 1+i'+2alpha && 5 <= i)}
-
-#
-# d12 - (d+ compose d);
-
-{[i,j] -> [i,j+4] : 2 <= i <= n && 1 <= j <= m-4}
-
-#
-# gist d12 - (d+ compose d) given d12;
-
-{[i,j] -> [i',Out_2] : 2 <= i'}
-
-#
diff --git a/omegalib/examples/old_test/closure4 b/omegalib/examples/old_test/closure4
deleted file mode 100644
index e5adb13..0000000
--- a/omegalib/examples/old_test/closure4
+++ /dev/null
@@ -1,8 +0,0 @@
-symbolic n,m;
-R1 := {[x,y] -> [x,y+1] : 1 <= x,y <= 10};
-R2 := {[x,y] -> [x+1,y] : 1 <= x <= 20 && 5 <= y <= 15};
-R12 := R1 union R2;
-R12c := R12+;
-R12c;
-(R12c compose R12c) - R12c;
-(R12c compose R12) - R12c;
diff --git a/omegalib/examples/old_test/closure4.oc-rt b/omegalib/examples/old_test/closure4.oc-rt
deleted file mode 100644
index d208cce..0000000
--- a/omegalib/examples/old_test/closure4.oc-rt
+++ /dev/null
@@ -1,28 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# symbolic n,m;
-#
-# R1 := {[x,y] -> [x,y+1] : 1 <= x,y <= 10};
-#
-# R2 := {[x,y] -> [x+1,y] : 1 <= x <= 20 && 5 <= y <= 15};
-#
-# R12 := R1 union R2;
-#
-# R12c := R12+;
-#
-# R12c;
-
-{[x,y] -> [x,y'] : 1 <= y < y' <= 11 && 1 <= x <= 10} union
- {[x,y] -> [x',y] : 1 <= x < x' <= 21 && 5 <= y <= 15} union
- {[x,y] -> [x',y'] : 1 <= x < x' <= 21 && 1 <= y < y' <= 11 && x <= 10 && 5 <= y'}
-
-#
-# (R12c compose R12c) - R12c;
-
-{[x,y] -> [x',y'] : FALSE }
-
-#
-# (R12c compose R12) - R12c;
-
-{[x,y] -> [x',y'] : FALSE }
-
-#
diff --git a/omegalib/examples/old_test/closure5 b/omegalib/examples/old_test/closure5
deleted file mode 100644
index 2792806..0000000
--- a/omegalib/examples/old_test/closure5
+++ /dev/null
@@ -1,6 +0,0 @@
-symbolic n,m;
-d11 := {[i,j] -> [i,2i+j] : 1 <= i <= n && 1 <= j,2i+j <= m};
-d12 := {[i,j] -> [i,j+4] : 1 <= i <= n && 1 <= j,j+4 <= m};
-d := d11 union d12;
-e := d - (d+ compose d);
-gist e given d;
diff --git a/omegalib/examples/old_test/closure5.oc-rt b/omegalib/examples/old_test/closure5.oc-rt
deleted file mode 100644
index 62ade41..0000000
--- a/omegalib/examples/old_test/closure5.oc-rt
+++ /dev/null
@@ -1,18 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# symbolic n,m;
-#
-# d11 := {[i,j] -> [i,2i+j] : 1 <= i <= n && 1 <= j,2i+j <= m};
-#
-# d12 := {[i,j] -> [i,j+4] : 1 <= i <= n && 1 <= j,j+4 <= m};
-#
-# d := d11 union d12;
-#
-# e := d - (d+ compose d);
-#
-# gist e given d;
-
-{[i,j] -> [i,2i+j] : 1 <= i <= 3, n && 1 <= j && 2i+j <= m} union
- {[i,j] -> [i,2i+j] : Exists ( alpha : 2alpha = 1+i && 5 <= i <= n && 2i+j <= m && 1 <= j)} union
- {[i,j] -> [i,j+4] : 2 <= i <= n && 1 <= j <= m-4}
-
-#
diff --git a/omegalib/examples/old_test/closure6 b/omegalib/examples/old_test/closure6
deleted file mode 100644
index 777fbba..0000000
--- a/omegalib/examples/old_test/closure6
+++ /dev/null
@@ -1,13 +0,0 @@
-
-T1 := {[k,i,j] -> [k',i,j] : 1 <= k < k' < j <= i <= 1024};
-
-T2 := {[k,i,i] -> [i,i',j'] : 1 <= k < i < j' <= i' <= 1024};
-
-T3 := {[k,i,j] -> [j,i',i] : 1 <= k < j < i <= i' <= 1024};
-
-T := T1 union T2 union T3;
-
-B := {[k,i,j]: 1 <= k < j <= i <= 1024};
-
-T + within B;
-
diff --git a/omegalib/examples/old_test/closure6.oc-rt b/omegalib/examples/old_test/closure6.oc-rt
deleted file mode 100644
index 0eefdaa..0000000
--- a/omegalib/examples/old_test/closure6.oc-rt
+++ /dev/null
@@ -1,29 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-#
-# T1 := {[k,i,j] -> [k',i,j] : 1 <= k < k' < j <= i <= 1024};
-#
-#
-# T2 := {[k,i,i] -> [i,i',j'] : 1 <= k < i < j' <= i' <= 1024};
-#
-#
-# T3 := {[k,i,j] -> [j,i',i] : 1 <= k < j < i <= i' <= 1024};
-#
-#
-# T := T1 union T2 union T3;
-#
-#
-# B := {[k,i,j]: 1 <= k < j <= i <= 1024};
-#
-#
-# T + within B;
-
-{[k,i,j] -> [j',i,j] : 1 <= k < j' < j <= i <= 1024} union
- {[k,i,j] -> [j',i',Out_3] : 1 <= k < j < i < j' < Out_3 <= i' <= 1024} union
- {[k,i,i] -> [j',i',Out_3] : 1 <= k < i < j' < Out_3 <= i' <= 1024} union
- {[k,i,i] -> [i,i',Out_3] : 1 <= k < i < Out_3 <= i' <= 1024} union
- {[k,i,j] -> [j,i',i] : 1 <= k < j < i <= i' <= 1024} union
- {[k,i,j] -> [j',i',i] : 1 <= k < j < j' < i <= i' <= 1024} union
- {[k,i,j] -> [i,i',Out_3] : 1 <= k < j < i < Out_3 <= i' <= 1024}
-
-#
-#
diff --git a/omegalib/examples/old_test/closure7 b/omegalib/examples/old_test/closure7
deleted file mode 100644
index 6ba2e1d..0000000
--- a/omegalib/examples/old_test/closure7
+++ /dev/null
@@ -1,12 +0,0 @@
-
-R := {[t,s] -> [t+1,s] } union
- {[t,s] -> [t,s] } union
- {[t,s] -> [t,s+1] };
-
-R;
-R+;
-
-S := {[t,s] -> [t+1,s] } union {[t,s] -> [t,s+1] };
-
-S;
-S+;
diff --git a/omegalib/examples/old_test/closure7.oc-rt b/omegalib/examples/old_test/closure7.oc-rt
deleted file mode 100644
index 0de9745..0000000
--- a/omegalib/examples/old_test/closure7.oc-rt
+++ /dev/null
@@ -1,36 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-#
-# R := {[t,s] -> [t+1,s] } union
-# {[t,s] -> [t,s] } union
-# {[t,s] -> [t,s+1] };
-#
-#
-# R;
-
-{[t,s] -> [t+1,s] } union
- {[t,s] -> [t,s] } union
- {[t,s] -> [t,s+1] }
-
-#
-# R+;
-
-{[t,s] -> [t,s'] : s <= s'} union
- {[t,s] -> [t',s'] : t < t' && s <= s'}
-
-#
-#
-# S := {[t,s] -> [t+1,s] } union {[t,s] -> [t,s+1] };
-#
-#
-# S;
-
-{[t,s] -> [t+1,s] } union
- {[t,s] -> [t,s+1] }
-
-#
-# S+;
-
-{[t,s] -> [t,s'] : s < s'} union
- {[t,s] -> [t',s'] : t < t' && s <= s'}
-
-#
diff --git a/omegalib/examples/old_test/closure8 b/omegalib/examples/old_test/closure8
deleted file mode 100644
index b1f9b9b..0000000
--- a/omegalib/examples/old_test/closure8
+++ /dev/null
@@ -1 +0,0 @@
-{[i] -> [i]}+;
diff --git a/omegalib/examples/old_test/closure8.oc-rt b/omegalib/examples/old_test/closure8.oc-rt
deleted file mode 100644
index 90d5282..0000000
--- a/omegalib/examples/old_test/closure8.oc-rt
+++ /dev/null
@@ -1,6 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# {[i] -> [i]}+;
-
-{[i] -> [i] }
-
-#
diff --git a/omegalib/examples/old_test/collard b/omegalib/examples/old_test/collard
deleted file mode 100644
index 0fb4ee4..0000000
--- a/omegalib/examples/old_test/collard
+++ /dev/null
@@ -1,16 +0,0 @@
-symbolic n;
-
-I1 := {[i,j] : 1 <= i < j <= n};
-I2 := {[i,j,K] : 1 <= i < j,K <= n};
-I3 := {[i] : 1 <= i <= n};
-I4 := {[i,j] : 1 <= j < i <= n};
-I5 := {[i] : 1 <= i <= n};
-
-T1 := {[i,j] -> [1,i,0,n-i,n-j]};
-T2 := {[i,j,k] -> [1,i,1,n-j,k]};
-T3 := {[i] -> [0,0,0,0,i]};
-T4 := {[i,j] -> [2,j,1,i,j]};
-T5 := {[i] -> [2,i,0,0,0]};
-
-
-codegen T1:I1,T2:I2,T3:I3,T4:I4,T5:I5;
diff --git a/omegalib/examples/old_test/collard.oc-rt b/omegalib/examples/old_test/collard.oc-rt
deleted file mode 100644
index 9d2c8c0..0000000
--- a/omegalib/examples/old_test/collard.oc-rt
+++ /dev/null
@@ -1,49 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# symbolic n;
-#
-#
-# I1 := {[i,j] : 1 <= i < j <= n};
-#
-# I2 := {[i,j,K] : 1 <= i < j,K <= n};
-#
-# I3 := {[i] : 1 <= i <= n};
-#
-# I4 := {[i,j] : 1 <= j < i <= n};
-#
-# I5 := {[i] : 1 <= i <= n};
-#
-#
-# T1 := {[i,j] -> [1,i,0,n-i,n-j]};
-#
-# T2 := {[i,j,k] -> [1,i,1,n-j,k]};
-#
-# T3 := {[i] -> [0,0,0,0,i]};
-#
-# T4 := {[i,j] -> [2,j,1,i,j]};
-#
-# T5 := {[i] -> [2,i,0,0,0]};
-#
-#
-#
-# codegen T1:I1,T2:I2,T3:I3,T4:I4,T5:I5;
-for(t5 = 1; t5 <= n; t5++) {
- s3(t5);
-}
-for(t2 = 1; t2 <= n-1; t2++) {
- for(t5 = 0; t5 <= n-t2-1; t5++) {
- s1(t2,n-t5);
- }
- for(t4 = 0; t4 <= n-t2-1; t4++) {
- for(t5 = t2+1; t5 <= n; t5++) {
- s2(t2,n-t4,t5);
- }
- }
-}
-for(t2 = 1; t2 <= n; t2++) {
- s5(t2);
- for(t4 = t2+1; t4 <= n; t4++) {
- s4(t4,t2);
- }
-}
-
-#
diff --git a/omegalib/examples/old_test/cover b/omegalib/examples/old_test/cover
deleted file mode 100644
index 2cfdacf..0000000
--- a/omegalib/examples/old_test/cover
+++ /dev/null
@@ -1,6 +0,0 @@
-symbolic p(2), n, m;
-R := { [ir,jr] : 1 <= ir <= n && 1 <= jr <= m };
-W1 := { [iw,jw] : 1 <= iw <= n && 1 <= jw <= m && p(Set) >= 0 };
-W2 := { [iw,jw] : 1 <= iw <= n && 1 <= jw <= m && p(Set) < 0 };
-Exposed := R intersection complement ( W1 union W2 );
-Exposed;
diff --git a/omegalib/examples/old_test/cover.oc-rt b/omegalib/examples/old_test/cover.oc-rt
deleted file mode 100644
index 1d25c6e..0000000
--- a/omegalib/examples/old_test/cover.oc-rt
+++ /dev/null
@@ -1,16 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# symbolic p(2), n, m;
-#
-# R := { [ir,jr] : 1 <= ir <= n && 1 <= jr <= m };
-#
-# W1 := { [iw,jw] : 1 <= iw <= n && 1 <= jw <= m && p(Set) >= 0 };
-#
-# W2 := { [iw,jw] : 1 <= iw <= n && 1 <= jw <= m && p(Set) < 0 };
-#
-# Exposed := R intersection complement ( W1 union W2 );
-#
-# Exposed;
-
-{[In_1,In_2] : FALSE }
-
-#
diff --git a/omegalib/examples/old_test/dagstuhl1 b/omegalib/examples/old_test/dagstuhl1
deleted file mode 100644
index 56f1a4e..0000000
--- a/omegalib/examples/old_test/dagstuhl1
+++ /dev/null
@@ -1,7 +0,0 @@
-T := {[i,j] -> [i+10j]};
-I := {[0:9,0:9]};
-# Version 1.0.0 incorrectly generates references to i and j
-codegen T:I;
-
-# Version 1.0.0 doesn't generate an assignment for t2
-codegen {[p,i,j] : 0 <= i,j <= 9 && p = i+10j};
diff --git a/omegalib/examples/old_test/dagstuhl1.oc-rt b/omegalib/examples/old_test/dagstuhl1.oc-rt
deleted file mode 100644
index 7c3f019..0000000
--- a/omegalib/examples/old_test/dagstuhl1.oc-rt
+++ /dev/null
@@ -1,23 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# T := {[i,j] -> [i+10j]};
-#
-# I := {[0:9,0:9]};
-#
-# # Version 1.0.0 incorrectly generates references to i and j
-# codegen T:I;
-for(t1 = 0; t1 <= 99; t1++) {
- s1(intDiv(t1+-10*j,1),intDiv(t1-i,10));
-}
-
-#
-#
-# # Version 1.0.0 doesn't generate an assignment for t2
-# codegen {[p,i,j] : 0 <= i,j <= 9 && p = i+10j};
-for(t1 = 0; t1 <= 99; t1++) {
- for(t2 = intMod(t1,10); t2 <= 9; t2 += 10) {
- t3=intDiv((-t2+t1+9),10);
- s1(t2+10*t3,t2,t3);
- }
-}
-
-#
diff --git a/omegalib/examples/old_test/dagstuhl2 b/omegalib/examples/old_test/dagstuhl2
deleted file mode 100644
index 4cc3758..0000000
--- a/omegalib/examples/old_test/dagstuhl2
+++ /dev/null
@@ -1,6 +0,0 @@
-{[i,j] :
- 2i+6j>=9
- && 5i-3j >= 0
- && 2i-10j >= -15
- && -2i+6j >= 3
- && -2i-6j >= -17};
diff --git a/omegalib/examples/old_test/dagstuhl2.oc-rt b/omegalib/examples/old_test/dagstuhl2.oc-rt
deleted file mode 100644
index 2cf1f8c..0000000
--- a/omegalib/examples/old_test/dagstuhl2.oc-rt
+++ /dev/null
@@ -1,11 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# {[i,j] :
-# 2i+6j>=9
-# && 5i-3j >= 0
-# && 2i-10j >= -15
-# && -2i+6j >= 3
-# && -2i-6j >= -17};
-
-{[i,j] : FALSE }
-
-#
diff --git a/omegalib/examples/old_test/dagstuhl3 b/omegalib/examples/old_test/dagstuhl3
deleted file mode 100644
index c63fdf8..0000000
--- a/omegalib/examples/old_test/dagstuhl3
+++ /dev/null
@@ -1,4 +0,0 @@
-# In verify, we now prefer to eliminate wildcards last
-# This gives us an improved chance of finding equality
-# constraints on wildcards.
-{[i,j] : 0 <= i,j <= 4 && exists(a:i=j+5a)};
diff --git a/omegalib/examples/old_test/dagstuhl3.oc-rt b/omegalib/examples/old_test/dagstuhl3.oc-rt
deleted file mode 100644
index 6dbb128..0000000
--- a/omegalib/examples/old_test/dagstuhl3.oc-rt
+++ /dev/null
@@ -1,9 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# # In verify, we now prefer to eliminate wildcards last
-# # This gives us an improved chance of finding equality
-# # constraints on wildcards.
-# {[i,j] : 0 <= i,j <= 4 && exists(a:i=j+5a)};
-
-{[i,i]: 0 <= i <= 4}
-
-#
diff --git a/omegalib/examples/old_test/davew1 b/omegalib/examples/old_test/davew1
deleted file mode 100644
index 2d8d907..0000000
--- a/omegalib/examples/old_test/davew1
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# A one point, we couldn't handling this analysis of value-based dependences.
-# Now we can :-)
-#
-
-Pos := {[In_1,In_2] -> [i,j] : 1 <= i,j <= 100 &&
- In_1 = 1+2j+i && 2i+In_2 = 1 };
-
-ko := {[In_1,In_2] -> [i,j] : 1+In_1+2j = 4i && In_2+i+2j = 0 &&
- 1 <= i <= 100 && 1 <= j <= 100};
-
-kf := {[i,j] -> [i',j'] : 1 <= i,i',j,j' <= 100 && i < i' &&
- 4i = 2+2j+2j'+i' && 2i' = 1+2j+i };
-
-k := ko join kf;
-
-k intersection Pos;
-example (k intersection Pos);
-Pos;
-Pos - (ko join kf);
-Pos - k;
-answer := Pos - k;
-answer;
-answer intersection {[7,-7] -> [4,1]};
-gist answer given Pos;
diff --git a/omegalib/examples/old_test/davew1.oc-rt b/omegalib/examples/old_test/davew1.oc-rt
deleted file mode 100644
index bc9844c..0000000
--- a/omegalib/examples/old_test/davew1.oc-rt
+++ /dev/null
@@ -1,67 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# #
-# # A one point, we couldn't handling this analysis of value-based dependences.
-# # Now we can :-)
-# #
-#
-# Pos := {[In_1,In_2] -> [i,j] : 1 <= i,j <= 100 &&
-# In_1 = 1+2j+i && 2i+In_2 = 1 };
-#
-#
-# ko := {[In_1,In_2] -> [i,j] : 1+In_1+2j = 4i && In_2+i+2j = 0 &&
-# 1 <= i <= 100 && 1 <= j <= 100};
-#
-#
-# kf := {[i,j] -> [i',j'] : 1 <= i,i',j,j' <= 100 && i < i' &&
-# 4i = 2+2j+2j'+i' && 2i' = 1+2j+i };
-#
-#
-# k := ko join kf;
-#
-#
-# k intersection Pos;
-
-{[In_1,In_2] -> [i,j] : Exists ( alpha : In_2+2i = 1 && 2In_1+In_2 = 3+4j && In_2 = 5+8j+20alpha && -199 <= In_2 <= -2j-5 && 1 <= j)}
-
-#
-# example (k intersection Pos);
-
-{[7,-7] -> [4,1] }
-
-#
-# Pos;
-
-{[In_1,In_2] -> [i,j] : In_1 = 1+i+2j && In_2+2i = 1 && 1 <= i <= 100 && 1 <= j <= 100}
-
-#
-# Pos - (ko join kf);
-
-{[In_1,In_2] -> [i,j] : In_1 = 1+i+2j && In_2+2i = 1 && 1 <= i <= j+2, 100 && 1 <= j <= 100} union
- {[In_1,In_2] -> [i,j] : Exists ( alpha : In_1 = 1+i+2j && In_2+2i = 1 && j+3 <= i <= 100 && 5+10alpha <= 3i+2j && 3i+2j <= 13+10alpha && 1 <= j)}
-
-#
-# Pos - k;
-
-{[In_1,In_2] -> [i,j] : 1+i+2j = In_1 && 2In_1+In_2 = 3+4j && 2j+2 <= In_1 <= 3j+3, 2j+101 && 1 <= j <= 100} union
- {[In_1,In_2] -> [i,j] : Exists ( alpha : 1+i+2j = In_1 && 2In_1+In_2 = 3+4j && 3j+4 <= In_1 <= 2j+101 && 8+4j+10alpha <= 3In_1 && 3In_1 <= 16+4j+10alpha && 1 <= j)}
-
-#
-# answer := Pos - k;
-#
-# answer;
-
-{[In_1,In_2] -> [i,j] : 1+i+2j = In_1 && 2In_1+In_2 = 3+4j && 2j+2 <= In_1 <= 3j+3, 2j+101 && 1 <= j <= 100} union
- {[In_1,In_2] -> [i,j] : Exists ( alpha : 1+i+2j = In_1 && 2In_1+In_2 = 3+4j && 3j+4 <= In_1 <= 2j+101 && 8+4j+10alpha <= 3In_1 && 3In_1 <= 16+4j+10alpha && 1 <= j)}
-
-#
-# answer intersection {[7,-7] -> [4,1]};
-
-{[In_1,In_2] -> [i,j] : FALSE }
-
-#
-# gist answer given Pos;
-
-{[In_1,In_2] -> [i,j] : i <= j+2} union
- {[In_1,In_2] -> [i,j] : Exists ( alpha : j <= i-3 && 3i+2j <= 13+10alpha && 5+10alpha <= 3i+2j)}
-
-#
diff --git a/omegalib/examples/old_test/ddtest b/omegalib/examples/old_test/ddtest
deleted file mode 100644
index 27b1ff3..0000000
--- a/omegalib/examples/old_test/ddtest
+++ /dev/null
@@ -1,97 +0,0 @@
-symbolic p(2), n, m1, m2, low;
-
-R := { [ir,jr] : 1 <= ir <= n && 1 <= jr <= m1 };
-
-f1i := { [iw,jw] -> [ir,jr] : 1 <= ir <= n && 1 <= jr <= m1 &&
- 1 <= iw <= n && 1 <= jw <= m2 &&
- jw = jr &&
- iw = ir };
-f1f := { [iw,jw] -> [ir,jr] : 1 <= ir <= n && 1 <= jr <= m1 &&
- 1 <= iw <= n && 1 <= jw <= m2 &&
- jw = jr &&
- iw < ir };
-
-f3i := { [iw,jw] -> [ir,jr] : 1 <= ir <= n && 1 <= jr <= m1 &&
- 1 <= iw <= n && 1 < low <= jw <= m1 &&
- jw-1 = jr &&
- iw = ir };
-f3f := { [iw,jw] -> [ir,jr] : 1 <= ir <= n && 1 <= jr <= m1 &&
- 1 <= iw <= n && 1 < low <= jw <= m1 &&
- jw-1 = jr &&
- iw < ir };
-
-o31i := { [iw3,jw3] -> [iw1,jw1] : 1 <= iw1 <= n && 1 <= jw1 <= m2 &&
- 1 <= iw3 <= n && 1 < low <= jw3 <= m1 &&
- jw1 = jw3-1 &&
- iw1 = iw3 };
-
-o13f := { [iw1,jw1] -> [iw3,jw3] : 1 <= iw1 <= n && 1 <= jw1 <= m2 &&
- 1 <= iw3 <= n && 1 < low <= jw3 <= m1 &&
- jw1 = jw3-1 &&
- iw1 < iw3 };
-
-o31f := { [iw3,jw3] -> [iw1,jw1] : 1 <= iw1 <= n && 1 <= jw1 <= m2 &&
- 1 <= iw3 <= n && 1 < low <= jw3 <= m1 &&
- jw1 = jw3-1 &&
- iw3 < iw1 };
-
-o11f := { [iw1a,jw1a] -> [iw1b,jw1b] : 1 <=iw1a<= n && 1 <=jw1a<= m2 &&
- 1 <=iw1b<= n && 1 <=jw1b<= m2 &&
- jw1a = jw1b &&
- iw1a < iw1b };
-o33f := { [iw3a,jw3a] -> [iw3b,jw3b] : 1 <=iw3a<= n && 1 < low <=jw3a<= m1 &&
- 1 <=iw3b<= n && 1 < low <=jw3b<= m1 &&
- jw3a-1 = jw3b-1 &&
- iw3a < iw3b };
-
-
-# FIRST GROUP - 1i and 2i (NO POSSIBLE OUTPUT DEPS. BETWEEN)
-v1i := f1i;
-v1i;
-
-Exposed12i := R intersection complement domain f1i;
-Exposed12i;
-
-# SECOND GROUP - 3i
-v3i := f3i / Exposed12i; # / is restrictRange
-v3i;
-
-Exposed3i := R intersection complement domain f3i;
-Exposed3i;
-
-# THIRD GROUP - 1,2,3f (THERE ARE POSSIBLE OUTPUT DEPS BETWEEN THEM)
-
-v1f := ( f1f / Exposed3i )
- intersection complement ( f3i compose o13f )
- intersection complement ( f3f compose o13f )
- intersection complement ( f1i compose o11f )
- intersection complement ( f1f compose o11f );
-v1f;
-
-# WE SHOULD BE ABLE TO DO v1f WITH SOME VALUE-BASED FLOW DD'S
-
-v1f_val := ( f1f / Exposed3i )
- intersection complement ( v3i compose o13f )
- intersection complement ( f3f compose o13f )
- intersection complement ( v1i compose o11f )
- intersection complement ( f1f compose o11f );
-v1f_val;
-
-#
-# The effects of loop-independent flow have been taken out already,
-# so this should work. But it does not. Probably I am stupyd.
-#
-
-v1f_clever := ( f1f / Exposed3i )
- intersection complement ( f3f compose o13f )
- intersection complement ( f1f compose o11f );
-v1f_clever;
-
-#
-# NOW CHECK FOR EQUIVALENCES - THESE SHOULD BE TRUE
-#
-
-v1f subset v1f_val;
-v1f_val subset v1f;
-# v1f subset v1f_clever;
-# v1f_clever subset v1f;
diff --git a/omegalib/examples/old_test/ddtest.oc-rt b/omegalib/examples/old_test/ddtest.oc-rt
deleted file mode 100644
index 1c3e009..0000000
--- a/omegalib/examples/old_test/ddtest.oc-rt
+++ /dev/null
@@ -1,152 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# symbolic p(2), n, m1, m2, low;
-#
-#
-# R := { [ir,jr] : 1 <= ir <= n && 1 <= jr <= m1 };
-#
-#
-# f1i := { [iw,jw] -> [ir,jr] : 1 <= ir <= n && 1 <= jr <= m1 &&
-# 1 <= iw <= n && 1 <= jw <= m2 &&
-# jw = jr &&
-# iw = ir };
-#
-# f1f := { [iw,jw] -> [ir,jr] : 1 <= ir <= n && 1 <= jr <= m1 &&
-# 1 <= iw <= n && 1 <= jw <= m2 &&
-# jw = jr &&
-# iw < ir };
-#
-#
-# f3i := { [iw,jw] -> [ir,jr] : 1 <= ir <= n && 1 <= jr <= m1 &&
-# 1 <= iw <= n && 1 < low <= jw <= m1 &&
-# jw-1 = jr &&
-# iw = ir };
-#
-# f3f := { [iw,jw] -> [ir,jr] : 1 <= ir <= n && 1 <= jr <= m1 &&
-# 1 <= iw <= n && 1 < low <= jw <= m1 &&
-# jw-1 = jr &&
-# iw < ir };
-#
-#
-# o31i := { [iw3,jw3] -> [iw1,jw1] : 1 <= iw1 <= n && 1 <= jw1 <= m2 &&
-# 1 <= iw3 <= n && 1 < low <= jw3 <= m1 &&
-# jw1 = jw3-1 &&
-# iw1 = iw3 };
-#
-#
-# o13f := { [iw1,jw1] -> [iw3,jw3] : 1 <= iw1 <= n && 1 <= jw1 <= m2 &&
-# 1 <= iw3 <= n && 1 < low <= jw3 <= m1 &&
-# jw1 = jw3-1 &&
-# iw1 < iw3 };
-#
-#
-# o31f := { [iw3,jw3] -> [iw1,jw1] : 1 <= iw1 <= n && 1 <= jw1 <= m2 &&
-# 1 <= iw3 <= n && 1 < low <= jw3 <= m1 &&
-# jw1 = jw3-1 &&
-# iw3 < iw1 };
-#
-#
-# o11f := { [iw1a,jw1a] -> [iw1b,jw1b] : 1 <=iw1a<= n && 1 <=jw1a<= m2 &&
-# 1 <=iw1b<= n && 1 <=jw1b<= m2 &&
-# jw1a = jw1b &&
-# iw1a < iw1b };
-#
-# o33f := { [iw3a,jw3a] -> [iw3b,jw3b] : 1 <=iw3a<= n && 1 < low <=jw3a<= m1 &&
-# 1 <=iw3b<= n && 1 < low <=jw3b<= m1 &&
-# jw3a-1 = jw3b-1 &&
-# iw3a < iw3b };
-#
-#
-#
-# # FIRST GROUP - 1i and 2i (NO POSSIBLE OUTPUT DEPS. BETWEEN)
-# v1i := f1i;
-#
-# v1i;
-
-{[iw,jw] -> [iw,jw] : 1 <= jw <= m1, m2 && 1 <= iw <= n}
-
-#
-#
-# Exposed12i := R intersection complement domain f1i;
-#
-# Exposed12i;
-
-{[In_1,In_2]: 1, m2+1 <= In_2 <= m1 && 1 <= In_1 <= n}
-
-#
-#
-# # SECOND GROUP - 3i
-# v3i := f3i / Exposed12i;
-# # / is restrictRange
-# v3i;
-
-{[iw,jw] -> [iw,jw-1] : 2 <= low <= jw <= m1 && 1 <= iw <= n && m2 <= jw-2}
-
-#
-#
-# Exposed3i := R intersection complement domain f3i;
-#
-# Exposed3i;
-
-{[In_1,In_2]: 1 <= In_1 <= n && 1 <= In_2 <= m1 && low <= 1} union
- {[In_1,In_2]: 1 <= In_2 <= m1, low-1 && 1 <= In_1 <= n}
-
-#
-#
-# # THIRD GROUP - 1,2,3f (THERE ARE POSSIBLE OUTPUT DEPS BETWEEN THEM)
-#
-# v1f := ( f1f / Exposed3i )
-# intersection complement ( f3i compose o13f )
-# intersection complement ( f3f compose o13f )
-# intersection complement ( f1i compose o11f )
-# intersection complement ( f1f compose o11f );
-#
-# v1f;
-
-{[iw1a,jw1a] -> [ir,jr] : FALSE }
-
-#
-#
-# # WE SHOULD BE ABLE TO DO v1f WITH SOME VALUE-BASED FLOW DD'S
-#
-# v1f_val := ( f1f / Exposed3i )
-# intersection complement ( v3i compose o13f )
-# intersection complement ( f3f compose o13f )
-# intersection complement ( v1i compose o11f )
-# intersection complement ( f1f compose o11f );
-#
-# v1f_val;
-
-{[iw1a,jw1a] -> [ir,jr] : FALSE }
-
-#
-#
-# #
-# # The effects of loop-independent flow have been taken out already,
-# # so this should work. But it does not. Probably I am stupyd.
-# #
-#
-# v1f_clever := ( f1f / Exposed3i )
-# intersection complement ( f3f compose o13f )
-# intersection complement ( f1f compose o11f );
-#
-# v1f_clever;
-
-{[iw1a,jw1a] -> [iw1a+1,jw1a] : 1 <= jw1a <= m2, m1 && 1 <= iw1a < n && low <= 1} union
- {[iw1a,jw1a] -> [iw1a+1,jw1a] : 1 <= jw1a <= m2, m1, low-1 && 1 <= iw1a < n}
-
-#
-#
-# #
-# # NOW CHECK FOR EQUIVALENCES - THESE SHOULD BE TRUE
-# #
-#
-# v1f subset v1f_val;
-
-True
-#
-# v1f_val subset v1f;
-
-True
-#
-# # v1f subset v1f_clever;
-# # v1f_clever subset v1f;
diff --git a/omegalib/examples/old_test/emit b/omegalib/examples/old_test/emit
deleted file mode 100644
index 3b33a98..0000000
--- a/omegalib/examples/old_test/emit
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# A problem that arises during the analysis of emit.t
-# We are trying to find the dependences to the read 58: rhs(i)
-# There are memory-based deps from the write 58: rhs(j)
-# and the write 50: rhs(i0+k)
-# Due to some screwy stuff, we do not realize that the first is
-# a partial cover for the second, and do the real kill test.
-#
-# line_49_expr is nwall(l)
-#
-
-symbolic matdim_E, i0_1(1), line_49_expr(1);
-
-is_58 := { [i,j] : i+1 <= j <= matdim_E && 1 <= i <= matdim_E };
-is_50 := { [l,k] : 1 <= k <= line_49_expr(Set) && 1 <= l <= 5 };
-
-plus_plus := { [i,j] -> [i',j'] : i < i' && j < j' };
-plus_zero := { [i,j] -> [i',j'] : i < i' && j = j' };
-plus_star := { [i,j] -> [i',j'] : i < i' };
-
-mo_50_50 := (is_50 * is_50) intersection plus_star
- intersection { [l1,k1]->[l2,k2] : i0_1(In)+k1 = i0_1(Out)+k2 };
-mo_50_58 := (is_50 * is_58)
- intersection { [l,k] -> [i,j] : i0_1(In)+k = j };
-mo_58_58 := (is_58 * is_58) intersection plus_zero
- intersection { [i,j] -> [i',j'] : j = j' };
-
-mf_58_58 := (is_58 * is_58) intersection plus_plus
- intersection { [iw,jw] -> [ir,jr] : jw = ir };
-mf_50_58 := (is_50 * is_58)
- intersection { [l,k] -> [i,j] : i0_1(In)+k = i };
-
-vf_58_58 := mf_58_58 - (mf_58_58 compose mo_58_58);
-vf_58_58;
-
-vf_50_58 := mf_50_58 intersection ( complement (mf_58_58 compose mo_50_58) )
- intersection ( complement (mf_50_58 compose mo_50_50) );
-vf_50_58;
diff --git a/omegalib/examples/old_test/emit.oc-rt b/omegalib/examples/old_test/emit.oc-rt
deleted file mode 100644
index 1bf7d6c..0000000
--- a/omegalib/examples/old_test/emit.oc-rt
+++ /dev/null
@@ -1,61 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# #
-# # A problem that arises during the analysis of emit.t
-# # We are trying to find the dependences to the read 58: rhs(i)
-# # There are memory-based deps from the write 58: rhs(j)
-# # and the write 50: rhs(i0+k)
-# # Due to some screwy stuff, we do not realize that the first is
-# # a partial cover for the second, and do the real kill test.
-# #
-# # line_49_expr is nwall(l)
-# #
-#
-# Symbolic matdim_E, i0_1(1), line_49_expr(1);
-#
-#
-# is_58 := { [i,j] : i+1 <= j <= matdim_E && 1 <= i <= matdim_E };
-#
-# is_50 := { [l,k] : 1 <= k <= line_49_expr(Set) && 1 <= l <= 5 };
-#
-#
-# plus_plus := { [i,j] -> [i',j'] : i < i' && j < j' };
-#
-# plus_zero := { [i,j] -> [i',j'] : i < i' && j = j' };
-#
-# plus_star := { [i,j] -> [i',j'] : i < i' };
-#
-#
-# mo_50_50 := (is_50 * is_50) intersection plus_star
-# intersection { [l1,k1]->[l2,k2] : i0_1(In)+k1 = i0_1(Out)+k2 };
-#
-# mo_50_58 := (is_50 * is_58)
-# intersection { [l,k] -> [i,j] : i0_1(In)+k = j };
-#
-# mo_58_58 := (is_58 * is_58) intersection plus_zero
-# intersection { [i,j] -> [i',j'] : j = j' };
-#
-#
-# mf_58_58 := (is_58 * is_58) intersection plus_plus
-# intersection { [iw,jw] -> [ir,jr] : jw = ir };
-#
-# mf_50_58 := (is_50 * is_58)
-# intersection { [l,k] -> [i,j] : i0_1(In)+k = i };
-#
-#
-# vf_58_58 := mf_58_58 - (mf_58_58 compose mo_58_58);
-#
-# vf_58_58;
-
-{[i,i+1] -> [i+1,Out_2] : 1 <= i <= Out_2-2 && Out_2 <= matdim_E}
-
-#
-#
-# vf_50_58 := mf_50_58 intersection ( complement (mf_58_58 compose mo_50_58) )
-# intersection ( complement (mf_50_58 compose mo_50_50) );
-#
-# vf_50_58;
-
-{[In_1,-i0_1(In_1)+1] -> [1,j] : -line_49_expr(In_1)+1 <= i0_1(In_1) <= 0 && 1 <= In_1 <= 4 && 2 <= j <= matdim_E && UNKNOWN} union
- {[In_1,-i0_1(In_1)+1] -> [1,j] : In_1 = 5 && -line_49_expr(In_1)+1 <= i0_1(In_1) <= 0 && 2 <= j <= matdim_E}
-
-#
diff --git a/omegalib/examples/old_test/example1 b/omegalib/examples/old_test/example1
deleted file mode 100644
index 0721b20..0000000
--- a/omegalib/examples/old_test/example1
+++ /dev/null
@@ -1,4 +0,0 @@
-foo := {[In_1,In_2] -> [i,j] : exists ( alpha : In_2+2i = 1 && 2In_1+In_2 = 3+4j && In_2+20alpha = 5+8j && -199 <= In_2 <= -2j-5 && 1 <= j)};
-example foo;
-
-
diff --git a/omegalib/examples/old_test/example1.oc-rt b/omegalib/examples/old_test/example1.oc-rt
deleted file mode 100644
index 89b2e0a..0000000
--- a/omegalib/examples/old_test/example1.oc-rt
+++ /dev/null
@@ -1,10 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# foo := {[In_1,In_2] -> [i,j] : Exists ( alpha : In_2+2i = 1 && 2In_1+In_2 = 3+4j && In_2+20alpha = 5+8j && -199 <= In_2 <= -2j-5 && 1 <= j)};
-#
-# example foo;
-
-{[7,-7] -> [4,1] }
-
-#
-#
-#
diff --git a/omegalib/examples/old_test/farkas b/omegalib/examples/old_test/farkas
deleted file mode 100644
index ce754fc..0000000
--- a/omegalib/examples/old_test/farkas
+++ /dev/null
@@ -1,8 +0,0 @@
-
-symbolic n;
-symbolic c;
-
-R := {[i,j] : 1 <= i <= 10 && 1 <= j <= n};
-
-ac := farkas R;
-ac;
diff --git a/omegalib/examples/old_test/farkas.oc-rt b/omegalib/examples/old_test/farkas.oc-rt
deleted file mode 100644
index cd52e5e..0000000
--- a/omegalib/examples/old_test/farkas.oc-rt
+++ /dev/null
@@ -1,17 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-#
-# symbolic n;
-#
-# symbolic c;
-#
-#
-# R := {[i,j] : 1 <= i <= 10 && 1 <= j <= n};
-#
-#
-# ac := farkas R;
-#
-# ac;
-
-{[i,j]: 0 <= constantTerm+n+i+j && 0 <= constantTerm+n+10i+j && 0 <= n+j && 0 <= n}
-
-#
diff --git a/omegalib/examples/old_test/farkas2 b/omegalib/examples/old_test/farkas2
deleted file mode 100644
index 2781423..0000000
--- a/omegalib/examples/old_test/farkas2
+++ /dev/null
@@ -1,6 +0,0 @@
-
-R := {[1:10,1:10]} union {[5:15,11:20]};
-R;
-f := farkas R;
-f;
-Hull R;
diff --git a/omegalib/examples/old_test/farkas2.oc-rt b/omegalib/examples/old_test/farkas2.oc-rt
deleted file mode 100644
index 22d43cc..0000000
--- a/omegalib/examples/old_test/farkas2.oc-rt
+++ /dev/null
@@ -1,22 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-#
-# R := {[1:10,1:10]} union {[5:15,11:20]};
-#
-# R;
-
-{[In_1,In_2]: 1 <= In_1 <= 10 && 1 <= In_2 <= 10} union
- {[In_1,In_2]: 5 <= In_1 <= 15 && 11 <= In_2 <= 20}
-
-#
-# f := farkas R;
-#
-# f;
-
-{[In_1,In_2]: 0 <= constantTerm+10In_1+In_2 && 0 <= constantTerm+In_1+10In_2 && 0 <= constantTerm+15In_1+20In_2 && 0 <= constantTerm+In_1+In_2 && 0 <= constantTerm+15In_1+11In_2 && 0 <= constantTerm+5In_1+20In_2}
-
-#
-# Hull R;
-
-{[In_1,In_2]: 1, 2In_1-19 <= In_2 <= 20 && 1 <= In_1 <= 15 && 2In_2 <= 15+5In_1}
-
-#
diff --git a/omegalib/examples/old_test/farkas3 b/omegalib/examples/old_test/farkas3
deleted file mode 100644
index 8adec2e..0000000
--- a/omegalib/examples/old_test/farkas3
+++ /dev/null
@@ -1,3 +0,0 @@
-
-R := {[1:10,1:10,1:10,1:10]};
-AffineHull R;
diff --git a/omegalib/examples/old_test/farkas3.oc-rt b/omegalib/examples/old_test/farkas3.oc-rt
deleted file mode 100644
index 095cb54..0000000
--- a/omegalib/examples/old_test/farkas3.oc-rt
+++ /dev/null
@@ -1,9 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-#
-# R := {[1:10,1:10,1:10,1:10]};
-#
-# AffineHull R;
-
-{[In_1,In_2,In_3,In_4]}
-
-#
diff --git a/omegalib/examples/old_test/fc1 b/omegalib/examples/old_test/fc1
deleted file mode 100644
index 66a9e90..0000000
--- a/omegalib/examples/old_test/fc1
+++ /dev/null
@@ -1,23 +0,0 @@
-symbolic n;
-
-I1 := {[i,j] : 1 <= i < j <= n};
-I2 := {[i,j,k] : 1 <= i < j,k <= n};
-I3 := {[i] : 1 <= i <= n};
-I4 := {[i,j] : 1 <= j < i <= n};
-I5 := {[i] : 1 <= i <= n};
-
-T1 := {[i,j] -> [i-1,0,n-i,n-j]};
-T2 := {[i,j,k] -> [i-1,1,n-i,n-j]};
-T3 := {[i] -> [0,0,0,i]};
-T4 := {[i,j] -> [j+n-1,0,i,j]};
-T5 := {[i] -> [i+n-2,1,0,0]};
-
-T1(I1);
-T2(I2);
-T3(I3);
-T4(I4);
-T5(I5);
-codegen T1:I1,T2:I2;
-codegen T1:I1,T2:I2,T3:I3,T4:I4,T5:I5;
-codegen 2 T1:I1,T2:I2,T3:I3,T4:I4,T5:I5;
-
diff --git a/omegalib/examples/old_test/fc1.oc-rt b/omegalib/examples/old_test/fc1.oc-rt
deleted file mode 100644
index 8075f2d..0000000
--- a/omegalib/examples/old_test/fc1.oc-rt
+++ /dev/null
@@ -1,89 +0,0 @@
->>> symbolic n;
->>>
->>> I1 := {[i,j] : 1 <= i < j <= n};
->>> I2 := {[i,j,k] : 1 <= i < j,k <= n};
->>> I3 := {[i] : 1 <= i <= n};
->>> I4 := {[i,j] : 1 <= j < i <= n};
->>> I5 := {[i] : 1 <= i <= n};
->>>
->>> T1 := {[i,j] -> [i-1,0,n-i,n-j]};
->>> T2 := {[i,j,k] -> [i-1,1,n-i,n-j]};
->>> T3 := {[i] -> [0,0,0,i]};
->>> T4 := {[i,j] -> [j+n-1,0,i,j]};
->>> T5 := {[i] -> [i+n-2,1,0,0]};
->>>
->>> T1(I1);
-{[In_1,0,n-In_1-1,In_4]: 0 <= In_1 && 2+In_1+In_4 <= n && 0 <= In_4}
->>> T2(I2);
-{[In_1,1,n-In_1-1,In_4]: 0 <= In_1 && 2+In_1+In_4 <= n && 0 <= In_4}
->>> T3(I3);
-{[0,0,0,i]: 1 <= i <= n}
->>> T4(I4);
-{[In_1,0,i,In_1-n+1]: i <= n <= In_1 && 2+In_1 <= n+i}
->>> T5(I5);
-{[In_1,1,0,0]: n-1 <= In_1 <= 2n-2}
->>> codegen T1:I1,T2:I2;
-for(t1 = 0; t1 <= n-2; t1++) {
- for(t4 = 0; t4 <= -t1+n-2; t4++) {
- s1(t1+1,n-t4);
- }
- for(t4 = 0; t4 <= -t1+n-2; t4++) {
- s2(t1+1,n-t4,N/A);
- }
-}
-
->>> codegen T1:I1,T2:I2,T3:I3,T4:I4,T5:I5;
-for(t1 = 0; t1 <= 2*n-2; t1++) {
- if (t1 <= 0) {
- for(t4 = 1; t4 <= n; t4++) {
- s3(t4);
- }
- }
- for(t4 = 0; t4 <= -t1+n-2; t4++) {
- s1(t1+1,n-t4);
- }
- if (t1 >= n) {
- for(t3 = -n+t1+2; t3 <= n; t3++) {
- s4(t3,t1-n+1);
- }
- }
- for(t4 = 0; t4 <= -t1+n-2; t4++) {
- s2(t1+1,n-t4,N/A);
- }
- if (t1 >= n-1) {
- s5(-n+t1+2);
- }
-}
-
->>> codegen 2 T1:I1,T2:I2,T3:I3,T4:I4,T5:I5;
-for(t4 = 1; t4 <= n; t4++) {
- s3(t4);
-}
-for(t4 = 0; t4 <= n-2; t4++) {
- s1(1,-t4+n);
-}
-for(t4 = 0; t4 <= n-2; t4++) {
- s2(1,-t4+n,N/A);
-}
-if (n == 1) {
- s5(-n+2);
-}
-for(t1 = 1; t1 <= n-2; t1++) {
- for(t4 = 0; t4 <= -t1+n-2; t4++) {
- s1(t1+1,n-t4);
- }
- for(t4 = 0; t4 <= -t1+n-2; t4++) {
- s2(t1+1,n-t4,N/A);
- }
-}
-if (n >= 2) {
- s5(1);
-}
-for(t1 = max(n,1); t1 <= 2*n-2; t1++) {
- for(t3 = t1-n+2; t3 <= n; t3++) {
- s4(t3,t1-n+1);
- }
- s5(-n+t1+2);
-}
-
-
diff --git a/omegalib/examples/old_test/fc2 b/omegalib/examples/old_test/fc2
deleted file mode 100644
index b195d72..0000000
--- a/omegalib/examples/old_test/fc2
+++ /dev/null
@@ -1,29 +0,0 @@
-symbolic n;
-
-I1 := {[i,j] : 1 <= i < j <= n};
-I2 := {[i,j,k] : 1 <= i < j,k <= n};
-I3 := {[i] : 1 <= i <= n};
-I4 := {[i,j] : 1 <= j < i <= n};
-I5 := {[i] : 1 <= i <= n};
-
-T1 := {[i,j] -> [i-1,0,n-i,n-j]};
-T2 := {[i,j,k] -> [i-1,1,n-i,n-j]};
-T3 := {[i] -> [0,0,0,i]};
-T4 := {[i,j] -> [j+n-1,0,i,j]};
-T5 := {[i] -> [i+n-2,1,0,0]};
-
-first := {[i,*,*,*] -> [i]};
-
-first(T1(I1));
-first(T2(I2));
-first(T3(I3));
-first(T4(I4));
-first(T5(I5));
-T1(I1);
-T2(I2);
-T3(I3);
-T4(I4);
-T5(I5);
-codegen T1:I1,T2:I2;
-codegen T1:I1,T2:I2,T3:I3,T4:I4,T5:I5;
-
diff --git a/omegalib/examples/old_test/fc2.oc-rt b/omegalib/examples/old_test/fc2.oc-rt
deleted file mode 100644
index 742929e..0000000
--- a/omegalib/examples/old_test/fc2.oc-rt
+++ /dev/null
@@ -1,115 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# symbolic n;
-#
-#
-# I1 := {[i,j] : 1 <= i < j <= n};
-#
-# I2 := {[i,j,k] : 1 <= i < j,k <= n};
-#
-# I3 := {[i] : 1 <= i <= n};
-#
-# I4 := {[i,j] : 1 <= j < i <= n};
-#
-# I5 := {[i] : 1 <= i <= n};
-#
-#
-# T1 := {[i,j] -> [i-1,0,n-i,n-j]};
-#
-# T2 := {[i,j,k] -> [i-1,1,n-i,n-j]};
-#
-# T3 := {[i] -> [0,0,0,i]};
-#
-# T4 := {[i,j] -> [j+n-1,0,i,j]};
-#
-# T5 := {[i] -> [i+n-2,1,0,0]};
-#
-#
-# first := {[i,*,*,*] -> [i]};
-#
-#
-# first(T1(I1));
-
-{[i]: 0 <= i <= n-2}
-
-#
-# first(T2(I2));
-
-{[i]: 0 <= i <= n-2}
-
-#
-# first(T3(I3));
-
-{[0]: 1 <= n}
-
-#
-# first(T4(I4));
-
-{[i]: n <= i <= 2n-2}
-
-#
-# first(T5(I5));
-
-{[i]: n-1 <= i <= 2n-2}
-
-#
-# T1(I1);
-
-{[In_1,0,n-In_1-1,In_4]: 0 <= In_1 && 2+In_1+In_4 <= n && 0 <= In_4}
-
-#
-# T2(I2);
-
-{[In_1,1,n-In_1-1,In_4]: 0 <= In_1 && 2+In_1+In_4 <= n && 0 <= In_4}
-
-#
-# T3(I3);
-
-{[0,0,0,i]: 1 <= i <= n}
-
-#
-# T4(I4);
-
-{[In_1,0,i,In_1-n+1]: i <= n <= In_1 && 2+In_1 <= n+i}
-
-#
-# T5(I5);
-
-{[In_1,1,0,0]: n-1 <= In_1 <= 2n-2}
-
-#
-# codegen T1:I1,T2:I2;
-for(t1 = 0; t1 <= n-2; t1++) {
- for(t4 = 0; t4 <= -t1+n-2; t4++) {
- s1(t1+1,n-t4);
- }
- for(t4 = 0; t4 <= -t1+n-2; t4++) {
- s2(t1+1,n-t4);
- }
-}
-
-#
-# codegen T1:I1,T2:I2,T3:I3,T4:I4,T5:I5;
-for(t1 = 0; t1 <= 2*n-2; t1++) {
- if (t1 <= 0) {
- for(t4 = 1; t4 <= n; t4++) {
- s3(t4);
- }
- }
- for(t4 = 0; t4 <= -t1+n-2; t4++) {
- s1(t1+1,n-t4);
- }
- if (t1 >= n) {
- for(t3 = t1-n+2; t3 <= n; t3++) {
- s4(t3,t1-n+1);
- }
- }
- for(t4 = 0; t4 <= -t1+n-2; t4++) {
- s2(t1+1,n-t4);
- }
- if (t1 >= n-1) {
- s5(t1-n+2);
- }
-}
-
-#
-#
diff --git a/omegalib/examples/old_test/foo b/omegalib/examples/old_test/foo
deleted file mode 100644
index 1a5ef46..0000000
--- a/omegalib/examples/old_test/foo
+++ /dev/null
@@ -1,13 +0,0 @@
-
-R := {[t,s] -> [t+2,s+2] : t <= s} union
- {[t,s] -> [t+4,s+4] : t <= s} union
- {[t,s] -> [t+3,s+3] : t <= s} union
- {[t,s] -> [t',s-t+t'] : t <= s, t'-5} union
- {[t,s] -> [t+1,s+1] : t <= s} union
- {[t,s] -> [t',s-t+t'] : t <= s-1, t'-2};
-R;
-difference R;
-Hull difference R;
-
-Hull R;
-
diff --git a/omegalib/examples/old_test/foo.oc-rt b/omegalib/examples/old_test/foo.oc-rt
deleted file mode 100644
index 3f7f5a9..0000000
--- a/omegalib/examples/old_test/foo.oc-rt
+++ /dev/null
@@ -1,37 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-#
-# R := {[t,s] -> [t+2,s+2] : t <= s} union
-# {[t,s] -> [t+4,s+4] : t <= s} union
-# {[t,s] -> [t+3,s+3] : t <= s} union
-# {[t,s] -> [t',s-t+t'] : t <= s, t'-5} union
-# {[t,s] -> [t+1,s+1] : t <= s} union
-# {[t,s] -> [t',s-t+t'] : t <= s-1, t'-2};
-#
-# R;
-
-{[t,s] -> [t+2,s+2] : t <= s} union
- {[t,s] -> [t+4,s+4] : t <= s} union
- {[t,s] -> [t+3,s+3] : t <= s} union
- {[t,s] -> [t',s-t+t'] : t <= s, t'-5} union
- {[t,s] -> [t+1,s+1] : t <= s} union
- {[t,s] -> [t',s-t+t'] : t <= s-1, t'-2}
-
-#
-# difference R;
-
-{[1,1]} union
- {[In_1,In_1]: 2 <= In_1}
-
-#
-# hull difference R;
-
-{[In_1,In_1]: 1 <= In_1}
-
-#
-#
-# Hull R;
-
-{[t,s] -> [t',s-t+t'] : t <= s, t'-1}
-
-#
-#
diff --git a/omegalib/examples/old_test/foo2 b/omegalib/examples/old_test/foo2
deleted file mode 100644
index 69a63da..0000000
--- a/omegalib/examples/old_test/foo2
+++ /dev/null
@@ -1,3 +0,0 @@
-Hull( {[1,1]} union
- {[In_1,In_1]: 2 <= In_1});
-
diff --git a/omegalib/examples/old_test/foo2.oc-rt b/omegalib/examples/old_test/foo2.oc-rt
deleted file mode 100644
index c8f0209..0000000
--- a/omegalib/examples/old_test/foo2.oc-rt
+++ /dev/null
@@ -1,8 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# hull( {[1,1]} union
-# {[In_1,In_1]: 2 <= In_1});
-
-{[In_1,In_1]: 1 <= In_1}
-
-#
-#
diff --git a/omegalib/examples/old_test/foo6 b/omegalib/examples/old_test/foo6
deleted file mode 100644
index 0b702cd..0000000
--- a/omegalib/examples/old_test/foo6
+++ /dev/null
@@ -1 +0,0 @@
-approximate {[i,j] : exists (a,b : a,b >= 0 && i = -201a-3b && j = 103a+200b)};
diff --git a/omegalib/examples/old_test/foo6.oc-rt b/omegalib/examples/old_test/foo6.oc-rt
deleted file mode 100644
index aeb1b67..0000000
--- a/omegalib/examples/old_test/foo6.oc-rt
+++ /dev/null
@@ -1,6 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# approximate {[i,j] : exists (a,b : a,b >= 0 && i = -201a-3b && j = 103a+200b)};
-
-{[i,j]: 200i+3j <= 0 && 0 <= 103i+201j}
-
-#
diff --git a/omegalib/examples/old_test/forall b/omegalib/examples/old_test/forall
deleted file mode 100644
index 8b1de0a..0000000
--- a/omegalib/examples/old_test/forall
+++ /dev/null
@@ -1,21 +0,0 @@
-symbolic n,m,B;
-{ [max_diff] :
- forall (m :
- (not exists (z1,z2 : 0<=z1<n && z1<=z2<m+z1 && z2 = m))
- or
- (forall (minX,minY :
- (not (forall (x1,x2 : (not (0<=x1<n && x1<=x2<m+x1 && m-B+1 <= x2 <= m)) or (x1+x2 >= minX)) &&
- exists (x1,x2 : 0<=x1<n && x1<=x2<m+x1 && m-B+1 <= x2 <= m && x1+x2 = minX) &&
- forall (y1,y2 : (not (0<=y1<n && y1<=y2<=m+y1 && m+1 <= y2 <= m+B)) or (y1+y2 >= minY)) &&
- exists (y1,y2 : 0<=y1<n && y1<=y2<=m+y1 && m+1 <= y2 <= m+B && y1+y2 = minY)))
- or
- (minY-minX <= max_diff)))) &&
- exists (m,z1,z2,minX,minY :
- 0<=z1<n && z1<=z2<=m+z1 && z2 = m &&
- forall (x1,x2 : (not (0<=x1<n && x1<=x2<m+x1 && m-B+1 <= x2 <= m)) or (x1+x2 >= minX)) &&
- exists (x1,x2 : 0<=x1<n && x1<=x2<m+x1 && m-B+1 <= x2 <= m && x1+x2 = minX) &&
- forall (y1,y2 : (not (0<=y1<n && y1<=y2<=m+y1 && m+1 <= y2 <= m+B)) or (y1+y2 >= minY)) &&
- exists (y1,y2 : 0<=y1<n && y1<=y2<=m+y1 && m+1 <= y2 <= m+B && y1+y2 = minY) &&
- minY-minX = max_diff)};
-
-
diff --git a/omegalib/examples/old_test/forall.oc-rt b/omegalib/examples/old_test/forall.oc-rt
deleted file mode 100644
index 13f78fa..0000000
--- a/omegalib/examples/old_test/forall.oc-rt
+++ /dev/null
@@ -1,28 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# symbolic n,m,B;
-#
-# { [max_diff] :
-# forall (m :
-# (not exists (z1,z2 : 0<=z1<n && z1<=z2<m+z1 && z2 = m))
-# or
-# (forall (minX,minY :
-# (not (forall (x1,x2 : (not (0<=x1<n && x1<=x2<m+x1 && m-B+1 <= x2 <= m)) or (x1+x2 >= minX)) &&
-# exists (x1,x2 : 0<=x1<n && x1<=x2<m+x1 && m-B+1 <= x2 <= m && x1+x2 = minX) &&
-# forall (y1,y2 : (not (0<=y1<n && y1<=y2<=m+y1 && m+1 <= y2 <= m+B)) or (y1+y2 >= minY)) &&
-# exists (y1,y2 : 0<=y1<n && y1<=y2<=m+y1 && m+1 <= y2 <= m+B && y1+y2 = minY)))
-# or
-# (minY-minX <= max_diff)))) &&
-# exists (m,z1,z2,minX,minY :
-# 0<=z1<n && z1<=z2<=m+z1 && z2 = m &&
-# forall (x1,x2 : (not (0<=x1<n && x1<=x2<m+x1 && m-B+1 <= x2 <= m)) or (x1+x2 >= minX)) &&
-# exists (x1,x2 : 0<=x1<n && x1<=x2<m+x1 && m-B+1 <= x2 <= m && x1+x2 = minX) &&
-# forall (y1,y2 : (not (0<=y1<n && y1<=y2<=m+y1 && m+1 <= y2 <= m+B)) or (y1+y2 >= minY)) &&
-# exists (y1,y2 : 0<=y1<n && y1<=y2<=m+y1 && m+1 <= y2 <= m+B && y1+y2 = minY) &&
-# minY-minX = max_diff)};
-
-{[B+1]: 2 <= B && 2 <= n} union
- {[1]: B = 1 && 2 <= n}
-
-#
-#
-#
diff --git a/omegalib/examples/old_test/gc b/omegalib/examples/old_test/gc
deleted file mode 100644
index 932f595..0000000
--- a/omegalib/examples/old_test/gc
+++ /dev/null
@@ -1,6 +0,0 @@
-A := {[i] : 1 <= i <= 8};
-b := {[i] : exists (t : i=2t+1 & 0<=t<=3)};
-c := {[i] : exists (t : i=2t+2 & 0<=t<=3)};
-d := A - b;
-d;
-codegen d;
diff --git a/omegalib/examples/old_test/gc.oc-rt b/omegalib/examples/old_test/gc.oc-rt
deleted file mode 100644
index 6d92fa9..0000000
--- a/omegalib/examples/old_test/gc.oc-rt
+++ /dev/null
@@ -1,20 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# A := {[i] : 1 <= i <= 8};
-#
-# b := {[i] : exists (t : i=2t+1 & 0<=t<=3)};
-#
-# c := {[i] : exists (t : i=2t+2 & 0<=t<=3)};
-#
-# d := A - b;
-#
-# d;
-
-{[i]: Exists ( alpha : 0 = i+2alpha && 2 <= i <= 8)}
-
-#
-# codegen d;
-for(t1 = 2; t1 <= 8; t1 += 2) {
- s1(t1);
-}
-
-#
diff --git a/omegalib/examples/old_test/ge b/omegalib/examples/old_test/ge
deleted file mode 100644
index e8e9e1f..0000000
--- a/omegalib/examples/old_test/ge
+++ /dev/null
@@ -1,9 +0,0 @@
-symbolic n;
-I1 := {[k,i] : 1 <= k < i <= n };
-I2 := {[k,i,j] : 1 <= k < i,j <= n };
-T1 := {[k,i] -> [i,k,1,0]};
-T2 := {[k,i,j] -> [i,j,0,k]};
-T1(I1);
-T2(I2);
-codegen T1:I1,T2:I2;
-codegen 2 T1:I1,T2:I2;
diff --git a/omegalib/examples/old_test/ge.oc-rt b/omegalib/examples/old_test/ge.oc-rt
deleted file mode 100644
index 1006fe5..0000000
--- a/omegalib/examples/old_test/ge.oc-rt
+++ /dev/null
@@ -1,38 +0,0 @@
->>> symbolic n;
->>> I1 := {[k,i] : 1 <= k < i <= n };
->>> I2 := {[k,i,j] : 1 <= k < i,j <= n };
->>> T1 := {[k,i] -> [i,k,1,0]};
->>> T2 := {[k,i,j] -> [i,j,0,k]};
->>> T1(I1);
-{[i,k,1,0]: 1 <= k < i <= n}
->>> T2(I2);
-{[i,j,0,k]: 1 <= k < i,j <= n}
->>> codegen T1:I1,T2:I2;
-for(t1 = 2; t1 <= n; t1++) {
- for(t2 = 1; t2 <= n; t2++) {
- for(t4 = 1; t4 <= min(t1-1,t2-1); t4++) {
- s2(t4,t1,t2);
- }
- if (t2 <= t1-1) {
- s1(t2,t1);
- }
- }
-}
-
->>> codegen 2 T1:I1,T2:I2;
-for(t1 = 2; t1 <= n; t1++) {
- s1(1,t1);
- for(t2 = 2; t2 <= t1-1; t2++) {
- for(t4 = 1; t4 <= t2-1; t4++) {
- s2(t4,t1,t2);
- }
- s1(t2,t1);
- }
- for(t2 = t1; t2 <= n; t2++) {
- for(t4 = 1; t4 <= t1-1; t4++) {
- s2(t4,t1,t2);
- }
- }
-}
-
-
diff --git a/omegalib/examples/old_test/givens2 b/omegalib/examples/old_test/givens2
deleted file mode 100644
index 0c6f634..0000000
--- a/omegalib/examples/old_test/givens2
+++ /dev/null
@@ -1,15 +0,0 @@
-#
-# an example from a slightly defective dependence relation for givens2.t
-#
-
-symbolic n, line6exp(2) ;
-
-{ [i,j,k] -> [i',j',k'] :
- 1 <= i <= n &&
- 1 <= i' <= n &&
- i+1 <= j <= n &&
- i'+1 <= j' <= n &&
- i <= k <= n &&
- i' <= k' <= n and
- ( 1 <= line6exp(i,j) or line6exp(i,j) <= -1 ) and
- ( 1 <= line6exp(i',j') or line6exp(i',j') <= -1 ) };
diff --git a/omegalib/examples/old_test/givens2.oc-rt b/omegalib/examples/old_test/givens2.oc-rt
deleted file mode 100644
index 9dfac42..0000000
--- a/omegalib/examples/old_test/givens2.oc-rt
+++ /dev/null
@@ -1,38 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# #
-# # an example from a slightly defective dependence relation for givens2.t
-# #
-#
-# Symbolic n, line6exp(2) ;
-#
-#
-# { [i,j,k] -> [i',j',k'] :
-# 1 <= i <= n &&
-# 1 <= i' <= n &&
-# i+1 <= j <= n &&
-# i'+1 <= j' <= n &&
-# i <= k <= n &&
-# i' <= k' <= n and
-# ( 1 <= line6exp(i,j) or line6exp(i,j) <= -1 ) and
-# ( 1 <= line6exp(i',j') or line6exp(i',j') <= -1 ) };
-
-{[i,j,k] -> [i,j,k'] : 1 <= i <= k', j-1, k && j <= n && k <= n && k' <= n && 1 <= line6exp(i,j)} union
- {[i,j,k] -> [i,j,k'] : 1 <= i <= k', j-1, k && line6exp(i,j) <= -1 && j <= n && k <= n && k' <= n} union
- {[i,j,k] -> [i',j',k'] : 1 <= i' < i < j <= n && i <= k <= n && i' < j' <= n && i' <= k' <= n && 1 <= line6exp(i,j) && 1 <= line6exp(i',j')} union
- {[i,j,k] -> [i',j',k'] : 1 <= i < i' < j' <= n && i < j <= n && i <= k <= n && i' <= k' <= n && 1 <= line6exp(i,j) && 1 <= line6exp(i',j')} union
- {[i,j,k] -> [i',j',k'] : i' = i && 1 <= i < j' < j <= n && i <= k,k' <= n && 1 <= line6exp(i,j) && 1 <= line6exp(i',j')} union
- {[i,j,k] -> [i',j',k'] : i' = i && 1 <= i < j < j' <= n && i <= k,k' <= n && 1 <= line6exp(i,j) && 1 <= line6exp(i',j')} union
- {[i,j,k] -> [i',j',k'] : 1 <= i' < i < j <= n && i <= k <= n && i' < j' <= n && i' <= k' <= n && line6exp(i,j) <= -1 && 1 <= line6exp(i',j')} union
- {[i,j,k] -> [i',j',k'] : 1 <= i < i' < j' <= n && i < j <= n && i <= k <= n && i' <= k' <= n && line6exp(i,j) <= -1 && 1 <= line6exp(i',j')} union
- {[i,j,k] -> [i',j',k'] : i' = i && 1 <= i < j' < j <= n && i <= k,k' <= n && line6exp(i,j) <= -1 && 1 <= line6exp(i',j')} union
- {[i,j,k] -> [i',j',k'] : i' = i && 1 <= i < j < j' <= n && i <= k,k' <= n && line6exp(i,j) <= -1 && 1 <= line6exp(i',j')} union
- {[i,j,k] -> [i',j',k'] : 1 <= i' < i < j <= n && i <= k <= n && i' < j' <= n && i' <= k' <= n && line6exp(i',j') <= -1 && 1 <= line6exp(i,j)} union
- {[i,j,k] -> [i',j',k'] : 1 <= i < i' < j' <= n && i < j <= n && i <= k <= n && i' <= k' <= n && line6exp(i',j') <= -1 && 1 <= line6exp(i,j)} union
- {[i,j,k] -> [i',j',k'] : i' = i && 1 <= i < j' < j <= n && i <= k,k' <= n && line6exp(i',j') <= -1 && 1 <= line6exp(i,j)} union
- {[i,j,k] -> [i',j',k'] : i' = i && 1 <= i < j < j' <= n && i <= k,k' <= n && line6exp(i',j') <= -1 && 1 <= line6exp(i,j)} union
- {[i,j,k] -> [i',j',k'] : 1 <= i' < i < j <= n && i <= k <= n && i' < j' <= n && i' <= k' <= n && line6exp(i,j) <= -1 && line6exp(i',j') <= -1} union
- {[i,j,k] -> [i',j',k'] : 1 <= i < i' < j' <= n && i < j <= n && i <= k <= n && i' <= k' <= n && line6exp(i,j) <= -1 && line6exp(i',j') <= -1} union
- {[i,j,k] -> [i',j',k'] : i' = i && 1 <= i < j' < j <= n && i <= k,k' <= n && line6exp(i',j') <= -1 && line6exp(i,j) <= -1} union
- {[i,j,k] -> [i',j',k'] : i' = i && 1 <= i < j < j' <= n && i <= k,k' <= n && line6exp(i',j') <= -1 && line6exp(i,j) <= -1}
-
-#
diff --git a/omegalib/examples/old_test/guard1 b/omegalib/examples/old_test/guard1
deleted file mode 100644
index 0496d3b..0000000
--- a/omegalib/examples/old_test/guard1
+++ /dev/null
@@ -1,11 +0,0 @@
-symbolic n,m;
-incomingKnown := { [i1,i2] : exists ( alpha : i1+3alpha = 1+i2 ) &&
- i1 = n && i2 = m};
-
-
-codegen incomingKnown;
-incomingKnown := { [i1,i2] : exists ( alpha : i1+2alpha = 1+i2 ) &&
- i1 = n && i2 = m};
-
-
-codegen incomingKnown;
diff --git a/omegalib/examples/old_test/guard1.oc-rt b/omegalib/examples/old_test/guard1.oc-rt
deleted file mode 100644
index db4b780..0000000
--- a/omegalib/examples/old_test/guard1.oc-rt
+++ /dev/null
@@ -1,25 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# symbolic n,m;
-#
-# incomingKnown := { [i1,i2] : Exists ( alpha : i1+3alpha = 1+i2 ) &&
-# i1 = n && i2 = m};
-#
-#
-#
-# codegen incomingKnown;
-if (intMod(-n+m+1,3) == 0) {
- s1(n,m);
-}
-
-#
-# incomingKnown := { [i1,i2] : Exists ( alpha : i1+2alpha = 1+i2 ) &&
-# i1 = n && i2 = m};
-#
-#
-#
-# codegen incomingKnown;
-if (intMod(n+m+1,2) == 0) {
- s1(n,m);
-}
-
-#
diff --git a/omegalib/examples/old_test/hull1 b/omegalib/examples/old_test/hull1
deleted file mode 100644
index afb18a2..0000000
--- a/omegalib/examples/old_test/hull1
+++ /dev/null
@@ -1,4 +0,0 @@
-R := {[1:10,1:10]} union {[-10:-1,-10:-1]} union
- {[x,y] : -10 <= x,y <= 10 && -10 <= x-y <= 10};
-R;
-Hull R;
diff --git a/omegalib/examples/old_test/hull1.oc-rt b/omegalib/examples/old_test/hull1.oc-rt
deleted file mode 100644
index f8973fa..0000000
--- a/omegalib/examples/old_test/hull1.oc-rt
+++ /dev/null
@@ -1,14 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# R := {[1:10,1:10]} union {[-10:-1,-10:-1]} union
-# {[x,y] : -10 <= x,y <= 10 && -10 <= x-y <= 10};
-#
-# R;
-
-{[x,y]: -10, y-10 <= x <= 10, y+10 && -10 <= y <= 10}
-
-#
-# Hull R;
-
-{[x,y]: -10, y-10 <= x <= 10, y+10 && -10 <= y <= 10}
-
-#
diff --git a/omegalib/examples/old_test/hull2 b/omegalib/examples/old_test/hull2
deleted file mode 100644
index 69214f8..0000000
--- a/omegalib/examples/old_test/hull2
+++ /dev/null
@@ -1,3 +0,0 @@
-R := {[1,1]} union {[3,3]};
-R;
-Hull R;
diff --git a/omegalib/examples/old_test/hull2.oc-rt b/omegalib/examples/old_test/hull2.oc-rt
deleted file mode 100644
index f5e2e94..0000000
--- a/omegalib/examples/old_test/hull2.oc-rt
+++ /dev/null
@@ -1,14 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# R := {[1,1]} union {[3,3]};
-#
-# R;
-
-{[1,1]} union
- {[3,3]}
-
-#
-# hull R;
-
-{[In_1,In_1]: 1 <= In_1 <= 3}
-
-#
diff --git a/omegalib/examples/old_test/hull3 b/omegalib/examples/old_test/hull3
deleted file mode 100644
index 22e0324..0000000
--- a/omegalib/examples/old_test/hull3
+++ /dev/null
@@ -1,17 +0,0 @@
-
-symbolic n;
-
-s1:={[t1, 0, 0]:1 <= t1 && 64 * t1 <= n};
-
-s2 := {[t1, t2, 0]: 1 <= t1 && 64 * t1 <= n && t2 = t1};
-
-s3 := {[t1, 0, t3]: 1 <= t1 && 64 * t1 <= n && t3 = t1};
-
-s := (s1 union s2 union s3);
-
-s;
-h := Hull s;
-
-h;
-
-h - s;
diff --git a/omegalib/examples/old_test/hull3.oc-rt b/omegalib/examples/old_test/hull3.oc-rt
deleted file mode 100644
index c094288..0000000
--- a/omegalib/examples/old_test/hull3.oc-rt
+++ /dev/null
@@ -1,40 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-#
-# symbolic n;
-#
-#
-# s1:={[t1, 0, 0]:1 <= t1 && 64 * t1 <= n};
-#
-#
-# s2 := {[t1, t2, 0]: 1 <= t1 && 64 * t1 <= n && t2 = t1};
-#
-#
-# s3 := {[t1, 0, t3]: 1 <= t1 && 64 * t1 <= n && t3 = t1};
-#
-#
-# s := (s1 union s2 union s3);
-#
-#
-# s;
-
-{[t1,0,0]: 1 <= t1 && 64t1 <= n} union
- {[t1,t1,0]: 1 <= t1 && 64t1 <= n} union
- {[t1,0,t1]: 1 <= t1 && 64t1 <= n}
-
-#
-# h := hull s;
-#
-#
-# h;
-
-{[t1,t2,t3]: 0 <= t3 && 0 <= t2 && 64t1 <= n && 1 <= t1 && t2+t3 <= t1}
-
-#
-#
-# h - s;
-
-{[t1,t2,t3]: 1 <= t3 && 1 <= t2 && 64t1 <= n && t2+t3 <= t1} union
- {[t1,t2,0]: 1 <= t2 < t1 && 64t1 <= n} union
- {[t1,0,t3]: 1 <= t3 < t1 && 64t1 <= n}
-
-#
diff --git a/omegalib/examples/old_test/ip1 b/omegalib/examples/old_test/ip1
deleted file mode 100644
index b8cd8c4..0000000
--- a/omegalib/examples/old_test/ip1
+++ /dev/null
@@ -1,13 +0,0 @@
-time {[a,b,c,d,e,f] :
- a+b+2c+2d+e+2f >= 1
- && a - 3b - 2f >= 1
- && 3a-b >= 1
- && a-c >= 1
- && -b-3c+2e-2f >= 1
- && -a-2e>=1
- && b-2d-f >= 1
- && 4a+b-e >= 1
- && a-c+e >= 1
- && a >= 1
- };
-
diff --git a/omegalib/examples/old_test/ip1.oc-rt b/omegalib/examples/old_test/ip1.oc-rt
deleted file mode 100644
index 6646b8f..0000000
--- a/omegalib/examples/old_test/ip1.oc-rt
+++ /dev/null
@@ -1,15 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# time {[a,b,c,d,e,f] :
-# a+b+2c+2d+e+2f >= 1
-# && a - 3b - 2f >= 1
-# && 3a-b >= 1
-# && a-c >= 1
-# && -b-3c+2e-2f >= 1
-# && -a-2e>=1
-# && b-2d-f >= 1
-# && 4a+b-e >= 1
-# && a-c+e >= 1
-# && a >= 1
-'time' requires getrusage, but the omega calclator was compiled with OMIT_GETRUSAGE set!
-# };
-#
diff --git a/omegalib/examples/old_test/ip2 b/omegalib/examples/old_test/ip2
deleted file mode 100644
index cfef018..0000000
--- a/omegalib/examples/old_test/ip2
+++ /dev/null
@@ -1,11 +0,0 @@
-time {[a,b,c,d,e,f] :
- a+b+2c+2d+e+2f >= 1
- && 2a-3b-2f >= 1
- && 3a-2b >= 1
- && a-3c >= 1
- && -b-3c+2e-2f>=1
- && -a-2e >= 1
- && b-2d-3f >= 1
- && 3a+b-e >= 1
- };
-
diff --git a/omegalib/examples/old_test/ip2.oc-rt b/omegalib/examples/old_test/ip2.oc-rt
deleted file mode 100644
index 74cda4f..0000000
--- a/omegalib/examples/old_test/ip2.oc-rt
+++ /dev/null
@@ -1,13 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# time {[a,b,c,d,e,f] :
-# a+b+2c+2d+e+2f >= 1
-# && 2a-3b-2f >= 1
-# && 3a-2b >= 1
-# && a-3c >= 1
-# && -b-3c+2e-2f>=1
-# && -a-2e >= 1
-# && b-2d-3f >= 1
-# && 3a+b-e >= 1
-'time' requires getrusage, but the omega calclator was compiled with OMIT_GETRUSAGE set!
-# };
-#
diff --git a/omegalib/examples/old_test/ip3 b/omegalib/examples/old_test/ip3
deleted file mode 100644
index 7fc0ec1..0000000
--- a/omegalib/examples/old_test/ip3
+++ /dev/null
@@ -1,18 +0,0 @@
-approximate {[a,b,c,d,e,f] : (
- a+b+2c+2d+e+2f >= 1
- && 2a-3b-2f >= 1
- && 3a-2b >= 1
- && a-3c >= 1
- && -b-3c+2e-2f>=1
- && -a-2e >= 1
- && b-2d-3f >= 1
- && 3a+b-e >= 1
-
- && a = 0
- && b = -1
- && c = -1
- && e = -2
- && d = 11
- )
- };
-
diff --git a/omegalib/examples/old_test/ip3.oc-rt b/omegalib/examples/old_test/ip3.oc-rt
deleted file mode 100644
index 645e3f8..0000000
--- a/omegalib/examples/old_test/ip3.oc-rt
+++ /dev/null
@@ -1,23 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# approximate {[a,b,c,d,e,f] : (
-# a+b+2c+2d+e+2f >= 1
-# && 2a-3b-2f >= 1
-# && 3a-2b >= 1
-# && a-3c >= 1
-# && -b-3c+2e-2f>=1
-# && -a-2e >= 1
-# && b-2d-3f >= 1
-# && 3a+b-e >= 1
-#
-# && a = 0
-# && b = -1
-# && c = -1
-# && e = -2
-# && d = 11
-# )
-# };
-
-{[0,-1,-1,11,-2,-8]}
-
-#
-#
diff --git a/omegalib/examples/old_test/iter1 b/omegalib/examples/old_test/iter1
deleted file mode 100644
index 86ece54..0000000
--- a/omegalib/examples/old_test/iter1
+++ /dev/null
@@ -1,2 +0,0 @@
-R := { [i] : i < 10 && i > 1};
-codegen R;
diff --git a/omegalib/examples/old_test/iter1.oc-rt b/omegalib/examples/old_test/iter1.oc-rt
deleted file mode 100644
index 172ced0..0000000
--- a/omegalib/examples/old_test/iter1.oc-rt
+++ /dev/null
@@ -1,9 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# R := { [i] : i < 10 && i > 1};
-#
-# codegen R;
-for(t1 = 2; t1 <= 9; t1++) {
- s1(t1);
-}
-
-#
diff --git a/omegalib/examples/old_test/iter2 b/omegalib/examples/old_test/iter2
deleted file mode 100644
index e3ccff1..0000000
--- a/omegalib/examples/old_test/iter2
+++ /dev/null
@@ -1,2 +0,0 @@
-R := { [i,j] : i <= 10 && i >= 1 && j <=100 && j >= 10};
-codegen R;
diff --git a/omegalib/examples/old_test/iter2.oc-rt b/omegalib/examples/old_test/iter2.oc-rt
deleted file mode 100644
index 0597426..0000000
--- a/omegalib/examples/old_test/iter2.oc-rt
+++ /dev/null
@@ -1,11 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# R := { [i,j] : i <= 10 && i >= 1 && j <=100 && j >= 10};
-#
-# codegen R;
-for(t1 = 1; t1 <= 10; t1++) {
- for(t2 = 10; t2 <= 100; t2++) {
- s1(t1,t2);
- }
-}
-
-#
diff --git a/omegalib/examples/old_test/iter3 b/omegalib/examples/old_test/iter3
deleted file mode 100644
index 604574b..0000000
--- a/omegalib/examples/old_test/iter3
+++ /dev/null
@@ -1,2 +0,0 @@
-R := { [i,j] : i < 10 && i > 1 && j < 10 && j > i};
-codegen R;
diff --git a/omegalib/examples/old_test/iter3.oc-rt b/omegalib/examples/old_test/iter3.oc-rt
deleted file mode 100644
index d1288b5..0000000
--- a/omegalib/examples/old_test/iter3.oc-rt
+++ /dev/null
@@ -1,11 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# R := { [i,j] : i < 10 && i > 1 && j < 10 && j > i};
-#
-# codegen R;
-for(t1 = 2; t1 <= 8; t1++) {
- for(t2 = t1+1; t2 <= 9; t2++) {
- s1(t1,t2);
- }
-}
-
-#
diff --git a/omegalib/examples/old_test/iter4 b/omegalib/examples/old_test/iter4
deleted file mode 100644
index 2660d33..0000000
--- a/omegalib/examples/old_test/iter4
+++ /dev/null
@@ -1,2 +0,0 @@
-R := { [i,j] : i < 10 && i > 1 && j <=2i && j > i};
-codegen R;
diff --git a/omegalib/examples/old_test/iter4.oc-rt b/omegalib/examples/old_test/iter4.oc-rt
deleted file mode 100644
index 182cb09..0000000
--- a/omegalib/examples/old_test/iter4.oc-rt
+++ /dev/null
@@ -1,11 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# R := { [i,j] : i < 10 && i > 1 && j <=2i && j > i};
-#
-# codegen R;
-for(t1 = 2; t1 <= 9; t1++) {
- for(t2 = t1+1; t2 <= 2*t1; t2++) {
- s1(t1,t2);
- }
-}
-
-#
diff --git a/omegalib/examples/old_test/iter5 b/omegalib/examples/old_test/iter5
deleted file mode 100644
index b2a973b..0000000
--- a/omegalib/examples/old_test/iter5
+++ /dev/null
@@ -1,2 +0,0 @@
-R := { [i,j] : i < 10 && i > 1 && j <=2i && j > i && j <= 16};
-codegen R;
diff --git a/omegalib/examples/old_test/iter5.oc-rt b/omegalib/examples/old_test/iter5.oc-rt
deleted file mode 100644
index 8b567d5..0000000
--- a/omegalib/examples/old_test/iter5.oc-rt
+++ /dev/null
@@ -1,11 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# R := { [i,j] : i < 10 && i > 1 && j <=2i && j > i && j <= 16};
-#
-# codegen R;
-for(t1 = 2; t1 <= 9; t1++) {
- for(t2 = t1+1; t2 <= min(2*t1,16); t2++) {
- s1(t1,t2);
- }
-}
-
-#
diff --git a/omegalib/examples/old_test/iter6 b/omegalib/examples/old_test/iter6
deleted file mode 100644
index b093c0b..0000000
--- a/omegalib/examples/old_test/iter6
+++ /dev/null
@@ -1,6 +0,0 @@
-Y := { [i,j] : 1 <= i <= 5 and 12 <= j <= 17};
-codegen Y;
-
-X := { [i,j] : 17i-153 = 12j+17 and 1 <= i <= 100 and 1 <= j <= 100 and i < j};
-codegen X;
-
diff --git a/omegalib/examples/old_test/iter6.oc-rt b/omegalib/examples/old_test/iter6.oc-rt
deleted file mode 100644
index 74f06da..0000000
--- a/omegalib/examples/old_test/iter6.oc-rt
+++ /dev/null
@@ -1,22 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# Y := { [i,j] : 1 <= i <= 5 and 12 <= j <= 17};
-#
-# codegen Y;
-for(t1 = 1; t1 <= 5; t1++) {
- for(t2 = 12; t2 <= 17; t2++) {
- s1(t1,t2);
- }
-}
-
-#
-#
-# X := { [i,j] : 17i-153 = 12j+17 and 1 <= i <= 100 and 1 <= j <= 100 and i < j};
-#
-# codegen X;
-for(t1 = 46; t1 <= 70; t1 += 12) {
- t2=intDiv((17*t1+11),12);
- s1(t1,intDiv(17*t1+-170,12));
-}
-
-#
-#
diff --git a/omegalib/examples/old_test/iter7 b/omegalib/examples/old_test/iter7
deleted file mode 100644
index 3364dd7..0000000
--- a/omegalib/examples/old_test/iter7
+++ /dev/null
@@ -1,3 +0,0 @@
-R := {[i,j] : 3i+2j=15 && 1<=i<=j<=100};
-R;
-codegen R;
diff --git a/omegalib/examples/old_test/iter7.oc-rt b/omegalib/examples/old_test/iter7.oc-rt
deleted file mode 100644
index 52b7860..0000000
--- a/omegalib/examples/old_test/iter7.oc-rt
+++ /dev/null
@@ -1,15 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# R := {[i,j] : 3i+2j=15 && 1<=i<=j<=100};
-#
-# R;
-
-{[i,j]: 3i+2j = 15 && 3 <= j <= 6}
-
-#
-# codegen R;
-for(t1 = 1; t1 <= 3; t1 += 2) {
- t2=intDiv((-3*t1+15+1),2);
- s1(t1,intDiv(-3*t1+15,2));
-}
-
-#
diff --git a/omegalib/examples/old_test/iter8 b/omegalib/examples/old_test/iter8
deleted file mode 100644
index 65682bb..0000000
--- a/omegalib/examples/old_test/iter8
+++ /dev/null
@@ -1,12 +0,0 @@
-symbolic exprVar1;
-symbolic exprVar2;
-symbolic exprVar3;
-
-ispace := {[In_1] : exists ( alpha : In_1+8alpha = 1+exprVar2 && exprVar3 =
-0 && 1 <= exprVar1 < In_1 <= 16 && exprVar2 < In_1)};
-
-known := {[In1] : exists ( alpha : exprVar3 = 0 && exprVar2 <= 8alpha +15
-&& alpha <= 0 && 1 <= exprVar1 && exprVar1+8alpha <= exprVar2)};
-
-codegen ispace given known;
-
diff --git a/omegalib/examples/old_test/iter8.oc-rt b/omegalib/examples/old_test/iter8.oc-rt
deleted file mode 100644
index ede80cb..0000000
--- a/omegalib/examples/old_test/iter8.oc-rt
+++ /dev/null
@@ -1,23 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# symbolic exprVar1;
-#
-# symbolic exprVar2;
-#
-# symbolic exprVar3;
-#
-#
-# ispace := {[In_1] : Exists ( alpha : In_1+8alpha = 1+exprVar2 && exprVar3 =
-# 0 && 1 <= exprVar1 < In_1 <= 16 && exprVar2 < In_1)};
-#
-#
-# known := {[In1] : Exists ( alpha : exprVar3 = 0 && exprVar2 <= 8alpha +15
-# && alpha <= 0 && 1 <= exprVar1 && exprVar1+8alpha <= exprVar2)};
-#
-#
-# codegen ispace given known;
-for(t1 = max(exprVar2+1,exprVar1+1+intMod(((exprVar2+1)-exprVar1+1),8)); t1 <= 16; t1 += 8) {
- s1(t1);
-}
-
-#
-#
diff --git a/omegalib/examples/old_test/iter9 b/omegalib/examples/old_test/iter9
deleted file mode 100644
index 42724f5..0000000
--- a/omegalib/examples/old_test/iter9
+++ /dev/null
@@ -1,40 +0,0 @@
-
-symbolic exprVar1;
-symbolic exprVar2;
-
-ispace0 := {[In_1] : exists ( alpha : exprVar2 = 0 && exprVar1 <= 8alpha+15
-&& alpha <= 0 && 1 <= In_1 && In_1+8alpha <= exprVar1)};
-
-ispace1 := {[In_1] : exists ( alpha : exprVar2 = 0 && exprVar1 <= 8alpha+15
-&& alpha <= 0 && 1 <= In_1 && In_1+8alpha <= exprVar1)};
-
-ispace2 := {[In_1] : exists ( alpha : exprVar2 = 0 && exprVar1 <= 8alpha+15
-&& alpha <= 0 && 1 <= In_1 && In_1+8alpha <= exprVar1)};
-
-ispace3 := {[In_1] : exists ( alpha : exprVar2 = 0 && exprVar1 <= 8alpha+15
-&& alpha <= 0 && 1 <= In_1 && In_1+8alpha <= exprVar1)};
-
-ispace4 := {[In_1] : exists ( alpha : exprVar2 = 0 && exprVar1 <= 8alpha+15
-&& alpha <= 0 && 1 <= In_1 && In_1+8alpha <= exprVar1)};
-
-ispace5 := {[In_1] : exists ( alpha : exprVar2 = 0 && exprVar1 <= 8alpha+15
-&& alpha <= 0 && 1 <= In_1 && In_1+8alpha <= exprVar1)} union
- {[In_1] : exists ( alpha : 1+exprVar1 = In_1+8alpha && exprVar2 = 0 && 1,
-exprVar1+1 <= In_1 <= 15)};
-
-known := { [In_1] : exprVar2 = 0 && exprVar1 <= 15} union
- {[In_1] : exprVar2 = 0 && exprVar1 <= 14} union
- {[In_1] : exprVar2 = 0 && exprVar1 <= 15};
-
-
-k := Hull known;
-
-gist ispace0 given k;
-gist ispace1 given k;
-gist ispace2 given k;
-gist ispace3 given k;
-gist ispace4 given k;
-gist ispace5 given k;
-
-codegen ispace0, ispace1, ispace2, ispace3, ispace4, ispace5 given k;
-
diff --git a/omegalib/examples/old_test/iter9.oc-rt b/omegalib/examples/old_test/iter9.oc-rt
deleted file mode 100644
index 93b1c48..0000000
--- a/omegalib/examples/old_test/iter9.oc-rt
+++ /dev/null
@@ -1,121 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-#
-# symbolic exprVar1;
-#
-# symbolic exprVar2;
-#
-#
-# ispace0 := {[In_1] : Exists ( alpha : exprVar2 = 0 && exprVar1 <= 8alpha+15
-# && alpha <= 0 && 1 <= In_1 && In_1+8alpha <= exprVar1)};
-#
-#
-# ispace1 := {[In_1] : Exists ( alpha : exprVar2 = 0 && exprVar1 <= 8alpha+15
-# && alpha <= 0 && 1 <= In_1 && In_1+8alpha <= exprVar1)};
-#
-#
-# ispace2 := {[In_1] : Exists ( alpha : exprVar2 = 0 && exprVar1 <= 8alpha+15
-# && alpha <= 0 && 1 <= In_1 && In_1+8alpha <= exprVar1)};
-#
-#
-# ispace3 := {[In_1] : Exists ( alpha : exprVar2 = 0 && exprVar1 <= 8alpha+15
-# && alpha <= 0 && 1 <= In_1 && In_1+8alpha <= exprVar1)};
-#
-#
-# ispace4 := {[In_1] : Exists ( alpha : exprVar2 = 0 && exprVar1 <= 8alpha+15
-# && alpha <= 0 && 1 <= In_1 && In_1+8alpha <= exprVar1)};
-#
-#
-# ispace5 := {[In_1] : Exists ( alpha : exprVar2 = 0 && exprVar1 <= 8alpha+15
-# && alpha <= 0 && 1 <= In_1 && In_1+8alpha <= exprVar1)} union
-# {[In_1] : Exists ( alpha : 1+exprVar1 = In_1+8alpha && exprVar2 = 0 && 1,
-# exprVar1+1 <= In_1 <= 15)};
-#
-#
-# known := { [In_1] : exprVar2 = 0 && exprVar1 <= 15} union
-# {[In_1] : exprVar2 = 0 && exprVar1 <= 14} union
-# {[In_1] : exprVar2 = 0 && exprVar1 <= 15};
-#
-#
-#
-# k := Hull known;
-#
-#
-# gist ispace0 given k;
-
-{[In_1]: Exists ( alpha : exprVar1 <= 8alpha+15 && 1 <= In_1 && In_1+8alpha <= exprVar1)}
-
-#
-# gist ispace1 given k;
-
-{[In_1]: Exists ( alpha : exprVar1 <= 8alpha+15 && 1 <= In_1 && In_1+8alpha <= exprVar1)}
-
-#
-# gist ispace2 given k;
-
-{[In_1]: Exists ( alpha : exprVar1 <= 8alpha+15 && 1 <= In_1 && In_1+8alpha <= exprVar1)}
-
-#
-# gist ispace3 given k;
-
-{[In_1]: Exists ( alpha : exprVar1 <= 8alpha+15 && 1 <= In_1 && In_1+8alpha <= exprVar1)}
-
-#
-# gist ispace4 given k;
-
-{[In_1]: Exists ( alpha : exprVar1 <= 8alpha+15 && 1 <= In_1 && In_1+8alpha <= exprVar1)}
-
-#
-# gist ispace5 given k;
-
-{[In_1]: Exists ( alpha : exprVar1 <= 8alpha+15 && 1 <= In_1 && In_1+8alpha <= exprVar1)} union
- {[In_1]: Exists ( alpha : In_1+8alpha = 1+exprVar1 && 1, exprVar1+1 <= In_1 <= 15)}
-
-#
-#
-# codegen ispace0, ispace1, ispace2, ispace3, ispace4, ispace5 given k;
-for(t1 = 1; t1 <= 8; t1++) {
- if (exprVar1-15 <= 8*intDiv(exprVar1-t1,8) && exprVar1-15 <= 8*intDiv(exprVar1-t1,8)) {
- s1(t1);
- }
- if (exprVar1-15 <= 8*intDiv(exprVar1-t1,8) && exprVar1-15 <= 8*intDiv(exprVar1-t1,8)) {
- s2(t1);
- }
- if (exprVar1-15 <= 8*intDiv(exprVar1-t1,8) && exprVar1-15 <= 8*intDiv(exprVar1-t1,8)) {
- s3(t1);
- }
- if (exprVar1-15 <= 8*intDiv(exprVar1-t1,8) && exprVar1-15 <= 8*intDiv(exprVar1-t1,8)) {
- s4(t1);
- }
- if (exprVar1-15 <= 8*intDiv(exprVar1-t1,8) && exprVar1-15 <= 8*intDiv(exprVar1-t1,8)) {
- s5(t1);
- }
- if (exprVar1-15 <= 8*intDiv(exprVar1-t1,8) && exprVar1-15 <= 8*intDiv(exprVar1-t1,8)) {
- s6(t1);
- }
-}
-for(t1 = 9; t1 <= 15; t1++) {
- if (exprVar1-15 <= 8*intDiv(-t1+exprVar1,8)) {
- s1(t1);
- }
- if (exprVar1-15 <= 8*intDiv(-t1+exprVar1,8)) {
- s2(t1);
- }
- if (exprVar1-15 <= 8*intDiv(-t1+exprVar1,8)) {
- s3(t1);
- }
- if (exprVar1-15 <= 8*intDiv(-t1+exprVar1,8)) {
- s4(t1);
- }
- if (exprVar1-15 <= 8*intDiv(-t1+exprVar1,8)) {
- s5(t1);
- }
- if (exprVar1-15 <= 8*intDiv(-t1+exprVar1,8)) {
- s6(t1);
- }
- if (intMod(-t1+exprVar1+1,8) == 0) {
- s6(t1);
- }
-}
-
-#
-#
diff --git a/omegalib/examples/old_test/lefur00 b/omegalib/examples/old_test/lefur00
deleted file mode 100644
index 061f78c..0000000
--- a/omegalib/examples/old_test/lefur00
+++ /dev/null
@@ -1,15 +0,0 @@
-R := { [i, j, k, l] :
- 0 <= i <= 19 &&
- 0 <= j <= 19 &&
- 1 <= k <= 1000 &&
- -k + l >= 0 &&
- 2 k - l + 1 >= 0 &&
- -200 i + k + l >= 0 &&
- 200 i - k - l + 199 >= 0 &&
- -200 j - k + 2 l >= 0 &&
- 200 j + k -2 l + 199 >= 0
-} ;
-
-
-codegen R;
-
diff --git a/omegalib/examples/old_test/lefur00.oc-rt b/omegalib/examples/old_test/lefur00.oc-rt
deleted file mode 100644
index 3b3736f..0000000
--- a/omegalib/examples/old_test/lefur00.oc-rt
+++ /dev/null
@@ -1,28 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# R := { [i, j, k, l] :
-# 0 <= i <= 19 &&
-# 0 <= j <= 19 &&
-# 1 <= k <= 1000 &&
-# -k + l >= 0 &&
-# 2 k - l + 1 >= 0 &&
-# -200 i + k + l >= 0 &&
-# 200 i - k - l + 199 >= 0 &&
-# -200 j - k + 2 l >= 0 &&
-# 200 j + k -2 l + 199 >= 0
-# } ;
-#
-#
-#
-# codegen R;
-for(t1 = 0; t1 <= 15; t1++) {
- for(t2 = max(2*t1-15,intDiv(t1-1+1,2)); t2 <= min(t1+1,15); t2++) {
- for(t3 = max(intDiv(200*t1-1+2,3),intDiv(200*t2-2+2,3),intDiv(-200*t2+400*t1-199+2,3),1); t3 <= min(100*t1+99,intDiv(-200*t2+400*t1+398,3),1000); t3++) {
- for(t4 = max(t3,200*t1-t3,intDiv(200*t2+t3+1,2)); t4 <= min(2*t3+1,intDiv(200*t2+t3+199,2),200*t1-t3+199); t4++) {
- s1(t1,t2,t3,t4);
- }
- }
- }
-}
-
-#
-#
diff --git a/omegalib/examples/old_test/lefur01 b/omegalib/examples/old_test/lefur01
deleted file mode 100644
index 495c4f3..0000000
--- a/omegalib/examples/old_test/lefur01
+++ /dev/null
@@ -1,14 +0,0 @@
-R := { [i, j, k, l] :
- 0 <= i <= 19 &&
- 0 <= j <= 19 &&
- 1 <= k <= 1000 &&
- -k + l >= 0 &&
- 2 k - l + 1 >= 0 &&
- -200 i + k + l >= 0 &&
- 200 i - k - l + 199 >= 0 &&
- -200 j - k + 2 l >= 0 &&
- 200 j + k -2 l + 199 >= 0
-} ;
-
-codegen R;
-codegen 2 R;
diff --git a/omegalib/examples/old_test/lefur01.oc-rt b/omegalib/examples/old_test/lefur01.oc-rt
deleted file mode 100644
index 4437f93..0000000
--- a/omegalib/examples/old_test/lefur01.oc-rt
+++ /dev/null
@@ -1,103 +0,0 @@
->>> R := { [i, j, k, l] :
->>> 0 <= i <= 19 &&
->>> 0 <= j <= 19 &&
->>> 1 <= k <= 1000 &&
->>> -k + l >= 0 &&
->>> 2 k - l + 1 >= 0 &&
->>> -200 i + k + l >= 0 &&
->>> 200 i - k - l + 199 >= 0 &&
->>> -200 j - k + 2 l >= 0 &&
->>> 200 j + k -2 l + 199 >= 0
->>> } ;
->>>
->>> codegen R;
-for(t1 = 0; t1 <= 15; t1++) {
- for(t2 = max(2*t1-15,intDiv(t1-1+1,2)); t2 <= min(t1+1,15); t2++) {
- for(t3 = max(intDiv(200*t1-1+2,3),intDiv(200*t2-2+2,3),intDiv(400*t1-200*t2-199+2,3),1); t3 <= min(100*t1+99,intDiv(400*t1-200*t2+398,3),1000); t3++) {
- for(t4 = max(t3,-t3+200*t1,intDiv(t3+200*t2+1,2)); t4 <= min(2*t3+1,-t3+200*t1+199,intDiv(t3+200*t2+199,2)); t4++) {
- s1(t1,t2,t3,t4);
- }
- }
- }
-}
-
->>> codegen 2 R;
-for(t1 = 0; t1 <= 15; t1++) {
- for(t2 = max(2*t1-15,intDiv(t1-1+1,2)); t2 <= min(t1+1,15); t2++) {
- if (t2 <= t1-1) {
- for(t3 = intDiv(-200*t2+400*t1-199+2,3); t3 <= min(100*t1-1,intDiv(-200*t2+400*t1-2,3)); t3++) {
- for(t4 = 200*t1-t3; t4 <= intDiv(t3+200*t2+199,2); t4++) {
- s1(t1,t2,t3,t4);
- }
- }
- }
- for(t3 = max(intDiv(200*t1-1+2,3),intDiv(200*t2-2+2,3)); t3 <= min(100*t1-1,intDiv(200*t2+195,3),intDiv(400*t1-200*t2+398,3),1000); t3++) {
- for(t4 = intDiv(t3+200*t2+1,2); t4 <= 2*t3+1; t4++) {
- s1(t1,t2,t3,t4);
- }
- }
- for(t3 = max(intDiv(200*t2+196+2,3),intDiv(-200*t2+400*t1-1+2,3)); t3 <= min(100*t1-1,intDiv(-200*t2+400*t1+198,3),1000); t3++) {
- for(t4 = intDiv(200*t2+t3+1,2); t4 <= intDiv(200*t2+t3+199,2); t4++) {
- s1(t1,t2,t3,t4);
- }
- }
- if (t2 <= t1) {
- for(t3 = intDiv(-200*t2+400*t1+199+2,3); t3 <= min(intDiv(-200*t2+400*t1+398,3),100*t1-1,1000); t3++) {
- for(t4 = intDiv(200*t2+t3+1,2); t4 <= -t3+200*t1+199; t4++) {
- s1(t1,t2,t3,t4);
- }
- }
- }
- if (t2 == 1 && t1 == 1) {
- for(t3 = 100; t3 <= 132; t3++) {
- for(t4 = intDiv(t3+200+1,2); t4 <= 2*t3+1; t4++) {
- s1(1,1,t3,t4);
- }
- }
- }
- if (2*t2 == t1+1 && t2 >= 2) {
- for(t3 = 200*t2-100; t3 <= 200*t2-68; t3++) {
- for(t4 = intDiv(200*t2+t3+1,2); t4 <= intDiv(200*t2+t3+199,2); t4++) {
- s1(t1,intDiv(t1+1,2),t3,t4);
- }
- }
- }
- if (2*t2 >= t1+1) {
- for(t3 = max(intDiv(200*t2-2+2,3),intDiv(-200*t2+400*t1+199+2,3),100*t1); t3 <= min(intDiv(-200*t2+400*t1+398,3),1000); t3++) {
- for(t4 = intDiv(t3+200*t2+1,2); t4 <= 200*t1-t3+199; t4++) {
- s1(t1,t2,t3,t4);
- }
- }
- }
- if (t2 == 0 && t1 <= 0) {
- for(t3 = 1; t3 <= 65; t3++) {
- for(t4 = t3; t4 <= 2*t3+1; t4++) {
- s1(0,0,t3,t4);
- }
- }
- }
- if (t2 == 0) {
- for(t3 = max(100*t1,66); t3 <= intDiv(200*t1+198,3); t3++) {
- for(t4 = t3; t4 <= intDiv(t3+199,2); t4++) {
- s1(t1,0,t3,t4);
- }
- }
- }
- if (2*t2 <= t1) {
- for(t3 = max(100*t1,intDiv(200*t1+199+2,3)); t3 <= min(200*t2+199,intDiv(400*t1-200*t2+200,3),1000); t3++) {
- for(t4 = t3; t4 <= intDiv(t3+200*t2+199,2); t4++) {
- s1(t1,t2,t3,t4);
- }
- }
- }
- if (2*t2 == t1 && t2 <= 4) {
- for(t3 = 200*t2+67; t3 <= 200*t2+99; t3++) {
- for(t4 = t3; t4 <= -t3+400*t2+199; t4++) {
- s1(t1,intDiv(t1,2),t3,t4);
- }
- }
- }
- }
-}
-
-
diff --git a/omegalib/examples/old_test/lefur03 b/omegalib/examples/old_test/lefur03
deleted file mode 100644
index c237eca..0000000
--- a/omegalib/examples/old_test/lefur03
+++ /dev/null
@@ -1,16 +0,0 @@
-# From Fabien Coelho
-
-R := { [i,j,k,l,m,n] :
- 0 <= i <= 3 &&
- 0 <= j <= 3 &&
- 0 <= k <= 3 &&
- 0 <= l <= 3 &&
- 1 <= m <= 1000 &&
- -1 <= 3 m - 1000 k <= 998 &&
- m <= n <= 2 m + 1 &&
- 0 <= m + n - 1000 i <= 999 &&
- 0 <= 2 n - m - 1000 j <= 999 &&
- 2 <= n + 2 m - 1000 l <= 1001
-} ;
-
-codegen R;
diff --git a/omegalib/examples/old_test/lefur03-3 b/omegalib/examples/old_test/lefur03-3
deleted file mode 100644
index 1c576a1..0000000
--- a/omegalib/examples/old_test/lefur03-3
+++ /dev/null
@@ -1,20 +0,0 @@
-# From Fabien Coelho
-
-R := { [i,j,k,l,m,n] :
- 0 <= i <= 3 &&
- 0 <= j <= 3 &&
- 0 <= k <= 3 &&
- 0 <= l <= 3 &&
- 1 <= m <= 1000 &&
- -1 <= 3 m - 1000 k <= 998 &&
- m <= n <= 2 m + 1 &&
- 0 <= m + n - 1000 i <= 999 &&
- 0 <= 2 n - m - 1000 j <= 999 &&
- 2 <= n + 2 m - 1000 l <= 1001
-} ;
-
-codegen R;
-codegen R;
-codegen R;
-codegen R;
-codegen R;
diff --git a/omegalib/examples/old_test/lefur03-3.oc-rt b/omegalib/examples/old_test/lefur03-3.oc-rt
deleted file mode 100644
index a1aa81a..0000000
--- a/omegalib/examples/old_test/lefur03-3.oc-rt
+++ /dev/null
@@ -1,107 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# # From Fabien Coelho
-#
-# R := { [i,j,k,l,m,n] :
-# 0 <= i <= 3 &&
-# 0 <= j <= 3 &&
-# 0 <= k <= 3 &&
-# 0 <= l <= 3 &&
-# 1 <= m <= 1000 &&
-# -1 <= 3 m - 1000 k <= 998 &&
-# m <= n <= 2 m + 1 &&
-# 0 <= m + n - 1000 i <= 999 &&
-# 0 <= 2 n - m - 1000 j <= 999 &&
-# 2 <= n + 2 m - 1000 l <= 1001
-# } ;
-#
-#
-# codegen R;
-for(t1 = 0; t1 <= 3; t1++) {
- for(t2 = max(2*t1-3,0); t2 <= min(t1+1,3); t2++) {
- for(t3 = t1; t3 <= min(2*t1-t2+1,3*t2+2,3); t3++) {
- for(t4 = max(intDiv(t3+3*t1-3+2,3),intDiv(5*t3+3*t2-6+5,6),intDiv(4*t2-3+2,3),0); t4 <= min(intDiv(-t2+5*t1+4,3),intDiv(5*t3+3*t2+7,6),3); t4++) {
- if (t1 <= t4+1) {
- for(t5 = max(intDiv(1000*t3-1+2,3),250*t4+1,intDiv(-1000*t2+2000*t1-999+2,3),intDiv(1000*t2-2+2,3),-200*t2+400*t4-199); t5 <= min(intDiv(1000*t4+1001,3),-200*t2+400*t4+400,intDiv(1000*t3+998,3),500*t1+499,1000); t5++) {
- for(t6 = max(t5,intDiv(t5+1000*t2+1,2),-2*t5+1000*t4+2,-t5+1000*t1); t6 <= min(-2*t5+1000*t4+1001,2*t5+1,intDiv(t5+1000*t2+999,2),-t5+1000*t1+999); t6++) {
- s1(t1,t2,t3,t4,t5,t6);
- }
- }
- }
- }
- }
- }
-}
-
-#
-# codegen R;
-for(t1 = 0; t1 <= 3; t1++) {
- for(t2 = max(2*t1-3,0); t2 <= min(t1+1,3); t2++) {
- for(t3 = t1; t3 <= min(2*t1-t2+1,3*t2+2,3); t3++) {
- for(t4 = max(intDiv(t3+3*t1-3+2,3),intDiv(5*t3+3*t2-6+5,6),intDiv(4*t2-3+2,3),0); t4 <= min(intDiv(-t2+5*t1+4,3),intDiv(5*t3+3*t2+7,6),3); t4++) {
- if (t1 <= t4+1) {
- for(t5 = max(intDiv(1000*t3-1+2,3),250*t4+1,intDiv(-1000*t2+2000*t1-999+2,3),intDiv(1000*t2-2+2,3),-200*t2+400*t4-199); t5 <= min(intDiv(1000*t4+1001,3),-200*t2+400*t4+400,intDiv(1000*t3+998,3),500*t1+499,1000); t5++) {
- for(t6 = max(t5,intDiv(t5+1000*t2+1,2),-2*t5+1000*t4+2,-t5+1000*t1); t6 <= min(-2*t5+1000*t4+1001,2*t5+1,intDiv(t5+1000*t2+999,2),-t5+1000*t1+999); t6++) {
- s1(t1,t2,t3,t4,t5,t6);
- }
- }
- }
- }
- }
- }
-}
-
-#
-# codegen R;
-for(t1 = 0; t1 <= 3; t1++) {
- for(t2 = max(2*t1-3,0); t2 <= min(t1+1,3); t2++) {
- for(t3 = t1; t3 <= min(2*t1-t2+1,3*t2+2,3); t3++) {
- for(t4 = max(intDiv(t3+3*t1-3+2,3),intDiv(5*t3+3*t2-6+5,6),intDiv(4*t2-3+2,3),0); t4 <= min(intDiv(-t2+5*t1+4,3),intDiv(5*t3+3*t2+7,6),3); t4++) {
- if (t1 <= t4+1) {
- for(t5 = max(intDiv(1000*t3-1+2,3),250*t4+1,intDiv(-1000*t2+2000*t1-999+2,3),intDiv(1000*t2-2+2,3),-200*t2+400*t4-199); t5 <= min(intDiv(1000*t4+1001,3),-200*t2+400*t4+400,intDiv(1000*t3+998,3),500*t1+499,1000); t5++) {
- for(t6 = max(t5,intDiv(t5+1000*t2+1,2),-2*t5+1000*t4+2,-t5+1000*t1); t6 <= min(-2*t5+1000*t4+1001,2*t5+1,intDiv(t5+1000*t2+999,2),-t5+1000*t1+999); t6++) {
- s1(t1,t2,t3,t4,t5,t6);
- }
- }
- }
- }
- }
- }
-}
-
-#
-# codegen R;
-for(t1 = 0; t1 <= 3; t1++) {
- for(t2 = max(2*t1-3,0); t2 <= min(t1+1,3); t2++) {
- for(t3 = t1; t3 <= min(2*t1-t2+1,3*t2+2,3); t3++) {
- for(t4 = max(intDiv(t3+3*t1-3+2,3),intDiv(5*t3+3*t2-6+5,6),intDiv(4*t2-3+2,3),0); t4 <= min(intDiv(-t2+5*t1+4,3),intDiv(5*t3+3*t2+7,6),3); t4++) {
- if (t1 <= t4+1) {
- for(t5 = max(intDiv(1000*t3-1+2,3),250*t4+1,intDiv(-1000*t2+2000*t1-999+2,3),intDiv(1000*t2-2+2,3),-200*t2+400*t4-199); t5 <= min(intDiv(1000*t4+1001,3),-200*t2+400*t4+400,intDiv(1000*t3+998,3),500*t1+499,1000); t5++) {
- for(t6 = max(t5,intDiv(t5+1000*t2+1,2),-2*t5+1000*t4+2,-t5+1000*t1); t6 <= min(-2*t5+1000*t4+1001,2*t5+1,intDiv(t5+1000*t2+999,2),-t5+1000*t1+999); t6++) {
- s1(t1,t2,t3,t4,t5,t6);
- }
- }
- }
- }
- }
- }
-}
-
-#
-# codegen R;
-for(t1 = 0; t1 <= 3; t1++) {
- for(t2 = max(2*t1-3,0); t2 <= min(t1+1,3); t2++) {
- for(t3 = t1; t3 <= min(2*t1-t2+1,3*t2+2,3); t3++) {
- for(t4 = max(intDiv(t3+3*t1-3+2,3),intDiv(5*t3+3*t2-6+5,6),intDiv(4*t2-3+2,3),0); t4 <= min(intDiv(-t2+5*t1+4,3),intDiv(5*t3+3*t2+7,6),3); t4++) {
- if (t1 <= t4+1) {
- for(t5 = max(intDiv(1000*t3-1+2,3),250*t4+1,intDiv(-1000*t2+2000*t1-999+2,3),intDiv(1000*t2-2+2,3),-200*t2+400*t4-199); t5 <= min(intDiv(1000*t4+1001,3),-200*t2+400*t4+400,intDiv(1000*t3+998,3),500*t1+499,1000); t5++) {
- for(t6 = max(t5,intDiv(t5+1000*t2+1,2),-2*t5+1000*t4+2,-t5+1000*t1); t6 <= min(-2*t5+1000*t4+1001,2*t5+1,intDiv(t5+1000*t2+999,2),-t5+1000*t1+999); t6++) {
- s1(t1,t2,t3,t4,t5,t6);
- }
- }
- }
- }
- }
- }
-}
-
-#
diff --git a/omegalib/examples/old_test/lefur03.c b/omegalib/examples/old_test/lefur03.c
deleted file mode 100644
index 7df0865..0000000
--- a/omegalib/examples/old_test/lefur03.c
+++ /dev/null
@@ -1,36 +0,0 @@
-
-#include <stdio.h>
-#include "basic/util.h"
-
-template int max(int, int);
-template int min(int, int);
-
-void Exit(int foo) {
- exit(foo);
- }
-
-int main() {
-
-int t1,t2,t3,t4,t5,t6;
-
-
-
-
-
-for(t1 = 0; t1 <= 3; t1++) {
- for(t2 = max(2*t1-3,0); t2 <= min(t1+1,3); t2++) {
- for(t3 = t1; t3 <= min(-t2+2*t1+1,3*t2+2,3); t3++) {
- for(t4 = max(max(int_div(5*t3+3*t2-6+5,6),int_div(5*t1-t2-4+2,3)),max(t2,0)); t4 <= min(int_div(5*t3+3*t2+7,6),int_div(5*t1-t2+4,3),3); t4++) {
- for(t5 = max(max(max(int_div(1000*t2-2+2,3),250*t4+1),max(int_div(2000*t1-1000*t2-999+2,3),400*t4-200*t2-199)),int_div(1000*t3-1+2,3));
- t5 <= min(min(min(400*t4-200*t2+400,500*t1+499),min(int_div(1000*t3+998,3),int_div(1000*t4+1001,3))),1000); t5++) {
- for(t6 = max(max(int_div(t5+1000*t2+1,2),t5),max(1000*t1-t5,-2*t5+1000*t4+2)); t6 <= min(min(int_div(t5+1000*t2+999,2),2*t5+1),min(1000*t1-t5+999,-2*t5+1000*t4+1001)); t6++) {
- printf("%d,%d,%d,%d,%d,%d\n",
- t1,t2,t3,t4,t5,t6);
- }
- }
- }
- }
- }
- }
-}
-
diff --git a/omegalib/examples/old_test/lefur03.oc-rt b/omegalib/examples/old_test/lefur03.oc-rt
deleted file mode 100644
index 3fbb8cb..0000000
--- a/omegalib/examples/old_test/lefur03.oc-rt
+++ /dev/null
@@ -1,35 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# # From Fabien Coelho
-#
-# R := { [i,j,k,l,m,n] :
-# 0 <= i <= 3 &&
-# 0 <= j <= 3 &&
-# 0 <= k <= 3 &&
-# 0 <= l <= 3 &&
-# 1 <= m <= 1000 &&
-# -1 <= 3 m - 1000 k <= 998 &&
-# m <= n <= 2 m + 1 &&
-# 0 <= m + n - 1000 i <= 999 &&
-# 0 <= 2 n - m - 1000 j <= 999 &&
-# 2 <= n + 2 m - 1000 l <= 1001
-# } ;
-#
-#
-# codegen R;
-for(t1 = 0; t1 <= 3; t1++) {
- for(t2 = max(2*t1-3,0); t2 <= min(t1+1,3); t2++) {
- for(t3 = t1; t3 <= min(2*t1-t2+1,3*t2+2,3); t3++) {
- for(t4 = max(intDiv(t3+3*t1-3+2,3),intDiv(5*t3+3*t2-6+5,6),intDiv(4*t2-3+2,3),0); t4 <= min(intDiv(-t2+5*t1+4,3),intDiv(5*t3+3*t2+7,6),3); t4++) {
- if (t1 <= t4+1) {
- for(t5 = max(intDiv(1000*t3-1+2,3),250*t4+1,intDiv(-1000*t2+2000*t1-999+2,3),intDiv(1000*t2-2+2,3),-200*t2+400*t4-199); t5 <= min(intDiv(1000*t4+1001,3),-200*t2+400*t4+400,intDiv(1000*t3+998,3),500*t1+499,1000); t5++) {
- for(t6 = max(t5,intDiv(t5+1000*t2+1,2),-2*t5+1000*t4+2,-t5+1000*t1); t6 <= min(-2*t5+1000*t4+1001,2*t5+1,intDiv(t5+1000*t2+999,2),-t5+1000*t1+999); t6++) {
- s1(t1,t2,t3,t4,t5,t6);
- }
- }
- }
- }
- }
- }
-}
-
-#
diff --git a/omegalib/examples/old_test/lefur04 b/omegalib/examples/old_test/lefur04
deleted file mode 100644
index 4a9e0c4..0000000
--- a/omegalib/examples/old_test/lefur04
+++ /dev/null
@@ -1,19 +0,0 @@
-# From Fabien Coelho
-
-R := { [i, j, k, l, m, n, o, p] :
- 0 <= i <= 3 &&
- 0 <= j <= 3 &&
- 0 <= k <= 3 &&
- 0 <= l <= 3 &&
- 0 <= m <= 3 &&
- 0 <= n <= 3 &&
- 1 <= o <= 1000 && o <= p <= 2 o +1 &&
- 0 <= -1000 i + o + p <= 999 &&
- 0 <= -1000 j - o + 2p <= 999 &&
- -1 <= -1000 k + 3 o <= 998 &&
- 2 <= -1000 l + 2 o + p <= 1001 &&
- 0 <= -1000 m + o <= 999 &&
- 3 <= -1000 n + 2 p<= 1002
-} ;
-
-codegen R;
diff --git a/omegalib/examples/old_test/lefur04.oc-rt b/omegalib/examples/old_test/lefur04.oc-rt
deleted file mode 100644
index b449d8c..0000000
--- a/omegalib/examples/old_test/lefur04.oc-rt
+++ /dev/null
@@ -1,42 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# # From Fabien Coelho
-#
-# R := { [i, j, k, l, m, n, o, p] :
-# 0 <= i <= 3 &&
-# 0 <= j <= 3 &&
-# 0 <= k <= 3 &&
-# 0 <= l <= 3 &&
-# 0 <= m <= 3 &&
-# 0 <= n <= 3 &&
-# 1 <= o <= 1000 && o <= p <= 2 o +1 &&
-# 0 <= -1000 i + o + p <= 999 &&
-# 0 <= -1000 j - o + 2p <= 999 &&
-# -1 <= -1000 k + 3 o <= 998 &&
-# 2 <= -1000 l + 2 o + p <= 1001 &&
-# 0 <= -1000 m + o <= 999 &&
-# 3 <= -1000 n + 2 p<= 1002
-# } ;
-#
-#
-# codegen R;
-for(t1 = 0; t1 <= 3; t1++) {
- for(t2 = max(2*t1-3,0); t2 <= min(intDiv(3*t1+2,2),3); t2++) {
- for(t3 = t1; t3 <= min(-t2+2*t1+1,intDiv(3*t1+2,2),3); t3++) {
- for(t4 = max(intDiv(2*t3-2+2,3),intDiv(-t2+5*t1-4+2,3),intDiv(3*t2+5*t3-6+5,6),intDiv(4*t2-3+2,3)); t4 <= min(intDiv(t2+5,2),intDiv(4*t3+3,3),intDiv(-t2+5*t1+4,3),3); t4++) {
- for(t5 = max(intDiv(t2-2+2,3),intDiv(t3-2+2,3)); t5 <= intDiv(t3,3); t5++) {
- for(t6 = max(intDiv(6*t4-4*t3-6+2,3),intDiv(2*t3-3+2,3),2*t4-4,intDiv(4*t2-3+2,3),intDiv(t3+3*t2-3+2,3),0); t6 <= min(intDiv(6*t4-4*t3+5,3),t2+1,t4); t6++) {
- if (t4 >= t1-1) {
- for(t7 = max(intDiv(2000*t1-1000*t2-999+2,3),1000*t1-500*t6-501,250*t4+1,400*t4-200*t2-199,intDiv(1000*t3-1+2,3),intDiv(1000*t2-2+2,3)); t7 <= min(1000*t1-500*t6+997,intDiv(1000*t4+1001,3),400*t4-200*t2+400,500*t1+499,500*t6+501,intDiv(1000*t3+998,3),1000); t7++) {
- for(t8 = max(1000*t1-t7,500*t6+2,1000*t4-2*t7+2,t7,intDiv(t7+1000*t2+1,2)); t8 <= min(1000*t1-t7+999,500*t6+501,1000*t4-2*t7+1001,2*t7+1,intDiv(t7+1000*t2+999,2)); t8++) {
- s1(t1,t2,t3,t4,t5,t6,t7,t8);
- }
- }
- }
- }
- }
- }
- }
- }
-}
-
-#
diff --git a/omegalib/examples/old_test/lefur05 b/omegalib/examples/old_test/lefur05
deleted file mode 100644
index 436ac54..0000000
--- a/omegalib/examples/old_test/lefur05
+++ /dev/null
@@ -1,49 +0,0 @@
-# From Fabien Coelho
-
-R := { [i, j, k, l, m, n, o, p] :
- 0 <= i <= 3 &&
- 0 <= j <= 3 &&
- 0 <= k <= 3 &&
- 0 <= l <= 3 &&
- 0 <= m <= 3 &&
- 0 <= n <= 3 &&
- 1 <= o <= 1000 && o <= p <= 2 o +1 &&
- 0 <= -1000 i + o + p <= 999 &&
- 0 <= -1000 j - o + 2p <= 999 &&
- -1 <= -1000 k + 3 o <= 998 &&
- 2 <= -1000 l + 2 o + p <= 1001 &&
- 0 <= -1000 m + o <= 999 &&
- 3 <= -1000 n + 2 p<= 1002
-} ;
-
-R;
-
-R7 := { [i, j, k, l, m, n, o, p]
- -> [i, j, k, l, m, n, o ]}(R);
-R7;
-approximate R7;
-R6 := { [i, j, k, l, m, n, o]
- -> [i, j, k, l, m, n ]}(R7);
-R6;
-approximate R6;
-R5 := { [i, j, k, l, m, n]
- -> [i, j, k, l, m ]}(R6);
-R5;
-approximate R5;
-R4 := { [i, j, k, l, m]
- -> [i, j, k, l ]}(R5);
-R4;
-approximate R4;
-R3 := { [i, j, k, l]
- -> [i, j, k ]}(R4);
-R3;
-approximate R3;
-R2 := { [i, j, k]
- -> [i, j ]}(R3);
-R2;
-approximate R2;
-R1 := { [i, j]
- -> [i]}(R2);
-R1;
-approximate R1;
-
diff --git a/omegalib/examples/old_test/lefur05.oc-rt b/omegalib/examples/old_test/lefur05.oc-rt
deleted file mode 100644
index 6d5e45e..0000000
--- a/omegalib/examples/old_test/lefur05.oc-rt
+++ /dev/null
@@ -1,118 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# # From Fabien Coelho
-#
-# R := { [i, j, k, l, m, n, o, p] :
-# 0 <= i <= 3 &&
-# 0 <= j <= 3 &&
-# 0 <= k <= 3 &&
-# 0 <= l <= 3 &&
-# 0 <= m <= 3 &&
-# 0 <= n <= 3 &&
-# 1 <= o <= 1000 && o <= p <= 2 o +1 &&
-# 0 <= -1000 i + o + p <= 999 &&
-# 0 <= -1000 j - o + 2p <= 999 &&
-# -1 <= -1000 k + 3 o <= 998 &&
-# 2 <= -1000 l + 2 o + p <= 1001 &&
-# 0 <= -1000 m + o <= 999 &&
-# 3 <= -1000 n + 2 p<= 1002
-# } ;
-#
-#
-# R;
-
-{[i,j,k,l,m,n,o,p]: 1000m <= o <= p <= 500n+501, 2o+1 && o <= 1000m+999, 1000 && 1000i <= o+p && o+p <= 999+1000i && 1000j+o <= 2p && 2p <= 999+1000j+o && 1000k <= 1+3o && 3o <= 998+1000k && 2+500n <= p && 0 <= n && 2+1000l <= 2o+p && 2o+p <= 1001+1000l}
-
-#
-#
-# R7 := { [i, j, k, l, m, n, o, p]
-# -> [i, j, k, l, m, n, o ]}(R);
-#
-# R7;
-
-{[i,j,k,l,m,n,o]: 1000m, 250n+1 <= o <= 1000m+999, 1000, 500n+501, 1000j+999, 500i+499 && 200j+o <= 400+400l && 1000j+o <= 1002+1000n && 1000i <= 1+3o && 1000j+3o <= 1998+2000i && 1000k <= 1+3o && 3o <= 998+1000k && 1000j <= 2+3o && 2000i <= 999+1000j+3o && 0 <= n && 1000i <= 501+500n+o && 250n+o <= 499+500l && 1000n <= 995+1000j+o && 500n+o <= 997+1000i && 3o <= 1001+1000l && 500l <= 249+250n+o && 400l <= 199+200j+o && 1000l <= 997+1000i+o}
-
-#
-# approximate R7;
-
-{[i,j,k,l,m,n,o]: 1000m, 250n+1 <= o <= 1000m+999, 1000, 500n+501, 1000j+999, 500i+499 && 200j+o <= 400+400l && 1000j+o <= 1002+1000n && 1000i <= 1+3o && 1000j+3o <= 1998+2000i && 1000k <= 1+3o && 3o <= 998+1000k && 1000j <= 2+3o && 2000i <= 999+1000j+3o && 0 <= n && 1000i <= 501+500n+o && 250n+o <= 499+500l && 1000n <= 995+1000j+o && 500n+o <= 997+1000i && 3o <= 1001+1000l && 500l <= 249+250n+o && 400l <= 199+200j+o && 1000l <= 997+1000i+o}
-
-#
-# R6 := { [i, j, k, l, m, n, o]
-# -> [i, j, k, l, m, n ]}(R7);
-#
-# R6;
-
-{[i,j,k,l,m,n]: Exists ( alpha : 0, 2l-4 <= n <= 3, j+1, l, 2j+1 && 3m <= k <= 3, 3m+2 && 2i-3 <= j <= 3m+2 && 2k <= 2+3i && 1000i <= 1+3alpha && 1000j+3alpha <= 1998+2000i && 4j <= 3+3n && 1000k <= 1+3alpha && 3alpha <= 998+1000k && 1000j <= 2+3alpha && 2000i <= 999+1000j+3alpha && 4k+3n <= 5+6l && 6i <= 5+2l+3n && 3alpha <= 1001+1000l && 3j+5k <= 6+6l && 4l <= 7+2j+5n && 2l <= 2+3i && 2k <= 3+3n)}
-
-#
-# approximate R6;
-
-{[i,j,k,l,m,n]: 2l-4, 0 <= n <= 3, j+1, l, 2j+1 && 3m, i <= k <= 3m+2, 3 && 2i-3 <= j <= 3m+2 && 2k <= 2+3i && j+k <= 1+2i && 4j <= 3+3n && 2l <= 2+3i && 2k <= 3+3n && 4l <= 7+2j+5n && 4k+3n <= 5+6l && 6i <= 5+2l+3n && 3j+5k <= 6+6l}
-
-#
-# R5 := { [i, j, k, l, m, n]
-# -> [i, j, k, l, m ]}(R6);
-#
-# R5;
-
-{[i,j,k,l,m]: Exists ( alpha,beta : 2i-3, 0 <= j <= 3m+2 && 3m <= k <= 3, 3m+2 && l <= 3 && 2k <= 2+3i && 2k <= 3+3alpha && 1000i <= 1+3beta && 1000j+3beta <= 1998+2000i && 4j <= 3+3alpha && 1000k <= 1+3beta && 3beta <= 998+1000k && 1000j <= 2+3beta && 2000i <= 999+1000j+3beta && 4k+3alpha <= 5+6l && 6i <= 5+2l+3alpha && 6i <= 5+5l && 3beta <= 1001+1000l && 4j <= 3+3l && 2k <= 2+3l && 3j+5k <= 6+6l && 4l <= 7+2j+5alpha && 2l <= 2+3i)}
-
-#
-# approximate R5;
-
-{[i,j,k,l,m]: i, 3m <= k <= 3m+2, 3 && 0, 2i-3 <= j <= 3m+2 && l <= 3 && 2k <= 2+3i && 2l <= 2+3i && 2k <= 2+3l && j+k <= 1+2i && 3j+5k <= 6+6l && 6i <= 5+5l && 4j <= 3+3l}
-
-#
-# R4 := { [i, j, k, l, m]
-# -> [i, j, k, l ]}(R5);
-#
-# R4;
-
-{[i,j,k,l]: Exists ( alpha,beta,gamma : 2i-3, 0 <= j <= 3alpha+2 && 3alpha <= k <= 3, 3alpha+2 && l <= 3 && 2k <= 2+3i && 2k <= 3+3beta && 1000i <= 1+3gamma && 1000j+3gamma <= 1998+2000i && 4j <= 3+3beta && 1000k <= 1+3gamma && 3gamma <= 998+1000k && 1000j <= 2+3gamma && 2000i <= 999+1000j+3gamma && 4k+3beta <= 5+6l && 6i <= 5+2l+3beta && 6i <= 5+5l && 3gamma <= 1001+1000l && 4j <= 3+3l && 2k <= 2+3l && 3j+5k <= 6+6l && 4l <= 7+2j+5beta && 2l <= 2+3i)}
-
-#
-# approximate R4;
-
-{[i,j,k,l]: i <= k <= 3 && l <= 3 && 2k <= 2+3i && 2l <= 2+3i && 6i <= 5+5l && j+k <= 1+2i && 3j+5k <= 6+6l && 4j <= 3+3l && 2i <= 3+j && 2k <= 2+3l && 0 <= j}
-
-#
-# R3 := { [i, j, k, l]
-# -> [i, j, k ]}(R4);
-#
-# R3;
-
-{[i,j,k]: Exists ( alpha,beta,gamma,delta : 2i-3, 0 <= j <= 3beta+2 && 3beta <= k <= 3, 3beta+2 && alpha <= 3 && 2k <= 2+3i && 2k <= 3+3gamma && 1000i <= 1+3delta && 1000j+3delta <= 1998+2000i && 4j <= 3+3gamma && 1000k <= 1+3delta && 3delta <= 998+1000k && 1000j <= 2+3delta && 2000i <= 999+1000j+3delta && 4k+3gamma <= 5+6alpha && 6i <= 5+2alpha+3gamma && 6i <= 5+5alpha && 3delta <= 1001+1000alpha && 4j <= 3+3alpha && 2k <= 2+3alpha && 3j+5k <= 6+6alpha && 4alpha <= 7+2j+5gamma && 2alpha <= 2+3i)}
-
-#
-# approximate R3;
-
-{[i,j,k]: 0, 2i-3 <= j <= 3 && i <= k <= 3 && 2k <= 2+3i && j+k <= 1+2i}
-
-#
-# R2 := { [i, j, k]
-# -> [i, j ]}(R3);
-#
-# R2;
-
-{[i,j]: Exists ( alpha,beta,gamma,delta,tau : 2i-3, 0 <= j <= 3tau+2 && 3tau <= alpha <= 3, 3tau+2 && delta <= 3 && 2alpha <= 2+3i && 2alpha <= 3+3beta && 1000i <= 1+3gamma && 1000j+3gamma <= 1998+2000i && 4j <= 3+3beta && 1000alpha <= 1+3gamma && 3gamma <= 998+1000alpha && 1000j <= 2+3gamma && 2000i <= 999+1000j+3gamma && 4alpha+3beta <= 5+6delta && 6i <= 5+3beta+2delta && 6i <= 5+5delta && 3gamma <= 1001+1000delta && 4j <= 3+3delta && 2alpha <= 2+3delta && 3j+5alpha <= 6+6delta && 4delta <= 7+2j+5beta && 2delta <= 2+3i)}
-
-#
-# approximate R2;
-
-{[i,j]: 0, 2i-3 <= j <= i+1, 3}
-
-#
-# R1 := { [i, j]
-# -> [i]}(R2);
-#
-# R1;
-
-{[i]: Exists ( alpha,beta,gamma,delta,tau,sigma : 2i-3, 0 <= alpha <= 3beta+2 && 3beta <= gamma <= 3, 3beta+2 && sigma <= 3 && 2gamma <= 2+3i && 2gamma <= 3+3delta && 1000i <= 1+3tau && 1000alpha+3tau <= 1998+2000i && 4alpha <= 3+3delta && 1000gamma <= 1+3tau && 3tau <= 998+1000gamma && 1000alpha <= 2+3tau && 2000i <= 999+1000alpha+3tau && 4gamma+3delta <= 5+6sigma && 6i <= 5+3delta+2sigma && 6i <= 5+5sigma && 3tau <= 1001+1000sigma && 4alpha <= 3+3sigma && 2gamma <= 2+3sigma && 3alpha+5gamma <= 6+6sigma && 4sigma <= 7+2alpha+5delta && 2sigma <= 2+3i)}
-
-#
-# approximate R1;
-
-{[i]: -1 <= i <= 3}
-
-#
-#
diff --git a/omegalib/examples/old_test/lift1 b/omegalib/examples/old_test/lift1
deleted file mode 100644
index fb3ada1..0000000
--- a/omegalib/examples/old_test/lift1
+++ /dev/null
@@ -1,16 +0,0 @@
-I1 := { [i,j,k,l,m] : 1 <= i <= 60 && 1 <= j,k,l,m <= 100 };
-I2 := { [i,j,k,l,m] : 1 <= i,j,k,l,m <= 100 };
-
-codegen 0 I1,I2;
-
-#default
-codegen 1 I1,I2;
-
-codegen 2 I1,I2;
-
-codegen 3 I1,I2;
-
-codegen 4 I1,I2;
-
-codegen 5 I1,I2;
-
diff --git a/omegalib/examples/old_test/lift1.oc-rt b/omegalib/examples/old_test/lift1.oc-rt
deleted file mode 100644
index 683ac07..0000000
--- a/omegalib/examples/old_test/lift1.oc-rt
+++ /dev/null
@@ -1,147 +0,0 @@
->>> I1 := { [i,j,k,l,m] : 1 <= i <= 60 && 1 <= j,k,l,m <= 100 };
->>> I2 := { [i,j,k,l,m] : 1 <= i,j,k,l,m <= 100 };
->>>
->>> codegen 0 I1,I2;
-for(t1 = 1; t1 <= 100; t1++) {
- for(t2 = 1; t2 <= 100; t2++) {
- for(t3 = 1; t3 <= 100; t3++) {
- for(t4 = 1; t4 <= 100; t4++) {
- for(t5 = 1; t5 <= 100; t5++) {
- s2(t1,t2,t3,t4,t5);
- if (t1 <= 60) {
- s1(t1,t2,t3,t4,t5);
- }
- }
- }
- }
- }
-}
-
->>>
->>> #default
->>> codegen 1 I1,I2;
-for(t1 = 1; t1 <= 100; t1++) {
- for(t2 = 1; t2 <= 100; t2++) {
- for(t3 = 1; t3 <= 100; t3++) {
- for(t4 = 1; t4 <= 100; t4++) {
- if (t1 <= 60) {
- for(t5 = 1; t5 <= 100; t5++) {
- s1(t1,t2,t3,t4,t5);
- s2(t1,t2,t3,t4,t5);
- }
- }
- if (t1 >= 61) {
- for(t5 = 1; t5 <= 100; t5++) {
- s2(t1,t2,t3,t4,t5);
- }
- }
- }
- }
- }
-}
-
->>>
->>> codegen 2 I1,I2;
-for(t1 = 1; t1 <= 100; t1++) {
- for(t2 = 1; t2 <= 100; t2++) {
- for(t3 = 1; t3 <= 100; t3++) {
- if (t1 <= 60) {
- for(t4 = 1; t4 <= 100; t4++) {
- for(t5 = 1; t5 <= 100; t5++) {
- s1(t1,t2,t3,t4,t5);
- s2(t1,t2,t3,t4,t5);
- }
- }
- }
- if (t1 >= 61) {
- for(t4 = 1; t4 <= 100; t4++) {
- for(t5 = 1; t5 <= 100; t5++) {
- s2(t1,t2,t3,t4,t5);
- }
- }
- }
- }
- }
-}
-
->>>
->>> codegen 3 I1,I2;
-for(t1 = 1; t1 <= 100; t1++) {
- for(t2 = 1; t2 <= 100; t2++) {
- if (t1 <= 60) {
- for(t3 = 1; t3 <= 100; t3++) {
- for(t4 = 1; t4 <= 100; t4++) {
- for(t5 = 1; t5 <= 100; t5++) {
- s1(t1,t2,t3,t4,t5);
- s2(t1,t2,t3,t4,t5);
- }
- }
- }
- }
- if (t1 >= 61) {
- for(t3 = 1; t3 <= 100; t3++) {
- for(t4 = 1; t4 <= 100; t4++) {
- for(t5 = 1; t5 <= 100; t5++) {
- s2(t1,t2,t3,t4,t5);
- }
- }
- }
- }
- }
-}
-
->>>
->>> codegen 4 I1,I2;
-for(t1 = 1; t1 <= 100; t1++) {
- if (t1 <= 60) {
- for(t2 = 1; t2 <= 100; t2++) {
- for(t3 = 1; t3 <= 100; t3++) {
- for(t4 = 1; t4 <= 100; t4++) {
- for(t5 = 1; t5 <= 100; t5++) {
- s1(t1,t2,t3,t4,t5);
- s2(t1,t2,t3,t4,t5);
- }
- }
- }
- }
- }
- if (t1 >= 61) {
- for(t2 = 1; t2 <= 100; t2++) {
- for(t3 = 1; t3 <= 100; t3++) {
- for(t4 = 1; t4 <= 100; t4++) {
- for(t5 = 1; t5 <= 100; t5++) {
- s2(t1,t2,t3,t4,t5);
- }
- }
- }
- }
- }
-}
-
->>>
->>> codegen 5 I1,I2;
-for(t1 = 1; t1 <= 60; t1++) {
- for(t2 = 1; t2 <= 100; t2++) {
- for(t3 = 1; t3 <= 100; t3++) {
- for(t4 = 1; t4 <= 100; t4++) {
- for(t5 = 1; t5 <= 100; t5++) {
- s1(t1,t2,t3,t4,t5);
- s2(t1,t2,t3,t4,t5);
- }
- }
- }
- }
-}
-for(t1 = 61; t1 <= 100; t1++) {
- for(t2 = 1; t2 <= 100; t2++) {
- for(t3 = 1; t3 <= 100; t3++) {
- for(t4 = 1; t4 <= 100; t4++) {
- for(t5 = 1; t5 <= 100; t5++) {
- s2(t1,t2,t3,t4,t5);
- }
- }
- }
- }
-}
-
-
diff --git a/omegalib/examples/old_test/lift2 b/omegalib/examples/old_test/lift2
deleted file mode 100644
index fada83e..0000000
--- a/omegalib/examples/old_test/lift2
+++ /dev/null
@@ -1,16 +0,0 @@
-I1 := { [i,j,k,l,m] : 5 <= i <= 60 && 1 <= j,k,l,m <= 100 };
-I2 := { [i,j,k,l,m] : 1 <= i,j,k,l,m <= 100 };
-
-codegen 0 I1,I2;
-
-#default
-codegen 1 I1,I2;
-
-codegen 2 I1,I2;
-
-codegen 3 I1,I2;
-
-codegen 4 I1,I2;
-
-codegen 5 I1,I2;
-
diff --git a/omegalib/examples/old_test/lift2.oc-rt b/omegalib/examples/old_test/lift2.oc-rt
deleted file mode 100644
index 41e1fa8..0000000
--- a/omegalib/examples/old_test/lift2.oc-rt
+++ /dev/null
@@ -1,190 +0,0 @@
->>> I1 := { [i,j,k,l,m] : 5 <= i <= 60 && 1 <= j,k,l,m <= 100 };
->>> I2 := { [i,j,k,l,m] : 1 <= i,j,k,l,m <= 100 };
->>>
->>> codegen 0 I1,I2;
-for(t1 = 1; t1 <= 100; t1++) {
- for(t2 = 1; t2 <= 100; t2++) {
- for(t3 = 1; t3 <= 100; t3++) {
- for(t4 = 1; t4 <= 100; t4++) {
- for(t5 = 1; t5 <= 100; t5++) {
- s2(t1,t2,t3,t4,t5);
- if (t1 >= 5 && t1 <= 60) {
- s1(t1,t2,t3,t4,t5);
- }
- }
- }
- }
- }
-}
-
->>>
->>> #default
->>> codegen 1 I1,I2;
-for(t1 = 1; t1 <= 100; t1++) {
- for(t2 = 1; t2 <= 100; t2++) {
- for(t3 = 1; t3 <= 100; t3++) {
- for(t4 = 1; t4 <= 100; t4++) {
- if (t1 <= 4) {
- for(t5 = 1; t5 <= 100; t5++) {
- s2(t1,t2,t3,t4,t5);
- }
- }
- if (t1 >= 5 && t1 <= 60) {
- for(t5 = 1; t5 <= 100; t5++) {
- s1(t1,t2,t3,t4,t5);
- s2(t1,t2,t3,t4,t5);
- }
- }
- if (t1 >= 61) {
- for(t5 = 1; t5 <= 100; t5++) {
- s2(t1,t2,t3,t4,t5);
- }
- }
- }
- }
- }
-}
-
->>>
->>> codegen 2 I1,I2;
-for(t1 = 1; t1 <= 100; t1++) {
- for(t2 = 1; t2 <= 100; t2++) {
- for(t3 = 1; t3 <= 100; t3++) {
- if (t1 <= 4) {
- for(t4 = 1; t4 <= 100; t4++) {
- for(t5 = 1; t5 <= 100; t5++) {
- s2(t1,t2,t3,t4,t5);
- }
- }
- }
- if (t1 >= 5 && t1 <= 60) {
- for(t4 = 1; t4 <= 100; t4++) {
- for(t5 = 1; t5 <= 100; t5++) {
- s1(t1,t2,t3,t4,t5);
- s2(t1,t2,t3,t4,t5);
- }
- }
- }
- if (t1 >= 61) {
- for(t4 = 1; t4 <= 100; t4++) {
- for(t5 = 1; t5 <= 100; t5++) {
- s2(t1,t2,t3,t4,t5);
- }
- }
- }
- }
- }
-}
-
->>>
->>> codegen 3 I1,I2;
-for(t1 = 1; t1 <= 100; t1++) {
- for(t2 = 1; t2 <= 100; t2++) {
- if (t1 <= 4) {
- for(t3 = 1; t3 <= 100; t3++) {
- for(t4 = 1; t4 <= 100; t4++) {
- for(t5 = 1; t5 <= 100; t5++) {
- s2(t1,t2,t3,t4,t5);
- }
- }
- }
- }
- if (t1 >= 5 && t1 <= 60) {
- for(t3 = 1; t3 <= 100; t3++) {
- for(t4 = 1; t4 <= 100; t4++) {
- for(t5 = 1; t5 <= 100; t5++) {
- s1(t1,t2,t3,t4,t5);
- s2(t1,t2,t3,t4,t5);
- }
- }
- }
- }
- if (t1 >= 61) {
- for(t3 = 1; t3 <= 100; t3++) {
- for(t4 = 1; t4 <= 100; t4++) {
- for(t5 = 1; t5 <= 100; t5++) {
- s2(t1,t2,t3,t4,t5);
- }
- }
- }
- }
- }
-}
-
->>>
->>> codegen 4 I1,I2;
-for(t1 = 1; t1 <= 100; t1++) {
- if (t1 <= 4) {
- for(t2 = 1; t2 <= 100; t2++) {
- for(t3 = 1; t3 <= 100; t3++) {
- for(t4 = 1; t4 <= 100; t4++) {
- for(t5 = 1; t5 <= 100; t5++) {
- s2(t1,t2,t3,t4,t5);
- }
- }
- }
- }
- }
- if (t1 >= 5 && t1 <= 60) {
- for(t2 = 1; t2 <= 100; t2++) {
- for(t3 = 1; t3 <= 100; t3++) {
- for(t4 = 1; t4 <= 100; t4++) {
- for(t5 = 1; t5 <= 100; t5++) {
- s1(t1,t2,t3,t4,t5);
- s2(t1,t2,t3,t4,t5);
- }
- }
- }
- }
- }
- if (t1 >= 61) {
- for(t2 = 1; t2 <= 100; t2++) {
- for(t3 = 1; t3 <= 100; t3++) {
- for(t4 = 1; t4 <= 100; t4++) {
- for(t5 = 1; t5 <= 100; t5++) {
- s2(t1,t2,t3,t4,t5);
- }
- }
- }
- }
- }
-}
-
->>>
->>> codegen 5 I1,I2;
-for(t1 = 1; t1 <= 4; t1++) {
- for(t2 = 1; t2 <= 100; t2++) {
- for(t3 = 1; t3 <= 100; t3++) {
- for(t4 = 1; t4 <= 100; t4++) {
- for(t5 = 1; t5 <= 100; t5++) {
- s2(t1,t2,t3,t4,t5);
- }
- }
- }
- }
-}
-for(t1 = 5; t1 <= 60; t1++) {
- for(t2 = 1; t2 <= 100; t2++) {
- for(t3 = 1; t3 <= 100; t3++) {
- for(t4 = 1; t4 <= 100; t4++) {
- for(t5 = 1; t5 <= 100; t5++) {
- s1(t1,t2,t3,t4,t5);
- s2(t1,t2,t3,t4,t5);
- }
- }
- }
- }
-}
-for(t1 = 61; t1 <= 100; t1++) {
- for(t2 = 1; t2 <= 100; t2++) {
- for(t3 = 1; t3 <= 100; t3++) {
- for(t4 = 1; t4 <= 100; t4++) {
- for(t5 = 1; t5 <= 100; t5++) {
- s2(t1,t2,t3,t4,t5);
- }
- }
- }
- }
-}
-
-
diff --git a/omegalib/examples/old_test/long_input b/omegalib/examples/old_test/long_input
deleted file mode 100644
index 6112756..0000000
--- a/omegalib/examples/old_test/long_input
+++ /dev/null
@@ -1,2 +0,0 @@
-{ [i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,a,b,c] -> [j] : 1 <= i < j <= 20 };
-{ [j] -> [i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v] : 1 <= i < j <= 20 };
diff --git a/omegalib/examples/old_test/long_input.oc-rt b/omegalib/examples/old_test/long_input.oc-rt
deleted file mode 100644
index 281d321..0000000
--- a/omegalib/examples/old_test/long_input.oc-rt
+++ /dev/null
@@ -1,11 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# { [i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,a,b,c] -> [j] : 1 <= i < j <= 20 };
-
-{[i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,a,b,c] -> [j] : 1 <= i < j <= 20}
-
-#
-# { [j] -> [i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v] : 1 <= i < j <= 20 };
-
-{[j] -> [i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v] : 1 <= i < j <= 20}
-
-#
diff --git a/omegalib/examples/old_test/lu_ijk b/omegalib/examples/old_test/lu_ijk
deleted file mode 100644
index 5f60bfa..0000000
--- a/omegalib/examples/old_test/lu_ijk
+++ /dev/null
@@ -1,17 +0,0 @@
-symbolic n,lb,ub;
-I5 := {[k,j] : 1 <= k < j <= n};
-I7 := {[k,j,i] : 1 <= k < j,i <= n};
-T5 := {[k,j] -> [k,j,1,0]};
-T7 := {[k,j,i] -> [i,j,0,k]};
-D57 := {[k,j] -> [k,j,i] : 1 <= k < j,i <= n};
-D75 := {[k,j,k+1] -> [k+1,j] : 1 <= k <= j-2 && j <= n} union
- {[k,k+1,k+1] -> [k+1,j'] : 1 <= k <= j'-2 && j' <= n};
-D77 := {[k,j,i] -> [k+1,j,i] : 1 <= k <= i-2, j-2 && j <= n && i <= n}
- union
- {[k,k+1,i] -> [k+1,j',i] : 1 <= k <= i-2, j'-2 && j' <= n && i <= n};
-difference ( (inverse T5) join D57 join T7 );
-difference ( (inverse T7) join D75 join T5 );
-difference ( (inverse T7) join D77 join T7 );
-codegen T5:I5,T7:I7;
-codegen 2 T5:I5,T7:I7;
-codegen 3 T5:I5,T7:I7;
diff --git a/omegalib/examples/old_test/lu_ijk.oc-rt b/omegalib/examples/old_test/lu_ijk.oc-rt
deleted file mode 100644
index d067dff..0000000
--- a/omegalib/examples/old_test/lu_ijk.oc-rt
+++ /dev/null
@@ -1,81 +0,0 @@
->>> symbolic n,lb,ub;
->>> I5 := {[k,j] : 1 <= k < j <= n};
->>> I7 := {[k,j,i] : 1 <= k < j,i <= n};
->>> T5 := {[k,j] -> [k,j,1,0]};
->>> T7 := {[k,j,i] -> [i,j,0,k]};
->>> D57 := {[k,j] -> [k,j,i] : 1 <= k < j,i <= n};
->>> D75 := {[k,j,k+1] -> [k+1,j] : 1 <= k <= j-2 && j <= n} union
->>> {[k,k+1,k+1] -> [k+1,j'] : 1 <= k <= j'-2 && j' <= n};
->>> D77 := {[k,j,i] -> [k+1,j,i] : 1 <= k <= i-2, j-2 && j <= n && i <= n}
->>> union
->>> {[k,k+1,i] -> [k+1,j',i] : 1 <= k <= i-2, j'-2 && j' <= n && i <= n};
->>> difference ( (inverse T5) join D57 join T7 );
-{[In_1,0,-1,In_4]: 1 <= In_4 && In_1+In_4 <= n && 1 <= In_1}
->>> difference ( (inverse T7) join D75 join T5 );
-{[0,0,1,In_4]: -n+2 <= In_4 <= -1} union
- {[0,In_2,1,In_4]: In_4 <= -1 && 1 <= In_2 && In_2 < n+In_4}
->>> difference ( (inverse T7) join D77 join T7 );
-{[0,0,0,1]: 3 <= n} union
- {[0,In_2,0,1]: 1 <= In_2 <= n-2}
->>> codegen T5:I5,T7:I7;
-if (n >= 2) {
- for(t1 = 1; t1 <= n; t1++) {
- for(t2 = 2; t2 <= n; t2++) {
- for(t4 = 1; t4 <= min(t2-1,t1-1); t4++) {
- s2(t4,t2,t1);
- }
- if (t1 <= t2-1) {
- s1(t1,t2);
- }
- }
- }
-}
-
->>> codegen 2 T5:I5,T7:I7;
-if (n >= 2) {
- for(t1 = 1; t1 <= n; t1++) {
- if (t1 <= 1) {
- for(t2 = 2; t2 <= n; t2++) {
- s1(1,t2);
- }
- }
- for(t2 = 2; t2 <= t1; t2++) {
- for(t4 = 1; t4 <= t2-1; t4++) {
- s2(t4,t2,t1);
- }
- }
- if (t1 >= 2) {
- for(t2 = t1+1; t2 <= n; t2++) {
- for(t4 = 1; t4 <= t1-1; t4++) {
- s2(t4,t2,t1);
- }
- s1(t1,t2);
- }
- }
- }
-}
-
->>> codegen 3 T5:I5,T7:I7;
-for(t2 = 2; t2 <= n; t2++) {
- s1(1,t2);
-}
-for(t1 = 2; t1 <= n-1; t1++) {
- for(t2 = 2; t2 <= t1; t2++) {
- for(t4 = 1; t4 <= t2-1; t4++) {
- s2(t4,t2,t1);
- }
- }
- for(t2 = t1+1; t2 <= n; t2++) {
- for(t4 = 1; t4 <= t1-1; t4++) {
- s2(t4,t2,t1);
- }
- s1(t1,t2);
- }
-}
-for(t2 = 2; t2 <= n; t2++) {
- for(t4 = 1; t4 <= t2-1; t4++) {
- s2(t4,t2,n);
- }
-}
-
-
diff --git a/omegalib/examples/old_test/lu_spmd b/omegalib/examples/old_test/lu_spmd
deleted file mode 100644
index 6587ef0..0000000
--- a/omegalib/examples/old_test/lu_spmd
+++ /dev/null
@@ -1,19 +0,0 @@
-symbolic n,lb,ub;
-I1 := {[k,i] : 1 <= k < i <= n && lb <= k <= ub};
-I2 := {[k,i,j] : 1 <= k <= i,j <= n && lb <= j <= ub};
-p := {[k,i] : 1, lb <= k <= ub < n && k < i <= n};
-w := {[k,i,j,k,i] : 1 <= k <= i,j <= n && k < lb = j <= ub};
-
-T1 := {[k,i] -> [k,i,0,0,0,0,0,0]};
-T2 := {[k,i,j] -> [k,i,1,j,0,0,0,0]};
-Tp := {[k,i] -> [k,i,0,0,1,0,0,0]};
-Tw := {[k,i,j,t1,t2] -> [k,i,1,j,-1,t1,t2,0]};
-
-known := {[*,*,*,*,*,*,*,*] : 1 <= lb && ub <= n};
-known2 := {[*,*,*,*,*,*,*,*] : 1 <= lb <= ub <= n};
-
-codegen 0 T1:I1,T2:I2,Tp:p,Tw:w given known;
-codegen 1 T1:I1,T2:I2,Tp:p,Tw:w given known;
-# codegen 2 T1:I1,T2:I2,Tp:p,Tw:w given known;
-# codegen 1 T1:I1,T2:I2,Tp:p,Tw:w given known2;
-# codegen 2 T1:I1,T2:I2,Tp:p,Tw:w given known2;
diff --git a/omegalib/examples/old_test/lu_spmd.oc-rt b/omegalib/examples/old_test/lu_spmd.oc-rt
deleted file mode 100644
index f221d8e..0000000
--- a/omegalib/examples/old_test/lu_spmd.oc-rt
+++ /dev/null
@@ -1,58 +0,0 @@
->>> symbolic n,lb,ub;
->>> I1 := {[k,i] : 1 <= k < i <= n && lb <= k <= ub};
->>> I2 := {[k,i,j] : 1 <= k <= i,j <= n && lb <= j <= ub};
->>> p := {[k,i] : 1, lb <= k <= ub < n && k < i <= n};
->>> w := {[k,i,j,k,i] : 1 <= k <= i,j <= n && k < lb = j <= ub};
->>>
->>> T1 := {[k,i] -> [k,i,0,0,0,0,0,0]};
->>> T2 := {[k,i,j] -> [k,i,1,j,0,0,0,0]};
->>> Tp := {[k,i] -> [k,i,0,0,1,0,0,0]};
->>> Tw := {[k,i,j,t1,t2] -> [k,i,1,j,-1,t1,t2,0]};
->>>
->>> known := {[*,*,*,*,*,*,*,*] : 1 <= lb && ub <= n};
->>> known2 := {[*,*,*,*,*,*,*,*] : 1 <= lb <= ub <= n};
->>>
->>> codegen 0 T1:I1,T2:I2,Tp:p,Tw:w given known;
-if (lb <= ub) {
- for(t1 = 1; t1 <= ub; t1++) {
- for(t2 = t1; t2 <= n; t2++) {
- if (t1 >= lb && t2 >= t1+1) {
- s1(t1,t2);
- }
- if (ub <= n-1 && t2 >= t1+1 && t1 >= lb) {
- s3(t1,t2);
- }
- for(t4 = max(lb,t1); t4 <= ub; t4++) {
- if (t4 >= t1+1 && t4 <= lb) {
- s4(t1,t2,t4,t1,t2);
- }
- s2(t1,t2,t4);
- }
- }
- }
-}
-
->>> codegen 1 T1:I1,T2:I2,Tp:p,Tw:w given known;
-if (lb <= ub) {
- for(t1 = 1; t1 <= ub; t1++) {
- for(t2 = t1; t2 <= n; t2++) {
- if (t1 >= lb && t2 >= t1+1) {
- s1(t1,t2);
- }
- if (ub <= n-1 && t2 >= t1+1 && t1 >= lb) {
- s3(t1,t2);
- }
- for(t4 = max(lb,t1); t4 <= ub; t4++) {
- if (t4 >= t1+1 && t4 <= lb) {
- s4(t1,t2,t4,t1,t2);
- }
- s2(t1,t2,t4);
- }
- }
- }
-}
-
->>> # codegen 2 T1:I1,T2:I2,Tp:p,Tw:w given known;
->>> # codegen 1 T1:I1,T2:I2,Tp:p,Tw:w given known2;
->>> # codegen 2 T1:I1,T2:I2,Tp:p,Tw:w given known2;
-
diff --git a/omegalib/examples/old_test/m1 b/omegalib/examples/old_test/m1
deleted file mode 100644
index 1ff50d1..0000000
--- a/omegalib/examples/old_test/m1
+++ /dev/null
@@ -1,6 +0,0 @@
-T1:={[i,j]->[i,j,0]};
-T2:={[i,j]->[i,j,1]};
-R1:={[1:9,1:9]};
-R2:={[5,1:9]};
-codegen T1:R1,T2:R2;
-codegen 2 T1:R1,T2:R2;
diff --git a/omegalib/examples/old_test/m1.oc-rt b/omegalib/examples/old_test/m1.oc-rt
deleted file mode 100644
index ad2c49c..0000000
--- a/omegalib/examples/old_test/m1.oc-rt
+++ /dev/null
@@ -1,41 +0,0 @@
->>> T1:={[i,j]->[i,j,0]};
->>> T2:={[i,j]->[i,j,1]};
->>> R1:={[1:9,1:9]};
->>> R2:={[5,1:9]};
->>> codegen T1:R1,T2:R2;
-for(t1 = 1; t1 <= 9; t1++) {
- if (t1 <= 4) {
- for(t2 = 1; t2 <= 9; t2++) {
- s1(t1,t2);
- }
- }
- if (t1 == 5) {
- for(t2 = 1; t2 <= 9; t2++) {
- s1(5,t2);
- s2(5,t2);
- }
- }
- if (t1 >= 6) {
- for(t2 = 1; t2 <= 9; t2++) {
- s1(t1,t2);
- }
- }
-}
-
->>> codegen 2 T1:R1,T2:R2;
-for(t1 = 1; t1 <= 4; t1++) {
- for(t2 = 1; t2 <= 9; t2++) {
- s1(t1,t2);
- }
-}
-for(t2 = 1; t2 <= 9; t2++) {
- s1(5,t2);
- s2(5,t2);
-}
-for(t1 = 6; t1 <= 9; t1++) {
- for(t2 = 1; t2 <= 9; t2++) {
- s1(t1,t2);
- }
-}
-
-
diff --git a/omegalib/examples/old_test/m10 b/omegalib/examples/old_test/m10
deleted file mode 100644
index 01fa540..0000000
--- a/omegalib/examples/old_test/m10
+++ /dev/null
@@ -1,5 +0,0 @@
-IS:={[i,j]: 1 <= i,j <= 9};
-T1:={[i,j]->[4j,i,0]};
-T2:={[i,j]->[2j,i,1]};
-codegen T1:IS,T2:IS;
-codegen 2 T1:IS,T2:IS;
diff --git a/omegalib/examples/old_test/m10.oc-rt b/omegalib/examples/old_test/m10.oc-rt
deleted file mode 100644
index c782e1d..0000000
--- a/omegalib/examples/old_test/m10.oc-rt
+++ /dev/null
@@ -1,47 +0,0 @@
->>> IS:={[i,j]: 1 <= i,j <= 9};
->>> T1:={[i,j]->[4j,i,0]};
->>> T2:={[i,j]->[2j,i,1]};
->>> codegen T1:IS,T2:IS;
-for(t1 = 2; t1 <= 36; t1 += 2) {
- if (intMod(t1,4) == 0 && t1 <= 16) {
- for(t2 = 1; t2 <= 9; t2++) {
- s1(t2,intDiv(t1,4));
- s2(t2,intDiv(t1,2));
- }
- }
- if (intMod(t1,4) == 0 && t1 >= 20) {
- for(t2 = 1; t2 <= 9; t2++) {
- s1(t2,intDiv(t1,4));
- }
- }
- if (intMod(t1-2,4) == 0 && t1 <= 18) {
- for(t2 = 1; t2 <= 9; t2++) {
- s2(t2,intDiv(t1,2));
- }
- }
-}
-
->>> codegen 2 T1:IS,T2:IS;
-for(t1 = 2; t1 <= 16; t1 += 2) {
- if (intMod(t1,4) == 0) {
- for(t2 = 1; t2 <= 9; t2++) {
- s1(t2,intDiv(t1,4));
- s2(t2,intDiv(t1,2));
- }
- }
- if (intMod(t1-2,4) == 0) {
- for(t2 = 1; t2 <= 9; t2++) {
- s2(t2,intDiv(t1,2));
- }
- }
-}
-for(t2 = 1; t2 <= 9; t2++) {
- s2(t2,9);
-}
-for(t1 = 20; t1 <= 36; t1 += 4) {
- for(t2 = 1; t2 <= 9; t2++) {
- s1(t2,intDiv(t1,4));
- }
-}
-
-
diff --git a/omegalib/examples/old_test/m11 b/omegalib/examples/old_test/m11
deleted file mode 100644
index 1367ff8..0000000
--- a/omegalib/examples/old_test/m11
+++ /dev/null
@@ -1,10 +0,0 @@
-symbolic m;
-I := {[p1,p2,c2,a1,a2,b1,b2] :
- 1 <= p1 <= 4 && 1 <= p2 <= 2 && 17p1<=16+2m
- && 1<=2c2+p2 <= 6
- && 0 <= 10c2+5p2-a2 <= 4
- && 0 <= 17p1-2a1 <= 16 && a1 <= 30 && a2-m+a1 <= 1
- && 17 <= 2b1-2a1+17p1 <= 18
- && b2 = 5 + a2-5p2-5c2};
-I;
-codegen I;
diff --git a/omegalib/examples/old_test/m11.oc-rt b/omegalib/examples/old_test/m11.oc-rt
deleted file mode 100644
index 4218a2e..0000000
--- a/omegalib/examples/old_test/m11.oc-rt
+++ /dev/null
@@ -1,32 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# symbolic m;
-#
-# I := {[p1,p2,c2,a1,a2,b1,b2] :
-# 1 <= p1 <= 4 && 1 <= p2 <= 2 && 17p1<=16+2m
-# && 1<=2c2+p2 <= 6
-# && 0 <= 10c2+5p2-a2 <= 4
-# && 0 <= 17p1-2a1 <= 16 && a1 <= 30 && a2-m+a1 <= 1
-# && 17 <= 2b1-2a1+17p1 <= 18
-# && b2 = 5 + a2-5p2-5c2};
-#
-# I;
-
-{[p1,p2,c2,a1,a2,b1,a2-5p2-5c2+5]: 1, -2c2+1 <= p2 <= 2, -2c2+6 && a1 <= 30 && 1 <= p1 && 17p1+2b1 <= 18+2a1 && 17+2a1 <= 17p1+2b1 && a2 <= 5p2+10c2 && 5p2+10c2 <= 4+a2 && 2a1 <= 17p1 && 17p1 <= 16+2a1 && a1+a2 <= 1+m}
-
-#
-# codegen I;
-for(t1 = 1; t1 <= min(intDiv(2*m+16,17),4); t1++) {
- for(t2 = 1; t2 <= min(intDiv(2*m-17*t1+26,10),2); t2++) {
- for(t3 = 0; t3 <= min(intDiv(2*m-10*t2-17*t1+26,20),2); t3++) {
- for(t4 = intDiv(17*t1-16+1,2); t4 <= min(intDiv(17*t1,2),m-5*t2-10*t3+5,30); t4++) {
- for(t5 = 5*t2+10*t3-4; t5 <= min(m-t4+1,5*t2+10*t3); t5++) {
- for(t6 = intDiv(-17*t1+2*t4+17+1,2); t6 <= intDiv(-17*t1+2*t4+18,2); t6++) {
- s1(t1,t2,t3,t4,t5,t6,t5+-5*t2+-5*t3+5);
- }
- }
- }
- }
- }
-}
-
-#
diff --git a/omegalib/examples/old_test/m12 b/omegalib/examples/old_test/m12
deleted file mode 100644
index 2f1101f..0000000
--- a/omegalib/examples/old_test/m12
+++ /dev/null
@@ -1,8 +0,0 @@
-symbolic n,m;
-I1 := {[1,1:n,1:m,0]};
-I2 := {[2,1:n,0,0]};
-I3 := {[3,1:m,1,1:n]};
-I4 := {[3,1:m,2,1:n]};
-I5 := {[4,1:m,0,0]};
-codegen I1;
-codegen I1,I1,I2,I2,I3,I3,I4,I4,I5,I5;
diff --git a/omegalib/examples/old_test/m12.oc-rt b/omegalib/examples/old_test/m12.oc-rt
deleted file mode 100644
index ab5953b..0000000
--- a/omegalib/examples/old_test/m12.oc-rt
+++ /dev/null
@@ -1,54 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# symbolic n,m;
-#
-# I1 := {[1,1:n,1:m,0]};
-#
-# I2 := {[2,1:n,0,0]};
-#
-# I3 := {[3,1:m,1,1:n]};
-#
-# I4 := {[3,1:m,2,1:n]};
-#
-# I5 := {[4,1:m,0,0]};
-#
-# codegen I1;
-if (m >= 1) {
- for(t2 = 1; t2 <= n; t2++) {
- for(t3 = 1; t3 <= m; t3++) {
- s1(1,t2,t3,0);
- }
- }
-}
-
-#
-# codegen I1,I1,I2,I2,I3,I3,I4,I4,I5,I5;
-if (m >= 1) {
- for(t2 = 1; t2 <= n; t2++) {
- for(t3 = 1; t3 <= m; t3++) {
- s1(1,t2,t3,0);
- s2(1,t2,t3,0);
- }
- }
-}
-for(t2 = 1; t2 <= n; t2++) {
- s3(2,t2,0,0);
- s4(2,t2,0,0);
-}
-if (n >= 1) {
- for(t2 = 1; t2 <= m; t2++) {
- for(t4 = 1; t4 <= n; t4++) {
- s5(3,t2,1,t4);
- s6(3,t2,1,t4);
- }
- for(t4 = 1; t4 <= n; t4++) {
- s7(3,t2,2,t4);
- s8(3,t2,2,t4);
- }
- }
-}
-for(t2 = 1; t2 <= m; t2++) {
- s9(4,t2,0,0);
- s10(4,t2,0,0);
-}
-
-#
diff --git a/omegalib/examples/old_test/m2 b/omegalib/examples/old_test/m2
deleted file mode 100644
index be93f8e..0000000
--- a/omegalib/examples/old_test/m2
+++ /dev/null
@@ -1,4 +0,0 @@
-R1:={[i,j]: 2 <= i,j <= 9};
-R2:={[i,j]: 5 <= i <= 9 & 1 <= j <= 9};
-codegen R1,R2;
-codegen 2 R1,R2;
diff --git a/omegalib/examples/old_test/m2.oc-rt b/omegalib/examples/old_test/m2.oc-rt
deleted file mode 100644
index cdd76dd..0000000
--- a/omegalib/examples/old_test/m2.oc-rt
+++ /dev/null
@@ -1,35 +0,0 @@
->>> R1:={[i,j]: 2 <= i,j <= 9};
->>> R2:={[i,j]: 5 <= i <= 9 & 1 <= j <= 9};
->>> codegen R1,R2;
-for(t1 = 2; t1 <= 9; t1++) {
- if (t1 >= 5) {
- s2(t1,1);
- }
- if (t1 <= 4) {
- for(t2 = 2; t2 <= 9; t2++) {
- s1(t1,t2);
- }
- }
- if (t1 >= 5) {
- for(t2 = 2; t2 <= 9; t2++) {
- s1(t1,t2);
- s2(t1,t2);
- }
- }
-}
-
->>> codegen 2 R1,R2;
-for(t1 = 2; t1 <= 4; t1++) {
- for(t2 = 2; t2 <= 9; t2++) {
- s1(t1,t2);
- }
-}
-for(t1 = 5; t1 <= 9; t1++) {
- s2(t1,1);
- for(t2 = 2; t2 <= 9; t2++) {
- s1(t1,t2);
- s2(t1,t2);
- }
-}
-
-
diff --git a/omegalib/examples/old_test/m3 b/omegalib/examples/old_test/m3
deleted file mode 100644
index e160e8c..0000000
--- a/omegalib/examples/old_test/m3
+++ /dev/null
@@ -1,2 +0,0 @@
-I := {[i,j] : 1 <= i+j,j <= 10};
-codegen I;
diff --git a/omegalib/examples/old_test/m3.oc-rt b/omegalib/examples/old_test/m3.oc-rt
deleted file mode 100644
index b466eb9..0000000
--- a/omegalib/examples/old_test/m3.oc-rt
+++ /dev/null
@@ -1,11 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# I := {[i,j] : 1 <= i+j,j <= 10};
-#
-# codegen I;
-for(t1 = -9; t1 <= 9; t1++) {
- for(t2 = max(-t1+1,1); t2 <= min(-t1+10,10); t2++) {
- s1(t1,t2);
- }
-}
-
-#
diff --git a/omegalib/examples/old_test/m4 b/omegalib/examples/old_test/m4
deleted file mode 100644
index d25f961..0000000
--- a/omegalib/examples/old_test/m4
+++ /dev/null
@@ -1,11 +0,0 @@
-T1:={[i,j]->[j,i,0]};
-T2:={[i,j]->[j,i,1]};
-IS:={[i,j]: 1 <= i,j <= 9};
-
-newIS1 := T1 \ IS;
-newIS1;
-newIS2 := T2 \ IS;
-newIS2;
-
-codegen T1:IS,T2:IS;
-codegen 2 T1:IS,T2:IS;
diff --git a/omegalib/examples/old_test/m4.oc-rt b/omegalib/examples/old_test/m4.oc-rt
deleted file mode 100644
index d710dce..0000000
--- a/omegalib/examples/old_test/m4.oc-rt
+++ /dev/null
@@ -1,28 +0,0 @@
->>> T1:={[i,j]->[j,i,0]};
->>> T2:={[i,j]->[j,i,1]};
->>> IS:={[i,j]: 1 <= i,j <= 9};
->>>
->>> newIS1 := T1 \ IS;
->>> newIS1;
-{[i,j] -> [j,i,0] : 1 <= i <= 9 && 1 <= j <= 9}
->>> newIS2 := T2 \ IS;
->>> newIS2;
-{[i,j] -> [j,i,1] : 1 <= i <= 9 && 1 <= j <= 9}
->>>
->>> codegen T1:IS,T2:IS;
-for(t1 = 1; t1 <= 9; t1++) {
- for(t2 = 1; t2 <= 9; t2++) {
- s1(t2,t1);
- s2(t2,t1);
- }
-}
-
->>> codegen 2 T1:IS,T2:IS;
-for(t1 = 1; t1 <= 9; t1++) {
- for(t2 = 1; t2 <= 9; t2++) {
- s1(t2,t1);
- s2(t2,t1);
- }
-}
-
-
diff --git a/omegalib/examples/old_test/m7 b/omegalib/examples/old_test/m7
deleted file mode 100644
index 62c0c64..0000000
--- a/omegalib/examples/old_test/m7
+++ /dev/null
@@ -1,6 +0,0 @@
-T1:={[i,j]->[j,i,0]};
-T2:={[i,j]->[j,i,1]};
-R2:={[i,j]: 1 <= i,j <= 9};
-R3:={[i,j]: 1 <= i,j <= 9 && exists (alpha: j = 2alpha)};
-codegen T1:R2,T2:R3;
-codegen 2 T1:R2,T2:R3;
diff --git a/omegalib/examples/old_test/m7.oc-rt b/omegalib/examples/old_test/m7.oc-rt
deleted file mode 100644
index a98c8a7..0000000
--- a/omegalib/examples/old_test/m7.oc-rt
+++ /dev/null
@@ -1,35 +0,0 @@
->>> T1:={[i,j]->[j,i,0]};
->>> T2:={[i,j]->[j,i,1]};
->>> R2:={[i,j]: 1 <= i,j <= 9};
->>> R3:={[i,j]: 1 <= i,j <= 9 && exists (alpha: j = 2alpha)};
->>> codegen T1:R2,T2:R3;
-for(t1 = 1; t1 <= 9; t1++) {
- if (intMod(-t1,2) == 0) {
- for(t2 = 1; t2 <= 9; t2++) {
- s1(t2,t1);
- s2(t2,t1);
- }
- }
- if (intMod(-t1-1,2) == 0) {
- for(t2 = 1; t2 <= 9; t2++) {
- s1(t2,t1);
- }
- }
-}
-
->>> codegen 2 T1:R2,T2:R3;
-for(t1 = 1; t1 <= 9; t1++) {
- if (intMod(-t1,2) == 0) {
- for(t2 = 1; t2 <= 9; t2++) {
- s1(t2,t1);
- s2(t2,t1);
- }
- }
- if (intMod(-t1-1,2) == 0) {
- for(t2 = 1; t2 <= 9; t2++) {
- s1(t2,t1);
- }
- }
-}
-
-
diff --git a/omegalib/examples/old_test/m8 b/omegalib/examples/old_test/m8
deleted file mode 100644
index eb6938b..0000000
--- a/omegalib/examples/old_test/m8
+++ /dev/null
@@ -1,6 +0,0 @@
-T1:={[i,j]->[j,i,0]};
-T2:={[i,j]->[j,i,1]};
-R2:={[i,j]: 1 <= i,j <= 9 && exists (alpha: j = 4alpha)};
-R3:={[i,j]: 1 <= i,j <= 9 && exists (alpha: j = 2alpha)};
-codegen T1:R2,T2:R3;
-codegen 2 T1:R2,T2:R3;
diff --git a/omegalib/examples/old_test/m8.oc-rt b/omegalib/examples/old_test/m8.oc-rt
deleted file mode 100644
index 670052b..0000000
--- a/omegalib/examples/old_test/m8.oc-rt
+++ /dev/null
@@ -1,35 +0,0 @@
->>> T1:={[i,j]->[j,i,0]};
->>> T2:={[i,j]->[j,i,1]};
->>> R2:={[i,j]: 1 <= i,j <= 9 && exists (alpha: j = 4alpha)};
->>> R3:={[i,j]: 1 <= i,j <= 9 && exists (alpha: j = 2alpha)};
->>> codegen T1:R2,T2:R3;
-for(t1 = 2; t1 <= 8; t1 += 2) {
- if (intMod(t1,4) == 0) {
- for(t2 = 1; t2 <= 9; t2++) {
- s1(t2,t1);
- s2(t2,t1);
- }
- }
- if (intMod(t1-2,4) == 0) {
- for(t2 = 1; t2 <= 9; t2++) {
- s2(t2,t1);
- }
- }
-}
-
->>> codegen 2 T1:R2,T2:R3;
-for(t1 = 2; t1 <= 8; t1 += 2) {
- if (intMod(t1,4) == 0) {
- for(t2 = 1; t2 <= 9; t2++) {
- s1(t2,t1);
- s2(t2,t1);
- }
- }
- if (intMod(t1-2,4) == 0) {
- for(t2 = 1; t2 <= 9; t2++) {
- s2(t2,t1);
- }
- }
-}
-
-
diff --git a/omegalib/examples/old_test/m9 b/omegalib/examples/old_test/m9
deleted file mode 100644
index fb59381..0000000
--- a/omegalib/examples/old_test/m9
+++ /dev/null
@@ -1,5 +0,0 @@
-IS:={[i,j]: 1 <= i,j <= 9};
-T1:={[i,j]->[2j,i,0]};
-T2:={[i,j]->[2j,i,1]};
-codegen T1:IS,T2:IS;
-codegen 2 T1:IS,T2:IS;
diff --git a/omegalib/examples/old_test/m9.oc-rt b/omegalib/examples/old_test/m9.oc-rt
deleted file mode 100644
index c331a0c..0000000
--- a/omegalib/examples/old_test/m9.oc-rt
+++ /dev/null
@@ -1,20 +0,0 @@
->>> IS:={[i,j]: 1 <= i,j <= 9};
->>> T1:={[i,j]->[2j,i,0]};
->>> T2:={[i,j]->[2j,i,1]};
->>> codegen T1:IS,T2:IS;
-for(t1 = 2; t1 <= 18; t1 += 2) {
- for(t2 = 1; t2 <= 9; t2++) {
- s1(t2,intDiv(t1,2));
- s2(t2,intDiv(t1,2));
- }
-}
-
->>> codegen 2 T1:IS,T2:IS;
-for(t1 = 2; t1 <= 18; t1 += 2) {
- for(t2 = 1; t2 <= 9; t2++) {
- s1(t2,intDiv(t1,2));
- s2(t2,intDiv(t1,2));
- }
-}
-
-
diff --git a/omegalib/examples/old_test/maximize b/omegalib/examples/old_test/maximize
deleted file mode 100644
index be13c89..0000000
--- a/omegalib/examples/old_test/maximize
+++ /dev/null
@@ -1,7 +0,0 @@
-symbolic n, f(1);
-
-R0 := {[x] : 1 <= x <= n};
-R1 := {[x] : 1 <= x <= n && f(x) >= 0};
-maximize R0;
-maximize R1;
-R1 intersection maximize R0;
diff --git a/omegalib/examples/old_test/maximize.oc-rt b/omegalib/examples/old_test/maximize.oc-rt
deleted file mode 100644
index 4f1826e..0000000
--- a/omegalib/examples/old_test/maximize.oc-rt
+++ /dev/null
@@ -1,24 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# symbolic n, f(1);
-#
-#
-# R0 := {[x] : 1 <= x <= n};
-#
-# R1 := {[x] : 1 <= x <= n && f(x) >= 0};
-#
-# maximize R0;
-
-{[n]: 1 <= n}
-
-#
-# maximize R1;
-
-{[x]: 1 <= x < n && 0 <= f(x) && UNKNOWN} union
- {[x]: n = x && 0 <= f(x) && 1 <= x}
-
-#
-# R1 intersection maximize R0;
-
-{[x]: n = x && 1 <= x && 0 <= f(x)}
-
-#
diff --git a/omegalib/examples/old_test/olda b/omegalib/examples/old_test/olda
deleted file mode 100644
index 095388b..0000000
--- a/omegalib/examples/old_test/olda
+++ /dev/null
@@ -1,9 +0,0 @@
-T10:={[mp,mq,mi] -> [mi,mq,mp,0]};
-T20:={[mp,mq,mi] -> [mi,mp,mq,1]};
-
-symbolic np,morb;
-IS10 := {[mp,mq,mi]: 1 <= mp <= np && 1 <= mq <= mp && 1 <= mi <= morb};
-IS20 := IS10;
-
-codegen T10:IS10,T20:IS20;
-codegen 2 T10:IS10,T20:IS20;
diff --git a/omegalib/examples/old_test/olda.oc-rt b/omegalib/examples/old_test/olda.oc-rt
deleted file mode 100644
index 52e3406..0000000
--- a/omegalib/examples/old_test/olda.oc-rt
+++ /dev/null
@@ -1,52 +0,0 @@
->>> T10:={[mp,mq,mi] -> [mi,mq,mp,0]};
->>> T20:={[mp,mq,mi] -> [mi,mp,mq,1]};
->>>
->>> Symbolic np,morb;
->>> IS10 := {[mp,mq,mi]: 1 <= mp <= np && 1 <= mq <= mp && 1 <= mi <= morb};
->>> IS20 := IS10;
->>>
->>> codegen T10:IS10,T20:IS20;
-if (np >= 1) {
- for(t1 = 1; t1 <= morb; t1++) {
- for(t2 = 1; t2 <= np; t2++) {
- for(t3 = 1; t3 <= t2-1; t3++) {
- s2(t2,t3,t1);
- }
- s1(t2,t2,t1);
- s2(t2,t2,t1);
- for(t3 = t2+1; t3 <= np; t3++) {
- s1(t3,t2,t1);
- }
- }
- }
-}
-
->>> codegen 2 T10:IS10,T20:IS20;
-if (np >= 1) {
- for(t1 = 1; t1 <= morb; t1++) {
- s1(1,1,t1);
- s2(1,1,t1);
- for(t3 = 2; t3 <= np; t3++) {
- s1(t3,1,t1);
- }
- for(t2 = 2; t2 <= np-1; t2++) {
- for(t3 = 1; t3 <= t2-1; t3++) {
- s2(t2,t3,t1);
- }
- s1(t2,t2,t1);
- s2(t2,t2,t1);
- for(t3 = t2+1; t3 <= np; t3++) {
- s1(t3,t2,t1);
- }
- }
- for(t3 = 1; t3 <= np-1; t3++) {
- s2(np,t3,t1);
- }
- if (np >= 2) {
- s1(np,np,t1);
- s2(np,np,t1);
- }
- }
-}
-
-
diff --git a/omegalib/examples/old_test/p.delft b/omegalib/examples/old_test/p.delft
deleted file mode 100644
index 27840a2..0000000
--- a/omegalib/examples/old_test/p.delft
+++ /dev/null
@@ -1,22 +0,0 @@
-# Generate local code for this HPF code fragment
-# !HPF$ template T(0:150,0:150)
-# !HPF$ align X(I,J) with T(3*I,3*J)
-A := { [i,j] -> [3i,3j] };
-# !HPF$ processors P(0:3, 0:3)
-# !HPF$ distribute
-# !HPF$ T(cyclic(4), cyclic(4)) onto P
-D := { [t1,t2] -> [p1,p2,c1,c2,l1,l2] :
- t1 = 16c1+4p1+l1
- && t2 = 16c2+4p2+l2
- && 0 <= p1,p2 <= 3
- && 0 <= l1,l2 <= 3 };
-# do I = 0, 14
-# Y(I,I) = 1.0
-# enddo
-I := { [i] : 0 <= i <= 14 };
-X := { [i] -> [i,i] };
-R := D(A(X(I)));
-R;
-symbolic P1,P2;
-selectLocal := {[P1,P2,c1,c2,l1,l2] -> [c1,c2,l1,l2]};
-codegen selectLocal(R);
diff --git a/omegalib/examples/old_test/p.delft.oc-rt b/omegalib/examples/old_test/p.delft.oc-rt
deleted file mode 100644
index d59a886..0000000
--- a/omegalib/examples/old_test/p.delft.oc-rt
+++ /dev/null
@@ -1,43 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# # Generate local code for this HPF code fragment
-# # !HPF$ template T(0:150,0:150)
-# # !HPF$ align X(I,J) with T(3*I,3*J)
-# A := { [i,j] -> [3i,3j] };
-#
-# # !HPF$ processors P(0:3, 0:3)
-# # !HPF$ distribute
-# # !HPF$ T(cyclic(4), cyclic(4)) onto P
-# D := { [t1,t2] -> [p1,p2,c1,c2,l1,l2] :
-# t1 = 16c1+4p1+l1
-# && t2 = 16c2+4p2+l2
-# && 0 <= p1,p2 <= 3
-# && 0 <= l1,l2 <= 3 };
-#
-# # do I = 0, 14
-# # Y(I,I) = 1.0
-# # enddo
-# I := { [i] : 0 <= i <= 14 };
-#
-# X := { [i] -> [i,i] };
-#
-# R := D(A(X(I)));
-#
-# R;
-
-{[p1,p1,c1,c1,l1,l1]: Exists ( alpha : p1+l1+c1 = 3alpha && 0 <= p1 <= -4c1+10, 3 && 0 <= l1 <= 3 && 0 <= c1)}
-
-#
-# symbolic P1,P2;
-#
-# selectLocal := {[P1,P2,c1,c2,l1,l2] -> [c1,c2,l1,l2]};
-#
-# codegen selectLocal(R);
-if (P1 == P2 && P1 >= 0 && P1 <= 3) {
- for(t1 = 0; t1 <= min(-P1+4,2); t1++) {
- for(t3 = intMod((-P1-t1),3); t3 <= 3; t3 += 3) {
- s1(t1,t1,t3,t3);
- }
- }
-}
-
-#
diff --git a/omegalib/examples/old_test/p.delft2 b/omegalib/examples/old_test/p.delft2
deleted file mode 100644
index 32e5da0..0000000
--- a/omegalib/examples/old_test/p.delft2
+++ /dev/null
@@ -1,24 +0,0 @@
-# Compute Sends and receives for the following HPF fragment
-
-I := { [i,j] : 1 <= i <= 14 && 0 <= j <= 14 };
-X := { [i,j] -> [3i,3j] };
-Y := { [i,j] -> [i',3j] : 3i-1 <= i'<= 3i};
-A := { [i,j] -> [3i,3j] };
-D := { [t1,t2] -> [p1,p2,c1,c2,l1,l2] :
- t1 = 16c1+4p1+l1
- && t2 = 16c2+4p2+l2
- && 0 <= p1,p2 <= 3
- && 0 <= l1,l2 <= 3 };
-P := { [p1,p2,c1,c2,l1,l2] -> [p1,p2]};
-C := { [p1,p2,c1,c2,l1,l2] -> [p1,p2,c1,c2]};
-own := P(D(A(X))) \I;
-own;
-need := D(A(Y)) \I;
-need;
-different := {[p1,p2] -> [q1,q2,c1,c2,l1,l2] : p1 != q1 || p2 != q2};
-ship := (need compose (inverse own) ) intersection different;
-symbolic P1,P2;
-P := {[P1,P2]};
-S := range (ship \ P);
-S;
-codegen S;
diff --git a/omegalib/examples/old_test/p.delft2.oc-rt b/omegalib/examples/old_test/p.delft2.oc-rt
deleted file mode 100644
index 3ee662e..0000000
--- a/omegalib/examples/old_test/p.delft2.oc-rt
+++ /dev/null
@@ -1,80 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# # Compute Sends and receives for the following HPF fragment
-#
-# I := { [i,j] : 1 <= i <= 14 && 0 <= j <= 14 };
-#
-# X := { [i,j] -> [3i,3j] };
-#
-# Y := { [i,j] -> [i',3j] : 3i-1 <= i'<= 3i};
-#
-# A := { [i,j] -> [3i,3j] };
-#
-# D := { [t1,t2] -> [p1,p2,c1,c2,l1,l2] :
-# t1 = 16c1+4p1+l1
-# && t2 = 16c2+4p2+l2
-# && 0 <= p1,p2 <= 3
-# && 0 <= l1,l2 <= 3 };
-#
-# P := { [p1,p2,c1,c2,l1,l2] -> [p1,p2]};
-#
-# C := { [p1,p2,c1,c2,l1,l2] -> [p1,p2,c1,c2]};
-#
-# own := P(D(A(X))) \I;
-#
-# own;
-
-{[i,j] -> [p1,p2] : Exists ( alpha,beta : 1 <= i <= 14 && 0 <= j <= 14 && 0 <= p1 <= 3 && 0 <= p2 <= 3 && 4p1+16alpha <= 9i && 4p2+16beta <= 9j && 9i <= 3+4p1+16alpha && 9j <= 3+4p2+16beta)}
-
-#
-# need := D(A(Y)) \I;
-#
-# need;
-
-{[i,j] -> [p1,p2,c1,c2,l1,9j-4p2-16c2] : Exists ( alpha : p1+c1+l1 = 3alpha && 1 <= i <= 14 && 0 <= j <= 14 && 0 <= p1 <= 3 && 0 <= p2 <= 3 && 0 <= l1 <= 3 && 4p2+16c2 <= 9j && 9j <= 3+4p2+16c2 && 9i <= 3+4p1+16c1+l1 && 4p1+16c1+l1 <= 9i)}
-
-#
-# different := {[p1,p2] -> [q1,q2,c1,c2,l1,l2] : p1 != q1 || p2 != q2};
-#
-# ship := (need compose (inverse own) ) intersection different;
-#
-# symbolic P1,P2;
-#
-# P := {[P1,P2]};
-#
-# S := range (ship \ P);
-#
-# S;
-
-{[3,P2,c1,c2,l1,l2]: Exists ( alpha,beta,gamma : 4P2+l2 = 2c2+9beta && l1+c1 = 3alpha && 0 <= P1 <= -4c1+27 && 0 <= P2 <= 3 && -16c1-6 <= l1 <= 3 && 0 <= l2 <= 3 && 0 <= c2 && 4P2+l2+16c2 <= 126 && 9gamma <= 15+l1+16c1 && 16+4P1+16c1 <= 9gamma)} union
- {[In_1,P2,c1,c2,l1,l2]: Exists ( alpha,beta,gamma : 4P2+l2 = 2c2+9beta && In_1+c1+l1 = 3alpha && 0 <= In_1 < P1 <= -4c1+31, 3 && 0 <= P2 <= 3 && 0 <= l2 <= 3 && l1 <= 3 && 6 <= 4In_1+16c1+l1 && 4P1+16c1 <= 9gamma && 0 <= 4P2+l2+16c2 && 4P2+l2+16c2 <= 126 && 9gamma <= 3+4In_1+16c1+l1)}
-
-#
-# codegen S;
-if (P1 >= 1 && P2 >= 0 && P1 <= 3 && P2 <= 3) {
- for(t3 = intDiv(-P1+2+3,4); t3 <= 7; t3++) {
- for(t4 = 0; t4 <= 7; t4++) {
- for(t5 = 1+intMod(((-P1-t3+1)-1),3); t5 <= 3; t5 += 3) {
- if (intMod(4*P1-2*t3+t5-1,9) == 0) {
- for(t6 = intMod((-4*P2+2*t4),9); t6 <= 3; t6 += 9) {
- s1(P1-1,P2,t3,t4,t5,t6);
- }
- }
- }
- }
- }
-}
-if (P1 == 0 && P2 >= 0 && P2 <= 3) {
- for(t3 = 0; t3 <= 6; t3++) {
- for(t4 = 0; t4 <= 7; t4++) {
- for(t5 = 1+intMod((-t3-1),3); t5 <= 3; t5 += 3) {
- if (4*t5 == -t3+12) {
- for(t6 = intMod((-4*P2+2*t4),9); t6 <= 3; t6 += 9) {
- s1(3,P2,-4*t5+12,t4,t5,t6);
- }
- }
- }
- }
- }
-}
-
-#
diff --git a/omegalib/examples/old_test/p.delft3 b/omegalib/examples/old_test/p.delft3
deleted file mode 100644
index b2321f1..0000000
--- a/omegalib/examples/old_test/p.delft3
+++ /dev/null
@@ -1,20 +0,0 @@
-Hull {[p1,p2] -> [p1-1,p2,Out_3,Out_4] :
-exists ( alpha,gamma :
-1 <= p1 <= 3
-&& 0 <= p2 <= 3
-&& -2Out_4+1 <= alpha <= -2Out_4+14
-&& -2Out_3+1 <= gamma <= -2Out_3+14
-&& 4p1 <= 2Out_3+9gamma
-&& 4p2 <= 2Out_4+9alpha
-&& 2Out_3+9gamma <= 2+4p1
-&& 2Out_4+9alpha <= 3+4p2)};
-
-Hull {[0,p2] -> [3,p2,Out_3,Out_4] :
-exists (alpha,gamma :
-Out_3+4alpha = 0
-&& 0 <= p2 <= 3
-&& 0 <= Out_3 <= 4
-&& -2Out_4+1 <= gamma <= -2Out_4+14
-&& 4p2 <= 2Out_4+9gamma
-&& 2Out_4+9gamma <= 3+4p2)};
-
diff --git a/omegalib/examples/old_test/p.delft3.oc-rt b/omegalib/examples/old_test/p.delft3.oc-rt
deleted file mode 100644
index 6f85d83..0000000
--- a/omegalib/examples/old_test/p.delft3.oc-rt
+++ /dev/null
@@ -1,29 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# hull {[p1,p2] -> [p1-1,p2,Out_3,Out_4] :
-# Exists ( alpha,gamma :
-# 1 <= p1 <= 3
-# && 0 <= p2 <= 3
-# && -2Out_4+1 <= alpha <= -2Out_4+14
-# && -2Out_3+1 <= gamma <= -2Out_3+14
-# && 4p1 <= 2Out_3+9gamma
-# && 4p2 <= 2Out_4+9alpha
-# && 2Out_3+9gamma <= 2+4p1
-# && 2Out_4+9alpha <= 3+4p2)};
-
-{[p1,p2] -> [p1-1,p2,Out_3,Out_4] : 1, -4Out_3+2 <= p1 <= 3 && 0, -4Out_4+2 <= p2 <= 3 && Out_3 <= 7 && Out_4 <= 7}
-
-#
-#
-# hull {[0,p2] -> [3,p2,Out_3,Out_4] :
-# Exists (alpha,gamma :
-# Out_3+4alpha = 0
-# && 0 <= p2 <= 3
-# && 0 <= Out_3 <= 4
-# && -2Out_4+1 <= gamma <= -2Out_4+14
-# && 4p2 <= 2Out_4+9gamma
-# && 2Out_4+9gamma <= 3+4p2)};
-
-{[0,p2] -> [3,p2,Out_3,Out_4] : 0, -4Out_4+2 <= p2 <= 3 && 0 <= Out_3 <= 4 && Out_4 <= 7}
-
-#
-#
diff --git a/omegalib/examples/old_test/p.subset b/omegalib/examples/old_test/p.subset
deleted file mode 100644
index 3c8894c..0000000
--- a/omegalib/examples/old_test/p.subset
+++ /dev/null
@@ -1,3 +0,0 @@
-{ [i] -> [j] : 1 <= i <= 9 } subset { [i] -> [j] : 1 <= i <= 11 };
-
-{ [i] -> [j] : 1 <= i <= 9 } subset { [i] -> [j] : 1 <= i <= 7 };
diff --git a/omegalib/examples/old_test/p.subset.oc-rt b/omegalib/examples/old_test/p.subset.oc-rt
deleted file mode 100644
index b35b90f..0000000
--- a/omegalib/examples/old_test/p.subset.oc-rt
+++ /dev/null
@@ -1,10 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# { [i] -> [j] : 1 <= i <= 9 } subset { [i] -> [j] : 1 <= i <= 11 };
-
-True
-#
-#
-# { [i] -> [j] : 1 <= i <= 9 } subset { [i] -> [j] : 1 <= i <= 7 };
-
-False
-#
diff --git a/omegalib/examples/old_test/p1 b/omegalib/examples/old_test/p1
deleted file mode 100644
index 0f29643..0000000
--- a/omegalib/examples/old_test/p1
+++ /dev/null
@@ -1 +0,0 @@
-{ [i] -> [j] : 1 <= i < j <= 20 };
diff --git a/omegalib/examples/old_test/p1.oc-rt b/omegalib/examples/old_test/p1.oc-rt
deleted file mode 100644
index 3151bd6..0000000
--- a/omegalib/examples/old_test/p1.oc-rt
+++ /dev/null
@@ -1,6 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# { [i] -> [j] : 1 <= i < j <= 20 };
-
-{[i] -> [j] : 1 <= i < j <= 20}
-
-#
diff --git a/omegalib/examples/old_test/p10 b/omegalib/examples/old_test/p10
deleted file mode 100644
index c802845..0000000
--- a/omegalib/examples/old_test/p10
+++ /dev/null
@@ -1 +0,0 @@
-{[i,j,k,l,m] -> [i,i,i,i,i] : 1 <= i <= 100 };
diff --git a/omegalib/examples/old_test/p10.oc-rt b/omegalib/examples/old_test/p10.oc-rt
deleted file mode 100644
index e10a453..0000000
--- a/omegalib/examples/old_test/p10.oc-rt
+++ /dev/null
@@ -1,6 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# {[i,j,k,l,m] -> [i,i,i,i,i] : 1 <= i <= 100 };
-
-{[i,j,k,l,m] -> [i,i,i,i,i] : 1 <= i <= 100}
-
-#
diff --git a/omegalib/examples/old_test/p11 b/omegalib/examples/old_test/p11
deleted file mode 100644
index 1871c82..0000000
--- a/omegalib/examples/old_test/p11
+++ /dev/null
@@ -1,10 +0,0 @@
-{[i] : 1 <= i <= 10
- && ! i = 3
- && ! i = 2
- && ! i = 4
- && ! i = 7
- && ! i = 6
- && ! i = 8
-};
-
-
diff --git a/omegalib/examples/old_test/p11.oc-rt b/omegalib/examples/old_test/p11.oc-rt
deleted file mode 100644
index 04641f2..0000000
--- a/omegalib/examples/old_test/p11.oc-rt
+++ /dev/null
@@ -1,17 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# {[i] : 1 <= i <= 10
-# && ! i = 3
-# && ! i = 2
-# && ! i = 4
-# && ! i = 7
-# && ! i = 6
-# && ! i = 8
-# };
-
-{[1]} union
- {[5]} union
- {[i]: 9 <= i <= 10}
-
-#
-#
-#
diff --git a/omegalib/examples/old_test/p12 b/omegalib/examples/old_test/p12
deleted file mode 100644
index ffe4b1d..0000000
--- a/omegalib/examples/old_test/p12
+++ /dev/null
@@ -1,7 +0,0 @@
-symbolic n,m;
-T := { [i,j] -> [i-1,j] : 1 <= i <= n && 0 <= j <= m } union
- { [i,j] -> [i,j-1] : 0 <= i <= n && 1 <= j <= m };
-T;
-T+;
-Inverse ( (Inverse T)+);
-T@;
diff --git a/omegalib/examples/old_test/p12.oc-rt b/omegalib/examples/old_test/p12.oc-rt
deleted file mode 100644
index 51df294..0000000
--- a/omegalib/examples/old_test/p12.oc-rt
+++ /dev/null
@@ -1,33 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# symbolic n,m;
-#
-# T := { [i,j] -> [i-1,j] : 1 <= i <= n && 0 <= j <= m } union
-# { [i,j] -> [i,j-1] : 0 <= i <= n && 1 <= j <= m };
-#
-# T;
-
-{[i,j] -> [i-1,j] : 1 <= i <= n && 0 <= j <= m} union
- {[i,j] -> [i,j-1] : 0 <= i <= n && 1 <= j <= m}
-
-#
-# T+;
-
-{[i,0] -> [i',0] : m = 0 && 0 <= i' < i <= n} union
- {[0,j] -> [0,j'] : n = 0 && 0 <= j' < j <= m} union
- {[i,j] -> [i',j'] : 0 <= i' < i <= n && 0 <= j' <= j <= m && 1 <= m} union
- {[i,j] -> [i,j'] : 0 <= j' < j <= m && 0 <= i <= n && 1 <= n}
-
-#
-# Inverse ( (Inverse T)+);
-
-{[i,0] -> [i',0] : m = 0 && 0 <= i' < i <= n} union
- {[0,j] -> [0,j'] : n = 0 && 0 <= j' < j <= m} union
- {[i,j] -> [i',j'] : 0 <= i' < i <= n && 0 <= j' <= j <= m && 1 <= m} union
- {[i,j] -> [i,j'] : 0 <= j' < j <= m && 0 <= i <= n && 1 <= n}
-
-#
-# T@;
-
-{[In_1,In_2] -> [Out_1,Out_2] : Out_1 <= In_1 && Out_2 <= In_2 && In_2 <= m+Out_2 && In_1 <= n+Out_1}
-
-#
diff --git a/omegalib/examples/old_test/p13 b/omegalib/examples/old_test/p13
deleted file mode 100644
index 28ca23c..0000000
--- a/omegalib/examples/old_test/p13
+++ /dev/null
@@ -1,3 +0,0 @@
-T := { [d1, -1] : d1 > 0 };
-T;
-farkas T;
diff --git a/omegalib/examples/old_test/p13.oc-rt b/omegalib/examples/old_test/p13.oc-rt
deleted file mode 100644
index b52c4d6..0000000
--- a/omegalib/examples/old_test/p13.oc-rt
+++ /dev/null
@@ -1,13 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# T := { [d1, -1] : d1 > 0 };
-#
-# T;
-
-{[d1,-1]: 1 <= d1}
-
-#
-# farkas T;
-
-{[d1,In_2]: 0 <= d1 && In_2 <= constantTerm+d1}
-
-#
diff --git a/omegalib/examples/old_test/p2 b/omegalib/examples/old_test/p2
deleted file mode 100644
index b880627..0000000
--- a/omegalib/examples/old_test/p2
+++ /dev/null
@@ -1 +0,0 @@
-{ [i,j] -> [i+1,j+1] : 1 <= i <= 9 && 5 <= j <= 25 };
diff --git a/omegalib/examples/old_test/p2.oc-rt b/omegalib/examples/old_test/p2.oc-rt
deleted file mode 100644
index 0d4f77c..0000000
--- a/omegalib/examples/old_test/p2.oc-rt
+++ /dev/null
@@ -1,6 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# { [i,j] -> [i+1,j+1] : 1 <= i <= 9 && 5 <= j <= 25 };
-
-{[i,j] -> [i+1,j+1] : 1 <= i <= 9 && 5 <= j <= 25}
-
-#
diff --git a/omegalib/examples/old_test/p3 b/omegalib/examples/old_test/p3
deleted file mode 100644
index 226a619..0000000
--- a/omegalib/examples/old_test/p3
+++ /dev/null
@@ -1,2 +0,0 @@
-symbolic n;
-{ [i] -> [i+1] : 1 <= i <= n }+;
diff --git a/omegalib/examples/old_test/p3.oc-rt b/omegalib/examples/old_test/p3.oc-rt
deleted file mode 100644
index 03c8ebb..0000000
--- a/omegalib/examples/old_test/p3.oc-rt
+++ /dev/null
@@ -1,8 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# symbolic n;
-#
-# { [i] -> [i+1] : 1 <= i <= n }+;
-
-{[i] -> [Out_1] : 1 <= i < Out_1 <= n+1}
-
-#
diff --git a/omegalib/examples/old_test/p4 b/omegalib/examples/old_test/p4
deleted file mode 100644
index 2fcd2aa..0000000
--- a/omegalib/examples/old_test/p4
+++ /dev/null
@@ -1,5 +0,0 @@
-inverse { [i] -> [i+1] : 1 <= i <= 9 };
-domain { [i] -> [i+1] : 1 <= i <= 9 };
-range { [i] -> [i+1] : 1 <= i <= 9 };
-{ [i] -> [i+1] : 1 <= i <= 9 } compose { [i] -> [i+1] : 1 <= i <= 9 };
-
diff --git a/omegalib/examples/old_test/p4.oc-rt b/omegalib/examples/old_test/p4.oc-rt
deleted file mode 100644
index 020d1d2..0000000
--- a/omegalib/examples/old_test/p4.oc-rt
+++ /dev/null
@@ -1,22 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# inverse { [i] -> [i+1] : 1 <= i <= 9 };
-
-{[In_1] -> [In_1-1] : 2 <= In_1 <= 10}
-
-#
-# domain { [i] -> [i+1] : 1 <= i <= 9 };
-
-{[i]: 1 <= i <= 9}
-
-#
-# range { [i] -> [i+1] : 1 <= i <= 9 };
-
-{[In_1]: 2 <= In_1 <= 10}
-
-#
-# { [i] -> [i+1] : 1 <= i <= 9 } compose { [i] -> [i+1] : 1 <= i <= 9 };
-
-{[i] -> [i+2] : 1 <= i <= 8}
-
-#
-#
diff --git a/omegalib/examples/old_test/p5 b/omegalib/examples/old_test/p5
deleted file mode 100644
index ae7b242..0000000
--- a/omegalib/examples/old_test/p5
+++ /dev/null
@@ -1,8 +0,0 @@
-symbolic n;
-{[iw] -> [ir] :
- 1 <= iw, ir <= 2n and iw=ir
- and ! exists ( ik,jk : 1 <= ik <= 2n && 1 <= jk < n and
- iw <= ik = ir and 2jk = ir )
- and ! exists ( ik,jk : 1 <= ik <= 2n && 1 <= jk < n and
- iw <= ik = ir and 2jk+1 = ir )
- };
diff --git a/omegalib/examples/old_test/p5.oc-rt b/omegalib/examples/old_test/p5.oc-rt
deleted file mode 100644
index ef73886..0000000
--- a/omegalib/examples/old_test/p5.oc-rt
+++ /dev/null
@@ -1,16 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# symbolic n;
-#
-# {[iw] -> [ir] :
-# 1 <= iw, ir <= 2n and iw=ir
-# and ! exists ( ik,jk : 1 <= ik <= 2n && 1 <= jk < n and
-# iw <= ik = ir and 2jk = ir )
-# and ! exists ( ik,jk : 1 <= ik <= 2n && 1 <= jk < n and
-# iw <= ik = ir and 2jk+1 = ir )
-# };
-
-{[iw] -> [iw] : n = 1 && 1 <= iw <= 2} union
- {[2n] -> [2n] : 2 <= n} union
- {[1] -> [1] : 2 <= n}
-
-#
diff --git a/omegalib/examples/old_test/p6 b/omegalib/examples/old_test/p6
deleted file mode 100644
index f09634a..0000000
--- a/omegalib/examples/old_test/p6
+++ /dev/null
@@ -1,25 +0,0 @@
-R := { [i] -> [i'] : 1 <= i,i' <= 10 && i' = i+1 };
-R;
-inverse R;
-domain R;
-range R;
-R compose R;
-R+; # closure of R = R union (R compose R) union (R compose R ...
-complement R;
-S := {[i] : 5 <= i <= 25};
-S;
-R(S); # apply R to S
-R \ S; # restrict domain of R to S
-R / S; # restrict range of R to S
-(R\S) union (R/S);
-(R\S) intersection (R/S);
-(R/S) - (R\S);
-S*S; # cross product
-D := S - {[9:16:2]} - {[17:19]};
-D;
-T := { [i] : 1 <= i <= 11 & exists (a : i = 2a) };
-T;
-Hull T;
-Hull D;
-codegen D;
-codegen {[i,j] : 1 <= i+j,j <= 10};
diff --git a/omegalib/examples/old_test/p6.oc-rt b/omegalib/examples/old_test/p6.oc-rt
deleted file mode 100644
index 109e029..0000000
--- a/omegalib/examples/old_test/p6.oc-rt
+++ /dev/null
@@ -1,129 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# R := { [i] -> [i'] : 1 <= i,i' <= 10 && i' = i+1 };
-#
-# R;
-
-{[i] -> [i+1] : 1 <= i <= 9}
-
-#
-# inverse R;
-
-{[i] -> [i-1] : 2 <= i <= 10}
-
-#
-# domain R;
-
-{[i]: 1 <= i <= 9}
-
-#
-# range R;
-
-{[i]: 2 <= i <= 10}
-
-#
-# R compose R;
-
-{[i] -> [i+2] : 1 <= i <= 8}
-
-#
-# R+;
-
-{[i] -> [i'] : 1 <= i < i' <= 10}
-
-# # closure of R = R union (R compose R) union (R compose R ...
-# complement R;
-
-{[i] -> [i'] : i <= 0} union
- {[i] -> [i'] : 10 <= i} union
- {[i] -> [i'] : 1 <= i <= 9, i'-2} union
- {[i] -> [i'] : 1, i' <= i <= 9}
-
-#
-# S := {[i] : 5 <= i <= 25};
-#
-# S;
-
-{[i]: 5 <= i <= 25}
-
-#
-# R(S);
-
-{[i]: 6 <= i <= 10}
-
-# # apply R to S
-# R \ S;
-
-{[i] -> [i+1] : 5 <= i <= 9}
-
-# # restrict domain of R to S
-# R / S;
-
-{[i] -> [i+1] : 4 <= i <= 9}
-
-# # restrict range of R to S
-# (R\S) union (R/S);
-
-{[i] -> [i+1] : 4 <= i <= 9}
-
-#
-# (R\S) intersection (R/S);
-
-{[i] -> [i+1] : 5 <= i <= 9}
-
-#
-# (R/S) - (R\S);
-
-{[4] -> [5] }
-
-#
-# S*S;
-
-{[i] -> [i'] : 5 <= i <= 25 && 5 <= i' <= 25}
-
-# # cross product
-# D := S - {[9:16:2]} - {[17:19]};
-#
-# D;
-
-{[i]: 5 <= i <= 8} union
- {[i]: Exists ( alpha : 2alpha = i && 10 <= i <= 16)} union
- {[i]: 20 <= i <= 25}
-
-#
-# T := { [i] : 1 <= i <= 11 & exists (a : i = 2a) };
-#
-# T;
-
-{[i]: Exists ( alpha : 2alpha = i && 2 <= i <= 10)}
-
-#
-# Hull T;
-
-{[i]: 2 <= i <= 10}
-
-#
-# Hull D;
-
-{[i]: 5 <= i <= 25}
-
-#
-# codegen D;
-for(t1 = 5; t1 <= 8; t1++) {
- s1(t1);
-}
-for(t1 = 10; t1 <= 16; t1 += 2) {
- s1(t1);
-}
-for(t1 = 20; t1 <= 25; t1++) {
- s1(t1);
-}
-
-#
-# codegen {[i,j] : 1 <= i+j,j <= 10};
-for(t1 = -9; t1 <= 9; t1++) {
- for(t2 = max(-t1+1,1); t2 <= min(-t1+10,10); t2++) {
- s1(t1,t2);
- }
-}
-
-#
diff --git a/omegalib/examples/old_test/p7 b/omegalib/examples/old_test/p7
deleted file mode 100644
index d892912..0000000
--- a/omegalib/examples/old_test/p7
+++ /dev/null
@@ -1 +0,0 @@
-{ [i] -> [j] : 1 <= i,j <= 10 and i != j};
diff --git a/omegalib/examples/old_test/p7.oc-rt b/omegalib/examples/old_test/p7.oc-rt
deleted file mode 100644
index af7cf5f..0000000
--- a/omegalib/examples/old_test/p7.oc-rt
+++ /dev/null
@@ -1,7 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# { [i] -> [j] : 1 <= i,j <= 10 and i != j};
-
-{[i] -> [j] : 1 <= j < i <= 10} union
- {[i] -> [j] : 1 <= i < j <= 10}
-
-#
diff --git a/omegalib/examples/old_test/p8 b/omegalib/examples/old_test/p8
deleted file mode 100644
index d6031ad..0000000
--- a/omegalib/examples/old_test/p8
+++ /dev/null
@@ -1,6 +0,0 @@
-R1 := {[i] -> [j] : i < j};
-R2 := {[x] -> [y] : x < y};
-inverse R2;
-R1 union R2;
-R2(R1);
-
diff --git a/omegalib/examples/old_test/p8.oc-rt b/omegalib/examples/old_test/p8.oc-rt
deleted file mode 100644
index b9d569a..0000000
--- a/omegalib/examples/old_test/p8.oc-rt
+++ /dev/null
@@ -1,21 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# R1 := {[i] -> [j] : i < j};
-#
-# R2 := {[x] -> [y] : x < y};
-#
-# inverse R2;
-
-{[y] -> [x] : x < y}
-
-#
-# R1 union R2;
-
-{[In_1] -> [Out_1] : In_1 < Out_1}
-
-#
-# R2(R1);
-
-{[i] -> [y] : i <= y-2}
-
-#
-#
diff --git a/omegalib/examples/old_test/p9 b/omegalib/examples/old_test/p9
deleted file mode 100644
index 8f38d36..0000000
--- a/omegalib/examples/old_test/p9
+++ /dev/null
@@ -1,7 +0,0 @@
-symbolic lot_E;
-{[k_w,l_w] -> [k_r,l_r] :
-1 <= k_r <= 12 and
-1 <= l_r <= lot_E and
-2k_r+96l_r = 12+2k_w+96l_w and
-1 <= k_w <= 3 and
-1 <= l_w <= lot_E};
diff --git a/omegalib/examples/old_test/p9.oc-rt b/omegalib/examples/old_test/p9.oc-rt
deleted file mode 100644
index b3e1f55..0000000
--- a/omegalib/examples/old_test/p9.oc-rt
+++ /dev/null
@@ -1,13 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# symbolic lot_E;
-#
-# {[k_w,l_w] -> [k_r,l_r] :
-# 1 <= k_r <= 12 and
-# 1 <= l_r <= lot_E and
-# 2k_r+96l_r = 12+2k_w+96l_w and
-# 1 <= k_w <= 3 and
-# 1 <= l_w <= lot_E};
-
-{[k_w,l_w] -> [k_w+6,l_w] : 1 <= k_w <= 3 && 1 <= l_w <= lot_E}
-
-#
diff --git a/omegalib/examples/old_test/pufs1 b/omegalib/examples/old_test/pufs1
deleted file mode 100644
index 908c84f..0000000
--- a/omegalib/examples/old_test/pufs1
+++ /dev/null
@@ -1,2 +0,0 @@
-symbolic n(1);
-{ [i] -> [j] : 1 <= i <= j <= 100 && n(i) != n(j)};
diff --git a/omegalib/examples/old_test/pufs1.oc-rt b/omegalib/examples/old_test/pufs1.oc-rt
deleted file mode 100644
index 0a7312f..0000000
--- a/omegalib/examples/old_test/pufs1.oc-rt
+++ /dev/null
@@ -1,9 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# symbolic n(1);
-#
-# { [i] -> [j] : 1 <= i <= j <= 100 && n(i) != n(j)};
-
-{[i] -> [j] : 1 <= i < j <= 100 && n(j) < n(i)} union
- {[i] -> [j] : 1 <= i < j <= 100 && n(i) < n(j)}
-
-#
diff --git a/omegalib/examples/old_test/pufs2 b/omegalib/examples/old_test/pufs2
deleted file mode 100644
index 391c9d4..0000000
--- a/omegalib/examples/old_test/pufs2
+++ /dev/null
@@ -1,9 +0,0 @@
-symbolic n(1);
-R := { [i] -> [j] : 1 <= i = j <= 100 && n(i) <= n(j)};
-S := { [i] -> [j] : 1 <= i <= j <= 100 && n(i) = n(j)};
-
-R;
-S;
-R intersection S;
-R union S;
-R intersection complement S;
diff --git a/omegalib/examples/old_test/pufs2.oc-rt b/omegalib/examples/old_test/pufs2.oc-rt
deleted file mode 100644
index b71d651..0000000
--- a/omegalib/examples/old_test/pufs2.oc-rt
+++ /dev/null
@@ -1,35 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# symbolic n(1);
-#
-# R := { [i] -> [j] : 1 <= i = j <= 100 && n(i) <= n(j)};
-#
-# S := { [i] -> [j] : 1 <= i <= j <= 100 && n(i) = n(j)};
-#
-#
-# R;
-
-{[i] -> [i] : 1 <= i <= 100}
-
-#
-# S;
-
-{[i] -> [i] : 1 <= i <= 100} union
- {[i] -> [j] : n(j) = n(i) && 1 <= i < j <= 100}
-
-#
-# R intersection S;
-
-{[i] -> [i] : 1 <= i <= 100}
-
-#
-# R union S;
-
-{[i] -> [j] : n(j) = n(i) && 1 <= i < j <= 100} union
- {[i] -> [i] : 1 <= i <= 100}
-
-#
-# R intersection complement S;
-
-{[i] -> [j] : FALSE }
-
-#
diff --git a/omegalib/examples/old_test/pufs3 b/omegalib/examples/old_test/pufs3
deleted file mode 100644
index 0a1af56..0000000
--- a/omegalib/examples/old_test/pufs3
+++ /dev/null
@@ -1,8 +0,0 @@
-symbolic n(1);
-R := { [i] -> [j] : 1 <= i = j <= 100 && n(i) <= n(j)};
-S := { [i] -> [j] : 1 <= i <= j <= 100 && n(i) = n(j)};
-
-R intersection complement S;
-inverse R;
-inverse S;
-inverse S intersection complement inverse R;
diff --git a/omegalib/examples/old_test/pufs3.oc-rt b/omegalib/examples/old_test/pufs3.oc-rt
deleted file mode 100644
index 55f851c..0000000
--- a/omegalib/examples/old_test/pufs3.oc-rt
+++ /dev/null
@@ -1,29 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# symbolic n(1);
-#
-# R := { [i] -> [j] : 1 <= i = j <= 100 && n(i) <= n(j)};
-#
-# S := { [i] -> [j] : 1 <= i <= j <= 100 && n(i) = n(j)};
-#
-#
-# R intersection complement S;
-
-{[i] -> [j] : FALSE }
-
-#
-# inverse R;
-
-{[j] -> [j] : 1 <= j <= 100}
-
-#
-# inverse S;
-
-{[j] -> [j] : 1 <= j <= 100} union
- {[j] -> [i] : n(j) = n(i) && 1 <= i < j <= 100}
-
-#
-# inverse S intersection complement inverse R;
-
-{[j] -> [i] : n(j) = n(i) && 1 <= i < j <= 100}
-
-#
diff --git a/omegalib/examples/old_test/pufs4 b/omegalib/examples/old_test/pufs4
deleted file mode 100644
index 57e868e..0000000
--- a/omegalib/examples/old_test/pufs4
+++ /dev/null
@@ -1,16 +0,0 @@
-# Calculate exposed reads for this code fragment
-# for i := 1 to n do
-# for j := 1 to m do
-# if p(i,j) >= 0 then a(i,j) = 1
-# else a(i,j) = 0
-# .... a(i,j)
-#
-
-symbolic p(2), n, m;
-R := { [ir,jr] : 1 <= ir <= n && 1 <= jr <= m };
-W1 := { [iw,jw] : 1 <= iw <= n && 1 <= jw <= m && p(iw,jw) >= 0 };
-W2 := { [iw,jw] : 1 <= iw <= n && 1 <= jw <= m && p(iw,jw) < 0 };
-
-Exposed := R-W1-W2;
-
-Exposed;
diff --git a/omegalib/examples/old_test/pufs4.oc-rt b/omegalib/examples/old_test/pufs4.oc-rt
deleted file mode 100644
index 2c32c83..0000000
--- a/omegalib/examples/old_test/pufs4.oc-rt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# # Calculate exposed reads for this code fragment
-# # for i := 1 to n do
-# # for j := 1 to m do
-# # if p(i,j) >= 0 then a(i,j) = 1
-# # else a(i,j) = 0
-# # .... a(i,j)
-# #
-#
-# symbolic p(2), n, m;
-#
-# R := { [ir,jr] : 1 <= ir <= n && 1 <= jr <= m };
-#
-# W1 := { [iw,jw] : 1 <= iw <= n && 1 <= jw <= m && p(iw,jw) >= 0 };
-#
-# W2 := { [iw,jw] : 1 <= iw <= n && 1 <= jw <= m && p(iw,jw) < 0 };
-#
-#
-# Exposed := R-W1-W2;
-#
-#
-# Exposed;
-
-{[iw,jw] : FALSE }
-
-#
diff --git a/omegalib/examples/old_test/pufs5 b/omegalib/examples/old_test/pufs5
deleted file mode 100644
index 19249af..0000000
--- a/omegalib/examples/old_test/pufs5
+++ /dev/null
@@ -1,22 +0,0 @@
-symbolic n(1);
-S := { [i] -> [j] : 1 <= i < j <= 100 && n(j) >= 0};
-R := domain S;
-S;
-R;
-upper_bound R;
-lower_bound R;
-
-R - {[1:50]};
-{[1:50]} - R;
-{[1:50]} - upper_bound R;
-{[1:50]} - lower_bound R;
-
-R union {[10:30]} union {[25:100]} union {[1:10]};
-upper_bound (R union {[10:30]} union {[25:100]} union {[1:10]});
-lower_bound (R union {[10:30]} union {[25:100]} union {[1:10]});
-
-{[101:200]} - R;
-{[1:200]} - R;
-{[1:200]} - R - {[10:30]} - {[25:100]};
-{[1:200]} - (R union {[10:30]} union {[25:100]} union {[1:10]});
-{[1:200]} - R - {[10:30]} - {[25:100]} - {[1:10]};
diff --git a/omegalib/examples/old_test/pufs5.oc-rt b/omegalib/examples/old_test/pufs5.oc-rt
deleted file mode 100644
index 614a9fb..0000000
--- a/omegalib/examples/old_test/pufs5.oc-rt
+++ /dev/null
@@ -1,98 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# symbolic n(1);
-#
-# S := { [i] -> [j] : 1 <= i < j <= 100 && n(j) >= 0};
-#
-# R := domain S;
-#
-# S;
-
-{[i] -> [j] : 1 <= i < j <= 100 && 0 <= n(j)}
-
-#
-# R;
-
-{[i]: 1 <= i <= 99 && UNKNOWN}
-
-#
-# upper_bound R;
-
-{[i]: 1 <= i <= 99}
-
-#
-# lower_bound R;
-
-{[i] : FALSE }
-
-#
-#
-# R - {[1:50]};
-
-{[i]: 51 <= i <= 99 && UNKNOWN}
-
-#
-# {[1:50]} - R;
-
-{[i]: 1 <= i <= 50 && UNKNOWN}
-
-#
-# {[1:50]} - upper_bound R;
-
-{[i] : FALSE }
-
-#
-# {[1:50]} - lower_bound R;
-
-{[i]: 1 <= i <= 50}
-
-#
-#
-# R union {[10:30]} union {[25:100]} union {[1:10]};
-
-{[i]: 1 <= i <= 99 && UNKNOWN} union
- {[i]: 10 <= i <= 30} union
- {[i]: 25 <= i <= 100} union
- {[i]: 1 <= i <= 10}
-
-#
-# upper_bound (R union {[10:30]} union {[25:100]} union {[1:10]});
-
-{[i]: 1 <= i <= 99} union
- {[i]: 25 <= i <= 100}
-
-#
-# lower_bound (R union {[10:30]} union {[25:100]} union {[1:10]});
-
-{[i]: 10 <= i <= 30} union
- {[i]: 25 <= i <= 100} union
- {[i]: 1 <= i <= 10}
-
-#
-#
-# {[101:200]} - R;
-
-{[i]: 101 <= i <= 200}
-
-#
-# {[1:200]} - R;
-
-{[i]: 1 <= i <= 99 && UNKNOWN} union
- {[i]: 100 <= i <= 200}
-
-#
-# {[1:200]} - R - {[10:30]} - {[25:100]};
-
-{[i]: 1 <= i <= 9 && UNKNOWN} union
- {[i]: 101 <= i <= 200}
-
-#
-# {[1:200]} - (R union {[10:30]} union {[25:100]} union {[1:10]});
-
-{[i]: 101 <= i <= 200}
-
-#
-# {[1:200]} - R - {[10:30]} - {[25:100]} - {[1:10]};
-
-{[i]: 101 <= i <= 200}
-
-#
diff --git a/omegalib/examples/old_test/pufs6 b/omegalib/examples/old_test/pufs6
deleted file mode 100644
index e24aa12..0000000
--- a/omegalib/examples/old_test/pufs6
+++ /dev/null
@@ -1,19 +0,0 @@
-symbolic n, f(1), f_last, f_first;
-
-True := { [] : 1 = 1 };
-
-old_R1 := { [x] -> [] : (1 <= x <= n and f(x) > 0)};
-old_R2 := { [x] -> [] : (1 <= x <= n and f(x) <=0)};
-True - range old_R1 - range old_R2;
-
-R1 := { [x] -> [] : (3 <= x <= n-1 and f(x) > 0)
- or (1 <= n and f_last > 0)
- or (1 <= n and f_first > 0) };
-R2 := { [x] -> [] : (3 <= x <= n-1 and f(x) <=0)
- or (1 <= n and f_last <=0)
- or (1 <= n and f_first <=0) };
-True - range R1 - range R2;
-
-R1a := { [x] -> [] : (1 <= x <= n and (f(x) > 0 or f_first > 0 or f_last > 0)) };
-R2a := { [x] -> [] : (1 <= x <= n and (f(x) <=0 or f_first <=0 or f_last <=0)) };
-True - range R1a - range R2a;
diff --git a/omegalib/examples/old_test/pufs6.oc-rt b/omegalib/examples/old_test/pufs6.oc-rt
deleted file mode 100644
index d782cfc..0000000
--- a/omegalib/examples/old_test/pufs6.oc-rt
+++ /dev/null
@@ -1,42 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# Symbolic n, f(1), f_last, f_first;
-#
-#
-# True := { [] : 1 = 1 };
-#
-#
-# old_R1 := { [x] -> [] : (1 <= x <= n and f(x) > 0)};
-#
-# old_R2 := { [x] -> [] : (1 <= x <= n and f(x) <=0)};
-#
-# True - range old_R1 - range old_R2;
-
-{ 1 <= n && UNKNOWN} union
- { n <= 0}
-
-#
-#
-# R1 := { [x] -> [] : (3 <= x <= n-1 and f(x) > 0)
-# or (1 <= n and f_last > 0)
-# or (1 <= n and f_first > 0) };
-#
-# R2 := { [x] -> [] : (3 <= x <= n-1 and f(x) <=0)
-# or (1 <= n and f_last <=0)
-# or (1 <= n and f_first <=0) };
-#
-# True - range R1 - range R2;
-
-{ n <= 0}
-
-#
-#
-# R1a := { [x] -> [] : (1 <= x <= n and (f(x) > 0 or f_first > 0 or f_last > 0)) };
-#
-# R2a := { [x] -> [] : (1 <= x <= n and (f(x) <=0 or f_first <=0 or f_last <=0)) };
-#
-# True - range R1a - range R2a;
-
-{ f_last <= 0 && n <= 0} union
- { n <= 0 && 1 <= f_last}
-
-#
diff --git a/omegalib/examples/old_test/pufs7 b/omegalib/examples/old_test/pufs7
deleted file mode 100644
index 33905bf..0000000
--- a/omegalib/examples/old_test/pufs7
+++ /dev/null
@@ -1,6 +0,0 @@
-symbolic n(1),m;
-{[i] : n(i) >= 0} union {[i] : n(i) <=0};
-
-{[i] : n(i) >= 1 && 1 <= i <= m}
- union {[i] : n(i) <1 && 1 <= i <= m};
-
diff --git a/omegalib/examples/old_test/pufs7.oc-rt b/omegalib/examples/old_test/pufs7.oc-rt
deleted file mode 100644
index 84a8b93..0000000
--- a/omegalib/examples/old_test/pufs7.oc-rt
+++ /dev/null
@@ -1,18 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# symbolic n(1),m;
-#
-# {[i] : n(i) >= 0} union {[i] : n(i) <=0};
-
-{[i]: 0 <= n(i)} union
- {[i]: n(i) <= 0}
-
-#
-#
-# {[i] : n(i) >= 1 && 1 <= i <= m}
-# union {[i] : n(i) <1 && 1 <= i <= m};
-
-{[i]: 1 <= i <= m && 1 <= n(i)} union
- {[i]: 1 <= i <= m && n(i) <= 0}
-
-#
-#
diff --git a/omegalib/examples/old_test/reach1 b/omegalib/examples/old_test/reach1
deleted file mode 100644
index 268868f..0000000
--- a/omegalib/examples/old_test/reach1
+++ /dev/null
@@ -1,5 +0,0 @@
-
-reachable (a,b,c)
- { a->b:{[1]->[2]},
- b->c:{[2]->[3]},
- a:{[1]}};
diff --git a/omegalib/examples/old_test/reach1.oc-rt b/omegalib/examples/old_test/reach1.oc-rt
deleted file mode 100644
index 8333ede..0000000
--- a/omegalib/examples/old_test/reach1.oc-rt
+++ /dev/null
@@ -1,9 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-#
-# reachable (a,b,c)
-# { a->b:{[1]->[2]},
-# b->c:{[2]->[3]},
-# a:{[1]}};
-Node b: {[2]}
-Node c: {[3]}
-#
diff --git a/omegalib/examples/old_test/reach2 b/omegalib/examples/old_test/reach2
deleted file mode 100644
index 1a692a0..0000000
--- a/omegalib/examples/old_test/reach2
+++ /dev/null
@@ -1,29 +0,0 @@
-
-a2b:={[1]->[2]};
-
-b2c1:={[i]->[i]};
-b2c2:={[i]->[j]};
-
-a2a:={[i]->[i]};
-b2b:={[i]->[i]};
-c2c:={[i]->[i]};
-
-
-
-reachable (a,b,c){ a->b:a2b, b->c:b2c1, a->a:a2a, b->b:b2b, c->c:c2c,
- a:{[1]}};
-
-reachable (a,b,c) { a->b:a2b, b->c:b2c2, a->a:a2a, b->b:b2b, c->c:c2c,
- a:{[1]}};
-
-b2c3:={[i]->[i+1]};
-b2b2:={[i]->[i+1]};
-
-reachable (a,b,c){ a->b:a2b, b->c:b2c3, a->a:a2a, b->b:b2b2, c->c:c2c,
- a:{[1]}};
-
-b2c3:={[i]->[i]};
-
-reachable (a,b,c){ a->b:a2b, b->c:b2c3, a->a:a2a, b->b:b2b2, c->c:c2c,
- a:{[1]}};
-
diff --git a/omegalib/examples/old_test/reach2.oc-rt b/omegalib/examples/old_test/reach2.oc-rt
deleted file mode 100644
index 8a8a904..0000000
--- a/omegalib/examples/old_test/reach2.oc-rt
+++ /dev/null
@@ -1,61 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-#
-# a2b:={[1]->[2]};
-#
-#
-# b2c1:={[i]->[i]};
-#
-# b2c2:={[i]->[j]};
-#
-#
-# a2a:={[i]->[i]};
-#
-# b2b:={[i]->[i]};
-#
-# c2c:={[i]->[i]};
-#
-#
-#
-#
-# reachable (a,b,c){ a->b:a2b, b->c:b2c1, a->a:a2a, b->b:b2b, c->c:c2c,
-# a:{[1]}};
-Node a: {[1]}
-Node b: {[2]}
-Node c: {[2]}
-#
-#
-# reachable (a,b,c) { a->b:a2b, b->c:b2c2, a->a:a2a, b->b:b2b, c->c:c2c,
-# a:{[1]}};
-Node a: {[1]}
-Node b: {[2]}
-Node c: {[In_1]}
-#
-#
-# b2c3:={[i]->[i+1]};
-#
-# b2b2:={[i]->[i+1]};
-#
-#
-# reachable (a,b,c){ a->b:a2b, b->c:b2c3, a->a:a2a, b->b:b2b2, c->c:c2c,
-# a:{[1]}};
-Node a: {[1]}
-Node b: {[2]} union
- {[In_1]: 4 <= In_1} union
- {[3]}
-Node c: {[i]: 4 <= i} union
- {[3]}
-#
-#
-# b2c3:={[i]->[i]};
-#
-#
-# reachable (a,b,c){ a->b:a2b, b->c:b2c3, a->a:a2a, b->b:b2b2, c->c:c2c,
-# a:{[1]}};
-Node a: {[1]}
-Node b: {[2]} union
- {[In_1]: 4 <= In_1} union
- {[3]}
-Node c: {[i]: 3 <= i} union
- {[2]}
-#
-#
diff --git a/omegalib/examples/old_test/reach3 b/omegalib/examples/old_test/reach3
deleted file mode 100644
index 39c954d..0000000
--- a/omegalib/examples/old_test/reach3
+++ /dev/null
@@ -1,18 +0,0 @@
-
-a2b:={[1]->[2]};
-a2a:={[i]->[i]};
-b2b2:={[i]->[i+1]};
-b2c3:={[i]->[i]};
-c2c:={[i]->[i]};
-
-reachable of a in (a,b,c) {
- a->b:a2b, b->c:b2c3, a->a:a2a, b->b:b2b2, c->c:c2c,
- a:{[1]}
- };
-reachable of b in (a,b,c) {
- a->b:a2b, b->c:b2c3, a->a:a2a, a:{[1]}, b->b:b2b2, c->c:c2c
- };
-cr := reachable of c in (a,b,c) {
- a:{[1]},a->b:a2b, b->c:b2c3, a->a:a2a,
- b->b:b2b2, c->c:c2c };
-cr;
diff --git a/omegalib/examples/old_test/reach3.oc-rt b/omegalib/examples/old_test/reach3.oc-rt
deleted file mode 100644
index 3418061..0000000
--- a/omegalib/examples/old_test/reach3.oc-rt
+++ /dev/null
@@ -1,40 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-#
-# a2b:={[1]->[2]};
-#
-# a2a:={[i]->[i]};
-#
-# b2b2:={[i]->[i+1]};
-#
-# b2c3:={[i]->[i]};
-#
-# c2c:={[i]->[i]};
-#
-#
-# reachable of a in (a,b,c) {
-# a->b:a2b, b->c:b2c3, a->a:a2a, b->b:b2b2, c->c:c2c,
-# a:{[1]}
-# };
-
-{[1]}
-
-#
-# reachable of b in (a,b,c) {
-# a->b:a2b, b->c:b2c3, a->a:a2a, a:{[1]}, b->b:b2b2, c->c:c2c
-# };
-
-{[2]} union
- {[In_1]: 4 <= In_1} union
- {[3]}
-
-#
-# cr := reachable of c in (a,b,c) {
-# a:{[1]},a->b:a2b, b->c:b2c3, a->a:a2a,
-# b->b:b2b2, c->c:c2c };
-#
-# cr;
-
-{[i]: 3 <= i} union
- {[2]}
-
-#
diff --git a/omegalib/examples/old_test/red1 b/omegalib/examples/old_test/red1
deleted file mode 100644
index 1a479b3..0000000
--- a/omegalib/examples/old_test/red1
+++ /dev/null
@@ -1,3 +0,0 @@
-R1 := {[i,j,k] : 17i=12j+170};
-R2 := {[i,j,k] : k >= 0};
-gist R1 given R2;
diff --git a/omegalib/examples/old_test/red1.oc-rt b/omegalib/examples/old_test/red1.oc-rt
deleted file mode 100644
index 32cbb97..0000000
--- a/omegalib/examples/old_test/red1.oc-rt
+++ /dev/null
@@ -1,10 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# R1 := {[i,j,k] : 17i=12j+170};
-#
-# R2 := {[i,j,k] : k >= 0};
-#
-# gist R1 given R2;
-
-{[i,j,k]: 17i = 170+12j}
-
-#
diff --git a/omegalib/examples/old_test/saman b/omegalib/examples/old_test/saman
deleted file mode 100644
index bf44452..0000000
--- a/omegalib/examples/old_test/saman
+++ /dev/null
@@ -1,20 +0,0 @@
-# Passing array sections through array reshaping
-# procedure foo()
-# real a(1:5,1:64,1:64,1:5)
-# for i = 1 to 64 do
-# for j = 1 to 64 do
-# bar(a(1,i,j,1))
-# ...
-# procedure bar(x(*))
-# x(1:5) = ...
-#
-# Question which element of a are effected by the call to bar?
-#
-symbolic i,j;
-R := {[i1,i2,i3,i4] -> [o1] :
- (i1-1) + (i2-i)*5 + (i3-j)*5*64 + (i4-1)*5*64*64
- = o1-1
- && 1 <= i1,i4 <= 5
- && 1 <= i,j,i2,i3 <= 64};
-R;
-(inverse R)({[1:5]});
diff --git a/omegalib/examples/old_test/saman.oc-rt b/omegalib/examples/old_test/saman.oc-rt
deleted file mode 100644
index d75d4df..0000000
--- a/omegalib/examples/old_test/saman.oc-rt
+++ /dev/null
@@ -1,31 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# # Passing array sections through array reshaping
-# # procedure foo()
-# # real a(1:5,1:64,1:64,1:5)
-# # for i = 1 to 64 do
-# # for j = 1 to 64 do
-# # bar(a(1,i,j,1))
-# # ...
-# # procedure bar(x(*))
-# # x(1:5) = ...
-# #
-# # Question which element of a are effected by the call to bar?
-# #
-# symbolic i,j;
-#
-# R := {[i1,i2,i3,i4] -> [o1] :
-# (i1-1) + (i2-i)*5 + (i3-j)*5*64 + (i4-1)*5*64*64
-# = o1-1
-# && 1 <= i1,i4 <= 5
-# && 1 <= i,j,i2,i3 <= 64};
-#
-# R;
-
-{[i1,i2,i3,i4] -> [i1-320j-5i+5i2+320i3+20480i4-20480] : 1 <= j <= 64 && 1 <= i <= 64 && 1 <= i1 <= 5 && 1 <= i2 <= 64 && 1 <= i3 <= 64 && 1 <= i4 <= 5}
-
-#
-# (inverse R)({[1:5]});
-
-{[i1,i,j,1]: 1 <= i <= 64 && 1 <= j <= 64 && 1 <= i1 <= 5}
-
-#
diff --git a/omegalib/examples/old_test/sample1 b/omegalib/examples/old_test/sample1
deleted file mode 100644
index fb292b3..0000000
--- a/omegalib/examples/old_test/sample1
+++ /dev/null
@@ -1,14 +0,0 @@
-example { [i] -> [j] : 1 <= i < j <= 20 };
-
-example { [i,j] -> [i+1,j+1] : 1 <= i <= 9 && 5 <= j <= 25 };
-
-example (inverse { [i] -> [i+1] : 1 <= i <= 9 });
-
-example (domain { [i] -> [i+1] : 1 <= i <= 9 });
-
-example (range { [i] -> [i+1] : 1 <= i <= 9 });
-
-example ({[i] -> [i+1] : 1 <= i <= 9 } compose { [i] -> [i+1] : 1 <= i <= 9 });
-
-
-
diff --git a/omegalib/examples/old_test/sample1.oc-rt b/omegalib/examples/old_test/sample1.oc-rt
deleted file mode 100644
index bb19b15..0000000
--- a/omegalib/examples/old_test/sample1.oc-rt
+++ /dev/null
@@ -1,39 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# example { [i] -> [j] : 1 <= i < j <= 20 };
-
-{[19] -> [20] }
-
-#
-#
-# example { [i,j] -> [i+1,j+1] : 1 <= i <= 9 && 5 <= j <= 25 };
-
-{[1,5] -> [2,6] }
-
-#
-#
-# example (inverse { [i] -> [i+1] : 1 <= i <= 9 });
-
-{[2] -> [1] }
-
-#
-#
-# example (domain { [i] -> [i+1] : 1 <= i <= 9 });
-
-{[1]}
-
-#
-#
-# example (range { [i] -> [i+1] : 1 <= i <= 9 });
-
-{[2]}
-
-#
-#
-# example ({[i] -> [i+1] : 1 <= i <= 9 } compose { [i] -> [i+1] : 1 <= i <= 9 });
-
-{[1] -> [3] }
-
-#
-#
-#
-#
diff --git a/omegalib/examples/old_test/sample2 b/omegalib/examples/old_test/sample2
deleted file mode 100644
index 1ca6b19..0000000
--- a/omegalib/examples/old_test/sample2
+++ /dev/null
@@ -1,11 +0,0 @@
-symbolic n,m;
-
-example { [i] -> [j] : 1 <= i <= 20 };
-
-example {[i] : 1 <= i <= n};
-
-example {[i] : m <= i <= n};
-
-example {[i] : exists ( alpha : i <= 2alpha)};
-
-example {[i] : exists ( alpha : i = 2alpha)};
diff --git a/omegalib/examples/old_test/sample2.oc-rt b/omegalib/examples/old_test/sample2.oc-rt
deleted file mode 100644
index e18d650..0000000
--- a/omegalib/examples/old_test/sample2.oc-rt
+++ /dev/null
@@ -1,33 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# Symbolic n,m;
-#
-#
-# example { [i] -> [j] : 1 <= i <= 20 };
-
-{[1] -> [42] }
-
-#
-#
-# example {[i] : 1 <= i <= n};
-
-{[1]: n = 1}
-
-#
-#
-# example {[i] : m <= i <= n};
-
-{[42]: m = 42 && n = 42}
-
-#
-#
-# example {[i] : exists ( alpha : i <= 2alpha)};
-
-{[42]}
-
-#
-#
-# example {[i] : exists ( alpha : i = 2alpha)};
-
-{[0]}
-
-#
diff --git a/omegalib/examples/old_test/sample3 b/omegalib/examples/old_test/sample3
deleted file mode 100644
index 44a481d..0000000
--- a/omegalib/examples/old_test/sample3
+++ /dev/null
@@ -1,11 +0,0 @@
-symbolic n,m;
-
-sym_example {[i] : 1 <= i <= n};
-
-sym_example {[i] : m <= i <= n};
-
-sym_example {[i] : m <= i <= n && exists (alpha : i = 2alpha)};
-example {[i] : m <= i <= n && exists (alpha : i = 2alpha)};
-example {[i] : m < i <= n && exists (alpha : i = 2alpha)};
-example {[i] : m < i < n};
-
diff --git a/omegalib/examples/old_test/sample3.oc-rt b/omegalib/examples/old_test/sample3.oc-rt
deleted file mode 100644
index a486bdd..0000000
--- a/omegalib/examples/old_test/sample3.oc-rt
+++ /dev/null
@@ -1,37 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# Symbolic n,m;
-#
-#
-# sym_example {[i] : 1 <= i <= n};
-
-{[1]: 1 <= n}
-
-#
-#
-# sym_example {[i] : m <= i <= n};
-
-{[m]: m <= n}
-
-#
-#
-# sym_example {[i] : m <= i <= n && exists (alpha : i = 2alpha)};
-
-{[0]: m <= 0 && 0 <= n}
-
-#
-# example {[i] : m <= i <= n && exists (alpha : i = 2alpha)};
-
-{[42]: m = 42 && n = 42}
-
-#
-# example {[i] : m < i <= n && exists (alpha : i = 2alpha)};
-
-{[44]: m = 42 && n = 44}
-
-#
-# example {[i] : m < i < n};
-
-{[43]: m = 42 && n = 44}
-
-#
-#
diff --git a/omegalib/examples/old_test/stodghil b/omegalib/examples/old_test/stodghil
deleted file mode 100644
index 99e9430..0000000
--- a/omegalib/examples/old_test/stodghil
+++ /dev/null
@@ -1,21 +0,0 @@
-symbolic n;
-
-S := {[k_w,j_w,l_w]->[k_r,j_r,l_r] : ((1 <= k_w) and (k_w <= n) and ((k_w + 1) <= j_w)
-and (j_w <= n)
-and ((k_w + 1) <= l_w) and (l_w <= j_w) and (1 <= k_r)
-and (k_r <= n) and ((k_r + 1) <= j_r) and (j_r <= n)
-and ((k_r + 1) <= l_r) and (l_r <= j_r) and ((k_w < k_r) or ((k_w = k_r)
-and (j_w < j_r)) or ((k_w = k_r) and (j_w = j_r) and (l_w < l_r)))
-and (j_w = j_r) and (l_w = l_r)
-and !exists(k_1 : ((1 <= k_1) and (k_1 <= n) and (k_w < k_1) and ((k_1 < k_r) or (k_1 = k_r))
-and (k_1 = j_r) and (k_1 = l_r)))
-and !exists(k_2,i_2 : ((1 <= k_2) and (k_2 <= n) and ((k_2 + 1) <= i_2) and (i_2 <= n) and (k_w < k_2) and ((k_2 < k_r) or (k_2 = k_r)) and (i_2 = j_r) and (k_2 = l_r)))
-and !exists(k_3,j_3,l_3 : ((1 <= k_3) and (k_3 <= n) and ((k_3 + 1) <= j_3)
- and (j_3 <= n) and ((k_3 + 1) <= l_3) and (l_3 <= j_3)
-and ((k_w < k_3) or ((k_w = k_3) and (j_w < j_3)) or ((k_w = k_3)
-and (j_w = j_3) and (l_w < l_3)))
-and ((k_3 < k_r) or ((k_3 = k_r) and (j_3 < j_r)) or ((k_3 = k_r)
-and (j_3 = j_r) and (l_3 < l_r))) and (j_3 = j_r) and (l_3 = l_r))
-))};
-
-S;
diff --git a/omegalib/examples/old_test/stodghil.oc-rt b/omegalib/examples/old_test/stodghil.oc-rt
deleted file mode 100644
index 0d554d2..0000000
--- a/omegalib/examples/old_test/stodghil.oc-rt
+++ /dev/null
@@ -1,28 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# symbolic n;
-#
-#
-# S := {[k_w,j_w,l_w]->[k_r,j_r,l_r] : ((1 <= k_w) and (k_w <= n) and ((k_w + 1) <= j_w)
-# and (j_w <= n)
-# and ((k_w + 1) <= l_w) and (l_w <= j_w) and (1 <= k_r)
-# and (k_r <= n) and ((k_r + 1) <= j_r) and (j_r <= n)
-# and ((k_r + 1) <= l_r) and (l_r <= j_r) and ((k_w < k_r) or ((k_w = k_r)
-# and (j_w < j_r)) or ((k_w = k_r) and (j_w = j_r) and (l_w < l_r)))
-# and (j_w = j_r) and (l_w = l_r)
-# and !exists(k_1 : ((1 <= k_1) and (k_1 <= n) and (k_w < k_1) and ((k_1 < k_r) or (k_1 = k_r))
-# and (k_1 = j_r) and (k_1 = l_r)))
-# and !exists(k_2,i_2 : ((1 <= k_2) and (k_2 <= n) and ((k_2 + 1) <= i_2) and (i_2 <= n) and (k_w < k_2) and ((k_2 < k_r) or (k_2 = k_r)) and (i_2 = j_r) and (k_2 = l_r)))
-# and !exists(k_3,j_3,l_3 : ((1 <= k_3) and (k_3 <= n) and ((k_3 + 1) <= j_3)
-# and (j_3 <= n) and ((k_3 + 1) <= l_3) and (l_3 <= j_3)
-# and ((k_w < k_3) or ((k_w = k_3) and (j_w < j_3)) or ((k_w = k_3)
-# and (j_w = j_3) and (l_w < l_3)))
-# and ((k_3 < k_r) or ((k_3 = k_r) and (j_3 < j_r)) or ((k_3 = k_r)
-# and (j_3 = j_r) and (l_3 < l_r))) and (j_3 = j_r) and (l_3 = l_r))
-# ))};
-#
-#
-# S;
-
-{[k_w,j_w,l_w] -> [k_w+1,j_w,l_w] : k_w+2 <= l_w <= j_w <= n && 1 <= k_w}
-
-#
diff --git a/omegalib/examples/old_test/stride1 b/omegalib/examples/old_test/stride1
deleted file mode 100644
index fc2b727..0000000
--- a/omegalib/examples/old_test/stride1
+++ /dev/null
@@ -1,2 +0,0 @@
-R := { [i] : i < 10 && i > 1 && exists ( alpha : i = 3alpha) };
-codegen R;
diff --git a/omegalib/examples/old_test/stride1.oc-rt b/omegalib/examples/old_test/stride1.oc-rt
deleted file mode 100644
index a577449..0000000
--- a/omegalib/examples/old_test/stride1.oc-rt
+++ /dev/null
@@ -1,9 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# R := { [i] : i < 10 && i > 1 && exists ( alpha : i = 3alpha) };
-#
-# codegen R;
-for(t1 = 3; t1 <= 9; t1 += 3) {
- s1(t1);
-}
-
-#
diff --git a/omegalib/examples/old_test/stride2 b/omegalib/examples/old_test/stride2
deleted file mode 100644
index 37a355f..0000000
--- a/omegalib/examples/old_test/stride2
+++ /dev/null
@@ -1,4 +0,0 @@
-symbolic n;
-new_IS := {[t1,t2] : exists (alpha : t1 = 32alpha &&
- t2 - 31,0 <= t1 <= t2 <= n)};
-codegen new_IS;
diff --git a/omegalib/examples/old_test/stride2.oc-rt b/omegalib/examples/old_test/stride2.oc-rt
deleted file mode 100644
index ee8fb75..0000000
--- a/omegalib/examples/old_test/stride2.oc-rt
+++ /dev/null
@@ -1,14 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# Sym n;
-#
-# new_IS := {[t1,t2] : exists (alpha : t1 = 32alpha &&
-# t2 - 31,0 <= t1 <= t2 <= n)};
-#
-# codegen new_IS;
-for(t1 = 0; t1 <= n; t1 += 32) {
- for(t2 = t1; t2 <= min(n,t1+31); t2++) {
- s1(t1,t2);
- }
-}
-
-#
diff --git a/omegalib/examples/old_test/stride3 b/omegalib/examples/old_test/stride3
deleted file mode 100644
index 859e9b8..0000000
--- a/omegalib/examples/old_test/stride3
+++ /dev/null
@@ -1,4 +0,0 @@
-symbolic n;
-new_IS := {[t1,t2] : exists (alpha : t1 = 32alpha+3 &&
- t2 - 31,0 <= t1 <= t2 <= n)};
-codegen new_IS;
diff --git a/omegalib/examples/old_test/stride3.oc-rt b/omegalib/examples/old_test/stride3.oc-rt
deleted file mode 100644
index 7ba925f..0000000
--- a/omegalib/examples/old_test/stride3.oc-rt
+++ /dev/null
@@ -1,14 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# Sym n;
-#
-# new_IS := {[t1,t2] : exists (alpha : t1 = 32alpha+3 &&
-# t2 - 31,0 <= t1 <= t2 <= n)};
-#
-# codegen new_IS;
-for(t1 = 3; t1 <= n; t1 += 32) {
- for(t2 = t1; t2 <= min(n,t1+31); t2++) {
- s1(t1,t2);
- }
-}
-
-#
diff --git a/omegalib/examples/old_test/stride4 b/omegalib/examples/old_test/stride4
deleted file mode 100644
index 21781a2..0000000
--- a/omegalib/examples/old_test/stride4
+++ /dev/null
@@ -1,4 +0,0 @@
-symbolic n;
-new_IS := {[i] : exists (alpha : i = 5alpha-2 &&
- i >= 17 && i <= 100)};
-codegen new_IS;
diff --git a/omegalib/examples/old_test/stride4.oc-rt b/omegalib/examples/old_test/stride4.oc-rt
deleted file mode 100644
index 3905486..0000000
--- a/omegalib/examples/old_test/stride4.oc-rt
+++ /dev/null
@@ -1,12 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# Sym n;
-#
-# new_IS := {[i] : exists (alpha : i = 5alpha-2 &&
-# i >= 17 && i <= 100)};
-#
-# codegen new_IS;
-for(t1 = 18; t1 <= 98; t1 += 5) {
- s1(t1);
-}
-
-#
diff --git a/omegalib/examples/old_test/stride5 b/omegalib/examples/old_test/stride5
deleted file mode 100644
index 9c4f1b0..0000000
--- a/omegalib/examples/old_test/stride5
+++ /dev/null
@@ -1,4 +0,0 @@
-symbolic n;
-R := {[i,j]: i >= 1 && i <= 101 && exists (alpha : i = 2 alpha) &&
- j >= i+2n && j <=401 && exists (alpha : j = 2 alpha)};
-codegen R;
diff --git a/omegalib/examples/old_test/stride5.oc-rt b/omegalib/examples/old_test/stride5.oc-rt
deleted file mode 100644
index 85e9551..0000000
--- a/omegalib/examples/old_test/stride5.oc-rt
+++ /dev/null
@@ -1,14 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# Sym n;
-#
-# R := {[i,j]: i >= 1 && i <= 101 && exists (alpha : i = 2 alpha) &&
-# j >= i+2n && j <=401 && exists (alpha : j = 2 alpha)};
-#
-# codegen R;
-for(t1 = 2; t1 <= min(-2*n+400,100); t1 += 2) {
- for(t2 = 2*n+t1; t2 <= 400; t2 += 2) {
- s1(t1,t2);
- }
-}
-
-#
diff --git a/omegalib/examples/old_test/stride6 b/omegalib/examples/old_test/stride6
deleted file mode 100644
index 364e24c..0000000
--- a/omegalib/examples/old_test/stride6
+++ /dev/null
@@ -1,10 +0,0 @@
-symbolic n;
-R := {[i,j]: i >= 1 && i <= 101 &&
- j >= i && j <=401 && exists (alpha : j = 2 alpha)};
-codegen R;
-S := {[i,j]: i >= 1 && i <= 101 && exists (alpha : i = 2 alpha) &&
- j >= i && j <=401 && exists (alpha : j = 2 alpha)};
-codegen S;
-T := {[i,j]: i >= 1 && i <= 101 && exists (alpha : i = 2 alpha) &&
- j >= i && j <=401 && exists (alpha : 2j = 4 alpha)};
-codegen T;
diff --git a/omegalib/examples/old_test/stride6.oc-rt b/omegalib/examples/old_test/stride6.oc-rt
deleted file mode 100644
index eeb242f..0000000
--- a/omegalib/examples/old_test/stride6.oc-rt
+++ /dev/null
@@ -1,36 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# Sym n;
-#
-# R := {[i,j]: i >= 1 && i <= 101 &&
-# j >= i && j <=401 && exists (alpha : j = 2 alpha)};
-#
-# codegen R;
-for(t1 = 1; t1 <= 101; t1++) {
- for(t2 = 2*intDiv(t1+1,2); t2 <= 400; t2 += 2) {
- s1(t1,t2);
- }
-}
-
-#
-# S := {[i,j]: i >= 1 && i <= 101 && exists (alpha : i = 2 alpha) &&
-# j >= i && j <=401 && exists (alpha : j = 2 alpha)};
-#
-# codegen S;
-for(t1 = 2; t1 <= 100; t1 += 2) {
- for(t2 = t1; t2 <= 400; t2 += 2) {
- s1(t1,t2);
- }
-}
-
-#
-# T := {[i,j]: i >= 1 && i <= 101 && exists (alpha : i = 2 alpha) &&
-# j >= i && j <=401 && exists (alpha : 2j = 4 alpha)};
-#
-# codegen T;
-for(t1 = 2; t1 <= 100; t1 += 2) {
- for(t2 = t1; t2 <= 400; t2 += 2) {
- s1(t1,t2);
- }
-}
-
-#
diff --git a/omegalib/examples/old_test/stride7 b/omegalib/examples/old_test/stride7
deleted file mode 100644
index 4bfe1cd..0000000
--- a/omegalib/examples/old_test/stride7
+++ /dev/null
@@ -1,6 +0,0 @@
-IS:={[i,j]: 1 <= i,j <= 9};
-T1:={[i,j]->[4j,i,0]};
-T2:={[i,j]->[j,i,1]};
-codegen T1:IS,T2:IS;
-codegen 2 T1:IS,T2:IS;
-
diff --git a/omegalib/examples/old_test/stride7.oc-rt b/omegalib/examples/old_test/stride7.oc-rt
deleted file mode 100644
index 60ac1d4..0000000
--- a/omegalib/examples/old_test/stride7.oc-rt
+++ /dev/null
@@ -1,47 +0,0 @@
->>> IS:={[i,j]: 1 <= i,j <= 9};
->>> T1:={[i,j]->[4j,i,0]};
->>> T2:={[i,j]->[j,i,1]};
->>> codegen T1:IS,T2:IS;
-for(t1 = 1; t1 <= 36; t1++) {
- if (intMod(t1,4) == 0 && t1 <= 8) {
- for(t2 = 1; t2 <= 9; t2++) {
- s1(t2,intDiv(t1,4));
- s2(t2,t1);
- }
- }
- if (intMod(t1,4) == 0 && t1 >= 12) {
- for(t2 = 1; t2 <= 9; t2++) {
- s1(t2,intDiv(t1,4));
- }
- }
- if (t1-3 <= 4*intDiv(t1-1,4) && t1 <= 9) {
- for(t2 = 1; t2 <= 9; t2++) {
- s2(t2,t1);
- }
- }
-}
-
->>> codegen 2 T1:IS,T2:IS;
-for(t1 = 1; t1 <= 8; t1++) {
- if (intMod(t1,4) == 0) {
- for(t2 = 1; t2 <= 9; t2++) {
- s1(t2,intDiv(t1,4));
- s2(t2,t1);
- }
- }
- if (t1-3 <= 4*intDiv(t1-1,4)) {
- for(t2 = 1; t2 <= 9; t2++) {
- s2(t2,t1);
- }
- }
-}
-for(t2 = 1; t2 <= 9; t2++) {
- s2(t2,9);
-}
-for(t1 = 12; t1 <= 36; t1 += 4) {
- for(t2 = 1; t2 <= 9; t2++) {
- s1(t2,intDiv(t1,4));
- }
-}
-
-
diff --git a/omegalib/examples/old_test/subsets1 b/omegalib/examples/old_test/subsets1
deleted file mode 100644
index 1b3721d..0000000
--- a/omegalib/examples/old_test/subsets1
+++ /dev/null
@@ -1,20 +0,0 @@
-R := {[x]:x > 1 };
-R;
-R2 := subsetof R;
-R2;
-
-R - R2;
-R subset R2;
-R2 - R;
-R2 subset R;
-
-S := {[x]: x > 0};
-S - R;
-R subset S;
-S - R2;
-R2 subset S;
-
-S2 := {[x]: x > -1};
-S3 := subsetof S2;
-S3 - S;
-S subset S3;
diff --git a/omegalib/examples/old_test/subsets1.oc-rt b/omegalib/examples/old_test/subsets1.oc-rt
deleted file mode 100644
index 345639f..0000000
--- a/omegalib/examples/old_test/subsets1.oc-rt
+++ /dev/null
@@ -1,70 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# R := {[x]:x > 1 };
-#
-# R;
-
-{[x]: 2 <= x}
-
-#
-# R2 := subsetof R;
-#
-# R2;
-
-{[x]: 2 <= x && UNKNOWN}
-
-#
-#
-# R - R2;
-
-{[x]: 2 <= x && UNKNOWN}
-
-#
-# R subset R2;
-
-False
-#
-# R2 - R;
-
-{[x] : FALSE }
-
-#
-# R2 subset R;
-
-True
-#
-#
-# S := {[x]: x > 0};
-#
-# S - R;
-
-{[1]}
-
-#
-# R subset S;
-
-True
-#
-# S - R2;
-
-{[x]: 2 <= x && UNKNOWN} union
- {[1]}
-
-#
-# R2 subset S;
-
-True
-#
-#
-# S2 := {[x]: x > -1};
-#
-# S3 := subsetof S2;
-#
-# S3 - S;
-
-{[0]: UNKNOWN}
-
-#
-# S subset S3;
-
-False
-#
diff --git a/omegalib/examples/old_test/subsets2 b/omegalib/examples/old_test/subsets2
deleted file mode 100644
index 4d4a98a..0000000
--- a/omegalib/examples/old_test/subsets2
+++ /dev/null
@@ -1,5 +0,0 @@
-(subsetof {[1:10]}) - subsetof {[1:10]};
-
-{[1:10]} - subsetof {[1:10]};
-
-(subsetof {[1:10]}) - {[1:10]};
diff --git a/omegalib/examples/old_test/subsets2.oc-rt b/omegalib/examples/old_test/subsets2.oc-rt
deleted file mode 100644
index 0bbb1c7..0000000
--- a/omegalib/examples/old_test/subsets2.oc-rt
+++ /dev/null
@@ -1,18 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# (subsetof {[1:10]}) - subsetof {[1:10]};
-
-{[In_1]: 1 <= In_1 <= 10 && UNKNOWN}
-
-#
-#
-# {[1:10]} - subsetof {[1:10]};
-
-{[In_1]: 1 <= In_1 <= 10 && UNKNOWN}
-
-#
-#
-# (subsetof {[1:10]}) - {[1:10]};
-
-{[In_1] : FALSE }
-
-#
diff --git a/omegalib/examples/old_test/tex1 b/omegalib/examples/old_test/tex1
deleted file mode 100644
index ca84924..0000000
--- a/omegalib/examples/old_test/tex1
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-# Extract from omega4
-# removed "eqnarray" commands, associated &'s, and overbrace commands
-# added declaration of n
-# added semicolon
-#
-# It would be nice not to have to do the following:
-# removed \ in front of variable names
-#
-
-$$
-symbolic n;
-R := \{\ [ii] \rightarrow [ki] \mid
-1 \leq ii \leq 2n
- \ \land \ 1 \leq ki \leq 2n
-\land ii = ki
-\land ii = ki\\
-\t \land
- \ \neg (\ \exists [ji, jj] \st
-(1 \leq ji \leq 2n \land 1 \leq jj \leq n\!-\!1)
-\land (ii \leq ji \land ji \leq ki) \land (2jj = ki)\ )\\
-\t
-\land \
-\neg (\ \exists [ji, jj] \st
-(1 \leq ji \leq 2n \land 1 \leq jj \leq n\!-\!1)
-\land (ii \leq ji \land ji \leq ki) \land (2jj\!+\!1 = ki)\ )
-\ \}
-;
-
-R;
-$$
-# S := \{\ [\ii] \rightarrow [\ki] \mid
-# 1 \leq \ii \leq 2\n
-# \ \land \ 1 \leq \ki \leq 2\n
-# \land \ii = \ki
-# \land \ii = \ki\\
-# \t \land
-# \ \neg (\ \exists [\ji, \jj] \st
-# (1 \leq \ji \leq 2\n \land 1 \leq \jj \leq \n\!-\!1)
-# \land (\ii \leq \ji \land \ji \leq \ki) \land (2\jj = \ki)\ )\\
-# \t
-# \land \
-# \neg (\ \exists [\ji, \jj] \st
-# (1 \leq \ji \leq 2\n \land 1 \leq \jj \leq \n\!-\!1)
-# \land (\ii \leq \ji \land \ji \leq \ki) \land (2\jj\!+\!1 = \ki)\ )
-# \ \}
-# ;
-#
-# S;
diff --git a/omegalib/examples/old_test/tex1.oc-rt b/omegalib/examples/old_test/tex1.oc-rt
deleted file mode 100644
index fd138d0..0000000
--- a/omegalib/examples/old_test/tex1.oc-rt
+++ /dev/null
@@ -1,58 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# #
-# # Extract from omega4
-# # removed "eqnarray" commands, associated &'s, and overbrace commands
-# # added declaration of n
-# # added semicolon
-# #
-# # It would be nice not to have to do the following:
-# # removed \ in front of variable names
-# #
-#
-# $$
-# symbolic n;
-#
-# R := \{\ [ii] \rightarrow [ki] \mid
-# 1 \leq ii \leq 2n
-# \ \land \ 1 \leq ki \leq 2n
-# \land ii = ki
-# \land ii = ki\\
-# \t \land
-# \ \neg (\ \exists [ji, jj] \st
-# (1 \leq ji \leq 2n \land 1 \leq jj \leq n\!-\!1)
-# \land (ii \leq ji \land ji \leq ki) \land (2jj = ki)\ )\\
-# \t
-# \land \
-# \neg (\ \exists [ji, jj] \st
-# (1 \leq ji \leq 2n \land 1 \leq jj \leq n\!-\!1)
-# \land (ii \leq ji \land ji \leq ki) \land (2jj\!+\!1 = ki)\ )
-# \ \}
-# ;
-#
-#
-# R;
-
-{[ii] -> [ii] : n = 1 && 1 <= ii <= 2} union
- {[2n] -> [2n] : 2 <= n} union
- {[1] -> [1] : 2 <= n}
-
-#
-# $$
-# # S := \{\ [\ii] \rightarrow [\ki] \mid
-# # 1 \leq \ii \leq 2\n
-# # \ \land \ 1 \leq \ki \leq 2\n
-# # \land \ii = \ki
-# # \land \ii = \ki\\
-# # \t \land
-# # \ \neg (\ \exists [\ji, \jj] \st
-# # (1 \leq \ji \leq 2\n \land 1 \leq \jj \leq \n\!-\!1)
-# # \land (\ii \leq \ji \land \ji \leq \ki) \land (2\jj = \ki)\ )\\
-# # \t
-# # \land \
-# # \neg (\ \exists [\ji, \jj] \st
-# # (1 \leq \ji \leq 2\n \land 1 \leq \jj \leq \n\!-\!1)
-# # \land (\ii \leq \ji \land \ji \leq \ki) \land (2\jj\!+\!1 = \ki)\ )
-# # \ \}
-# # ;
-# #
-# # S;
diff --git a/omegalib/examples/old_test/tricky b/omegalib/examples/old_test/tricky
deleted file mode 100644
index d12077c..0000000
--- a/omegalib/examples/old_test/tricky
+++ /dev/null
@@ -1,11 +0,0 @@
-symbolic N,M,k;
-{ [i,j] -> [] : 0 <= i <= M and 0 <= j <= N and 2i+j = k
- and not ( exists [i2,j2] :
- 0 <= i2 <= M and 0 <= j2 <= N
- and 2i2+j2 = k
- and i < i2 ) };
-{ [i,j] -> [] : 0 <= i <= M and 0 <= j <= N and 2i+j = k
- and not ( i < M && 2i-2 <= k &&
- N-k <= 2M
- && ( N-k < k or N <= 2k && (exists a : k = 2 a)
- ))};
diff --git a/omegalib/examples/old_test/tricky.oc-rt b/omegalib/examples/old_test/tricky.oc-rt
deleted file mode 100644
index 8282b7f..0000000
--- a/omegalib/examples/old_test/tricky.oc-rt
+++ /dev/null
@@ -1,25 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# symbolic N,M,k;
-#
-# { [i,j] -> [] : 0 <= i <= M and 0 <= j <= N and 2i+j = k
-# and NOT( exists [i2,j2] :
-# 0 <= i2 <= M and 0 <= j2 <= N
-# and 2i2+j2 = k
-# and i < i2 ) };
-
-{[i,k-2i] -> : 2i <= k <= 2i+1 && 0 <= i <= M && k <= N+2i} union
- {[M,k-2M] -> : 2+2M <= k && k <= N+2M && 0 <= M}
-
-#
-# { [i,j] -> [] : 0 <= i <= M and 0 <= j <= N and 2i+j = k
-# and NOT( i < M && 2i-2 <= k &&
-# N-k <= 2M
-# && ( N-k < k or N <= 2k && (exists a : k = 2 a)
-# ))};
-
-{[i,k-2i] -> : 0 <= i <= M && 2M+k < N && 2i <= k} union
- {[M,k-2M] -> : N <= 2M+k && k <= N+2M && 2M <= k} union
- {[i,k-2i] -> : 2k < N && N <= 2M+k && 0 <= i && 2i <= k} union
- {[i,k-2i] -> : Exists ( alpha : N = 2k && 2i = 1+k+2alpha && 2i+1 <= k <= 2M-1 && 0 <= i)}
-
-#
diff --git a/omegalib/examples/old_test/ts1d-check-sblock b/omegalib/examples/old_test/ts1d-check-sblock
deleted file mode 100644
index 01757ea..0000000
--- a/omegalib/examples/old_test/ts1d-check-sblock
+++ /dev/null
@@ -1,155 +0,0 @@
-# This is the file facts.prew, which is prepended to the .prew files
-# for the particular code generation we want, defines things like the
-# iteration space and dependences. Known facts are inserted by the
-# Makefile.
-#
-# If you're looking at a .w file instead of facts.prew, then you should
-# remember to edit the original .prew files, not the .w files.
-#
-# This facts.prew file describes the program
-#
-# for(i = 0; i <= N-1; i++) {
-# cur[i]=...
-# }
-# for(t = 0; t < T; t++) {
-# for(i = 0; i <= N-1; i++) {
-# old[i]=cur[i];
-# }
-# for(i = 1; i <= N-2; i++) {
-# cur[i] = (old[i-1]+old[i]+old[i]+old[i+1])*0.25;
-# }
-# }
-
-
-
-# first, the spaces and memory maps
-
-symbolic T, N;
-
-IS_INIT := { [1,i,1,0,0] : 0<=i<=N-1 };
-MM_INIT := { [1,i,1,0,0] -> [0,i] : 0<=i<=N-1 };
-
-IS_COPY := { [2,t,0,i,1] : 0<=t<T && 0<=i<=N-1 };
-MM_COPY := { [2,t,0,i,1] -> [t+1,i] : 0<=t<T && 0<=i<=N-1 };
-
-IS_CALC := { [2,t,1,i,1] : 0<=t<T && 0< i< N-1 };
-MM_CALC := { [2,t,1,i,1] -> [t+1,i] : 0<=t<T && 0< i< N-1 };
-
-RESULTS := { [3,0,0,0,0] };
-
-
-# memory-based Output and Flow/anti-dependences (among Assign (copy), and Calc)
-
-FWD5 := {[x,t,y,i,z] -> [x',t',y',i',z'] :
- (x'>x) or
- (x'=x and t'>t) or
- (x'=x and t'=t and y'>y) or
- (x'=x and t'=t and y'=y and i'>i) or
- (x'=x and t'=t and y'=y and i'=i and z'>z) };
-FWD7 := {[x,t,y,i,z,a,b] -> [x',t',y',i',z',a',b'] :
- (x'>x) or
- (x'=x and t'>t) or
- (x'=x and t'=t and y'>y) or
- (x'=x and t'=t and y'=y and i'>i) or
- (x'=x and t'=t and y'=y and i'=i and z'>z) or
- (x'=x and t'=t and y'=y and i'=i and z'=z and a'>a) or
- (x'=x and t'=t and y'=y and i'=i and z'=z and a'=a and b'>b) };
-BWD5 := inverse FWD5;
-BWD7 := inverse FWD7;
-EQi := {[x,t,y,i,z] -> [x',t',y',i',z'] : i'=i };
-
-# output deps
-
-OAA := (IS_COPY * IS_COPY) intersection FWD5 intersection EQi;
-OCC := (IS_CALC * IS_CALC) intersection FWD5 intersection EQi;
-
-# combined flow/anti deps
-
-FAC := (IS_COPY * IS_CALC) intersection FWD5 intersection {[2,t,0,i,1] -> [2,t',1,i',1] : (i'-1<=i<=i'+1)};
-FCA := (IS_CALC * IS_COPY) intersection FWD5 intersection {[2,t,1,i,1] -> [2,t',0,i',1] : (i-1<=i'<=i+1)};
-
-# total memory deps in the "core"
-
-COREMEMDEPS := OAA union OCC union FAC union FCA;
-
-
-
-# data flow for original code:
-
-DF_12p1 := ( IS_INIT * IS_COPY ) intersection {[1,i,1,0,0] -> [2,0,0,i,1] : 0<i<N-1 };
-DF_12p2 := ( IS_INIT * IS_COPY ) intersection {[1,0,1,0,0] -> [2,t,0,0,1] };
-DF_12p3 := ( IS_INIT * IS_COPY ) intersection {[1,i,1,0,0] -> [2,t,0,i,1] : i=N-1 && N>1 };
-DF_32 := ( IS_CALC * IS_COPY ) intersection {[2,t,1,i,1] -> [2,t+1,0,i,1]};
-
-DF_23a := ( IS_COPY * IS_CALC ) intersection {[2,t,0,i,1] -> [2,t,1,i+1,1] };
-DF_23b := ( IS_COPY * IS_CALC ) intersection {[2,t,0,i,1] -> [2,t,1,i,1] };
-DF_23c := ( IS_COPY * IS_CALC ) intersection {[2,t,0,i,1] -> [2,t,1,i-1,1] };
-
-
-# data flow for array expanded code,
-# after forward substitution of "old[i] = cur[i]"
-
-DF1Ia := { [1,i,1,0,0] -> [2,t,1,i+1,1] : t=0 } restrictDomain IS_INIT restrictRange IS_CALC;
-DF1Ib := { [1,i,1,0,0] -> [2,t,1,i+1,1] : t>0 && i=0 } restrictDomain IS_INIT restrictRange IS_CALC;
-DF1C := { [2,t,1,i,1] -> [2,t+1,1,i+1,1] } restrictDomain IS_CALC restrictRange IS_CALC;
-DF2I := { [1,i,1,0,0] -> [2,t,1,i,1] : t=0 } restrictDomain IS_INIT restrictRange IS_CALC;
-DF2C := { [2,t,1,i,1] -> [2,t+1,1,i+0,1] } restrictDomain IS_CALC restrictRange IS_CALC;
-DF3Ia := { [1,i,1,0,0] -> [2,t,1,i-1,1] : t=0 } restrictDomain IS_INIT restrictRange IS_CALC;
-DF3Ib := { [1,i,1,0,0] -> [2,t,1,i-1,1] : t>0 && i=N-1 } restrictDomain IS_INIT restrictRange IS_CALC;
-DF3C := { [2,t,1,i,1] -> [2,t+1,1,i-1,1] } restrictDomain IS_CALC restrictRange IS_CALC;
-
-# total data flow
-
-COREDATAFLOW := DF1C union DF2C union DF3C;
-
-
-# arity expansion relations
-ex_0_5v := { [] -> [a,b,c,d,e] };
-ex_0_7v := { [] -> [a,b,c,d,e,f,g] };
-ex_3_5 := { [a,b,c] -> [a,b,c,0,0] };
-ex_3_7 := { [a,b,c] -> [a,b,c,0,0,0,0] };
-ex_5_7 := { [a,b,c,d,e] -> [a,b,c,d,e,0,0] };
-
-ex_5_3 := { [a,b,c,0,0] -> [a,b,c] };
-ex_7_3 := { [a,b,c,0,0,0,0] -> [a,b,c] };
-ex_7_5 := { [a,b,c,d,e,0,0] -> [a,b,c,d,e] };
-
-
-# stuff used in skew and tskew
-
-# Here is the description of time skewing from the current draft of the paper.
-IS_Trans := { [2,t,1,i,1] -> [2,tb,1,s,1,tt,1] :
- 0<=tt<1000 && s=i+1*t && t=1000*tb+tt };
-
-IS_Tinv := inverse IS_Trans;
-
-# We use it to transform the iteration spaces
-TS_IS_CALC := IS_CALC join IS_Trans;
-# for some reason OC refuses do to this "join" but will do the reverse:
-# TS_IS_INIT := ex_7_5 join IS_INIT;
-TS_IS_INIT := IS_INIT join (inverse ex_7_5);
-
-# Now we can update the data flow relations to correspond to the new I.S.'s
-TS_DF1Ia := ex_7_5 join DF1Ia join IS_Trans;
-TS_DF1Ib := ex_7_5 join DF1Ib join IS_Trans;
-TS_DF1C := IS_Tinv join DF1C join IS_Trans;
-TS_DF2I := ex_7_5 join DF2I join IS_Trans;
-TS_DF2C := IS_Tinv join DF2C join IS_Trans;
-TS_DF3Ia := ex_7_5 join DF3Ia join IS_Trans;
-TS_DF3Ib := ex_7_5 join DF3Ib join IS_Trans;
-TS_DF3C := IS_Tinv join DF3C join IS_Trans;
-
-
-KNOWN := { [] : T >= 0 and N >= 4 };
-
-IS_INIT_EXP := { [1,t,1,i,0] : (0=t && 0<=i<=N-1) ||
- (1=t && 0=i) ||
- (1=t && N-1=i) };
-
-TSKEW := { [2, t, 1, i, 1] -> [2, tb, t+i, tt, 0] :
- 1000*tb+tt = t and 0 <= tt < 1000 };
-
-codegen
- IS_INIT_EXP, TSKEW : IS_CALC
-given (KNOWN join ex_0_5v);
-
diff --git a/omegalib/examples/old_test/ts1d-check-sblock.oc-rt b/omegalib/examples/old_test/ts1d-check-sblock.oc-rt
deleted file mode 100644
index 492fa30..0000000
--- a/omegalib/examples/old_test/ts1d-check-sblock.oc-rt
+++ /dev/null
@@ -1,227 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# # This is the file facts.prew, which is prepended to the .prew files
-# # for the particular code generation we want, defines things like the
-# # iteration space and dependences. Known facts are inserted by the
-# # Makefile.
-# #
-# # If you're looking at a .w file instead of facts.prew, then you should
-# # remember to edit the original .prew files, not the .w files.
-# #
-# # This facts.prew file describes the program
-# #
-# # for(i = 0; i <= N-1; i++) {
-# # cur[i]=...
-# # }
-# # for(t = 0; t < T; t++) {
-# # for(i = 0; i <= N-1; i++) {
-# # old[i]=cur[i];
-# # }
-# # for(i = 1; i <= N-2; i++) {
-# # cur[i] = (old[i-1]+old[i]+old[i]+old[i+1])*0.25;
-# # }
-# # }
-#
-#
-#
-# # first, the spaces and memory maps
-#
-# symbolic T, N;
-#
-#
-# IS_INIT := { [1,i,1,0,0] : 0<=i<=N-1 };
-#
-# MM_INIT := { [1,i,1,0,0] -> [0,i] : 0<=i<=N-1 };
-#
-#
-# IS_COPY := { [2,t,0,i,1] : 0<=t<T && 0<=i<=N-1 };
-#
-# MM_COPY := { [2,t,0,i,1] -> [t+1,i] : 0<=t<T && 0<=i<=N-1 };
-#
-#
-# IS_CALC := { [2,t,1,i,1] : 0<=t<T && 0< i< N-1 };
-#
-# MM_CALC := { [2,t,1,i,1] -> [t+1,i] : 0<=t<T && 0< i< N-1 };
-#
-#
-# RESULTS := { [3,0,0,0,0] };
-#
-#
-#
-# # memory-based Output and Flow/anti-dependences (among Assign (copy), and Calc)
-#
-# FWD5 := {[x,t,y,i,z] -> [x',t',y',i',z'] :
-# (x'>x) or
-# (x'=x and t'>t) or
-# (x'=x and t'=t and y'>y) or
-# (x'=x and t'=t and y'=y and i'>i) or
-# (x'=x and t'=t and y'=y and i'=i and z'>z) };
-#
-# FWD7 := {[x,t,y,i,z,a,b] -> [x',t',y',i',z',a',b'] :
-# (x'>x) or
-# (x'=x and t'>t) or
-# (x'=x and t'=t and y'>y) or
-# (x'=x and t'=t and y'=y and i'>i) or
-# (x'=x and t'=t and y'=y and i'=i and z'>z) or
-# (x'=x and t'=t and y'=y and i'=i and z'=z and a'>a) or
-# (x'=x and t'=t and y'=y and i'=i and z'=z and a'=a and b'>b) };
-#
-# BWD5 := inverse FWD5;
-#
-# BWD7 := inverse FWD7;
-#
-# EQi := {[x,t,y,i,z] -> [x',t',y',i',z'] : i'=i };
-#
-#
-# # output deps
-#
-# OAA := (IS_COPY * IS_COPY) intersection FWD5 intersection EQi;
-#
-# OCC := (IS_CALC * IS_CALC) intersection FWD5 intersection EQi;
-#
-#
-# # combined flow/anti deps
-#
-# FAC := (IS_COPY * IS_CALC) intersection FWD5 intersection {[2,t,0,i,1] -> [2,t',1,i',1] : (i'-1<=i<=i'+1)};
-#
-# FCA := (IS_CALC * IS_COPY) intersection FWD5 intersection {[2,t,1,i,1] -> [2,t',0,i',1] : (i-1<=i'<=i+1)};
-#
-#
-# # total memory deps in the "core"
-#
-# COREMEMDEPS := OAA union OCC union FAC union FCA;
-#
-#
-#
-#
-# # data flow for original code:
-#
-# DF_12p1 := ( IS_INIT * IS_COPY ) intersection {[1,i,1,0,0] -> [2,0,0,i,1] : 0<i<N-1 };
-#
-# DF_12p2 := ( IS_INIT * IS_COPY ) intersection {[1,0,1,0,0] -> [2,t,0,0,1] };
-#
-# DF_12p3 := ( IS_INIT * IS_COPY ) intersection {[1,i,1,0,0] -> [2,t,0,i,1] : i=N-1 && N>1 };
-#
-# DF_32 := ( IS_CALC * IS_COPY ) intersection {[2,t,1,i,1] -> [2,t+1,0,i,1]};
-#
-#
-# DF_23a := ( IS_COPY * IS_CALC ) intersection {[2,t,0,i,1] -> [2,t,1,i+1,1] };
-#
-# DF_23b := ( IS_COPY * IS_CALC ) intersection {[2,t,0,i,1] -> [2,t,1,i,1] };
-#
-# DF_23c := ( IS_COPY * IS_CALC ) intersection {[2,t,0,i,1] -> [2,t,1,i-1,1] };
-#
-#
-#
-# # data flow for array expanded code,
-# # after forward substitution of "old[i] = cur[i]"
-#
-# DF1Ia := { [1,i,1,0,0] -> [2,t,1,i+1,1] : t=0 } restrictDomain IS_INIT restrictRange IS_CALC;
-#
-# DF1Ib := { [1,i,1,0,0] -> [2,t,1,i+1,1] : t>0 && i=0 } restrictDomain IS_INIT restrictRange IS_CALC;
-#
-# DF1C := { [2,t,1,i,1] -> [2,t+1,1,i+1,1] } restrictDomain IS_CALC restrictRange IS_CALC;
-#
-# DF2I := { [1,i,1,0,0] -> [2,t,1,i,1] : t=0 } restrictDomain IS_INIT restrictRange IS_CALC;
-#
-# DF2C := { [2,t,1,i,1] -> [2,t+1,1,i+0,1] } restrictDomain IS_CALC restrictRange IS_CALC;
-#
-# DF3Ia := { [1,i,1,0,0] -> [2,t,1,i-1,1] : t=0 } restrictDomain IS_INIT restrictRange IS_CALC;
-#
-# DF3Ib := { [1,i,1,0,0] -> [2,t,1,i-1,1] : t>0 && i=N-1 } restrictDomain IS_INIT restrictRange IS_CALC;
-#
-# DF3C := { [2,t,1,i,1] -> [2,t+1,1,i-1,1] } restrictDomain IS_CALC restrictRange IS_CALC;
-#
-#
-# # total data flow
-#
-# COREDATAFLOW := DF1C union DF2C union DF3C;
-#
-#
-#
-# # arity expansion relations
-# ex_0_5v := { [] -> [a,b,c,d,e] };
-#
-# ex_0_7v := { [] -> [a,b,c,d,e,f,g] };
-#
-# ex_3_5 := { [a,b,c] -> [a,b,c,0,0] };
-#
-# ex_3_7 := { [a,b,c] -> [a,b,c,0,0,0,0] };
-#
-# ex_5_7 := { [a,b,c,d,e] -> [a,b,c,d,e,0,0] };
-#
-#
-# ex_5_3 := { [a,b,c,0,0] -> [a,b,c] };
-#
-# ex_7_3 := { [a,b,c,0,0,0,0] -> [a,b,c] };
-#
-# ex_7_5 := { [a,b,c,d,e,0,0] -> [a,b,c,d,e] };
-#
-#
-#
-# # stuff used in skew and tskew
-#
-# # Here is the description of time skewing from the current draft of the paper.
-# IS_Trans := { [2,t,1,i,1] -> [2,tb,1,s,1,tt,1] :
-# 0<=tt<1000 && s=i+1*t && t=1000*tb+tt };
-#
-#
-# IS_Tinv := inverse IS_Trans;
-#
-#
-# # We use it to transform the iteration spaces
-# TS_IS_CALC := IS_CALC join IS_Trans;
-#
-# # for some reason OC refuses do to this "join" but will do the reverse:
-# # TS_IS_INIT := ex_7_5 join IS_INIT;
-# TS_IS_INIT := IS_INIT join (inverse ex_7_5);
-#
-#
-# # Now we can update the data flow relations to correspond to the new I.S.'s
-# TS_DF1Ia := ex_7_5 join DF1Ia join IS_Trans;
-#
-# TS_DF1Ib := ex_7_5 join DF1Ib join IS_Trans;
-#
-# TS_DF1C := IS_Tinv join DF1C join IS_Trans;
-#
-# TS_DF2I := ex_7_5 join DF2I join IS_Trans;
-#
-# TS_DF2C := IS_Tinv join DF2C join IS_Trans;
-#
-# TS_DF3Ia := ex_7_5 join DF3Ia join IS_Trans;
-#
-# TS_DF3Ib := ex_7_5 join DF3Ib join IS_Trans;
-#
-# TS_DF3C := IS_Tinv join DF3C join IS_Trans;
-#
-#
-#
-# KNOWN := { [] : T >= 0 and N >= 4 };
-#
-#
-# IS_INIT_EXP := { [1,t,1,i,0] : (0=t && 0<=i<=N-1) ||
-# (1=t && 0=i) ||
-# (1=t && N-1=i) };
-#
-#
-# TSKEW := { [2, t, 1, i, 1] -> [2, tb, t+i, tt, 0] :
-# 1000*tb+tt = t and 0 <= tt < 1000 };
-#
-#
-# codegen
-# IS_INIT_EXP, TSKEW : IS_CALC
-# given (KNOWN join ex_0_5v);
-for(t4 = 0; t4 <= N-1; t4++) {
- s1(1,0,1,t4,0);
-}
-s1(1,1,1,0,0);
-s1(1,1,1,N-1,0);
-for(t2 = 0; t2 <= intDiv(T-1,1000); t2++) {
- for(t3 = 1000*t2+1; t3 <= min(N+1000*t2+997,N+T-3); t3++) {
- for(t4 = max(-N+t3-1000*t2+2,0); t4 <= min(T-1000*t2-1,t3-1000*t2-1,999); t4++) {
- s2(2,t4+1000*t2,1,t3-t4+-1000*t2,1);
- }
- }
-}
-
-#
-#
diff --git a/omegalib/examples/old_test/ts1d-check0 b/omegalib/examples/old_test/ts1d-check0
deleted file mode 100644
index 9db25df..0000000
--- a/omegalib/examples/old_test/ts1d-check0
+++ /dev/null
@@ -1,176 +0,0 @@
-# This is the file facts.prew, which is prepended to the .prew files
-# for the particular code generation we want, defines things like the
-# iteration space and dependences. Known facts are inserted by the
-# Makefile.
-#
-# If you're looking at a .w file instead of facts.prew, then you should
-# remember to edit the original .prew files, not the .w files.
-#
-# This facts.prew file describes the program
-#
-# for(i = 0; i <= N-1; i++) {
-# cur[i]=...
-# }
-# for(t = 0; t < T; t++) {
-# for(i = 0; i <= N-1; i++) {
-# old[i]=cur[i];
-# }
-# for(i = 1; i <= N-2; i++) {
-# cur[i] = (old[i-1]+old[i]+old[i]+old[i+1])*0.25;
-# }
-# }
-
-
-
-# first, the spaces and memory maps
-
-symbolic T, N;
-
-IS_INIT := { [1,i,1,0,0] : 0<=i<=N-1 };
-MM_INIT := { [1,i,1,0,0] -> [0,i] : 0<=i<=N-1 };
-
-IS_COPY := { [2,t,0,i,1] : 0<=t<T && 0<=i<=N-1 };
-MM_COPY := { [2,t,0,i,1] -> [t+1,i] : 0<=t<T && 0<=i<=N-1 };
-
-IS_CALC := { [2,t,1,i,1] : 0<=t<T && 0< i< N-1 };
-MM_CALC := { [2,t,1,i,1] -> [t+1,i] : 0<=t<T && 0< i< N-1 };
-
-RESULTS := { [3,0,0,0,0] };
-
-
-# memory-based Output and Flow/anti-dependences (among Assign (copy), and Calc)
-
-FWD5 := {[x,t,y,i,z] -> [x',t',y',i',z'] :
- (x'>x) or
- (x'=x and t'>t) or
- (x'=x and t'=t and y'>y) or
- (x'=x and t'=t and y'=y and i'>i) or
- (x'=x and t'=t and y'=y and i'=i and z'>z) };
-FWD7 := {[x,t,y,i,z,a,b] -> [x',t',y',i',z',a',b'] :
- (x'>x) or
- (x'=x and t'>t) or
- (x'=x and t'=t and y'>y) or
- (x'=x and t'=t and y'=y and i'>i) or
- (x'=x and t'=t and y'=y and i'=i and z'>z) or
- (x'=x and t'=t and y'=y and i'=i and z'=z and a'>a) or
- (x'=x and t'=t and y'=y and i'=i and z'=z and a'=a and b'>b) };
-BWD5 := inverse FWD5;
-BWD7 := inverse FWD7;
-EQi := {[x,t,y,i,z] -> [x',t',y',i',z'] : i'=i };
-
-# output deps
-
-OAA := (IS_COPY * IS_COPY) intersection FWD5 intersection EQi;
-OCC := (IS_CALC * IS_CALC) intersection FWD5 intersection EQi;
-
-# combined flow/anti deps
-
-FAC := (IS_COPY * IS_CALC) intersection FWD5 intersection {[2,t,0,i,1] -> [2,t',1,i',1] : (i'-1<=i<=i'+1)};
-FCA := (IS_CALC * IS_COPY) intersection FWD5 intersection {[2,t,1,i,1] -> [2,t',0,i',1] : (i-1<=i'<=i+1)};
-
-# total memory deps in the "core"
-
-COREMEMDEPS := OAA union OCC union FAC union FCA;
-
-
-
-# data flow for original code:
-
-DF_12p1 := ( IS_INIT * IS_COPY ) intersection {[1,i,1,0,0] -> [2,0,0,i,1] : 0<i<N-1 };
-DF_12p2 := ( IS_INIT * IS_COPY ) intersection {[1,0,1,0,0] -> [2,t,0,0,1] };
-DF_12p3 := ( IS_INIT * IS_COPY ) intersection {[1,i,1,0,0] -> [2,t,0,i,1] : i=N-1 && N>1 };
-DF_32 := ( IS_CALC * IS_COPY ) intersection {[2,t,1,i,1] -> [2,t+1,0,i,1]};
-
-DF_23a := ( IS_COPY * IS_CALC ) intersection {[2,t,0,i,1] -> [2,t,1,i+1,1] };
-DF_23b := ( IS_COPY * IS_CALC ) intersection {[2,t,0,i,1] -> [2,t,1,i,1] };
-DF_23c := ( IS_COPY * IS_CALC ) intersection {[2,t,0,i,1] -> [2,t,1,i-1,1] };
-
-
-# data flow for array expanded code,
-# after forward substitution of "old[i] = cur[i]"
-
-DF1Ia := { [1,i,1,0,0] -> [2,t,1,i+1,1] : t=0 } restrictDomain IS_INIT restrictRange IS_CALC;
-DF1Ib := { [1,i,1,0,0] -> [2,t,1,i+1,1] : t>0 && i=0 } restrictDomain IS_INIT restrictRange IS_CALC;
-DF1C := { [2,t,1,i,1] -> [2,t+1,1,i+1,1] } restrictDomain IS_CALC restrictRange IS_CALC;
-DF2I := { [1,i,1,0,0] -> [2,t,1,i,1] : t=0 } restrictDomain IS_INIT restrictRange IS_CALC;
-DF2C := { [2,t,1,i,1] -> [2,t+1,1,i+0,1] } restrictDomain IS_CALC restrictRange IS_CALC;
-DF3Ia := { [1,i,1,0,0] -> [2,t,1,i-1,1] : t=0 } restrictDomain IS_INIT restrictRange IS_CALC;
-DF3Ib := { [1,i,1,0,0] -> [2,t,1,i-1,1] : t>0 && i=N-1 } restrictDomain IS_INIT restrictRange IS_CALC;
-DF3C := { [2,t,1,i,1] -> [2,t+1,1,i-1,1] } restrictDomain IS_CALC restrictRange IS_CALC;
-
-# total data flow
-
-COREDATAFLOW := DF1C union DF2C union DF3C;
-
-
-# arity expansion relations
-ex_0_5v := { [] -> [a,b,c,d,e] };
-ex_0_7v := { [] -> [a,b,c,d,e,f,g] };
-ex_3_5 := { [a,b,c] -> [a,b,c,0,0] };
-ex_3_7 := { [a,b,c] -> [a,b,c,0,0,0,0] };
-ex_5_7 := { [a,b,c,d,e] -> [a,b,c,d,e,0,0] };
-
-ex_5_3 := { [a,b,c,0,0] -> [a,b,c] };
-ex_7_3 := { [a,b,c,0,0,0,0] -> [a,b,c] };
-ex_7_5 := { [a,b,c,d,e,0,0] -> [a,b,c,d,e] };
-
-
-# stuff used in skew and tskew
-
-# Here is the description of time skewing from the current draft of the paper.
-IS_Trans := { [2,t,1,i,1] -> [2,tb,1,s,1,tt,1] :
- 0<=tt<1000 && s=i+1*t && t=1000*tb+tt };
-
-IS_Tinv := inverse IS_Trans;
-
-# We use it to transform the iteration spaces
-TS_IS_CALC := IS_CALC join IS_Trans;
-# for some reason OC refuses do to this "join" but will do the reverse:
-# TS_IS_INIT := ex_7_5 join IS_INIT;
-TS_IS_INIT := IS_INIT join (inverse ex_7_5);
-
-# Now we can update the data flow relations to correspond to the new I.S.'s
-TS_DF1Ia := ex_7_5 join DF1Ia join IS_Trans;
-TS_DF1Ib := ex_7_5 join DF1Ib join IS_Trans;
-TS_DF1C := IS_Tinv join DF1C join IS_Trans;
-TS_DF2I := ex_7_5 join DF2I join IS_Trans;
-TS_DF2C := IS_Tinv join DF2C join IS_Trans;
-TS_DF3Ia := ex_7_5 join DF3Ia join IS_Trans;
-TS_DF3Ib := ex_7_5 join DF3Ib join IS_Trans;
-TS_DF3C := IS_Tinv join DF3C join IS_Trans;
-
-
-KNOWN := { [] : T >= 0 and N >= 4 };
-
-# Lets try to build up the equivalent of the time skewing transformation,
-# IS_Trans := { [2,t,1,i,1] -> [2,tb,1,x,1,y,1] :
-# 1000*tb<=t-1<=1000*(tb+1)-1 && y=t-1000*tb && x=y+i };
-# for both statements together, right from the diagram in the new TOPLAS stuff.
-
-# original code without mmap
-#
-
-# First, look at it as a wider space
-
-WIDEN := { [2, t, s, i , 1] -> [2, 2t+s, 0, i, 1] : 0<=s<=1 };
-TSKEW := { [2, t, 0, i , 1] -> [2, tb, t+i, tt, 1] :
- 1000*tb+tt = t and 0 <= tt < 1000 };
-
-TSKEW_2LOOPS := WIDEN join TSKEW;
-# print this for the paper
-
-# I think this should work but it blows up codegen:
-# codegen
-# IS_INIT, TSKEW_2LOOPS : IS_COPY, TSKEW_2LOOPS : IS_CALC
-# given (KNOWN join ex_0_5v);
-
-# So we fake it as follows,
-# relying on the fact that neither "t" nor "s" is used in any statement
-
-WIDEN0 := { [2, t, 0, i , 1] -> [2, 2t, 0, i, 1] };
-WIDEN1 := { [2, t, 1, i , 1] -> [2, 2t+1, 0, i, 1] };
-
-codegen
- IS_INIT, TSKEW : (IS_COPY join WIDEN0) , TSKEW : (IS_CALC join WIDEN1)
-given (KNOWN join ex_0_5v);
-
diff --git a/omegalib/examples/old_test/ts1d-check0.oc-rt b/omegalib/examples/old_test/ts1d-check0.oc-rt
deleted file mode 100644
index a258f26..0000000
--- a/omegalib/examples/old_test/ts1d-check0.oc-rt
+++ /dev/null
@@ -1,260 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# # This is the file facts.prew, which is prepended to the .prew files
-# # for the particular code generation we want, defines things like the
-# # iteration space and dependences. Known facts are inserted by the
-# # Makefile.
-# #
-# # If you're looking at a .w file instead of facts.prew, then you should
-# # remember to edit the original .prew files, not the .w files.
-# #
-# # This facts.prew file describes the program
-# #
-# # for(i = 0; i <= N-1; i++) {
-# # cur[i]=...
-# # }
-# # for(t = 0; t < T; t++) {
-# # for(i = 0; i <= N-1; i++) {
-# # old[i]=cur[i];
-# # }
-# # for(i = 1; i <= N-2; i++) {
-# # cur[i] = (old[i-1]+old[i]+old[i]+old[i+1])*0.25;
-# # }
-# # }
-#
-#
-#
-# # first, the spaces and memory maps
-#
-# symbolic T, N;
-#
-#
-# IS_INIT := { [1,i,1,0,0] : 0<=i<=N-1 };
-#
-# MM_INIT := { [1,i,1,0,0] -> [0,i] : 0<=i<=N-1 };
-#
-#
-# IS_COPY := { [2,t,0,i,1] : 0<=t<T && 0<=i<=N-1 };
-#
-# MM_COPY := { [2,t,0,i,1] -> [t+1,i] : 0<=t<T && 0<=i<=N-1 };
-#
-#
-# IS_CALC := { [2,t,1,i,1] : 0<=t<T && 0< i< N-1 };
-#
-# MM_CALC := { [2,t,1,i,1] -> [t+1,i] : 0<=t<T && 0< i< N-1 };
-#
-#
-# RESULTS := { [3,0,0,0,0] };
-#
-#
-#
-# # memory-based Output and Flow/anti-dependences (among Assign (copy), and Calc)
-#
-# FWD5 := {[x,t,y,i,z] -> [x',t',y',i',z'] :
-# (x'>x) or
-# (x'=x and t'>t) or
-# (x'=x and t'=t and y'>y) or
-# (x'=x and t'=t and y'=y and i'>i) or
-# (x'=x and t'=t and y'=y and i'=i and z'>z) };
-#
-# FWD7 := {[x,t,y,i,z,a,b] -> [x',t',y',i',z',a',b'] :
-# (x'>x) or
-# (x'=x and t'>t) or
-# (x'=x and t'=t and y'>y) or
-# (x'=x and t'=t and y'=y and i'>i) or
-# (x'=x and t'=t and y'=y and i'=i and z'>z) or
-# (x'=x and t'=t and y'=y and i'=i and z'=z and a'>a) or
-# (x'=x and t'=t and y'=y and i'=i and z'=z and a'=a and b'>b) };
-#
-# BWD5 := inverse FWD5;
-#
-# BWD7 := inverse FWD7;
-#
-# EQi := {[x,t,y,i,z] -> [x',t',y',i',z'] : i'=i };
-#
-#
-# # output deps
-#
-# OAA := (IS_COPY * IS_COPY) intersection FWD5 intersection EQi;
-#
-# OCC := (IS_CALC * IS_CALC) intersection FWD5 intersection EQi;
-#
-#
-# # combined flow/anti deps
-#
-# FAC := (IS_COPY * IS_CALC) intersection FWD5 intersection {[2,t,0,i,1] -> [2,t',1,i',1] : (i'-1<=i<=i'+1)};
-#
-# FCA := (IS_CALC * IS_COPY) intersection FWD5 intersection {[2,t,1,i,1] -> [2,t',0,i',1] : (i-1<=i'<=i+1)};
-#
-#
-# # total memory deps in the "core"
-#
-# COREMEMDEPS := OAA union OCC union FAC union FCA;
-#
-#
-#
-#
-# # data flow for original code:
-#
-# DF_12p1 := ( IS_INIT * IS_COPY ) intersection {[1,i,1,0,0] -> [2,0,0,i,1] : 0<i<N-1 };
-#
-# DF_12p2 := ( IS_INIT * IS_COPY ) intersection {[1,0,1,0,0] -> [2,t,0,0,1] };
-#
-# DF_12p3 := ( IS_INIT * IS_COPY ) intersection {[1,i,1,0,0] -> [2,t,0,i,1] : i=N-1 && N>1 };
-#
-# DF_32 := ( IS_CALC * IS_COPY ) intersection {[2,t,1,i,1] -> [2,t+1,0,i,1]};
-#
-#
-# DF_23a := ( IS_COPY * IS_CALC ) intersection {[2,t,0,i,1] -> [2,t,1,i+1,1] };
-#
-# DF_23b := ( IS_COPY * IS_CALC ) intersection {[2,t,0,i,1] -> [2,t,1,i,1] };
-#
-# DF_23c := ( IS_COPY * IS_CALC ) intersection {[2,t,0,i,1] -> [2,t,1,i-1,1] };
-#
-#
-#
-# # data flow for array expanded code,
-# # after forward substitution of "old[i] = cur[i]"
-#
-# DF1Ia := { [1,i,1,0,0] -> [2,t,1,i+1,1] : t=0 } restrictDomain IS_INIT restrictRange IS_CALC;
-#
-# DF1Ib := { [1,i,1,0,0] -> [2,t,1,i+1,1] : t>0 && i=0 } restrictDomain IS_INIT restrictRange IS_CALC;
-#
-# DF1C := { [2,t,1,i,1] -> [2,t+1,1,i+1,1] } restrictDomain IS_CALC restrictRange IS_CALC;
-#
-# DF2I := { [1,i,1,0,0] -> [2,t,1,i,1] : t=0 } restrictDomain IS_INIT restrictRange IS_CALC;
-#
-# DF2C := { [2,t,1,i,1] -> [2,t+1,1,i+0,1] } restrictDomain IS_CALC restrictRange IS_CALC;
-#
-# DF3Ia := { [1,i,1,0,0] -> [2,t,1,i-1,1] : t=0 } restrictDomain IS_INIT restrictRange IS_CALC;
-#
-# DF3Ib := { [1,i,1,0,0] -> [2,t,1,i-1,1] : t>0 && i=N-1 } restrictDomain IS_INIT restrictRange IS_CALC;
-#
-# DF3C := { [2,t,1,i,1] -> [2,t+1,1,i-1,1] } restrictDomain IS_CALC restrictRange IS_CALC;
-#
-#
-# # total data flow
-#
-# COREDATAFLOW := DF1C union DF2C union DF3C;
-#
-#
-#
-# # arity expansion relations
-# ex_0_5v := { [] -> [a,b,c,d,e] };
-#
-# ex_0_7v := { [] -> [a,b,c,d,e,f,g] };
-#
-# ex_3_5 := { [a,b,c] -> [a,b,c,0,0] };
-#
-# ex_3_7 := { [a,b,c] -> [a,b,c,0,0,0,0] };
-#
-# ex_5_7 := { [a,b,c,d,e] -> [a,b,c,d,e,0,0] };
-#
-#
-# ex_5_3 := { [a,b,c,0,0] -> [a,b,c] };
-#
-# ex_7_3 := { [a,b,c,0,0,0,0] -> [a,b,c] };
-#
-# ex_7_5 := { [a,b,c,d,e,0,0] -> [a,b,c,d,e] };
-#
-#
-#
-# # stuff used in skew and tskew
-#
-# # Here is the description of time skewing from the current draft of the paper.
-# IS_Trans := { [2,t,1,i,1] -> [2,tb,1,s,1,tt,1] :
-# 0<=tt<1000 && s=i+1*t && t=1000*tb+tt };
-#
-#
-# IS_Tinv := inverse IS_Trans;
-#
-#
-# # We use it to transform the iteration spaces
-# TS_IS_CALC := IS_CALC join IS_Trans;
-#
-# # for some reason OC refuses do to this "join" but will do the reverse:
-# # TS_IS_INIT := ex_7_5 join IS_INIT;
-# TS_IS_INIT := IS_INIT join (inverse ex_7_5);
-#
-#
-# # Now we can update the data flow relations to correspond to the new I.S.'s
-# TS_DF1Ia := ex_7_5 join DF1Ia join IS_Trans;
-#
-# TS_DF1Ib := ex_7_5 join DF1Ib join IS_Trans;
-#
-# TS_DF1C := IS_Tinv join DF1C join IS_Trans;
-#
-# TS_DF2I := ex_7_5 join DF2I join IS_Trans;
-#
-# TS_DF2C := IS_Tinv join DF2C join IS_Trans;
-#
-# TS_DF3Ia := ex_7_5 join DF3Ia join IS_Trans;
-#
-# TS_DF3Ib := ex_7_5 join DF3Ib join IS_Trans;
-#
-# TS_DF3C := IS_Tinv join DF3C join IS_Trans;
-#
-#
-#
-# KNOWN := { [] : T >= 0 and N >= 4 };
-#
-#
-# # Lets try to build up the equivalent of the time skewing transformation,
-# # IS_Trans := { [2,t,1,i,1] -> [2,tb,1,x,1,y,1] :
-# # 1000*tb<=t-1<=1000*(tb+1)-1 && y=t-1000*tb && x=y+i };
-# # for both statements together, right from the diagram in the new TOPLAS stuff.
-#
-# # original code without mmap
-# #
-#
-# # First, look at it as a wider space
-#
-# WIDEN := { [2, t, s, i , 1] -> [2, 2t+s, 0, i, 1] : 0<=s<=1 };
-#
-# TSKEW := { [2, t, 0, i , 1] -> [2, tb, t+i, tt, 1] :
-# 1000*tb+tt = t and 0 <= tt < 1000 };
-#
-#
-# TSKEW_2LOOPS := WIDEN join TSKEW;
-#
-# # print this for the paper
-#
-# # I think this should work but it blows up codegen:
-# # codegen
-# # IS_INIT, TSKEW_2LOOPS : IS_COPY, TSKEW_2LOOPS : IS_CALC
-# # given (KNOWN join ex_0_5v);
-#
-# # So we fake it as follows,
-# # relying on the fact that neither "t" nor "s" is used in any statement
-#
-# WIDEN0 := { [2, t, 0, i , 1] -> [2, 2t, 0, i, 1] };
-#
-# WIDEN1 := { [2, t, 1, i , 1] -> [2, 2t+1, 0, i, 1] };
-#
-#
-# codegen
-# IS_INIT, TSKEW : (IS_COPY join WIDEN0) , TSKEW : (IS_CALC join WIDEN1)
-# given (KNOWN join ex_0_5v);
-for(t2 = 0; t2 <= N-1; t2++) {
- s1(1,t2,1,0,0);
-}
-for(t2 = 0; t2 <= intDiv(T-1,500); t2++) {
- for(t3 = 1000*t2; t3 <= min(1000*t2+N+997,N+2*T-3); t3++) {
- if (intMod(-N+t3+1,2) == 0 && 1000*t2 <= -N+t3+1) {
- s2(2,t3-N+1,0,N-1,1);
- }
- for(t4 = max(-1000*t2-N+t3+2,0); t4 <= min(-1000*t2+2*T-1,-1000*t2+t3-1,999); t4++) {
- if (intMod(t4,2) == 0) {
- s2(2,t4+1000*t2,0,t3-t4+-1000*t2,1);
- }
- if (intMod(t4+1,2) == 0) {
- s3(2,t4+1000*t2,0,t3-t4+-1000*t2,1);
- }
- }
- if (intMod(t3,2) == 0 && 2*T >= t3+2 && 1000*t2 >= t3-998) {
- s2(2,t3,0,0,1);
- }
- }
-}
-
-#
-#
diff --git a/omegalib/examples/old_test/ts1d-mp-i_ts-m_b b/omegalib/examples/old_test/ts1d-mp-i_ts-m_b
deleted file mode 100644
index f288263..0000000
--- a/omegalib/examples/old_test/ts1d-mp-i_ts-m_b
+++ /dev/null
@@ -1,289 +0,0 @@
-# This is the file facts.prew, which is prepended to the .prew files
-# for the particular code generation we want, defines things like the
-# iteration space and dependences. Known facts are inserted by the
-# Makefile.
-#
-# If you're looking at a .w file instead of facts.prew, then you should
-# remember to edit the original .prew files, not the .w files.
-#
-# This facts.prew file describes the program
-#
-# for(i = 0; i <= N-1; i++) {
-# cur[i]=...
-# }
-# for(t = 0; t < T; t++) {
-# for(i = 0; i <= N-1; i++) {
-# old[i]=cur[i];
-# }
-# for(i = 1; i <= N-2; i++) {
-# cur[i] = (old[i-1]+old[i]+old[i]+old[i+1])*0.25;
-# }
-# }
-
-
-
-# first, the spaces and memory maps
-
-symbolic T, N;
-
-IS_INIT := { [1,i,1,0,0] : 0<=i<=N-1 };
-MM_INIT := { [1,i,1,0,0] -> [0,i] : 0<=i<=N-1 };
-
-IS_COPY := { [2,t,0,i,1] : 0<=t<T && 0<=i<=N-1 };
-MM_COPY := { [2,t,0,i,1] -> [t+1,i] : 0<=t<T && 0<=i<=N-1 };
-
-IS_CALC := { [2,t,1,i,1] : 0<=t<T && 0< i< N-1 };
-MM_CALC := { [2,t,1,i,1] -> [t+1,i] : 0<=t<T && 0< i< N-1 };
-
-RESULTS := { [3,0,0,0,0] };
-
-
-# memory-based Output and Flow/anti-dependences (among Assign (copy), and Calc)
-
-FWD5 := {[x,t,y,i,z] -> [x',t',y',i',z'] :
- (x'>x) or
- (x'=x and t'>t) or
- (x'=x and t'=t and y'>y) or
- (x'=x and t'=t and y'=y and i'>i) or
- (x'=x and t'=t and y'=y and i'=i and z'>z) };
-FWD7 := {[x,t,y,i,z,a,b] -> [x',t',y',i',z',a',b'] :
- (x'>x) or
- (x'=x and t'>t) or
- (x'=x and t'=t and y'>y) or
- (x'=x and t'=t and y'=y and i'>i) or
- (x'=x and t'=t and y'=y and i'=i and z'>z) or
- (x'=x and t'=t and y'=y and i'=i and z'=z and a'>a) or
- (x'=x and t'=t and y'=y and i'=i and z'=z and a'=a and b'>b) };
-BWD5 := inverse FWD5;
-BWD7 := inverse FWD7;
-EQi := {[x,t,y,i,z] -> [x',t',y',i',z'] : i'=i };
-
-# output deps
-
-OAA := (IS_COPY * IS_COPY) intersection FWD5 intersection EQi;
-OCC := (IS_CALC * IS_CALC) intersection FWD5 intersection EQi;
-
-# combined flow/anti deps
-
-FAC := (IS_COPY * IS_CALC) intersection FWD5 intersection {[2,t,0,i,1] -> [2,t',1,i',1] : (i'-1<=i<=i'+1)};
-FCA := (IS_CALC * IS_COPY) intersection FWD5 intersection {[2,t,1,i,1] -> [2,t',0,i',1] : (i-1<=i'<=i+1)};
-
-# total memory deps in the "core"
-
-COREMEMDEPS := OAA union OCC union FAC union FCA;
-
-
-
-# data flow for original code:
-
-DF_12p1 := ( IS_INIT * IS_COPY ) intersection {[1,i,1,0,0] -> [2,0,0,i,1] : 0<i<N-1 };
-DF_12p2 := ( IS_INIT * IS_COPY ) intersection {[1,0,1,0,0] -> [2,t,0,0,1] };
-DF_12p3 := ( IS_INIT * IS_COPY ) intersection {[1,i,1,0,0] -> [2,t,0,i,1] : i=N-1 && N>1 };
-DF_32 := ( IS_CALC * IS_COPY ) intersection {[2,t,1,i,1] -> [2,t+1,0,i,1]};
-
-DF_23a := ( IS_COPY * IS_CALC ) intersection {[2,t,0,i,1] -> [2,t,1,i+1,1] };
-DF_23b := ( IS_COPY * IS_CALC ) intersection {[2,t,0,i,1] -> [2,t,1,i,1] };
-DF_23c := ( IS_COPY * IS_CALC ) intersection {[2,t,0,i,1] -> [2,t,1,i-1,1] };
-
-
-# data flow for array expanded code,
-# after forward substitution of "old[i] = cur[i]"
-
-DF1Ia := { [1,i,1,0,0] -> [2,t,1,i+1,1] : t=0 } restrictDomain IS_INIT restrictRange IS_CALC;
-DF1Ib := { [1,i,1,0,0] -> [2,t,1,i+1,1] : t>0 && i=0 } restrictDomain IS_INIT restrictRange IS_CALC;
-DF1C := { [2,t,1,i,1] -> [2,t+1,1,i+1,1] } restrictDomain IS_CALC restrictRange IS_CALC;
-DF2I := { [1,i,1,0,0] -> [2,t,1,i,1] : t=0 } restrictDomain IS_INIT restrictRange IS_CALC;
-DF2C := { [2,t,1,i,1] -> [2,t+1,1,i+0,1] } restrictDomain IS_CALC restrictRange IS_CALC;
-DF3Ia := { [1,i,1,0,0] -> [2,t,1,i-1,1] : t=0 } restrictDomain IS_INIT restrictRange IS_CALC;
-DF3Ib := { [1,i,1,0,0] -> [2,t,1,i-1,1] : t>0 && i=N-1 } restrictDomain IS_INIT restrictRange IS_CALC;
-DF3C := { [2,t,1,i,1] -> [2,t+1,1,i-1,1] } restrictDomain IS_CALC restrictRange IS_CALC;
-
-# total data flow
-
-COREDATAFLOW := DF1C union DF2C union DF3C;
-
-
-# arity expansion relations
-ex_0_5v := { [] -> [a,b,c,d,e] };
-ex_0_7v := { [] -> [a,b,c,d,e,f,g] };
-ex_3_5 := { [a,b,c] -> [a,b,c,0,0] };
-ex_3_7 := { [a,b,c] -> [a,b,c,0,0,0,0] };
-ex_5_7 := { [a,b,c,d,e] -> [a,b,c,d,e,0,0] };
-
-ex_5_3 := { [a,b,c,0,0] -> [a,b,c] };
-ex_7_3 := { [a,b,c,0,0,0,0] -> [a,b,c] };
-ex_7_5 := { [a,b,c,d,e,0,0] -> [a,b,c,d,e] };
-
-
-# stuff used in skew and tskew
-
-# Here is the description of time skewing from the current draft of the paper.
-IS_Trans := { [2,t,1,i,1] -> [2,tb,1,s,1,tt,1] :
- 0<=tt<500 && s=i+1*t && t=500*tb+tt };
-
-IS_Tinv := inverse IS_Trans;
-
-# We use it to transform the iteration spaces
-TS_IS_CALC := IS_CALC join IS_Trans;
-# for some reason OC refuses do to this "join" but will do the reverse:
-# TS_IS_INIT := ex_7_5 join IS_INIT;
-TS_IS_INIT := IS_INIT join (inverse ex_7_5);
-
-# Now we can update the data flow relations to correspond to the new I.S.'s
-TS_DF1Ia := ex_7_5 join DF1Ia join IS_Trans;
-TS_DF1Ib := ex_7_5 join DF1Ib join IS_Trans;
-TS_DF1C := IS_Tinv join DF1C join IS_Trans;
-TS_DF2I := ex_7_5 join DF2I join IS_Trans;
-TS_DF2C := IS_Tinv join DF2C join IS_Trans;
-TS_DF3Ia := ex_7_5 join DF3Ia join IS_Trans;
-TS_DF3Ib := ex_7_5 join DF3Ib join IS_Trans;
-TS_DF3C := IS_Tinv join DF3C join IS_Trans;
-
-
-KNOWN := { [] : T >= 0 and N >= 4 };
-
-#
-# multiprocessor version
-# time skewed iteration space
-# blocked memory mapping
-#
-
-#
-# First of all, if 500 is much less than 4000,
-# there's a problem with the constraints below.
-# To keep send and recv. slices from "crashing", 4000>=2BS+2 (safe approx?)
-#
-
-assertUnsatisfiable( { [] : 4000 < 2 * 500 + 2 } );
-
-# this transformation has no existentially quantified variables;
-# basically, it factors out the common stuff below,
-# but the quantified variables are left in the output, so we can get them
-# everything after the 000 is not needed in final xform
-
-#
-# DANGER WILL ROBINSON!
-# the .c file depends on the fact that t4 is always the processor number
-#
-
-MP_TSKEW_ALL := { [2, t, 1, i, 1] ->
- [2, tb, slice, proc, t+i, tt, 000, t, i, lproc, t0, i0, ie]:
-##
-## define time block and tt
-##
- 500*tb+tt = t and 0 <= tt < 500
-##
-## define "logical proc", then "wrap" onto physical later:
-## "logical proc" (lproc) = (t-i) div sigma
-##
- and 4000*lproc <= t-i < 4000*(lproc+1)
-##
-## for uniproc. test, just do proc = -lproc (for multi, proc = lproc % 8)
-##
- and proc = -lproc
-##
-## t0,i0 = first iteration in a block;
-## t0,ie = maximum "i" in t0 of this block)
-##
- and t0=500*tb
- and t0-ie=4000*lproc
- and i0+4000-1=ie
-};
-
-#
-# We need to send things "down" (to same time block of next proc.)
-# and "right" (to next time block of next proc.)
-# The "+2" is for the things to send right (not mentioned in IPDPS paper).
-#
-
-MP_TSKEW_SEND_SL := MP_TSKEW_ALL join
- { [2, tb, slice, proc, t_p_i, tt, 000, t, i, lproc, t0, i0, ie] ->
- [2, tb, 1, proc, t_p_i, tt, 0] :
-## define send slice...
- (t+i) <= (t0+(500-2) + i0+(500-1) + 2)
-};
-
-MP_TSKEW_SEND_ME := MP_TSKEW_ALL join
- { [2, tb, slice, proc, t_p_i, tt, 000, t, i, lproc, t0, i0, ie] ->
- [2, tb, 2, proc, t_p_i, tt, 0] :
-## in the send slice
- (t+i) <= (t0+(500-2) + i0+(500-1) + 2)
-## and near the (t-i) border:
- and (t-i) >= ((t0-i0)-1)
-};
-
-MP_TSKEW_COMP_SL := MP_TSKEW_ALL join
- { [2, tb, slice, proc, t_p_i, tt, 000, t, i, lproc, t0, i0, ie] ->
- [2, tb, 3, proc, t_p_i, tt, 0] :
-## define computation slice...
-## not send
- (t+i) > (t0+(500-2) + i0+(500-1) + 2)
-## and not recv
- and (t+i) <= (t0+ie)
-};
-
-
-
-# Receive the iterations that we sent,
-# but after the calculation,
-# and on the neighbor (lower) processor
-
-MP_TSKEW_R_FROM_ME := MP_TSKEW_SEND_ME join
- { [2, tb, 2, proc, t_p_i, tt, 0] ->
- [2, tb, 4, proc-1, t_p_i, tt, 0] };
-
-
-MP_TSKEW_RECV_SL := MP_TSKEW_ALL join
- { [2, tb, slice, proc, t_p_i, tt, 000, t, i, lproc, t0, i0, ie] ->
- [2, tb, 5, proc, t_p_i, tt, 0] :
-## define recv slice...
- (t+i) > (t0+ie)
-};
-
-
-
-
-## stuff to gather each processor's final results...
-
-IS_GATHER := IS_CALC intersection { [2,t,1,i,1] : t=T-1 };
-
-GATHER_EXPANDER := MP_TSKEW_ALL join
- { [2, tb, slice, proc, t_p_i, tt, 000, t, i, lproc, t0, i0, ie] ->
- [3, tb, 7, proc, t_p_i, tt, 0] };
-
-## stuff to initialize things right in the first place
-
-### NOTE THAT t4 (processor #) is used in a loop in initialization
-
-IS_INIT_EXP := { [1,t,i,0,0] : (-1=t && 0<=i<=N-1) ||
- (0<=t<T && 0=i) ||
- (0<=t<T && N-1=i) };
-
-
-# send_slice + calc_slice + recv slice == total
-
-TheSendIS := domain(MP_TSKEW_SEND_SL restrictDomain IS_CALC);
-TheCompIS := domain(MP_TSKEW_COMP_SL restrictDomain IS_CALC);
-TheRecvIS := domain(MP_TSKEW_RECV_SL restrictDomain IS_CALC);
-
-assertUnsatisfiable(TheSendIS intersection TheCompIS);
-assertUnsatisfiable(TheCompIS intersection TheRecvIS);
-assertUnsatisfiable(TheSendIS intersection TheRecvIS);
-#
-# These cause inexact negation and thus blow up...
-#
-# assertUnsatisfiable(IS_CALC - (TheSendIS union TheCompIS union TheRecvIS));
-# assertUnsatisfiable((TheSendIS union TheCompIS union TheRecvIS) - IS_CALC);
-
-
-
-codegen
- ex_5_7 : IS_INIT_EXP,
- MP_TSKEW_SEND_SL : IS_CALC,
- MP_TSKEW_SEND_ME : IS_CALC,
- MP_TSKEW_COMP_SL : IS_CALC,
- MP_TSKEW_R_FROM_ME : IS_CALC,
- MP_TSKEW_RECV_SL : IS_CALC,
- GATHER_EXPANDER : IS_GATHER
-given (KNOWN join ex_0_7v);
-
diff --git a/omegalib/examples/old_test/ts1d-mp-i_ts-m_b.oc-rt b/omegalib/examples/old_test/ts1d-mp-i_ts-m_b.oc-rt
deleted file mode 100644
index 6d3ef2a..0000000
--- a/omegalib/examples/old_test/ts1d-mp-i_ts-m_b.oc-rt
+++ /dev/null
@@ -1,430 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# # This is the file facts.prew, which is prepended to the .prew files
-# # for the particular code generation we want, defines things like the
-# # iteration space and dependences. Known facts are inserted by the
-# # Makefile.
-# #
-# # If you're looking at a .w file instead of facts.prew, then you should
-# # remember to edit the original .prew files, not the .w files.
-# #
-# # This facts.prew file describes the program
-# #
-# # for(i = 0; i <= N-1; i++) {
-# # cur[i]=...
-# # }
-# # for(t = 0; t < T; t++) {
-# # for(i = 0; i <= N-1; i++) {
-# # old[i]=cur[i];
-# # }
-# # for(i = 1; i <= N-2; i++) {
-# # cur[i] = (old[i-1]+old[i]+old[i]+old[i+1])*0.25;
-# # }
-# # }
-#
-#
-#
-# # first, the spaces and memory maps
-#
-# symbolic T, N;
-#
-#
-# IS_INIT := { [1,i,1,0,0] : 0<=i<=N-1 };
-#
-# MM_INIT := { [1,i,1,0,0] -> [0,i] : 0<=i<=N-1 };
-#
-#
-# IS_COPY := { [2,t,0,i,1] : 0<=t<T && 0<=i<=N-1 };
-#
-# MM_COPY := { [2,t,0,i,1] -> [t+1,i] : 0<=t<T && 0<=i<=N-1 };
-#
-#
-# IS_CALC := { [2,t,1,i,1] : 0<=t<T && 0< i< N-1 };
-#
-# MM_CALC := { [2,t,1,i,1] -> [t+1,i] : 0<=t<T && 0< i< N-1 };
-#
-#
-# RESULTS := { [3,0,0,0,0] };
-#
-#
-#
-# # memory-based Output and Flow/anti-dependences (among Assign (copy), and Calc)
-#
-# FWD5 := {[x,t,y,i,z] -> [x',t',y',i',z'] :
-# (x'>x) or
-# (x'=x and t'>t) or
-# (x'=x and t'=t and y'>y) or
-# (x'=x and t'=t and y'=y and i'>i) or
-# (x'=x and t'=t and y'=y and i'=i and z'>z) };
-#
-# FWD7 := {[x,t,y,i,z,a,b] -> [x',t',y',i',z',a',b'] :
-# (x'>x) or
-# (x'=x and t'>t) or
-# (x'=x and t'=t and y'>y) or
-# (x'=x and t'=t and y'=y and i'>i) or
-# (x'=x and t'=t and y'=y and i'=i and z'>z) or
-# (x'=x and t'=t and y'=y and i'=i and z'=z and a'>a) or
-# (x'=x and t'=t and y'=y and i'=i and z'=z and a'=a and b'>b) };
-#
-# BWD5 := inverse FWD5;
-#
-# BWD7 := inverse FWD7;
-#
-# EQi := {[x,t,y,i,z] -> [x',t',y',i',z'] : i'=i };
-#
-#
-# # output deps
-#
-# OAA := (IS_COPY * IS_COPY) intersection FWD5 intersection EQi;
-#
-# OCC := (IS_CALC * IS_CALC) intersection FWD5 intersection EQi;
-#
-#
-# # combined flow/anti deps
-#
-# FAC := (IS_COPY * IS_CALC) intersection FWD5 intersection {[2,t,0,i,1] -> [2,t',1,i',1] : (i'-1<=i<=i'+1)};
-#
-# FCA := (IS_CALC * IS_COPY) intersection FWD5 intersection {[2,t,1,i,1] -> [2,t',0,i',1] : (i-1<=i'<=i+1)};
-#
-#
-# # total memory deps in the "core"
-#
-# COREMEMDEPS := OAA union OCC union FAC union FCA;
-#
-#
-#
-#
-# # data flow for original code:
-#
-# DF_12p1 := ( IS_INIT * IS_COPY ) intersection {[1,i,1,0,0] -> [2,0,0,i,1] : 0<i<N-1 };
-#
-# DF_12p2 := ( IS_INIT * IS_COPY ) intersection {[1,0,1,0,0] -> [2,t,0,0,1] };
-#
-# DF_12p3 := ( IS_INIT * IS_COPY ) intersection {[1,i,1,0,0] -> [2,t,0,i,1] : i=N-1 && N>1 };
-#
-# DF_32 := ( IS_CALC * IS_COPY ) intersection {[2,t,1,i,1] -> [2,t+1,0,i,1]};
-#
-#
-# DF_23a := ( IS_COPY * IS_CALC ) intersection {[2,t,0,i,1] -> [2,t,1,i+1,1] };
-#
-# DF_23b := ( IS_COPY * IS_CALC ) intersection {[2,t,0,i,1] -> [2,t,1,i,1] };
-#
-# DF_23c := ( IS_COPY * IS_CALC ) intersection {[2,t,0,i,1] -> [2,t,1,i-1,1] };
-#
-#
-#
-# # data flow for array expanded code,
-# # after forward substitution of "old[i] = cur[i]"
-#
-# DF1Ia := { [1,i,1,0,0] -> [2,t,1,i+1,1] : t=0 } restrictDomain IS_INIT restrictRange IS_CALC;
-#
-# DF1Ib := { [1,i,1,0,0] -> [2,t,1,i+1,1] : t>0 && i=0 } restrictDomain IS_INIT restrictRange IS_CALC;
-#
-# DF1C := { [2,t,1,i,1] -> [2,t+1,1,i+1,1] } restrictDomain IS_CALC restrictRange IS_CALC;
-#
-# DF2I := { [1,i,1,0,0] -> [2,t,1,i,1] : t=0 } restrictDomain IS_INIT restrictRange IS_CALC;
-#
-# DF2C := { [2,t,1,i,1] -> [2,t+1,1,i+0,1] } restrictDomain IS_CALC restrictRange IS_CALC;
-#
-# DF3Ia := { [1,i,1,0,0] -> [2,t,1,i-1,1] : t=0 } restrictDomain IS_INIT restrictRange IS_CALC;
-#
-# DF3Ib := { [1,i,1,0,0] -> [2,t,1,i-1,1] : t>0 && i=N-1 } restrictDomain IS_INIT restrictRange IS_CALC;
-#
-# DF3C := { [2,t,1,i,1] -> [2,t+1,1,i-1,1] } restrictDomain IS_CALC restrictRange IS_CALC;
-#
-#
-# # total data flow
-#
-# COREDATAFLOW := DF1C union DF2C union DF3C;
-#
-#
-#
-# # arity expansion relations
-# ex_0_5v := { [] -> [a,b,c,d,e] };
-#
-# ex_0_7v := { [] -> [a,b,c,d,e,f,g] };
-#
-# ex_3_5 := { [a,b,c] -> [a,b,c,0,0] };
-#
-# ex_3_7 := { [a,b,c] -> [a,b,c,0,0,0,0] };
-#
-# ex_5_7 := { [a,b,c,d,e] -> [a,b,c,d,e,0,0] };
-#
-#
-# ex_5_3 := { [a,b,c,0,0] -> [a,b,c] };
-#
-# ex_7_3 := { [a,b,c,0,0,0,0] -> [a,b,c] };
-#
-# ex_7_5 := { [a,b,c,d,e,0,0] -> [a,b,c,d,e] };
-#
-#
-#
-# # stuff used in skew and tskew
-#
-# # Here is the description of time skewing from the current draft of the paper.
-# IS_Trans := { [2,t,1,i,1] -> [2,tb,1,s,1,tt,1] :
-# 0<=tt<500 && s=i+1*t && t=500*tb+tt };
-#
-#
-# IS_Tinv := inverse IS_Trans;
-#
-#
-# # We use it to transform the iteration spaces
-# TS_IS_CALC := IS_CALC join IS_Trans;
-#
-# # for some reason OC refuses do to this "join" but will do the reverse:
-# # TS_IS_INIT := ex_7_5 join IS_INIT;
-# TS_IS_INIT := IS_INIT join (inverse ex_7_5);
-#
-#
-# # Now we can update the data flow relations to correspond to the new I.S.'s
-# TS_DF1Ia := ex_7_5 join DF1Ia join IS_Trans;
-#
-# TS_DF1Ib := ex_7_5 join DF1Ib join IS_Trans;
-#
-# TS_DF1C := IS_Tinv join DF1C join IS_Trans;
-#
-# TS_DF2I := ex_7_5 join DF2I join IS_Trans;
-#
-# TS_DF2C := IS_Tinv join DF2C join IS_Trans;
-#
-# TS_DF3Ia := ex_7_5 join DF3Ia join IS_Trans;
-#
-# TS_DF3Ib := ex_7_5 join DF3Ib join IS_Trans;
-#
-# TS_DF3C := IS_Tinv join DF3C join IS_Trans;
-#
-#
-#
-# KNOWN := { [] : T >= 0 and N >= 4 };
-#
-#
-# #
-# # multiprocessor version
-# # time skewed iteration space
-# # blocked memory mapping
-# #
-#
-# #
-# # First of all, if 500 is much less than 4000,
-# # there's a problem with the constraints below.
-# # To keep send and recv. slices from "crashing", 4000>=2BS+2 (safe approx?)
-# #
-#
-# assertUnsatisfiable( { [] : 4000 < 2 * 500 + 2 } );
-
-{ FALSE }
-
-#
-#
-# # this transformation has no existentially quantified variables;
-# # basically, it factors out the common stuff below,
-# # but the quantified variables are left in the output, so we can get them
-# # everything after the 000 is not needed in final xform
-#
-# #
-# # DANGER WILL ROBINSON!
-# # the .c file depends on the fact that t4 is always the processor number
-# #
-#
-# MP_TSKEW_ALL := { [2, t, 1, i, 1] ->
-# [2, tb, slice, proc, t+i, tt, 000, t, i, lproc, t0, i0, ie]:
-# ##
-# ## define time block and tt
-# ##
-# 500*tb+tt = t and 0 <= tt < 500
-# ##
-# ## define "logical proc", then "wrap" onto physical later:
-# ## "logical proc" (lproc) = (t-i) div sigma
-# ##
-# and 4000*lproc <= t-i < 4000*(lproc+1)
-# ##
-# ## for uniproc. test, just do proc = -lproc (for multi, proc = lproc % 8)
-# ##
-# and proc = -lproc
-# ##
-# ## t0,i0 = first iteration in a block;
-# ## t0,ie = maximum "i" in t0 of this block)
-# ##
-# and t0=500*tb
-# and t0-ie=4000*lproc
-# and i0+4000-1=ie
-# };
-#
-#
-# #
-# # We need to send things "down" (to same time block of next proc.)
-# # and "right" (to next time block of next proc.)
-# # The "+2" is for the things to send right (not mentioned in IPDPS paper).
-# #
-#
-# MP_TSKEW_SEND_SL := MP_TSKEW_ALL join
-# { [2, tb, slice, proc, t_p_i, tt, 000, t, i, lproc, t0, i0, ie] ->
-# [2, tb, 1, proc, t_p_i, tt, 0] :
-# ## define send slice...
-# (t+i) <= (t0+(500-2) + i0+(500-1) + 2)
-# };
-#
-#
-# MP_TSKEW_SEND_ME := MP_TSKEW_ALL join
-# { [2, tb, slice, proc, t_p_i, tt, 000, t, i, lproc, t0, i0, ie] ->
-# [2, tb, 2, proc, t_p_i, tt, 0] :
-# ## in the send slice
-# (t+i) <= (t0+(500-2) + i0+(500-1) + 2)
-# ## and near the (t-i) border:
-# and (t-i) >= ((t0-i0)-1)
-# };
-#
-#
-# MP_TSKEW_COMP_SL := MP_TSKEW_ALL join
-# { [2, tb, slice, proc, t_p_i, tt, 000, t, i, lproc, t0, i0, ie] ->
-# [2, tb, 3, proc, t_p_i, tt, 0] :
-# ## define computation slice...
-# ## not send
-# (t+i) > (t0+(500-2) + i0+(500-1) + 2)
-# ## and not recv
-# and (t+i) <= (t0+ie)
-# };
-#
-#
-#
-#
-# # Receive the iterations that we sent,
-# # but after the calculation,
-# # and on the neighbor (lower) processor
-#
-# MP_TSKEW_R_FROM_ME := MP_TSKEW_SEND_ME join
-# { [2, tb, 2, proc, t_p_i, tt, 0] ->
-# [2, tb, 4, proc-1, t_p_i, tt, 0] };
-#
-#
-#
-# MP_TSKEW_RECV_SL := MP_TSKEW_ALL join
-# { [2, tb, slice, proc, t_p_i, tt, 000, t, i, lproc, t0, i0, ie] ->
-# [2, tb, 5, proc, t_p_i, tt, 0] :
-# ## define recv slice...
-# (t+i) > (t0+ie)
-# };
-#
-#
-#
-#
-#
-# ## stuff to gather each processor's final results...
-#
-# IS_GATHER := IS_CALC intersection { [2,t,1,i,1] : t=T-1 };
-#
-#
-# GATHER_EXPANDER := MP_TSKEW_ALL join
-# { [2, tb, slice, proc, t_p_i, tt, 000, t, i, lproc, t0, i0, ie] ->
-# [3, tb, 7, proc, t_p_i, tt, 0] };
-#
-#
-# ## stuff to initialize things right in the first place
-#
-# ### NOTE THAT t4 (processor #) is used in a loop in initialization
-#
-# IS_INIT_EXP := { [1,t,i,0,0] : (-1=t && 0<=i<=N-1) ||
-# (0<=t<T && 0=i) ||
-# (0<=t<T && N-1=i) };
-#
-#
-#
-# # send_slice + calc_slice + recv slice == total
-#
-# TheSendIS := domain(MP_TSKEW_SEND_SL restrictDomain IS_CALC);
-#
-# TheCompIS := domain(MP_TSKEW_COMP_SL restrictDomain IS_CALC);
-#
-# TheRecvIS := domain(MP_TSKEW_RECV_SL restrictDomain IS_CALC);
-#
-#
-# assertUnsatisfiable(TheSendIS intersection TheCompIS);
-
-{[In_1,t,In_3,i,In_5] : FALSE }
-
-#
-# assertUnsatisfiable(TheCompIS intersection TheRecvIS);
-
-{[In_1,t,In_3,i,In_5] : FALSE }
-
-#
-# assertUnsatisfiable(TheSendIS intersection TheRecvIS);
-
-{[In_1,t,In_3,i,In_5] : FALSE }
-
-#
-# #
-# # These cause inexact negation and thus blow up...
-# #
-# # assertUnsatisfiable(IS_CALC - (TheSendIS union TheCompIS union TheRecvIS));
-# # assertUnsatisfiable((TheSendIS union TheCompIS union TheRecvIS) - IS_CALC);
-#
-#
-#
-# codegen
-# ex_5_7 : IS_INIT_EXP,
-# MP_TSKEW_SEND_SL : IS_CALC,
-# MP_TSKEW_SEND_ME : IS_CALC,
-# MP_TSKEW_COMP_SL : IS_CALC,
-# MP_TSKEW_R_FROM_ME : IS_CALC,
-# MP_TSKEW_RECV_SL : IS_CALC,
-# GATHER_EXPANDER : IS_GATHER
-# given (KNOWN join ex_0_7v);
-for(t3 = 0; t3 <= N-1; t3++) {
- s1(1,-1,t3,0,0);
-}
-for(t2 = 0; t2 <= T-1; t2++) {
- s1(1,t2,0,0,0);
- s1(1,t2,N-1,0,0);
-}
-for(t2 = 0; t2 <= intDiv(T-1,500); t2++) {
- for(t4 = intDiv(-t2+7+7,8); t4 <= intDiv(-500*t2+N+3997,4000); t4++) {
- for(t5 = max(1000*t2+4000*t4-3999,500*t2+1); t5 <= min(1000*t2+4000*t4-3000,N+T-3,2*N-4000*t4+3995); t5++) {
- for(t6 = max(-N+t5-500*t2+2,0); t6 <= min(t5-500*t2-1,T-500*t2-1,intDiv(t5-4000*t4-1000*t2+3999,2)); t6++) {
- s2(2,500*t2+t6,1,t5+-500*t2-t6,1);
- }
- }
- }
- for(t4 = max(intDiv(-T+4000+3999,4000),intDiv(-t2+7+7,8)); t4 <= intDiv(-500*t2+N+3997,4000); t4++) {
- for(t5 = max(1000*t2+4000*t4-3999,-4000*t4+4000); t5 <= min(1000*t2+4000*t4-3000,2*N-4000*t4+3995,2*T+4000*t4-4000); t5++) {
- for(t6 = intDiv(t5-4000*t4-1000*t2+3998+1,2); t6 <= intDiv(t5-4000*t4-1000*t2+3999,2); t6++) {
- s3(2,500*t2+t6,1,t5+-500*t2-t6,1);
- }
- }
- }
- for(t4 = intDiv(-t2+1+7,8); t4 <= min(intDiv(-500*t2+N+3496,4000),intDiv(-1000*t2+N+T+2996,4000)); t4++) {
- for(t5 = max(500*t2+1,4000*t4+1000*t2-2999); t5 <= min(N+T-3,4000*t4+1000*t2,N+500*t2+497); t5++) {
- for(t6 = max(-N+t5-500*t2+2,0); t6 <= min(T-500*t2-1,t5-500*t2-1,499); t6++) {
- s4(2,500*t2+t6,1,t5+-500*t2-t6,1);
- }
- }
- }
- for(t4 = max(intDiv(-T+3999,4000),intDiv(-t2-1+7,8)); t4 <= intDiv(-500*t2+N-3,4000); t4++) {
- for(t5 = max(1000*t2+4000*t4+1,-4000*t4); t5 <= min(1000*t2+4000*t4+1000,2*N-4000*t4-5,2*T+4000*t4); t5++) {
- for(t6 = intDiv(-1000*t2-4000*t4+t5-2+1,2); t6 <= intDiv(-1000*t2-4000*t4+t5-1,2); t6++) {
- s5(2,500*t2+t6,1,t5+-500*t2-t6,1);
- }
- }
- }
- if (500*t2 <= T-2) {
- for(t4 = intDiv(-t2+7,8); t4 <= min(intDiv(-500*t2+N+496,4000),intDiv(-1000*t2+N+T-4,4000)); t4++) {
- for(t5 = max(1000*t2+4000*t4+1,-4000*t4+2); t5 <= min(2*T+4000*t4-2,N+T-3,N+500*t2+497,1000*t2+4000*t4+998); t5++) {
- for(t6 = max(-N+t5-500*t2+2,intDiv(t5-4000*t4-1000*t2+1,2)); t6 <= min(t5-500*t2-1,T-500*t2-1,499); t6++) {
- s6(2,500*t2+t6,1,t5+-500*t2-t6,1);
- }
- }
- }
- }
-}
-if (T >= 1) {
- for(t2 = intDiv(T-500+499,500); t2 <= intDiv(T-1,500); t2++) {
- for(t4 = intDiv(-T+2+3999,4000); t4 <= intDiv(N-T+3998,4000); t4++) {
- for(t5 = max(4000*t4+2*T-4001,T); t5 <= min(4000*t4+2*T-2,N+T-3); t5++) {
- s7(2,T-1,1,t5-T+1,1);
- }
- }
- }
-}
-
-#
-#
diff --git a/omegalib/examples/old_test/ts1d-orig0 b/omegalib/examples/old_test/ts1d-orig0
deleted file mode 100644
index 48e5a10..0000000
--- a/omegalib/examples/old_test/ts1d-orig0
+++ /dev/null
@@ -1,151 +0,0 @@
-# This is the file facts.prew, which is prepended to the .prew files
-# for the particular code generation we want, defines things like the
-# iteration space and dependences. Known facts are inserted by the
-# Makefile.
-#
-# If you're looking at a .w file instead of facts.prew, then you should
-# remember to edit the original .prew files, not the .w files.
-#
-# This facts.prew file describes the program
-#
-# for(i = 0; i <= N-1; i++) {
-# cur[i]=...
-# }
-# for(t = 0; t < T; t++) {
-# for(i = 0; i <= N-1; i++) {
-# old[i]=cur[i];
-# }
-# for(i = 1; i <= N-2; i++) {
-# cur[i] = (old[i-1]+old[i]+old[i]+old[i+1])*0.25;
-# }
-# }
-
-
-
-# first, the spaces and memory maps
-
-symbolic T, N;
-
-IS_INIT := { [1,i,1,0,0] : 0<=i<=N-1 };
-MM_INIT := { [1,i,1,0,0] -> [0,i] : 0<=i<=N-1 };
-
-IS_COPY := { [2,t,0,i,1] : 0<=t<T && 0<=i<=N-1 };
-MM_COPY := { [2,t,0,i,1] -> [t+1,i] : 0<=t<T && 0<=i<=N-1 };
-
-IS_CALC := { [2,t,1,i,1] : 0<=t<T && 0< i< N-1 };
-MM_CALC := { [2,t,1,i,1] -> [t+1,i] : 0<=t<T && 0< i< N-1 };
-
-RESULTS := { [3,0,0,0,0] };
-
-
-# memory-based Output and Flow/anti-dependences (among Assign (copy), and Calc)
-
-FWD5 := {[x,t,y,i,z] -> [x',t',y',i',z'] :
- (x'>x) or
- (x'=x and t'>t) or
- (x'=x and t'=t and y'>y) or
- (x'=x and t'=t and y'=y and i'>i) or
- (x'=x and t'=t and y'=y and i'=i and z'>z) };
-FWD7 := {[x,t,y,i,z,a,b] -> [x',t',y',i',z',a',b'] :
- (x'>x) or
- (x'=x and t'>t) or
- (x'=x and t'=t and y'>y) or
- (x'=x and t'=t and y'=y and i'>i) or
- (x'=x and t'=t and y'=y and i'=i and z'>z) or
- (x'=x and t'=t and y'=y and i'=i and z'=z and a'>a) or
- (x'=x and t'=t and y'=y and i'=i and z'=z and a'=a and b'>b) };
-BWD5 := inverse FWD5;
-BWD7 := inverse FWD7;
-EQi := {[x,t,y,i,z] -> [x',t',y',i',z'] : i'=i };
-
-# output deps
-
-OAA := (IS_COPY * IS_COPY) intersection FWD5 intersection EQi;
-OCC := (IS_CALC * IS_CALC) intersection FWD5 intersection EQi;
-
-# combined flow/anti deps
-
-FAC := (IS_COPY * IS_CALC) intersection FWD5 intersection {[2,t,0,i,1] -> [2,t',1,i',1] : (i'-1<=i<=i'+1)};
-FCA := (IS_CALC * IS_COPY) intersection FWD5 intersection {[2,t,1,i,1] -> [2,t',0,i',1] : (i-1<=i'<=i+1)};
-
-# total memory deps in the "core"
-
-COREMEMDEPS := OAA union OCC union FAC union FCA;
-
-
-
-# data flow for original code:
-
-DF_12p1 := ( IS_INIT * IS_COPY ) intersection {[1,i,1,0,0] -> [2,0,0,i,1] : 0<i<N-1 };
-DF_12p2 := ( IS_INIT * IS_COPY ) intersection {[1,0,1,0,0] -> [2,t,0,0,1] };
-DF_12p3 := ( IS_INIT * IS_COPY ) intersection {[1,i,1,0,0] -> [2,t,0,i,1] : i=N-1 && N>1 };
-DF_32 := ( IS_CALC * IS_COPY ) intersection {[2,t,1,i,1] -> [2,t+1,0,i,1]};
-
-DF_23a := ( IS_COPY * IS_CALC ) intersection {[2,t,0,i,1] -> [2,t,1,i+1,1] };
-DF_23b := ( IS_COPY * IS_CALC ) intersection {[2,t,0,i,1] -> [2,t,1,i,1] };
-DF_23c := ( IS_COPY * IS_CALC ) intersection {[2,t,0,i,1] -> [2,t,1,i-1,1] };
-
-
-# data flow for array expanded code,
-# after forward substitution of "old[i] = cur[i]"
-
-DF1Ia := { [1,i,1,0,0] -> [2,t,1,i+1,1] : t=0 } restrictDomain IS_INIT restrictRange IS_CALC;
-DF1Ib := { [1,i,1,0,0] -> [2,t,1,i+1,1] : t>0 && i=0 } restrictDomain IS_INIT restrictRange IS_CALC;
-DF1C := { [2,t,1,i,1] -> [2,t+1,1,i+1,1] } restrictDomain IS_CALC restrictRange IS_CALC;
-DF2I := { [1,i,1,0,0] -> [2,t,1,i,1] : t=0 } restrictDomain IS_INIT restrictRange IS_CALC;
-DF2C := { [2,t,1,i,1] -> [2,t+1,1,i+0,1] } restrictDomain IS_CALC restrictRange IS_CALC;
-DF3Ia := { [1,i,1,0,0] -> [2,t,1,i-1,1] : t=0 } restrictDomain IS_INIT restrictRange IS_CALC;
-DF3Ib := { [1,i,1,0,0] -> [2,t,1,i-1,1] : t>0 && i=N-1 } restrictDomain IS_INIT restrictRange IS_CALC;
-DF3C := { [2,t,1,i,1] -> [2,t+1,1,i-1,1] } restrictDomain IS_CALC restrictRange IS_CALC;
-
-# total data flow
-
-COREDATAFLOW := DF1C union DF2C union DF3C;
-
-
-# arity expansion relations
-ex_0_5v := { [] -> [a,b,c,d,e] };
-ex_0_7v := { [] -> [a,b,c,d,e,f,g] };
-ex_3_5 := { [a,b,c] -> [a,b,c,0,0] };
-ex_3_7 := { [a,b,c] -> [a,b,c,0,0,0,0] };
-ex_5_7 := { [a,b,c,d,e] -> [a,b,c,d,e,0,0] };
-
-ex_5_3 := { [a,b,c,0,0] -> [a,b,c] };
-ex_7_3 := { [a,b,c,0,0,0,0] -> [a,b,c] };
-ex_7_5 := { [a,b,c,d,e,0,0] -> [a,b,c,d,e] };
-
-
-# stuff used in skew and tskew
-
-# Here is the description of time skewing from the current draft of the paper.
-IS_Trans := { [2,t,1,i,1] -> [2,tb,1,s,1,tt,1] :
- 0<=tt<1000 && s=i+1*t && t=1000*tb+tt };
-
-IS_Tinv := inverse IS_Trans;
-
-# We use it to transform the iteration spaces
-TS_IS_CALC := IS_CALC join IS_Trans;
-# for some reason OC refuses do to this "join" but will do the reverse:
-# TS_IS_INIT := ex_7_5 join IS_INIT;
-TS_IS_INIT := IS_INIT join (inverse ex_7_5);
-
-# Now we can update the data flow relations to correspond to the new I.S.'s
-TS_DF1Ia := ex_7_5 join DF1Ia join IS_Trans;
-TS_DF1Ib := ex_7_5 join DF1Ib join IS_Trans;
-TS_DF1C := IS_Tinv join DF1C join IS_Trans;
-TS_DF2I := ex_7_5 join DF2I join IS_Trans;
-TS_DF2C := IS_Tinv join DF2C join IS_Trans;
-TS_DF3Ia := ex_7_5 join DF3Ia join IS_Trans;
-TS_DF3Ib := ex_7_5 join DF3Ib join IS_Trans;
-TS_DF3C := IS_Tinv join DF3C join IS_Trans;
-
-
-KNOWN := { [] : T >= 0 and N >= 4 };
-
-# original code without mmap
-#
-
-codegen
- IS_INIT, IS_COPY, IS_CALC
-given (KNOWN join ex_0_5v);
-
diff --git a/omegalib/examples/old_test/ts1d-orig0.oc-rt b/omegalib/examples/old_test/ts1d-orig0.oc-rt
deleted file mode 100644
index 775af7e..0000000
--- a/omegalib/examples/old_test/ts1d-orig0.oc-rt
+++ /dev/null
@@ -1,220 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# # This is the file facts.prew, which is prepended to the .prew files
-# # for the particular code generation we want, defines things like the
-# # iteration space and dependences. Known facts are inserted by the
-# # Makefile.
-# #
-# # If you're looking at a .w file instead of facts.prew, then you should
-# # remember to edit the original .prew files, not the .w files.
-# #
-# # This facts.prew file describes the program
-# #
-# # for(i = 0; i <= N-1; i++) {
-# # cur[i]=...
-# # }
-# # for(t = 0; t < T; t++) {
-# # for(i = 0; i <= N-1; i++) {
-# # old[i]=cur[i];
-# # }
-# # for(i = 1; i <= N-2; i++) {
-# # cur[i] = (old[i-1]+old[i]+old[i]+old[i+1])*0.25;
-# # }
-# # }
-#
-#
-#
-# # first, the spaces and memory maps
-#
-# symbolic T, N;
-#
-#
-# IS_INIT := { [1,i,1,0,0] : 0<=i<=N-1 };
-#
-# MM_INIT := { [1,i,1,0,0] -> [0,i] : 0<=i<=N-1 };
-#
-#
-# IS_COPY := { [2,t,0,i,1] : 0<=t<T && 0<=i<=N-1 };
-#
-# MM_COPY := { [2,t,0,i,1] -> [t+1,i] : 0<=t<T && 0<=i<=N-1 };
-#
-#
-# IS_CALC := { [2,t,1,i,1] : 0<=t<T && 0< i< N-1 };
-#
-# MM_CALC := { [2,t,1,i,1] -> [t+1,i] : 0<=t<T && 0< i< N-1 };
-#
-#
-# RESULTS := { [3,0,0,0,0] };
-#
-#
-#
-# # memory-based Output and Flow/anti-dependences (among Assign (copy), and Calc)
-#
-# FWD5 := {[x,t,y,i,z] -> [x',t',y',i',z'] :
-# (x'>x) or
-# (x'=x and t'>t) or
-# (x'=x and t'=t and y'>y) or
-# (x'=x and t'=t and y'=y and i'>i) or
-# (x'=x and t'=t and y'=y and i'=i and z'>z) };
-#
-# FWD7 := {[x,t,y,i,z,a,b] -> [x',t',y',i',z',a',b'] :
-# (x'>x) or
-# (x'=x and t'>t) or
-# (x'=x and t'=t and y'>y) or
-# (x'=x and t'=t and y'=y and i'>i) or
-# (x'=x and t'=t and y'=y and i'=i and z'>z) or
-# (x'=x and t'=t and y'=y and i'=i and z'=z and a'>a) or
-# (x'=x and t'=t and y'=y and i'=i and z'=z and a'=a and b'>b) };
-#
-# BWD5 := inverse FWD5;
-#
-# BWD7 := inverse FWD7;
-#
-# EQi := {[x,t,y,i,z] -> [x',t',y',i',z'] : i'=i };
-#
-#
-# # output deps
-#
-# OAA := (IS_COPY * IS_COPY) intersection FWD5 intersection EQi;
-#
-# OCC := (IS_CALC * IS_CALC) intersection FWD5 intersection EQi;
-#
-#
-# # combined flow/anti deps
-#
-# FAC := (IS_COPY * IS_CALC) intersection FWD5 intersection {[2,t,0,i,1] -> [2,t',1,i',1] : (i'-1<=i<=i'+1)};
-#
-# FCA := (IS_CALC * IS_COPY) intersection FWD5 intersection {[2,t,1,i,1] -> [2,t',0,i',1] : (i-1<=i'<=i+1)};
-#
-#
-# # total memory deps in the "core"
-#
-# COREMEMDEPS := OAA union OCC union FAC union FCA;
-#
-#
-#
-#
-# # data flow for original code:
-#
-# DF_12p1 := ( IS_INIT * IS_COPY ) intersection {[1,i,1,0,0] -> [2,0,0,i,1] : 0<i<N-1 };
-#
-# DF_12p2 := ( IS_INIT * IS_COPY ) intersection {[1,0,1,0,0] -> [2,t,0,0,1] };
-#
-# DF_12p3 := ( IS_INIT * IS_COPY ) intersection {[1,i,1,0,0] -> [2,t,0,i,1] : i=N-1 && N>1 };
-#
-# DF_32 := ( IS_CALC * IS_COPY ) intersection {[2,t,1,i,1] -> [2,t+1,0,i,1]};
-#
-#
-# DF_23a := ( IS_COPY * IS_CALC ) intersection {[2,t,0,i,1] -> [2,t,1,i+1,1] };
-#
-# DF_23b := ( IS_COPY * IS_CALC ) intersection {[2,t,0,i,1] -> [2,t,1,i,1] };
-#
-# DF_23c := ( IS_COPY * IS_CALC ) intersection {[2,t,0,i,1] -> [2,t,1,i-1,1] };
-#
-#
-#
-# # data flow for array expanded code,
-# # after forward substitution of "old[i] = cur[i]"
-#
-# DF1Ia := { [1,i,1,0,0] -> [2,t,1,i+1,1] : t=0 } restrictDomain IS_INIT restrictRange IS_CALC;
-#
-# DF1Ib := { [1,i,1,0,0] -> [2,t,1,i+1,1] : t>0 && i=0 } restrictDomain IS_INIT restrictRange IS_CALC;
-#
-# DF1C := { [2,t,1,i,1] -> [2,t+1,1,i+1,1] } restrictDomain IS_CALC restrictRange IS_CALC;
-#
-# DF2I := { [1,i,1,0,0] -> [2,t,1,i,1] : t=0 } restrictDomain IS_INIT restrictRange IS_CALC;
-#
-# DF2C := { [2,t,1,i,1] -> [2,t+1,1,i+0,1] } restrictDomain IS_CALC restrictRange IS_CALC;
-#
-# DF3Ia := { [1,i,1,0,0] -> [2,t,1,i-1,1] : t=0 } restrictDomain IS_INIT restrictRange IS_CALC;
-#
-# DF3Ib := { [1,i,1,0,0] -> [2,t,1,i-1,1] : t>0 && i=N-1 } restrictDomain IS_INIT restrictRange IS_CALC;
-#
-# DF3C := { [2,t,1,i,1] -> [2,t+1,1,i-1,1] } restrictDomain IS_CALC restrictRange IS_CALC;
-#
-#
-# # total data flow
-#
-# COREDATAFLOW := DF1C union DF2C union DF3C;
-#
-#
-#
-# # arity expansion relations
-# ex_0_5v := { [] -> [a,b,c,d,e] };
-#
-# ex_0_7v := { [] -> [a,b,c,d,e,f,g] };
-#
-# ex_3_5 := { [a,b,c] -> [a,b,c,0,0] };
-#
-# ex_3_7 := { [a,b,c] -> [a,b,c,0,0,0,0] };
-#
-# ex_5_7 := { [a,b,c,d,e] -> [a,b,c,d,e,0,0] };
-#
-#
-# ex_5_3 := { [a,b,c,0,0] -> [a,b,c] };
-#
-# ex_7_3 := { [a,b,c,0,0,0,0] -> [a,b,c] };
-#
-# ex_7_5 := { [a,b,c,d,e,0,0] -> [a,b,c,d,e] };
-#
-#
-#
-# # stuff used in skew and tskew
-#
-# # Here is the description of time skewing from the current draft of the paper.
-# IS_Trans := { [2,t,1,i,1] -> [2,tb,1,s,1,tt,1] :
-# 0<=tt<1000 && s=i+1*t && t=1000*tb+tt };
-#
-#
-# IS_Tinv := inverse IS_Trans;
-#
-#
-# # We use it to transform the iteration spaces
-# TS_IS_CALC := IS_CALC join IS_Trans;
-#
-# # for some reason OC refuses do to this "join" but will do the reverse:
-# # TS_IS_INIT := ex_7_5 join IS_INIT;
-# TS_IS_INIT := IS_INIT join (inverse ex_7_5);
-#
-#
-# # Now we can update the data flow relations to correspond to the new I.S.'s
-# TS_DF1Ia := ex_7_5 join DF1Ia join IS_Trans;
-#
-# TS_DF1Ib := ex_7_5 join DF1Ib join IS_Trans;
-#
-# TS_DF1C := IS_Tinv join DF1C join IS_Trans;
-#
-# TS_DF2I := ex_7_5 join DF2I join IS_Trans;
-#
-# TS_DF2C := IS_Tinv join DF2C join IS_Trans;
-#
-# TS_DF3Ia := ex_7_5 join DF3Ia join IS_Trans;
-#
-# TS_DF3Ib := ex_7_5 join DF3Ib join IS_Trans;
-#
-# TS_DF3C := IS_Tinv join DF3C join IS_Trans;
-#
-#
-#
-# KNOWN := { [] : T >= 0 and N >= 4 };
-#
-#
-# # original code without mmap
-# #
-#
-# codegen
-# IS_INIT, IS_COPY, IS_CALC
-# given (KNOWN join ex_0_5v);
-for(t2 = 0; t2 <= N-1; t2++) {
- s1(1,t2,1,0,0);
-}
-for(t2 = 0; t2 <= T-1; t2++) {
- for(t4 = 0; t4 <= N-1; t4++) {
- s2(2,t2,0,t4,1);
- }
- for(t4 = 1; t4 <= N-2; t4++) {
- s3(2,t2,1,t4,1);
- }
-}
-
-#
-#
diff --git a/omegalib/examples/old_test/tseng b/omegalib/examples/old_test/tseng
deleted file mode 100644
index 2ae39f8..0000000
--- a/omegalib/examples/old_test/tseng
+++ /dev/null
@@ -1,16 +0,0 @@
-symbolic n;
-symbolic LV,UV;
-D := {[ i,i+1] -> [i+1,k] : 1 <= i && i+1 < k <= n};
-local := {[i1,k1] -> [i2,k2] : LV <= k1,k2 <= UV };
-sameP := {[i1,k1] -> [i2,k2] : k1=k2 || LV <= k1,k2 <= UV };
-myIter := {[i,k] : LV <= k <= UV};
-lexPos := {[i1,k1] -> [i2,k2] : i1 = i2 && k1 < k2 || i1 < i2};
-
-post := D restrictDomain myIter;
-wait := D restrictRange myIter;
-enforcedTime := sameP intersection lexPos;
-enforcedTime;
-enforced := enforcedTime compose D union D compose enforcedTime union enforcedTime;
-enforced;
-post - enforced;
-wait - enforced;
diff --git a/omegalib/examples/old_test/tseng.oc-rt b/omegalib/examples/old_test/tseng.oc-rt
deleted file mode 100644
index 53ff139..0000000
--- a/omegalib/examples/old_test/tseng.oc-rt
+++ /dev/null
@@ -1,54 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# symbolic n;
-#
-# symbolic LV,UV;
-#
-# D := {[ i,i+1] -> [i+1,k] : 1 <= i && i+1 < k <= n};
-#
-# local := {[i1,k1] -> [i2,k2] : LV <= k1,k2 <= UV };
-#
-# sameP := {[i1,k1] -> [i2,k2] : k1=k2 || LV <= k1,k2 <= UV };
-#
-# myIter := {[i,k] : LV <= k <= UV};
-#
-# lexPos := {[i1,k1] -> [i2,k2] : i1 = i2 && k1 < k2 || i1 < i2};
-#
-#
-# post := D restrictDomain myIter;
-#
-# wait := D restrictRange myIter;
-#
-# enforcedTime := sameP intersection lexPos;
-#
-# enforcedTime;
-
-{[i1,k1] -> [i1,k2] : LV <= k1 < k2 <= UV} union
- {[i1,k1] -> [i2,k1] : i1 < i2} union
- {[i1,k1] -> [i2,k2] : LV <= k1,k2 <= UV && i1 < i2}
-
-#
-# enforced := enforcedTime compose D union D compose enforcedTime union enforcedTime;
-#
-# enforced;
-
-{[i1,i1+1] -> [i2,k2] : 1 <= i1 <= n-2, UV-2, i2-2 && LV <= k2 <= UV && LV <= n} union
- {[i1,k1] -> [i2,k2] : k1 = 1+i1 && 1 <= i1 <= i2-2, k2-2 && k2 <= n} union
- {[i1,i1+1] -> [i1+1,k2] : 1 <= i1 <= n-2, k2-3 && LV < k2 <= UV && LV <= n} union
- {[i1,k1] -> [i2,k2] : 2, LV, i1+2 <= i2 < k2 <= n && LV <= k1 <= UV && i2 <= UV} union
- {[i1,k1] -> [k1,k2] : 2, i1+2 <= k1 < k2 <= n} union
- {[i1,k1] -> [i1+1,k2] : LV <= k1 <= i1 <= k2-2, UV-1 && k2 <= n && 1 <= i1} union
- {[i1,k1] -> [i2,k2] : LV <= k1,k2 <= UV && i1 < i2} union
- {[i1,k1] -> [i2,k1] : i1 < i2} union
- {[i1,k1] -> [i1,k2] : LV <= k1 < k2 <= UV}
-
-#
-# post - enforced;
-
-{[In_1,In_1+1] -> [In_1+1,Out_2] : 1, LV-1 <= In_1 < UV < Out_2 <= n}
-
-#
-# wait - enforced;
-
-{[In_1,In_1+1] -> [In_1+1,LV] : In_1+2 <= LV <= n, UV && 1 <= In_1}
-
-#
diff --git a/omegalib/examples/old_test/verlind1 b/omegalib/examples/old_test/verlind1
deleted file mode 100644
index 181b1c5..0000000
--- a/omegalib/examples/old_test/verlind1
+++ /dev/null
@@ -1,44 +0,0 @@
- without_simplify;
-
- R3 := {[x] -> [y] : (y = x) | (y = 3x)};
-
- Rf := {[x] -> [y] : x <= y <= 3x};
-
- R3;
-
- Rf;
-
- s12 := {[x] : 1 <= x <= 2};
- s12;
-
- sd3 := R3(s12);
- sd3;
-
- sc3 := Rf(s12);
- sc3;
-
- sc3 intersection sd3;
-
- # I think this is faulty
- sc3 - sd3;
-
- # This is OK
- sd3 - sc3;
-
- complement sc3;
- complement sd3;
-
- sc3;
-
- sc3 intersection (complement sd3);
-
- # alternative description of sd3;
- sd3' := {[y] : 1 <= y <= 3 | y = 6};
- sd3';
- sc3 - sd3';
-
- # sd3 wrt sd3';
-
- sd3 - sd3';
-
- sd3' - sd3;
diff --git a/omegalib/examples/old_test/verlind1.oc-rt b/omegalib/examples/old_test/verlind1.oc-rt
deleted file mode 100644
index 050b199..0000000
--- a/omegalib/examples/old_test/verlind1.oc-rt
+++ /dev/null
@@ -1,120 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# R3 := {[x] -> [y] : (y = x) | (y = 3x)};
-#
-#
-# Rf := {[x] -> [y] : x <= y <= 3x};
-#
-#
-# R3;
-
-{[x] -> [x] } union
- {[x] -> [3x] }
-
-#
-#
-# Rf;
-
-{[x] -> [y] : x <= y <= 3x}
-
-#
-#
-# s12 := {[x] : 1 <= x <= 2};
-#
-# s12;
-
-{[x]: 1 <= x <= 2}
-
-#
-#
-# sd3 := R3(s12);
-#
-# sd3;
-
-{[y]: 1 <= y <= 2} union
- {[y]: Exists ( alpha : y = 3alpha && 3 <= y <= 6)}
-
-#
-#
-# sc3 := Rf(s12);
-#
-# sc3;
-
-{[y]: 1 <= y <= 6}
-
-#
-#
-# sc3 intersection sd3;
-
-{[y]: 1 <= y <= 2} union
- {[y]: Exists ( alpha : y = 3alpha && 3 <= y <= 6)}
-
-#
-#
-# # I think this is faulty
-# sc3 - sd3;
-
-{[y]: 4 <= y <= 5}
-
-#
-#
-# # This is OK
-# sd3 - sc3;
-
-{[y] : FALSE }
-
-#
-#
-# complement sc3;
-
-{[y]: y <= 0} union
- {[y]: 7 <= y}
-
-#
-# complement sd3;
-
-{[y]: y <= 0} union
- {[y]: 7 <= y} union
- {[y]: 4 <= y <= 5}
-
-#
-#
-# sc3;
-
-{[y]: 1 <= y <= 6}
-
-#
-#
-# sc3 intersection (complement sd3);
-
-{[y]: 4 <= y <= 5}
-
-#
-#
-# # alternative description of sd3;
-# sd3' := {[y] : 1 <= y <= 3 | y = 6};
-#
-# sd3';
-
-{[y]: 1 <= y <= 3} union
- {[6]}
-
-#
-# sc3 - sd3';
-
-{[y]: 4 <= y <= 5}
-
-#
-#
-# # sd3 wrt sd3';
-#
-# sd3 - sd3';
-
-{[y] : FALSE }
-
-#
-#
-# sd3' - sd3;
-
-{[y] : FALSE }
-
-#
diff --git a/omegalib/examples/old_test/verlind1a b/omegalib/examples/old_test/verlind1a
deleted file mode 100644
index e43ec19..0000000
--- a/omegalib/examples/old_test/verlind1a
+++ /dev/null
@@ -1,3 +0,0 @@
-R := { [i] : 1 <= i <= 6 & exists (alpha : 3 alpha + 1 <= i <= 3 alpha + 2)
- & not (1 <= i <= 2) };
-R;
diff --git a/omegalib/examples/old_test/verlind1a.oc-rt b/omegalib/examples/old_test/verlind1a.oc-rt
deleted file mode 100644
index 11e2d1e..0000000
--- a/omegalib/examples/old_test/verlind1a.oc-rt
+++ /dev/null
@@ -1,9 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# R := { [i] : 1 <= i <= 6 & Exists (alpha : 3 alpha + 1 <= i <= 3 alpha + 2)
-# & not (1 <= i <= 2) };
-#
-# R;
-
-{[i]: 4 <= i <= 5}
-
-#
diff --git a/omegalib/examples/old_test/wak1 b/omegalib/examples/old_test/wak1
deleted file mode 100644
index 5e9e315..0000000
--- a/omegalib/examples/old_test/wak1
+++ /dev/null
@@ -1,13 +0,0 @@
-symbolic a1,a2,a3,b1,b2,b3;
-
-IS1 := {[i] : a1 <= i <= b1 };
-IS2 := {[i] : a2 <= i <= b2 };
-IS3 := {[i] : a3 <= i <= b3 };
-
-T1 := {[i] -> [i,0]};
-T2 := {[i] -> [i,1]};
-T3 := {[i] -> [i,2]};
-
-codegen 0 T1:IS1,T2:IS2,T3:IS3;
-
-codegen T1:IS1,T2:IS2,T3:IS3;
diff --git a/omegalib/examples/old_test/wak1.oc-rt b/omegalib/examples/old_test/wak1.oc-rt
deleted file mode 100644
index e8bdf0e..0000000
--- a/omegalib/examples/old_test/wak1.oc-rt
+++ /dev/null
@@ -1,87 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-#
-# Symbolic a1,a2,a3,b1,b2,b3;
-#
-#
-# IS1 := {[i] : a1 <= i <= b1 };
-#
-# IS2 := {[i] : a2 <= i <= b2 };
-#
-# IS3 := {[i] : a3 <= i <= b3 };
-#
-#
-# T1 := {[i] -> [i,0]};
-#
-# T2 := {[i] -> [i,1]};
-#
-# T3 := {[i] -> [i,2]};
-#
-#
-# codegen T1:IS1,T2:IS2,T3:IS3;
-for(t1 = a3; t1 <= min(b3,a1-1,a2-1); t1++) {
- s3(t1);
-}
-for(t1 = a2; t1 <= min(b2,a1-1,a3-1,b3); t1++) {
- s2(t1);
-}
-for(t1 = max(a2,a3); t1 <= min(a1-1,b2,b3); t1++) {
- s2(t1);
- s3(t1);
-}
-for(t1 = max(a2,b3+1); t1 <= min(b2,a1-1); t1++) {
- s2(t1);
-}
-for(t1 = max(a3,a2,b2+1); t1 <= min(b3,a1-1); t1++) {
- s3(t1);
-}
-for(t1 = a1; t1 <= min(b1,a3-1,b3,a2-1); t1++) {
- s1(t1);
-}
-for(t1 = max(a1,a3); t1 <= min(b1,a2-1,b3); t1++) {
- s1(t1);
- s3(t1);
-}
-for(t1 = max(a1,b3+1); t1 <= min(b1,a2-1); t1++) {
- s1(t1);
-}
-for(t1 = max(a1,a2); t1 <= min(b1,b2,a3-1); t1++) {
- s1(t1);
- s2(t1);
-}
-for(t1 = max(a1,a2,a3); t1 <= min(b1,b2,b3); t1++) {
- s1(t1);
- s2(t1);
- s3(t1);
-}
-for(t1 = max(a1,a2,a3,b3+1); t1 <= min(b1,b2); t1++) {
- s1(t1);
- s2(t1);
-}
-for(t1 = max(a1,b2+1,a2); t1 <= min(b1,a3-1); t1++) {
- s1(t1);
-}
-for(t1 = max(a1,a2,b2+1,a3); t1 <= min(b1,b3); t1++) {
- s1(t1);
- s3(t1);
-}
-for(t1 = max(a1,b3+1,a3,a2,b2+1); t1 <= b1; t1++) {
- s1(t1);
-}
-for(t1 = max(a3,a1,b1+1); t1 <= min(b3,b2,a2-1); t1++) {
- s3(t1);
-}
-for(t1 = max(a2,a1,b1+1); t1 <= min(b2,a3-1); t1++) {
- s2(t1);
-}
-for(t1 = max(a1,b1+1,a2,a3); t1 <= min(b2,b3); t1++) {
- s2(t1);
- s3(t1);
-}
-for(t1 = max(a2,a1,b1+1,b3+1,a3); t1 <= b2; t1++) {
- s2(t1);
-}
-for(t1 = max(a3,a1,b1+1,b2+1); t1 <= b3; t1++) {
- s3(t1);
-}
-
-#
diff --git a/omegalib/examples/old_test/wak2 b/omegalib/examples/old_test/wak2
deleted file mode 100644
index 927fc2f..0000000
--- a/omegalib/examples/old_test/wak2
+++ /dev/null
@@ -1,10 +0,0 @@
-symbolic a1,a2,b1,b2,c1,c2,d1,d2;
-
-IS1 := {[i,j] : a1 <= i <= b1 && c1 <= j <= d1};
-IS2 := {[i,j] : a2 <= i <= b2 && c2 <= j <= d2};
-
-T1 := {[i,j] -> [i,j,0]};
-T2 := {[i,j] -> [i,j,1]};
-
-codegen T1:IS1,T2:IS2;
-codegen 2 T1:IS1,T2:IS2;
diff --git a/omegalib/examples/old_test/wak2.oc-rt b/omegalib/examples/old_test/wak2.oc-rt
deleted file mode 100644
index 6dc6270..0000000
--- a/omegalib/examples/old_test/wak2.oc-rt
+++ /dev/null
@@ -1,307 +0,0 @@
->>> Symbolic a1,a2,b1,b2,c1,c2,d1,d2;
->>>
->>> IS1 := {[i,j] : a1 <= i <= b1 && c1 <= j <= d1};
->>> IS2 := {[i,j] : a2 <= i <= b2 && c2 <= j <= d2};
->>>
->>> T1 := {[i,j] -> [i,j,0]};
->>> T2 := {[i,j] -> [i,j,1]};
->>>
->>> codegen T1:IS1,T2:IS2;
-if (d2 >= c2) {
- for(t1 = a2; t1 <= min(a1-1,b2); t1++) {
- for(t2 = c2; t2 <= d2; t2++) {
- s2(t1,t2);
- }
- }
-}
-for(t1 = a1; t1 <= b1; t1++) {
- if (t1 >= a2 && t1 <= b2) {
- for(t2 = c2; t2 <= min(c1-1,d2); t2++) {
- s2(t1,t2);
- }
- }
- if (t1 <= a2-1) {
- for(t2 = c1; t2 <= d1; t2++) {
- s1(t1,t2);
- }
- }
- if (t1 >= a2 && t1 <= b2) {
- for(t2 = c1; t2 <= min(d1,c2-1,d2); t2++) {
- s1(t1,t2);
- }
- }
- if (t1 <= b2 && t1 >= a2) {
- for(t2 = max(c2,c1); t2 <= min(d2,d1); t2++) {
- s1(t1,t2);
- s2(t1,t2);
- }
- }
- if (t1 >= a2 && t1 <= b2) {
- for(t2 = max(d2+1,c1); t2 <= d1; t2++) {
- s1(t1,t2);
- }
- }
- if (t1 >= a2 && t1 >= b2+1) {
- for(t2 = c1; t2 <= d1; t2++) {
- s1(t1,t2);
- }
- }
- if (t1 >= a2 && t1 <= b2) {
- for(t2 = max(c2,d1+1,c1); t2 <= d2; t2++) {
- s2(t1,t2);
- }
- }
-}
-if (d2 >= c2) {
- for(t1 = max(a1,a2,b1+1); t1 <= b2; t1++) {
- for(t2 = c2; t2 <= d2; t2++) {
- s2(t1,t2);
- }
- }
-}
-
->>> codegen 2 T1:IS1,T2:IS2;
-if (d2 >= c2) {
- for(t1 = a2; t1 <= min(a1-1,b2); t1++) {
- for(t2 = c2; t2 <= d2; t2++) {
- s2(t1,t2);
- }
- }
-}
-if (d1 >= c1) {
- for(t1 = a1; t1 <= min(a2-1,b1); t1++) {
- for(t2 = c1; t2 <= d1; t2++) {
- s1(t1,t2);
- }
- }
-}
-if (d1 >= c1 && c1 >= d2+2 && c2 <= d2) {
- for(t1 = max(a2,a1); t1 <= min(b1,b2); t1++) {
- for(t2 = c2; t2 <= d2; t2++) {
- s2(t1,t2);
- }
- for(t2 = c1; t2 <= d1; t2++) {
- s1(t1,t2);
- }
- }
-}
-if (d2 >= c2 && d2 <= c1-2 && d1 <= c1-1) {
- for(t1 = max(a1,a2); t1 <= min(b2,b1); t1++) {
- for(t2 = c2; t2 <= d2; t2++) {
- s2(t1,t2);
- }
- }
-}
-if (c1 >= c2+1 && d1 <= d2-1 && d1 >= c1) {
- for(t1 = max(a2,a1); t1 <= min(b1,b2); t1++) {
- for(t2 = c2; t2 <= c1-1; t2++) {
- s2(t1,t2);
- }
- for(t2 = c1; t2 <= d1; t2++) {
- s1(t1,t2);
- s2(t1,t2);
- }
- for(t2 = d1+1; t2 <= d2; t2++) {
- s2(t1,t2);
- }
- }
-}
-if (c1 >= c2+1 && c1 <= d2 && d1 >= d2+1) {
- for(t1 = max(a2,a1); t1 <= min(b1,b2); t1++) {
- for(t2 = c2; t2 <= c1-1; t2++) {
- s2(t1,t2);
- }
- for(t2 = c1; t2 <= d2; t2++) {
- s1(t1,t2);
- s2(t1,t2);
- }
- for(t2 = d2+1; t2 <= d1; t2++) {
- s1(t1,t2);
- }
- }
-}
-if (d1 == d2 && d1 >= c1 && c1 >= c2+1) {
- for(t1 = max(a2,a1); t1 <= min(b2,b1); t1++) {
- for(t2 = c2; t2 <= c1-1; t2++) {
- s2(t1,t2);
- }
- for(t2 = c1; t2 <= d2; t2++) {
- s1(t1,t2);
- s2(t1,t2);
- }
- }
-}
-if (d2 == c1-1 && d2 <= d1-1 && d2 >= c2) {
- for(t1 = max(a2,a1); t1 <= min(b2,b1); t1++) {
- for(t2 = c2; t2 <= c1-1; t2++) {
- s2(t1,t2);
- }
- for(t2 = c1; t2 <= d1; t2++) {
- s1(t1,t2);
- }
- }
-}
-if (c2 <= c1-1 && d2 >= c1 && d1 <= c1-1) {
- for(t1 = max(a1,a2); t1 <= min(b2,b1); t1++) {
- for(t2 = c2; t2 <= c1-1; t2++) {
- s2(t1,t2);
- }
- for(t2 = c1; t2 <= d2; t2++) {
- s2(t1,t2);
- }
- }
-}
-if (d2 == c1-1 && d2 >= d1 && d2 >= c2) {
- for(t1 = max(a1,a2); t1 <= min(b1,b2); t1++) {
- for(t2 = c2; t2 <= d2; t2++) {
- s2(t1,t2);
- }
- }
-}
-if (d1 >= c1 && c1 >= c2+1 && d2 <= c2-1) {
- for(t1 = max(a2,a1); t1 <= min(b1,b2); t1++) {
- for(t2 = c1; t2 <= d1; t2++) {
- s1(t1,t2);
- }
- }
-}
-if (c1 <= c2-1 && d1 >= c2 && d1 <= d2-1) {
- for(t1 = max(a2,a1); t1 <= min(b1,b2); t1++) {
- for(t2 = c1; t2 <= c2-1; t2++) {
- s1(t1,t2);
- }
- for(t2 = c2; t2 <= d1; t2++) {
- s1(t1,t2);
- s2(t1,t2);
- }
- for(t2 = d1+1; t2 <= d2; t2++) {
- s2(t1,t2);
- }
- }
-}
-if (c1 <= c2-1 && d1 >= d2+1 && c2 <= d2) {
- for(t1 = max(a2,a1); t1 <= min(b1,b2); t1++) {
- for(t2 = c1; t2 <= c2-1; t2++) {
- s1(t1,t2);
- }
- for(t2 = c2; t2 <= d2; t2++) {
- s1(t1,t2);
- s2(t1,t2);
- }
- for(t2 = d2+1; t2 <= d1; t2++) {
- s1(t1,t2);
- }
- }
-}
-if (d1 == d2 && d1 >= c2 && c1 <= c2-1) {
- for(t1 = max(a2,a1); t1 <= min(b2,b1); t1++) {
- for(t2 = c1; t2 <= c2-1; t2++) {
- s1(t1,t2);
- }
- for(t2 = c2; t2 <= d2; t2++) {
- s1(t1,t2);
- s2(t1,t2);
- }
- }
-}
-if (c2 <= d2 && d1 >= c1 && d1 <= c2-1) {
- for(t1 = max(a2,a1); t1 <= min(b1,b2); t1++) {
- for(t2 = c1; t2 <= d1; t2++) {
- s1(t1,t2);
- }
- for(t2 = c2; t2 <= d2; t2++) {
- s2(t1,t2);
- }
- }
-}
-if (d1 >= c1 && d2 <= c2-1 && d1 <= d2-1) {
- for(t1 = max(a2,a1); t1 <= min(b1,b2); t1++) {
- for(t2 = c1; t2 <= d1; t2++) {
- s1(t1,t2);
- }
- }
-}
-if (d2 >= c1 && d2 <= c2-1 && d1 >= d2+1) {
- for(t1 = max(a2,a1); t1 <= min(b1,b2); t1++) {
- for(t2 = c1; t2 <= d2; t2++) {
- s1(t1,t2);
- }
- for(t2 = d2+1; t2 <= d1; t2++) {
- s1(t1,t2);
- }
- }
-}
-if (d1 == d2 && d1 <= c2-1 && d1 >= c1) {
- for(t1 = max(a2,a1); t1 <= min(b2,b1); t1++) {
- for(t2 = c1; t2 <= d1; t2++) {
- s1(t1,t2);
- }
- }
-}
-if (d2 >= c2 && c2 >= c1+1 && d1 <= c1-1) {
- for(t1 = max(a1,a2); t1 <= min(b2,b1); t1++) {
- for(t2 = c2; t2 <= d2; t2++) {
- s2(t1,t2);
- }
- }
-}
-if (c2 == c1 && c2 <= d1 && d1 <= d2-1) {
- for(t1 = max(a2,a1); t1 <= min(b2,b1); t1++) {
- for(t2 = c1; t2 <= d1; t2++) {
- s1(t1,t2);
- s2(t1,t2);
- }
- for(t2 = d1+1; t2 <= d2; t2++) {
- s2(t1,t2);
- }
- }
-}
-if (c2 == c1 && d1 >= d2+1 && c2 <= d2) {
- for(t1 = max(a2,a1); t1 <= min(b2,b1); t1++) {
- for(t2 = c1; t2 <= d2; t2++) {
- s1(t1,t2);
- s2(t1,t2);
- }
- for(t2 = d2+1; t2 <= d1; t2++) {
- s1(t1,t2);
- }
- }
-}
-if (c1 == c2 && d1 == d2 && d1 >= c1) {
- for(t1 = max(a1,a2); t1 <= min(b2,b1); t1++) {
- for(t2 = c1; t2 <= d2; t2++) {
- s1(t1,t2);
- s2(t1,t2);
- }
- }
-}
-if (c1 == c2 && c1 >= d1+1 && d2 >= c1) {
- for(t1 = max(a1,a2); t1 <= min(b1,b2); t1++) {
- for(t2 = c2; t2 <= d2; t2++) {
- s2(t1,t2);
- }
- }
-}
-if (d1 >= c1 && c1 <= c2 && d2 <= c1-1) {
- for(t1 = max(a2,a1); t1 <= min(b1,b2); t1++) {
- for(t2 = c1; t2 <= d1; t2++) {
- s1(t1,t2);
- }
- }
-}
-if (d1 >= c1) {
- for(t1 = max(b2+1,a1,a2); t1 <= b1; t1++) {
- for(t2 = c1; t2 <= d1; t2++) {
- s1(t1,t2);
- }
- }
-}
-if (d2 >= c2) {
- for(t1 = max(a1,a2,b1+1); t1 <= b2; t1++) {
- for(t2 = c2; t2 <= d2; t2++) {
- s2(t1,t2);
- }
- }
-}
-
-
diff --git a/omegalib/examples/old_test/wak3 b/omegalib/examples/old_test/wak3
deleted file mode 100644
index 51ca234..0000000
--- a/omegalib/examples/old_test/wak3
+++ /dev/null
@@ -1,12 +0,0 @@
-symbolic a,b;
-
-IS1 := {[i] : a <= i <= b };
-IS2 := {[i] : a+10 <= i <= b+10 };
-IS3 := {[i] : a+20 <= i <= b+20 };
-
-T1 := {[i] -> [i,0]};
-T2 := {[i] -> [i,1]};
-T3 := {[i] -> [i,2]};
-
-codegen T1:IS1,T2:IS2,T3:IS3;
-codegen 2 T1:IS1,T2:IS2,T3:IS3;
diff --git a/omegalib/examples/old_test/wak3.oc-rt b/omegalib/examples/old_test/wak3.oc-rt
deleted file mode 100644
index 825c72f..0000000
--- a/omegalib/examples/old_test/wak3.oc-rt
+++ /dev/null
@@ -1,59 +0,0 @@
->>> Symbolic a,b;
->>>
->>> IS1 := {[i] : a <= i <= b };
->>> IS2 := {[i] : a+10 <= i <= b+10 };
->>> IS3 := {[i] : a+20 <= i <= b+20 };
->>>
->>> T1 := {[i] -> [i,0]};
->>> T2 := {[i] -> [i,1]};
->>> T3 := {[i] -> [i,2]};
->>>
->>> codegen T1:IS1,T2:IS2,T3:IS3;
-for(t1 = a; t1 <= min(b,a+9); t1++) {
- s1(t1);
-}
-for(t1 = a+10; t1 <= min(b,a+19); t1++) {
- s1(t1);
- s2(t1);
-}
-for(t1 = a+20; t1 <= b; t1++) {
- s1(t1);
- s2(t1);
- s3(t1);
-}
-for(t1 = max(a+10,b+1); t1 <= min(b+10,a+19); t1++) {
- s2(t1);
-}
-for(t1 = max(a+20,b+1); t1 <= b+10; t1++) {
- s2(t1);
- s3(t1);
-}
-for(t1 = max(a+20,b+11); t1 <= b+20; t1++) {
- s3(t1);
-}
-
->>> codegen 2 T1:IS1,T2:IS2,T3:IS3;
-for(t1 = a; t1 <= min(b,a+9); t1++) {
- s1(t1);
-}
-for(t1 = a+10; t1 <= min(b,a+19); t1++) {
- s1(t1);
- s2(t1);
-}
-for(t1 = a+20; t1 <= b; t1++) {
- s1(t1);
- s2(t1);
- s3(t1);
-}
-for(t1 = max(a+10,b+1); t1 <= min(b+10,a+19); t1++) {
- s2(t1);
-}
-for(t1 = max(a+20,b+1); t1 <= b+10; t1++) {
- s2(t1);
- s3(t1);
-}
-for(t1 = max(a+20,b+11); t1 <= b+20; t1++) {
- s3(t1);
-}
-
-
diff --git a/omegalib/examples/old_test/wak4 b/omegalib/examples/old_test/wak4
deleted file mode 100644
index 48224b9..0000000
--- a/omegalib/examples/old_test/wak4
+++ /dev/null
@@ -1,9 +0,0 @@
-symbolic a1,a2,a3,a4,a5,b1,b2,b3,b4,b5;
-IS1 := {[i] : a1,a2,a3,a4,a5 <= i <= b1,b2,b3,b4,b5 };
-IS2 := {[i] : a1,a2,a3,a4,a5 <= i <= b1,b2,b3,b4,b5 };
-
-T1 := {[i] -> [i,0]};
-T2 := {[i] -> [i,1]};
-
-codegen T1:IS1,T2:IS2;
-codegen 2 T1:IS1,T2:IS2;
diff --git a/omegalib/examples/old_test/wak4.oc-rt b/omegalib/examples/old_test/wak4.oc-rt
deleted file mode 100644
index 5f2cacd..0000000
--- a/omegalib/examples/old_test/wak4.oc-rt
+++ /dev/null
@@ -1,20 +0,0 @@
->>> Symbolic a1,a2,a3,a4,a5,b1,b2,b3,b4,b5;
->>> IS1 := {[i] : a1,a2,a3,a4,a5 <= i <= b1,b2,b3,b4,b5 };
->>> IS2 := {[i] : a1,a2,a3,a4,a5 <= i <= b1,b2,b3,b4,b5 };
->>>
->>> T1 := {[i] -> [i,0]};
->>> T2 := {[i] -> [i,1]};
->>>
->>> codegen T1:IS1,T2:IS2;
-for(t1 = max(a1,a2,a3,a4,a5); t1 <= min(b1,b2,b3,b4,b5); t1++) {
- s1(t1);
- s2(t1);
-}
-
->>> codegen 2 T1:IS1,T2:IS2;
-for(t1 = max(a1,a2,a3,a4,a5); t1 <= min(b1,b2,b3,b4,b5); t1++) {
- s1(t1);
- s2(t1);
-}
-
-
diff --git a/omegalib/examples/old_test/wak5 b/omegalib/examples/old_test/wak5
deleted file mode 100644
index 1232b34..0000000
--- a/omegalib/examples/old_test/wak5
+++ /dev/null
@@ -1,4 +0,0 @@
-S1 := {[1,In_2,0,In_4,In_5,In_6,In_7]: 2 <= In_4 <= 1024 && 2 <= In_2 <= 1024};
-S2 := {[1,In_2,0,In_4,In_5,In_6,In_7]: 1 <= In_4 < In_2 <= 1024};
-
-Hull (S1 union S2);
diff --git a/omegalib/examples/old_test/wak5.oc-rt b/omegalib/examples/old_test/wak5.oc-rt
deleted file mode 100644
index 2d5830c..0000000
--- a/omegalib/examples/old_test/wak5.oc-rt
+++ /dev/null
@@ -1,11 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# S1 := {[1,In_2,0,In_4,In_5,In_6,In_7]: 2 <= In_4 <= 1024 && 2 <= In_2 <= 1024};
-#
-# S2 := {[1,In_2,0,In_4,In_5,In_6,In_7]: 1 <= In_4 < In_2 <= 1024};
-#
-#
-# Hull (S1 union S2);
-
-{[1,In_2,0,In_4,In_5,In_6,In_7]: 1 <= In_4 <= 1024 && 2 <= In_2 <= 1024}
-
-#
diff --git a/omegalib/examples/old_test/wak6 b/omegalib/examples/old_test/wak6
deleted file mode 100644
index c251ca6..0000000
--- a/omegalib/examples/old_test/wak6
+++ /dev/null
@@ -1,14 +0,0 @@
-T1 := {[k,i,j] -> [k',i,j] : 1 <= k < k' < i <= 1024 && k'+1 <= j <= 1024};
-T2 := {[k,i,j] -> [j,i,j'] : 1 <= k < j < i <= 1024 && j < j' <= 1024};
-T3 := {[k,k+1,k+1] -> [k+1,i',j'] : 1 <= k <= i'-2, j'-2 && j' <= 1024 && i' <= 1024};
-
-# The following expression evaluates to FALSE, which I believe is incorrect:
-
-T3+;
-
-# And the following cause assertion failures:
-
-(T2 union T3)+;
-(T1 union T2)+;
-
-# This comes from Guassian Elimination.
diff --git a/omegalib/examples/old_test/wak6.oc-rt b/omegalib/examples/old_test/wak6.oc-rt
deleted file mode 100644
index 458f5e9..0000000
--- a/omegalib/examples/old_test/wak6.oc-rt
+++ /dev/null
@@ -1,36 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# T1 := {[k,i,j] -> [k',i,j] : 1 <= k < k' < i <= 1024 && k'+1 <= j <= 1024};
-#
-# T2 := {[k,i,j] -> [j,i,j'] : 1 <= k < j < i <= 1024 && j < j' <= 1024};
-#
-# T3 := {[k,k+1,k+1] -> [k+1,i',j'] : 1 <= k <= i'-2, j'-2 && j' <= 1024 && i' <= 1024};
-#
-#
-# # The following expression evaluates to FALSE, which I believe is incorrect:
-#
-# T3+;
-
-{[k,k+1,k+1] -> [Out_1,i,j] : 1 <= k < Out_1 < i <= 1024 && Out_1+1 <= j <= 1024}
-
-#
-#
-# # And the following cause assertion failures:
-#
-# (T2 union T3)+;
-
-{[k,k+1,k+1] -> [j',i',j''] : 1 <= k < j' < i' <= 1024 && j'+1 <= j'' <= 1024} union
- {[k,i,i-1] -> [j',i',j''] : k+2 <= i <= j' < j'' <= 1024 && j' < i' <= 1024 && 1 <= k} union
- {[k,i,j] -> [j',i',j''] : j+2 <= i <= j' < i' <= 1024 && 1 <= k < j && j' < j'' <= 1024} union
- {[k,i,j] -> [j',i,j''] : 1 <= k < j < j' < i <= 1024 && j' < j'' <= 1024} union
- {[k,i,j] -> [j,i,j''] : 1 <= k < j < i <= 1024 && j < j'' <= 1024}
-
-#
-# (T1 union T2)+;
-
-{[k,i,j] -> [Out_1,i,j] : 1 <= k < Out_1 < i <= 1024 && Out_1+1 <= j <= 1024} union
- {[k,i,j] -> [Out_1,i,j'] : 1 <= k < j < Out_1 < i <= 1024 && Out_1 < j' <= 1024} union
- {[k,i,j] -> [j,i,j'] : 1 <= k < j < i <= 1024 && j < j' <= 1024}
-
-#
-#
-# # This comes from Guassian Elimination.
diff --git a/omegalib/examples/old_test/wak7 b/omegalib/examples/old_test/wak7
deleted file mode 100644
index b122c5a..0000000
--- a/omegalib/examples/old_test/wak7
+++ /dev/null
@@ -1,5 +0,0 @@
-R := {[k,k+1,k+1]: 1 <= k <= 1022}
- union {[k,i,j]: 2 <= k < i <= 1024 && k < j <= 1024};
-
-Hull R;
-
diff --git a/omegalib/examples/old_test/wak7.oc-rt b/omegalib/examples/old_test/wak7.oc-rt
deleted file mode 100644
index 3ccdb0a..0000000
--- a/omegalib/examples/old_test/wak7.oc-rt
+++ /dev/null
@@ -1,11 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# R := {[k,k+1,k+1]: 1 <= k <= 1022}
-# union {[k,i,j]: 2 <= k < i <= 1024 && k < j <= 1024};
-#
-#
-# Hull R;
-
-{[k,i,j]: k+1, 2 <= j <= 1024 && k < i <= 1024}
-
-#
-#
diff --git a/omegalib/examples/old_test/wak8 b/omegalib/examples/old_test/wak8
deleted file mode 100644
index f55c2b9..0000000
--- a/omegalib/examples/old_test/wak8
+++ /dev/null
@@ -1,15 +0,0 @@
- T1 := {[i1,i2,i3] -> [o1,i2,o3] : 2 <= i2 <= 511 && o1 <= 256
-&& o3 <= 511 && 2 <= i3 && i1+o3 <= i3+o1
- && 255i3+o1 <= i1+255o3 && 1 <= i1};
-
-T1;
-
- T2 := {[i1,i2,i3] -> [o1,i2,o3] : exists ( x: 2 <= i2 <= 511
- && 2 <= o3 <= 509 && o1 <= 256
- && 3+i1+o3 <= i3+o1 && 2o1+o3 <= 511+2x
- && 2 <= i3 && i1+2o1+o3 <= i3+3x
- && 255i3+511x <= i1+510o1+255o3 && 1 <= i1)};
-
-T2;
-
- T1 compose T2;
diff --git a/omegalib/examples/old_test/wak8.oc-rt b/omegalib/examples/old_test/wak8.oc-rt
deleted file mode 100644
index 10ba68d..0000000
--- a/omegalib/examples/old_test/wak8.oc-rt
+++ /dev/null
@@ -1,30 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# T1 := {[i1,i2,i3] -> [o1,i2,o3] : 2 <= i2 <= 511 && o1 <= 256
-# && o3 <= 511 && 2 <= i3 && i1+o3 <= i3+o1
-# && 255i3+o1 <= i1+255o3 && 1 <= i1};
-#
-#
-# T1;
-
-{[i1,i2,i3] -> [o1,i2,o3] : 2 <= i2 <= 511 && o1 <= 256 && o3 <= 511 && 2 <= i3 && i1+o3 <= i3+o1 && 255i3+o1 <= i1+255o3 && 1 <= i1}
-
-#
-#
-# T2 := {[i1,i2,i3] -> [o1,i2,o3] : Exists ( x: 2 <= i2 <= 511
-# && 2 <= o3 <= 509 && o1 <= 256
-# && 3+i1+o3 <= i3+o1 && 2o1+o3 <= 511+2x
-# && 2 <= i3 && i1+2o1+o3 <= i3+3x
-# && 255i3+511x <= i1+510o1+255o3 && 1 <= i1)};
-#
-#
-# T2;
-
-{[i1,i2,i3] -> [o1,i2,o3] : Exists ( alpha : 2 <= i2 <= 511 && 2 <= o3 <= 509 && o1 <= 256 && 3+i1+o3 <= i3+o1 && 2o1+o3 <= 511+2alpha && 2 <= i3 && i1+2o1+o3 <= i3+3alpha && 255i3+511alpha <= i1+510o1+255o3 && 1 <= i1)}
-
-#
-#
-# T1 compose T2;
-
-{[i1,i2,i3] -> [o1,i2,o3] : Exists ( alpha,beta,gamma : 2 <= i2 <= 511 && 2 <= gamma <= 509 && o1 <= 256 && o3 <= 511 && o3+alpha <= o1+gamma && o1+255gamma <= 255o3+alpha && gamma+2alpha <= 511+2beta && 1 <= i1 && 255i3+511beta <= i1+255gamma+510alpha && i1+gamma+2alpha <= i3+3beta && 2 <= i3 && 3+i1+gamma <= i3+alpha)}
-
-#
diff --git a/omegalib/examples/old_test/wielage b/omegalib/examples/old_test/wielage
deleted file mode 100644
index f2e3911..0000000
--- a/omegalib/examples/old_test/wielage
+++ /dev/null
@@ -1,13 +0,0 @@
-{[k1,k2,k3] :
-15+k1+2k2+3k3 = 0
- && k2+k3 <= 0
- && 0 <= 5+k2+k3
- && k3 <= 0
- && 0 <= 5+k3
- && k1+k2+k3 <= 0
- && 0 <= 5+k1+k2+k3
-};
-
-
-{[x] : exists (a,b : 0 <= x+4a <= 2 && 0 <= x+8b <= 6)};
-
diff --git a/omegalib/examples/old_test/wielage.oc-rt b/omegalib/examples/old_test/wielage.oc-rt
deleted file mode 100644
index 6c4b10a..0000000
--- a/omegalib/examples/old_test/wielage.oc-rt
+++ /dev/null
@@ -1,22 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# {[k1,k2,k3] :
-# 15+k1+2k2+3k3 = 0
-# && k2+k3 <= 0
-# && 0 <= 5+k2+k3
-# && k3 <= 0
-# && 0 <= 5+k3
-# && k1+k2+k3 <= 0
-# && 0 <= 5+k1+k2+k3
-# };
-
-{[0,0,-5]}
-
-#
-#
-#
-# {[x] : exists (a,b : 0 <= x+4a <= 2 && 0 <= x+8b <= 6)};
-
-{[x]: Exists ( alpha,beta : -4alpha <= x <= -4alpha+2, -8beta+6 && alpha <= 2beta)}
-
-#
-#
diff --git a/omegalib/examples/old_test/wild b/omegalib/examples/old_test/wild
deleted file mode 100644
index 7c43e3c..0000000
--- a/omegalib/examples/old_test/wild
+++ /dev/null
@@ -1,13 +0,0 @@
-symbolic L,M;
-
-I := {[j,i] : 1 <= j <= 100 && j-L <= i <= j};
-
-D := I*I intersection {[j1,i1] -> [j2,i2] : i1+j1 = i2+M};
-I;
-D;
-range D;
-(range D) - (range D);
-E := I - range D;
-sample := {[-M+3,-M+3]: L = 0 && -97 <= M <= 2};
-sample intersection range D;
-sample intersection E;
diff --git a/omegalib/examples/old_test/wild.oc-rt b/omegalib/examples/old_test/wild.oc-rt
deleted file mode 100644
index 811519b..0000000
--- a/omegalib/examples/old_test/wild.oc-rt
+++ /dev/null
@@ -1,43 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# symbolic L,M;
-#
-#
-# I := {[j,i] : 1 <= j <= 100 && j-L <= i <= j};
-#
-#
-# D := I*I intersection {[j1,i1] -> [j2,i2] : i1+j1 = i2+M};
-#
-# I;
-
-{[j,i]: 1, i <= j <= 100 && j <= L+i}
-
-#
-# D;
-
-{[In_1,In_2] -> [Out_1,In_1-M+In_2] : 1, In_2 <= In_1 <= 100 && 1 <= Out_1 <= 100 && In_1 <= L+In_2 && M+Out_1 <= L+In_1+In_2 && In_1+In_2 <= M+Out_1}
-
-#
-# range D;
-
-{[In_1,In_2]: Exists ( alpha : 1, In_2 <= In_1 <= 100 && M <= -In_2+200 && 2 <= M+L+In_2 && M+In_2 <= L+2alpha && 2alpha <= M+In_2 && In_1 <= L+In_2)}
-
-#
-# (range D) - (range D);
-
-{[In_1,In_2] : FALSE }
-
-#
-# E := I - range D;
-#
-# sample := {[-M+3,-M+3]: L = 0 && -97 <= M <= 2};
-#
-# sample intersection range D;
-
-{[In_1,In_2] : FALSE }
-
-#
-# sample intersection E;
-
-{[-M+3,-M+3]: L = 0 && -97 <= M <= 2}
-
-#
diff --git a/omegalib/examples/old_test/wrap b/omegalib/examples/old_test/wrap
deleted file mode 100644
index 895c51b..0000000
--- a/omegalib/examples/old_test/wrap
+++ /dev/null
@@ -1,12 +0,0 @@
-symbolic n;
-I := {[i,j,k] : 1 <= i,j,k <= n};
-R1 := {[i,j,n] -> [i,j+1,1] : 1 <= i,j,j+1 <= n}
- union {[i,j,k] -> [i,j,k'] : 1 <= i,j,k,k' <= n && k' = k+1};
-R1;
-R1+;
-R1+ within I;
-R2 := {[i,n,n] -> [i+1,1,1] : 1 <= i,i+1 <= n}
- union R1;
-R2;
-R2+;
-R2+ within I;
diff --git a/omegalib/examples/old_test/wrap.oc-rt b/omegalib/examples/old_test/wrap.oc-rt
deleted file mode 100644
index 0729e41..0000000
--- a/omegalib/examples/old_test/wrap.oc-rt
+++ /dev/null
@@ -1,50 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# symbolic n;
-#
-# I := {[i,j,k] : 1 <= i,j,k <= n};
-#
-# R1 := {[i,j,n] -> [i,j+1,1] : 1 <= i,j,j+1 <= n}
-# union {[i,j,k] -> [i,j,k'] : 1 <= i,j,k,k' <= n && k' = k+1};
-#
-# R1;
-
-{[i,j,n] -> [i,j+1,1] : 1 <= i <= n && 1 <= j < n} union
- {[i,j,k] -> [i,j,k+1] : 1 <= i <= n && 1 <= j <= n && 1 <= k < n}
-
-#
-# R1+;
-
-{[i,j,k] -> [i,j',k'] : 1 <= j < j' <= n && 1 <= i <= n && 1 <= k <= n && 1 <= k' <= n} union
- {[i,j,k] -> [i,j,k'] : 1 <= k < k' <= n && 1 <= i <= n && 1 <= j <= n}
-
-#
-# R1+ within I;
-
-{[i,j,k] -> [i,j',k'] : 1 <= j < j' <= n && 1 <= i <= n && 1 <= k <= n && 1 <= k' <= n} union
- {[i,j,k] -> [i,j,k'] : 1 <= k < k' <= n && 1 <= i <= n && 1 <= j <= n}
-
-#
-# R2 := {[i,n,n] -> [i+1,1,1] : 1 <= i,i+1 <= n}
-# union R1;
-#
-# R2;
-
-{[i,n,n] -> [i+1,1,1] : 1 <= i < n} union
- {[i,j,k] -> [i,j,k+1] : 1 <= i <= n && 1 <= j <= n && 1 <= k < n} union
- {[i,j,n] -> [i,j+1,1] : 1 <= i <= n && 1 <= j < n}
-
-#
-# R2+;
-
-{[i,j,k] -> [i',j',k'] : 1 <= i < i' <= n && 1 <= j <= n && 1 <= k <= n && 1 <= j' <= n && 1 <= k' <= n} union
- {[i,j,k] -> [i,j',k'] : 1 <= j < j' <= n && 1 <= i <= n && 1 <= k <= n && 1 <= k' <= n} union
- {[i,j,k] -> [i,j,k'] : 1 <= k < k' <= n && 1 <= i <= n && 1 <= j <= n}
-
-#
-# R2+ within I;
-
-{[i,j,k] -> [i',j',k'] : 1 <= i < i' <= n && 1 <= j <= n && 1 <= k <= n && 1 <= j' <= n && 1 <= k' <= n} union
- {[i,j,k] -> [i,j',k'] : 1 <= j < j' <= n && 1 <= i <= n && 1 <= k <= n && 1 <= k' <= n} union
- {[i,j,k] -> [i,j,k'] : 1 <= k < k' <= n && 1 <= i <= n && 1 <= j <= n}
-
-#
diff --git a/omegalib/examples/old_test/wrap0 b/omegalib/examples/old_test/wrap0
deleted file mode 100644
index ca914af..0000000
--- a/omegalib/examples/old_test/wrap0
+++ /dev/null
@@ -1,7 +0,0 @@
-symbolic n;
-I := {[i,j,k] : 1 <= i,j,k <= n};
-R1 := {[i,j,n] -> [i,j+1,1] : 1 <= i,j,j+1 <= n}
- union {[i,j,k] -> [i,j,k'] : 1 <= i,j,k,k' <= n && k' = k+1};
-R1;
-R1+ within I;
-R1+;
diff --git a/omegalib/examples/old_test/wrap0.oc-rt b/omegalib/examples/old_test/wrap0.oc-rt
deleted file mode 100644
index d9c7d34..0000000
--- a/omegalib/examples/old_test/wrap0.oc-rt
+++ /dev/null
@@ -1,26 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# symbolic n;
-#
-# I := {[i,j,k] : 1 <= i,j,k <= n};
-#
-# R1 := {[i,j,n] -> [i,j+1,1] : 1 <= i,j,j+1 <= n}
-# union {[i,j,k] -> [i,j,k'] : 1 <= i,j,k,k' <= n && k' = k+1};
-#
-# R1;
-
-{[i,j,n] -> [i,j+1,1] : 1 <= i <= n && 1 <= j < n} union
- {[i,j,k] -> [i,j,k+1] : 1 <= i <= n && 1 <= j <= n && 1 <= k < n}
-
-#
-# R1+ within I;
-
-{[i,j,k] -> [i,j',k'] : 1 <= j < j' <= n && 1 <= i <= n && 1 <= k <= n && 1 <= k' <= n} union
- {[i,j,k] -> [i,j,k'] : 1 <= k < k' <= n && 1 <= i <= n && 1 <= j <= n}
-
-#
-# R1+;
-
-{[i,j,k] -> [i,j',k'] : 1 <= j < j' <= n && 1 <= i <= n && 1 <= k <= n && 1 <= k' <= n} union
- {[i,j,k] -> [i,j,k'] : 1 <= k < k' <= n && 1 <= i <= n && 1 <= j <= n}
-
-#
diff --git a/omegalib/examples/old_test/wrap1 b/omegalib/examples/old_test/wrap1
deleted file mode 100644
index d862a5a..0000000
--- a/omegalib/examples/old_test/wrap1
+++ /dev/null
@@ -1,8 +0,0 @@
-symbolic n;
-I := {[i,j,k] : 1 <= i,j,k <= n};
-R1 := {[i,j,n] -> [i,j+1,1] : 1 <= i,j,j+1 <= n}
- union {[i,j,k] -> [i,j,k'] : 1 <= i,j,k,k' <= n && k' = k+1};
-R2 := {[i,n,n] -> [i+1,1,1] : 1 <= i,i+1 <= n}
- union R1;
-R2;
-R2+ within I;
diff --git a/omegalib/examples/old_test/wrap1.oc-rt b/omegalib/examples/old_test/wrap1.oc-rt
deleted file mode 100644
index 9e43201..0000000
--- a/omegalib/examples/old_test/wrap1.oc-rt
+++ /dev/null
@@ -1,25 +0,0 @@
-# Omega Calculator v1.2 (based on Omega Library 1.2, August, 2000):
-# symbolic n;
-#
-# I := {[i,j,k] : 1 <= i,j,k <= n};
-#
-# R1 := {[i,j,n] -> [i,j+1,1] : 1 <= i,j,j+1 <= n}
-# union {[i,j,k] -> [i,j,k'] : 1 <= i,j,k,k' <= n && k' = k+1};
-#
-# R2 := {[i,n,n] -> [i+1,1,1] : 1 <= i,i+1 <= n}
-# union R1;
-#
-# R2;
-
-{[i,n,n] -> [i+1,1,1] : 1 <= i < n} union
- {[i,j,k] -> [i,j,k+1] : 1 <= i <= n && 1 <= j <= n && 1 <= k < n} union
- {[i,j,n] -> [i,j+1,1] : 1 <= i <= n && 1 <= j < n}
-
-#
-# R2+ within I;
-
-{[i,j,k] -> [i',j',k'] : 1 <= i < i' <= n && 1 <= j <= n && 1 <= k <= n && 1 <= j' <= n && 1 <= k' <= n} union
- {[i,j,k] -> [i,j',k'] : 1 <= j < j' <= n && 1 <= i <= n && 1 <= k <= n && 1 <= k' <= n} union
- {[i,j,k] -> [i,j,k'] : 1 <= k < k' <= n && 1 <= i <= n && 1 <= j <= n}
-
-#
diff --git a/omegalib/examples/old_test/x b/omegalib/examples/old_test/x
deleted file mode 100644
index 56c23ca..0000000
--- a/omegalib/examples/old_test/x
+++ /dev/null
@@ -1,9 +0,0 @@
-old_IS:= {[i,j]: 1 <= i <= 8 & 1 <= j <= 4};
-T1:={[i,j] -> [j-i+8,i,0]};
-T2:={[i,j] -> [i+j-1,i,1]};
-n1:= T1 \ old_IS;
-n1;
-n2:= T2 \ old_IS;
-n2;
-codegen T1:old_IS,T2:old_IS;
-codegen 2 T1:old_IS,T2:old_IS;
diff --git a/omegalib/examples/old_test/x.oc-rt b/omegalib/examples/old_test/x.oc-rt
deleted file mode 100644
index fc77e1a..0000000
--- a/omegalib/examples/old_test/x.oc-rt
+++ /dev/null
@@ -1,84 +0,0 @@
->>> old_IS:= {[i,j]: 1 <= i <= 8 & 1 <= j <= 4};
->>> T1:={[i,j] -> [j-i+8,i,0]};
->>> T2:={[i,j] -> [i+j-1,i,1]};
->>> n1:= T1 \ old_IS;
->>> n1;
-{[i,j] -> [j-i+8,i,0] : 1 <= i <= 8 && 1 <= j <= 4}
->>> n2:= T2 \ old_IS;
->>> n2;
-{[i,j] -> [i+j-1,i,1] : 1 <= i <= 8 && 1 <= j <= 4}
->>> codegen T1:old_IS,T2:old_IS;
-for(t1 = 1; t1 <= 11; t1++) {
- for(t2 = max(t1-3,1); t2 <= min(t1,-t1+8); t2++) {
- s2(t2,t1-t2+1);
- }
- for(t2 = max(-t1+9,1); t2 <= min(-t1+12,t1-4); t2++) {
- s1(t2,t1+t2-8);
- }
- for(t2 = max(-t1+9,t1-3); t2 <= min(-t1+12,t1); t2++) {
- s1(t2,t1+t2-8);
- s2(t2,t1-t2+1);
- }
- for(t2 = max(-t1+9,t1+1); t2 <= min(-t1+12,8); t2++) {
- s1(t2,t1+t2-8);
- }
- for(t2 = max(t1-3,-t1+13); t2 <= min(t1,8); t2++) {
- s2(t2,t1-t2+1);
- }
-}
-
->>> codegen 2 T1:old_IS,T2:old_IS;
-for(t1 = 1; t1 <= 3; t1++) {
- for(t2 = 1; t2 <= t1; t2++) {
- s2(t2,t1-t2+1);
- }
- for(t2 = -t1+9; t2 <= 8; t2++) {
- s1(t2,t1+t2-8);
- }
-}
-for(t2 = 1; t2 <= 4; t2++) {
- s2(t2,-t2+5);
-}
-for(t2 = 5; t2 <= 8; t2++) {
- s1(t2,t2-4);
-}
-for(t2 = 2; t2 <= 3; t2++) {
- s2(t2,-t2+6);
-}
-for(t2 = 4; t2 <= 5; t2++) {
- s1(t2,t2-3);
- s2(t2,-t2+6);
-}
-for(t2 = 6; t2 <= 7; t2++) {
- s1(t2,t2-3);
-}
-for(t2 = 3; t2 <= 6; t2++) {
- s1(t2,t2-2);
- s2(t2,-t2+7);
-}
-for(t2 = 2; t2 <= 3; t2++) {
- s1(t2,t2-1);
-}
-for(t2 = 4; t2 <= 5; t2++) {
- s1(t2,t2-1);
- s2(t2,-t2+8);
-}
-for(t2 = 6; t2 <= 7; t2++) {
- s2(t2,-t2+8);
-}
-for(t2 = 1; t2 <= 4; t2++) {
- s1(t2,t2);
-}
-for(t2 = 5; t2 <= 8; t2++) {
- s2(t2,-t2+9);
-}
-for(t1 = 9; t1 <= 11; t1++) {
- for(t2 = 1; t2 <= -t1+12; t2++) {
- s1(t2,t1+t2-8);
- }
- for(t2 = t1-3; t2 <= 8; t2++) {
- s2(t2,t1-t2+1);
- }
-}
-
-
diff --git a/omegalib/examples/pufs b/omegalib/examples/pufs
deleted file mode 100644
index fa20bc8..0000000
--- a/omegalib/examples/pufs
+++ /dev/null
@@ -1,20 +0,0 @@
-#
-# Examples of relations using uninterpreted function symbols
-# from Omega Calculator documentation
-#
-
-symbolic p(2), n, m;
-R := { [ir,jr] : 1 <= ir <= n && 1 <= jr <= m };
-W1 := { [iw,jw] : 1 <= iw <= n && 1 <= jw <= m && p(Set) >= 0 };
-W2 := { [iw,jw] : 1 <= iw <= n && 1 <= jw <= m && p(Set) < 0 };
-Exposed := R intersection complement ( W1 union W2 );
-Exposed;
-
-symbolic f(1);
-R1 := { [i] -> [j] : 1 <= i = j <= 100 && f(In) <= f(Out)};
-R2 := { [i] -> [j] : 1 <= i <= j <= 100 && f(In) = f(Out)};
-
-R1 intersection R2;
-R1 union R2;
-R1 intersection complement R2;
-R1;
diff --git a/omegalib/examples/pufs.out b/omegalib/examples/pufs.out
deleted file mode 100644
index df65564..0000000
--- a/omegalib/examples/pufs.out
+++ /dev/null
@@ -1,50 +0,0 @@
-# Omega Calculator [v1.1, Nov 96]:
-# #
-# # Examples of relations using uninterpreted function symbols
-# # from Omega Calculator documentation
-# #
-#
-# symbolic p(2), n, m;
-#
-# R := { [ir,jr] : 1 <= ir <= n && 1 <= jr <= m };
-#
-# W1 := { [iw,jw] : 1 <= iw <= n && 1 <= jw <= m && p(Set) >= 0 };
-#
-# W2 := { [iw,jw] : 1 <= iw <= n && 1 <= jw <= m && p(Set) < 0 };
-#
-# Exposed := R intersection complement ( W1 union W2 );
-#
-# Exposed;
-
-{[In_1,In_2] : FALSE }
-
-#
-#
-# symbolic f(1);
-#
-# R1 := { [i] -> [j] : 1 <= i = j <= 100 && f(In) <= f(Out)};
-#
-# R2 := { [i] -> [j] : 1 <= i <= j <= 100 && f(In) = f(Out)};
-#
-#
-# R1 intersection R2;
-
-{[i] -> [i] : 1 <= i <= 100}
-
-#
-# R1 union R2;
-
-{[i] -> [j] : f(j) = f(i) && 1 <= i < j <= 100} union
- {[i] -> [i] : 1 <= i <= 100}
-
-#
-# R1 intersection complement R2;
-
-{[i] -> [j] : FALSE }
-
-#
-# R1;
-
-{[i] -> [i] : 1 <= i <= 100}
-
-#
diff --git a/omegalib/examples/substitution b/omegalib/examples/substitution
deleted file mode 100644
index 9d841fe..0000000
--- a/omegalib/examples/substitution
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# Test various variable substitution scenarios
-#
-
-symbolic n;
-
-# unimodular transformation
-#
-is := { [i,j] : 0 <=i<= 4 && 0 <= j<= 6 };
-t := { [i,j] -> [i2,j2] : i2 = i+j && j2 = i+2*j };
-codegen t:is;
-
-# non-unimodular transformation
-#
-is := { [i,j] : 0 <=i<= 4 && 0 <= j<= 6 };
-t := { [i,j] -> [i2,j2] : i2 = 2*i+j && j2 = i+2*j };
-codegen t:is;
-
-# second loop level is degenerated
-#
-is := {[i,j]:1 <= j <= 100 && j = i+4};
-t := {[i,j]->[a,b]: a = i && b = j};
-codegen t:is;
-
-# global variable case 1
-#
-is := { [i] : 19+n = i };
-t:= { [i] -> [j]: j = i };
-codegen t:is;
-
-# global variable case 2
-#
-is := {[i]: i-16 <= n < i && exists (alpha: i = n+1+3*alpha) };
-t := {[i] -> [i] : exists ( alpha : i = 1+n+18alpha)};
-codegen t:is;
diff --git a/omegalib/examples/substitution.out b/omegalib/examples/substitution.out
deleted file mode 100644
index 3a08405..0000000
--- a/omegalib/examples/substitution.out
+++ /dev/null
@@ -1,60 +0,0 @@
->>> #
->>> # Test various variable substitution scenarios
->>> #
->>>
->>> symbolic n;
->>>
->>> # unimodular transformation
->>> #
->>> is := { [i,j] : 0 <=i<= 4 && 0 <= j<= 6 };
->>> t := { [i,j] -> [i2,j2] : i2 = i+j && j2 = i+2*j };
->>> codegen t:is;
-for(t1 = 0; t1 <= 10; t1++) {
- for(t2 = max(t1,2*t1-4); t2 <= min(t1+6,2*t1); t2++) {
- s1(2*t1-t2,t2-t1);
- }
-}
-
->>>
->>>
->>> # non-unimodular transformation
->>> #
->>> is := { [i,j] : 0 <=i<= 4 && 0 <= j<= 6 };
->>> t := { [i,j] -> [i2,j2] : i2 = 2*i+j && j2 = i+2*j };
->>> codegen t:is;
-for(t1 = 0; t1 <= 14; t1++) {
- for(t2 = max(3*intDiv(intDiv(t1+1,2)--t1+2,3)+-t1,2*t1-12); t2 <= min(intDiv(t1+18,2),2*t1); t2 += 3) {
- s1(intDiv(2*t1-t2,3),intDiv(2*t2-t1,3));
- }
-}
-
->>>
->>>
->>> # second loop level is degenerated
->>> #
->>> is := {[i,j]:1 <= j <= 100 && j = i+4};
->>> t := {[i,j]->[a,b]: a = i && b = j};
->>> codegen t:is;
-for(t1 = -3; t1 <= 96; t1++) {
- s1(t1,t1+4);
-}
-
->>>
->>>
->>> # global variable case 1
->>> #
->>> is := { [i] : 19+n = i };
->>> t:= { [i] -> [j]: j = i };
->>> codegen t:is;
-s1(n+19);
-
->>>
->>>
->>> # global variable case 2
->>> #
->>> is := {[i]: i-16 <= n < i && exists (alpha: i = n+1+3*alpha) };
->>> t := {[i] -> [i] : Exists ( alpha : i = 1+n+18alpha)};
->>> codegen t:is;
-s1(n+1);
-
-
diff --git a/omegalib/examples/syr2k b/omegalib/examples/syr2k
deleted file mode 100644
index 29cdf4e..0000000
--- a/omegalib/examples/syr2k
+++ /dev/null
@@ -1,17 +0,0 @@
-# This example of code generation comes from
-# "Access Normalization: Loop Restructuring for NUMA Compilers"
-# by Wei Li and Keshav Pingali
-# Cornell Tech. report TR 92-1278
-
-symbolic n,b;
-
-IS10 := {[i,j,k] : 1 <= i <= j <= n && j <= i+2b-2
- && i-b+1,j-b+1,1 <= k <= i+b-1,j+b-1,n};
-T10 := {[i,j,k] -> [j-i+1,k-j,k]};
-
-known := {[*,*,*] : 1 <= b <= n};
-
-codegen T10:IS10;
-codegen T10:IS10 given known;
-codegen T10:IS10;
-codegen T10:IS10 given known;
diff --git a/omegalib/examples/syr2k.out b/omegalib/examples/syr2k.out
deleted file mode 100644
index 345ad04..0000000
--- a/omegalib/examples/syr2k.out
+++ /dev/null
@@ -1,69 +0,0 @@
->>> # This example of code generation comes from
->>> # "Access Normalization: Loop Restructuring for NUMA Compilers"
->>> # by Wei Li and Keshav Pingali
->>> # Cornell Tech. report TR 92-1278
->>> Symbolic n,b;
->>>
->>> IS10 := {[i,j,k] : 1 <= i <= j <= n && j <= i+2b-2
->>> && i-b+1,j-b+1,1 <= k <= i+b-1,j+b-1,n};
->>> T10 :={[i,j,k] -> [j-i+1,k-j,k]};
->>>
->>> known := {[*,*,*] : 1 <= b <= n};
->>>
->>> codegen T10:IS10;
-for(t1 = 1; t1 <= min(2*b-1,n); t1++) {
- for(t2 = max(-b+1,-n+1); t2 <= min(b-t1,n-t1); t2++) {
- for(t3 = max(t1+t2,1); t3 <= min(t2+n,n); t3++) {
- s1(t3-t1-t2+1,t3-t2,t3);
- }
- }
-}
-
->>> codegen T10:IS10 given known;
-for(t1 = 1; t1 <= min(n,2*b-1); t1++) {
- for(t2 = -b+1; t2 <= b-t1; t2++) {
- for(t3 = max(t1+t2,1); t3 <= min(n,n+t2); t3++) {
- s1(t3-t1-t2+1,t3-t2,t3);
- }
- }
-}
-
->>> codegen 2 T10:IS10;
-for(t1 = 1; t1 <= min(2*b-1,n); t1++) {
- for(t2 = max(-b+1,-n+1); t2 <= -t1; t2++) {
- for(t3 = 1; t3 <= t2+n; t3++) {
- s1(t3-t1-t2+1,t3-t2,t3);
- }
- }
- for(t2 = max(-t1+1,-b+1); t2 <= min(-t1+b,-1); t2++) {
- for(t3 = t1+t2; t3 <= t2+n; t3++) {
- s1(t3-t1-t2+1,t3-t2,t3);
- }
- }
- for(t2 = 0; t2 <= min(-t1+n,-t1+b); t2++) {
- for(t3 = t1+t2; t3 <= n; t3++) {
- s1(t3-t1-t2+1,t3-t2,t3);
- }
- }
-}
-
->>> codegen 2 T10:IS10 given known;
-for(t1 = 1; t1 <= min(n,2*b-1); t1++) {
- for(t2 = -b+1; t2 <= -t1; t2++) {
- for(t3 = 1; t3 <= t2+n; t3++) {
- s1(t3-t1-t2+1,t3-t2,t3);
- }
- }
- for(t2 = max(-t1+1,-b+1); t2 <= min(b-t1,0); t2++) {
- for(t3 = t2+t1; t3 <= t2+n; t3++) {
- s1(t3-t1-t2+1,t3-t2,t3);
- }
- }
- for(t2 = 1; t2 <= b-t1; t2++) {
- for(t3 = t1+t2; t3 <= n; t3++) {
- s1(t3-t1-t2+1,t3-t2,t3);
- }
- }
-}
-
-
diff --git a/omegalib/examples/union b/omegalib/examples/union
deleted file mode 100644
index d03fcba..0000000
--- a/omegalib/examples/union
+++ /dev/null
@@ -1,64 +0,0 @@
-# test ConvexRepresentation
-
-symbolic n;
-
-#
-# result is convex, same behavior as PairwiseCheck
-#
-r1:={[i,j]: 0<=i,j<=100};
-r2:={[i,j]: i>=100 && j>=0 && i+j<=200};
-r3:={[i,j]: i>=0 && j>=100 && i+j<=200};
-PairwiseCheck (r1 union r2 union r3);
-ConvexRepresentation (r1 union r2 union r3);
-
-r1:={[i]: 1<=i<=n && exists (alpha: i=2alpha)};
-r2:={[i]: 1<=i<=n && exists (alpha: i=2alpha+1)};
-PairwiseCheck (r1 union r2);
-ConvexRepresentation (r1 union r2);
-
-#
-# test neighboring regions merge
-#
-r1:={[i]: 1<=i<=9 && exists (alpha: i=2alpha+1)};
-r2:={[i]: 9<=i<=99 && exists (alpha: i=2alpha+1)};
-PairwiseCheck (r1 union r2);
-ConvexRepresentation (r1 union r2);
-
-r1:={[i,j]:1<=i,j<=100};
-r2:={[i,j]:50<=i<=100 && 100<=j<=200};
-r3:={[i,j]:1<=i<=50 && 100<=j<=200};
-r4:={[i,j]: 1000<=i,j<=2000};
-PairwiseCheck (r1 union r2 union r3 union r4);
-ConvexRepresentation (r1 union r2 union r3 union r4);
-
-#
-# test stride condition merge, filling up holes
-#
-r1:={[i]:1<=i<=100 && exists (alpha: 1+7alpha<=i<=3+7alpha)};
-r2:={[i]:1<=i<=100 && exists (alpha: i=4+7alpha)};
-r3:={[i]:1<=i<=100 && exists (alpha: i=5+7alpha)};
-r4:={[i]:1<=i<=100 && exists (alpha: 6+7alpha<=i<=9+7alpha)};
-PairwiseCheck (r1 union r2 union r3);
-ConvexRepresentation (r1 union r2 union r3);
-
-PairwiseCheck (r1 union r2 union r4);
-ConvexRepresentation (r1 union r2 union r4);
-
-r1:={[i]:6<=i<=96 && exists (alpha: i=6alpha)};
-r2:={[i]:3<=i<=93 && exists (alpha: i=3+6alpha)};
-PairwiseCheck (r1 union r2);
-ConvexRepresentation (r1 union r2);
-
-r1:={[i]:1<=i<=100 && exists (alpha: 1+15alpha<=i<=4+15alpha)};
-r2:={[i]:1<=i<=100 && exists (alpha: 6+15alpha<=i<=8+15alpha)};
-r3:={[i]:1<=i<=100 && exists (alpha: 11+15alpha<=i<=13+15alpha)};
-PairwiseCheck (r1 union r2 union r3);
-ConvexRepresentation (r1 union r2 union r3);
-
-#
-# additional test cases
-#
-r1:={[i]:0<=i<=100};
-r2:={[i]: 10<=i<=100 && exists (alpha: i=1+5alpha)};
-PairwiseCheck (r1 union r2);
-ConvexRepresentation (r1 union r2);
diff --git a/omegalib/examples/union.out b/omegalib/examples/union.out
deleted file mode 100644
index bf42f02..0000000
--- a/omegalib/examples/union.out
+++ /dev/null
@@ -1,96 +0,0 @@
->>> # test ConvexRepresentation
->>>
->>> symbolic n;
->>>
->>> #
->>> # result is convex, same behavior as PairwiseCheck
->>> #
->>> r1:={[i,j]: 0<=i,j<=100};
->>> r2:={[i,j]: i>=100 && j>=0 && i+j<=200};
->>> r3:={[i,j]: i>=0 && j>=100 && i+j<=200};
->>> PairwiseCheck (r1 union r2 union r3);
-{[i,j]: 0 <= i <= -j+200 && 0 <= j}
->>> ConvexRepresentation (r1 union r2 union r3);
-{[i,j]: 0 <= i <= -j+200 && 0 <= j}
->>>
->>> r1:={[i]: 1<=i<=n && exists (alpha: i=2alpha)};
->>> r2:={[i]: 1<=i<=n && exists (alpha: i=2alpha+1)};
->>> PairwiseCheck (r1 union r2);
-{[i]: 1 <= i <= n}
->>> ConvexRepresentation (r1 union r2);
-{[i]: 1 <= i <= n}
->>>
->>> #
->>> # test neighboring regions merge
->>> #
->>> r1:={[i]: 1<=i<=9 && exists (alpha: i=2alpha+1)};
->>> r2:={[i]: 9<=i<=99 && exists (alpha: i=2alpha+1)};
->>> PairwiseCheck (r1 union r2);
-{[i]: Exists ( alpha : 2alpha = 1+i && 1 <= i <= 9)} union
- {[i]: Exists ( alpha : 2alpha = 1+i && 9 <= i <= 99)}
->>> ConvexRepresentation (r1 union r2);
-{[i]: Exists ( alpha : 2alpha = 1+i && 1 <= i <= 99)}
->>>
->>> r1:={[i,j]:1<=i,j<=100};
->>> r2:={[i,j]:50<=i<=100 && 100<=j<=200};
->>> r3:={[i,j]:1<=i<=50 && 100<=j<=200};
->>> r4:={[i,j]: 1000<=i,j<=2000};
->>> PairwiseCheck (r1 union r2 union r3 union r4);
-{[i,j]: 1 <= i <= 100 && 1 <= j <= 100} union
- {[i,j]: 50 <= i <= 100 && 100 <= j <= 200} union
- {[i,j]: 1 <= i <= 50 && 100 <= j <= 200} union
- {[i,j]: 1000 <= i <= 2000 && 1000 <= j <= 2000}
->>> ConvexRepresentation (r1 union r2 union r3 union r4);
-{[i,j]: 1 <= i <= 100 && 1 <= j <= 200} union
- {[i,j]: 1000 <= i <= 2000 && 1000 <= j <= 2000}
->>>
->>> #
->>> # test stride condition merge, filling up holes
->>> #
->>> r1:={[i]:1<=i<=100 && exists (alpha: 1+7alpha<=i<=3+7alpha)};
->>> r2:={[i]:1<=i<=100 && exists (alpha: i=4+7alpha)};
->>> r3:={[i]:1<=i<=100 && exists (alpha: i=5+7alpha)};
->>> r4:={[i]:1<=i<=100 && exists (alpha: 6+7alpha<=i<=9+7alpha)};
->>> PairwiseCheck (r1 union r2 union r3);
-{[i]: Exists ( alpha : 1, 7alpha+1 <= i <= 100, 7alpha+3)} union
- {[i]: Exists ( alpha : 3+i = 7alpha && 4 <= i <= 95)} union
- {[i]: Exists ( alpha : 2+i = 7alpha && 5 <= i <= 96)}
->>> ConvexRepresentation (r1 union r2 union r3);
-{[i]: Exists ( alpha : 1, 7alpha+1 <= i <= 100, 7alpha+5)}
->>>
->>> PairwiseCheck (r1 union r2 union r4);
-{[i]: Exists ( alpha : 1, 7alpha+1 <= i <= 100, 7alpha+3)} union
- {[i]: Exists ( alpha : 3+i = 7alpha && 4 <= i <= 95)} union
- {[i]: Exists ( alpha : 1, 7alpha+6 <= i <= 100, 7alpha+9)}
->>> ConvexRepresentation (r1 union r2 union r4);
-{[i]: Exists ( alpha : 1, 7alpha+6 <= i <= 100, 7alpha+11)}
->>>
->>> r1:={[i]:6<=i<=96 && exists (alpha: i=6alpha)};
->>> r2:={[i]:3<=i<=93 && exists (alpha: i=3+6alpha)};
->>> PairwiseCheck (r1 union r2);
-{[i]: Exists ( alpha : i = 6alpha && 6 <= i <= 96)} union
- {[i]: Exists ( alpha : i = 3+6alpha && 3 <= i <= 93)}
->>> ConvexRepresentation (r1 union r2);
-{[i]: Exists ( alpha : i = 3alpha && 3 <= i <= 96)}
->>>
->>> r1:={[i]:1<=i<=100 && exists (alpha: 1+15alpha<=i<=4+15alpha)};
->>> r2:={[i]:1<=i<=100 && exists (alpha: 6+15alpha<=i<=8+15alpha)};
->>> r3:={[i]:1<=i<=100 && exists (alpha: 11+15alpha<=i<=13+15alpha)};
->>> PairwiseCheck (r1 union r2 union r3);
-{[i]: Exists ( alpha : 1, 15alpha+1 <= i <= 100, 15alpha+4)} union
- {[i]: Exists ( alpha : 1, 15alpha+6 <= i <= 100, 15alpha+8)} union
- {[i]: Exists ( alpha : 1, 15alpha+11 <= i <= 100, 15alpha+13)}
->>> ConvexRepresentation (r1 union r2 union r3);
-{[i]: Exists ( alpha : i = 4+15alpha && 4 <= i <= 94)} union
- {[i]: Exists ( alpha : 1, 5alpha+1 <= i <= 100, 5alpha+3)}
->>>
->>> #
->>> # additional test cases
->>> #
->>> r1:={[i]:0<=i<=100};
->>> r2:={[i]: 10<=i<=100 && exists (alpha: i=1+5alpha)};
->>> PairwiseCheck (r1 union r2);
-{[i]: 0 <= i <= 100}
->>> ConvexRepresentation (r1 union r2);
-{[i]: 0 <= i <= 100}
->>>
diff --git a/omegalib/omegacalc/CMakeLists.txt b/omegalib/omegacalc/CMakeLists.txt
deleted file mode 100644
index 05e2988..0000000
--- a/omegalib/omegacalc/CMakeLists.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-set(OC_VERSION 2.2.3)
-
-find_package(BISON)
-find_package(FLEX)
-
-FLEX_TARGET(OCScanner src/parser.ll ${CMAKE_CURRENT_BINARY_DIR}/lex.yy.cc COMPILE_FLAGS "-+")
-BISON_TARGET(OCParser src/parser.yy ${CMAKE_CURRENT_BINARY_DIR}/parser.tab.cc COMPILE_FLAGS "-t -d")
-ADD_FLEX_BISON_DEPENDENCY(OCScanner OCParser)
-
-include_directories(
- ${CMAKE_CURRENT_BINARY_DIR}
- include
- ${OMEGAROOT}/omega/include
- ${OMEGAROOT}/codegen/include
- )
-
-string(TIMESTAMP build_date "\\\"%m/%d/%Y\\\"")
-
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBUILD_CODEGEN -DOC_VERSION=\"\\\"OC_VERSION\\\"\" -DOC_BUILD_DATE=\"${build_date}\"")
-
-add_executable(omegacalc
- EXCLUDE_FROM_ALL
- src/AST.cc
- src/myflex.cc
- ${FLEX_OCScanner_OUTPUTS}
- ${BISON_OCParser_OUTPUTS}
- )
-
-add_dependencies(omegacalc omega codegen)
-target_link_libraries(omegacalc omega codegen)
-
-install(TARGETS omegacalc
- DESTINATION bin
- COMPONENT omegacalc OPTIONAL)
diff --git a/omegalib/omegacalc/doc/calculator.pdf b/omegalib/omegacalc/doc/calculator.pdf
deleted file mode 100644
index 5c307ab..0000000
--- a/omegalib/omegacalc/doc/calculator.pdf
+++ /dev/null
Binary files differ
diff --git a/omegalib/omegacalc/include/omega_calc/AST.h b/omegalib/omegacalc/include/omega_calc/AST.h
deleted file mode 100644
index 58d74fb..0000000
--- a/omegalib/omegacalc/include/omega_calc/AST.h
+++ /dev/null
@@ -1,310 +0,0 @@
-#ifndef _AST_H
-#define _AST_H
-
-#include <assert.h>
-#include <omega.h>
-#include <map>
-#include <set>
-
-typedef enum {eq, lt, gt, geq, leq, neq} Rel_Op;
-
-class tupleDescriptor;
-
-class Variable_Ref {
-public:
- int anonymous;
- omega::Const_String name;
- omega::Const_String stripped_name;
- omega::Variable_ID vid;
- omega::Variable_ID id(omega::Rel_Body *R) {
- if (vid) return vid;
- if (arity == 0)
- vid = R->get_local(g);
- else
- vid = R->get_local(g,of);
- return vid;
- }
- omega::Variable_ID id(omega::Relation &R) {
- if (vid) return vid;
- if (arity == 0)
- vid = R.get_local(g);
- else
- vid = R.get_local(g,of);
- return vid;
- }
- omega::Free_Var_Decl *g;
- int arity;
- int pos;
- omega::Argument_Tuple of;
- Variable_Ref(char *s, int _arity, omega::Argument_Tuple _of);
- Variable_Ref(char *s);
- Variable_Ref();
- ~Variable_Ref();
-};
-
-extern std::map<omega::Const_String, Variable_Ref *> functionOfInput;
-extern std::map<omega::Const_String, Variable_Ref *> functionOfOutput;
-
-class Declaration_Site {
-public:
- Declaration_Site();
- Declaration_Site(std::set<char *> *v);
- virtual Variable_Ref *extend(char *s);
- virtual Variable_Ref *extend(char *s, omega::Argument_Tuple, int);
- virtual ~Declaration_Site();
-
- Variable_Ref *extend();
- void print() {
- for (std::set<Variable_Ref *>::iterator i = declarations.begin(); ;) {
- printf("%s", static_cast<const char *>((*i)->name));
- i++;
- if (i != declarations.end())
- printf(",");
- else
- break;
- }
- }
-
- Declaration_Site *previous;
- std::set<Variable_Ref *> declarations;
-};
-
-class Global_Declaration_Site: public Declaration_Site {
-public:
- virtual Variable_Ref *extend(char *s);
- virtual Variable_Ref *extend() {
- return Declaration_Site::extend();
- }
- virtual Variable_Ref *extend(char *s, omega::Argument_Tuple in_of, int in_arity) {
- return Declaration_Site::extend(s,in_of,in_arity);
- }
- void extend_both_tuples(char *s, int arity);
- virtual ~Global_Declaration_Site();
-};
-
-extern Declaration_Site *current_Declaration_Site;
-
-inline void popScope() {
- assert(current_Declaration_Site);
- current_Declaration_Site = current_Declaration_Site->previous;
-}
-
-Variable_Ref *lookupScalar(char *s);
-Declaration_Site * defined (char *);
-
-class Exp {
-public:
- Exp(omega::coef_t c);
- Exp(Variable_Ref *v);
- friend Exp *multiply (omega::coef_t c, Exp *x);
- friend Exp *multiply (Exp *x, Exp *y);
- friend Exp *negate (Exp *x);
- friend Exp *add (Exp *x, Exp *y);
- friend Exp *subtract (Exp *x, Exp *y);
- std::map<Variable_Ref *, omega::coef_t> coefs;
- omega::coef_t constantTerm;
-protected:
- void addTerm(omega::coef_t coef, omega::Variable_ID v);
-};
-
-
-typedef struct {
- Exp *e;
- int step;
-} strideConstraint;
-
-
-class AST;
-class AST_constraints;
-
-
-class Tuple_Part {
-public:
- Variable_Ref *from,*to;
- Tuple_Part(Variable_Ref *f, Variable_Ref *t)
- { from = f; to = t; }
- Tuple_Part(Variable_Ref *f)
- { from = f; to = 0; }
- Tuple_Part()
- { from = 0; to = 0; }
-};
-
-
-class AST {
-public:
- virtual void install(omega::Formula *F) = 0;
- virtual void print() = 0;
- virtual ~AST() {}
-};
-
-
-class AST_And: public AST {
-public:
- AST_And(AST *l, AST *r) { left = l; right = r; }
- ~AST_And() { delete left; delete right; }
-
- virtual void install(omega::Formula *F);
-
- virtual void print() {
- printf("(");
- left->print();
- printf(" && ");
- right->print();
- printf(")");
- }
-
- AST *left,*right;
-};
-
-
-class AST_Or: public AST {
-public:
- AST_Or(AST *l, AST *r) { left = l; right = r; }
- ~AST_Or() { delete left; delete right; }
-
- virtual void install(omega::Formula *F);
-
- virtual void print() {
- printf("(");
- left->print();
- printf(" || ");
- right->print();
- printf(")");
- }
-
-
- AST *left, *right;
-};
-
-
-class AST_Not: public AST {
-public:
- AST_Not(AST *c) { child = c; }
- ~AST_Not() { delete child; }
-
- virtual void install(omega::Formula *F);
-
- virtual void print() {
- printf("(!");
- child->print();
- printf(")");
- }
-
- AST *child;
-};
-
-
-class AST_declare: public AST {
-public:
- virtual void install(omega::Formula *F) = 0;
-
- virtual void print() {
- printf("(");
- declaredVariables->print();
- printf(" : ");
- child->print();
- printf(")");
- }
-
- Declaration_Site *declaredVariables;
- AST *child;
-};
-
-
-class AST_exists: public AST_declare {
-public:
- AST_exists(Declaration_Site *dV, AST *c) {declaredVariables = dV, child = c;}
- ~AST_exists() { delete child; delete declaredVariables; }
-
- virtual void install(omega::Formula *F);
-
- virtual void print() {
- printf("exists ");
- AST_declare::print();
- }
-};
-
-
-class AST_forall: public AST_declare {
-public:
- AST_forall(Declaration_Site *dV, AST *c) {declaredVariables = dV, child = c; }
- ~AST_forall() { delete child; delete declaredVariables; }
-
- virtual void install(omega::Formula *F);
-
- virtual void print() {
- printf("forall ");
- AST_declare::print();
- }
-};
-
-
-
-class AST_constraints: public AST {
-public:
- AST_constraints(std::set<Exp *> *f, Rel_Op r, AST_constraints *o);
- AST_constraints(std::set<Exp *> *f, Rel_Op r, std::set<Exp *> *s);
- AST_constraints(std::set<Exp *> *f);
- ~AST_constraints();
-
- virtual void install(omega::Formula *F);
-
- virtual void print();
-
- AST_constraints *others;
- std::set<Exp *> *first;
- Rel_Op rel_op;
-};
-
-void install_stride(omega::F_And *F, strideConstraint *c);
-void install_eq(omega::F_And *F, Exp *e1, Exp *e2);
-void install_geq(omega::F_And *F, Exp *e1, Exp *e2);
-void install_gt(omega::F_And *F, Exp *e1, Exp *e2);
-void install_neq(omega::F_And *F, Exp *e1, Exp *e2);
-
-
-
-class tupleDescriptor {
-public:
- tupleDescriptor() { size = 0; }
- void extend();
- void extend(Exp * e);
- void extend(Exp * lb, Exp *ub);
- void extend(Exp * lb, Exp *ub, omega::coef_t stride);
- void extend(char * s, Exp *e);
- void extend(char * s);
- void extend(char * s, omega::Argument_Tuple, int);
-
- int size;
- std::vector<Variable_Ref *> vars;
- std::set<Exp *> eq_constraints;
- std::set<Exp *> geq_constraints;
- std::set<strideConstraint *> stride_constraints;
- ~tupleDescriptor() {
- for (std::set<Exp *>::iterator i = eq_constraints.begin(); i != eq_constraints.end(); i++)
- delete *i;
- for (std::set<Exp *>::iterator i = geq_constraints.begin(); i != geq_constraints.end(); i++)
- delete *i;
- for (std::set<strideConstraint *>::iterator i = stride_constraints.begin(); i != stride_constraints.end(); i++) {
- delete (*i)->e;
- delete *i;
- }
- }
-};
-
-extern Global_Declaration_Site *globalDecls;
-extern Declaration_Site *relationDecl;
-extern tupleDescriptor *currentTupleDescriptor;
-
-void resetGlobals();
-
-
-// Used to parse a list of paired relations for code generation commands
-// class RelTuplePair {
-// public:
-// RelTuplePair() : ispaces(0), mappings(0) {}
-// omega::Tuple<omega::Relation> ispaces;
-// omega::Tuple<omega::Relation> mappings;
-// };
-
-#endif
diff --git a/omegalib/omegacalc/include/omega_calc/PT-omega.c b/omegalib/omegacalc/include/omega_calc/PT-omega.c
deleted file mode 100644
index b0f5227..0000000
--- a/omegalib/omegacalc/include/omega_calc/PT-omega.c
+++ /dev/null
@@ -1,81 +0,0 @@
-#undef DONT_INCLUDE_TEMPLATE_CODE
-
-#include <basic/bool.h>
-#include <basic/util.h>
-#include <basic/List.h>
-#include <basic/SimpleList.h>
-#include <basic/Bag.h>
-#include <basic/Map.h>
-#include <basic/Tuple.h>
-#include <basic/Section.h>
-#include <basic/Exit.h>
-#include <basic/DynamicArray.h>
-#include <omega.h>
-#include <omega/AST.h>
-
-template int max(int, int);
-template int min(int, int);
-template unsigned int min(unsigned int, unsigned int);
-template void set_max(int&,int);
-template void set_min(int&,int);
-template void swap(int&,int&);
-template void swap(short&,short&);
-template void swap(signed char&,signed char&);
-template Relation copy(const Relation &);
-
-instantiate_Set(int);
-instantiate_Set(Global_Var_ID);
-instantiate_Set(Variable_ID);
-
-instantiate_List(int);
-instantiate_List(exit_func);
-instantiate_List(Formula *);
-instantiate_List(Conjunct *);
-instantiate_List(DNF *);
-instantiate_List(Relation *);
-instantiate_Simple_List(Relation);
-
-typedef Tuple<Relation> RelationTuple;
-instantiate_Tuple(bool);
-instantiate_Tuple(int);
-instantiate_Tuple(coef_t);
-instantiate_Tuple(char *);
-instantiate_Tuple(Const_String);
-instantiate_Tuple(Conjunct *);
-instantiate_Tuple(Relation);
-instantiate_Tuple(RelationTuple);
-instantiate_Tuple(Variable_ID);
-instantiate_Tuple(Free_Var_Decl *);
-instantiate_Tuple(std::string);
-instantiate_Tuple(GEQ_Handle);
-
-instantiate_Section(Variable_ID);
-
-instantiate_Generator(Variable_Info);
-instantiate_Generator(GEQ_Handle);
-instantiate_Generator(EQ_Handle);
-instantiate_Generator(Constraint_Handle);
-instantiate_Generator(Sub_Handle);
-
-instantiate_Map(Variable_ID,int);
-instantiate_Map(Global_Var_ID, Variable_ID);
-instantiate_Map(GEQ_Handle,Variable_ID);
-instantiate_Map(EQ_Handle,Variable_ID);
-instantiate_Map(Variable_ID,Set<Variable_ID>);
-instantiate_Map(Const_String, Relation *);
-
-instantiate_DynamicArray1(Coef_Var_Decl *);
-instantiate_DynamicArray1(Relation);
-instantiate_DynamicArray2(Relation);
-
-
-/* Stuff required by calculator: */
-instantiate_Bag(Exp *);
-instantiate_Bag(strideConstraint *);
-instantiate_Bag(Variable_Ref *);
-instantiate_Bag(char *);
-instantiate_Map(Variable_Ref *, int);
-instantiate_Map(Variable_Ref *, Variable_Ref *);
-instantiate_Map(Const_String, Variable_Ref *);
-instantiate_Set(Free_Var_Decl *);
-instantiate_Tuple(Variable_Ref *);
diff --git a/omegalib/omegacalc/include/omega_calc/myflex.h b/omegalib/omegacalc/include/omega_calc/myflex.h
deleted file mode 100755
index d472e51..0000000
--- a/omegalib/omegacalc/include/omega_calc/myflex.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#ifndef _MYFLEX_H
-#define _MYFLEX_H
-
-#ifndef yyFlexLexerOnce
-#include <FlexLexer.h>
-#endif
-#include <iostream>
-#include <string>
-#include <vector>
-
-class myFlexLexer: public yyFlexLexer {
-protected:
- std::string cur_line;
- int cur_pos;
- std::vector<std::string> history;
- int first_history_pos;
- int last_history_pos;
- std::vector<std::string> key_seqs;
-
-public:
- myFlexLexer(std::istream *arg_yyin = NULL, std::ostream *arg_yyout = NULL);
- ~myFlexLexer() {}
-protected:
- int LexerInput(char *buf, int max_size);
-};
-
-#endif
diff --git a/omegalib/omegacalc/src/AST.cc b/omegalib/omegacalc/src/AST.cc
deleted file mode 100644
index 1f885a6..0000000
--- a/omegalib/omegacalc/src/AST.cc
+++ /dev/null
@@ -1,467 +0,0 @@
-/*****************************************************************************
- Copyright (C) 1994-2000 the Omega Project Team
- Copyright (C) 2009-2011 Chun Chen
- All Rights Reserved.
-
- Purpose:
- build relation from parsed input.
-
- Notes:
-
- History:
-*****************************************************************************/
-
-#include <omega_calc/AST.h>
-#include <string.h>
-
-using namespace omega;
-
-Global_Declaration_Site *globalDecls;
-Declaration_Site *relationDecl = NULL;
-tupleDescriptor *currentTupleDescriptor;
-std::map<omega::Const_String, Variable_Ref *> functionOfInput;
-std::map<omega::Const_String, Variable_Ref *> functionOfOutput;
-
-AST_constraints::AST_constraints(std::set<Exp *> *f, Rel_Op r, AST_constraints *o) {
- others = o;
- rel_op = r;
- first = f;
-}
-
-AST_constraints::AST_constraints(std::set<Exp *> *f, Rel_Op r, std::set<Exp *> *s) {
- others = new AST_constraints(s);
- rel_op = r;
- first = f;
-}
-
-AST_constraints::AST_constraints(std::set<Exp *> *f){
- others = 0;
- first = f;
-}
-
-AST_constraints::~AST_constraints() {
- for (std::set<Exp *>::iterator i = first->begin(); i != first->end(); i++)
- delete *i;
- delete first;
- delete others;
-}
-
-void AST_constraints::print() {
- for (std::set<Exp *>::iterator i = first->begin(); ;) {
- printf(coef_fmt, (*i)->constantTerm);
- for (std::map<Variable_Ref *, omega::coef_t>::iterator j = (*i)->coefs.begin(); j != (*i)->coefs.end(); j++)
- printf("+"coef_fmt"%s", (*j).second, static_cast<const char *>((*j).first->name));
- i++;
- if (i != first->end())
- printf(", ");
- else
- break;
- }
-}
-
-
-Exp::Exp(coef_t c) : coefs() {
- constantTerm = c;
-}
-
-Exp::Exp(Variable_Ref *v) : coefs() {
- assert(v != 0);
- constantTerm = 0;
- coefs[v] = 1;
-}
-
-Exp *negate (Exp *x) {
- x->constantTerm = -x->constantTerm;
- for (std::map<Variable_Ref *, omega::coef_t>::iterator i = x->coefs.begin(); i != x->coefs.end(); i++)
- (*i).second = -(*i).second;
- return x;
-}
-
-Exp *add (Exp *x, Exp *y) {
- x->constantTerm += y->constantTerm;
- for (std::map<Variable_Ref *, omega::coef_t>::iterator i = y->coefs.begin(); i != y->coefs.end(); i++)
- x->coefs[(*i).first] += (*i).second;
- delete y;
- return x;
-}
-
-Exp *subtract (Exp *x, Exp *y) {
- x->constantTerm -= y->constantTerm;
- for (std::map<Variable_Ref *, omega::coef_t>::iterator i = y->coefs.begin(); i != y->coefs.end(); i++)
- x->coefs[(*i).first] -= (*i).second;
- delete y;
- return x;
-}
-
-Exp *multiply (coef_t c, Exp *x) {
- x->constantTerm *= c;
- for (std::map<Variable_Ref *, omega::coef_t>::iterator i = x->coefs.begin(); i != x->coefs.end(); i++)
- (*i).second *= c;
- return x;
-}
-
-Exp *multiply (Exp *x, Exp *y) {
- bool found_nonzero = false;
- for (std::map<Variable_Ref *, omega::coef_t>::iterator i = x->coefs.begin(); i != x->coefs.end(); i++)
- if ((*i).second != 0)
- found_nonzero = true;
- if (!found_nonzero) {
- coef_t c = x->constantTerm;
- delete x;
- return multiply(c,y);
- }
-
- found_nonzero = false;
- for (std::map<Variable_Ref *, omega::coef_t>::iterator i = y->coefs.begin(); i != y->coefs.end(); i++)
- if ((*i).second != 0)
- found_nonzero = true;
- if (!found_nonzero) {
- coef_t c = y->constantTerm;
- delete y;
- return multiply(c,x);
- }
-
- delete x;
- delete y;
- throw std::runtime_error("invalid exp multiply");
-}
-
-
-
-Declaration_Site *current_Declaration_Site = 0;
-
-Declaration_Site::Declaration_Site() {
- previous = current_Declaration_Site;
- current_Declaration_Site = this;
-}
-
-Declaration_Site::Declaration_Site(std::set<char *> *v) {
- previous = current_Declaration_Site;
- current_Declaration_Site = this;
- for (std::set<char *>::iterator i = v->begin(); i != v->end(); i++)
- declarations.insert(new Variable_Ref(*i));
-}
-
-Declaration_Site::~Declaration_Site() {
- for (std::set<Variable_Ref *>::iterator i = declarations.begin(); i != declarations.end(); i++)
- delete *i;
-}
-
-Variable_Ref::Variable_Ref(char *s, int _arity, Argument_Tuple _of) {
- name = s;
- arity = _arity;
- of = _of;
- anonymous = !strncmp("In_",s,3) || !strncmp("Out_",s,4);
- char *t = s;
- while (*t != '\0') t++;
- t--;
- while (*t == '\'') t--;
- t++;
- *t = '\0';
- stripped_name = s;
- g = 0;
-}
-
-Variable_Ref::Variable_Ref(char *s) {
- name = s;
- arity = 0;
- anonymous = !strncmp("In_",s,3) || !strncmp("Out_",s,4);
- char *t = s;
- while (*t != '\0') t++;
- t--;
- while (*t == '\'') t--;
- t++;
- *t = '\0';
- stripped_name = s;
- g = 0;
-}
-
-Variable_Ref::Variable_Ref() {
- name = "#anonymous";
- arity = 0;
- anonymous = 1;
- stripped_name = name;
- g = 0;
-}
-
-Variable_Ref::~Variable_Ref() {
- assert(g == 0);
-}
-
-Variable_Ref *lookupScalar(char *s) {
- Declaration_Site *ds;
- for(ds = current_Declaration_Site; ds; ds = ds->previous)
- for (std::set<Variable_Ref *>::iterator i = ds->declarations.begin(); i != ds->declarations.end(); i++)
- if ((*i)->name == static_cast<Const_String>(s))
- return (*i);
- return NULL;
-}
-
-Declaration_Site *defined(char *s) {
- Declaration_Site *ds;
- for(ds = current_Declaration_Site; ds; ds = ds->previous)
- for (std::set<Variable_Ref *>::iterator i = ds->declarations.begin(); i != ds->declarations.end(); i++)
- if ((*i)->name == static_cast<Const_String>(s))
- return ds;
- return NULL;
-}
-
-
-void AST_Or::install(Formula *F) {
- if (F->node_type() != Op_Or)
- F = F->add_or();
- left->install(F);
- right->install(F);
-}
-
-void AST_And::install(Formula *F) {
- if (F->node_type() != Op_And) F = F->add_and();
- left->install(F);
- right->install(F);
-}
-
-void AST_Not::install(Formula *F) {
- child->install(F->add_not());
-}
-
-void AST_exists::install(Formula *F) {
- F_Exists *G = F->add_exists();
- for (std::set<Variable_Ref *>::iterator i = declaredVariables->declarations.begin(); i != declaredVariables->declarations.end(); i++)
- (*i)->vid = G->declare((*i)->stripped_name);
- child->install(G);
-}
-
-void AST_forall::install(Formula *F) {
- F_Forall *G = F->add_forall();
- for (std::set<Variable_Ref *>::iterator i = declaredVariables->declarations.begin(); i != declaredVariables->declarations.end(); i++)
- (*i)->vid = G->declare((*i)->stripped_name);
- child->install(G);
-}
-
-void AST_constraints::install(Formula *F) {
- if (!others) return;
- F_And *f = F->and_with();
-
- for (std::set<Exp *>::iterator i = first->begin(); i != first->end(); i++)
- for (std::set<Exp *>::iterator j = others->first->begin(); j != others->first->end(); j++)
- switch (rel_op) {
- case(lt) : install_gt(f, *j, *i); break;
- case(gt) : install_gt(f, *i, *j); break;
- case(leq) : install_geq(f, *j, *i); break;
- case(geq) : install_geq(f, *i, *j); break;
- case(eq) : install_eq(f, *i, *j); break;
- case(neq) : install_neq(f, *i, *j); break;
- default : assert(0);
- }
- others->install(f);
-}
-
-
-void install_neq(F_And *F, Exp *e1, Exp *e2) {
- F_Or *or_ = F->add_or();
- F_And *and1 = or_->add_and();
- F_And *and2 = or_->add_and();
- install_gt(and1,e1,e2);
- install_gt(and2,e2,e1);
-};
-
-void install_stride(F_And *F, strideConstraint *s) {
- Stride_Handle c = F->add_stride(s->step);
- c.update_const(s->e->constantTerm);
- for (std::map<Variable_Ref *, omega::coef_t>::iterator i = s->e->coefs.begin(); i != s->e->coefs.end(); i++)
- c.update_coef((*i).first->id(F->relation()), (*i).second);
- c.finalize();
-}
-
-void install_eq(F_And *F, Exp *e1, Exp *e2) {
- EQ_Handle c = F->add_EQ();
- c.update_const(e1->constantTerm);
- if (e2) c.update_const(-e2->constantTerm);
- for (std::map<Variable_Ref *, omega::coef_t>::iterator i = e1->coefs.begin(); i != e1->coefs.end(); i++)
- c.update_coef((*i).first->id(F->relation()), (*i).second);
- if (e2)
- for (std::map<Variable_Ref *, omega::coef_t>::iterator i = e2->coefs.begin(); i != e2->coefs.end(); i++)
- c.update_coef((*i).first->id(F->relation()), -(*i).second);
- c.finalize();
-}
-
-void install_geq(F_And *F, Exp *e1, Exp *e2) {
- GEQ_Handle c = F->add_GEQ();
- c.update_const(e1->constantTerm);
- if (e2) c.update_const(-e2->constantTerm);
- for (std::map<Variable_Ref *, omega::coef_t>::iterator i = e1->coefs.begin(); i != e1->coefs.end(); i++)
- c.update_coef((*i).first->id(F->relation()), (*i).second);
- if (e2)
- for (std::map<Variable_Ref *, omega::coef_t>::iterator i = e2->coefs.begin(); i != e2->coefs.end(); i++)
- c.update_coef((*i).first->id(F->relation()), -(*i).second);
- c.finalize();
-}
-
-void install_gt(F_And *F, Exp *e1, Exp *e2) {
- GEQ_Handle c = F->add_GEQ();
- c.update_const(-1);
- c.update_const(e1->constantTerm);
- if (e2) c.update_const(-e2->constantTerm);
- for (std::map<Variable_Ref *, omega::coef_t>::iterator i = e1->coefs.begin(); i != e1->coefs.end(); i++)
- c.update_coef((*i).first->id(F->relation()), (*i).second);
- if (e2)
- for (std::map<Variable_Ref *, omega::coef_t>::iterator i = e2->coefs.begin(); i != e2->coefs.end(); i++)
- c.update_coef((*i).first->id(F->relation()), -(*i).second);
- c.finalize();
-}
-
-
-Global_Declaration_Site::~Global_Declaration_Site() {
-/* // Take care of global variables - since we do that kludge */
-/* // of declaring globals twice if arity > 0, we must take care */
-/* // not to just delete each global once per declaration. */
-
-/* // Actually, we can't free these, since Relations containing references to */
-/* // this may get freed later */
-/* foreach(v,Variable_Ref*,this->declarations,v->g=0); */
-/* //Set<Free_Var_Decl *> globals; */
-/* //foreach(v,Variable_Ref*,this->declarations,(globals.insert(v->g),v->g=0)); */
-/* //foreach(g,Free_Var_Decl*,globals,delete g); */
-
- // Only delete global variables here. --chun 5/28/2008
- for (std::set<Variable_Ref *>::iterator i= declarations.begin(); i != declarations.end(); i++) {
- if ((*i)->g != 0) {
- if ((*i)->arity != 0) { // functional symbols
- // only delete once from a pair of "(in)" and "(out)" variables
- const char *name = static_cast<const char *>((*i)->name);
- const char *s = "(in)";
- bool match = true;
- for (size_t p = strlen(name)-4, q = 0; p < strlen(name); p++, q++)
- if (s[q] != name[p]) {
- match = false;
- break;
- }
- if (match)
- delete (*i)->g;
- }
- else // not functions
- delete (*i)->g;
-
- (*i)->g = 0;
- }
- }
-}
-
-Variable_Ref * Global_Declaration_Site::extend(char *s) {
- Variable_Ref *r = new Variable_Ref(s);
- r->g = new Free_Var_Decl(r->stripped_name);
- declarations.insert(r);
- return r;
-}
-
-void Global_Declaration_Site::extend_both_tuples(char *s, int arity) {
- if (arity == 0)
- extend(s);
- else {
- assert(arity > 0);
-
- char s1[strlen(s)+5], s2[strlen(s)+6];
- strcpy(s1,s); strcat(s1,"(in)");
- strcpy(s2,s); strcat(s2,"(out)");
- Const_String name = s;
-
- Variable_Ref *r1 = new Variable_Ref(s1, arity, Input_Tuple);
- Variable_Ref *r2 = new Variable_Ref(s2, arity, Output_Tuple);
- r1->g = r2->g = new Free_Var_Decl(s,arity);
-
- functionOfInput[name] = r1;
- functionOfOutput[name] = r2;
-
- declarations.insert(r1);
- declarations.insert(r2);
- }
-}
-
-
-void resetGlobals() {
- for (std::set<Variable_Ref *>::iterator i = globalDecls->declarations.begin(); i != globalDecls->declarations.end(); i++)
- (*i)->vid = 0;
-}
-
-
-Variable_Ref *Declaration_Site::extend(char *s) {
- Variable_Ref *r = new Variable_Ref(s);
- declarations.insert(r);
- return r;
-}
-
-Variable_Ref *Declaration_Site::extend(char *s, Argument_Tuple of, int pos) {
- Variable_Ref *r = new Variable_Ref(s);
- declarations.insert(r);
- r->of = of;
- r->pos = pos;
- return r;
-}
-
-Variable_Ref * Declaration_Site::extend() {
- Variable_Ref *r = new Variable_Ref();
- declarations.insert(r);
- return r;
-}
-
-void tupleDescriptor::extend(char *s) {
- Variable_Ref *r = relationDecl->extend(s);
- size++;
- vars.push_back(r);
- assert(size == vars.size());
-}
-
-void tupleDescriptor::extend(char *s, Argument_Tuple of, int pos) {
- Variable_Ref *r = relationDecl->extend(s, of, pos);
- size++;
- vars.push_back(r);
- assert(size == vars.size());
-}
-
-void tupleDescriptor::extend(Exp *e) {
- Variable_Ref *r = relationDecl->extend();
- size++;
- vars.push_back(r);
- assert(size == vars.size());
- Exp *eq = subtract(e, new Exp(r));
- eq_constraints.insert(eq);
-}
-
-void tupleDescriptor::extend(char *s, Exp *e) {
- Variable_Ref *r = relationDecl->extend(s);
- size++;
- vars.push_back(r);
- assert(size == vars.size());
- Exp *eq = subtract(e, new Exp(r));
- eq_constraints.insert(eq);
-}
-
-void tupleDescriptor::extend() {
- Variable_Ref *r = relationDecl->extend();
- size++;
- vars.push_back(r);
- assert(size == vars.size());
-}
-void tupleDescriptor::extend(Exp *lb,Exp *ub) {
- Variable_Ref *r = relationDecl->extend();
- size++;
- vars.push_back(r);
- assert(size == vars.size());
- Exp *lb_exp = subtract(new Exp(r), lb);
- geq_constraints.insert(lb_exp);
- Exp *ub_exp = subtract(ub, new Exp(r));
- geq_constraints.insert(ub_exp);
-}
-void tupleDescriptor::extend(Exp *lb,Exp *ub, coef_t stride) {
- Variable_Ref *r = relationDecl->extend();
- size++;
- vars.push_back(r);
- Exp *lb_exp = subtract(new Exp(r), new Exp(*lb));
- geq_constraints.insert(lb_exp);
- Exp *ub_exp = subtract(ub, new Exp(r));
- geq_constraints.insert(ub_exp);
- strideConstraint *s = new strideConstraint;
- s->e = subtract(lb, new Exp(r));
- s->step = stride;
- stride_constraints.insert(s);
-}
diff --git a/omegalib/omegacalc/src/myflex.cc b/omegalib/omegacalc/src/myflex.cc
deleted file mode 100755
index 89a2544..0000000
--- a/omegalib/omegacalc/src/myflex.cc
+++ /dev/null
@@ -1,421 +0,0 @@
-/*****************************************************************************
- Copyright (C) 2011 Chun Chen
- All Rights Reserved.
-
- Purpose:
- support command line editing for calculator.
-
- Notes:
- Since terminfo database is not queried for those nagging escape sequences,
- current supported terminials are limited to xterm, linux, cygwin.
-
- History:
- 02/06/11 created by Chun Chen
-*****************************************************************************/
-
-#include <omega_calc/myflex.h>
-#include <basic/util.h>
-#include <string.h>
-#include <stdlib.h>
-
-#if defined __USE_POSIX
-#include <unistd.h>
-#include <termios.h>
-#include <sys/ioctl.h>
-#elif defined __WIN32
-#else
-#endif
-
-#define HISTORY_SIZE 100
-
-namespace {
-enum {MY_KEY_EOF=0, MY_KEY_LEFT, MY_KEY_RIGHT, MY_KEY_UP, MY_KEY_DOWN,
- MY_KEY_DEL, MY_KEY_HOME, MY_KEY_END, MY_KEY_PGUP, MY_KEY_PGDOWN,
- MY_KEY_NUMPAD_HOME, MY_KEY_NUMPAD_END};
-}
-
-extern bool is_interactive;
-extern const char * PROMPT_STRING;
-
-void move_cursor(int col, int n, int num_cols, const std::vector<std::string> &key_seqs) {
- if (n == 0)
- return;
-
- int new_col = omega::int_mod(col + n, num_cols);
- if (new_col == 0)
- new_col = num_cols;
-
- for (int i = 0; i < new_col-col; i++)
- std::cout.write(key_seqs[MY_KEY_RIGHT].c_str(), key_seqs[MY_KEY_RIGHT].length());
- for (int i = 0; i < col-new_col; i++)
- std::cout.write(key_seqs[MY_KEY_LEFT].c_str(), key_seqs[MY_KEY_LEFT].length());
-
- if (n < 0)
- for (int i = 0; i < omega::abs(n) / num_cols + (new_col>col)?1:0; i++)
- std::cout.write(key_seqs[MY_KEY_UP].c_str(), key_seqs[MY_KEY_UP].length());
- else
- for (int i = 0; i < omega::abs(n) / num_cols + (new_col<col)?1:0; i++)
- std::cout.write(key_seqs[MY_KEY_DOWN].c_str(), key_seqs[MY_KEY_DOWN].length());
-}
-
-
-
-myFlexLexer::myFlexLexer(std::istream *arg_yyin, std::ostream *arg_yyout):
- yyFlexLexer(arg_yyin, arg_yyout), history(HISTORY_SIZE), key_seqs(12) {
- cur_pos = 0;
- first_history_pos = 0;
- last_history_pos = -1;
-
- if (strcmp(getenv("TERM"), "xterm") == 0 ||
- strcmp(getenv("TERM"), "xterm-color") == 0) {
- key_seqs[MY_KEY_EOF] = "\x04";
- key_seqs[MY_KEY_LEFT] = "\x1B\x5B\x44";
- key_seqs[MY_KEY_RIGHT] = "\x1B\x5B\x43";
- key_seqs[MY_KEY_UP] = "\x1B\x5B\x41";
- key_seqs[MY_KEY_DOWN] = "\x1B\x5B\x42";
- key_seqs[MY_KEY_DEL] = "\x1B\x5B\x33\x7E";
- key_seqs[MY_KEY_HOME] = "\x1B\x4F\x48";
- key_seqs[MY_KEY_END] = "\x1B\x4F\x46";
- key_seqs[MY_KEY_PGUP] = "\x1B\x5B\x35\x7E";
- key_seqs[MY_KEY_PGDOWN] = "\x1B\x5B\x36\x7E";
- key_seqs[MY_KEY_NUMPAD_HOME] = "\x1B\x5B\x31\x7E";
- key_seqs[MY_KEY_NUMPAD_END] = "\x1B\x5B\x34\x7E";
- }
- else if (strcmp(getenv("TERM"), "linux") == 0 ||
- strcmp(getenv("TERM"), "cygwin") == 0) {
- key_seqs[MY_KEY_EOF] = "\x04";
- key_seqs[MY_KEY_LEFT] = "\x1B\x5B\x44";
- key_seqs[MY_KEY_RIGHT] = "\x1B\x5B\x43";
- key_seqs[MY_KEY_UP] = "\x1B\x5B\x41";
- key_seqs[MY_KEY_DOWN] = "\x1B\x5B\x42";
- key_seqs[MY_KEY_DEL] = "\x1B\x5B\x33\x7E";
- key_seqs[MY_KEY_HOME] = "\x1B\x5B\x31\x7E";
- key_seqs[MY_KEY_END] = "\x1B\x5B\x34\x7E";
- key_seqs[MY_KEY_PGUP] = "\x1B\x5B\x35\x7E";
- key_seqs[MY_KEY_PGDOWN] = "\x1B\x5B\x36\x7E";
- key_seqs[MY_KEY_NUMPAD_HOME] = "\x1B\x5B\x31\x7E";
- key_seqs[MY_KEY_NUMPAD_END] = "\x1B\x5B\x34\x7E";
- }
- else {
- key_seqs[MY_KEY_EOF] = "\x04";
- }
-}
-
-int myFlexLexer::LexerInput(char *buf, int max_size) {
- if (!is_interactive)
- return yyFlexLexer::LexerInput(buf, max_size);
-
-#if defined __USE_POSIX
- winsize wsz;
- ioctl(0, TIOCGWINSZ, &wsz);
- int num_cols = wsz.ws_col;
-
- // unknown screen size, bail out
- if (num_cols == 0)
- return yyFlexLexer::LexerInput(buf, max_size);
-
- termios old_settings;
- termios new_settings;
- char keycodes[255];
-
- // set console to no echo, raw input mode
- tcgetattr(STDIN_FILENO, &old_settings);
- new_settings = old_settings;
- new_settings.c_cc[VTIME] = 1;
- new_settings.c_cc[VMIN] = 1;
- new_settings.c_iflag &= ~(IXOFF);
- new_settings.c_lflag &= ~(ECHO|ICANON);
- tcsetattr(STDIN_FILENO, TCSANOW, &new_settings);
-
- int cur_history_pos = (last_history_pos+1)%HISTORY_SIZE;
- while (true) {
- // feed current line to lex
- int len = cur_line.length();
- if (len > 0 && cur_line[len-1] == '\n') {
- int n = omega::min(len-cur_pos, max_size);
- for (int i = 0; i < n; i++)
- buf[i] = cur_line[cur_pos+i];
- cur_pos = cur_pos + n;
- if (cur_pos == len) {
- // save history
- if (len > 1) {
- if (last_history_pos == -1)
- last_history_pos = 0;
- else {
- last_history_pos = (last_history_pos+1)%HISTORY_SIZE;
- if ((last_history_pos + 1)%HISTORY_SIZE == first_history_pos)
- first_history_pos = (first_history_pos+1)%HISTORY_SIZE;
- }
- history[last_history_pos] = cur_line.substr(0, len-1);
- cur_history_pos = (last_history_pos+1)%HISTORY_SIZE;
- }
-
- // clear the working line
- cur_pos = 0;
- cur_line.clear();
- }
- tcsetattr(STDIN_FILENO, TCSANOW, &old_settings);
- return n;
- }
-
- int count = read(STDIN_FILENO, keycodes, 255);
-
- // handle special key my way
- int eaten = 0;
- while (eaten < count) {
- if (key_seqs[MY_KEY_EOF].length() > 0 &&
- static_cast<size_t>(count - eaten) >= key_seqs[MY_KEY_EOF].length() &&
- strncmp(&keycodes[eaten], key_seqs[MY_KEY_EOF].c_str(), key_seqs[MY_KEY_EOF].length()) == 0) {
- if (cur_line.length() == 0) {
- tcsetattr(STDIN_FILENO, TCSANOW, &old_settings);
- return 0;
- }
-
- eaten += key_seqs[MY_KEY_EOF].length();
- }
- else if (key_seqs[MY_KEY_LEFT].length() > 0 &&
- static_cast<size_t>(count - eaten) >= key_seqs[MY_KEY_LEFT].length() &&
- strncmp(&keycodes[eaten], key_seqs[MY_KEY_LEFT].c_str(), key_seqs[MY_KEY_LEFT].length()) == 0) {
- if (cur_pos > 0) {
- int cur_col = (cur_pos + 1 + strlen(PROMPT_STRING) + 1) % num_cols;
- if (cur_col == 0)
- cur_col = num_cols;
-
- cur_pos--;
-
- move_cursor(cur_col, -1, num_cols, key_seqs);
- }
- eaten += key_seqs[MY_KEY_LEFT].length();
- }
- else if (key_seqs[MY_KEY_RIGHT].length() > 0 &&
- static_cast<size_t>(count - eaten) >= key_seqs[MY_KEY_RIGHT].length() &&
- strncmp(&keycodes[eaten], key_seqs[MY_KEY_RIGHT].c_str(), key_seqs[MY_KEY_RIGHT].length()) == 0) {
- if (static_cast<size_t>(cur_pos) < cur_line.length()) {
- int cur_col = (cur_pos + 1 + strlen(PROMPT_STRING) + 1) % num_cols;
- if (cur_col == 0)
- cur_col = num_cols;
-
- cur_pos++;
-
- move_cursor(cur_col, 1, num_cols, key_seqs);
- }
- eaten += key_seqs[MY_KEY_RIGHT].length();
- }
- else if (key_seqs[MY_KEY_UP].length() > 0 &&
- static_cast<size_t>(count - eaten) >= key_seqs[MY_KEY_UP].length() &&
- strncmp(&keycodes[eaten], key_seqs[MY_KEY_UP].c_str(), key_seqs[MY_KEY_UP].length()) == 0) {
- if (cur_history_pos >= 0 && cur_history_pos != first_history_pos) {
- history[cur_history_pos] = cur_line;
- cur_history_pos = omega::int_mod(cur_history_pos-1, HISTORY_SIZE);
-
- int cur_col = (cur_pos + 1 + strlen(PROMPT_STRING) + 1) % num_cols;
- if (cur_col == 0)
- cur_col = num_cols;
-
- move_cursor(cur_col, -cur_pos, num_cols, key_seqs);
-
- std::cout.write(history[cur_history_pos].c_str(), history[cur_history_pos].length());
-
- cur_col = (history[cur_history_pos].length() + strlen(PROMPT_STRING) + 1) % num_cols;
- if (cur_col == 0) {
- std::cout.put(' ');
- std::cout.put('\b');
- }
-
- if (cur_line.length() > history[cur_history_pos].length()) {
- for (size_t i = 0; i < cur_line.length() - history[cur_history_pos].length(); i++)
- std::cout.put(' ');
-
- cur_col = (cur_line.length() + strlen(PROMPT_STRING) + 1) % num_cols;
- if (cur_col == 0)
- cur_col = num_cols + 1;
- else
- cur_col++;
-
- move_cursor(cur_col, -(cur_line.length() - history[cur_history_pos].length()), num_cols, key_seqs);
- }
- cur_line = history[cur_history_pos];
- cur_pos = cur_line.length();
- }
-
- eaten += key_seqs[MY_KEY_UP].length();
- }
- else if (key_seqs[MY_KEY_DOWN].length() > 0 &&
- static_cast<size_t>(count - eaten) >= key_seqs[MY_KEY_DOWN].length() &&
- strncmp(&keycodes[eaten], key_seqs[MY_KEY_DOWN].c_str(), key_seqs[MY_KEY_DOWN].length()) == 0) {
- if (cur_history_pos >= 0 && cur_history_pos != (last_history_pos+1)%HISTORY_SIZE) {
- history[cur_history_pos] = cur_line;
- cur_history_pos = (cur_history_pos+1)%HISTORY_SIZE;
-
- int cur_col = (cur_pos + 1 + strlen(PROMPT_STRING) + 1) % num_cols;
- if (cur_col == 0)
- cur_col = num_cols;
-
- move_cursor(cur_col, -cur_pos, num_cols, key_seqs);
-
- std::cout.write(history[cur_history_pos].c_str(), history[cur_history_pos].length());
-
- cur_col = (history[cur_history_pos].length() + strlen(PROMPT_STRING) + 1) % num_cols;
- if (cur_col == 0) {
- std::cout.put(' ');
- std::cout.put('\b');
- }
-
- if (cur_line.length() > history[cur_history_pos].length()) {
- for (size_t i = 0; i < cur_line.length() - history[cur_history_pos].length(); i++)
- std::cout.put(' ');
-
- cur_col = (cur_line.length() + strlen(PROMPT_STRING) + 1) % num_cols;
- if (cur_col == 0)
- cur_col = num_cols + 1;
- else
- cur_col++;
-
- move_cursor(cur_col, -(cur_line.length() - history[cur_history_pos].length()), num_cols, key_seqs);
- }
- cur_line = history[cur_history_pos];
- cur_pos = cur_line.length();
- }
-
- eaten += key_seqs[MY_KEY_DOWN].length();
- }
- else if (key_seqs[MY_KEY_DEL].length() > 0 &&
- static_cast<size_t>(count - eaten) >= key_seqs[MY_KEY_DEL].length() &&
- strncmp(&keycodes[eaten], key_seqs[MY_KEY_DEL].c_str(), key_seqs[MY_KEY_DEL].length()) == 0) {
- if (static_cast<size_t>(cur_pos) < cur_line.length()) {
- cur_line.erase(cur_pos, 1);
- std::cout.write(&(cur_line.c_str()[cur_pos]), cur_line.length()-cur_pos);
- std::cout.put(' ');
-
- int cur_col = (cur_line.length() + 1 + strlen(PROMPT_STRING) + 1) % num_cols;
- if (cur_col == 0)
- cur_col = num_cols + 1;
- else
- cur_col++;
-
- move_cursor(cur_col, -(cur_line.length()-cur_pos+1), num_cols, key_seqs);
- }
-
- eaten += key_seqs[MY_KEY_DEL].length();
- }
- else if (key_seqs[MY_KEY_HOME].length() > 0 &&
- static_cast<size_t>(count - eaten) >= key_seqs[MY_KEY_HOME].length() &&
- strncmp(&keycodes[eaten], key_seqs[MY_KEY_HOME].c_str(), key_seqs[MY_KEY_HOME].length()) == 0) {
- int cur_col = (cur_pos + 1 + strlen(PROMPT_STRING) + 1) % num_cols;
- if (cur_col == 0)
- cur_col = num_cols;
-
- move_cursor(cur_col, -cur_pos, num_cols, key_seqs);
-
- cur_pos = 0;
- eaten += key_seqs[MY_KEY_HOME].length();
- }
- else if (key_seqs[MY_KEY_END].length() > 0 &&
- static_cast<size_t>(count - eaten) >= key_seqs[MY_KEY_END].length() &&
- strncmp(&keycodes[eaten], key_seqs[MY_KEY_END].c_str(), key_seqs[MY_KEY_END].length()) == 0) {
- int cur_col = (cur_pos + 1 + strlen(PROMPT_STRING) + 1) % num_cols;
- if (cur_col == 0)
- cur_col = num_cols;
-
- move_cursor(cur_col, cur_line.length()-cur_pos, num_cols, key_seqs);
-
- cur_pos = cur_line.length();
- eaten += key_seqs[MY_KEY_END].length();
- }
- else if (key_seqs[MY_KEY_PGUP].length() > 0 &&
- static_cast<size_t>(count - eaten) >= key_seqs[MY_KEY_PGUP].length() &&
- strncmp(&keycodes[eaten], key_seqs[MY_KEY_PGUP].c_str(), key_seqs[MY_KEY_PGUP].length()) == 0) {
- eaten += key_seqs[MY_KEY_PGUP].length();
- }
- else if (key_seqs[MY_KEY_PGDOWN].length() > 0 &&
- static_cast<size_t>(count - eaten) >= key_seqs[MY_KEY_PGDOWN].length() &&
- strncmp(&keycodes[eaten], key_seqs[MY_KEY_PGDOWN].c_str(), key_seqs[MY_KEY_PGDOWN].length()) == 0) {
- eaten += key_seqs[MY_KEY_PGDOWN].length();
- }
- else if (key_seqs[MY_KEY_NUMPAD_HOME].length() > 0 &&
- static_cast<size_t>(count - eaten) >= key_seqs[MY_KEY_NUMPAD_HOME].length() &&
- strncmp(&keycodes[eaten], key_seqs[MY_KEY_NUMPAD_HOME].c_str(), key_seqs[MY_KEY_NUMPAD_HOME].length()) == 0) {
- eaten += key_seqs[MY_KEY_NUMPAD_HOME].length();
- }
- else if (key_seqs[MY_KEY_NUMPAD_END].length() > 0 &&
- static_cast<size_t>(count - eaten) >= key_seqs[MY_KEY_NUMPAD_END].length() &&
- strncmp(&keycodes[eaten], key_seqs[MY_KEY_NUMPAD_END].c_str(), key_seqs[MY_KEY_NUMPAD_END].length()) == 0) {
- eaten += key_seqs[MY_KEY_NUMPAD_END].length();
- }
- else if (keycodes[eaten] == '\x1B' && (count - eaten == 1 || keycodes[eaten+1] == '\x1B')) { // single ESC key
- eaten++;
- }
- else if (keycodes[eaten] == '\x1B') { // unknown escape sequences
- while (eaten+1 < count && keycodes[eaten+1] != '\x1B')
- eaten++;
-
- keycodes[eaten] = '~';
- }
- else if (keycodes[eaten] == '\x7F') { // backspace key
- if (cur_pos > 0) {
- int cur_col = (cur_pos + 1 + strlen(PROMPT_STRING) + 1) % num_cols;
- if (cur_col == 0)
- cur_col = num_cols;
-
- cur_pos--;
- cur_line.erase(cur_pos, 1);
-
- move_cursor(cur_col, -1, num_cols, key_seqs);
-
- std::cout.write(&(cur_line.c_str()[cur_pos]), cur_line.length()-cur_pos);
- std::cout.put(' ');
-
- cur_col = (cur_line.length() + 1 + strlen(PROMPT_STRING) + 1) % num_cols;
- if (cur_col == 0)
- cur_col = num_cols + 1;
- else
- cur_col++;
-
- move_cursor(cur_col, -(cur_line.length()-cur_pos+1), num_cols, key_seqs);
- }
-
- eaten++;
- }
- else if (keycodes[eaten] == '\n'){ // return key
- int cur_col = (cur_pos + 1 + strlen(PROMPT_STRING) + 1) % num_cols;
- if (cur_col == 0)
- cur_col = num_cols;
-
- move_cursor(cur_col, cur_line.length()-cur_pos, num_cols, key_seqs);
-
- std::cout.put(keycodes[eaten]);
- cur_line.append(1, '\n');
- cur_pos = 0;
- break;
- }
- else { // all other key
- std::cout.put(keycodes[eaten]);
- std::cout.write(&(cur_line.c_str()[cur_pos]), cur_line.length()-cur_pos);
-
- cur_line.insert(cur_pos, &keycodes[eaten], 1);
- cur_pos++;
-
- int cur_col = (cur_line.length() + strlen(PROMPT_STRING) + 1) % num_cols;
- if (cur_col == 0) {
- // force cursor to move to the next line when the last printed char is at
- // the right boundary of the terminal
- std::cout.put(' ');
- std::cout.put('\b');
-
- cur_col = 1;
- }
- else
- cur_col++;
-
- move_cursor(cur_col, -(cur_line.length()-cur_pos), num_cols, key_seqs);
-
- eaten++;
- }
-
- std::cout.flush();
- }
- }
-#else
- return yyFlexLexer::LexerInput(buf, max_size);
-#endif
-}
diff --git a/omegalib/omegacalc/src/parser.l b/omegalib/omegacalc/src/parser.l
deleted file mode 100644
index 04933f4..0000000
--- a/omegalib/omegacalc/src/parser.l
+++ /dev/null
@@ -1,350 +0,0 @@
-%{
-#include <stdio.h>
-#include <string>
-#include <sstream>
-#include <iostream>
-#include <omega_calc/AST.h>
-#include <basic/DynamicArray.h>
-
-using namespace omega;
-#include "y.tab.h"
-
-#define BUFFER scanBuf += yytext
-std::string scanBuf;
-std::string err_msg;
-
-extern "C" int yywrap() {return 1;};
-
-
-#define MAX_INCLUDE_DEPTH 10
-YY_BUFFER_STATE include_stack[MAX_INCLUDE_DEPTH];
-int include_stack_ptr = 0;
-int comment_caller;
-
-extern bool is_interactive;
-extern const char *PROMPT_STRING;
-extern bool need_coef;
-
-// void yyerror(const char *s);
-void yyerror(const std::string &s);
-void flushScanBuffer();
-
-%}
-
-%s LATEX INCLUDE COMMENT
-%option yylineno
-
-%%
-
-"<<" { BUFFER; BEGIN(INCLUDE); }
-<INCLUDE>[^>\n ]+">>" {
- BUFFER;
- scanBuf += "\n";
- flushScanBuffer();
-
- if (include_stack_ptr >= MAX_INCLUDE_DEPTH) {
- fprintf(stderr, "File including nested too deeply, abort");
- exit(1);
- }
-
- char *s = yytext;
- while (*s != '>') s++;
- *s = '\0';
- FILE *f = fopen(yytext, "r");
- if (!f) {
- fprintf(stderr, "Can't open file %s\n", yytext);
- }
- else {
- include_stack[include_stack_ptr++] = YY_CURRENT_BUFFER;
- yyin = f;
- yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE));
- }
- BEGIN(INITIAL);
-}
-<INCLUDE>[ \n] {
- fprintf(stderr,"Error in include syntax\n");
- fprintf(stderr,"Use <<fname>> to include the file named fname\n");
- BEGIN(INITIAL);
- if(is_interactive && include_stack_ptr == 0)
- printf("%s ", PROMPT_STRING);
-}
-
-<COMMENT>\n {
- BUFFER;
- BEGIN(comment_caller);
- if(is_interactive && include_stack_ptr == 0)
- printf("%s ", PROMPT_STRING);
-}
-
-\n {
- BUFFER;
- if(is_interactive && include_stack_ptr == 0)
- printf("%s ", PROMPT_STRING);
-}
-
-<LATEX>"\\ " { BUFFER; }
-[ \t]+ { BUFFER; }
-# { BUFFER; comment_caller = YY_START; BEGIN(COMMENT); }
-<COMMENT>.* { BUFFER; flushScanBuffer(); }
-<LATEX>"\$\$" { BUFFER; BEGIN(INITIAL); }
-"\$\$" { BUFFER; BEGIN(LATEX); }
-<LATEX>"\\t" { BUFFER; }
-<LATEX>"\\!" { BUFFER; }
-<LATEX>"\\\\" { BUFFER; }
-
-"{" { BUFFER; return OPEN_BRACE; }
-<LATEX>"\\{" { BUFFER; return OPEN_BRACE; }
-"}" { BUFFER; return CLOSE_BRACE; }
-<LATEX>"\\}" { BUFFER; return CLOSE_BRACE; }
-"approximate" { BUFFER; return APPROX; }
-"union" { BUFFER; return UNION; }
-<LATEX>"\\cup" { BUFFER; return UNION; }
-"intersection" { BUFFER; return INTERSECTION; }
-<LATEX>"\\cap" { BUFFER; return INTERSECTION; }
-"symbolic" { BUFFER; return SYMBOLIC; }
-"sym" { BUFFER; return SYMBOLIC; }
-<LATEX>"\\mid" { BUFFER; return VERTICAL_BAR; }
-<LATEX>"|" { BUFFER; return VERTICAL_BAR; }
-<LATEX>"\\st" { BUFFER; return SUCH_THAT; }
-"s.t." { BUFFER; return SUCH_THAT; }
-"inverse" { BUFFER; return INVERSE; }
-"complement" { BUFFER; return COMPLEMENT; }
-<LATEX>"\\circ" { BUFFER; return COMPOSE; }
-"compose" { BUFFER; return COMPOSE; }
-"difference" { BUFFER; return DIFFERENCE; }
-"diffToRel" { BUFFER; return DIFFERENCE_TO_RELATION; }
-"project away symbols" { BUFFER; return PROJECT_AWAY_SYMBOLS; }
-"project_away_symbols" { BUFFER; return PROJECT_AWAY_SYMBOLS; }
-"projectAwaySymbols" { BUFFER; return PROJECT_AWAY_SYMBOLS; }
-"project on symbols" { BUFFER; return PROJECT_ON_SYMBOLS; }
-"project_on_symbols" { BUFFER; return PROJECT_ON_SYMBOLS; }
-"projectOnSymbols" { BUFFER; return PROJECT_ON_SYMBOLS; }
-<LATEX>"\\join" { BUFFER; return JOIN; }
-"\." { BUFFER; return JOIN; }
-"join" { BUFFER; return JOIN; }
-"domain" { BUFFER; return DOMAIN; }
-"time" { BUFFER; return TIME; }
-"timeclosure" { BUFFER; return TIMECLOSURE; }
-"range" { BUFFER; return RANGE; }
-<LATEX>"\\forall" { BUFFER; return FORALL; }
-"forall" { BUFFER; return FORALL; }
-<LATEX>"\\exists" { BUFFER; return EXISTS; }
-"exists" { BUFFER; return EXISTS; }
-
-"Venn" { BUFFER; return VENN; }
-"ConvexRepresentation" { BUFFER; return CONVEX_REPRESENTATION; }
-"ConvexCombination" { BUFFER; return CONVEX_COMBINATION; }
-"PositiveCombination" { BUFFER; return POSITIVE_COMBINATION; }
-"LinearCombination" { BUFFER; return LINEAR_COMBINATION; }
-"AffineCombination" { BUFFER; return AFFINE_COMBINATION; }
-"RectHull" { BUFFER; return RECT_HULL; }
-"ConvexHull" { BUFFER; return CONVEX_HULL; }
-"DecoupledConvexHull" { BUFFER; return DECOUPLED_CONVEX_HULL; }
-"AffineHull" { BUFFER; return AFFINE_HULL; }
-"ConicHull" { BUFFER; return CONIC_HULL; }
-"LinearHull" { BUFFER; return LINEAR_HULL; }
-"PairwiseCheck" { /*deprecated*/ BUFFER; return PAIRWISE_CHECK; }
-"ConvexCheck" { /*deprecated*/ BUFFER; return CONVEX_CHECK; }
-"QuickHull" { /*deprecated*/ BUFFER; return QUICK_HULL; }
-"hull" { BUFFER; return HULL; }
-
-"minimize" { BUFFER; return MINIMIZE; }
-"maximize" { BUFFER; return MAXIMIZE; }
-"minimize-range" { BUFFER; return MINIMIZE_RANGE; }
-"maximize-range" { BUFFER; return MAXIMIZE_RANGE; }
-"minimizerange" { BUFFER; return MINIMIZE_RANGE; }
-"maximizerange" { BUFFER; return MAXIMIZE_RANGE; }
-"minimize-domain" { BUFFER; return MINIMIZE_DOMAIN; }
-"maximize-domain" { BUFFER; return MAXIMIZE_DOMAIN; }
-"minimizedomain" { BUFFER; return MINIMIZE_DOMAIN; }
-"maximizedomain" { BUFFER; return MAXIMIZE_DOMAIN; }
-"gist" { BUFFER; return GIST; }
-"given" { BUFFER; return GIVEN; }
-"within" { BUFFER; return WITHIN; }
-"subset" { BUFFER; return SUBSET; }
-"codegen" { BUFFER; return CODEGEN; }
-"farkas" { BUFFER; return FARKAS; }
-"decoupledfarkas" { BUFFER; return DECOUPLED_FARKAS; }
-"decoupled-farkas" { BUFFER; return DECOUPLED_FARKAS; }
-"decoupled_farkas" { BUFFER; return DECOUPLED_FARKAS; }
-"upper_bound" { BUFFER; return MAKE_UPPER_BOUND; }
-"lower_bound" { BUFFER; return MAKE_LOWER_BOUND; }
-"supersetof" { BUFFER; return SUPERSETOF;}
-"subsetof" { BUFFER; return SUBSETOF;}
-"sym_example" { BUFFER; return SYM_SAMPLE;}
-"example" { BUFFER; return SAMPLE;}
-"carried_by" { BUFFER; return CARRIED_BY;}
-"reachable" { BUFFER; return REACHABLE_FROM; }
-"reachable of" { BUFFER; return REACHABLE_OF; }
-"restrict_domain" { BUFFER; return RESTRICT_DOMAIN; }
-"restrictDomain" { BUFFER; return RESTRICT_DOMAIN; }
-<LATEX>"\\" { yyerror("Can't use \\ for restrict_domain in Tex mode"); }
-"\\" { BUFFER; return RESTRICT_DOMAIN; }
-"restrict_range" { BUFFER; return RESTRICT_RANGE; }
-"restrictRange" { BUFFER; return RESTRICT_RANGE; }
-"assertUnsatisfiable" { BUFFER; return ASSERT_UNSAT; }
-"assert_unsatisfiable" { BUFFER; return ASSERT_UNSAT; }
-
-"/" { BUFFER; return RESTRICT_RANGE; }
-"&" { BUFFER; return AND; }
-"|" { BUFFER; return OR; }
-"&&" { BUFFER; return AND; }
-"||" { BUFFER; return OR; }
-"and" { BUFFER; return AND; }
-"or" { BUFFER; return OR; }
-<LATEX>"\\land" { BUFFER; return AND; }
-<LATEX>"\\lor" { BUFFER; return OR; }
-"!" { BUFFER; return NOT; }
-"not" { BUFFER; return NOT; }
-<LATEX>"\\neg" { BUFFER; return NOT; }
-":=" { BUFFER; return IS_ASSIGNED; }
-"->" { BUFFER; return GOES_TO; }
-"in" { BUFFER; return IN; }
-<LATEX>"\\rightarrow" { BUFFER; return GOES_TO; }
-"<=" { BUFFER; yylval.REL_OPERATOR = leq; return REL_OP; }
-<LATEX>"\\leq" { BUFFER; yylval.REL_OPERATOR = leq; return REL_OP; }
-<LATEX>"\\le" { BUFFER; yylval.REL_OPERATOR = leq; return REL_OP; }
-">=" { BUFFER; yylval.REL_OPERATOR = geq; return REL_OP; }
-<LATEX>"\\geq" { BUFFER; yylval.REL_OPERATOR = geq; return REL_OP; }
-<LATEX>"\\ge" { BUFFER; yylval.REL_OPERATOR = geq; return REL_OP; }
-"!=" { BUFFER; yylval.REL_OPERATOR = neq; return REL_OP; }
-<LATEX>"\\neq" { BUFFER; yylval.REL_OPERATOR = neq; return REL_OP; }
-"<" { BUFFER; yylval.REL_OPERATOR = lt; return REL_OP; }
-">" { BUFFER; yylval.REL_OPERATOR = gt; return REL_OP; }
-"=" { BUFFER; yylval.REL_OPERATOR = eq; return REL_OP; }
-"==" { BUFFER; yylval.REL_OPERATOR = eq; return REL_OP; }
-
-[A-Za-z][A-Za-z0-9_]*[\']* {
- BUFFER;
- if (yyleng > 19) yyerror("Identifier too long");
- yylval.VAR_NAME = new char[yyleng+1];
- strcpy(yylval.VAR_NAME,yytext);
- return VAR;
-}
-[A-Za-z][A-Za-z0-9_]*"(in)" {
- BUFFER;
- if (yyleng > 19) yyerror("Identifier too long");
- yylval.VAR_NAME = new char[yyleng+1];
- strcpy(yylval.VAR_NAME,yytext);
- yylval.VAR_NAME[yyleng-3] = 'i'; // lowercase
- yylval.VAR_NAME[yyleng-2] = 'n';
- return VAR;
-}
-[A-Za-z][A-Za-z0-9_]*"(set)" {
- BUFFER;
- if (yyleng > 19) yyerror("Identifier too long");
- yylval.VAR_NAME = new char[yyleng+1];
- strcpy(yylval.VAR_NAME,yytext);
- yylval.VAR_NAME[yyleng-4] = 'i'; // Change to "in"
- yylval.VAR_NAME[yyleng-3] = 'n'; // Be afraid
- yylval.VAR_NAME[yyleng-2] = ')';
- yylval.VAR_NAME[yyleng-1] = '\0';
- return VAR;
-}
-[A-Za-z][A-Za-z0-9_]*"(out)" {
- BUFFER;
- if (yyleng > 19) yyerror("Identifier too long");
- yylval.VAR_NAME = new char[yyleng+1];
- strcpy(yylval.VAR_NAME,yytext);
- yylval.VAR_NAME[yyleng-4] = 'o'; // lowercase
- yylval.VAR_NAME[yyleng-3] = 'u';
- yylval.VAR_NAME[yyleng-2] = 't';
- return VAR;
-}
-<LATEX>"\\"[A-Za-z][A-Za-z0-9_]* {
- BUFFER;
- if (yyleng > 19) yyerror("Identifier too long");
- yylval.VAR_NAME = new char[yyleng+1];
- strcpy(yylval.VAR_NAME,yytext);
- return VAR;
- }
-<LATEX>"\\"[A-Za-z][A-Za-z0-9_]*"(in)" {
- BUFFER;
- if (yyleng > 19) yyerror("Identifier too long");
- yylval.VAR_NAME = new char[yyleng+1];
- strcpy(yylval.VAR_NAME,yytext);
- yylval.VAR_NAME[yyleng-3] = 'i'; // lowercase
- yylval.VAR_NAME[yyleng-2] = 'n';
- return VAR;
- }
-<LATEX>"\\"[A-Za-z][A-Za-z0-9_]*"(set)" {
- BUFFER;
- if (yyleng > 19) yyerror("Identifier too long");
- yylval.VAR_NAME = new char[yyleng+1];
- strcpy(yylval.VAR_NAME,yytext);
- yylval.VAR_NAME[yyleng-4] = 'i'; // Change to "in"
- yylval.VAR_NAME[yyleng-3] = 'n'; // Be afraid
- yylval.VAR_NAME[yyleng-2] = ')';
- yylval.VAR_NAME[yyleng-1] = '\0';
- return VAR;
- }
-<LATEX>"\\"[A-Za-z][A-Za-z0-9_]*"(out)" {
- BUFFER;
- if (yyleng > 19) yyerror("Identifier too long");
- yylval.VAR_NAME = new char[yyleng+1];
- strcpy(yylval.VAR_NAME,yytext);
- yylval.VAR_NAME[yyleng-4] = 'o'; // lowercase
- yylval.VAR_NAME[yyleng-3] = 'u';
- yylval.VAR_NAME[yyleng-2] = 't';
- return VAR;
- }
-
-[0-9]+ { BUFFER;
- if (need_coef) {
- sscanf(yytext, coef_fmt, &yylval.COEF_VALUE);
- return COEF;
- }
- else {
- yylval.INT_VALUE = atoi(yytext);
- return INT;
- }
-}
-
-\"[^\"]*\" { BUFFER;
- yytext[strlen(yytext)-1]='\0';
- yylval.STRING_VALUE = new std::string(yytext+1);
- return STRING;
-}
-
-
-<<EOF>> {
- if (--include_stack_ptr < 0) {
- flushScanBuffer();
- return yytext[0];
- }
- yy_delete_buffer(YY_CURRENT_BUFFER);
- yy_switch_to_buffer(include_stack[include_stack_ptr]);
-}
-
-. { BUFFER; return yytext[0]; }
-
-
-%%
-
-void yyerror(const std::string &s) {
- std::stringstream ss;
- if (is_interactive && include_stack_ptr == 0)
- ss << s << "\n";
- else
- ss << s << " at line " << yylineno << "\n";
- err_msg = ss.str();
-}
-
-
-void flushScanBuffer() {
- if (scanBuf.size() == 0)
- return;
- if (!is_interactive || include_stack_ptr > 0) {
- size_t prev_pos = 0;
- if (scanBuf[0] == '\n')
- prev_pos = 1;
- for (size_t pos = prev_pos; pos <= scanBuf.size(); pos++) {
- if (pos == scanBuf.size() || scanBuf[pos] == '\n') {
- std::cout << PROMPT_STRING << " " << scanBuf.substr(prev_pos, pos-prev_pos) << std::endl;
- prev_pos = pos+1;
- }
- }
- }
-
- scanBuf.clear();
-}
diff --git a/omegalib/omegacalc/src/parser.ll b/omegalib/omegacalc/src/parser.ll
deleted file mode 100755
index e095f24..0000000
--- a/omegalib/omegacalc/src/parser.ll
+++ /dev/null
@@ -1,350 +0,0 @@
-/*****************************************************************************
- Copyright (C) 1994-2000 the Omega Project Team
- Copyright (C) 2005-2011 Chun Chen
- All Rights Reserved.
-
- Purpose:
- lex parser for calculator.
-
- Notes:
-
- History:
- 02/04/11 migrate to flex c++ mode, Chun Chen
-*****************************************************************************/
-
-%{
-#include <stdio.h>
-#include <string.h>
-#include <string>
-#include <sstream>
-#include <iostream>
-#include <fstream>
-#include <omega_calc/AST.h>
-#include <basic/DynamicArray.h>
-#include "parser.tab.hh"
-#include <omega_calc/myflex.h>
-
-myFlexLexer mylexer;
-bool is_interactive;
-const char *PROMPT_STRING = ">>>";
-
-#define BUFFER scanBuf += yytext
-std::string scanBuf;
-std::string err_msg;
-
-extern bool need_coef;
-
-void yyerror(const std::string &s);
-void flushScanBuffer();
-
-%}
-
-%s LATEX INCLUDE COMMENT
-%option yylineno
-%option noyywrap
-
-%%
-
-"<<" { BUFFER; BEGIN(INCLUDE); }
-<INCLUDE>[^>\n ]+">>" {
- BUFFER;
- scanBuf += "\n";
- flushScanBuffer();
-
- if (is_interactive) {
- std::cout << "file include disabled in interactive mode\n";
- }
- else {
- char *s = yytext;
- while (*s != '>') s++;
- *s = '\0';
- std::ifstream *ifs = new std::ifstream(yytext, std::ifstream::in);
- if (!ifs->is_open()) {
- fprintf(stderr, "Can't open file %s\n", yytext);
- }
- else {
- yy_buffer_state *bs = mylexer.yy_create_buffer(ifs, 8092);
- mylexer.yypush_buffer_state(bs);
- }
- }
- BEGIN(INITIAL);
-}
-<INCLUDE>[ \n] {
- std::cout << "Error in include syntax\n";
- std::cout << "Use <<fname>> to include the file named fname\n";
- BEGIN(INITIAL);
- if(is_interactive) {
- std::cout << PROMPT_STRING << ' ';
- std::cout.flush();
- }
-}
-
-
-
-
-
-<LATEX>"\\ " { BUFFER; }
-[ \t]+ { BUFFER; }
-# { BUFFER; BEGIN(COMMENT); }
-<COMMENT>.* { BUFFER; }
-<LATEX>"\$\$\n" { BUFFER; BEGIN(INITIAL); }
-<LATEX>"\$\$" { BUFFER; BEGIN(INITIAL); }
-"\$\$" { BUFFER; BEGIN(LATEX); }
-<LATEX>"\\n" { BUFFER; }
-<LATEX>"\\t" { BUFFER; }
-<LATEX>"\\!" { BUFFER; }
-<LATEX>"\\\\" { BUFFER; }
-<LATEX>"\n" { BUFFER; }
-
-
-\n {
- BUFFER;
- BEGIN(INITIAL);
- if(is_interactive) {
- std::cout << PROMPT_STRING << ' ';
- std::cout.flush();
- }
-}
-
-
-
-
-
-"{" { BUFFER; return OPEN_BRACE; }
-<LATEX>"\\{" { BUFFER; return OPEN_BRACE; }
-"}" { BUFFER; return CLOSE_BRACE; }
-<LATEX>"\\}" { BUFFER; return CLOSE_BRACE; }
-"approximate" { BUFFER; return APPROX; }
-"union" { BUFFER; return UNION; }
-<LATEX>"\\cup" { BUFFER; return UNION; }
-"intersection" { BUFFER; return INTERSECTION; }
-<LATEX>"\\cap" { BUFFER; return INTERSECTION; }
-"without_simplify" { BUFFER; return NO_SIMPLIFY; }
-"symbolic" { BUFFER; return SYMBOLIC; }
-"sym" { BUFFER; return SYMBOLIC; }
-<LATEX>"\\mid" { BUFFER; return VERTICAL_BAR; }
-<LATEX>"|" { BUFFER; return VERTICAL_BAR; }
-<LATEX>"\\st" { BUFFER; return SUCH_THAT; }
-"s.t." { BUFFER; return SUCH_THAT; }
-"inverse" { BUFFER; return INVERSE; }
-"complement" { BUFFER; return COMPLEMENT; }
-<LATEX>"\\circ" { BUFFER; return COMPOSE; }
-"compose" { BUFFER; return COMPOSE; }
-"difference" { BUFFER; return DIFFERENCE; }
-"diffToRel" { BUFFER; return DIFFERENCE_TO_RELATION; }
-"project away symbols" { BUFFER; return PROJECT_AWAY_SYMBOLS; }
-"project_away_symbols" { BUFFER; return PROJECT_AWAY_SYMBOLS; }
-"projectAwaySymbols" { BUFFER; return PROJECT_AWAY_SYMBOLS; }
-"project on symbols" { BUFFER; return PROJECT_ON_SYMBOLS; }
-"project_on_symbols" { BUFFER; return PROJECT_ON_SYMBOLS; }
-"projectOnSymbols" { BUFFER; return PROJECT_ON_SYMBOLS; }
-<LATEX>"\\join" { BUFFER; return JOIN; }
-"\." { BUFFER; return JOIN; }
-"join" { BUFFER; return JOIN; }
-"domain" { BUFFER; return DOMAIN; }
-"time" { BUFFER; return TIME; }
-"timeclosure" { BUFFER; return TIMECLOSURE; }
-"range" { BUFFER; return RANGE; }
-<LATEX>"\\forall" { BUFFER; return FORALL; }
-"forall" { BUFFER; return FORALL; }
-<LATEX>"\\exists" { BUFFER; return EXISTS; }
-"exists" { BUFFER; return EXISTS; }
-
-"Venn" { BUFFER; return VENN; }
-"ConvexRepresentation" { BUFFER; return CONVEX_REPRESENTATION; }
-"ConvexCombination" { BUFFER; return CONVEX_COMBINATION; }
-"PositiveCombination" { BUFFER; return POSITIVE_COMBINATION; }
-"LinearCombination" { BUFFER; return LINEAR_COMBINATION; }
-"AffineCombination" { BUFFER; return AFFINE_COMBINATION; }
-"RectHull" { /*deprecated*/ BUFFER; return RECT_HULL; }
-"SimpleHull" { BUFFER; return SIMPLE_HULL; }
-"ConvexHull" { BUFFER; return CONVEX_HULL; }
-"DecoupledConvexHull" { BUFFER; return DECOUPLED_CONVEX_HULL; }
-"AffineHull" { BUFFER; return AFFINE_HULL; }
-"ConicHull" { BUFFER; return CONIC_HULL; }
-"LinearHull" { BUFFER; return LINEAR_HULL; }
-"PairwiseCheck" { /*deprecated*/ BUFFER; return PAIRWISE_CHECK; }
-"ConvexCheck" { /*deprecated*/ BUFFER; return CONVEX_CHECK; }
-"QuickHull" { /*deprecated*/ BUFFER; return QUICK_HULL; }
-"Hull" { BUFFER; return HULL; }
-"farkas" { BUFFER; return FARKAS; }
-"decoupledfarkas" { BUFFER; return DECOUPLED_FARKAS; }
-"decoupled-farkas" { BUFFER; return DECOUPLED_FARKAS; }
-"decoupled_farkas" { BUFFER; return DECOUPLED_FARKAS; }
-
-"minimize" { BUFFER; return MINIMIZE; }
-"maximize" { BUFFER; return MAXIMIZE; }
-"minimize-range" { BUFFER; return MINIMIZE_RANGE; }
-"maximize-range" { BUFFER; return MAXIMIZE_RANGE; }
-"minimizerange" { BUFFER; return MINIMIZE_RANGE; }
-"maximizerange" { BUFFER; return MAXIMIZE_RANGE; }
-"minimize-domain" { BUFFER; return MINIMIZE_DOMAIN; }
-"maximize-domain" { BUFFER; return MAXIMIZE_DOMAIN; }
-"minimizedomain" { BUFFER; return MINIMIZE_DOMAIN; }
-"maximizedomain" { BUFFER; return MAXIMIZE_DOMAIN; }
-"gist" { BUFFER; return GIST; }
-"given" { BUFFER; return GIVEN; }
-"within" { BUFFER; return WITHIN; }
-"subset" { BUFFER; return SUBSET; }
-"codegen" { BUFFER; return CODEGEN; }
-"upper_bound" { BUFFER; return MAKE_UPPER_BOUND; }
-"lower_bound" { BUFFER; return MAKE_LOWER_BOUND; }
-"supersetof" { BUFFER; return SUPERSETOF;}
-"subsetof" { BUFFER; return SUBSETOF;}
-"sym_example" { BUFFER; return SYM_SAMPLE;}
-"example" { BUFFER; return SAMPLE;}
-"carried_by" { BUFFER; return CARRIED_BY;}
-"reachable" { BUFFER; return REACHABLE_FROM; }
-"reachable of" { BUFFER; return REACHABLE_OF; }
-"restrict_domain" { BUFFER; return RESTRICT_DOMAIN; }
-"restrictDomain" { BUFFER; return RESTRICT_DOMAIN; }
-"\\" { BUFFER; return RESTRICT_DOMAIN; }
-"restrict_range" { BUFFER; return RESTRICT_RANGE; }
-"restrictRange" { BUFFER; return RESTRICT_RANGE; }
-"assertUnsatisfiable" { BUFFER; return ASSERT_UNSAT; }
-"assert_unsatisfiable" { BUFFER; return ASSERT_UNSAT; }
-
-"/" { BUFFER; return RESTRICT_RANGE; }
-"&" { BUFFER; return AND; }
-"|" { BUFFER; return OR; }
-"&&" { BUFFER; return AND; }
-"||" { BUFFER; return OR; }
-"and" { BUFFER; return AND; }
-"or" { BUFFER; return OR; }
-<LATEX>"\\land" { BUFFER; return AND; }
-<LATEX>"\\lor" { BUFFER; return OR; }
-"!" { BUFFER; return NOT; }
-"not" { BUFFER; return NOT; }
-<LATEX>"\\neg" { BUFFER; return NOT; }
-":=" { BUFFER; return IS_ASSIGNED; }
-"->" { BUFFER; return GOES_TO; }
-"in" { BUFFER; return IN; }
-<LATEX>"\\rightarrow" { BUFFER; return GOES_TO; }
-"<=" { BUFFER; yylval.REL_OPERATOR = leq; return REL_OP; }
-<LATEX>"\\leq" { BUFFER; yylval.REL_OPERATOR = leq; return REL_OP; }
-<LATEX>"\\le" { BUFFER; yylval.REL_OPERATOR = leq; return REL_OP; }
-">=" { BUFFER; yylval.REL_OPERATOR = geq; return REL_OP; }
-<LATEX>"\\geq" { BUFFER; yylval.REL_OPERATOR = geq; return REL_OP; }
-<LATEX>"\\ge" { BUFFER; yylval.REL_OPERATOR = geq; return REL_OP; }
-"!=" { BUFFER; yylval.REL_OPERATOR = neq; return REL_OP; }
-<LATEX>"\\neq" { BUFFER; yylval.REL_OPERATOR = neq; return REL_OP; }
-"<" { BUFFER; yylval.REL_OPERATOR = lt; return REL_OP; }
-">" { BUFFER; yylval.REL_OPERATOR = gt; return REL_OP; }
-"=" { BUFFER; yylval.REL_OPERATOR = eq; return REL_OP; }
-"==" { BUFFER; yylval.REL_OPERATOR = eq; return REL_OP; }
-
-[A-Za-z_][A-Za-z0-9_]*[\']* {
- BUFFER;
- yylval.VAR_NAME = new char[yyleng+1];
- strcpy(yylval.VAR_NAME,yytext);
- return VAR;
-}
-[A-Za-z][A-Za-z0-9_]*"(In)" {
- BUFFER;
- yylval.VAR_NAME = new char[yyleng+1];
- strcpy(yylval.VAR_NAME,yytext);
- yylval.VAR_NAME[yyleng-3] = 'i'; // lowercase
- yylval.VAR_NAME[yyleng-2] = 'n';
- return VAR;
-}
-[A-Za-z][A-Za-z0-9_]*"(Set)" {
- BUFFER;
- yylval.VAR_NAME = new char[yyleng+1];
- strcpy(yylval.VAR_NAME,yytext);
- yylval.VAR_NAME[yyleng-4] = 'i'; // Change to "in"
- yylval.VAR_NAME[yyleng-3] = 'n'; // Be afraid
- yylval.VAR_NAME[yyleng-2] = ')';
- yylval.VAR_NAME[yyleng-1] = '\0';
- return VAR;
-}
-[A-Za-z][A-Za-z0-9_]*"(Out)" {
- BUFFER;
- yylval.VAR_NAME = new char[yyleng+1];
- strcpy(yylval.VAR_NAME,yytext);
- yylval.VAR_NAME[yyleng-4] = 'o'; // lowercase
- yylval.VAR_NAME[yyleng-3] = 'u';
- yylval.VAR_NAME[yyleng-2] = 't';
- return VAR;
-}
-<LATEX>"\\"[A-Za-z][A-Za-z0-9_]* {
- BUFFER;
- yylval.VAR_NAME = new char[yyleng+1];
- strcpy(yylval.VAR_NAME,yytext);
- return VAR;
- }
-<LATEX>"\\"[A-Za-z][A-Za-z0-9_]*"(In)" {
- BUFFER;
- yylval.VAR_NAME = new char[yyleng+1];
- strcpy(yylval.VAR_NAME,yytext);
- yylval.VAR_NAME[yyleng-3] = 'i'; // lowercase
- yylval.VAR_NAME[yyleng-2] = 'n';
- return VAR;
- }
-<LATEX>"\\"[A-Za-z][A-Za-z0-9_]*"(Set)" {
- BUFFER;
- yylval.VAR_NAME = new char[yyleng+1];
- strcpy(yylval.VAR_NAME,yytext);
- yylval.VAR_NAME[yyleng-4] = 'i'; // Change to "in"
- yylval.VAR_NAME[yyleng-3] = 'n'; // Be afraid
- yylval.VAR_NAME[yyleng-2] = ')';
- yylval.VAR_NAME[yyleng-1] = '\0';
- return VAR;
- }
-<LATEX>"\\"[A-Za-z][A-Za-z0-9_]*"(Out)" {
- BUFFER;
- yylval.VAR_NAME = new char[yyleng+1];
- strcpy(yylval.VAR_NAME,yytext);
- yylval.VAR_NAME[yyleng-4] = 'o'; // lowercase
- yylval.VAR_NAME[yyleng-3] = 'u';
- yylval.VAR_NAME[yyleng-2] = 't';
- return VAR;
- }
-
-[0-9]+ { BUFFER;
- if (need_coef) {
- sscanf(yytext, coef_fmt, &yylval.COEF_VALUE);
- return COEF;
- }
- else {
- yylval.INT_VALUE = atoi(yytext);
- return INT;
- }
-}
-
-\"[^\"]*\" { BUFFER;
- yytext[yyleng-1]='\0';
- yylval.STRING_VALUE = new std::string(yytext+1);
- return STRING;
-}
-
-
-<<EOF>> {
- mylexer.yypop_buffer_state();
- if (!YY_CURRENT_BUFFER) {
- flushScanBuffer();
- return YY_NULL;
- }
-}
-
-. { BUFFER; return yytext[0]; }
-
-
-%%
-
-void flushScanBuffer() {
- if (scanBuf.size() == 0)
- return;
- if (!is_interactive) {
- size_t prev_pos = 0;
- if (scanBuf[0] == '\n')
- prev_pos = 1;
- for (size_t pos = prev_pos; pos <= scanBuf.size(); pos++) {
- if (pos == scanBuf.size() || scanBuf[pos] == '\n') {
- std::cout << PROMPT_STRING << " " << scanBuf.substr(prev_pos, pos-prev_pos) << std::endl;
- prev_pos = pos+1;
- }
- }
- }
-
- scanBuf.clear();
-}
diff --git a/omegalib/omegacalc/src/parser.y b/omegalib/omegacalc/src/parser.y
deleted file mode 100644
index d365797..0000000
--- a/omegalib/omegacalc/src/parser.y
+++ /dev/null
@@ -1,1925 +0,0 @@
-/*****************************************************************************
- Copyright (C) 1994-2000 University of Maryland.
- Copyright (C) 2008 University of Southern California.
- Copyright (C) 2009-2010 University of Utah.
- All Rights Reserved.
-
- Purpose:
- omega calculator yacc parser.
-
- Notes:
-
- History:
-*****************************************************************************/
-
-%{
-
-#include <basic/DynamicArray.h>
-#include <basic/Iterator.h>
-#include <code_gen/code_gen.h>
-#include <omega_calc/AST.h>
-#include <omega/hull.h>
-#include <omega/closure.h>
-#include <omega/reach.h>
-#include <string>
-#include <iostream>
-
-#ifdef WIN32
-#include <io.h>
-#define isatty _isatty
-#define alloca _alloca
-#endif
-#ifndef WIN32
-#include <sys/time.h>
-#include <sys/resource.h>
-#endif
-#if !defined(OMIT_GETRUSAGE)
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-#endif
-
-#if !defined(OMIT_GETRUSAGE)
-#ifdef __sparc__
-extern "C" int getrusage (int, struct rusage*);
-#endif
-
-using namespace omega;
-
-struct rusage start_time;
-bool anyTimingDone = false;
-
-void start_clock( void ) {
- getrusage(RUSAGE_SELF, &start_time);
-}
-
-int clock_diff( void ) {
- struct rusage current_time;
- getrusage(RUSAGE_SELF, &current_time);
- return (current_time.ru_utime.tv_sec -start_time.ru_utime.tv_sec)*1000000 + (current_time.ru_utime.tv_usec-start_time.ru_utime.tv_usec);
-}
-#endif
-
-int omega_calc_debug = 0;
-
-bool is_interactive;
-const char *PROMPT_STRING = ">>>";
-extern std::string err_msg;
-extern FILE *yyin;
-bool need_coef;
-
-Map<Const_String,Relation*> relationMap ((Relation *)0);
-namespace {
- int redundant_conj_level = 2; // default maximum 2
- int redundant_constr_level = 4; // default maximum 4
-}
-
-int argCount = 0;
-int tuplePos = 0;
-Argument_Tuple currentTuple = Input_Tuple;
-
-Relation LexForward(int n);
-reachable_information *reachable_info;
-
-int yylex();
-void yyerror(const std::string &s);
-void flushScanBuffer();
-
-%}
-
-%union {
- int INT_VALUE;
- coef_t COEF_VALUE;
- Rel_Op REL_OPERATOR;
- char *VAR_NAME;
- VarList *VAR_LIST;
- Exp *EXP;
- ExpList *EXP_LIST;
- AST *ASTP;
- Argument_Tuple ARGUMENT_TUPLE;
- AST_constraints *ASTCP;
- Declaration_Site * DECLARATION_SITE;
- Relation * RELATION;
- tupleDescriptor * TUPLE_DESCRIPTOR;
- RelTuplePair * REL_TUPLE_PAIR;
- DynamicArray2<Relation> * RELATION_ARRAY_2D;
- DynamicArray1<Relation> * RELATION_ARRAY_1D;
- Tuple<std::string> *STRING_TUPLE;
- std::string *STRING_VALUE;
-}
-
-%token <VAR_NAME> VAR
-%token <INT_VALUE> INT
-%token <COEF_VALUE> COEF
-%token <STRING_VALUE> STRING
-%token OPEN_BRACE CLOSE_BRACE
-%token SYMBOLIC
-%token OR AND NOT
-%token ST APPROX
-%token IS_ASSIGNED
-%token FORALL EXISTS
-%token DOMAIN RANGE
-%token DIFFERENCE DIFFERENCE_TO_RELATION
-%token GIST GIVEN HULL WITHIN MAXIMIZE MINIMIZE
-%token AFFINE_HULL VENN CONVEX_COMBINATION POSITIVE_COMBINATION LINEAR_COMBINATION AFFINE_COMBINATION CONVEX_HULL CONIC_HULL LINEAR_HULL QUICK_HULL PAIRWISE_CHECK CONVEX_CHECK CONVEX_REPRESENTATION RECT_HULL DECOUPLED_CONVEX_HULL
-%token MAXIMIZE_RANGE MINIMIZE_RANGE
-%token MAXIMIZE_DOMAIN MINIMIZE_DOMAIN
-%token LEQ GEQ NEQ
-%token GOES_TO
-%token COMPOSE JOIN INVERSE COMPLEMENT IN CARRIED_BY TIME TIMECLOSURE
-%token UNION INTERSECTION
-%token VERTICAL_BAR SUCH_THAT
-%token SUBSET CODEGEN DECOUPLED_FARKAS FARKAS
-%token MAKE_UPPER_BOUND MAKE_LOWER_BOUND
-%token <REL_OPERATOR> REL_OP
-%token RESTRICT_DOMAIN RESTRICT_RANGE
-%token SUPERSETOF SUBSETOF SAMPLE SYM_SAMPLE
-%token PROJECT_AWAY_SYMBOLS PROJECT_ON_SYMBOLS REACHABLE_FROM REACHABLE_OF
-%token ASSERT_UNSAT
-%token PARSE_EXPRESSION PARSE_FORMULA PARSE_RELATION
-
-%type <INT_VALUE> effort
-%type <EXP> exp simpleExp
-%type <EXP_LIST> expList
-%type <VAR_LIST> varList
-%type <ARGUMENT_TUPLE> argumentList
-%type <ASTP> formula optionalFormula
-%type <ASTCP> constraintChain
-%type <TUPLE_DESCRIPTOR> tupleDeclaration
-%type <DECLARATION_SITE> varDecl varDeclOptBrackets
-%type <RELATION> relation builtRelation context
-%type <RELATION> reachable_of
-%type <REL_TUPLE_PAIR> relPairList
-%type <RELATION_ARRAY_1D> reachable
-
-%destructor {delete []$$;} VAR
-%destructor {delete $$;} STRING
-%destructor {delete $$;} relation builtRelation tupleDeclaration formula optionalFormula context reachable_of constraintChain varDecl varDeclOptBrackets relPairList reachable
-%destructor {delete $$;} varList exp simpleExp
-%destructor {
- foreach(e, Exp *, *$$, delete e);
- delete $$;
- } expList;
-
-%nonassoc ASSERT_UNSAT
-%left UNION p1 '+' '-'
-%nonassoc SUPERSETOF SUBSETOF
-%left p2 RESTRICT_DOMAIN RESTRICT_RANGE
-%left INTERSECTION p3 '*' '@'
-%left p4
-%left OR p5
-%left AND p6
-%left COMPOSE JOIN CARRIED_BY
-%right NOT APPROX DOMAIN RANGE HULL PROJECT_AWAY_SYMBOLS PROJECT_ON_SYMBOLS DIFFERENCE DIFFERENCE_TO_RELATION INVERSE COMPLEMENT FARKAS SAMPLE SYM_SAMPLE MAKE_UPPER_BOUND MAKE_LOWER_BOUND p7
-%left p8
-%nonassoc GIVEN
-%left p9
-%left '(' p10
-
-%%
-
-inputSequence : /*empty*/
- | inputSequence { assert( current_Declaration_Site == globalDecls);}
- inputItem
-;
-
-inputItem : ';' /*empty*/
- | error ';' {
- flushScanBuffer();
- std::cout << err_msg;
- err_msg.clear();
- current_Declaration_Site = globalDecls;
- need_coef = false;
- std::cout << "...skipping to statement end..." << std::endl;
- delete relationDecl;
- relationDecl = NULL;
- }
- | SYMBOLIC globVarList ';' {flushScanBuffer();}
- | VAR IS_ASSIGNED relation ';' {
- flushScanBuffer();
- try {
- $3->simplify(redundant_conj_level, redundant_constr_level);
- Relation *r = relationMap((Const_String)$1);
- if (r) delete r;
- relationMap[(Const_String)$1] = $3;
- }
- catch (const std::exception &e) {
- std::cout << e.what() << std::endl;
- }
- delete []$1;
- }
- | relation ';' {
- flushScanBuffer();
- $1->simplify(redundant_conj_level, redundant_constr_level);
- $1->print_with_subs(stdout);
- delete $1;
- }
- | TIME relation ';' {
-#if defined(OMIT_GETRUSAGE)
- printf("'time' requires getrusage, but the omega calclator was compiled with OMIT_GETRUSAGE set!\n");
-#else
- flushScanBuffer();
- printf("\n");
- int t;
- Relation R;
- bool SKIP_FULL_CHECK = getenv("OC_TIMING_SKIP_FULL_CHECK");
- ($2)->and_with_GEQ();
- start_clock();
- for (t=1;t<=100;t++) {
- R = *$2;
- R.finalize();
- }
- int copyTime = clock_diff();
- start_clock();
- for (t=1;t<=100;t++) {
- R = *$2;
- R.finalize();
- R.simplify(); /* default simplification effort */
- }
- int simplifyTime = clock_diff() -copyTime;
- Relation R2;
- if (!SKIP_FULL_CHECK) {
- start_clock();
- for (t=1;t<=100;t++) {
- R2 = *$2;
- R2.finalize();
- R2.simplify(2,4); /* maximal simplification effort */
- }
- }
- int excessiveTime = clock_diff() - copyTime;
- printf("Times (in microseconds): \n");
- printf("%5d us to copy original set of constraints\n",copyTime/100);
- printf("%5d us to do the default amount of simplification, obtaining: \n\t", simplifyTime/100);
- R.print_with_subs(stdout);
- printf("\n");
- if (!SKIP_FULL_CHECK) {
- printf("%5d us to do the maximum (i.e., excessive) amount of simplification, obtaining: \n\t", excessiveTime/100);
- R2.print_with_subs(stdout);
- printf("\n");
- }
- if (!anyTimingDone) {
- bool warn = false;
-#ifndef SPEED
- warn =true;
-#endif
-#ifndef NDEBUG
- warn = true;
-#endif
- if (warn) {
- printf("WARNING: The Omega calculator was compiled with options that force\n");
- printf("it to perform additional consistency and error checks\n");
- printf("that may slow it down substantially\n");
- printf("\n");
- }
- printf("NOTE: These times relect the time of the current _implementation_\n");
- printf("of our algorithms. Performance bugs do exist. If you intend to publish or \n");
- printf("report on the performance on the Omega test, we respectfully but strongly \n");
- printf("request that send your test cases to us to allow us to determine if the \n");
- printf("times are appropriate, and if the way you are using the Omega library to \n");
- printf("solve your problem is the most effective way.\n");
- printf("\n");
-
- printf("Also, please be aware that over the past two years, we have focused our \n");
- printf("efforts on the expressive power of the Omega library, sometimes at the\n");
- printf("expensive of raw speed. Our original implementation of the Omega test\n");
- printf("was substantially faster on the limited domain it handled.\n");
- printf("\n");
- printf(" Thanks, \n");
- printf(" the Omega Team \n");
- }
- anyTimingDone = true;
- delete $2;
-#endif
- }
- | TIMECLOSURE relation ';' {
-#if defined(OMIT_GETRUSAGE)
- printf("'timeclosure' requires getrusage, but the omega calclator was compiled with OMIT_GETRUSAGE set!\n");
-#else
- flushScanBuffer();
- try {
- int t;
- Relation R;
- ($2)->and_with_GEQ();
- start_clock();
- for (t=1;t<=100;t++) {
- R = *$2;
- R.finalize();
- }
- int copyTime = clock_diff();
- start_clock();
- for (t=1;t<=100;t++) {
- R = *$2;
- R.finalize();
- R.simplify();
- }
- int simplifyTime = clock_diff() -copyTime;
- Relation Rclosed;
- start_clock();
- for (t=1;t<=100;t++) {
- Rclosed = *$2;
- Rclosed.finalize();
- Rclosed = TransitiveClosure(Rclosed, 1,Relation::Null());
- }
- int closureTime = clock_diff() - copyTime;
- Relation R2;
- start_clock();
- for (t=1;t<=100;t++) {
- R2 = *$2;
- R2.finalize();
- R2.simplify(2,4);
- }
- int excessiveTime = clock_diff() - copyTime;
- printf("Times (in microseconds): \n");
- printf("%5d us to copy original set of constraints\n",copyTime/100);
- printf("%5d us to do the default amount of simplification, obtaining: \n\t", simplifyTime/100);
- R.print_with_subs(stdout);
- printf("\n");
- printf("%5d us to do the maximum (i.e., excessive) amount of simplification, obtaining: \n\t", excessiveTime/100);
- R2.print_with_subs(stdout);
- printf("%5d us to do the transitive closure, obtaining: \n\t", closureTime/100);
- Rclosed.print_with_subs(stdout);
- printf("\n");
- if (!anyTimingDone) {
- bool warn = false;
-#ifndef SPEED
- warn =true;
-#endif
-#ifndef NDEBUG
- warn = true;
-#endif
- if (warn) {
- printf("WARNING: The Omega calculator was compiled with options that force\n");
- printf("it to perform additional consistency and error checks\n");
- printf("that may slow it down substantially\n");
- printf("\n");
- }
- printf("NOTE: These times relect the time of the current _implementation_\n");
- printf("of our algorithms. Performance bugs do exist. If you intend to publish or \n");
- printf("report on the performance on the Omega test, we respectfully but strongly \n");
- printf("request that send your test cases to us to allow us to determine if the \n");
- printf("times are appropriate, and if the way you are using the Omega library to \n");
- printf("solve your problem is the most effective way.\n");
- printf("\n");
-
- printf("Also, please be aware that over the past two years, we have focused our \n");
- printf("efforts on the expressive power of the Omega library, sometimes at the\n");
- printf("expensive of raw speed. Our original implementation of the Omega test\n");
- printf("was substantially faster on the limited domain it handled.\n");
- printf("\n");
- printf(" Thanks, \n");
- printf(" the Omega Team \n");
- }
- anyTimingDone = true;
- }
- catch (const std::exception &e) {
- std::cout << e.what() << std::endl;
- }
- delete $2;
-#endif
- }
- | relation SUBSET relation ';' {
- flushScanBuffer();
- try {
- if (Must_Be_Subset(copy(*$1), copy(*$3)))
- std::cout << "True" << std::endl;
- else if (Might_Be_Subset(copy(*$1), copy(*$3)))
- std::cout << "Possible" << std::endl;
- else
- std::cout << "False" << std::endl;
- }
- catch (const std::exception &e) {
- std::cout << e.what() << std::endl;
- }
- delete $1;
- delete $3;
- }
- | CODEGEN effort relPairList context';' {
- flushScanBuffer();
- try {
- std::string s = MMGenerateCode($3->mappings, $3->ispaces,*$4,$2);
- std::cout << s << std::endl;
- }
- catch (const std::exception &e) {
- std::cout << e.what() << std::endl;
- }
- delete $4;
- delete $3;
- }
- | reachable ';' {
- flushScanBuffer();
- DynamicArray1<Relation> &final = *$1;
- bool any_sat = false;
- int i,n_nodes = reachable_info->node_names.size();
- for(i = 1; i <= n_nodes; i++)
- if(final[i].is_upper_bound_satisfiable()) {
- any_sat = true;
- std::cout << "Node %s: " << reachable_info->node_names[i];
- final[i].print_with_subs(stdout);
- }
- if(!any_sat)
- std::cout << "No nodes reachable.\n";
- delete $1;
- delete reachable_info;
- }
-;
-
-
-effort : {$$ = 1;}
- | INT {$$ = $1;}
- | '-' INT {$$ = -$2;}
-;
-
-context : {$$ = new Relation(); *$$ = Relation::Null();}
- | GIVEN relation {$$ = $2; }
-;
-
-relPairList : relPairList ',' relation ':' relation {
- try {
- $1->mappings.append(*$3);
- $1->mappings[$1->mappings.size()].compress();
- $1->ispaces.append(*$5);
- $1->ispaces[$1->ispaces.size()].compress();
- }
- catch (const std::exception &e) {
- delete $1;
- delete $3;
- delete $5;
- yyerror(e.what());
- YYERROR;
- }
- delete $3;
- delete $5;
- $$ = $1;
- }
- | relPairList ',' relation {
- try {
- $1->mappings.append(Identity($3->n_set()));
- $1->mappings[$1->mappings.size()].compress();
- $1->ispaces.append(*$3);
- $1->ispaces[$1->ispaces.size()].compress();
- }
- catch (const std::exception &e) {
- delete $1;
- delete $3;
- yyerror(e.what());
- YYERROR;
- }
- delete $3;
- $$ = $1;
- }
- | relation ':' relation {
- RelTuplePair *rtp = new RelTuplePair;
- try {
- rtp->mappings.append(*$1);
- rtp->mappings[rtp->mappings.size()].compress();
- rtp->ispaces.append(*$3);
- rtp->ispaces[rtp->ispaces.size()].compress();
- }
- catch (const std::exception &e) {
- delete rtp;
- delete $1;
- delete $3;
- yyerror(e.what());
- YYERROR;
- }
- delete $1;
- delete $3;
- $$ = rtp;
- }
- | relation {
- RelTuplePair *rtp = new RelTuplePair;
- try {
- rtp->mappings.append(Identity($1->n_set()));
- rtp->mappings[rtp->mappings.size()].compress();
- rtp->ispaces.append(*$1);
- rtp->ispaces[rtp->ispaces.size()].compress();
- }
- catch (const std::exception &e) {
- delete rtp;
- delete $1;
- yyerror(e.what());
- YYERROR;
- }
- delete $1;
- $$ = rtp;
- }
-;
-
-relation : OPEN_BRACE {need_coef = true; relationDecl = new Declaration_Site();}
- builtRelation CLOSE_BRACE {
- need_coef = false;
- $$ = $3;
- if (omega_calc_debug) {
- fprintf(DebugFile,"Built relation:\n");
- $$->prefix_print(DebugFile);
- }
- current_Declaration_Site = globalDecls;
- delete relationDecl;
- relationDecl = NULL;
- }
- | VAR {
- Const_String s = $1;
- Relation *r = relationMap(s);
- if (r == NULL) {
- yyerror(std::string("relation ") + to_string($1) + std::string(" not declared"));
- delete []$1;
- YYERROR;
- }
- $$ = new Relation(*r);
- delete []$1;
- }
- | '(' relation ')' {$$ = $2;}
- | relation '+' %prec p9 {
- $$ = new Relation();
- try {
- *$$ = TransitiveClosure(*$1, 1, Relation::Null());
- }
- catch (const std::exception &e) {
- delete $$;
- delete $1;
- yyerror(e.what());
- YYERROR;
- }
- delete $1;
- }
- | relation '*' %prec p9 {
- $$ = new Relation();
- try {
- int vars = $1->n_inp();
- *$$ = Union(Identity(vars), TransitiveClosure(*$1, 1, Relation::Null()));
- }
- catch (const std::exception &e) {
- delete $$;
- delete $1;
- yyerror(e.what());
- YYERROR;
- }
- delete $1;
- }
- | relation '+' WITHIN relation %prec p9 {
- $$ = new Relation();
- try {
- *$$= TransitiveClosure(*$1, 1, *$4);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $1;
- delete $4;
- yyerror(e.what());
- YYERROR;
- }
- delete $1;
- delete $4;
- }
- | relation '^' '@' %prec p8 {
- $$ = new Relation();
- try {
- *$$ = ApproxClosure(*$1);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $1;
- yyerror(e.what());
- YYERROR;
- }
- delete $1;
- }
- | relation '^' '+' %prec p8 {
- $$ = new Relation();
- try {
- *$$ = calculateTransitiveClosure(*$1);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $1;
- yyerror(e.what());
- YYERROR;
- }
- delete $1;
- }
- | MINIMIZE_RANGE relation %prec p8 {
- $$ = new Relation();
- try {
- Relation o(*$2);
- Relation r(*$2);
- r = Join(r,LexForward($2->n_out()));
- *$$ = Difference(o,r);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | MAXIMIZE_RANGE relation %prec p8 {
- $$ = new Relation();
- try {
- Relation o(*$2);
- Relation r(*$2);
- r = Join(r,Inverse(LexForward($2->n_out())));
- *$$ = Difference(o,r);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | MINIMIZE_DOMAIN relation %prec p8 {
- $$ = new Relation();
- try {
- Relation o(*$2);
- Relation r(*$2);
- r = Join(LexForward($2->n_inp()),r);
- *$$ = Difference(o,r);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | MAXIMIZE_DOMAIN relation %prec p8 {
- $$ = new Relation();
- try {
- Relation o(*$2);
- Relation r(*$2);
- r = Join(Inverse(LexForward($2->n_inp())),r);
- *$$ = Difference(o,r);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | MAXIMIZE relation %prec p8 {
- $$ = new Relation();
- try {
- Relation c(*$2);
- Relation r(*$2);
- *$$ = Cross_Product(Relation(*$2),c);
- *$$ = Difference(r,Domain(Intersection(*$$,LexForward($$->n_inp()))));
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | MINIMIZE relation %prec p8 {
- $$ = new Relation();
- try {
- Relation c(*$2);
- Relation r(*$2);
- *$$ = Cross_Product(Relation(*$2),c);
- *$$ = Difference(r,Range(Intersection(*$$,LexForward($$->n_inp()))));
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | FARKAS relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = Farkas(*$2, Basic_Farkas);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | DECOUPLED_FARKAS relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = Farkas(*$2, Decoupled_Farkas);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | relation '@' %prec p9 {
- $$ = new Relation();
- try {
- *$$ = ConicClosure(*$1);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $1;
- yyerror(e.what());
- YYERROR;
- }
- delete $1;
- }
- | PROJECT_AWAY_SYMBOLS relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = Project_Sym(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | PROJECT_ON_SYMBOLS relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = Project_On_Sym(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | DIFFERENCE relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = Deltas(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | DIFFERENCE_TO_RELATION relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = DeltasToRelation(*$2,$2->n_set(),$2->n_set());
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | DOMAIN relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = Domain(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | VENN relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = VennDiagramForm(*$2,Relation::True(*$2));
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | VENN relation GIVEN relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = VennDiagramForm(*$2,*$4);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- delete $4;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- delete $4;
- }
- | CONVEX_HULL relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = ConvexHull(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | DECOUPLED_CONVEX_HULL relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = DecoupledConvexHull(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | POSITIVE_COMBINATION relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = Farkas(*$2,Positive_Combination_Farkas);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | LINEAR_COMBINATION relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = Farkas(*$2,Linear_Combination_Farkas);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | AFFINE_COMBINATION relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = Farkas(*$2,Affine_Combination_Farkas);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | CONVEX_COMBINATION relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = Farkas(*$2,Convex_Combination_Farkas);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | PAIRWISE_CHECK relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = CheckForConvexRepresentation(CheckForConvexPairs(*$2));
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | CONVEX_CHECK relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = CheckForConvexRepresentation(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | CONVEX_REPRESENTATION relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = ConvexRepresentation(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | AFFINE_HULL relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = AffineHull(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | CONIC_HULL relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = ConicHull(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | LINEAR_HULL relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = LinearHull(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | QUICK_HULL relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = QuickHull(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | RECT_HULL relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = RectHull(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | HULL relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = Hull(*$2,false,1,Relation::Null());
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | HULL relation GIVEN relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = Hull(*$2,false,1,*$4);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- delete $4;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- delete $4;
- }
- | APPROX relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = Approximate(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | RANGE relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = Range(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | INVERSE relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = Inverse(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | COMPLEMENT relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = Complement(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | GIST relation GIVEN relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = Gist(*$2,*$4,1);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- delete $4;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- delete $4;
- }
- | relation '(' relation ')' {
- $$ = new Relation();
- try {
- *$$ = Composition(*$1,*$3);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $1;
- delete $3;
- yyerror(e.what());
- YYERROR;
- }
- delete $1;
- delete $3;
- }
- | relation COMPOSE relation {
- $$ = new Relation();
- try {
- *$$ = Composition(*$1,*$3);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $1;
- delete $3;
- yyerror(e.what());
- YYERROR;
- }
- delete $1;
- delete $3;
- }
- | relation CARRIED_BY INT {
- $$ = new Relation();
- try {
- *$$ = After(*$1,$3,$3);
- (*$$).prefix_print(stdout);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $1;
- yyerror(e.what());
- YYERROR;
- }
- delete $1;
- }
- | relation JOIN relation {
- $$ = new Relation();
- try {
- *$$ = Composition(*$3,*$1);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $1;
- delete $3;
- yyerror(e.what());
- YYERROR;
- }
- delete $1;
- delete $3;
- }
- | relation RESTRICT_RANGE relation {
- $$ = new Relation();
- try {
- *$$ = Restrict_Range(*$1,*$3);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $1;
- delete $3;
- yyerror(e.what());
- YYERROR;
- }
- delete $1;
- delete $3;
- }
- | relation RESTRICT_DOMAIN relation {
- $$ = new Relation();
- try {
- *$$ = Restrict_Domain(*$1,*$3);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $1;
- delete $3;
- yyerror(e.what());
- YYERROR;
- }
- delete $1;
- delete $3;
- }
- | relation INTERSECTION relation {
- $$ = new Relation();
- try {
- *$$ = Intersection(*$1,*$3);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $1;
- delete $3;
- yyerror(e.what());
- YYERROR;
- }
- delete $1;
- delete $3;
- }
- | relation '-' relation %prec INTERSECTION {
- $$ = new Relation();
- try {
- *$$ = Difference(*$1,*$3);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $1;
- delete $3;
- yyerror(e.what());
- YYERROR;
- }
- delete $1;
- delete $3;
- }
- | relation UNION relation {
- $$ = new Relation();
- try {
- *$$ = Union(*$1,*$3);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $1;
- delete $3;
- yyerror(e.what());
- YYERROR;
- }
- delete $1;
- delete $3;
- }
- | relation '*' relation {
- $$ = new Relation();
- try {
- *$$ = Cross_Product(*$1,*$3);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $1;
- delete $3;
- yyerror(e.what());
- YYERROR;
- }
- delete $1;
- delete $3;
- }
- | SUPERSETOF relation {
- $$ = new Relation();
- try {
- *$$ = Union(*$2, Relation::Unknown(*$2));
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | SUBSETOF relation {
- $$ = new Relation();
- try {
- *$$ = Intersection(*$2, Relation::Unknown(*$2));
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | MAKE_UPPER_BOUND relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = Upper_Bound(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | MAKE_LOWER_BOUND relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = Lower_Bound(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | SAMPLE relation {
- $$ = new Relation();
- try {
- *$$ = Sample_Solution(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | SYM_SAMPLE relation {
- $$ = new Relation();
- try {
- *$$ = Symbolic_Solution(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | reachable_of { $$ = $1; }
- | ASSERT_UNSAT relation {
- if (($2)->is_satisfiable()) {
- fprintf(stderr,"assert_unsatisfiable failed on ");
- ($2)->print_with_subs(stderr);
- exit(1);
- }
- $$=$2;
- }
-;
-
-builtRelation : tupleDeclaration GOES_TO {currentTuple = Output_Tuple;}
- tupleDeclaration {currentTuple = Input_Tuple;} optionalFormula {
- Relation * r = new Relation($1->size,$4->size);
- resetGlobals();
- F_And *f = r->add_and();
- for(int i=1;i<=$1->size;i++) {
- $1->vars[i]->vid = r->input_var(i);
- if (!$1->vars[i]->anonymous)
- r->name_input_var(i,$1->vars[i]->stripped_name);
- }
- for(int i=1;i<=$4->size;i++) {
- $4->vars[i]->vid = r->output_var(i);
- if (!$4->vars[i]->anonymous)
- r->name_output_var(i,$4->vars[i]->stripped_name);
- }
- r->setup_names();
- foreach(e,Exp*,$1->eq_constraints, install_eq(f,e,0));
- foreach(e,Exp*,$1->geq_constraints, install_geq(f,e,0));
- foreach(c,strideConstraint*,$1->stride_constraints, install_stride(f,c));
- foreach(e,Exp*,$4->eq_constraints, install_eq(f,e,0));
- foreach(e,Exp*,$4->geq_constraints, install_geq(f,e,0));
- foreach(c,strideConstraint*,$4->stride_constraints, install_stride(f,c));
- if ($6) $6->install(f);
- delete $1;
- delete $4;
- delete $6;
- $$ = r;
- }
- | tupleDeclaration optionalFormula {
- Relation * r = new Relation($1->size);
- resetGlobals();
- F_And *f = r->add_and();
- for(int i=1;i<=$1->size;i++) {
- $1->vars[i]->vid = r->set_var(i);
- if (!$1->vars[i]->anonymous)
- r->name_set_var(i,$1->vars[i]->stripped_name);
- }
- r->setup_names();
- foreach(e,Exp*,$1->eq_constraints, install_eq(f,e,0));
- foreach(e,Exp*,$1->geq_constraints, install_geq(f,e,0));
- foreach(c,strideConstraint*,$1->stride_constraints, install_stride(f,c));
- if ($2) $2->install(f);
- delete $1;
- delete $2;
- $$ = r;
- }
- | formula {
- Relation * r = new Relation(0,0);
- F_And *f = r->add_and();
- $1->install(f);
- delete $1;
- $$ = r;
- }
-;
-
-optionalFormula : formula_sep formula {$$ = $2;}
- | {$$ = 0;}
-;
-
-formula_sep : ':'
- | VERTICAL_BAR
- | SUCH_THAT
-;
-
-tupleDeclaration : {currentTupleDescriptor = new tupleDescriptor; tuplePos = 1;}
- '[' optionalTupleVarList ']'
- {$$ = currentTupleDescriptor; tuplePos = 0;}
-;
-
-optionalTupleVarList : /* empty */
- | tupleVar
- | optionalTupleVarList ',' tupleVar
-;
-
-tupleVar : VAR %prec p10 {
- Declaration_Site *ds = defined($1);
- if (!ds)
- currentTupleDescriptor->extend($1,currentTuple,tuplePos);
- else {
- Variable_Ref *v = lookupScalar($1);
- if (v == NULL) {
- yyerror(std::string("cannot find declaration for variable ") + to_string($1));
- delete []$1;
- YYERROR;
- }
- if (ds != globalDecls)
- currentTupleDescriptor->extend($1, new Exp(v));
- else
- currentTupleDescriptor->extend(new Exp(v));
- }
- tuplePos++;
- delete []$1;
- }
- | '*' {currentTupleDescriptor->extend(); tuplePos++;}
- | exp %prec p1 {
- currentTupleDescriptor->extend($1);
- tuplePos++;
- }
- | exp ':' exp %prec p1 {
- currentTupleDescriptor->extend($1,$3);
- tuplePos++;
- }
- | exp ':' exp ':' COEF %prec p1 {
- currentTupleDescriptor->extend($1,$3,$5);
- tuplePos++;
- }
-;
-
-varList : varList ',' VAR {$$ = $1; $$->insert($3); $3 = NULL;}
- | VAR {$$ = new VarList; $$->insert($1); $1 = NULL;}
-;
-
-varDecl : varList {
- $$ = current_Declaration_Site = new Declaration_Site($1);
- foreach(s,char *, *$1, delete []s);
- delete $1;
- }
-;
-
-varDeclOptBrackets : varDecl {$$ = $1;}
- |'[' varDecl ']' {$$ = $2;}
-;
-
-globVarList : globVarList ',' globVar
- | globVar
-;
-
-globVar : VAR '(' INT ')' {globalDecls->extend_both_tuples($1, $3); delete []$1;}
- | VAR {
- globalDecls->extend($1);
- delete []$1;
- }
-;
-
-formula : formula AND formula {$$ = new AST_And($1,$3);}
- | formula OR formula {$$ = new AST_Or($1,$3);}
- | constraintChain {$$ = $1;}
- | '(' formula ')' {$$ = $2;}
- | NOT formula {$$ = new AST_Not($2);}
- | start_exists varDeclOptBrackets exists_sep formula end_quant {$$ = new AST_exists($2,$4);}
- | start_forall varDeclOptBrackets forall_sep formula end_quant {$$ = new AST_forall($2,$4);}
-;
-
-start_exists : '(' EXISTS
- | EXISTS '('
-;
-
-exists_sep : ':'
- | VERTICAL_BAR
- | SUCH_THAT
-;
-
-start_forall : '(' FORALL
- | FORALL '('
-;
-
-forall_sep : ':'
-;
-
-end_quant : ')' {popScope();}
-;
-
-expList : exp ',' expList {$$ = $3; $$->insert($1);}
- | exp {$$ = new ExpList; $$->insert($1);}
-;
-
-constraintChain : expList REL_OP expList {$$ = new AST_constraints($1,$2,$3);}
- | expList REL_OP constraintChain {$$ = new AST_constraints($1,$2,$3);}
-;
-
-simpleExp : VAR %prec p9 {
- Variable_Ref *v = lookupScalar($1);
- if (v == NULL) {
- yyerror(std::string("cannot find declaration for variable ") + to_string($1));
- delete []$1;
- YYERROR;
- }
- $$ = new Exp(v);
- delete []$1;
- }
- | VAR '(' {argCount = 1;} argumentList ')' %prec p9 {
- Variable_Ref *v;
- if ($4 == Input_Tuple)
- v = functionOfInput[$1];
- else
- v = functionOfOutput[$1];
- if (v == NULL) {
- yyerror(std::string("Function ") + to_string($1) + std::string(" not declared"));
- delete []$1;
- YYERROR;
- }
- $$ = new Exp(v);
- delete []$1;
- }
- | '(' exp ')' { $$ = $2; }
-;
-
-argumentList : argumentList ',' VAR {
- Variable_Ref *v = lookupScalar($3);
- if (v == NULL) {
- yyerror(std::string("cannot find declaration for variable ") + to_string($1));
- delete []$3;
- YYERROR;
- }
- if (v->pos != argCount || v->of != $1 || (v->of != Input_Tuple && v->of != Output_Tuple)) {
- yyerror("arguments to function must be prefix of input or output tuple");
- delete []$3;
- YYERROR;
- }
- $$ = v->of;
- argCount++;
- delete []$3;
- }
- | VAR {
- Variable_Ref *v = lookupScalar($1);
- if (v == NULL) {
- yyerror(std::string("cannot find declaration for variable ") + to_string($1));
- delete []$1;
- YYERROR;
- }
- if (v->pos != argCount || (v->of != Input_Tuple && v->of != Output_Tuple)) {
- yyerror("arguments to function must be prefix of input or output tuple");
- delete []$1;
- YYERROR;
- }
- $$ = v->of;
- argCount++;
- delete []$1;
- }
-;
-
-exp : COEF {$$ = new Exp($1);}
- | COEF simpleExp %prec '*' {$$ = multiply($1,$2);}
- | simpleExp {$$ = $1; }
- | '-' exp %prec '*' {$$ = negate($2);}
- | exp '+' exp {$$ = add($1,$3);}
- | exp '-' exp {$$ = subtract($1,$3);}
- | exp '*' exp {$$ = multiply($1,$3);}
-;
-
-
-reachable : REACHABLE_FROM nodeNameList nodeSpecificationList {
- DynamicArray1<Relation> *final = Reachable_Nodes(reachable_info);
- $$ = final;
- }
-;
-
-reachable_of : REACHABLE_OF VAR IN nodeNameList nodeSpecificationList {
- DynamicArray1<Relation> *final = Reachable_Nodes(reachable_info);
- int index = reachable_info->node_names.index(std::string($2));
- if (index == 0) {
- yyerror(std::string("no such node ") + to_string($2));
- delete []$2;
- delete final;
- delete reachable_info;
- YYERROR;
- }
- $$ = new Relation;
- *$$ = (*final)[index];
- delete final;
- delete reachable_info;
- delete []$2;
- }
-;
-
-nodeNameList : '(' realNodeNameList ')' {
- int sz = reachable_info->node_names.size();
- reachable_info->node_arity.reallocate(sz);
- reachable_info->transitions.resize(sz+1,sz+1);
- reachable_info->start_nodes.resize(sz+1);
- }
-;
-
-realNodeNameList : realNodeNameList ',' VAR {
- reachable_info->node_names.append(std::string($3));
- delete []$3;
- }
- | VAR {
- reachable_info = new reachable_information;
- reachable_info->node_names.append(std::string($1));
- delete []$1;
- }
-;
-
-
-nodeSpecificationList : OPEN_BRACE realNodeSpecificationList CLOSE_BRACE {
- int i,j;
- int n_nodes = reachable_info->node_names.size();
- Tuple<int> &arity = reachable_info->node_arity;
- DynamicArray2<Relation> &transitions = reachable_info->transitions;
-
- /* fixup unspecified transitions to be false */
- /* find arity */
- for(i = 1; i <= n_nodes; i++) arity[i] = -1;
- for(i = 1; i <= n_nodes; i++)
- for(j = 1; j <= n_nodes; j++)
- if(! transitions[i][j].is_null()) {
- int in_arity = transitions[i][j].n_inp();
- int out_arity = transitions[i][j].n_out();
- if(arity[i] < 0) arity[i] = in_arity;
- if(arity[j] < 0) arity[j] = out_arity;
- if(in_arity != arity[i] || out_arity != arity[j]) {
- yyerror(std::string("arity mismatch in node transition: ") + to_string(reachable_info->node_names[i]) + std::string(" -> ") + to_string(reachable_info->node_names[j]));
- delete reachable_info;
- YYERROR;
- }
- }
- for(i = 1; i <= n_nodes; i++)
- if(arity[i] < 0) arity[i] = 0;
- /* Fill in false relations */
- for(i = 1; i <= n_nodes; i++)
- for(j = 1; j <= n_nodes; j++)
- if(transitions[i][j].is_null())
- transitions[i][j] = Relation::False(arity[i],arity[j]);
-
- /* fixup unused start node positions */
- DynamicArray1<Relation> &nodes = reachable_info->start_nodes;
- for(i = 1; i <= n_nodes; i++)
- if(nodes[i].is_null())
- nodes[i] = Relation::False(arity[i]);
- else
- if(nodes[i].n_set() != arity[i]){
- yyerror(std::string("arity mismatch in start node ") + to_string(reachable_info->node_names[i]));
- delete reachable_info;
- YYERROR;
- }
- }
-;
-
-realNodeSpecificationList : realNodeSpecificationList ',' VAR ':' relation {
- int n_nodes = reachable_info->node_names.size();
- int index = reachable_info->node_names.index($3);
- if (!(index > 0 && index <= n_nodes)) {
- yyerror(std::string("no such node ")+to_string($3));
- delete $5;
- delete []$3;
- delete reachable_info;
- YYERROR;
- }
- reachable_info->start_nodes[index] = *$5;
- delete $5;
- delete []$3;
- }
- | realNodeSpecificationList ',' VAR GOES_TO VAR ':' relation {
- int n_nodes = reachable_info->node_names.size();
- int from_index = reachable_info->node_names.index($3);
- if (!(from_index > 0 && from_index <= n_nodes)) {
- yyerror(std::string("no such node ")+to_string($3));
- delete $7;
- delete []$3;
- delete []$5;
- delete reachable_info;
- YYERROR;
- }
- int to_index = reachable_info->node_names.index($5);
- if (!(to_index > 0 && to_index <= n_nodes)) {
- yyerror(std::string("no such node ")+to_string($5));
- delete $7;
- delete []$3;
- delete []$5;
- delete reachable_info;
- YYERROR;
- }
- reachable_info->transitions[from_index][to_index] = *$7;
- delete $7;
- delete []$3;
- delete []$5;
- }
- | VAR GOES_TO VAR ':' relation {
- int n_nodes = reachable_info->node_names.size();
- int from_index = reachable_info->node_names.index($1);
- if (!(from_index > 0 && from_index <= n_nodes)) {
- yyerror(std::string("no such node ")+to_string($1));
- delete $5;
- delete []$1;
- delete []$3;
- delete reachable_info;
- YYERROR;
- }
- int to_index = reachable_info->node_names.index($3);
- if (!(to_index > 0 && to_index <= n_nodes)) {
- yyerror(std::string("no such node ")+to_string($3));
- delete $5;
- delete []$1;
- delete []$3;
- delete reachable_info;
- YYERROR;
- }
- reachable_info->transitions[from_index][to_index] = *$5;
- delete $5;
- delete []$1;
- delete []$3;
- }
- | VAR ':' relation {
- int n_nodes = reachable_info->node_names.size();
- int index = reachable_info->node_names.index($1);
- if (!(index > 0 && index <= n_nodes)) {
- yyerror(std::string("no such node ")+to_string($1));
- delete $3;
- delete []$1;
- delete reachable_info;
- YYERROR;
- }
- reachable_info->start_nodes[index] = *$3;
- delete $3;
- delete []$1;
- }
-;
-
-%%
-
-
-void printUsage(FILE *outf, char **argv) {
- fprintf(outf, "usage: %s {-R} {-D[facility][level]...} infile\n -R means skip redundant conjunct elimination\n -D sets debugging level as follows:\n a = all debugging flags\n g = code generation\n l = calculator\n c = omega core\n p = presburger functions\n r = relational operators\n t = transitive closure\n", argv[0]);
-}
-
-
-bool process_calc_debugging_flags(char *arg,int &j) {
- char debug_type;
- while((debug_type=arg[j]) != 0) {
- j++;
- int level;
- if(isdigit(arg[j]))
- level = (arg[j++]) - '0';
- else
- if(arg[j] == 0 || isalpha(arg[j]))
- level = 1;
- else
- return false;
- if (level < 0 || level > 4) {
- fprintf(stderr,"Debug level %c out of range: %d\n", debug_type, level);
- return false;
- }
- switch(debug_type) {
- case 'a':
- omega_core_debug = relation_debug = hull_debug =
- closure_presburger_debug =
- farkas_debug =
- pres_debug = omega_calc_debug = code_gen_debug = level;
- break;
- case 'g':
- code_gen_debug = level; break;
- case 'f':
- farkas_debug = level; break;
- case 'h':
- hull_debug = level; break;
- case 'c':
- omega_core_debug = level; break;
- case 'r':
- relation_debug = level; break;
- case 'p':
- pres_debug = level; break;
- case 't':
- closure_presburger_debug = level; break;
- case 'l':
- omega_calc_debug = level; break;
-#if defined STUDY_EVACUATIONS
- case 'e':
- evac_debug = level; break;
-#endif
- default:
- fprintf(stderr, "Unknown debug type %c\n", debug_type);
- return false;
- }
- }
- return true;
-}
-
-
-int main(int argc, char **argv) {
-#if YYDEBUG != 0
- yydebug = 1;
-#endif
-
- /* process flags */
- char *fileName = 0;
- for(int i=1; i<argc; i++) {
- if(argv[i][0] == '-') {
- int j = 1, c;
- while((c=argv[i][j++]) != 0) {
- switch(c) {
- case 'D':
- if (!process_calc_debugging_flags(argv[i],j)) {
- printUsage(stderr, argv);
- exit(1);
- }
- break;
- case 'G':
- fprintf(stderr,"Note: specifying number of GEQ's is no longer useful.\n");
- while(argv[i][j] != 0) j++;
- break;
- case 'E':
- fprintf(stderr,"Note: specifying number of EQ's is no longer useful.\n");
- while(argv[i][j] != 0) j++;
- break;
- case 'R':
- redundant_conj_level = 1;
- break;
- /* Other future options go here */
- case 'h':
- printUsage(stderr, argv);
- exit(1);
- break;
- default:
- fprintf(stderr, "\nUnknown flag -%c\n", c);
- printUsage(stderr, argv);
- exit(1);
- }
- }
- }
- else {
- /* Make sure this is a file name */
- if (fileName) {
- fprintf(stderr,"\nCan only handle a single input file\n");
- printUsage(stderr,argv);
- exit(1);
- }
- fileName = argv[i];
- yyin = fopen(fileName, "r");
- if (!yyin) {
- fprintf(stderr, "\nCan't open input file %s\n",fileName);
- printUsage(stderr,argv);
- exit(1);
- }
- }
- }
-
- if (fileName || !isatty((int)fileno(stdin))) {
- is_interactive = false;
- }
- else {
- is_interactive = true;
- setbuf(DebugFile, NULL);
- printf("Calculator for Omega+ v20110204snapshot (built on %s)\n", OMEGA_BUILD_DATE);
- printf("Copyright (C) 1994-2000 University of Maryland the Omega Project Team\n");
- printf("Copyright (C) 2008 University of Southern California\n");
- printf("Copyright (C) 2009-2011 University of Utah\n");
- printf("%s ", PROMPT_STRING);
- }
- need_coef = false;
- current_Declaration_Site = globalDecls = new Global_Declaration_Site();
-
- if (yyparse() != 0) {
- if (!is_interactive)
- std::cout << "syntax error at the end of the file, missing ';'" << std::endl;
- else
- std::cout << std::endl;
- delete relationDecl;
- relationDecl = NULL;
- }
- else {
- if (is_interactive)
- std::cout << std::endl;
- }
-
- foreach_map(cs,Const_String,r,Relation *,relationMap,
- {delete r; relationMap[cs]=0;});
- delete globalDecls;
- fclose(yyin);
-
- return 0;
-}
-
-Relation LexForward(int n) {
- Relation r(n,n);
- F_Or *f = r.add_or();
- for (int i=1; i <= n; i++) {
- F_And *g = f->add_and();
- for(int j=1;j<i;j++) {
- EQ_Handle e = g->add_EQ();
- e.update_coef(r.input_var(j),-1);
- e.update_coef(r.output_var(j),1);
- e.finalize();
- }
- GEQ_Handle e = g->add_GEQ();
- e.update_coef(r.input_var(i),-1);
- e.update_coef(r.output_var(i),1);
- e.update_const(-1);
- e.finalize();
- }
- r.finalize();
- return r;
-}
diff --git a/omegalib/omegacalc/src/parser.yy b/omegalib/omegacalc/src/parser.yy
deleted file mode 100755
index c2821cc..0000000
--- a/omegalib/omegacalc/src/parser.yy
+++ /dev/null
@@ -1,1928 +0,0 @@
-/*****************************************************************************
- Copyright (C) 1994-2000 the Omega Project Team
- Copyright (C) 2005-2011 Chun Chen
- All Rights Reserved.
-
- Purpose:
- yacc parser for calculator.
-
- Notes:
-
- History:
- 02/04/11 work with flex c++ mode, Chun Chen
-*****************************************************************************/
-
-%{
-//#define YYDEBUG 1
-#include <basic/DynamicArray.h>
-#include <basic/Iterator.h>
-#include <omega_calc/AST.h>
-#include <omega/hull.h>
-#include <omega/closure.h>
-#include <omega/reach.h>
-#include <string>
-#include <iostream>
-#include <fstream>
-#include "parser.tab.hh"
-#include <omega_calc/myflex.h>
-//#include <stdio.h>
-
-#if defined __USE_POSIX
-#include <unistd.h>
-#elif defined __WIN32
-#include <io.h>
-#endif
-
-
-#ifndef WIN32
-#include <sys/time.h>
-#include <sys/resource.h>
-#endif
-#if !defined(OMIT_GETRUSAGE)
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/resource.h>
-#endif
-
-#if !defined(OMIT_GETRUSAGE)
-#ifdef __sparc__
-extern "C" int getrusage (int, struct rusage*);
-#endif
-
-
-
-
-struct rusage start_time;
-bool anyTimingDone = false;
-
-void start_clock( void ) {
- getrusage(RUSAGE_SELF, &start_time);
-}
-
-int clock_diff( void ) {
- struct rusage current_time;
- getrusage(RUSAGE_SELF, &current_time);
- return (current_time.ru_utime.tv_sec -start_time.ru_utime.tv_sec)*1000000 + (current_time.ru_utime.tv_usec-start_time.ru_utime.tv_usec);
-}
-#endif
-
-
-#ifdef BUILD_CODEGEN
-#include <code_gen/codegen.h>
-#endif
-
-extern myFlexLexer mylexer;
-#define yylex mylexer.yylex
-
-
-
-
-int omega_calc_debug = 0;
-
-extern bool is_interactive;
-extern const char *PROMPT_STRING;
-bool simplify = true;
-using namespace omega;
-
-extern std::string err_msg;
-
-bool need_coef;
-
-namespace {
- int redundant_conj_level = 2; // default maximum 2
- int redundant_constr_level = 4; // default maximum 4
-}
-
-std::map<std::string, Relation *> relationMap;
-int argCount = 0;
-int tuplePos = 0;
-Argument_Tuple currentTuple = Input_Tuple;
-
-Relation LexForward(int n);
-reachable_information *reachable_info;
-
-void yyerror(const std::string &s);
-void flushScanBuffer();
-
-%}
-
-%union {
- int INT_VALUE;
- omega::coef_t COEF_VALUE;
- Rel_Op REL_OPERATOR;
- char *VAR_NAME;
- std::set<char *> *VAR_LIST;
- Exp *EXP;
- std::set<Exp *> *EXP_LIST;
- AST *ASTP;
- omega::Argument_Tuple ARGUMENT_TUPLE;
- AST_constraints *ASTCP;
- Declaration_Site *DECLARATION_SITE;
- omega::Relation *RELATION;
- tupleDescriptor *TUPLE_DESCRIPTOR;
- std::pair<std::vector<omega::Relation>, std::vector<omega::Relation> > *REL_TUPLE_PAIR;
- omega::DynamicArray1<omega::Relation> * RELATION_ARRAY_1D;
- std::string *STRING_VALUE;
-}
-
-%token <VAR_NAME> VAR
-%token <INT_VALUE> INT
-%token <COEF_VALUE> COEF
-%token <STRING_VALUE> STRING
-%token OPEN_BRACE CLOSE_BRACE
-%token SYMBOLIC NO_SIMPLIFY
-%token OR AND NOT
-%token ST APPROX
-%token IS_ASSIGNED
-%token FORALL EXISTS
-%token DOMAIN RANGE
-%token DIFFERENCE DIFFERENCE_TO_RELATION
-%token GIST GIVEN HULL WITHIN MAXIMIZE MINIMIZE
-%token AFFINE_HULL VENN CONVEX_COMBINATION POSITIVE_COMBINATION LINEAR_COMBINATION AFFINE_COMBINATION CONVEX_HULL CONIC_HULL LINEAR_HULL QUICK_HULL PAIRWISE_CHECK CONVEX_CHECK CONVEX_REPRESENTATION RECT_HULL SIMPLE_HULL DECOUPLED_CONVEX_HULL
-%token MAXIMIZE_RANGE MINIMIZE_RANGE
-%token MAXIMIZE_DOMAIN MINIMIZE_DOMAIN
-%token LEQ GEQ NEQ
-%token GOES_TO
-%token COMPOSE JOIN INVERSE COMPLEMENT IN CARRIED_BY TIME TIMECLOSURE
-%token UNION INTERSECTION
-%token VERTICAL_BAR SUCH_THAT
-%token SUBSET CODEGEN DECOUPLED_FARKAS FARKAS
-%token MAKE_UPPER_BOUND MAKE_LOWER_BOUND
-%token <REL_OPERATOR> REL_OP
-%token RESTRICT_DOMAIN RESTRICT_RANGE
-%token SUPERSETOF SUBSETOF SAMPLE SYM_SAMPLE
-%token PROJECT_AWAY_SYMBOLS PROJECT_ON_SYMBOLS REACHABLE_FROM REACHABLE_OF
-%token ASSERT_UNSAT
-%token PARSE_EXPRESSION PARSE_FORMULA PARSE_RELATION
-
-%type <EXP> exp simpleExp
-%type <EXP_LIST> expList
-%type <VAR_LIST> varList
-%type <ARGUMENT_TUPLE> argumentList
-%type <ASTP> formula optionalFormula
-%type <ASTCP> constraintChain
-%type <TUPLE_DESCRIPTOR> tupleDeclaration
-%type <DECLARATION_SITE> varDecl varDeclOptBrackets
-%type <RELATION> relation builtRelation context
-%type <RELATION> reachable_of
-%type <REL_TUPLE_PAIR> relPairList
-%type <RELATION_ARRAY_1D> reachable
-
-%destructor {delete []$$;} VAR
-%destructor {delete $$;} STRING
-%destructor {delete $$;} relation builtRelation tupleDeclaration formula optionalFormula context reachable_of constraintChain varDecl varDeclOptBrackets relPairList reachable
-%destructor {delete $$;} exp simpleExp
-%destructor {
- for (std::set<Exp *>::iterator i = $$->begin(); i != $$->end(); i++)
- delete *i;
- delete $$;
- } expList;
-%destructor {
- for (std::set<char *>::iterator i = $$->begin(); i != $$->end(); i++)
- delete []*i;
- delete $$;
- } varList;
-
-%nonassoc ASSERT_UNSAT
-%left UNION p1 '+' '-'
-%nonassoc SUPERSETOF SUBSETOF
-%left p2 RESTRICT_DOMAIN RESTRICT_RANGE
-%left INTERSECTION p3 '*' '@'
-%left p4
-%left OR p5
-%left AND p6
-%left COMPOSE JOIN CARRIED_BY
-%right NOT APPROX DOMAIN RANGE HULL PROJECT_AWAY_SYMBOLS PROJECT_ON_SYMBOLS DIFFERENCE DIFFERENCE_TO_RELATION INVERSE COMPLEMENT FARKAS SAMPLE SYM_SAMPLE MAKE_UPPER_BOUND MAKE_LOWER_BOUND p7
-%left p8
-%nonassoc GIVEN
-%left p9
-%left '(' p10
-
-%%
-
-inputSequence : /*empty*/
- | inputSequence { assert( current_Declaration_Site == globalDecls);}
- inputItem;
-;
-
-inputItem : ';' /*empty*/
- | NO_SIMPLIFY ';'{
- simplify = false;
- }
- | error ';' {
- flushScanBuffer();
- std::cout << err_msg;
- err_msg.clear();
- current_Declaration_Site = globalDecls;
- need_coef = false;
- std::cout << "...skipping to statement end..." << std::endl;
- delete relationDecl;
- relationDecl = NULL;
- }
- | SYMBOLIC globVarList ';' {flushScanBuffer();}
- | VAR IS_ASSIGNED relation ';' {
- flushScanBuffer();
- try {
- if(simplify)
- $3->simplify(redundant_conj_level, redundant_constr_level);
- else
- $3->simplify();
- Relation *r = relationMap[std::string($1)];
- if (r != NULL) delete r;
- relationMap[std::string($1)] = $3;
- }
- catch(const std::exception &e){
- std::cout << e.what() << std::endl;
- }
-
- delete []$1;
- }
- | relation ';' {
- flushScanBuffer();
- if(simplify)
- $1->simplify(redundant_conj_level, redundant_constr_level);
- else
- $1->simplify();
- $1->print_with_subs(stdout);
- delete $1;
- }
- | TIME relation ';' {
-#if defined(OMIT_GETRUSAGE)
- printf("'time' requires getrusage, but the omega calclator was compiled with OMIT_GETRUSAGE set!\n");
-#else
- flushScanBuffer();
- printf("\n");
- int t;
- Relation R;
- bool SKIP_FULL_CHECK = getenv("OC_TIMING_SKIP_FULL_CHECK");
- ($2)->and_with_GEQ();
- start_clock();
- for (t=1;t<=100;t++) {
- R = *$2;
- R.finalize();
- }
- int copyTime = clock_diff();
- start_clock();
- for (t=1;t<=100;t++) {
- R = *$2;
- R.finalize();
- R.simplify(); /* default simplification effort */
- }
- int simplifyTime = clock_diff() -copyTime;
- Relation R2;
- if (!SKIP_FULL_CHECK) {
- start_clock();
- for (t=1;t<=100;t++) {
- R2 = *$2;
- R2.finalize();
- R2.simplify(2,4); /* maximal simplification effort */
- }
- }
- int excessiveTime = clock_diff() - copyTime;
- printf("Times (in microseconds): \n");
- printf("%5d us to copy original set of constraints\n",copyTime/100);
- printf("%5d us to do the default amount of simplification, obtaining: \n\t", simplifyTime/100);
- R.print_with_subs(stdout);
- printf("\n");
- if (!SKIP_FULL_CHECK) {
- printf("%5d us to do the maximum (i.e., excessive) amount of simplification, obtaining: \n\t", excessiveTime/100);
- R2.print_with_subs(stdout);
- printf("\n");
- }
- if (!anyTimingDone) {
- bool warn = false;
-#ifndef SPEED
- warn =true;
-#endif
-#ifndef NDEBUG
- warn = true;
-#endif
- if (warn) {
- printf("WARNING: The Omega calculator was compiled with options that force\n");
- printf("it to perform additional consistency and error checks\n");
- printf("that may slow it down substantially\n");
- printf("\n");
- }
- printf("NOTE: These times relect the time of the current _implementation_\n");
- printf("of our algorithms. Performance bugs do exist. If you intend to publish or \n");
- printf("report on the performance on the Omega test, we respectfully but strongly \n");
- printf("request that send your test cases to us to allow us to determine if the \n");
- printf("times are appropriate, and if the way you are using the Omega library to \n");
- printf("solve your problem is the most effective way.\n");
- printf("\n");
-
- printf("Also, please be aware that over the past two years, we have focused our \n");
- printf("efforts on the expressive power of the Omega library, sometimes at the\n");
- printf("expensive of raw speed. Our original implementation of the Omega test\n");
- printf("was substantially faster on the limited domain it handled.\n");
- printf("\n");
- printf(" Thanks, \n");
- printf(" the Omega Team \n");
- }
- anyTimingDone = true;
- delete $2;
-#endif
- }
- | TIMECLOSURE relation ';' {
-#if defined(OMIT_GETRUSAGE)
- printf("'timeclosure' requires getrusage, but the omega calclator was compiled with OMIT_GETRUSAGE set!\n");
-#else
- flushScanBuffer();
- try {
- int t;
- Relation R;
- ($2)->and_with_GEQ();
- start_clock();
- for (t=1;t<=100;t++) {
- R = *$2;
- R.finalize();
- }
- int copyTime = clock_diff();
- start_clock();
- for (t=1;t<=100;t++) {
- R = *$2;
- R.finalize();
- R.simplify();
- }
- int simplifyTime = clock_diff() -copyTime;
- Relation Rclosed;
- start_clock();
- for (t=1;t<=100;t++) {
- Rclosed = *$2;
- Rclosed.finalize();
- Rclosed = TransitiveClosure(Rclosed, 1,Relation::Null());
- }
- int closureTime = clock_diff() - copyTime;
- Relation R2;
- start_clock();
- for (t=1;t<=100;t++) {
- R2 = *$2;
- R2.finalize();
- R2.simplify(2,4);
- }
- int excessiveTime = clock_diff() - copyTime;
- printf("Times (in microseconds): \n");
- printf("%5d us to copy original set of constraints\n",copyTime/100);
- printf("%5d us to do the default amount of simplification, obtaining: \n\t", simplifyTime/100);
- R.print_with_subs(stdout);
- printf("\n");
- printf("%5d us to do the maximum (i.e., excessive) amount of simplification, obtaining: \n\t", excessiveTime/100);
- R2.print_with_subs(stdout);
- printf("%5d us to do the transitive closure, obtaining: \n\t", closureTime/100);
- Rclosed.print_with_subs(stdout);
- printf("\n");
- if (!anyTimingDone) {
- bool warn = false;
-#ifndef SPEED
- warn =true;
-#endif
-#ifndef NDEBUG
- warn = true;
-#endif
- if (warn) {
- printf("WARNING: The Omega calculator was compiled with options that force\n");
- printf("it to perform additional consistency and error checks\n");
- printf("that may slow it down substantially\n");
- printf("\n");
- }
- printf("NOTE: These times relect the time of the current _implementation_\n");
- printf("of our algorithms. Performance bugs do exist. If you intend to publish or \n");
- printf("report on the performance on the Omega test, we respectfully but strongly \n");
- printf("request that send your test cases to us to allow us to determine if the \n");
- printf("times are appropriate, and if the way you are using the Omega library to \n");
- printf("solve your problem is the most effective way.\n");
- printf("\n");
-
- printf("Also, please be aware that over the past two years, we have focused our \n");
- printf("efforts on the expressive power of the Omega library, sometimes at the\n");
- printf("expensive of raw speed. Our original implementation of the Omega test\n");
- printf("was substantially faster on the limited domain it handled.\n");
- printf("\n");
- printf(" Thanks, \n");
- printf(" the Omega Team \n");
- }
- anyTimingDone = true;
- }
- catch (const std::exception &e) {
- std::cout << e.what() << std::endl;
- }
- delete $2;
-#endif
- }
- | relation SUBSET relation ';' {
- flushScanBuffer();
- try {
- if (Must_Be_Subset(copy(*$1), copy(*$3)))
- std::cout << "True" << std::endl;
- else if (Might_Be_Subset(copy(*$1), copy(*$3)))
- std::cout << "Possible" << std::endl;
- else
- std::cout << "False" << std::endl;
- }
- catch (const std::exception &e) {
- std::cout << e.what() << std::endl;
- }
- delete $1;
- delete $3;
- }
- | CODEGEN relPairList context';' {
- flushScanBuffer();
-#ifdef BUILD_CODEGEN
- try {
- CodeGen cg($2->first, $2->second, *$3);
- CG_result *cgr = cg.buildAST();
- if (cgr != NULL) {
- std::string s = cgr->printString();
- std::cout << s << std::endl;
- delete cgr;
- }
- else
- std::cout << "/* empty */" << std::endl;
- }
- catch (const std::exception &e) {
- std::cout << e.what() << std::endl;
- }
-#else
- std::cout << "CodeGen package not built" << std::endl;
-#endif
- delete $3;
- delete $2;
- }
- | CODEGEN INT relPairList context';' {
- flushScanBuffer();
-#ifdef BUILD_CODEGEN
- try {
- CodeGen cg($3->first, $3->second, *$4);
- CG_result *cgr = cg.buildAST($2);
- if (cgr != NULL) {
- std::string s = cgr->printString();
- std::cout << s << std::endl;
- delete cgr;
- }
- else
- std::cout << "/* empty */" << std::endl;
- }
- catch (const std::exception &e) {
- std::cout << e.what() << std::endl;
- }
-#else
- std::cout << "CodeGen package not built" << std::endl;
-#endif
- delete $4;
- delete $3;
- }
- | reachable ';' {
- flushScanBuffer();
- DynamicArray1<Relation> &final = *$1;
- bool any_sat = false;
- int i,n_nodes = reachable_info->node_names.size();
- for(i = 1; i <= n_nodes; i++)
- if(final[i].is_upper_bound_satisfiable()) {
- any_sat = true;
- std::cout << "Node " << reachable_info->node_names[i] << ": ";
- final[i].print_with_subs(stdout);
- }
- if(!any_sat)
- std::cout << "No nodes reachable.\n";
- delete $1;
- delete reachable_info;
- }
-;
-
-
-context : {$$ = new Relation(); *$$ = Relation::Null();}
- | GIVEN relation {$$ = $2; }
-;
-
-relPairList : relPairList ',' relation ':' relation {
- try {
- $1->first.push_back(*$3);
- $1->second.push_back(*$5);
- }
- catch (const std::exception &e) {
- delete $1;
- delete $3;
- delete $5;
- yyerror(e.what());
- YYERROR;
- }
- delete $3;
- delete $5;
- $$ = $1;
- }
- | relPairList ',' relation {
- try {
- $1->first.push_back(Identity($3->n_set()));
- $1->second.push_back(*$3);
- }
- catch (const std::exception &e) {
- delete $1;
- delete $3;
- yyerror(e.what());
- YYERROR;
- }
- delete $3;
- $$ = $1;
- }
- | relation ':' relation {
- std::pair<std::vector<Relation>, std::vector<Relation> > *rtp = new std::pair<std::vector<Relation>, std::vector<Relation> >();
- try {
- rtp->first.push_back(*$1);
- rtp->second.push_back(*$3);
- }
- catch (const std::exception &e) {
- delete rtp;
- delete $1;
- delete $3;
- yyerror(e.what());
- YYERROR;
- }
- delete $1;
- delete $3;
- $$ = rtp;
- }
- | relation {
- std::pair<std::vector<Relation>, std::vector<Relation> > *rtp = new std::pair<std::vector<Relation>, std::vector<Relation> >();
- try {
- rtp->first.push_back(Identity($1->n_set()));
- rtp->second.push_back(*$1);
- }
- catch (const std::exception &e) {
- delete rtp;
- delete $1;
- yyerror(e.what());
- YYERROR;
- }
- delete $1;
- $$ = rtp;
- }
-;
-
-relation : OPEN_BRACE {need_coef = true; relationDecl = new Declaration_Site();}
- builtRelation CLOSE_BRACE {
- need_coef = false;
- $$ = $3;
- current_Declaration_Site = globalDecls;
- delete relationDecl;
- relationDecl = NULL;
- }
- | VAR {
- Relation *r = relationMap[std::string($1)];
- if (r == NULL) {
- yyerror(std::string("relation ") + to_string($1) + std::string(" not declared"));
- delete []$1;
- YYERROR;
- }
- $$ = new Relation(*r);
- delete []$1;
- }
- | '(' relation ')' {$$ = $2;}
- | relation '+' %prec p9 {
- $$ = new Relation();
- try {
- *$$ = TransitiveClosure(*$1, 1, Relation::Null());
- }
- catch (const std::exception &e) {
- delete $$;
- delete $1;
- yyerror(e.what());
- YYERROR;
- }
- delete $1;
- }
- | relation '*' %prec p9 {
- $$ = new Relation();
- try {
- int vars = $1->n_inp();
- *$$ = Union(Identity(vars), TransitiveClosure(*$1, 1, Relation::Null()));
- }
- catch (const std::exception &e) {
- delete $$;
- delete $1;
- yyerror(e.what());
- YYERROR;
- }
- delete $1;
- }
- | relation '+' WITHIN relation %prec p9 {
- $$ = new Relation();
- try {
- *$$= TransitiveClosure(*$1, 1, *$4);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $1;
- delete $4;
- yyerror(e.what());
- YYERROR;
- }
- delete $1;
- delete $4;
- }
- | relation '^' '@' %prec p8 {
- $$ = new Relation();
- try {
- *$$ = ApproxClosure(*$1);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $1;
- yyerror(e.what());
- YYERROR;
- }
- delete $1;
- }
- | relation '^' '+' %prec p8 {
- $$ = new Relation();
- try {
- *$$ = calculateTransitiveClosure(*$1);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $1;
- yyerror(e.what());
- YYERROR;
- }
- delete $1;
- }
- | MINIMIZE_RANGE relation %prec p8 {
- $$ = new Relation();
- try {
- Relation o(*$2);
- Relation r(*$2);
- r = Join(r,LexForward($2->n_out()));
- *$$ = Difference(o,r);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | MAXIMIZE_RANGE relation %prec p8 {
- $$ = new Relation();
- try {
- Relation o(*$2);
- Relation r(*$2);
- r = Join(r,Inverse(LexForward($2->n_out())));
- *$$ = Difference(o,r);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | MINIMIZE_DOMAIN relation %prec p8 {
- $$ = new Relation();
- try {
- Relation o(*$2);
- Relation r(*$2);
- r = Join(LexForward($2->n_inp()),r);
- *$$ = Difference(o,r);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | MAXIMIZE_DOMAIN relation %prec p8 {
- $$ = new Relation();
- try {
- Relation o(*$2);
- Relation r(*$2);
- r = Join(Inverse(LexForward($2->n_inp())),r);
- *$$ = Difference(o,r);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | MAXIMIZE relation %prec p8 {
- $$ = new Relation();
- try {
- Relation c(*$2);
- Relation r(*$2);
- *$$ = Cross_Product(Relation(*$2),c);
- *$$ = Difference(r,Domain(Intersection(*$$,LexForward($$->n_inp()))));
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | MINIMIZE relation %prec p8 {
- $$ = new Relation();
- try {
- Relation c(*$2);
- Relation r(*$2);
- *$$ = Cross_Product(Relation(*$2),c);
- *$$ = Difference(r,Range(Intersection(*$$,LexForward($$->n_inp()))));
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | FARKAS relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = Farkas(*$2, Basic_Farkas);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | DECOUPLED_FARKAS relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = Farkas(*$2, Decoupled_Farkas);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | relation '@' %prec p9 {
- $$ = new Relation();
- try {
- *$$ = ConicClosure(*$1);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $1;
- yyerror(e.what());
- YYERROR;
- }
- delete $1;
- }
- | PROJECT_AWAY_SYMBOLS relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = Project_Sym(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | PROJECT_ON_SYMBOLS relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = Project_On_Sym(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | DIFFERENCE relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = Deltas(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | DIFFERENCE_TO_RELATION relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = DeltasToRelation(*$2,$2->n_set(),$2->n_set());
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | DOMAIN relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = Domain(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | VENN relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = VennDiagramForm(*$2,Relation::True(*$2));
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | VENN relation GIVEN relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = VennDiagramForm(*$2,*$4);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- delete $4;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- delete $4;
- }
- | CONVEX_HULL relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = ConvexHull(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | DECOUPLED_CONVEX_HULL relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = DecoupledConvexHull(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | POSITIVE_COMBINATION relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = Farkas(*$2,Positive_Combination_Farkas);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | LINEAR_COMBINATION relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = Farkas(*$2,Linear_Combination_Farkas);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | AFFINE_COMBINATION relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = Farkas(*$2,Affine_Combination_Farkas);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | CONVEX_COMBINATION relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = Farkas(*$2,Convex_Combination_Farkas);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | PAIRWISE_CHECK relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = CheckForConvexRepresentation(CheckForConvexPairs(*$2));
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | CONVEX_CHECK relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = CheckForConvexRepresentation(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | CONVEX_REPRESENTATION relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = ConvexRepresentation(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | AFFINE_HULL relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = AffineHull(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | CONIC_HULL relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = ConicHull(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | LINEAR_HULL relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = LinearHull(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | QUICK_HULL relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = QuickHull(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | RECT_HULL relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = RectHull(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | SIMPLE_HULL relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = SimpleHull(*$2, true, true);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | HULL relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = Hull(*$2,true,1,Relation::Null());
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | HULL relation GIVEN relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = Hull(*$2,true,1,*$4);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- delete $4;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- delete $4;
- }
- | APPROX relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = Approximate(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | RANGE relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = Range(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | INVERSE relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = Inverse(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | COMPLEMENT relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = Complement(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | GIST relation GIVEN relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = Gist(*$2,*$4,1);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- delete $4;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- delete $4;
- }
- | relation '(' relation ')' {
- $$ = new Relation();
- try {
- *$$ = Composition(*$1,*$3);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $1;
- delete $3;
- yyerror(e.what());
- YYERROR;
- }
- delete $1;
- delete $3;
- }
- | relation COMPOSE relation {
- $$ = new Relation();
- try {
- *$$ = Composition(*$1,*$3);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $1;
- delete $3;
- yyerror(e.what());
- YYERROR;
- }
- delete $1;
- delete $3;
- }
- | relation CARRIED_BY INT {
- $$ = new Relation();
- try {
- *$$ = After(*$1,$3,$3);
- (*$$).prefix_print(stdout);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $1;
- yyerror(e.what());
- YYERROR;
- }
- delete $1;
- }
- | relation JOIN relation {
- $$ = new Relation();
- try {
- *$$ = Composition(*$3,*$1);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $1;
- delete $3;
- yyerror(e.what());
- YYERROR;
- }
- delete $1;
- delete $3;
- }
- | relation RESTRICT_RANGE relation {
- $$ = new Relation();
- try {
- *$$ = Restrict_Range(*$1,*$3);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $1;
- delete $3;
- yyerror(e.what());
- YYERROR;
- }
- delete $1;
- delete $3;
- }
- | relation RESTRICT_DOMAIN relation {
- $$ = new Relation();
- try {
- *$$ = Restrict_Domain(*$1,*$3);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $1;
- delete $3;
- yyerror(e.what());
- YYERROR;
- }
- delete $1;
- delete $3;
- }
- | relation INTERSECTION relation {
- $$ = new Relation();
- try {
- *$$ = Intersection(*$1,*$3);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $1;
- delete $3;
- yyerror(e.what());
- YYERROR;
- }
- delete $1;
- delete $3;
- }
- | relation '-' relation %prec INTERSECTION {
- $$ = new Relation();
- try {
- *$$ = Difference(*$1,*$3);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $1;
- delete $3;
- yyerror(e.what());
- YYERROR;
- }
- delete $1;
- delete $3;
- }
- | relation UNION relation {
- $$ = new Relation();
- try {
- *$$ = Union(*$1,*$3);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $1;
- delete $3;
- yyerror(e.what());
- YYERROR;
- }
- delete $1;
- delete $3;
- }
- | relation '*' relation {
- $$ = new Relation();
- try {
- *$$ = Cross_Product(*$1,*$3);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $1;
- delete $3;
- yyerror(e.what());
- YYERROR;
- }
- delete $1;
- delete $3;
- }
- | SUPERSETOF relation {
- $$ = new Relation();
- try {
- *$$ = Union(*$2, Relation::Unknown(*$2));
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | SUBSETOF relation {
- $$ = new Relation();
- try {
- *$$ = Intersection(*$2, Relation::Unknown(*$2));
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | MAKE_UPPER_BOUND relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = Upper_Bound(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | MAKE_LOWER_BOUND relation %prec p8 {
- $$ = new Relation();
- try {
- *$$ = Lower_Bound(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | SAMPLE relation {
- $$ = new Relation();
- try {
- *$$ = Sample_Solution(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | SYM_SAMPLE relation {
- $$ = new Relation();
- try {
- *$$ = Symbolic_Solution(*$2);
- }
- catch (const std::exception &e) {
- delete $$;
- delete $2;
- yyerror(e.what());
- YYERROR;
- }
- delete $2;
- }
- | reachable_of { $$ = $1; }
- | ASSERT_UNSAT relation {
- if (($2)->is_satisfiable()) {
- fprintf(stderr,"assert_unsatisfiable failed on ");
- ($2)->print_with_subs(stderr);
- exit(1);
- }
- $$=$2;
- }
-;
-
-builtRelation : tupleDeclaration GOES_TO {currentTuple = Output_Tuple;}
- tupleDeclaration {currentTuple = Input_Tuple;} optionalFormula {
- Relation * r = new Relation($1->size,$4->size);
- resetGlobals();
- F_And *f = r->add_and();
- for(int i = 1; i <= $1->size; i++) {
- $1->vars[i-1]->vid = r->input_var(i);
- if (!$1->vars[i-1]->anonymous)
- r->name_input_var(i, $1->vars[i-1]->stripped_name);
- }
- for(int i = 1; i <= $4->size; i++) {
- $4->vars[i-1]->vid = r->output_var(i);
- if (!$4->vars[i-1]->anonymous)
- r->name_output_var(i, $4->vars[i-1]->stripped_name);
- }
- r->setup_names();
- for (std::set<Exp *>::iterator i = $1->eq_constraints.begin(); i != $1->eq_constraints.end(); i++)
- install_eq(f, *i, 0);
- for (std::set<Exp *>::iterator i = $1->geq_constraints.begin(); i != $1->geq_constraints.end(); i++)
- install_geq(f, *i, 0);
- for (std::set<strideConstraint *>::iterator i = $1->stride_constraints.begin(); i != $1->stride_constraints.end(); i++)
- install_stride(f, *i);
- for (std::set<Exp *>::iterator i = $4->eq_constraints.begin(); i != $4->eq_constraints.end(); i++)
- install_eq(f, *i, 0);
- for (std::set<Exp *>::iterator i = $4->geq_constraints.begin(); i != $4->geq_constraints.end(); i++)
- install_geq(f, *i, 0);
- for (std::set<strideConstraint *>::iterator i = $4->stride_constraints.begin(); i != $4->stride_constraints.end(); i++)
- install_stride(f, *i);
- if ($6) $6->install(f);
- delete $1;
- delete $4;
- delete $6;
- $$ = r;
- }
- | tupleDeclaration optionalFormula {
- Relation * r = new Relation($1->size);
- resetGlobals();
- F_And *f = r->add_and();
- for(int i = 1; i <= $1->size; i++) {
- $1->vars[i-1]->vid = r->set_var(i);
- if (!$1->vars[i-1]->anonymous)
- r->name_set_var(i, $1->vars[i-1]->stripped_name);
- }
- r->setup_names();
- for (std::set<Exp *>::iterator i = $1->eq_constraints.begin(); i != $1->eq_constraints.end(); i++)
- install_eq(f, *i, 0);
- for (std::set<Exp *>::iterator i = $1->geq_constraints.begin(); i != $1->geq_constraints.end(); i++)
- install_geq(f, *i, 0);
- for (std::set<strideConstraint *>::iterator i = $1->stride_constraints.begin(); i != $1->stride_constraints.end(); i++)
- install_stride(f, *i);
- if ($2) $2->install(f);
- delete $1;
- delete $2;
- $$ = r;
- }
- | formula {
- Relation * r = new Relation(0,0);
- F_And *f = r->add_and();
- $1->install(f);
- delete $1;
- $$ = r;
- }
-;
-
-optionalFormula : formula_sep formula {$$ = $2;}
- | {$$ = 0;}
-;
-
-formula_sep : ':'
- | VERTICAL_BAR
- | SUCH_THAT
-;
-
-tupleDeclaration : {currentTupleDescriptor = new tupleDescriptor; tuplePos = 1;}
- '[' optionalTupleVarList ']'
- {$$ = currentTupleDescriptor; tuplePos = 0;}
-;
-
-optionalTupleVarList : /* empty */
- | tupleVar
- | optionalTupleVarList ',' tupleVar
-;
-
-tupleVar : VAR %prec p10 {
- Declaration_Site *ds = defined($1);
- if (!ds)
- currentTupleDescriptor->extend($1,currentTuple,tuplePos);
- else {
- Variable_Ref *v = lookupScalar($1);
- if (v == NULL) {
- yyerror(std::string("cannot find declaration for variable ") + to_string($1));
- delete []$1;
- YYERROR;
- }
- if (ds != globalDecls)
- currentTupleDescriptor->extend($1, new Exp(v));
- else
- currentTupleDescriptor->extend(new Exp(v));
- }
- tuplePos++;
- delete []$1;
- }
- | '*' {currentTupleDescriptor->extend(); tuplePos++;}
- | exp %prec p1 {
- currentTupleDescriptor->extend($1);
- tuplePos++;
- }
- | exp ':' exp %prec p1 {
- currentTupleDescriptor->extend($1,$3);
- tuplePos++;
- }
- | exp ':' exp ':' COEF %prec p1 {
- currentTupleDescriptor->extend($1,$3,$5);
- tuplePos++;
- }
-;
-
-varList : varList ',' VAR {$$ = $1; $$->insert($3); $3 = NULL;}
- | VAR {$$ = new std::set<char *>(); $$->insert($1); $1 = NULL;}
-;
-
-varDecl : varList {
- $$ = current_Declaration_Site = new Declaration_Site($1);
- for (std::set<char *>::iterator i = $1->begin(); i != $1->end(); i++)
- delete [](*i);
- delete $1;
- }
-;
-
-varDeclOptBrackets : varDecl {$$ = $1;}
- |'[' varDecl ']' {$$ = $2;}
-;
-
-globVarList : globVarList ',' globVar
- | globVar
-;
-
-globVar : VAR '(' INT ')' {globalDecls->extend_both_tuples($1, $3); delete []$1;}
- | VAR {
- globalDecls->extend($1);
- delete []$1;
- }
-;
-
-formula : formula AND formula {$$ = new AST_And($1,$3);}
- | formula OR formula {$$ = new AST_Or($1,$3);}
- | constraintChain {$$ = $1;}
- | '(' formula ')' {$$ = $2;}
- | NOT formula {$$ = new AST_Not($2);}
- | start_exists varDeclOptBrackets exists_sep formula end_quant {$$ = new AST_exists($2,$4);}
- | start_forall varDeclOptBrackets forall_sep formula end_quant {$$ = new AST_forall($2,$4);}
-;
-
-start_exists : '(' EXISTS
- | EXISTS '('
-;
-
-exists_sep : ':'
- | VERTICAL_BAR
- | SUCH_THAT
-;
-
-start_forall : '(' FORALL
- | FORALL '('
-;
-
-forall_sep : ':'
-;
-
-end_quant : ')' {popScope();}
-;
-
-expList : exp ',' expList {$$ = $3; $$->insert($1);}
- | exp {$$ = new std::set<Exp *>(); $$->insert($1);}
-;
-
-constraintChain : expList REL_OP expList {$$ = new AST_constraints($1,$2,$3);}
- | expList REL_OP constraintChain {$$ = new AST_constraints($1,$2,$3);}
-;
-
-simpleExp : VAR %prec p9 {
- Variable_Ref *v = lookupScalar($1);
- if (v == NULL) {
- yyerror(std::string("cannot find declaration for variable ") + to_string($1));
- delete []$1;
- YYERROR;
- }
- $$ = new Exp(v);
- delete []$1;
- }
- | VAR '(' {argCount = 1;} argumentList ')' %prec p9 {
- Variable_Ref *v;
- if ($4 == Input_Tuple)
- v = functionOfInput[$1];
- else
- v = functionOfOutput[$1];
- if (v == NULL) {
- yyerror(std::string("Function ") + to_string($1) + std::string(" not declared"));
- delete []$1;
- YYERROR;
- }
- $$ = new Exp(v);
- delete []$1;
- }
- | '(' exp ')' { $$ = $2; }
-;
-
-argumentList : argumentList ',' VAR {
- Variable_Ref *v = lookupScalar($3);
- if (v == NULL) {
- yyerror(std::string("cannot find declaration for variable ") + to_string($1));
- delete []$3;
- YYERROR;
- }
- if (v->pos != argCount || v->of != $1 || (v->of != Input_Tuple && v->of != Output_Tuple)) {
- yyerror("arguments to function must be prefix of input or output tuple");
- delete []$3;
- YYERROR;
- }
- $$ = v->of;
- argCount++;
- delete []$3;
- }
- | VAR {
- Variable_Ref *v = lookupScalar($1);
- if (v == NULL) {
- yyerror(std::string("cannot find declaration for variable ") + to_string($1));
- delete []$1;
- YYERROR;
- }
- if (v->pos != argCount || (v->of != Input_Tuple && v->of != Output_Tuple)) {
- yyerror("arguments to function must be prefix of input or output tuple");
- delete []$1;
- YYERROR;
- }
- $$ = v->of;
- argCount++;
- delete []$1;
- }
-;
-
-exp : COEF {$$ = new Exp($1);}
- | COEF simpleExp %prec '*' {$$ = multiply($1,$2);}
- | simpleExp {$$ = $1; }
- | '-' exp %prec '*' {$$ = negate($2);}
- | exp '+' exp {$$ = add($1,$3);}
- | exp '-' exp {$$ = subtract($1,$3);}
- | exp '*' exp {
- try {
- $$ = multiply($1,$3);
- }
- catch (const std::exception &e) {
- yyerror(e.what());
- YYERROR;
- }
- }
-;
-
-
-reachable : REACHABLE_FROM nodeNameList nodeSpecificationList {
- DynamicArray1<Relation> *final = Reachable_Nodes(reachable_info);
- $$ = final;
- }
-;
-
-reachable_of : REACHABLE_OF VAR IN nodeNameList nodeSpecificationList {
- DynamicArray1<Relation> *final = Reachable_Nodes(reachable_info);
- int index = reachable_info->node_names.index(std::string($2));
- if (index == 0) {
- yyerror(std::string("no such node ") + to_string($2));
- delete []$2;
- delete final;
- delete reachable_info;
- YYERROR;
- }
- $$ = new Relation;
- *$$ = (*final)[index];
- delete final;
- delete reachable_info;
- delete []$2;
- }
-;
-
-nodeNameList : '(' realNodeNameList ')' {
- int sz = reachable_info->node_names.size();
- reachable_info->node_arity.reallocate(sz);
- reachable_info->transitions.resize(sz+1,sz+1);
- reachable_info->start_nodes.resize(sz+1);
- }
-;
-
-realNodeNameList : realNodeNameList ',' VAR {
- reachable_info->node_names.append(std::string($3));
- delete []$3;
- }
- | VAR {
- reachable_info = new reachable_information;
- reachable_info->node_names.append(std::string($1));
- delete []$1;
- }
-;
-
-
-nodeSpecificationList : OPEN_BRACE realNodeSpecificationList CLOSE_BRACE {
- int i,j;
- int n_nodes = reachable_info->node_names.size();
- Tuple<int> &arity = reachable_info->node_arity;
- DynamicArray2<Relation> &transitions = reachable_info->transitions;
-
- /* fixup unspecified transitions to be false */
- /* find arity */
- for(i = 1; i <= n_nodes; i++) arity[i] = -1;
- for(i = 1; i <= n_nodes; i++)
- for(j = 1; j <= n_nodes; j++)
- if(! transitions[i][j].is_null()) {
- int in_arity = transitions[i][j].n_inp();
- int out_arity = transitions[i][j].n_out();
- if(arity[i] < 0) arity[i] = in_arity;
- if(arity[j] < 0) arity[j] = out_arity;
- if(in_arity != arity[i] || out_arity != arity[j]) {
- yyerror(std::string("arity mismatch in node transition: ") + to_string(reachable_info->node_names[i]) + std::string(" -> ") + to_string(reachable_info->node_names[j]));
- delete reachable_info;
- YYERROR;
- }
- }
- for(i = 1; i <= n_nodes; i++)
- if(arity[i] < 0) arity[i] = 0;
- /* Fill in false relations */
- for(i = 1; i <= n_nodes; i++)
- for(j = 1; j <= n_nodes; j++)
- if(transitions[i][j].is_null())
- transitions[i][j] = Relation::False(arity[i],arity[j]);
-
- /* fixup unused start node positions */
- DynamicArray1<Relation> &nodes = reachable_info->start_nodes;
- for(i = 1; i <= n_nodes; i++)
- if(nodes[i].is_null())
- nodes[i] = Relation::False(arity[i]);
- else
- if(nodes[i].n_set() != arity[i]){
- yyerror(std::string("arity mismatch in start node ") + to_string(reachable_info->node_names[i]));
- delete reachable_info;
- YYERROR;
- }
- }
-;
-
-realNodeSpecificationList : realNodeSpecificationList ',' VAR ':' relation {
- int n_nodes = reachable_info->node_names.size();
- int index = reachable_info->node_names.index($3);
- if (!(index > 0 && index <= n_nodes)) {
- yyerror(std::string("no such node ")+to_string($3));
- delete $5;
- delete []$3;
- delete reachable_info;
- YYERROR;
- }
- reachable_info->start_nodes[index] = *$5;
- delete $5;
- delete []$3;
- }
- | realNodeSpecificationList ',' VAR GOES_TO VAR ':' relation {
- int n_nodes = reachable_info->node_names.size();
- int from_index = reachable_info->node_names.index($3);
- if (!(from_index > 0 && from_index <= n_nodes)) {
- yyerror(std::string("no such node ")+to_string($3));
- delete $7;
- delete []$3;
- delete []$5;
- delete reachable_info;
- YYERROR;
- }
- int to_index = reachable_info->node_names.index($5);
- if (!(to_index > 0 && to_index <= n_nodes)) {
- yyerror(std::string("no such node ")+to_string($5));
- delete $7;
- delete []$3;
- delete []$5;
- delete reachable_info;
- YYERROR;
- }
- reachable_info->transitions[from_index][to_index] = *$7;
- delete $7;
- delete []$3;
- delete []$5;
- }
- | VAR GOES_TO VAR ':' relation {
- int n_nodes = reachable_info->node_names.size();
- int from_index = reachable_info->node_names.index($1);
- if (!(from_index > 0 && from_index <= n_nodes)) {
- yyerror(std::string("no such node ")+to_string($1));
- delete $5;
- delete []$1;
- delete []$3;
- delete reachable_info;
- YYERROR;
- }
- int to_index = reachable_info->node_names.index($3);
- if (!(to_index > 0 && to_index <= n_nodes)) {
- yyerror(std::string("no such node ")+to_string($3));
- delete $5;
- delete []$1;
- delete []$3;
- delete reachable_info;
- YYERROR;
- }
- reachable_info->transitions[from_index][to_index] = *$5;
- delete $5;
- delete []$1;
- delete []$3;
- }
- | VAR ':' relation {
- int n_nodes = reachable_info->node_names.size();
- int index = reachable_info->node_names.index($1);
- if (!(index > 0 && index <= n_nodes)) {
- yyerror(std::string("no such node ")+to_string($1));
- delete $3;
- delete []$1;
- delete reachable_info;
- YYERROR;
- }
- reachable_info->start_nodes[index] = *$3;
- delete $3;
- delete []$1;
- }
-;
-
-%%
-
-void yyerror(const std::string &s) {
- std::stringstream ss;
- if (is_interactive)
- ss << s << "\n";
- else
- ss << s << " at line " << mylexer.lineno() << "\n";
- err_msg = ss.str();
-}
-
-
-int main(int argc, char **argv) {
- if (argc > 2){
- fprintf(stderr, "Usage: %s [script_file]\n", argv[0]);
- exit(1);
- }
-
- if (argc == 2) {
- std::ifstream *ifs = new std::ifstream;
- ifs->open(argv[1], std::ifstream::in);
- if (!ifs->is_open()) {
- fprintf(stderr, "can't open input file %s\n", argv[1]);
- exit(1);
- }
- yy_buffer_state *bs = mylexer.yy_create_buffer(ifs, 8092);
- mylexer.yypush_buffer_state(bs);
- }
-
- //yydebug = 1;
- is_interactive = false;
- if (argc == 1) {
-#if defined __USE_POSIX
- if (isatty((int)fileno(stdin)))
- is_interactive = true;
-#elif defined __WIN32
- if (_isatty(_fileno(stdin)))
- is_interactive = true;
-#endif
- }
-
- if (is_interactive) {
-#ifdef BUILD_CODEGEN
- std::cout << "Omega+ and CodeGen+ ";
-#else
- std::cout << "Omega+ ";
-#endif
- std::cout << "v" OC_VERSION " (built on " OC_BUILD_DATE ")" << std::endl;
- std::cout << "Copyright (C) 1994-2000 the Omega Project Team" << std::endl;
- std::cout << "Copyright (C) 2005-2011 Chun Chen" << std::endl;
- std::cout << "Copyright (C) 2011-2012 University of Utah" << std::endl;
- std::cout << PROMPT_STRING << ' ';
- std::cout.flush();
- }
-
- need_coef = false;
- current_Declaration_Site = globalDecls = new Global_Declaration_Site();
-
- if (yyparse() != 0) {
- if (!is_interactive)
- std::cout << "syntax error at the end of the file, missing ';'" << std::endl;
- else
- std::cout << std::endl;
- delete relationDecl;
- relationDecl = NULL;
- }
- else {
- if (is_interactive)
- std::cout << std::endl;
- }
-
- for (std::map<std::string, Relation *>::iterator i = relationMap.begin(); i != relationMap.end(); i++)
- delete (*i).second;
- delete globalDecls;
-
- return 0;
-}
-
-Relation LexForward(int n) {
- Relation r(n,n);
- F_Or *f = r.add_or();
- for (int i=1; i <= n; i++) {
- F_And *g = f->add_and();
- for(int j=1;j<i;j++) {
- EQ_Handle e = g->add_EQ();
- e.update_coef(r.input_var(j),-1);
- e.update_coef(r.output_var(j),1);
- e.finalize();
- }
- GEQ_Handle e = g->add_GEQ();
- e.update_coef(r.input_var(i),-1);
- e.update_coef(r.output_var(i),1);
- e.update_const(-1);
- e.finalize();
- }
- r.finalize();
- return r;
-}