default_params['interpreterargs'] = array(''); } public static function getVersionCommand() { return array('swipl -v', '/version ([0-9._]*)/'); } public function compile() { $cmd = "swipl -t halt -s {$this->sourceFileName}"; $this->executableFileName = $this->sourceFileName; list($output, $this->cmpinfo) = $this->run_in_sandbox($cmd); if (!empty($this->cmpinfo) && !empty($output)) { $this->cmpinfo = $output . '\n' . $this->cmpinfo; } } // A default name for SWI-Prolog programs public function defaultFileName($sourcecode) { return 'prog.pl'; } public function getExecutablePath() { return '/usr/bin/swipl'; } public function getTargetFile() { return $this->sourceFileName;