diff --git a/app/helpers/Evaluation/EvaluationResults/TaskResults/EvaluationTaskResult.php b/app/helpers/Evaluation/EvaluationResults/TaskResults/EvaluationTaskResult.php index 8a547310b..f9674148c 100644 --- a/app/helpers/Evaluation/EvaluationResults/TaskResults/EvaluationTaskResult.php +++ b/app/helpers/Evaluation/EvaluationResults/TaskResults/EvaluationTaskResult.php @@ -10,7 +10,6 @@ */ class EvaluationTaskResult extends TaskResult { - /** @var float|null Explicit score from the results */ private $score = null; diff --git a/app/helpers/ExerciseConfig/Pipeline/Box/BoxService.php b/app/helpers/ExerciseConfig/Pipeline/Box/BoxService.php index 45ada6b5a..740726335 100644 --- a/app/helpers/ExerciseConfig/Pipeline/Box/BoxService.php +++ b/app/helpers/ExerciseConfig/Pipeline/Box/BoxService.php @@ -13,7 +13,6 @@ */ class BoxService { - /** * Associative array indexed by type identifier and containing * identifications of box classes. @@ -38,8 +37,6 @@ public function __construct() ElfExecutionBox::$ELF_EXEC_TYPE => ElfExecutionBox::class, WrappedExecutionBox::$BOX_TYPE => WrappedExecutionBox::class, FpcCompilationBox::$FPC_TYPE => FpcCompilationBox::class, - MonoCompilationBox::$MCS_TYPE => MonoCompilationBox::class, - MonoExecutionBox::$MONO_EXEC_TYPE => MonoExecutionBox::class, FetchFilesBox::$FETCH_TYPE => FetchFilesBox::class, FetchFileBox::$FETCH_TYPE => FetchFileBox::class, Python3RunBox::$BOX_TYPE => Python3RunBox::class, diff --git a/app/helpers/ExerciseConfig/Pipeline/Box/Boxes/MonoCompilationBox.php b/app/helpers/ExerciseConfig/Pipeline/Box/Boxes/MonoCompilationBox.php deleted file mode 100644 index 21b850968..000000000 --- a/app/helpers/ExerciseConfig/Pipeline/Box/Boxes/MonoCompilationBox.php +++ /dev/null @@ -1,164 +0,0 @@ -setName(self::$MAIN_CLASS_PORT_KEY)->setType(VariableTypes::$STRING_TYPE)), - new Port( - (new PortMeta())->setName(self::$EXTERNAL_SOURCES_PORT_KEY)->setType( - VariableTypes::$FILE_ARRAY_TYPE - ) - ), - new Port((new PortMeta())->setName(self::$ARGS_PORT_KEY)->setType(VariableTypes::$STRING_ARRAY_TYPE)), - new Port( - (new PortMeta())->setName(self::$SOURCE_FILES_PORT_KEY)->setType(VariableTypes::$FILE_ARRAY_TYPE) - ), - new Port( - (new PortMeta())->setName(self::$EXTRA_FILES_PORT_KEY)->setType(VariableTypes::$FILE_ARRAY_TYPE) - ) - ); - self::$defaultOutputPorts = array( - new Port((new PortMeta())->setName(self::$ASSEMBLY_FILE_PORT_KEY)->setType(VariableTypes::$FILE_TYPE)) - ); - } - } - - /** - * JudgeNormalBox constructor. - * @param BoxMeta $meta - */ - public function __construct(BoxMeta $meta) - { - parent::__construct($meta); - } - - - /** - * Get type of this box. - * @return string - */ - public function getType(): string - { - return self::$MCS_TYPE; - } - - /** - * Get default input ports for this box. - * @return array - */ - public function getDefaultInputPorts(): array - { - self::init(); - return self::$defaultInputPorts; - } - - /** - * Get default output ports for this box. - * @return array - */ - public function getDefaultOutputPorts(): array - { - self::init(); - return self::$defaultOutputPorts; - } - - /** - * Get default name of this box. - * @return string - */ - public function getDefaultName(): string - { - return self::$DEFAULT_NAME; - } - - - /** - * Compile box into set of low-level tasks. - * @param CompilationParams $params - * @return array - */ - public function compile(CompilationParams $params): array - { - $task = $this->compileBaseTask($params); - $task->setCommandBinary(self::$MCS_BINARY); - - $args = []; - if ($this->hasInputPortValue(self::$ARGS_PORT_KEY)) { - $args = $this->getInputPortValue(self::$ARGS_PORT_KEY)->getValue(); - } - $externalSources = []; - if ($this->hasInputPortValue(self::$EXTERNAL_SOURCES_PORT_KEY)) { - $externalSources = $this->getInputPortValue(self::$EXTERNAL_SOURCES_PORT_KEY) - ->getValue(ConfigParams::$EVAL_DIR); - } - $extraFiles = []; - if ($this->hasInputPortValue(self::$EXTRA_FILES_PORT_KEY)) { - $extraFiles = $this->getInputPortValue(self::$EXTRA_FILES_PORT_KEY) - ->getValue(ConfigParams::$EVAL_DIR); - } - $mainClass = []; - if ($this->hasInputPortValue(self::$MAIN_CLASS_PORT_KEY)) { - $mainClass = [ - "-main:" . $this->getInputPortValue(self::$MAIN_CLASS_PORT_KEY)->getValue() - ]; - } - - $task->setCommandArguments( - array_merge( - $args, - $this->getInputPortValue(self::$SOURCE_FILES_PORT_KEY) - ->getValue(ConfigParams::$EVAL_DIR), - $externalSources, - $extraFiles, - $mainClass, - [ - "-out:" . $this->getOutputPortValue(self::$ASSEMBLY_FILE_PORT_KEY) - ->getValue(ConfigParams::$EVAL_DIR) - ] - ) - ); - - // check if file produced by compilation was successfully created - $binary = $this->getOutputPortValue(self::$ASSEMBLY_FILE_PORT_KEY)->getDirPrefixedValue( - ConfigParams::$SOURCE_DIR - ); - $exists = $this->compileExistsTask([$binary]); - - return [$task, $exists]; - } -} diff --git a/app/helpers/ExerciseConfig/Pipeline/Box/Boxes/MonoExecutionBox.php b/app/helpers/ExerciseConfig/Pipeline/Box/Boxes/MonoExecutionBox.php deleted file mode 100644 index 91323b55b..000000000 --- a/app/helpers/ExerciseConfig/Pipeline/Box/Boxes/MonoExecutionBox.php +++ /dev/null @@ -1,117 +0,0 @@ -setName(self::$ARGS_PORT_KEY)->setType(VariableTypes::$STRING_ARRAY_TYPE)), - new Port((new PortMeta())->setName(self::$STDIN_FILE_PORT_KEY)->setType(VariableTypes::$FILE_TYPE)), - new Port( - (new PortMeta())->setName(self::$INPUT_FILES_PORT_KEY)->setType(VariableTypes::$FILE_ARRAY_TYPE) - ), - new Port((new PortMeta())->setName(self::$ASSEMBLY_FILE_PORT_KEY)->setType(VariableTypes::$FILE_TYPE)) - ); - self::$defaultOutputPorts = array( - new Port((new PortMeta())->setName(self::$STDOUT_FILE_PORT_KEY)->setType(VariableTypes::$FILE_TYPE)), - new Port((new PortMeta())->setName(self::$OUTPUT_FILE_PORT_KEY)->setType(VariableTypes::$FILE_TYPE)) - ); - } - } - - /** - * ElfExecutionBox constructor. - * @param BoxMeta $meta - */ - public function __construct(BoxMeta $meta) - { - parent::__construct($meta); - } - - - /** - * Get type of this box. - * @return string - */ - public function getType(): string - { - return self::$MONO_EXEC_TYPE; - } - - /** - * Get default input ports for this box. - * @return array - */ - public function getDefaultInputPorts(): array - { - self::init(); - return self::$defaultInputPorts; - } - - /** - * Get default output ports for this box. - * @return array - */ - public function getDefaultOutputPorts(): array - { - self::init(); - return self::$defaultOutputPorts; - } - - /** - * Get default name of this box. - * @return string - */ - public function getDefaultName(): string - { - return self::$DEFAULT_NAME; - } - - /** - * Compile box into set of low-level tasks. - * @param CompilationParams $params - * @return array - * @throws ExerciseConfigException - */ - public function compile(CompilationParams $params): array - { - $task = $this->compileBaseTask($params); - $task->setCommandBinary(self::$MONO_BINARY); - - $args = [$this->getInputPortValue(self::$ASSEMBLY_FILE_PORT_KEY)->getValue(ConfigParams::$EVAL_DIR)]; - if ($this->hasInputPortValue(self::$ARGS_PORT_KEY)) { - $args = array_merge($args, $this->getInputPortValue(self::$ARGS_PORT_KEY)->getValue()); - } - $task->setCommandArguments($args); - - return [$task]; - } -}