Imported PRIMAL source code.