In this paper, we propose a new method to optimize the occupied memory of embedded software in the design phase based on DSL, T4 and Topological sort. A program is specified as a chain of tasks and the relationship between the tasks. The program is expressed by the dependence graph as a directed graph. | Journal of Computer Science and Cybernetics, , (2012), 234 244 OPTIMIZING OCCUPIED MEMORY OF EMBEDDED SOFTWARE IN THE DESIGN PHASE∗ PHAM VAN HUONG, NGUYEN NGOC BINH, PHAM NGOC THANH 1 University of Engineering and Technology, Vietnam National University, Hanoi, Vietnam Tóm t t. Trong xu th¸ ph¡t triºn m¤nh m³ cõa cæng ngh» ph¦n m·m nhóng hi»n nay, v§n · tèi ÷u ph¦n m·m nhóng câ vai trá quan trång. Vi»c ¡nh gi¡ v tèi ÷u ph¦n m·m nhóng trong giai o¤n thi¸t k¸ em l¤i nhi·u lñi ½ch. Trong b i b¡o n y, chóng tæi ÷a ra ph÷ìng ph¡p mîi tèi ÷u bë nhî chi¸m döng cõa ph¦n m·m nhóng trong giai o¤n thi¸t k¸ düa tr¶n sp x¸p Tæ-pæ (thù tü Tæ-pæ), ngæn ngú mi·n x¡c ành (DSL) v cæng ngh» sinh m¢ T4. Méi ch÷ìng tr¼nh ÷ñc °c t£ theo mët chuéi c¡c t¡c vö v quan h» giúa c¡c t¡c vö. Theo â, ch÷ìng tr¼nh ÷ñc biºu di¹n b¬ng mët ç thà phö thuëc cõa chuéi t¡c vö. Méi ¿nh trong ç thà biºu di¹n mët t¡c vö, méi t¡c vö gçm c¡c thæng tin °c t£ nh÷ t¶n, ¦u v o, ¦u ra. Méi c¤nh biºu di¹n sü phö thuëc giúa c¡c t¡c vö. Ch÷ìng tr¼nh câ thº thüc hi»n theo c¡c thù tü Tæ-pæ kh¡c nhau m khæng l m thay êi k¸t qu£ nh÷ng mùc chi¸m döng bë nhî cõa ch÷ìng tr¼nh s³ kh¡c nhau tr¶n c¡c thù tü Tæ-pæ. Tø ç thà phö thuëc, chóng tæi t¼m måi thù tü Tæ-pæ v x¥y düng h m ¡nh gi¡ mùc chi¸m döng bë nhî cõa ch÷ìng tr¼nh theo thù tü Tæ-pæ º chån chuéi Tæ-pæ câ mùc chi¸m döng bë nhî th§p nh§t. Abstract. Nowadays, the optimizing embedded software plays an important role in the development of embedded software technology. The evaluation and optimization of embedded software in the design phase bring various benefits. In this paper, we propose a new method to optimize the occupied memory of embedded software in the design phase based on DSL, T4 and Topological sort. A program is specified as a chain of tasks and the relationship between the tasks. The program is expressed by the dependence graph as a directed graph. Each node in the directed graph describes a task, which consists of .