Re: [Pharo-dev] control flow graph

2018-02-24 Thread Stephane Ducasse
Yes I know but closing counting closing brackets are easier to do on the AST. Now I imagine that variable reachability is easier with control flow. A control flow is an dedicated abstraction over a program. Now people I met want to use it to support clone detection between different language becaus

Re: [Pharo-dev] control flow graph

2018-02-24 Thread Tudor Girba
What kind of visualization would you have in mind? Doru > On Feb 24, 2018, at 11:51 AM, Clément Bera wrote: > > The control flow is just a visualisation, everything can be done without it, > it's just way more convenient to look at. > > On Feb 24, 2018 09:08, "Stephane Ducasse" wrote: > Cle

Re: [Pharo-dev] control flow graph

2018-02-24 Thread Clément Bera
The control flow is just a visualisation, everything can be done without it, it's just way more convenient to look at. On Feb 24, 2018 09:08, "Stephane Ducasse" wrote: > Clement this analysis can be done without a control flow no? > > > On Fri, Feb 23, 2018 at 11:47 AM, Clément Bera > wrote: >

Re: [Pharo-dev] control flow graph

2018-02-24 Thread Stephane Ducasse
Clement this analysis can be done without a control flow no? On Fri, Feb 23, 2018 at 11:47 AM, Clément Bera wrote: > I used that in the past on intermediate representations, I feel it is very > useful to directly edit the code of methods with large control flows since > when you have many closin

Re: [Pharo-dev] control flow graph

2018-02-24 Thread Stephane Ducasse
Tx. I was thinking about x = 3 ifTrue: [^ 66] ifFalse: [^ 88]. ^ 666 kind of analysis. Anyway for now I just continue to do it and we will see On Fri, Feb 23, 2018 at 2:27 PM, Peter Uhnák wrote: > It would be cool to have the graph for a method as a Calypso tool, so you > can see them sid

Re: [Pharo-dev] control flow graph

2018-02-23 Thread Peter Uhnák
It would be cool to have the graph for a method as a Calypso tool, so you can see them side by side :) On Fri, Feb 23, 2018 at 11:47 AM, Clément Bera wrote: > I used that in the past on intermediate representations, I feel it is very > useful to directly edit the code of methods with large contr

Re: [Pharo-dev] control flow graph

2018-02-23 Thread Clément Bera
I used that in the past on intermediate representations, I feel it is very useful to directly edit the code of methods with large control flows since when you have many closing brackets ] ] ] ] you never know where to write your code. Now it's specific to some use-cases such as algorithms where you

Re: [Pharo-dev] Control Flow Graph for Smalltalk

2015-07-06 Thread stepharo
I have the code of lex spoon (chuck) based on Olin stuff. If you are interested to see what you can do tiwh it. Le 6/7/15 17:42, Frank Shearar a écrit : Olin Shivers' k-CFA stuff also computes call flow graphs (and can infer types, and can determine when garbage can be released). A starting poi

Re: [Pharo-dev] Control Flow Graph for Smalltalk

2015-07-06 Thread Frank Shearar
Olin Shivers' k-CFA stuff also computes call flow graphs (and can infer types, and can determine when garbage can be released). A starting point might be here: http://matt.might.net/articles/implementation-of-kcfa-and-0cfa/ frank On 6 July 2015 at 14:30, Francisco Garau wrote: > Hi Nevena > > T

Re: [Pharo-dev] Control Flow Graph for Smalltalk

2015-07-06 Thread Francisco Garau
Hi Nevena To compute the control flow graph you would need to do concrete type inference. Search for Ole Agesen PhD thesis to have an idea what's that about. I've started a smalltalk implementation of his ideas in 2001 but never got beyond the proof of concept stage. I can forward the presenta

Re: [Pharo-dev] Control Flow Graph for Smalltalk

2015-07-06 Thread Alexandre Bergel
Hi Nevena, I can give you the code of what we have done in Hapao. We indicate the self-call per class: http://bergel.eu/download/papers/Berg12c-HapaoSCP.pdf As Nicolai and Clément said, this is rather easy to obtain. Cheers, Alexandre > On Jul 6, 2015, at 1:21 PM, Nevena Milojkovic wrote: >

Re: [Pharo-dev] Control Flow Graph for Smalltalk

2015-07-06 Thread Nicolai Hess
2015-07-06 13:21 GMT+02:00 Nevena Milojkovic : > Hi all, > > Can anybody point me towards some tool/paper with the possibility to > construct Control Flow Graph for Smalltalk? > There was a tool called compass. AFAIR it is a debugger that stores the execution path. (don't know where this is, I re

Re: [Pharo-dev] Control Flow Graph for Smalltalk

2015-07-06 Thread Clément Bera
I don't think there is such a tool or paper. I built such a tool for a compiler IR but I don't think it will fit your needs as I show strange IR nodes with compiler related information (it doesn't look like the original smalltalk code at all). The visualization is done with Roassal. I think if yo