-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDSH.cabal
302 lines (276 loc) · 13.4 KB
/
DSH.cabal
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
Name: DSH
Version: 0.13.0.1
Synopsis: Database Supported Haskell
Description:
This is a Haskell library for database-supported program
execution. Using DSH, a relational database management
system (RDBMS) can be used as a coprocessor for the Haskell
programming language, especially for those program fragments that
carry out data-intensive and data-parallel computations.
.
Database executable program fragments can be written using the monad
comprehension notation [2] and list processing combinators from the
Haskell list prelude. Note that rather than embedding a relational
language into Haskell, we turn idiomatic Haskell programs into SQL
queries.
.
DSH faithfully represents list order and nesting, and compiles the
list processing combinators into relational queries. The
implementation avoids unnecessary data transfer and context
switching between the database coprocessor and the Haskell runtime
by ensuring that the number of generated relational queries is only
determined by the program fragment's type and not by the database
size.
.
DSH can be used to allow existing Haskell programs to operate on
large scale data (e.g., larger than the available heap) or query
existing database resident data with Haskell.
.
Note that this package is flagged experimental and therefore is not
suited for production use (we mean it!). This is a proof of concept
implementation only. To learn more about DSH, our paper "The
Flatter, the Better — Query Compilation Based on the Flattening
Transformation." [1] is a recommended reading. The package includes
a couple of examples that demonstrate how to use DSH.
.
The current release does not rely anymore on the loop-lifting
compilation technique and the Pathfinder optimizer. Instead, it
brings a completely rewritten query compiler based on Guy Blelloch's
flattening transformation. This approach leads to a more robust
compilation and produces more efficient query code.
.
To generate actual code for a relational backend, an additional
backend package needs to be installed. Currently, the package
'dsh-sql' on Hackage provides SQL code generation for PostgreSQL.
.
Please read the release notes in 'README.md'.
.
1. <http://db.inf.uni-tuebingen.de/publications/TheFlatter-theBetter-QueryCompilationBasedontheFlatteningTransformation.html>
.
2. <http://db.inf.uni-tuebingen.de/staticfiles/publications/haskell2011.pdf>
License: BSD3
License-file: LICENSE
Author: Alexander Ulrich, George Giorgidze, Jeroen Weijers, Nils Schweinsberg
Maintainer: [email protected]
Stability: Experimental
Category: Database
Build-type: Simple
Extra-source-files: README.md
Cabal-version: >= 1.8
Flag debugcomp
Description: Print debugging information for comprehension rewrites
Default: False
Flag debuggraph
Description: Print debugging information for graph rewrites
Default: False
Library
Build-depends: base >= 4.8 && < 5,
random >= 1.1,
process >= 1.2,
template-haskell >= 2.11,
containers >= 0.5,
mtl >= 2.1,
time >= 1.4,
bytestring >= 0.10,
text >= 1.2,
aeson >= 0.11,
kure >= 2.16,
either >= 4.0,
semigroups >= 0.16,
ansi-wl-pprint >= 0.6.7.2,
dlist >= 0.7,
Decimal >= 0.4,
QuickCheck >= 2.7,
HUnit >= 1.2,
tasty >= 0.11,
tasty-hunit >= 0.9,
tasty-quickcheck >= 0.8,
vector >= 0.10,
hashable >= 1.2,
unordered-containers >= 0.2,
megaparsec >= 5.0,
scientific >= 0.3,
algebra-dag >= 0.1.1
Hs-source-dirs: src
if flag(debuggraph)
CPP-Options: -DDEBUGGRAPH
GHC-Options: -Wall -fno-warn-orphans
Exposed-modules: Database.DSH
Database.DSH.Compiler
Database.DSH.Backend
Database.DSH.Tests
Database.DSH.CL.Parser
Database.DSH.SL
Database.DSH.VSL
Database.DSH.CL
Database.DSH.Common.QueryPlan
Database.DSH.Common.Opt
Database.DSH.Common.Type
Database.DSH.Common.Vector
Database.DSH.Common.Lang
Database.DSH.Common.Impossible
Database.DSH.Common.Pretty
Database.DSH.Common.VectorLang
Database.DSH.Common.Nat
Other-modules: Database.DSH.Frontend.Internals
Database.DSH.Frontend.Externals
Database.DSH.Frontend.TH
Database.DSH.Frontend.TupleTypes
Database.DSH.Frontend.Builtins
Database.DSH.Execute.TH
Database.DSH.Execute
Database.DSH.Common.RewriteM
Database.DSH.Common.Kure
Database.DSH.Common.TH
Database.DSH.CL.Lang
Database.DSH.CL.Typing
Database.DSH.CL.Kure
Database.DSH.CL.Primitives
Database.DSH.CL.Opt
Database.DSH.CL.Desugar
Database.DSH.CL.Opt.Auxiliary
Database.DSH.CL.Opt.PostProcess
Database.DSH.CL.Opt.LoopInvariant
Database.DSH.CL.Opt.LetFloating
Database.DSH.CL.Opt.PredPushdown
Database.DSH.CL.Opt.JoinPushdown
Database.DSH.CL.Opt.Normalize
Database.DSH.CL.Opt.CompNormalization
Database.DSH.CL.Opt.PartialEval
Database.DSH.CL.Opt.FlatJoin
Database.DSH.CL.Opt.ThetaJoin
Database.DSH.CL.Opt.SemiJoin
Database.DSH.CL.Opt.AntiJoin
Database.DSH.CL.Opt.NestJoin
Database.DSH.CL.Opt.Resugar
Database.DSH.CL.Opt.GroupJoin
Database.DSH.CL.Opt.GroupAggr
Database.DSH.CL.Opt.FoldGroup
Database.DSH.CL.Opt.ProjectionPullup
Database.DSH.FKL.Lang
Database.DSH.FKL.Typing
Database.DSH.FKL.Primitives
Database.DSH.FKL.Rewrite
Database.DSH.FKL.Kure
Database.DSH.NKL.Lang
Database.DSH.NKL.Typing
Database.DSH.NKL.Kure
Database.DSH.NKL.Rewrite
Database.DSH.NKL.Primitives
Database.DSH.Translate.Frontend2CL
Database.DSH.Translate.CL2NKL
Database.DSH.Translate.NKL2FKL
Database.DSH.Translate.SL2Algebra
Database.DSH.Translate.VSL2Algebra
Database.DSH.Translate.Vectorize
Database.DSH.SL.Lang
Database.DSH.SL.Typing
Database.DSH.SL.Render.Dot
Database.DSH.SL.SegmentAlgebra
Database.DSH.SL.Builtins
Database.DSH.SL.Construct
Database.DSH.SL.Vectorize
Database.DSH.VSL.Lang
Database.DSH.VSL.Builtins
Database.DSH.VSL.Dot
Database.DSH.VSL.Construct
Database.DSH.VSL.VirtualSegmentAlgebra
Database.DSH.VSL.Vectorize
Database.DSH.SL.Opt.Properties.BottomUp
Database.DSH.SL.Opt.Properties.Card
Database.DSH.SL.Opt.Properties.Segments
Database.DSH.SL.Opt.Properties.Common
-- Database.DSH.SL.Opt.Properties.Const
Database.DSH.SL.Opt.Properties.Empty
Database.DSH.SL.Opt.Properties.TopDown
Database.DSH.SL.Opt.Properties.Types
-- Database.DSH.SL.Opt.Properties.VectorType
Database.DSH.SL.Opt.OptimizeSL
Database.DSH.SL.Opt.Rewrite.Common
Database.DSH.SL.Opt.Rewrite.Projections
Database.DSH.SL.Opt.Rewrite.PruneEmpty
Database.DSH.SL.Opt.Rewrite.Redundant
Database.DSH.SL.Opt.Rewrite.Aggregation
Database.DSH.SL.Opt.Rewrite.Window
Database.DSH.SL.Opt.Rewrite.Unused
Database.DSH.VSL.Opt.Properties.BottomUp
Database.DSH.VSL.Opt.Properties.Card
Database.DSH.VSL.Opt.Properties.Segments
Database.DSH.VSL.Opt.Properties.Common
-- Database.DSH.VSL.Opt.Properties.Const
Database.DSH.VSL.Opt.Properties.Empty
Database.DSH.VSL.Opt.Properties.TopDown
Database.DSH.VSL.Opt.Properties.Types
-- Database.DSH.VSL.Opt.Properties.VectorType
Database.DSH.VSL.Opt.OptimizeVSL
Database.DSH.VSL.Opt.Rewrite.Common
Database.DSH.VSL.Opt.Rewrite.Expressions
Database.DSH.VSL.Opt.Rewrite.PruneEmpty
Database.DSH.VSL.Opt.Rewrite.Redundant
Database.DSH.VSL.Opt.Rewrite.Aggregation
-- Database.DSH.VSL.Opt.Rewrite.Window
Database.DSH.VSL.Opt.Rewrite.Unused
Database.DSH.Tests.Common
Database.DSH.Tests.ComprehensionTests
Database.DSH.Tests.LawTests
Database.DSH.Tests.CombinatorTests
Database.DSH.Tests.DSHComprehensions
executable sldot
Main-is: Database/DSH/Tools/SLDotGen.hs
GHC-Options: -Wall -fno-warn-orphans
hs-source-dirs: src
build-depends: base >= 4.8 && < 5,
mtl >= 2.1,
aeson >= 0.11,
time >= 1.4,
containers >= 0.5,
template-haskell >= 2.11,
bytestring >= 0.10,
Decimal >= 0.4,
ansi-wl-pprint >= 0.6.7.2,
semigroups >= 0.16,
text >= 1.2,
scientific >= 0.3,
vector >= 0.10,
algebra-dag >= 0.1
other-modules: Database.DSH.Common.Impossible
Database.DSH.Common.Lang
Database.DSH.Common.Nat
Database.DSH.Common.Pretty
Database.DSH.Common.Type
Database.DSH.Common.VectorLang
Database.DSH.SL.Lang
Database.DSH.SL.Render.Dot
GHC-Options: -Wall -fno-warn-orphans
other-extensions: TemplateHaskell
executable vsldot
Main-is: Database/DSH/Tools/VSLDotGen.hs
GHC-Options: -Wall -fno-warn-orphans
hs-source-dirs: src
build-depends: base >= 4.8 && < 5,
mtl >= 2.1,
aeson >= 0.11,
time >= 1.4,
containers >= 0.5,
template-haskell >= 2.11,
bytestring >= 0.10,
Decimal >= 0.4,
ansi-wl-pprint >= 0.6.7.2,
semigroups >= 0.16,
text >= 1.2,
scientific >= 0.3,
vector >= 0.10,
algebra-dag >= 0.1
other-modules: Database.DSH.Common.Impossible
Database.DSH.Common.Lang
Database.DSH.Common.Nat
Database.DSH.Common.Pretty
Database.DSH.Common.VectorLang
Database.DSH.Common.Type
Database.DSH.VSL.Lang
Database.DSH.VSL.Dot
GHC-Options: -Wall -fno-warn-orphans
other-extensions: TemplateHaskell
source-repository head
type: git
location: https://github.com/ulricha/dsh