Skip to content

Commit 8fc97a0

Browse files
committed
refactoring: split literate-unitb into
* literate-unitb-verifier * literate-unitb-synthesis * literate-unitb-docs * literate-unitb-cli
1 parent 2470e0f commit 8fc97a0

File tree

844 files changed

+2347
-512
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

844 files changed

+2347
-512
lines changed

.travis.yml

+35-14
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ cache:
2929
- $HOME/build/unitb/literate-unitb-complete/literate-unitb-logic/.stack-work/
3030
- $HOME/build/unitb/literate-unitb-complete/literate-unitb-scripts/.stack-work/
3131
- $HOME/build/unitb/literate-unitb-complete/literate-unitb-utils/.stack-work/
32-
- $HOME/build/unitb/literate-unitb-complete/literate-unitb/.stack-work/
32+
- $HOME/build/unitb/literate-unitb-complete/literate-unitb-verifier/.stack-work/
33+
- $HOME/build/unitb/literate-unitb-complete/literate-unitb-cli/.stack-work/
34+
- $HOME/build/unitb/literate-unitb-complete/literate-unitb-docs/.stack-work/
35+
- $HOME/build/unitb/literate-unitb-complete/literate-unitb-synthesis/.stack-work/
3336
- $HOME/build/unitb/literate-unitb-complete/syntax-error/.stack-work/
3437
- $HOME/build/unitb/literate-unitb-complete/unitb-testing/.stack-work/
3538
- $HOME/build/unitb/literate-unitb-complete/libs/bipartite-graph/.stack-work/
@@ -182,85 +185,103 @@ jobs:
182185
compiler: ": #stack default"
183186
addons: {apt: {packages: [libgmp-dev]}}
184187
script:
185-
- travis_long stack --no-terminal $ARGS build literate-unitb --bench --no-run-benchmarks
188+
- travis_long stack --no-terminal $ARGS build literate-unitb-verifier literate-unitb-docs literate-unitb-synthesis literate-unitb-cli --bench --no-run-benchmarks
186189

187190
- env: BUILD=stack ARGS="--stack-yaml stack-lts-3.yaml"
188191
compiler: ": #stack 7.10.2"
189192
addons: {apt: {packages: [libgmp-dev]}}
190193
script:
191-
- travis_long stack --no-terminal $ARGS build literate-unitb --bench --no-run-benchmarks
194+
- travis_long stack --no-terminal $ARGS build literate-unitb-verifier literate-unitb-docs literate-unitb-synthesis literate-unitb-cli --bench --no-run-benchmarks
192195

193196
- env: BUILD=stack ARGS="--stack-yaml stack-lts-6.yaml"
194197
compiler: ": #stack 7.10.3"
195198
addons: {apt: {packages: [libgmp-dev]}}
196199
script:
197-
- travis_long stack --no-terminal $ARGS build literate-unitb --bench --no-run-benchmarks
200+
- travis_long stack --no-terminal $ARGS build literate-unitb-verifier literate-unitb-docs literate-unitb-synthesis literate-unitb-cli --bench --no-run-benchmarks
198201

199202
- env: BUILD=stack ARGS="--stack-yaml stack-lts-7.yaml"
200203
compiler: ": #stack 8.0.1"
201204
addons: {apt: {packages: [libgmp-dev]}}
202205
script:
203-
- travis_long stack --no-terminal $ARGS build literate-unitb --bench --no-run-benchmarks
206+
- travis_long stack --no-terminal $ARGS build literate-unitb-verifier literate-unitb-docs literate-unitb-synthesis literate-unitb-cli --bench --no-run-benchmarks
204207

205208
- env: BUILD=stack ARGS="--stack-yaml stack-lts-8.yaml"
206209
compiler: ": #stack 8.0.2"
207210
addons: {apt: {packages: [libgmp-dev]}}
208211
script:
209-
- travis_long stack --no-terminal $ARGS build literate-unitb --bench --no-run-benchmarks
212+
- travis_long stack --no-terminal $ARGS build literate-unitb-verifier literate-unitb-docs literate-unitb-synthesis literate-unitb-cli --bench --no-run-benchmarks
210213

211214
- env: BUILD=stack ARGS="--stack-yaml stack-nightly.yaml --resolver nightly"
212215
compiler: ": #stack nightly"
213216
addons: {apt: {packages: [libgmp-dev]}}
214217
script:
215-
- travis_long stack --no-terminal $ARGS build literate-unitb --bench --no-run-benchmarks
218+
- travis_long stack --no-terminal $ARGS build literate-unitb-verifier literate-unitb-docs literate-unitb-synthesis literate-unitb-cli --bench --no-run-benchmarks
216219

217220
- stage: Test Literate Unit-B
218221
env: BUILD=stack ARGS=""
219222
compiler: ": #stack default"
220223
addons: {apt: {packages: [libgmp-dev]}}
221224
script:
222225
- unitb-option --capacity $Z3_CAPACITY --hard-timeout $Z3_HARD_TIMEOUT --default-timeout $Z3_DEFAULT_TIMEOUT
223-
- travis_long stack --no-terminal $ARGS test literate-unitb --bench --no-run-benchmarks
226+
- travis_long stack --no-terminal $ARGS test literate-unitb-verifier --bench --no-run-benchmarks
227+
- travis_long stack --no-terminal $ARGS test literate-unitb-docs --bench --no-run-benchmarks
228+
- travis_long stack --no-terminal $ARGS test literate-unitb-synthesis --bench --no-run-benchmarks
229+
- travis_long stack --no-terminal $ARGS test literate-unitb-cli --bench --no-run-benchmarks
224230

225231
- env: BUILD=stack ARGS="--stack-yaml stack-lts-3.yaml"
226232
compiler: ": #stack 7.10.2"
227233
addons: {apt: {packages: [libgmp-dev]}}
228234
script:
229235
- unitb-option --capacity $Z3_CAPACITY --hard-timeout $Z3_HARD_TIMEOUT --default-timeout $Z3_DEFAULT_TIMEOUT
230-
- travis_long stack --no-terminal $ARGS test literate-unitb --bench --no-run-benchmarks
236+
- travis_long stack --no-terminal $ARGS test literate-unitb-verifier --bench --no-run-benchmarks
237+
- travis_long stack --no-terminal $ARGS test literate-unitb-docs --bench --no-run-benchmarks
238+
- travis_long stack --no-terminal $ARGS test literate-unitb-synthesis --bench --no-run-benchmarks
239+
- travis_long stack --no-terminal $ARGS test literate-unitb-cli --bench --no-run-benchmarks
231240

232241
- env: BUILD=stack ARGS="--stack-yaml stack-lts-6.yaml"
233242
compiler: ": #stack 7.10.3"
234243
addons: {apt: {packages: [libgmp-dev]}}
235244
script:
236245
- unitb-option --capacity $Z3_CAPACITY --hard-timeout $Z3_HARD_TIMEOUT --default-timeout $Z3_DEFAULT_TIMEOUT
237-
- travis_long stack --no-terminal $ARGS test literate-unitb --bench --no-run-benchmarks
246+
- travis_long stack --no-terminal $ARGS test literate-unitb-verifier --bench --no-run-benchmarks
247+
- travis_long stack --no-terminal $ARGS test literate-unitb-docs --bench --no-run-benchmarks
248+
- travis_long stack --no-terminal $ARGS test literate-unitb-synthesis --bench --no-run-benchmarks
249+
- travis_long stack --no-terminal $ARGS test literate-unitb-cli --bench --no-run-benchmarks
238250

239251
- env: BUILD=stack ARGS="--stack-yaml stack-lts-7.yaml"
240252
compiler: ": #stack 8.0.1"
241253
addons: {apt: {packages: [libgmp-dev]}}
242254
script:
243255
- unitb-option --capacity $Z3_CAPACITY --hard-timeout $Z3_HARD_TIMEOUT --default-timeout $Z3_DEFAULT_TIMEOUT
244-
- travis_long stack --no-terminal $ARGS test literate-unitb --bench --no-run-benchmarks
256+
- travis_long stack --no-terminal $ARGS test literate-unitb-verifier --bench --no-run-benchmarks
257+
- travis_long stack --no-terminal $ARGS test literate-unitb-docs --bench --no-run-benchmarks
258+
- travis_long stack --no-terminal $ARGS test literate-unitb-synthesis --bench --no-run-benchmarks
259+
- travis_long stack --no-terminal $ARGS test literate-unitb-cli --bench --no-run-benchmarks
245260

246261
- env: BUILD=stack ARGS="--stack-yaml stack-lts-8.yaml"
247262
compiler: ": #stack 8.0.2"
248263
addons: {apt: {packages: [libgmp-dev]}}
249264
script:
250265
- unitb-option --capacity $Z3_CAPACITY --hard-timeout $Z3_HARD_TIMEOUT --default-timeout $Z3_DEFAULT_TIMEOUT
251-
- travis_long stack --no-terminal $ARGS test literate-unitb --bench --no-run-benchmarks
266+
- travis_long stack --no-terminal $ARGS test literate-unitb-verifier --bench --no-run-benchmarks
267+
- travis_long stack --no-terminal $ARGS test literate-unitb-docs --bench --no-run-benchmarks
268+
- travis_long stack --no-terminal $ARGS test literate-unitb-synthesis --bench --no-run-benchmarks
269+
- travis_long stack --no-terminal $ARGS test literate-unitb-cli --bench --no-run-benchmarks
252270

253271
- env: BUILD=stack ARGS="--stack-yaml stack-nightly.yaml --resolver nightly"
254272
compiler: ": #stack nightly"
255273
addons: {apt: {packages: [libgmp-dev]}}
256274
script:
257275
- unitb-option --capacity $Z3_CAPACITY --hard-timeout $Z3_HARD_TIMEOUT --default-timeout $Z3_DEFAULT_TIMEOUT
258-
- travis_long stack --no-terminal $ARGS test literate-unitb --bench --no-run-benchmarks
276+
- travis_long stack --no-terminal $ARGS test literate-unitb-verifier --bench --no-run-benchmarks
277+
- travis_long stack --no-terminal $ARGS test literate-unitb-docs --bench --no-run-benchmarks
278+
- travis_long stack --no-terminal $ARGS test literate-unitb-synthesis --bench --no-run-benchmarks
279+
- travis_long stack --no-terminal $ARGS test literate-unitb-cli --bench --no-run-benchmarks
259280

260281
allow_failures:
261282
- env: BUILD=cabal GHCVER=7.10.3 CABALVER=1.22 HAPPYVER=1.19.5 ALEXVER=3.1.7 STACKARGS=""
262283
# - env: BUILD=cabal GHCVER=head CABALVER=head HAPPYVER=1.19.5 ALEXVER=3.1.7
263-
- env: BUILD=stack ARGS="--stack-yaml stack-nightly.yaml"
284+
- env: BUILD=stack ARGS="--stack-yaml stack-nightly.yaml --resolver nightly"
264285
# - env: BUILD=stack ARGS="--resolver lts-8 --stack-yaml stack-nightly.yaml"
265286
# - env: BUILD=cabal GHCVER=8.0.1 CABALVER=1.24 HAPPYVER=1.19.5 ALEXVER=3.1.7 STACKARGS=""
266287
# - env: BUILD=cabal GHCVER=8.0.2 CABALVER=1.24 HAPPYVER=1.19.5 ALEXVER=3.1.7 STACKARGS="--stack-yaml stack-nightly.yaml"

literate-unitb-cli/ChangeLog.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Revision history for literate-unitb-cli
2+
3+
## 0.1.0.0 -- YYYY-mm-dd
4+
5+
* First version. Released on an unsuspecting world.

literate-unitb-cli/LICENSE

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Copyright (c) 2017 Simon Hudon
2+
3+
Permission is hereby granted, free of charge, to any person obtaining
4+
a copy of this software and associated documentation files (the
5+
"Software"), to deal in the Software without restriction, including
6+
without limitation the rights to use, copy, modify, merge, publish,
7+
distribute, sublicense, and/or sell copies of the Software, and to
8+
permit persons to whom the Software is furnished to do so, subject to
9+
the following conditions:
10+
11+
The above copyright notice and this permission notice shall be included
12+
in all copies or substantial portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
File renamed without changes.

literate-unitb-cli/app/Main.hs

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module Main (main) where
2+
3+
import Continuous

literate-unitb-cli/app/ZipName.hs

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{-# LANGUAGE TemplateHaskell #-}
2+
module Main where
3+
4+
import Data.List
5+
import Data.Version
6+
import Development.GitRev
7+
import Paths_literate_unitb_cli
8+
9+
import System.Environment
10+
import Text.Printf.TH
11+
12+
printUnitBZipName :: [String] -> IO ()
13+
printUnitBZipName os = do
14+
let v = showVersion version
15+
h = take 12 $gitHash
16+
putStrLn $ [s|literate-unitb-cli-%s-%s-%s|] v (intercalate "-" os) h
17+
18+
main :: IO ()
19+
main = do
20+
xs <- getArgs
21+
if null xs
22+
then putStrLn "usage: unitb-zip-name os"
23+
else printUnitBZipName xs
+100
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
-- Initial literate-unitb-cli.cabal generated by cabal init. For further
2+
-- documentation, see http://haskell.org/cabal/users-guide/
3+
4+
name: literate-unitb-cli
5+
version: 0.1.0.0
6+
synopsis: Command line interface for Literate Unit-B verifier
7+
-- description:
8+
homepage: unitb.github.io
9+
license: MIT
10+
license-file: LICENSE
11+
author: Simon Hudon
12+
maintainer: [email protected]
13+
-- copyright:
14+
category: Development
15+
build-type: Simple
16+
extra-source-files: ChangeLog.md
17+
cabal-version: >=1.10
18+
19+
library
20+
exposed-modules:
21+
Interactive.Observable
22+
Interactive.Pipeline
23+
Interactive.Serialize
24+
Paths_literate_unitb_cli
25+
Continuous
26+
build-depends: base >=4.9 && <4.10,
27+
file-system-mockup,
28+
directory,
29+
generic-instances,
30+
cereal,
31+
containers,
32+
unordered-containers,
33+
control-invariants,
34+
either,
35+
bytestring,
36+
mtl,
37+
parallel,
38+
lens-extra,
39+
lens,
40+
deepseq,
41+
literate-unitb-verifier,
42+
literate-unitb-logic,
43+
literate-unitb-utils,
44+
literate-unitb-config,
45+
literate-unitb-docs,
46+
syntax-error,
47+
th-printf,
48+
filepath,
49+
text,
50+
data-default,
51+
transformers,
52+
process,
53+
ansi-terminal,
54+
stm,
55+
pseudomacros,
56+
time,
57+
gitrev
58+
hs-source-dirs: src
59+
default-extensions: QuasiQuotes, TemplateHaskell, DeriveGeneric, FlexibleContexts, TypeSynonymInstances, FlexibleInstances, OverloadedStrings
60+
default-language: Haskell2010
61+
62+
executable unitb
63+
-- .hs or .lhs file containing the Main module.
64+
hs-source-dirs: app
65+
main-is: Main.hs
66+
default-language: Haskell2010
67+
68+
build-depends: base >=4.8 && < 5, directory >= 1.2.2.0, either, control-invariants, lens, literate-unitb-verifier, literate-unitb-logic, literate-unitb-utils, mtl, pseudomacros, time, file-system-mockup, containers, lens-extra, literate-unitb-config, syntax-error, gitrev, text, literate-unitb-cli
69+
70+
ghc-options: -W -fwarn-missing-signatures
71+
-fwarn-incomplete-uni-patterns
72+
-fwarn-missing-methods
73+
-threaded -fno-ignore-asserts
74+
-fwarn-tabs
75+
-j8
76+
77+
-- LANGUAGE extensions used by modules in this package.
78+
default-extensions: TupleSections, DeriveFunctor, DeriveGeneric, DeriveFoldable, RankNTypes, MultiParamTypeClasses, GeneralizedNewtypeDeriving, TemplateHaskell, FlexibleContexts, FlexibleInstances, DeriveDataTypeable, TypeSynonymInstances, DefaultSignatures, DeriveTraversable, FunctionalDependencies, ImplicitParams, QuasiQuotes, OverloadedStrings
79+
80+
executable unitb-zip-name
81+
-- .hs or .lhs file containing the Main module.
82+
hs-source-dirs: app
83+
main-is: ZipName.hs
84+
default-language: Haskell2010
85+
86+
build-depends: base >=4.8 && < 5
87+
, th-printf
88+
, literate-unitb-cli
89+
, gitrev
90+
91+
ghc-options: -W -fwarn-missing-signatures
92+
-fwarn-incomplete-uni-patterns
93+
-fwarn-missing-methods
94+
-threaded -fno-ignore-asserts
95+
-fwarn-tabs
96+
-j8
97+
98+
-- LANGUAGE extensions used by modules in this package.
99+
default-extensions: TupleSections, DeriveFunctor, DeriveGeneric, DeriveFoldable, RankNTypes, MultiParamTypeClasses, GeneralizedNewtypeDeriving, TemplateHaskell, FlexibleContexts, FlexibleInstances, DeriveDataTypeable, TypeSynonymInstances, DefaultSignatures, DeriveTraversable, FunctionalDependencies, ImplicitParams, QuasiQuotes
100+

literate-unitb/app/Continuous.hs literate-unitb-cli/src/Continuous.hs

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
#!/usr/bin/env runhaskell
2-
module Main
3-
(main)
4-
where
1+
module Continuous where
52

63
-- Modules
74
import Interactive.Pipeline
@@ -10,7 +7,7 @@ import Documentation.SummaryGen
107

118
import Logic.Expr
129

13-
import Paths_literate_unitb
10+
-- import Paths_literate_unitb
1411

1512
import Language.UnitB hiding (timeout)
1613
import Language.UnitB.PO
@@ -42,6 +39,7 @@ import Development.GitRev
4239
import Interactive.Serialize hiding (dump_pos)
4340

4441
import PseudoMacros
42+
import Paths_literate_unitb_cli
4543

4644
import System.Console.GetOpt
4745
import System.Directory

literate-unitb/src/Interactive/Pipeline.hs literate-unitb-cli/src/Interactive/Pipeline.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{-# LANGUAGE RecordWildCards #-}
1+
{-# LANGUAGE RecordWildCards,OverloadedStrings #-}
22
module Interactive.Pipeline
33
( run_pipeline, Params' (..), Params, pos )
44
where

literate-unitb-docs/ChangeLog.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Revision history for literate-unitb-docs
2+
3+
## 0.1.0.0 -- YYYY-mm-dd
4+
5+
* First version. Released on an unsuspecting world.

literate-unitb-docs/LICENSE

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
Copyright (c) 2017 Simon Hudon
2+
3+
Permission is hereby granted, free of charge, to any person obtaining
4+
a copy of this software and associated documentation files (the
5+
"Software"), to deal in the Software without restriction, including
6+
without limitation the rights to use, copy, modify, merge, publish,
7+
distribute, sublicense, and/or sell copies of the Software, and to
8+
permit persons to whom the Software is furnished to do so, subject to
9+
the following conditions:
10+
11+
The above copyright notice and this permission notice shall be included
12+
in all copies or substantial portions of the Software.
13+
14+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
18+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
19+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
20+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

literate-unitb-docs/Setup.hs

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import Distribution.Simple
2+
main = defaultMain

0 commit comments

Comments
 (0)