Re: How to develop a random number generation device



On Sep 20, 2:16 pm, MooseFET <kensm...@xxxxxxxxx> wrote:
On Sep 19, 8:00 pm, JosephKK <joseph_barr...@xxxxxxxxxxxxx> wrote:

MooseFET kensm...@xxxxxxxxx posted to sci.electronics.design:

On Sep 19, 7:01 am, John Larkin
<jjlar...@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

No, I am making the true observation that complex digital logic
designs are usually bug-free, simple software systems have a chance
of being so, and complex software systems never are.

John

May i introduce you to a concept called cyclomatic complexity. The
cyclomatic complexity of 100's of interacting state machines is on
the order of 10^5 to 10^6. A memory array of regular blocks of
storage accessed by a regular decoder has a cyclomatic complexity of
on the order of 10 to 10^2. In the memory there is much
self-similarity across several orders of magnitude in size.

I agree entirely. People don't seem to appreciate how complex modern
software is. And for that matter just how difficult it is to write
absolutely bullet proof code that will never fail no matter what the
provocation.

So what exactly is the definition. It seems to me that just because
the memory is a repeated array in physical space, it needn't be in
logical space.- Hide quoted text -

It is actually a better metric for deciding on the number of test
cases needed to excerise every path in a complex decision network at
least once. Essentially it gives a path complexity count of all the
control flows through the code.

http://www.sei.cmu.edu/str/descriptions/cyclomatic_body.html
and
http://en.wikipedia.org/wiki/Cyclomatic_complexity

It should be better known in the industry.

I like McCabes CCI which I find a *very* good indicator of code likely
to contain bugs. It comes from a graph theory analysis of the
decision nodes in a routine. Although I disagree with the proponents
of this metric about exactly where the thresholds should be placed. It
is a good way to find dangerous spaggetti code sections in an
inheritted large project without having to read through everything.
And a good way to check for future maintainence traps.

I can pretty much guarantee that above a certain size or complexity
there will be bugs in a given routine. You will get more hits Googling
with the longer "Tom McCabe" and "cyclomatic complexity index". Sadly
it is yet another useful tool ignored by the mainstream. "McCabe's
CCI" gets mostly my own postings and a medical usage.

Regards,
Martin Brown

.



Relevant Pages

  • Re: Ada vs Ruby
    ... that for any mathematical system based upon a set of axioms there will ... This is why beyond a certain level of complexity it's helpful to use ... an interesting theoretical limitation of all software systems but it ...
    (comp.lang.ruby)
  • Re: How to develop a random number generation device
    ... and complex software systems never are. ... cyclomatic complexity of 100's of interacting state machines is on ... In the memory there is much ... top down program design. ...
    (sci.electronics.design)
  • Re: ALFREDO RIZZI - 21-st Century Breakthrough - AKS algorithm (primality test) is O log
    ... You have to read the number into memory! ... a paper where a present a new algorithm ... Input time does not matter. ... May I suggest that you read a book on complexity analysis? ...
    (sci.crypt)
  • Re: paul grahams arc, a new lisp, and his words about makign code ?shorter, vs forth?
    ... From the perspective of a programmer familiar with the bare metal under a system, things like garbage collection, memory management, and object orientation represent complicated protocols, complicated hardware, with more memory, processor cycles, and watts used. ... Take a language with garbage collection, memory management, and object orientation-- like Smalltalk. ... Complexity is one of those terms tossed around in comp.lang.forth that often has very little if any meaning. ...
    (comp.lang.forth)
  • Re: [Lhms-devel] [PATCH 0/7] Fragmentation Avoidance V19
    ... > rate of features and complexity going in. ... guarantee things, kswapd would need to know how to clear out UesrRclm ... > kernel memory. ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)