Science Fair Projects Ideas - Use-define chain

All Science Fair Projects

      

Science Fair Project Encyclopedia for Schools!

  Search    Browse    Forum  Coach    Links    Editor    Help    Tell-a-Friend    Encyclopedia    Dictionary     

Science Fair Project Encyclopedia

For information on any area of science that interests you,
enter a keyword (eg. scientific method, molecule, cloud, carbohydrate etc.).
Or else, you can start by choosing any of the categories below.

Use-define chain


In computer science, use-define chains model the relation between definitions of variables and their uses in a sequence of assignments

The list of statements determines a strong order among statements. We label statements using the following conventions: s(i) where i is an integer in [1,n] and n is the number of statements in the basic block; we identify variables in italic (e.g., v,u and t); we assume that every variable has a definition in the context (or scope): for a variable v we identify its declaration as V (italic capital letter) and for short we identify as s(0). In general, a declaration of a variable can be in an outer scope (e.g., we may deal with a global variable).

Definition of a variable: when a variable v is on the LHS of an assignment statement s(j), then s(j) is a definition of v. Every variable v has at least one definition by its declaration V (or initialization).

Use of a variable: if variable v is on the RHS of a statement s(j), there is a statement s(i), with i<j and min(j-i), that it is definition of v and it has a use at s(j). (we may use for short that when a variable v is on the RHS of a statement s(j), then v has a use at statement s(j).)

Consider now the sequential execution of the list of statements s(i) and consider that we observe the computation at statement j:

  • A definition at statement s(i) with i<j is alive at j, if it has a use at a statement s(k) with k ≥ j. We define the set of alive definitions at statement i as A(i) and we denote the number of alive definitions as |A(i)|.
  • A definition at statement s(i) kills all previous definitions (s(k) with k<i) for the same variables.

We build a use-def (or ud) chain as follows:

     set definitions in statement s(0)
     for each i in [1,n] 
       find alive definitions that have use in statement s(i)
       make a link among definitions and uses.
       set as definition statement the statement s(i)
       kill previous definitions

With this algorithm we do two things:

  1. We create a DAG structure on variables. The DAG specifies a data dependency among assignment statements and also it specifies a partial order (therefore parallelism among statements).
  2. When we reach a statement s(i) we have a list of alive variables-statements.
10-26-2009 08:16:03
The contents of this article is licensed from www.wikipedia.org under the GNU Free Documentation License. Click here to see the transparent copy and copyright details
Science kits, science lessons, science toys, maths toys, hobby kits, science games and books - these are some of many products that can help give your kid an edge in their science fair projects, and develop a tremendous interest in the study of science. When shopping for a science kit or other supplies, make sure that you carefully review the features and quality of the products. Compare prices by going to several online stores. Read product reviews online or refer to magazines.

Start by looking for your science kit review or science toy review. Compare prices but remember, Price $ is not everything. Quality does matter.
Science Fair Coach
What do science fair judges look out for?
ScienceHound
Science Fair Projects for students of all ages
All Science Fair Projects.com Site
All Science Fair Projects Homepage
Search | Browse | Links | From-our-Editor | Books | Help | Contact | Privacy | Disclaimer | Copyright Notice