Aprior source code and implementation