Multi-threaded programs have many applications which are widely used such as operating systems. Analyzing multi-threaded programs differs from sequential ones; the main feature is that many threads execute at the same time. The effect of all other running threads must be taken in account. This these focuses on the analysis of multi-threaded programs. The first aim of our work is to implement partial redundancy elimination for multi-threaded programs via type systems. Partial redundancy elimination is among the most powerful compiler optimization: it performs loop invariant code motion and common subexpression elimination. In chapter 3, we present a type system with optimization component which performs partial redundancy elimination for a multi-threaded programs. In chapter 4, we designed a type systems based data race detector. Data race occurs when two threads try to access a shared variable at the same time without a proper synchronization. A detector is a software that determines if the program contains a data-race problem or not. In this these we develop a detector that has the form of a type system. We present a type system which discovers the data-race problems. We also prove the soundness of our type system. |