4 DISTRO
="https://ftp.cs.ru.nl/Clean/builds/linux-x64/clean-bundle-complete-linux-x64-latest.tgz"
5 TAGS
="https://gitlab.science.ru.nl/cloogle/cloogle-tags/-/jobs/artifacts/master/raw/cloogletags?job=build"
6 CLEAN_HOME
="${CLEAN_HOME:-/opt/clean}"
8 echo "Cleaning up the old distro"
10 echo "Downloading clean"
11 curl
-sS "$DISTRO" |
tar -C "$CLEAN_HOME" --strip-components=1 -xz
12 echo "Downloading cloogletags"
13 curl
-sSLo "$CLEAN_HOME"/bin
/cloogletags
"$TAGS"
14 chmod +x
"$CLEAN_HOME"/bin
/cloogletags
15 echo "Generating tags"
16 cloogletags
-a -c -d "$CLEAN_HOME"/lib
-o "$CLEAN_HOME"/lib
/tags
2>/dev
/null
18 echo "Patching StdEnv for binumap"
19 patch /opt
/clean
/lib
/StdEnv
/StdGeneric.dcl
<<EOPATCH
20 --- StdGeneric.dcl 2018-12-17 02:43:55.000000000 +0100
21 +++ StdGeneric.dcl 2018-12-17 11:06:09.196234236 +0100
26 +generic binumap a b | binumap b a :: a -> b
29 +derive binumap EITHER
30 +derive binumap OBJECT
32 +derive binumap RECORD
36 // HACK: dictionaries for all generics.
37 // It works since all generic classes have only one method and do not inherit
41 patch /opt
/clean
/lib
/StdEnv
/StdGeneric.icl
<<EOPATCH
42 --- StdGeneric.icl 2018-12-17 02:43:55.000000000 +0100
43 +++ StdGeneric.icl 2018-12-17 11:06:09.196234236 +0100
46 bimap{|(->)|} _ ba fr _ f = comp3 fr f ba
50 +binumap{|PAIR|} fx _ fy _ (PAIR x y) = PAIR (fx x) (fy y)
52 +binumap{|EITHER|} fl _ fr _ (LEFT x) = LEFT (fl x)
53 +binumap{|EITHER|} fl _ fr _ (RIGHT x) = RIGHT (fr x)
55 +binumap{|CONS|} fx _ (CONS x) = CONS (fx x)
57 +binumap{|RECORD|} fx _ (RECORD x) = RECORD (fx x)
59 +binumap{|FIELD|} fx _ (FIELD x) = FIELD (fx x)
61 +binumap{|OBJECT|} fx _ (OBJECT x) = OBJECT (fx x)
63 +binumap{|(->)|} _ ba fr _ f = comp3 fr f ba
65 comp3 :: !(.a -> .b) u:(.c -> .a) !(.d -> .c) -> u:(.d -> .b)
70 echo "Adding the iTasks-git environment"
71 patch /opt
/clean
/etc
/IDEEnvs
<<EOPATCH
72 --- IDEEnvs 2018-12-17 11:58:48.876039159 +0100
73 +++ IDEEnvs 2018-12-17 12:00:52.384066455 +0100
75 Path: {Application}/lib/StdEnv
76 Path: {Application}/lib/Dynamics
77 Path: {Application}/lib/TCPIP
78 + Path: {Application}/lib/Gast
79 Path: {Application}/lib/Platform
80 Path: {Application}/lib/Platform/Deprecated/Generics
81 + Path: {Application}/lib/Platform/Deprecated/ArgEnv
82 + Path: {Application}/lib/Platform/Deprecated/MersenneTwister
83 Path: {Application}/lib/Platform/Deprecated/StdLib
84 Path: {Application}/lib/Sapl
85 Path: {Application}/lib/GraphCopy
86 Path: {Application}/lib/iTasks
87 - EnvironmentCompiler: lib/exe/cocl::-dynamics -sapl
88 + EnvironmentCompiler: lib/exe/cocl:-h 500m -s 20m:-dynamics -sapl
89 + EnvironmentCodeGen: lib/exe/cg
90 + EnvironmentLinker: lib/exe/linker|lib/exe/sapl-collector-linker|lib/exe/itasks-web-collector
91 + EnvironmentDynLink: lib/exe/linker
92 + EnvironmentVersion: 920
93 + EnvironmentRedirect: False
94 + EnvironmentCompileMethod: Pers
95 + EnvironmentProcessor: I386
96 + Environment64BitProcessor: True
98 + EnvironmentName: iTasks-git
100 + Path: {Application}/lib/StdEnv
101 + Path: {Application}/lib/Dynamics
102 + Path: {Application}/lib/TCPIP
103 + Path: {Application}/lib/Sapl
104 + Path: {Application}/lib/GraphCopy
105 + Path: {Application}/lib/Gast
106 + Path: /home/mrl/projects/clean/clean-platform/src/libraries/Platform-x86
107 + Path: /home/mrl/projects/clean/clean-platform/src/libraries/OS-Posix
108 + Path: /home/mrl/projects/clean/clean-platform/src/libraries/OS-Linux
109 + Path: /home/mrl/projects/clean/clean-platform/src/libraries/OS-Linux-64
110 + Path: /home/mrl/projects/clean/clean-platform/src/libraries/OS-Independent
111 + Path: /home/mrl/projects/clean/clean-platform/src/libraries/OS-Independent/Deprecated/Generics
112 + Path: /home/mrl/projects/clean/clean-platform/src/libraries/OS-Independent/Deprecated/StdLib
113 + Path: /home/mrl/projects/clean/clean-platform/src/libraries/OS-Independent/Deprecated/ArgEnv
114 + Path: /home/mrl/projects/clean/clean-platform/src/libraries/OS-Independent/Deprecated/MersenneTwister
115 + Path: /home/mrl/projects/clean/iTasks-SDK/Libraries
116 + EnvironmentCompiler: lib/exe/cocl:-h 500m -s 20m:-dynamics -sapl
117 EnvironmentCodeGen: lib/exe/cg
118 EnvironmentLinker: lib/exe/linker|lib/exe/sapl-collector-linker|lib/exe/itasks-web-collector
119 EnvironmentDynLink: lib/exe/linker