Dialyzer: show success typing of a given function

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Dialyzer: show success typing of a given function

Jesper Eskilson-2
Hi,

Often when I'm chasing down dialyzer errors, I want to see the success typing of a function. Is there a way to do that?

/Jesper
--

Jesper Eskilson
Senior Software Engineer
Kred Core
+46-72-855-8421

Klarna Bank AB (publ)
Sveavägen 46, 111 34 Stockholm
Tel: <a href="tel:+46812012000" style="color:rgb(130,130,137)" target="_blank">+46 8 120 120 00
Reg no: 556737-0431
klarna.com

Reply | Threaded
Open this post in threaded view
|

Re: Dialyzer: show success typing of a given function

Brujo Benavides-3
You can use TypER for that, IIRC.
Just remove your specs and run typer on your code, like you would run dialyzer.

On Tue, Jan 7, 2020 at 9:46 AM Jesper Eskilson <[hidden email]> wrote:
Hi,

Often when I'm chasing down dialyzer errors, I want to see the success typing of a function. Is there a way to do that?

/Jesper
--

Jesper Eskilson
Senior Software Engineer
Kred Core
+46-72-855-8421

Klarna Bank AB (publ)
Sveavägen 46, 111 34 Stockholm
Tel: <a href="tel:+46812012000" style="color:rgb(130,130,137)" target="_blank">+46 8 120 120 00
Reg no: 556737-0431
klarna.com



--
Brujo Benavides
about.me/elbrujohalcon
Reply | Threaded
Open this post in threaded view
|

Re: Dialyzer: show success typing of a given function

Jesper Eskilson-2
Thanks! I would've liked an option to dialyzer to do this (so I don't need to replicate how I run dialyzer, which is sort of complicated). Also, typer seems to require source code, and I would like to be able to do this directly on the beams.

/Jesper

On Tue, Jan 7, 2020 at 2:21 PM Fernando Benavides <[hidden email]> wrote:
You can use TypER for that, IIRC.
Just remove your specs and run typer on your code, like you would run dialyzer.

On Tue, Jan 7, 2020 at 9:46 AM Jesper Eskilson <[hidden email]> wrote:
Hi,

Often when I'm chasing down dialyzer errors, I want to see the success typing of a function. Is there a way to do that?

/Jesper
--

Jesper Eskilson
Senior Software Engineer
Kred Core
+46-72-855-8421

Klarna Bank AB (publ)
Sveavägen 46, 111 34 Stockholm
Tel: <a href="tel:+46812012000" style="color:rgb(130,130,137)" target="_blank">+46 8 120 120 00
Reg no: 556737-0431
klarna.com



--
Brujo Benavides
about.me/elbrujohalcon


--

Jesper Eskilson
Senior Software Engineer
Kred Core
+46-72-855-8421

Klarna Bank AB (publ)
Sveavägen 46, 111 34 Stockholm
Tel: <a href="tel:+46812012000" style="color:rgb(130,130,137)" target="_blank">+46 8 120 120 00
Reg no: 556737-0431
klarna.com

Reply | Threaded
Open this post in threaded view
|

Re: Dialyzer: show success typing of a given function

Tobias Lindahl-4
Jesper, I think you might want to have a look at the function dialyzer_plt:pp_mod/1

I agree that there should be some command line option for this. I think I even had one at some point, but it seems to have got lost over time.

Den ons 8 jan. 2020 kl 10:48 skrev Jesper Eskilson <[hidden email]>:
Thanks! I would've liked an option to dialyzer to do this (so I don't need to replicate how I run dialyzer, which is sort of complicated). Also, typer seems to require source code, and I would like to be able to do this directly on the beams.

/Jesper

On Tue, Jan 7, 2020 at 2:21 PM Fernando Benavides <[hidden email]> wrote:
You can use TypER for that, IIRC.
Just remove your specs and run typer on your code, like you would run dialyzer.

On Tue, Jan 7, 2020 at 9:46 AM Jesper Eskilson <[hidden email]> wrote:
Hi,

Often when I'm chasing down dialyzer errors, I want to see the success typing of a function. Is there a way to do that?

/Jesper
--

Jesper Eskilson
Senior Software Engineer
Kred Core
+46-72-855-8421

Klarna Bank AB (publ)
Sveavägen 46, 111 34 Stockholm
Tel: <a href="tel:+46812012000" style="color:rgb(130,130,137)" target="_blank">+46 8 120 120 00
Reg no: 556737-0431
klarna.com



--
Brujo Benavides
about.me/elbrujohalcon


--

Jesper Eskilson
Senior Software Engineer
Kred Core
+46-72-855-8421

Klarna Bank AB (publ)
Sveavägen 46, 111 34 Stockholm
Tel: <a href="tel:+46812012000" style="color:rgb(130,130,137)" target="_blank">+46 8 120 120 00
Reg no: 556737-0431
klarna.com

Reply | Threaded
Open this post in threaded view
|

Re: Dialyzer: show success typing of a given function

Jesper Eskilson-2
Thanks, I'll check it out. 

On Thu, Jan 9, 2020 at 11:40 AM Tobias Lindahl <[hidden email]> wrote:
Jesper, I think you might want to have a look at the function dialyzer_plt:pp_mod/1

I agree that there should be some command line option for this. I think I even had one at some point, but it seems to have got lost over time.

Den ons 8 jan. 2020 kl 10:48 skrev Jesper Eskilson <[hidden email]>:
Thanks! I would've liked an option to dialyzer to do this (so I don't need to replicate how I run dialyzer, which is sort of complicated). Also, typer seems to require source code, and I would like to be able to do this directly on the beams.

/Jesper

On Tue, Jan 7, 2020 at 2:21 PM Fernando Benavides <[hidden email]> wrote:
You can use TypER for that, IIRC.
Just remove your specs and run typer on your code, like you would run dialyzer.

On Tue, Jan 7, 2020 at 9:46 AM Jesper Eskilson <[hidden email]> wrote:
Hi,

Often when I'm chasing down dialyzer errors, I want to see the success typing of a function. Is there a way to do that?

/Jesper
--

Jesper Eskilson
Senior Software Engineer
Kred Core
+46-72-855-8421

Klarna Bank AB (publ)
Sveavägen 46, 111 34 Stockholm
Tel: <a href="tel:+46812012000" style="color:rgb(130,130,137)" target="_blank">+46 8 120 120 00
Reg no: 556737-0431
klarna.com



--
Brujo Benavides
about.me/elbrujohalcon


--

Jesper Eskilson
Senior Software Engineer
Kred Core
+46-72-855-8421

Klarna Bank AB (publ)
Sveavägen 46, 111 34 Stockholm
Tel: <a href="tel:+46812012000" style="color:rgb(130,130,137)" target="_blank">+46 8 120 120 00
Reg no: 556737-0431
klarna.com



--

Jesper Eskilson
Senior Software Engineer
Kred Core
+46-72-855-8421

Klarna Bank AB (publ)
Sveavägen 46, 111 34 Stockholm
Tel: <a href="tel:+46812012000" style="color:rgb(130,130,137)" target="_blank">+46 8 120 120 00
Reg no: 556737-0431
klarna.com

Reply | Threaded
Open this post in threaded view
|

Re: Dialyzer: show success typing of a given function

Jesper Eskilson-2
So, if I'm doing something like this:

Errors = dialyzer:run(Options)

how do I call dialyzer_plt:pp_mod(Mod), which seems to be looking inside an existing PLT file. I would like to show what dialyzer has discovered during the dialyzer:run/1 call.

/Jesper

On Thu, Jan 9, 2020 at 12:14 PM Jesper Eskilson <[hidden email]> wrote:
Thanks, I'll check it out. 

On Thu, Jan 9, 2020 at 11:40 AM Tobias Lindahl <[hidden email]> wrote:
Jesper, I think you might want to have a look at the function dialyzer_plt:pp_mod/1

I agree that there should be some command line option for this. I think I even had one at some point, but it seems to have got lost over time.

Den ons 8 jan. 2020 kl 10:48 skrev Jesper Eskilson <[hidden email]>:
Thanks! I would've liked an option to dialyzer to do this (so I don't need to replicate how I run dialyzer, which is sort of complicated). Also, typer seems to require source code, and I would like to be able to do this directly on the beams.

/Jesper

On Tue, Jan 7, 2020 at 2:21 PM Fernando Benavides <[hidden email]> wrote:
You can use TypER for that, IIRC.
Just remove your specs and run typer on your code, like you would run dialyzer.

On Tue, Jan 7, 2020 at 9:46 AM Jesper Eskilson <[hidden email]> wrote:
Hi,

Often when I'm chasing down dialyzer errors, I want to see the success typing of a function. Is there a way to do that?

/Jesper
--

Jesper Eskilson
Senior Software Engineer
Kred Core
+46-72-855-8421

Klarna Bank AB (publ)
Sveavägen 46, 111 34 Stockholm
Tel: <a href="tel:+46812012000" style="color:rgb(130,130,137)" target="_blank">+46 8 120 120 00
Reg no: 556737-0431
klarna.com



--
Brujo Benavides
about.me/elbrujohalcon


--

Jesper Eskilson
Senior Software Engineer
Kred Core
+46-72-855-8421

Klarna Bank AB (publ)
Sveavägen 46, 111 34 Stockholm
Tel: <a href="tel:+46812012000" style="color:rgb(130,130,137)" target="_blank">+46 8 120 120 00
Reg no: 556737-0431
klarna.com



--

Jesper Eskilson
Senior Software Engineer
Kred Core
+46-72-855-8421

Klarna Bank AB (publ)
Sveavägen 46, 111 34 Stockholm
Tel: <a href="tel:+46812012000" style="color:rgb(130,130,137)" target="_blank">+46 8 120 120 00
Reg no: 556737-0431
klarna.com



--

Jesper Eskilson
Senior Software Engineer
Kred Core
+46-72-855-8421

Klarna Bank AB (publ)
Sveavägen 46, 111 34 Stockholm
Tel: <a href="tel:+46812012000" style="color:rgb(130,130,137)" target="_blank">+46 8 120 120 00
Reg no: 556737-0431
klarna.com

Reply | Threaded
Open this post in threaded view
|

Re: Dialyzer: show success typing of a given function

Tobias Lindahl-4
I used to build a plt for the system and then use the dialyzer_plt:pp_mod/1 on that one. It will probably only show the exported functions, though.

Otherwise, you will need to modify dialyzer to be able to find it.

At least originally, the plt was used to store all the intermediate results, and if you can get your hands on it before it is deleted you can look it up there. I remember that I removed the pruning of non-exported function to get all functions in the plt dump. Back then it was a one-liner.

It appears that some things have changed in the 12 years since I left the code base, though, so I can't give you a better indication than this. 

Den tors 9 jan. 2020 kl 12:29 skrev Jesper Eskilson <[hidden email]>:
So, if I'm doing something like this:

Errors = dialyzer:run(Options)

how do I call dialyzer_plt:pp_mod(Mod), which seems to be looking inside an existing PLT file. I would like to show what dialyzer has discovered during the dialyzer:run/1 call.

/Jesper

On Thu, Jan 9, 2020 at 12:14 PM Jesper Eskilson <[hidden email]> wrote:
Thanks, I'll check it out. 

On Thu, Jan 9, 2020 at 11:40 AM Tobias Lindahl <[hidden email]> wrote:
Jesper, I think you might want to have a look at the function dialyzer_plt:pp_mod/1

I agree that there should be some command line option for this. I think I even had one at some point, but it seems to have got lost over time.

Den ons 8 jan. 2020 kl 10:48 skrev Jesper Eskilson <[hidden email]>:
Thanks! I would've liked an option to dialyzer to do this (so I don't need to replicate how I run dialyzer, which is sort of complicated). Also, typer seems to require source code, and I would like to be able to do this directly on the beams.

/Jesper

On Tue, Jan 7, 2020 at 2:21 PM Fernando Benavides <[hidden email]> wrote:
You can use TypER for that, IIRC.
Just remove your specs and run typer on your code, like you would run dialyzer.

On Tue, Jan 7, 2020 at 9:46 AM Jesper Eskilson <[hidden email]> wrote:
Hi,

Often when I'm chasing down dialyzer errors, I want to see the success typing of a function. Is there a way to do that?

/Jesper
--

Jesper Eskilson
Senior Software Engineer
Kred Core
+46-72-855-8421

Klarna Bank AB (publ)
Sveavägen 46, 111 34 Stockholm
Tel: <a href="tel:+46812012000" style="color:rgb(130,130,137)" target="_blank">+46 8 120 120 00
Reg no: 556737-0431
klarna.com



--
Brujo Benavides
about.me/elbrujohalcon


--

Jesper Eskilson
Senior Software Engineer
Kred Core
+46-72-855-8421

Klarna Bank AB (publ)
Sveavägen 46, 111 34 Stockholm
Tel: <a href="tel:+46812012000" style="color:rgb(130,130,137)" target="_blank">+46 8 120 120 00
Reg no: 556737-0431
klarna.com



--

Jesper Eskilson
Senior Software Engineer
Kred Core
+46-72-855-8421

Klarna Bank AB (publ)
Sveavägen 46, 111 34 Stockholm
Tel: <a href="tel:+46812012000" style="color:rgb(130,130,137)" target="_blank">+46 8 120 120 00
Reg no: 556737-0431
klarna.com



--

Jesper Eskilson
Senior Software Engineer
Kred Core
+46-72-855-8421

Klarna Bank AB (publ)
Sveavägen 46, 111 34 Stockholm
Tel: <a href="tel:+46812012000" style="color:rgb(130,130,137)" target="_blank">+46 8 120 120 00
Reg no: 556737-0431
klarna.com