Re: give me some tips



Rod Pemberton schrieb:
"Michael Mair" <Michael.Mair@xxxxxxxxxxxxxxx> wrote in message
news:47je5kFfm5kqU1@xxxxxxxxxxxxxxxxx
Rod Pemberton schrieb:
"Michael Mair" <Michael.Mair@xxxxxxxxxxxxxxx> wrote in message
news:47j97dFf6t05U1@xxxxxxxxxxxxxxxxx
Rod Pemberton schrieb:
"Michael Mair" <Michael.Mair@xxxxxxxxxxxxxxx> wrote in message
news:47iu7rFfqgv6U1@xxxxxxxxxxxxxxxxx

Apart from that: Have a look at graph theory; there is much nice
stuff on the web and, as discrete maths goes, it is a fun subject
as you can state really deep problems on a sheet of paper within
five minutes so that everyone understands the problem but the
proof took a hundred years to be found and conversely can prove
things in an easily understandable way. If you understand graph
theory and get an intermediate representation of some code, you
are ready to do general (not target specific) optimisations.

Hmm, graph theory. I'll _definately_ have a look at this. It'll

probably

be a big time saver for me since my spatial relationship abilities are
(supposedly) off the charts.

I am not quite sure whether I understand this remark.
We are both talking about
http://en.wikipedia.org/wiki/Graph_theory ,
aren't we?

You were. I wasn't... But, I just went through a number of graph theory
pages. I'm not sure exactly where I can use it in a compiler (yet). In
other words, binary trees, stacks, and reverse polish notation seem to do
everything I'm thinking of at the moment... Maybe I'll get it in the
future. Since I was just skimming, I didn't get to heavily into the
mathematics of graph theory.

Okay, let us keep this basic.
If you introduce an intermediate representation, it is often
advantageous to introduce a graph with certain properties,
e.g. a tree; if you compile on a translation unit by translation
unit base, then you could make an abstract translation unit
the base of your tree and everything stored in file scope the
first level nodes. Then you descend, into functions, declarations,
statements, operations...
For intraprocedural analysis, you can build a hypergraph on top
of this tree representing your control flow, e.g. you can use
an SSA form for constant propagation, constant folding,
control flow optimisation, copy propagation, scope reduction, ...
The tree gives you the chance to navigate scopes (just stay on
one level).
Recognition of certain patterns as detection of certain kinds
of induced subgraphs can be much easier.
One key to success is an appropriate intermediate representation;
here is one point where intellectual property can rest.

TenDRA's ANDF

This one's new to me.

Darn. I couldn't get a version for my OS, and was hoping someone had some
familiarity with ANDF...
http://www.info.uni-karlsruhe.de/~andf/index.htm

The TenDRA C and C++ compiler has two branches:
http://www.ten15.org/
http://www.tendra.org/

Anyway, thank you for the information :-)

LCC's DAGs
Necula's CIL

So far, the only "C" compiler I've found that uses both a yacc and lex
grammar is Lutz Hamel's "C Subset Compiler" WCC for VMS.

Hmmm, as resources go, you probably know
http://www.lysator.liu.se/c/ANSI-C-grammar-y.html

Yes, I've updated for myself, both his flex and bison grammar's to C99.

Would you put that up on the clc wiki?
BTW: We made it back on topic ;-)

Are you aware of Edward Willink's C++ grammars:
http://www.computing.surrey.ac.uk/research/dsrg/fog/

Unfortunately, some of his links are incorrect, extra /v/. These are
corrected:
CxxGrammar.y
http://www.computing.surrey.ac.uk/research/dsrg/fog/CxxGrammar.y
CxxTester.y http://www.computing.surrey.ac.uk/research/dsrg/fog/CxxTester.y
FogGrammar.y
http://www.computing.surrey.ac.uk/research/dsrg/fog/FogGrammar.y
FogTester.y http://www.computing.surrey.ac.uk/research/dsrg/fog/FogTester.y

I will check these out, too.


Cheers
Michael
--
E-Mail: Mine is an /at/ gmx /dot/ de address.
.



Relevant Pages

  • Re: Three Kinds of Logical Trees
    ... >>> That strikes me as a nonstardard definition of the use of metadata, ... >> metadata & data from an RDBMS into an xml dom tree. ... I think this is just a representation issue. ...
    (comp.databases.theory)
  • Re: Problem for physicalist evolutionists
    ... then the processing did indeed represent which fairy lights would go ... How could the robot brain in a vat ... looked at a tree. ... to of had the representation of a tree, ...
    (talk.origins)
  • Re: Problem for physicalist evolutionists
    ... then the processing did indeed represent which fairy lights would go ... How could the robot brain in a vat ... looked at a tree. ... to of had the representation of a tree, ...
    (talk.origins)
  • Re: No TABLES in html. No hacks in CSS. Any layout possible, crossbrowser. Try it.
    ... *tree* that is still a semantically incorrect representation of the ... The DOM tree isn't subject to the requirements of the HTML DTD. ...
    (comp.infosystems.www.authoring.html)
  • Re: CPtrList - Please Help me understand
    ... object of type notice*, and you won't need to do casts at all. ... >Now although bp has a pointer to an object of type B (which we know because we created ... >compiler now happily does the assignment. ... >Generally, casting has no effect on the representation of a value, other than instructing ...
    (microsoft.public.vc.mfc)