Embedded system design is inherently domain specific and typically model driven.As a result, design methodologies like OMG’s model driven architecture (MDA)and model integrated computing (MIC)evolved to support domain specific modeling language(DSMLs). The success of the DSML approach has encouraged work on the heterogeneous composition of DSMLs, model transformations between DSMLs, approximations of formal properties within DSMLs, and reuse of DSML semantics. However, in the effort to produce a mature design approach that can handle both the structural and behavioral semantics of embedded system design,many foundational issues concerning DSMLs have been overlooked. In this paper we present a formal foundation for DSMLs and for their construction within metamodeling frameworks. This foundation allows us to algorithmically decide if two DSMLs or metamodels are equivalent, if model transformations preserve properties, and if metamodeling frameworks have metametamodels. These results are key to building correct embedded systems with DSMLs.