bidirectnal code write and commpile