↓ Skip to main content

Graphviz

The difference between shallow and deep embedding

Deep and shal­low em­bed­ding are terms as­so­ci­ated with Do­main Spe­cific Lan­guages (DSL). A DSL is a lan­guage geared to­ward a spe­cific do­main. The dot lan­guage is an ex­ample of such a DSL for de­scrib­ing Graphs. Con­cep­tu­ally, a shal­low em­bed­ding cap­tures the se­mantics of the data of the do­main in a data type and provides a fixed in­ter­pret­a­tion of the data, whereas a deep em­bed­ding goes bey­ond this and cap­tures the se­mantics of the op­er­a­tions on the do­main en­abling vari­able in­ter­pret­a­tions.

Combining graphviz (dot) and TikZ with dot2tex

We all want to cre­ate good look­ing doc­u­ments and good look­ing doc­u­ments need good look­ing im­ages. Be­cause we want con­sist­ency and be­cause we are lazy we want to do this as auto­matic as pos­sible. That is why we use LaTeX, it cre­ates beau­ti­fully type­set doc­u­ments without much manual ef­fort.