-
Notifications
You must be signed in to change notification settings - Fork 2
/
hlogo.cabal
220 lines (194 loc) · 6 KB
/
hlogo.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
name: hlogo
version: 0.2.0
license: BSD3
license-file: LICENSE
author: Nikolaos Bezirgiannis <bezirgia@cwi.nl>, Wishnu Prasetya <s.w.b.prasetya@uu.nl>, Ilias Sakellariou <iliass@uom.gr>
maintainer: Nikolaos Bezirgiannis <bezirgia@cwi.nl>
copyright: Copyright (c) 2013-2016
homepage: http://bezirg.github.io/hlogo
bug-reports: https://github.com/bezirg/hlogo/issues
stability: provisional
tested-with: GHC == 8.0.2, GHC == 8.2.2
build-type: Simple
cabal-version: >= 1.8
category: Simulation
synopsis: HLogo, a simulation framework in Haskell
description: Input programs are written in a dialect of Logo, as an embedded DSL of Haskell.
extra-source-files:
README.md
source-repository head
type: git
location: git://github.com/bezirg/hlogo.git
branch: master
Flag stats-stm
Description: When on, it collects runtime statistics for total and succesful stm rollbacks. To print the collected statistics use the HLogo's 'stats_stm' primitive"
Default: False
library
build-depends:
-- supporting GHC>=8
base>=4.9 && <5,
-- link-set are a Map (Int,Int), world-turtle-set are IntMap
containers>=0.5.0.0,
-- for now: turtles-own, patches-own,links-own stored in a static (=fixed at compile-time) array
-- patch-set are a 1-dim array
vector,
-- for adding a context (self,myself,randomgen) reader ontop of stm
transformers>=0.4,
-- for random-related functions of stdlib
random, splitmix,
-- for timer functions of stdlib
time,
-- for top-level macros (globals,patches-own,breed definition,etc)
template-haskell,
-- For concurrency (non-deterministic)
stm,
-- For concurrent threads management
threads,
-- For visualization
diagrams-lib>=1.3,
diagrams-postscript,
colour,
-- for command-line setting the World 2d-space options (max-pxcor, world wrapping)
cmdargs
exposed-modules:
Language.Logo
other-modules:
Language.Logo.Base,
Language.Logo.Core,
Language.Logo.Keyword,
Language.Logo.Prim,
Language.Logo.Exception
Language.Logo.CmdOpt
ghc-options: -Wall -fno-ignore-asserts -Wno-orphans -Wno-unused-pattern-binds
if flag(stats-stm)
cpp-options: -DSTATS_STM
build-depends: atomic-primops
hs-source-dirs: src
-- TEST SUITE
-------------
test-suite unit
type: exitcode-stdio-1.0
main-is: unit.hs
other-modules:
AgentsetBuilding,
Agentsets,
AnyAll,
Ask,
BooleanOperators,
Breeds,
CanMove,
ComparingAgents,
ControlStructures,
Timer,
Utility
build-depends:
base,
hlogo,
HUnit,
tasty,
tasty-hunit,
tasty-html,
transformers
ghc-options: -fno-ignore-asserts -threaded "-with-rtsopts=-N2"
hs-source-dirs: tests
-- BENCHMARKS
-------------
benchmark bureaucrats
type: exitcode-stdio-1.0
main-is: Bureaucrats.hs
build-depends: base, hlogo, vector
ghc-options: -threaded "-with-rtsopts=-t --machine-readable"
hs-source-dirs: bench/hlogo
benchmark dummy
type: exitcode-stdio-1.0
main-is: Dummy.hs
build-depends: base, hlogo
ghc-options: -threaded "-with-rtsopts=-t --machine-readable"
hs-source-dirs: bench/hlogo
-- benchmark evacuation
-- type: exitcode-stdio-1.0
-- main-is: Evacuation.hs
-- build-depends: base, hlogo
-- ghc-options: -threaded "-with-rtsopts=-t --machine-readable"
-- hs-source-dirs: bench/hlogo
benchmark fire
type: exitcode-stdio-1.0
main-is: Fire.hs
build-depends: base, hlogo
ghc-options: -threaded "-with-rtsopts=-t --machine-readable"
hs-source-dirs: bench/hlogo
-- benchmark flocking
-- type: exitcode-stdio-1.0
-- main-is: Flocking.hs
-- build-depends: base, hlogo
-- ghc-options: -threaded "-with-rtsopts=-t --machine-readable"
-- hs-source-dirs: bench/hlogo
benchmark fwdback
type: exitcode-stdio-1.0
main-is: FwdBack.hs
build-depends: base, hlogo
ghc-options: -threaded "-with-rtsopts=-t --machine-readable"
hs-source-dirs: bench/hlogo
benchmark gameoflife
type: exitcode-stdio-1.0
main-is: GameOfLife.hs
build-depends: base, hlogo
extensions: DoAndIfThenElse
ghc-options: -threaded "-with-rtsopts=-t --machine-readable"
hs-source-dirs: bench/hlogo
benchmark termites
type: exitcode-stdio-1.0
main-is: Termites.hs
build-depends: base, hlogo
extensions: DoAndIfThenElse
ghc-options: -threaded "-with-rtsopts=-t --machine-readable"
hs-source-dirs: bench/hlogo
-- benchmark heatbugs
-- type: exitcode-stdio-1.0
-- main-is: Heatbugs.hs
-- build-depends: base, hlogo
-- ghc-options: -threaded "-with-rtsopts=-t --machine-readable"
-- hs-source-dirs: bench/hlogo
benchmark ising
type: exitcode-stdio-1.0
main-is: Ising.hs
build-depends: base, hlogo
ghc-options: -threaded "-with-rtsopts=-t --machine-readable"
hs-source-dirs: bench/hlogo
benchmark isingpar
type: exitcode-stdio-1.0
main-is: IsingPar.hs
build-depends: base, hlogo
ghc-options: -threaded "-with-rtsopts=-t --machine-readable"
hs-source-dirs: bench/hlogo
-- benchmark pa
-- type: exitcode-stdio-1.0
-- main-is: Preferential_Attachment.hs
-- build-depends: base, hlogo
-- ghc-options: -threaded "-with-rtsopts=-t --machine-readable"
-- hs-source-dirs: bench/hlogo
benchmark redblue
type: exitcode-stdio-1.0
main-is: RedBlue.hs
build-depends: base, hlogo
ghc-options: -threaded "-with-rtsopts=-t --machine-readable"
--cpp-options: -DNR_TURTLES=1000
hs-source-dirs: bench/hlogo
benchmark sheep
type: exitcode-stdio-1.0
main-is: Sheep.hs
build-depends: base, hlogo
ghc-options: -threaded "-with-rtsopts=-t --machine-readable"
--cpp-options: -DNR_SHEEP=100
hs-source-dirs: bench/hlogo
-- IMPLEMENTATION DECISION MICROBENCHMARKS
-- turned off, only for experimenting
-- benchmark createTurtles
-- type: exitcode-stdio-1.0
-- main-is: createTurtles.hs
-- build-depends:
-- base,
-- containers,
-- criterion
-- hs-source-dirs: bench/impl
-- ghc-options: -O -fno-ignore-asserts -threaded "-with-rtsopts=-N4"