SWIPL code