copar.cabal 14.4 KB
Newer Older
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
1
name:                copar
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
2 3 4
version:             0.1.0.0
-- synopsis:
-- description:
5 6
license:             GPL-3
license-file:        LICENSE
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
7 8 9 10
author:              Hans-Peter Deifel
maintainer:          hans-peter.deifel@fau.de
-- copyright:
-- category:
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
11 12
build-type:          Simple
cabal-version:       >=2.0
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
13

14 15
flag release
  description:         Disable sanity checks for more speed and less safety
16
  default:             False
17

18 19
flag benchmark-generators
  description:         Build executables used to generated/convert various benchmark suites
20
  default:             False
21

Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
22 23 24
library
  hs-source-dirs:      src
  exposed-modules:     Data.MorphismEncoding
25 26
                     , Data.RefinablePartition
                     , Data.Vector.Unboxed.Mutable.Utils
27
                     , Data.Vector.Utils
28
                     , Data.Algorithm.PossibleMajorityCandidate
29
                     , Data.BlockQueue
30
                     , Data.Partition
31
                     , Data.Partition.Common
32
                     , Data.OpenUnion
33
                     , Data.Float.Utils
34
                     , Data.List.Utils
35
                     , Data.Text.Prettyprint
36
                     , Data.SumBag
37
                     , Data.Bits.Monoid
38 39 40
                     , Copar.RefinementInterface
                     , Copar.Functors
                     , Copar.FunctorDescription
41
                     , Copar.FunctorPrinter
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
                     , Copar.Functors.Powerset
                     , Copar.Functors.Bag
                     , Copar.Functors.GroupValued
                     , Copar.Functors.MonoidValued
                     , Copar.Functors.Distribution
                     , Copar.Functors.Polynomial
                     , Copar.Functors.AbsorbingPolynomial
                     , Copar.Functors.SomeFunctor
                     , Copar.Parser
                     , Copar.Parser.Lexer
                     , Copar.Parser.Types
                     , Copar.Algorithm
                     , Copar.Algorithm.Types
                     , Copar.Algorithm.Initialize
                     , Copar.Algorithm.Split
                     , Copar.FunctorExpression.Type
                     , Copar.FunctorExpression.Parser
                     , Copar.FunctorExpression.Sorts
                     , Copar.FunctorExpression.Desorting
                     , Copar.FunctorExpression.Transform
                     , Copar.Coalgebra.Parser
                     , Copar.Coalgebra.Parser.Class
                     , Copar.Coalgebra.Parser.Internal
                     , Copar.PartitionPrinter
                     , Copar.Dot
                     , Copar.PrettyShow
                     , Copar.RewriteFunctors
69
                     , Copar.Timing
70 71 72 73 74 75 76 77 78
  default-extensions:  GADTs
                     , StandaloneDeriving
                     , DeriveFunctor
                     , DeriveFoldable
                     , DeriveTraversable
                     , TypeFamilies
                     , InstanceSigs
                     , OverloadedStrings
                     , TupleSections
79
                     , LambdaCase
80 81 82
                     , ScopedTypeVariables
                     , TypeApplications
                     , RankNTypes
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
83
  default-language:    Haskell2010
84
  build-depends:       base >= 4.11
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
85
                     , bytestring
86
                     , containers
87
                     , deepseq
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
88
                     , deriving-compat
89
                     , extra
90
                     , ieee754 >= 0.8.0 && <0.9
91
                     , megaparsec >= 7 && <9
92 93 94 95 96 97
                     , microlens
                     , microlens-platform
                     , microlens-th
                     , mtl
                     , prettyprinter >= 1.2.1
                     , prettyprinter-ansi-terminal >= 1.1.1.2
98
                     , primitive >= 0.6.4 && <0.8
99
                     , scientific >= 0.3.6 && < 0.4
100 101 102 103 104
                     , text
                     , unordered-containers
                     , vector
                     , vector-algorithms
                     , vector-th-unbox >= 0.2 && <0.3
105
  ghc-options:         -Wall -Wno-name-shadowing
106
  if flag(release)
107
    cpp-options:       -DRELEASE
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
108

Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
109
executable copar
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
110
  main-is:             Main.hs
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
111
  build-depends:       base >=4.11 && <4.13
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
112
  hs-source-dirs:      src/main
113 114
  other-modules:       Hardwired
                     , Stats
115 116
  default-extensions:  ScopedTypeVariables
                     , TypeApplications
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
117
  default-language:    Haskell2010
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
118
  build-depends:       copar
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
119 120 121 122
                     , containers
                     , text
                     , vector
                     , bytestring
123
                     , deepseq
124
                     , optparse-applicative
125
                     , json
126
                     , scientific >= 0.3.6 && < 0.4
127
                     , megaparsec >= 7 && <9
128 129 130
                     , prettyprinter
                     , prettyprinter-ansi-terminal
                     , prettyprinter-convert-ansi-wl-pprint
131
                     , pretty-show >= 1.7 && <1.10
132 133 134 135 136 137 138

test-suite spec
  type:                exitcode-stdio-1.0
  hs-source-dirs:      tests
  main-is:             Spec.hs
  other-modules:       Data.RefinablePartitionSpec
                     , Data.Vector.Unboxed.Mutable.UtilsSpec
139
                     , Data.Algorithm.PossibleMajorityCandidateSpec
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
140
                     , Data.BlockQueueSpec
141
                     , Data.PartitionSpec
142
                     , Data.OpenUnionSpec
143
                     , Data.List.UtilsSpec
144
                     , Data.Float.UtilsSpec
145
                     , Data.SumBagSpec
146
                     , Data.Bits.MonoidSpec
147 148 149 150 151 152 153 154 155
                     , Copar.Functors.PowersetSpec
                     , Copar.Functors.GroupValuedSpec
                     , Copar.Functors.BagSpec
                     , Copar.Functors.DistributionSpec
                     , Copar.Functors.PolynomialSpec
                     , Copar.Functors.MonoidValuedSpec
                     , Copar.Functors.AbsorbingPolynomialSpec
                     , Copar.FunctorExpression.ParserSpec
                     , Copar.FunctorExpression.SortsSpec
156
                     , Copar.FunctorPrinterSpec
157
                     , Copar.Coalgebra.ParserSpec
158
                     , Copar.ParserSpec
159 160 161
                     , Copar.Parser.LexerSpec
                     , Copar.Algorithm.InitializeSpec
                     , Copar.Algorithm.SplitSpec
162
                     , TestHelpers
163
  default-language:    Haskell2010
164 165 166 167 168 169 170 171 172
  default-extensions:  GADTs
                     , StandaloneDeriving
                     , DeriveFunctor
                     , DeriveFoldable
                     , DeriveTraversable
                     , TypeFamilies
                     , InstanceSigs
                     , OverloadedStrings
                     , TupleSections
173 174 175
                     , ScopedTypeVariables
                     , TypeApplications
                     , RankNTypes
176
  build-depends:       base >= 4.11
177 178
                     , hspec
                     , QuickCheck
179
                     , quickcheck-classes >= 0.6 && <0.7
180
                     , vector
181
                     , vector-algorithms
182 183
                     , bytestring
                     , text
184 185
                     , megaparsec >= 7 && <9
                     , hspec-megaparsec ^>= 2.0 || ^>= 2.1
186
                     , microlens-platform
187 188
                     , unordered-containers
                     , containers
189
                     , mtl
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
190
                     , copar
191
  build-tool-depends: hspec-discover:hspec-discover ==2.*
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
192

Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
193 194 195 196 197 198 199 200 201 202 203 204 205

-- FIXME: doctests are currently disabled because cabal-doctest requires a
-- custom build-type and cabal 2.4 doesn't support custom bulid types together
-- with multiple internal libraries.
--
-- test-suite doctests
--   type:                exitcode-stdio-1.0
--   hs-source-dirs:      tests
--   main-is:             DocTests.hs
--   default-language:    Haskell2010
--   build-depends:       base >= 4.11
--                      , copar
--                      , doctest
206 207 208 209 210 211

test-suite examples
  type:                exitcode-stdio-1.0
  hs-source-dirs:      tests
  main-is:             Examples.hs
  default-language:    Haskell2010
212
  build-depends:       base >= 4.11
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
213
                     , copar
214 215 216
                     , hspec
                     , directory
                     , text
217
                     , extra
218 219 220 221 222

benchmark bench
  type:                exitcode-stdio-1.0
  hs-source-dirs:      bench
  main-is:             BenchMain.hs
223 224 225
  other-modules:       Copar.Coalgebra.BenchParser
                     , Copar.Functors.BenchGroupValued
                     , Copar.Parser.BenchLexer
226
                     , Data.List.BenchUtils
227
                     , Copar.Algorithm.BenchInitialize
228
                     , Data.BenchRefinablePartition
229
                     , Data.BenchBlockQueue
230
                     , Data.BenchSumBag
231 232 233 234 235 236 237 238 239 240 241 242
  default-extensions:  GADTs
                     , StandaloneDeriving
                     , DeriveFunctor
                     , DeriveFoldable
                     , DeriveTraversable
                     , TypeFamilies
                     , InstanceSigs
                     , OverloadedStrings
                     , TupleSections
                     , ScopedTypeVariables
                     , TypeApplications
                     , RankNTypes
243
  build-depends:       base >= 4.11
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
244
                     , copar
245 246
                     , criterion
                     , text
247
                     , megaparsec >= 7 && <9
248
                     , deepseq
249 250
                     , vector
                     , mtl
251 252
  default-language:    Haskell2010
  ghc-options:         -Wall
253

254
library prism-converter-lib
255
  hs-source-dirs:      src/prism-converter/lib
256
  exposed-modules:     Parser
257
                     , MarkovChain
258
                     , Mdp
259
                     , Mdp.Types
260
                     , StatesFile
261
                     , Mdp.Mcrl2
262
  default-language:    Haskell2010
263
  build-depends:       base >= 4.11
264
                     , containers ^>= 0.6
265
                     , megaparsec ^>= 7 || ^>= 8
266 267 268 269 270 271
                     , microlens ^>= 0.4.10
                     , microlens-platform ^>= 0.3.11
                     , microlens-th ^>= 0.4.2
                     , text ^>= 1.2.3
                     , vector ^>= 0.12
                     , vector-algorithms ^>= 0.8.0.1
272
  ghc-options:         -Wall -Wno-name-shadowing
273 274 275 276
  if !flag(benchmark-generators)
    buildable:       False

executable prism-converter
277
  hs-source-dirs:      src/prism-converter
278 279 280 281 282
  main-is:             Main.hs
  default-language:    Haskell2010
  build-depends:       base >= 4.11
                     , prism-converter-lib
                     , containers ^>= 0.6
283
                     , megaparsec ^>= 7 || ^>= 8
284 285 286 287 288
                     , optparse-applicative ^>= 0.14.3
                     , prettyprinter ^>= 1.2 || ^>= 1.3
                     , prettyprinter-ansi-terminal ^>= 1.1
                     , prettyprinter-convert-ansi-wl-pprint ^>= 1.1
                     , text ^>= 1.2.3
289
  ghc-options:         -Wall -Wno-name-shadowing
290 291 292 293 294 295 296 297 298 299 300 301 302
  if !flag(benchmark-generators)
    buildable:       False

test-suite prism-converter-tests
  type:                exitcode-stdio-1.0
  hs-source-dirs:      src/prism-converter
  main-is:             Tests.hs
  default-language:    Haskell2010
  build-depends:       base >= 4.11
                     , hspec >= 2.6 && <2.8
                     , microlens-platform ^>= 0.3.11
                     , prism-converter-lib
                     , vector ^>= 0.12.0.2
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
303
                     , text ^>= 1.2.3
304
  ghc-options:         -Wall -Wno-name-shadowing
305 306
  if !flag(benchmark-generators)
    buildable:       False
307 308 309 310 311 312 313

executable random-dfa
  hs-source-dirs:      src/random-dfa
  main-is:             Main.hs
  other-modules:       Type
                     , CoalgOutput
                     , DotOutput
314
                     , ValmariOutput
315 316 317
  default-language:    Haskell2010
  default-extensions:  OverloadedStrings
                     , LambdaCase
318 319 320
                     , MultiParamTypeClasses
                     , FlexibleInstances
                     , FunctionalDependencies
321
  build-depends:       base >= 4.11
322 323 324 325 326 327
                     , vector
                     , microlens
                     , microlens-th
                     , microlens-platform
                     , random
                     , text
328
                     , optparse-applicative
329 330
  if !flag(benchmark-generators)
    buildable:       False
331 332 333 334
    
library random-wta-lib
  hs-source-dirs:      src/random-wta/lib
  exposed-modules:     Types
335 336
                     , Generator
                     , Output
337
                     , Probability
338
                     , IndexedTransition
339
                     , Hoegberg
340 341 342 343 344 345 346
  default-language:    Haskell2010
  default-extensions:  OverloadedStrings
                     , LambdaCase
                     , MultiParamTypeClasses
                     , FlexibleInstances
                     , FunctionalDependencies
  build-depends:       base >= 4.11
347 348
                     , vector >= 0.12 && <0.13
                     , text >= 1.2 && <1.3
349 350
                     , random >= 1.1 && <1.2
                     , mtl >= 2.2 && <2.3
351
                     , megaparsec >= 7 && <9
352
                     , scientific >= 0.3 && <0.4
353
                     , containers >= 0.6 && <0.7
354 355 356 357 358 359 360 361 362 363 364 365
  ghc-options:         -Wall -Wno-name-shadowing
  if !flag(benchmark-generators)
    buildable:       False

executable random-wta
  hs-source-dirs:      src/random-wta
  main-is:             Main.hs
  default-language:    Haskell2010
  default-extensions:  OverloadedStrings
  build-depends:       base >= 4.11
                     , random-wta-lib
                     , optparse-applicative
366 367 368
                     , prettyprinter >= 1.2.1
                     , prettyprinter-ansi-terminal >= 1.1.1.2
                     , prettyprinter-convert-ansi-wl-pprint
369 370 371
                     , vector >= 0.12 && <0.13
                     , text >= 1.2 && <1.3
                     , random >= 1.1 && <1.2
372
                     , megaparsec >= 7 && <9
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
373
  ghc-options:         -Wall -Wno-name-shadowing
374 375
  if !flag(benchmark-generators)
    buildable:       False
376 377 378 379 380 381 382

test-suite random-wta-tests
  type:                exitcode-stdio-1.0
  hs-source-dirs:      src/random-wta
  main-is:             Tests.hs
  default-language:    Haskell2010
  build-depends:       base >= 4.11
383
                     , random-wta-lib
384
                     , vector >= 0.12 && <0.13
385 386
                     , hspec >= 2.6 && <2.8
                     , QuickCheck >= 2.12 && <2.14
Hans-Peter Deifel's avatar
Hans-Peter Deifel committed
387
  ghc-options:         -Wall -Wno-name-shadowing
388 389
  if !flag(benchmark-generators)
    buildable:       False