On 20/08/2012, at 4:30 PM, Dobes Vandermeer wrote:
> 
> There's a kind of program transformation called "static single assignment" 
> (SSA) that views each assignment to a local variable (var) as a new name.

Indeed. Felix does that. I previously described it, in terms
of unravelling and re-ravelling.

SSA is just a decomposition. It's often used to ready code
for control or data flow analysis.

Control analysis is simpler, but with closures it can still
be very tricky!

Data flow analysis of any kind is very hard.

I'd love to have a data flow analysis in Felix.
It would improve the optimiser out of sight.

At present Felix only uses local pattern matching
and a couple of global scans.

You're getting confused about evaluation. C does eager evaluation
of arguments. Haskell does lazy.

Felix does either lazy, eager, or unspecified. The default is unspecified.

SSA form you're thinking of you're assuming assignments are eager
and considering re-orderings that don't change "semantics".

In other words you're *defining* semantics as eager.

The point you're missing is that Felix doesn't.
Neither does Haskell.

The 3 mode evaluation strategy used in Felix is more flexible
that any other programming language. you can force eager,
you can force lazy, or you can leave it up to the compiler to choose
whichever is faster. 

The default is to leave it  up to the compiler. That means YOU are
responsible for recognising when the default isn't what you want.

That's a purely "concrete syntax" choice. You don't like it.
You'd rather the default be determinate.  It isn't for good reason:
it rarely makes any difference unless you're writing very high level
code, in which case you're smart enough to know you have to change
the strategy.

I got caught myself, several times. RF got caught. Mike Maui got
caught. So far you (Dobes) know about it but haven't been,
which makes you smarter than the rest of us :)

--
john skaller
skal...@users.sourceforge.net
http://felix-lang.org




------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Felix-language mailing list
Felix-language@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to