Re: Semantical checks that involve flow of execution of the program

ChokSheak Lau <choksheak@yahoo.com>
21 Oct 2004 22:30:08 -0400

          From comp.compilers

Related articles
Semantical checks that involve flow of execution of the program lujoplujop@gmail.com (Lujop) (2004-10-17)
Re: Semantical checks that involve flow of execution of the program skaller@nospam.com.au (John Max Skaller) (2004-10-21)
Re: Semantical checks that involve flow of execution of the program choksheak@yahoo.com (ChokSheak Lau) (2004-10-21)
| List of all articles for this month |
From: ChokSheak Lau <choksheak@yahoo.com>
Newsgroups: comp.compilers
Date: 21 Oct 2004 22:30:08 -0400
Organization: Georgia Institute of Technology
References: 04-10-122
Keywords: semantics
Posted-Date: 21 Oct 2004 22:30:08 EDT

Hi Lujop,


To check which variables were never initialized, you need to do
liveness analysis. the variables that are live at the top of the entry
basic block are those that were never initialized (of course, excusing
the function parameters).


if you don't know what is "liveness" or CFG, please feel free to post to the
newsgroup, and I'm sure some kind souls will be willing to help you out.


chok


Lujop wrote:
> I'm writting a compiler for a pseudocode language similar to Java. I
> use a pred-LL(1) parser (with ANTLR) and I construct an AST that I
> walk several times (currently twice) to do the semantical checking.
> Well my question is that I want to do some intelligent checks for
> program flow like Java does.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.