Beefy Boxes and Bandwidth Generously Provided by pair Networks chromatic writing perl on a camel
No such thing as a small change
 
PerlMonks  

Re^2: An exploration of higher-level-language approaches to the "First all-zero row in an NxN matrix" problem (goto Considered Harmful)

by chromatic (Archbishop)
on Sep 25, 2011 at 21:23 UTC ( #927769=note: print w/ replies, xml ) Need Help??


in reply to Re: An exploration of higher-level-language approaches to the "First all-zero row in an NxN matrix" problem (goto Considered Harmful)
in thread An exploration of higher-level-language approaches to the "First all-zero row in an NxN matrix" problem (goto Considered Harmful)

... if you want to do any kind of formal proving of your program, life becomes much, much easier if your blocks of code have exactly one entry point, and exactly one exit point.

Certainly a more practical conclusion should be "functional units should do one and only one thing, and that thing well" instead of "avoid obvious flow control at any language level lower than the language primitive which enables functional units". Otherwise you have trouble with if.


Improve your skills with Modern Perl: the free book.


Comment on Re^2: An exploration of higher-level-language approaches to the "First all-zero row in an NxN matrix" problem (goto Considered Harmful)
Re^3: An exploration of higher-level-language approaches to the "First all-zero row in an NxN matrix" problem (goto Considered Harmful)
by JavaFan (Canon) on Sep 25, 2011 at 21:59 UTC
    Certainly a more practical conclusion should be "functional units should do one and only one thing, and that thing well"
    Eh? I don't follow. How's that even remotely related to having structured blocks?
    avoid obvious flow control at any language level lower than the language primitive which enables functional units". Otherwise you have trouble with if.
    How's that? An if construct is well understood when it comes to formal proofs, and it's a block with exactly one entry, and one exit point:
    ,---> then-block ---, / T \ pre ---> expression ---+ +---> post \ F / `---> else-block ---'

      What's a block, in this context? I'm familiar with basic blocks in terms of SSA and register allocation and flow analysis and optimization. The branch instructions necessary for conditions such as if delimit basic blocks.

      Because you can represent a program in terms of the relationships of these basic blocks, I question the problem of functional analysis. What am I missing?


      Improve your skills with Modern Perl: the free book.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://927769]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (8)
As of 2014-04-19 11:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (480 votes), past polls