Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to LTS 10.0 #552

Closed
pjljvandelaar opened this issue Dec 19, 2017 · 10 comments
Closed

Move to LTS 10.0 #552

pjljvandelaar opened this issue Dec 19, 2017 · 10 comments
Assignees
Milestone

Comments

@pjljvandelaar
Copy link
Member

Move to LTS 10.0 (and stack 1.6.1)

Some warnings have to be fixed like

    [18 of 20] Compiling ValExprImpls     ( src\ValExprImpls.hs, .stack-work\dis
t\67675594\build\ValExprImpls.o )

    ←[;1msrc\ValExprImpls.hs:250:12: ←[;1m←[35mwarning:←[0m←[0m←[;1m [←[;1m←[35m
-Wsimplifiable-class-constraints←[0m←[0m←[;1m]←[0m←[0m←[;1m
        * The constraint `Integral (ValExpr v)'
            matches an instance declaration
          instance Ord v => Integral (ValExpr v)
            -- Defined at src\ValExprDefs.hs:96:10
          This makes type inference for inner bindings fragile;
            either use MonoLocalBinds, or simplify it using the instance
        * In the type signature:
            cstrSum :: forall v.
                       (Ord v, Integral (ValExpr v)) => FreeSum (ValExpr v) -> V
alExpr v←[0m←[0m
    ←[;1m←[34m    |←[0m←[0m
    ←[;1m←[34m250 |←[0m←[0m cstrSum :: ←[;1m←[35mforall v . (Ord v, Integral (Va
lExpr v)) => FreeSum (ValExpr v) -> ValExpr v←[0m←[0m
    ←[;1m←[34m    |←[0m←[0m←[;1m←[35m            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^←[0m←[0m
    ←[0m←[0m←[0m
    ←[;1msrc\ValExprImpls.hs:291:16: ←[;1m←[35mwarning:←[0m←[0m←[;1m [←[;1m←[35m
-Wsimplifiable-class-constraints←[0m←[0m←[;1m]←[0m←[0m←[;1m
        * The constraint `Integral (ValExpr v)'
            matches an instance declaration
          instance Ord v => Integral (ValExpr v)
            -- Defined at src\ValExprDefs.hs:96:10
          This makes type inference for inner bindings fragile;
            either use MonoLocalBinds, or simplify it using the instance
        * In the type signature:
            cstrProduct :: forall v.
                           (Ord v, Integral (ValExpr v)) =>
                           FreeProduct (ValExpr v) -> ValExpr v←[0m←[0m
    ←[;1m←[34m    |←[0m←[0m
    ←[;1m←[34m291 |←[0m←[0m cstrProduct :: ←[;1m←[35mforall v .(Ord v, Integral
(ValExpr v)) => FreeProduct (ValExpr v) -> ValExpr v←[0m←[0m
    ←[;1m←[34m    |←[0m←[0m←[;1m←[35m                ^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^←[0m←[0m
    ←[0m←[0m←[0m
    ←[;1msrc\ValExprImpls.hs:305:17: ←[;1m←[35mwarning:←[0m←[0m←[;1m [←[;1m←[35m
-Wsimplifiable-class-constraints←[0m←[0m←[;1m]←[0m←[0m←[;1m
        * The constraint `Integral (ValExpr v)'
            matches an instance declaration
          instance Ord v => Integral (ValExpr v)
            -- Defined at src\ValExprDefs.hs:96:10
          This makes type inference for inner bindings fragile;
            either use MonoLocalBinds, or simplify it using the instance
        * In the type signature:
            cstrProduct' :: (Ord v, Integral (ValExpr v)) =>
                            FreeProduct (ValExpr v) -> ValExpr v←[0m←[0m
    ←[;1m←[34m    |←[0m←[0m
    ←[;1m←[34m305 |←[0m←[0m cstrProduct' :: ←[;1m←[35m(Ord v, Integral (ValExpr
←[0m←[0m
    ←[;1m←[34m    |←[0m←[0m←[;1m←[35m                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^...←[0m←[0m
    ←[0m←[0m←[0m
    ←[;1msrc\ValExprImpls.hs:417:10: ←[;1m←[35mwarning:←[0m←[0m←[;1m [←[;1m←[35m
-Wsimplifiable-class-constraints←[0m←[0m←[;1m]←[0m←[0m←[;1m
        * The constraint `Integral (ValExpr v)'
            matches an instance declaration
          instance Ord v => Integral (ValExpr v)
            -- Defined at src\ValExprDefs.hs:96:10
          This makes type inference for inner bindings fragile;
            either use MonoLocalBinds, or simplify it using the instance
        * In the type signature:
            subst :: (Variable v,
                      Integral (ValExpr v),
                      Variable w,
                      Integral (ValExpr w)) =>
                     Map.Map v (ValExpr v)
                     -> Map.Map FuncId (FuncDef w) -> ValExpr v -> ValExpr v←[0m
←[0m
    ←[;1m←[34m    |←[0m←[0m
    ←[;1m←[34m417 |←[0m←[0m subst :: ←[;1m←[35m(Variable v, Integral (ValExpr v)
←[0m←[0mle w, Integral (ValExpr w))
    ←[;1m←[34m    |←[0m←[0m←[;1m←[35m          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...←[0m←[0m
    ←[0m←[0m←[0m
    ←[;1msrc\ValExprImpls.hs:417:10: ←[;1m←[35mwarning:←[0m←[0m←[;1m [←[;1m←[35m
-Wsimplifiable-class-constraints←[0m←[0m←[;1m]←[0m←[0m←[;1m
        * The constraint `Integral (ValExpr w)'
            matches an instance declaration
          instance Ord v => Integral (ValExpr v)
            -- Defined at src\ValExprDefs.hs:96:10
          This makes type inference for inner bindings fragile;
            either use MonoLocalBinds, or simplify it using the instance
        * In the type signature:
            subst :: (Variable v,
                      Integral (ValExpr v),
                      Variable w,
                      Integral (ValExpr w)) =>
                     Map.Map v (ValExpr v)
                     -> Map.Map FuncId (FuncDef w) -> ValExpr v -> ValExpr v←[0m
←[0m
    ←[;1m←[34m    |←[0m←[0m
    ←[;1m←[34m417 |←[0m←[0m subst :: ←[;1m←[35m(Variable v, Integral (ValExpr v)
←[0m←[0mle w, Integral (ValExpr w))
    ←[;1m←[34m    |←[0m←[0m←[;1m←[35m          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...←[0m←[0m
    ←[0m←[0m←[0m
    ←[;1msrc\ValExprImpls.hs:430:11: ←[;1m←[35mwarning:←[0m←[0m←[;1m [←[;1m←[35m
-Wsimplifiable-class-constraints←[0m←[0m←[;1m]←[0m←[0m←[;1m
        * The constraint `Integral (ValExpr v)'
            matches an instance declaration
          instance Ord v => Integral (ValExpr v)
            -- Defined at src\ValExprDefs.hs:96:10
          This makes type inference for inner bindings fragile;
            either use MonoLocalBinds, or simplify it using the instance
        * In the type signature:
            subst' :: (Variable v,
                       Integral (ValExpr v),
                       Variable w,
                       Integral (ValExpr w)) =>
                      Map.Map v (ValExpr v)
                      -> Map.Map FuncId (FuncDef w) -> ValExprView v -> ValExpr
v←[0m←[0m
    ←[;1m←[34m    |←[0m←[0m
    ←[;1m←[34m430 |←[0m←[0m subst' :: ←[;1m←[35m(Variable v, Integral (ValExpr v
←[0m←[0mble w, Integral (ValExpr w))
    ←[;1m←[34m    |←[0m←[0m←[;1m←[35m           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...←[0m←[0m
    ←[0m←[0m←[0m
    ←[;1msrc\ValExprImpls.hs:430:11: ←[;1m←[35mwarning:←[0m←[0m←[;1m [←[;1m←[35m
-Wsimplifiable-class-constraints←[0m←[0m←[;1m]←[0m←[0m←[;1m
        * The constraint `Integral (ValExpr w)'
            matches an instance declaration
          instance Ord v => Integral (ValExpr v)
            -- Defined at src\ValExprDefs.hs:96:10
          This makes type inference for inner bindings fragile;
            either use MonoLocalBinds, or simplify it using the instance
        * In the type signature:
            subst' :: (Variable v,
                       Integral (ValExpr v),
                       Variable w,
                       Integral (ValExpr w)) =>
                      Map.Map v (ValExpr v)
                      -> Map.Map FuncId (FuncDef w) -> ValExprView v -> ValExpr
v←[0m←[0m
    ←[;1m←[34m    |←[0m←[0m
    ←[;1m←[34m430 |←[0m←[0m subst' :: ←[;1m←[35m(Variable v, Integral (ValExpr v
←[0m←[0mble w, Integral (ValExpr w))
    ←[;1m←[34m    |←[0m←[0m←[;1m←[35m           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...←[0m←[0m
    ←[0m←[0m←[0m
    ←[;1msrc\ValExprImpls.hs:456:14: ←[;1m←[35mwarning:←[0m←[0m←[;1m [←[;1m←[35m
-Wsimplifiable-class-constraints←[0m←[0m←[;1m]←[0m←[0m←[;1m
        * The constraint `Integral (ValExpr v)'
            matches an instance declaration
          instance Ord v => Integral (ValExpr v)
            -- Defined at src\ValExprDefs.hs:96:10
          This makes type inference for inner bindings fragile;
            either use MonoLocalBinds, or simplify it using the instance
        * In the type signature:
            compSubst :: (Variable v,
                          Integral (ValExpr v),
                          Variable w,
                          Integral (ValExpr w)) =>
                         Map.Map v (ValExpr w)
                         -> Map.Map FuncId (FuncDef v) -> ValExpr v -> ValExpr w
←[0m←[0m
    ←[;1m←[34m    |←[0m←[0m
    ←[;1m←[34m456 |←[0m←[0m compSubst :: ←[;1m←[35m(Variable v, Integral (ValExp
←[0m←[0mriable w, Integral (ValExpr w))
    ←[;1m←[34m    |←[0m←[0m←[;1m←[35m              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...←[0m←[0m
    ←[0m←[0m←[0m
    ←[;1msrc\ValExprImpls.hs:456:14: ←[;1m←[35mwarning:←[0m←[0m←[;1m [←[;1m←[35m
-Wsimplifiable-class-constraints←[0m←[0m←[;1m]←[0m←[0m←[;1m
        * The constraint `Integral (ValExpr w)'
            matches an instance declaration
          instance Ord v => Integral (ValExpr v)
            -- Defined at src\ValExprDefs.hs:96:10
          This makes type inference for inner bindings fragile;
            either use MonoLocalBinds, or simplify it using the instance
        * In the type signature:
            compSubst :: (Variable v,
                          Integral (ValExpr v),
                          Variable w,
                          Integral (ValExpr w)) =>
                         Map.Map v (ValExpr w)
                         -> Map.Map FuncId (FuncDef v) -> ValExpr v -> ValExpr w
←[0m←[0m
    ←[;1m←[34m    |←[0m←[0m
    ←[;1m←[34m456 |←[0m←[0m compSubst :: ←[;1m←[35m(Variable v, Integral (ValExp
←[0m←[0mriable w, Integral (ValExpr w))
    ←[;1m←[34m    |←[0m←[0m←[;1m←[35m              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...←[0m←[0m
    ←[0m←[0m←[0m
    ←[;1msrc\ValExprImpls.hs:461:15: ←[;1m←[35mwarning:←[0m←[0m←[;1m [←[;1m←[35m
-Wsimplifiable-class-constraints←[0m←[0m←[;1m]←[0m←[0m←[;1m
        * The constraint `Integral (ValExpr v)'
            matches an instance declaration
          instance Ord v => Integral (ValExpr v)
            -- Defined at src\ValExprDefs.hs:96:10
          This makes type inference for inner bindings fragile;
            either use MonoLocalBinds, or simplify it using the instance
        * In the type signature:
            compSubst' :: (Variable v,
                           Integral (ValExpr v),
                           Variable w,
                           Integral (ValExpr w)) =>
                          Map.Map v (ValExpr w)
                          -> Map.Map FuncId (FuncDef v) -> ValExprView v -> ValE
xpr w←[0m←[0m
    ←[;1m←[34m    |←[0m←[0m
    ←[;1m←[34m461 |←[0m←[0m compSubst' :: ←[;1m←[35m(Variable v, Integral (ValEx
←[0m←[0mariable w, Integral (ValExpr w))
    ←[;1m←[34m    |←[0m←[0m←[;1m←[35m               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...←[0m←[0m
    ←[0m←[0m←[0m
    ←[;1msrc\ValExprImpls.hs:461:15: ←[;1m←[35mwarning:←[0m←[0m←[;1m [←[;1m←[35m
-Wsimplifiable-class-constraints←[0m←[0m←[;1m]←[0m←[0m←[;1m
        * The constraint `Integral (ValExpr w)'
            matches an instance declaration
          instance Ord v => Integral (ValExpr v)
            -- Defined at src\ValExprDefs.hs:96:10
          This makes type inference for inner bindings fragile;
            either use MonoLocalBinds, or simplify it using the instance
        * In the type signature:
            compSubst' :: (Variable v,
                           Integral (ValExpr v),
                           Variable w,
                           Integral (ValExpr w)) =>
                          Map.Map v (ValExpr w)
                          -> Map.Map FuncId (FuncDef v) -> ValExprView v -> ValE
xpr w←[0m←[0m
    ←[;1m←[34m    |←[0m←[0m
    ←[;1m←[34m461 |←[0m←[0m compSubst' :: ←[;1m←[35m(Variable v, Integral (ValEx
←[0m←[0mariable w, Integral (ValExpr w))
    ←[;1m←[34m    |←[0m←[0m←[;1m←[35m               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...←[0m←[0m
    ←[0m←[0m←[0m
    ←[;1m<no location info>: ←[;1m←[31merror:←[0m←[0m←[;1m←[0m←[0m←[;1m
    Failing due to -Werror.←[0m←[0m
    ←[0m←[0m←[0m
@pjljvandelaar
Copy link
Member Author

@capitanbatata I really like to move Integral to the test code only!

@pjljvandelaar
Copy link
Member Author

TorXakis builds with
stack build --ghc-options -Wwarn

@capitanbatata I am curious to the performance with the new compiler!

@dnadales
Copy link
Contributor

@capitanbatata I really like to move Integral to the test code only!

It depends on what we want. Right now Integral is preventing us from building a product of String's. Once we make everything more type safe we can discuss alternatives.

@dnadales
Copy link
Contributor

@capitanbatata I am curious to the performance with the new compiler!

Me too. I don't have my work computer, and I will get a different hardware anyway. @keremispirli will run the benchmarks for the current develop version, and @keremispirli and I are working on automating the benchmarks comparison process so that everyone can run them on his machine (since I don't think we'll get a cloud computer to run the benchmarks anyway).

@pjljvandelaar
Copy link
Member Author

all tests seem to pass

sqatt-0.1: test (suite: benchmarks-sanity-test)


Choice
  100 choices
Enable
  sequence of enable operators, without data
  sequence of enable operators, with integers
  sequence of enable operators, with integers and two outputs
Hiding
  alternate 4 hide 1 action
  hide first of sync first alternate
.................  hide second of sync second alternate
  match
.  match Int
Parallel
  4 parallel sequential-processes
  4 parallel sequential-processes, with internal step
  4 parallel sequential-processes, with alternating actions
  4 parallel sequential-processes, with multiple actions
  convoluted parallel-synchronous model
  4 parallel nested synchronizing sequences
RealWorld
  Multiple Control Loops Stepper
  Customers and Orders
  Moving Arms
  Moving Arms (Purpose)
Sequence
  100 actions
  100 internal actions
  100 data actions
  sequence with a 10 integer channel
  sequence with a 10 integer channel (cvc4)
  sequence with a 10 integer channel, using a custom type
Synchronization
  alternate 2 processes
  3 processes
  3 processes with internal action
  6 sequential processes synchronizing in two actions
  many processes synchronizing at the top
  many processes synchronizing in pairs

Finished in 305.4883 seconds
31 examples, 0 failures

sqatt-0.1: Test suite benchmarks-sanity-test passed
sqatt-0.1: test (suite: examples-test)


Examples.All
  Adder
WARNING: The presence of SMT solvers was not checked.
         First issue #47 needs to be resolved.
See: https://github.com/TorXakis/TorXakis/issues/47
    Basic
    State Automation
    Parallel Adders
    Replay Adder Trace
    Purp1 - 4 goals
    Purp2 - Operand constraints
    Purp3 - Always +2
    Purp4 - Overlapping Steps
  Control Loop
    Stepper
    Spec Produce
    Spec Measure
    Spec Correct
.    Multiple Loops Stepper #long
  Customers and Orders
    Customers & Orders Test
  Dispatch Process
    Process 01
    Process 02
    Process 03
    Process 04
    Process 05
    Process 05a
    Process 06
    Process 06a
    Process 07
    Process 08
    Process 09
    Process 10 - Data
    Process 12 - Unique ID #long
    Process 12 - Unique ID (Wrong)
    Process 12 - Unique ID (Right)
  Echo
    Stepper
    Simulator
  Lucky People
    Examples Purpose Test
    Lucky By Gender Test
    Random Lucky Test
  Moving Arms
    Stepper Test
    Single Axis Purpose Test
    Restricted Axis Purpose Test (input eagerness 0)
    Restricted Axis Purpose Test (input eagerness 3)
  Point
    Stepper Test
    First Quadrant Test Purpose
  ReadWrite Conflict
    Stepper Test
    Stepper Test for Purp Model
    HitAll7 Purpose Test
    Advanced Stepper Test
  Queue
    Stepper Test
    Stepper Test (Lossy)
    SUT Test
  Stimulus-Response
    Stimulus-Response Test 0
    Stimulus-Response Test 1
    Stimulus-Response Test 2
    Stimulus-Response Test 3
    Stimulus-Response Test 4

Finished in 682.0061 seconds
52 examples, 0 failures

sqatt-0.1: Test suite examples-test passed
sqatt-0.1: test (suite: integration-test)


Any
  Test 0

Finished in 3.2351 seconds
1 example, 0 failures

sqatt-0.1: Test suite integration-test passed
sqatt-0.1: test (suite: models-test)


Control Loop #model
.....  Stepper 500
.....  Spec Produce 100
  Spec Measure 100
.........  Spec Correct 100
......  Multiple Loops Stepper 30
Dispatch Process #model
  Process 01
  Process 02
  Process 03
  Process 04
  Process 05
  Process 05a
  Process 06
  Process 06a
  Process 07
  Process 08
  Process 09
  Process 10 - Data
Lucky People #model
  Stepper 200
Moving Arms #model
  Stepper 500
  Restricted Axis Purpose Test (input eagerness 0) 100
Queue #model
  Stepper Test 200
  Stepper Test (Lossy) 200
ReadWrite Conflict #model
  Stepper 100
.........................  Advanced Stepper 100

Finished in 2174.5284 seconds
24 examples, 0 failures

sqatt-0.1: Test suite models-test passed
Completed 2 action(s).

@pjljvandelaar
Copy link
Member Author

pjljvandelaar commented Dec 19, 2017

@capitanbatata again strange benchmark values:
Now not negative time, but infinite (NaN in a short period)

benchmarking Choice/100 choices
time                 1.224 s    (1.182 s .. NaN s)
                     1.000 R²   (1.000 R² .. 1.000 R²)
mean                 1.208 s    (1.203 s .. 1.212 s)
std dev              5.337 ms   (0.0 s .. 6.089 ms)
variance introduced by outliers: 19% (moderately inflated)

@dnadales
Copy link
Contributor

@pjljvandelaar No idea, that's what the criterion library is reporting. It might be related to issues haskell/criterion#65 and haskell/criterion#161.

@dnadales
Copy link
Contributor

@PierreVDL @pjljvandelaar are you already working on bumping the LTS? I'm also working on it since you assigned the issue to me :/ ...

@dnadales
Copy link
Contributor

And this is the issue related to the NaN returned when doing linear regression.

@pjljvandelaar
Copy link
Member Author

I only tested LTS 10.0, and found out it is valid for TorXakis.
So now comes the real work: fix the warnings!
We were both assigned: but you can make it happen!

@keremispirli keremispirli added this to the 2017Q4 milestone Dec 21, 2017
dnadales pushed a commit that referenced this issue Dec 21, 2017
- Updated TorXakis to LTS-10.0
- Updated sqatt to LTS-10.0
- A `stack_appveyor` file was introduced to use the integer simple variant of GHC, which reduces build time.
- Documented how to 
- The `stack` version is output in the build scripts (semaphore and appveyor).
- The build script in appveyor now retries to build TorXakis (10 times) due to random failures in the stack build.
- Removed the warnings by enabling the `MonoLocalBinds` extension. A more fundamental fix will require making `ValExpr` type safe.
-  Removed the extra deps using the newest features of stack (since 1.6.1).
-  Removed the mention to the use of `fast` flag, since now the optimizations are disabled (See pull request #539 ).
- Added instructions on how to run the benchmarks.

Fixes #552 
Fixes #553
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants