# Announcing Elm-reduce

**URL:** <https://discourse.elm-lang.org/t/announcing-elm-reduce/3963>\
**Category:** Show and Tell\
**Created:** [July 9, 2019, 12:50pm UTC](https://discourse.elm-lang.org/t/announcing-elm-reduce/3963 "2019-07-09T12:50:28Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Philipp\_Krueger](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/philipp_krueger/32/2674_2.png) [@Philipp\_Krueger](https://discourse.elm-lang.org/u/Philipp_Krueger)\
**Post date:** [July 9, 2019, 12:50pm UTC](https://discourse.elm-lang.org/t/announcing-elm-reduce/3963/1 "2019-07-09T12:50:29Z")

</div>

Hi! I’ve made a topic about Elm-reduce before, in which I’ve been looking for projects to test Elm-reduce on, now it’s ready for release!

This project helps you create bug reports in case the compiler crashes by removing irrelevant source code from your project until a small test case that reproduces the bug you have remains.

There is more info about this project in the readme on gitlab: [https://gitlab.com/matheus23/elm-reduce](https://gitlab.com/matheus23/elm-reduce)

If you want a more detailed look at Elm-reduce, you can look at the thesis I wrote about it: [https://pp.ipd.kit.edu/publication.php?id=pkrueger19bachelorarbeit](https://pp.ipd.kit.edu/publication.php?id=pkrueger19bachelorarbeit) (there is a pdf download link on that site)

Please try it out on the next bug that crashes any Elm tool 😉

Also: I think we could really improve the Elm compiler’s robustness and tooling by fuzz testing the compiler. Elm-reduce is one of the pieces necessary for that: It would reduce the fuzzed test cases that triggered a bug in the compiler. The other piece, the fuzzer, is still missing. Other languages achieve great results by fuzz-testing their compilers: [http://embed.cs.utah.edu/csmith/](http://embed.cs.utah.edu/csmith/) for C or [https://github.com/googleprojectzero/fuzzilli](https://github.com/googleprojectzero/fuzzilli) for javascript (testing V8 at google)

What do you think?

---

<div class="post-metadata">

**Author:** ![Libbum](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/libbum/32/1311_2.png) [@Libbum](https://discourse.elm-lang.org/u/Libbum)\
**Post date:** [July 9, 2019, 1:24pm UTC](https://discourse.elm-lang.org/t/announcing-elm-reduce/3963/2 "2019-07-09T13:24:33Z")

</div>

I was checking over the repo just yesterday, didn’t realise you were so close to release!

Just built and ran it against the floorplan example repo I gave you a while back, but hit a snag before it finished:

> elm-reduce: Module Not Found: SumAnimateTransform  
> CallStack (from HasCallStack):  
> error, called at src/Language/Elm/ModuleDependencies.hs:81:13 in elm-reduce-1.0.0.0-GTrzPXFkMsWAYV3rgntIGt:Language.Elm.ModuleDependencies

Is that something I’m missing on my end, or is this something that was accidentally omitted from the install script?

---

<div class="post-metadata">

**Author:** ![Philipp\_Krueger](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/philipp_krueger/32/2674_2.png) [@Philipp\_Krueger](https://discourse.elm-lang.org/u/Philipp_Krueger)\
**Post date:** [July 9, 2019, 1:49pm UTC](https://discourse.elm-lang.org/t/announcing-elm-reduce/3963/3 "2019-07-09T13:49:35Z")

</div>

Interesting!  
What is the output of `elm make` for your project? It seems like it can’t resolve the “SumAnimateTransform” module, I guess it exists 😃 If you could create an issue in the repository with a zip of your test case that would be awesome! 🙂

---

<div class="post-metadata">

**Author:** ![Libbum](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/libbum/32/1311_2.png) [@Libbum](https://discourse.elm-lang.org/u/Libbum)\
**Post date:** [July 9, 2019, 2:17pm UTC](https://discourse.elm-lang.org/t/announcing-elm-reduce/3963/4 "2019-07-09T14:17:47Z")

</div>

```
> elm make src/Main.elm --output=elm.js
Success! Compiled 1 module.        

```

Sure thing! I’ll write that up now.

---

<div class="post-metadata">

**Author:** ![Libbum](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/libbum/32/1311_2.png) [@Libbum](https://discourse.elm-lang.org/u/Libbum)\
**Post date:** [July 9, 2019, 2:29pm UTC](https://discourse.elm-lang.org/t/announcing-elm-reduce/3963/5 "2019-07-09T14:29:24Z")

</div>

Ah. Found why it’s happening:

> ./vendored-libs/elm-community/typed-svg/5.0.1/src/Examples/SumAnimateTransform.elm

It’s trying to pull in an example file. Not sure how to overcome this, but we’ll move this conversation to the issue.

---

<div class="post-metadata">

**Author:** ![Philipp\_Krueger](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/philipp_krueger/32/2674_2.png) [@Philipp\_Krueger](https://discourse.elm-lang.org/u/Philipp_Krueger)\
**Post date:** [July 9, 2019, 3:49pm UTC](https://discourse.elm-lang.org/t/announcing-elm-reduce/3963/6 "2019-07-09T15:49:59Z")

</div>

Obviously this is a bug I have to fix, but you can still check out an example if you want to test the project by skipping the vendoring pass via the --no-vendoring flag.

---

<div class="post-metadata">

**Author:** ![Libbum](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/libbum/32/1311_2.png) [@Libbum](https://discourse.elm-lang.org/u/Libbum)\
**Post date:** [July 9, 2019, 4:23pm UTC](https://discourse.elm-lang.org/t/announcing-elm-reduce/3963/7 "2019-07-09T16:23:59Z")

</div>

Yep, that runs! But reduces to practically nothing since the Map! error I’m playing with here comes from a package.

---

<div class="post-metadata">

**Author:** ![Philipp\_Krueger](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.elm-lang.org/philipp_krueger/32/2674_2.png) [@Philipp\_Krueger](https://discourse.elm-lang.org/u/Philipp_Krueger)\
**Post date:** [July 9, 2019, 4:42pm UTC](https://discourse.elm-lang.org/t/announcing-elm-reduce/3963/8 "2019-07-09T16:42:29Z")

</div>

True. It should just be a Main function with a single import and a referred opaque type. That is one of the test Casey that reproduce the Map.! bug.

Even if you enabled vendoring, the library likely couldn’t be added to the source-directory as the bug would then stop reproducing.

I’ll try to fix the bug and we’ll see how it goes! 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/elm_lang/original/1X/50a05e53677a2c3b47776d7abd0f113eb50193a1.png) [@system](https://discourse.elm-lang.org/u/system)\
**Post date:** [July 19, 2019, 4:42pm UTC](https://discourse.elm-lang.org/t/announcing-elm-reduce/3963/9 "2019-07-19T16:42:34Z")

</div>

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.
