public function resolve(InputInterface $input, GeneratorInterface $generator, $forceInteractive = false)
    {
        $definition = $generator->getDefinition();
        $definition = $this->mergeApplicationDefinition($definition);
        $definition = new InputDefinition($definition);

        $input = clone $input;
        try {
            $input->bind($definition);
            $input->validate();
        } catch (\Exception $ex) {
            $forceInteractive = true;
        }
        $arguments = array_merge($input->getArguments(), $input->getOptions());
        $arguments = new Arguments($arguments, $forceInteractive || $generator->requiresInteraction());
        return $arguments;

        if ($forceInteractive || $generator->requiresInteraction()) {
            if (!$input->isInteractive()) {
                throw new \RuntimeException("Cannot interact with user.");
            }
            $constraints = $generator->getConstraints();
            $questioner = new Questioner($inputTypeRegistry, $this->output, $this->helperSet, $constraints);
            $arguments = $generator->interact($arguments, $questioner);
        }
        return $arguments;
    }