diff --git a/packages/safe-ds-lang/src/language/generation/safe-ds-python-generator.ts b/packages/safe-ds-lang/src/language/generation/safe-ds-python-generator.ts index d9d120322..21dbaa629 100644 --- a/packages/safe-ds-lang/src/language/generation/safe-ds-python-generator.ts +++ b/packages/safe-ds-lang/src/language/generation/safe-ds-python-generator.ts @@ -28,6 +28,8 @@ import { isSdsBlockLambdaResult, isSdsCall, isSdsCallable, + isSdsClass, + isSdsDeclaration, isSdsEnumVariant, isSdsExpressionLambda, isSdsExpressionStatement, @@ -38,6 +40,7 @@ import { isSdsMap, isSdsMemberAccess, isSdsModule, + isSdsParameter, isSdsParenthesizedExpression, isSdsPipeline, isSdsPlaceholder, @@ -58,6 +61,7 @@ import { SdsAssignment, SdsBlock, SdsBlockLambda, + SdsCall, SdsDeclaration, SdsExpression, SdsModule, @@ -72,10 +76,12 @@ import { isInStubFile, isStubFile } from '../helpers/fileExtensions.js'; import { IdManager } from '../helpers/idManager.js'; import { getAbstractResults, + getArguments, getAssignees, getImportedDeclarations, getImports, getModuleMembers, + getParameters, getPlaceholderByName, getStatements, Parameter, @@ -92,7 +98,7 @@ import { import { SafeDsPartialEvaluator } from '../partialEvaluation/safe-ds-partial-evaluator.js'; import { SafeDsServices } from '../safe-ds-module.js'; import { SafeDsPurityComputer } from '../purity/safe-ds-purity-computer.js'; -import { ImpurityReason } from '../purity/model.js'; +import { FileRead, ImpurityReason } from '../purity/model.js'; export const CODEGEN_PREFIX = '__gen_'; const BLOCK_LAMBDA_PREFIX = `${CODEGEN_PREFIX}block_lambda_`; @@ -222,10 +228,31 @@ export class SafeDsPythonGenerator { return mapper.toString(); } + private getPythonModuleOrDefault(object: SdsModule) { + return this.builtinAnnotations.getPythonModule(object) || object.name; + } + private getPythonNameOrDefault(object: SdsDeclaration) { return this.builtinAnnotations.getPythonName(object) || object.name; } + private getQualifiedNamePythonCompatible(node: SdsDeclaration | undefined): string | undefined { + const segments = []; + + let current: SdsDeclaration | undefined = node; + while (current) { + const currentName = isSdsModule(current) + ? this.getPythonModuleOrDefault(current) + : this.getPythonNameOrDefault(current); + if (currentName) { + segments.unshift(currentName); + } + current = getContainerOfType(current.$container, isSdsDeclaration); + } + + return segments.join('.'); + } + private formatGeneratedFileName(baseName: string): string { return `gen_${this.sanitizeModuleNameForPython(baseName)}`; } @@ -634,27 +661,29 @@ export class SafeDsPythonGenerator { return traceToNode(expression)(frame.getUniqueLambdaBlockName(expression)); } else if (isSdsCall(expression)) { const callable = this.nodeMapper.callToCallable(expression); - if (isSdsFunction(callable)) { - const pythonCall = this.builtinAnnotations.getPythonCall(callable); - if (pythonCall) { + const sortedArgs = this.sortArguments(getArguments(expression)); + // Memoize constructor or function call + if (isSdsFunction(callable) || isSdsClass(callable)) { + if (isSdsFunction(callable)) { + const pythonCall = this.builtinAnnotations.getPythonCall(callable); + if (pythonCall) { + let thisParam: CompositeGeneratorNode | undefined = undefined; + if (isSdsMemberAccess(expression.receiver)) { + thisParam = this.generateExpression(expression.receiver.receiver, frame); + } + const argumentsMap = this.getArgumentsMap(getArguments(expression), frame); + return this.generatePythonCall(expression, pythonCall, argumentsMap, frame, thisParam); + } + } + if (this.isMemoizableCall(expression)) { let thisParam: CompositeGeneratorNode | undefined = undefined; if (isSdsMemberAccess(expression.receiver)) { thisParam = this.generateExpression(expression.receiver.receiver, frame); } - const argumentsMap = this.getArgumentsMap(expression.argumentList.arguments, frame); - return this.generatePythonCall(expression, pythonCall, argumentsMap, thisParam); + return this.generateMemoizedCall(expression, sortedArgs, frame, thisParam); } } - - const sortedArgs = this.sortArguments(expression.argumentList.arguments); - return expandTracedToNode(expression)`${this.generateExpression( - expression.receiver, - frame, - )}(${joinTracedToNode(expression.argumentList, 'arguments')( - sortedArgs, - (arg) => this.generateArgument(arg, frame), - { separator: ', ' }, - )})`; + return this.generatePlainCall(expression, sortedArgs, frame); } else if (isSdsExpressionLambda(expression)) { return expandTracedToNode(expression)`lambda ${this.generateParameters( expression.parameterList, @@ -753,10 +782,22 @@ export class SafeDsPythonGenerator { throw new Error(`Unknown expression type: ${expression.$type}`); } + private generatePlainCall( + expression: SdsCall, + sortedArgs: SdsArgument[], + frame: GenerationInfoFrame, + ): CompositeGeneratorNode { + return expandTracedToNode(expression)`${this.generateExpression(expression.receiver, frame)}(${joinTracedToNode( + expression.argumentList, + 'arguments', + )(sortedArgs, (arg) => this.generateArgument(arg, frame), { separator: ', ' })})`; + } + private generatePythonCall( - expression: SdsExpression, + expression: SdsCall, pythonCall: string, argumentsMap: Map, + frame: GenerationInfoFrame, thisParam: CompositeGeneratorNode | undefined = undefined, ): CompositeGeneratorNode { if (thisParam) { @@ -764,7 +805,7 @@ export class SafeDsPythonGenerator { } const splitRegex = /(\$[_a-zA-Z][_a-zA-Z0-9]*)/gu; const splitPythonCallDefinition = pythonCall.split(splitRegex); - return joinTracedToNode(expression)( + const generatedPythonCall = joinTracedToNode(expression)( splitPythonCallDefinition, (part) => { if (splitRegex.test(part)) { @@ -775,6 +816,115 @@ export class SafeDsPythonGenerator { }, { separator: '' }, )!; + // Non-memoizable calls can be directly generated + if (!this.isMemoizableCall(expression)) { + return generatedPythonCall; + } + frame.addImport({ importPath: RUNNER_SERVER_PIPELINE_MANAGER_PACKAGE }); + const hiddenParameters = this.getMemoizedCallHiddenParameters(expression, frame); + const callable = this.nodeMapper.callToCallable(expression); + const memoizedArgs = getParameters(callable).map( + (parameter) => this.nodeMapper.callToParameterValue(expression, parameter)!, + ); + return expandTracedToNode( + expression, + )`${RUNNER_SERVER_PIPELINE_MANAGER_PACKAGE}.runner_memoized_function_call("${this.generateFullyQualifiedFunctionName( + expression, + )}", lambda *_ : ${generatedPythonCall}, [${joinTracedToNode(expression.argumentList, 'arguments')( + memoizedArgs, + (arg) => this.generateExpression(arg, frame), + { separator: ', ' }, + )}], [${joinToNode(hiddenParameters, (param) => param, { separator: ', ' })}])`; + } + + private isMemoizableCall(expression: SdsCall): boolean { + const impurityReasons = this.purityComputer.getImpurityReasonsForExpression(expression); + // If the file is not known, the call is not memoizable + return !impurityReasons.some((reason) => !(reason instanceof FileRead) || reason.path === undefined); + } + + private generateMemoizedCall( + expression: SdsCall, + sortedArgs: SdsArgument[], + frame: GenerationInfoFrame, + thisParam: CompositeGeneratorNode | undefined = undefined, + ): CompositeGeneratorNode { + frame.addImport({ importPath: RUNNER_SERVER_PIPELINE_MANAGER_PACKAGE }); + const hiddenParameters = this.getMemoizedCallHiddenParameters(expression, frame); + const memoizedArgs = getParameters(this.nodeMapper.callToCallable(expression)).map( + (parameter) => this.nodeMapper.callToParameterValue(expression, parameter)!, + ); + const containsOptionalArgs = sortedArgs.some((arg) => + Parameter.isOptional(this.nodeMapper.argumentToParameter(arg)), + ); + const fullyQualifiedTargetName = this.generateFullyQualifiedFunctionName(expression); + return expandTracedToNode( + expression, + )`${RUNNER_SERVER_PIPELINE_MANAGER_PACKAGE}.runner_memoized_function_call("${fullyQualifiedTargetName}", ${ + containsOptionalArgs ? 'lambda *_ : ' : '' + }${ + containsOptionalArgs + ? this.generatePlainCall(expression, sortedArgs, frame) + : isSdsMemberAccess(expression.receiver) && isSdsCall(expression.receiver.receiver) + ? expandTracedToNode(expression.receiver)`${this.generateExpression( + expression.receiver.receiver.receiver, + frame, + )}.${this.generateExpression(expression.receiver.member!, frame)}` + : this.generateExpression(expression.receiver, frame) + }, [${thisParam ? thisParam.append(', ') : ''}${joinTracedToNode(expression.argumentList, 'arguments')( + memoizedArgs, + (arg) => this.generateExpression(arg, frame), + { + separator: ', ', + }, + )}], [${joinToNode(hiddenParameters, (param) => param, { separator: ', ' })}])`; + } + + private getMemoizedCallHiddenParameters(expression: SdsCall, frame: GenerationInfoFrame): CompositeGeneratorNode[] { + const impurityReasons = this.purityComputer.getImpurityReasonsForExpression(expression); + const hiddenParameters: CompositeGeneratorNode[] = []; + for (const reason of impurityReasons) { + if (reason instanceof FileRead) { + if (typeof reason.path === 'string') { + hiddenParameters.push( + expandTracedToNode( + expression, + )`${RUNNER_SERVER_PIPELINE_MANAGER_PACKAGE}.runner_filemtime('${reason.path}')`, + ); + } else if (isSdsParameter(reason.path)) { + const argument = this.nodeMapper + .parametersToArguments([reason.path], getArguments(expression)) + .get(reason.path); + if (!argument) { + /* c8 ignore next 4 */ + throw new Error( + 'File Read impurity with dependency on parameter is present on call, but no argument has been provided.', + ); + } + hiddenParameters.push( + expandTracedToNode( + argument, + )`${RUNNER_SERVER_PIPELINE_MANAGER_PACKAGE}.runner_filemtime(${this.generateArgument( + argument, + frame, + )})`, + ); + } + } + } + return hiddenParameters; + } + + private generateFullyQualifiedFunctionName(expression: SdsCall): string { + const callable = this.nodeMapper.callToCallable(expression); + if (isSdsDeclaration(callable)) { + const fullyQualifiedReferenceName = this.getQualifiedNamePythonCompatible(callable); + if (fullyQualifiedReferenceName) { + return fullyQualifiedReferenceName; + } + } + /* c8 ignore next */ + throw new Error('Callable of provided call does not exist or is not a declaration.'); } private getArgumentsMap( @@ -803,10 +953,14 @@ export class SafeDsPythonGenerator { .map((value) => value.arg); } - private generateArgument(argument: SdsArgument, frame: GenerationInfoFrame): CompositeGeneratorNode { + private generateArgument( + argument: SdsArgument, + frame: GenerationInfoFrame, + generateOptionalParameterName: boolean = true, + ): CompositeGeneratorNode { const parameter = this.nodeMapper.argumentToParameter(argument); return expandTracedToNode(argument)`${ - parameter !== undefined && !Parameter.isRequired(parameter) + parameter !== undefined && !Parameter.isRequired(parameter) && generateOptionalParameterName ? expandToNode`${this.generateParameter(parameter, frame, false)}=` : '' }${this.generateExpression(argument.value, frame)}`; @@ -830,13 +984,13 @@ export class SafeDsPythonGenerator { if (declaration === importedDeclaration.declaration?.ref) { if (importedDeclaration.alias !== undefined) { return { - importPath: this.builtinAnnotations.getPythonModule(targetModule) || value.package, + importPath: this.getPythonModuleOrDefault(targetModule), declarationName: importedDeclaration.declaration?.ref?.name, alias: importedDeclaration.alias.alias, }; } else { return { - importPath: this.builtinAnnotations.getPythonModule(targetModule) || value.package, + importPath: this.getPythonModuleOrDefault(targetModule), declarationName: importedDeclaration.declaration?.ref?.name, }; } @@ -845,7 +999,7 @@ export class SafeDsPythonGenerator { } if (isSdsWildcardImport(value)) { return { - importPath: this.builtinAnnotations.getPythonModule(targetModule) || value.package, + importPath: this.getPythonModuleOrDefault(targetModule), declarationName: declaration.name, }; } @@ -862,9 +1016,9 @@ export class SafeDsPythonGenerator { const targetModule = findRootNode(declaration); if (currentModule !== targetModule && !isInStubFile(targetModule)) { return { - importPath: `${ - this.builtinAnnotations.getPythonModule(targetModule) || targetModule.name - }.${this.formatGeneratedFileName(this.getModuleFileBaseName(targetModule))}`, + importPath: `${this.getPythonModuleOrDefault(targetModule)}.${this.formatGeneratedFileName( + this.getModuleFileBaseName(targetModule), + )}`, declarationName: this.getPythonNameOrDefault(declaration), }; } diff --git a/packages/safe-ds-lang/tests/resources/generation/expressions/block lambda result/output/tests/generator/blockLambdaResult/gen_input.py b/packages/safe-ds-lang/tests/resources/generation/expressions/block lambda result/output/tests/generator/blockLambdaResult/gen_input.py index ebd90a46b..aa942c113 100644 --- a/packages/safe-ds-lang/tests/resources/generation/expressions/block lambda result/output/tests/generator/blockLambdaResult/gen_input.py +++ b/packages/safe-ds-lang/tests/resources/generation/expressions/block lambda result/output/tests/generator/blockLambdaResult/gen_input.py @@ -1,3 +1,7 @@ +# Imports ---------------------------------------------------------------------- + +import safeds_runner.server.pipeline_manager + # Segments --------------------------------------------------------------------- def f1(l): @@ -11,11 +15,11 @@ def f2(l): def test(): def __gen_block_lambda_0(a, b): - __gen_block_lambda_result_d = g() + __gen_block_lambda_result_d = safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.blockLambdaResult.g", g, [], []) return __gen_block_lambda_result_d f1(__gen_block_lambda_0) def __gen_block_lambda_1(a, b): - __gen_block_lambda_result_d = g() - __gen_block_lambda_result_e = g() + __gen_block_lambda_result_d = safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.blockLambdaResult.g", g, [], []) + __gen_block_lambda_result_e = safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.blockLambdaResult.g", g, [], []) return __gen_block_lambda_result_d, __gen_block_lambda_result_e f2(__gen_block_lambda_1) diff --git a/packages/safe-ds-lang/tests/resources/generation/expressions/block lambda result/output/tests/generator/blockLambdaResult/gen_input.py.map b/packages/safe-ds-lang/tests/resources/generation/expressions/block lambda result/output/tests/generator/blockLambdaResult/gen_input.py.map index 12c2af08e..343153b64 100644 --- a/packages/safe-ds-lang/tests/resources/generation/expressions/block lambda result/output/tests/generator/blockLambdaResult/gen_input.py.map +++ b/packages/safe-ds-lang/tests/resources/generation/expressions/block lambda result/output/tests/generator/blockLambdaResult/gen_input.py.map @@ -1 +1 @@ -{"version":3,"sources":["input.sdstest"],"names":["f1","l","h","f2","e1","d1","test","a","b","d","g","e"],"mappings":"AAAA;;AAMA,IAAQA,EAAE,CAACC,CAAC;IACRC,CAAC,CAACD,CAAC,CAAC,CAAC,EAAE,CAAC;;AAGZ,IAAQE,EAAE,CAACF,CAAC;IACRC,CAAC,CAACD,CAAC,CAAC,CAAC,EAAE,CAAC,EAAEG,CAAE;IACZF,CAAC,CAACD,CAAC,CAAC,CAAC,EAAE,CAAC,EAAEI,CAAE;;;;AAGhB,IAASC,IAAI;IAEN,yBAACC,CAAC,EAAOC,CAAC;QACT,0BAAMC,CAAC,GAAGC,CAAC;QADZ,OACC,0BAAMD,CAAC;IADXT,EAAE,CAAC;IAGA,yBAACO,CAAC,EAAOC,CAAC;QACT,0BAAMC,CAAC,GAAGC,CAAC;QACX,0BAAMC,CAAC,GAAGD,CAAC;QAFZ,OACC,0BAAMD,CAAC,EACP,0BAAME,CAAC;IAFXR,EAAE,CAAC","file":"gen_input.py"} \ No newline at end of file +{"version":3,"sources":["input.sdstest"],"names":["f1","l","h","f2","e1","d1","test","a","b","d","g","e"],"mappings":"AAAA;;;;;;AAMA,IAAQA,EAAE,CAACC,CAAC;IACRC,CAAC,CAACD,CAAC,CAAC,CAAC,EAAE,CAAC;;AAGZ,IAAQE,EAAE,CAACF,CAAC;IACRC,CAAC,CAACD,CAAC,CAAC,CAAC,EAAE,CAAC,EAAEG,CAAE;IACZF,CAAC,CAACD,CAAC,CAAC,CAAC,EAAE,CAAC,EAAEI,CAAE;;;;AAGhB,IAASC,IAAI;IAEN,yBAACC,CAAC,EAAOC,CAAC;QACT,0BAAMC,CAAC,GAAG,2GAAAC,CAAC;QADZ,OACC,0BAAMD,CAAC;IADXT,EAAE,CAAC;IAGA,yBAACO,CAAC,EAAOC,CAAC;QACT,0BAAMC,CAAC,GAAG,2GAAAC,CAAC;QACX,0BAAMC,CAAC,GAAG,2GAAAD,CAAC;QAFZ,OACC,0BAAMD,CAAC,EACP,0BAAME,CAAC;IAFXR,EAAE,CAAC","file":"gen_input.py"} \ No newline at end of file diff --git a/packages/safe-ds-lang/tests/resources/generation/expressions/block lambda/output/tests/generator/blockLambda/gen_input.py b/packages/safe-ds-lang/tests/resources/generation/expressions/block lambda/output/tests/generator/blockLambda/gen_input.py index bf59975d7..9d0687538 100644 --- a/packages/safe-ds-lang/tests/resources/generation/expressions/block lambda/output/tests/generator/blockLambda/gen_input.py +++ b/packages/safe-ds-lang/tests/resources/generation/expressions/block lambda/output/tests/generator/blockLambda/gen_input.py @@ -6,23 +6,23 @@ def test(): def __gen_block_lambda_0(a, b=2): - __gen_block_lambda_result_d = g() + __gen_block_lambda_result_d = safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.blockLambda.g", g, [], []) return __gen_block_lambda_result_d f1(__gen_block_lambda_0) def __gen_block_lambda_1(a, b): - __gen_block_lambda_result_d = g() + __gen_block_lambda_result_d = safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.blockLambda.g", g, [], []) return __gen_block_lambda_result_d f1(__gen_block_lambda_1) def __gen_block_lambda_2(): pass f2(__gen_block_lambda_2) def __gen_block_lambda_3(a, b=2): - __gen_block_lambda_result_d = g() + __gen_block_lambda_result_d = safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.blockLambda.g", g, [], []) return __gen_block_lambda_result_d - g2(f3(__gen_block_lambda_3)) + g2(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.blockLambda.f3", f3, [__gen_block_lambda_3], [])) def __gen_block_lambda_4(a, b=2): - __gen_block_lambda_result_d = g() + __gen_block_lambda_result_d = safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.blockLambda.g", g, [], []) return __gen_block_lambda_result_d - c = f3(__gen_block_lambda_4) + c = safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.blockLambda.f3", f3, [__gen_block_lambda_4], []) safeds_runner.server.pipeline_manager.runner_save_placeholder('c', c) g2(c) diff --git a/packages/safe-ds-lang/tests/resources/generation/expressions/block lambda/output/tests/generator/blockLambda/gen_input.py.map b/packages/safe-ds-lang/tests/resources/generation/expressions/block lambda/output/tests/generator/blockLambda/gen_input.py.map index afb6111d7..35f1a7fa7 100644 --- a/packages/safe-ds-lang/tests/resources/generation/expressions/block lambda/output/tests/generator/blockLambda/gen_input.py.map +++ b/packages/safe-ds-lang/tests/resources/generation/expressions/block lambda/output/tests/generator/blockLambda/gen_input.py.map @@ -1 +1 @@ -{"version":3,"sources":["input.sdstest"],"names":["test","a","b","d","g","f1","f2","g2","f3","c"],"mappings":"AAAA;;;;;;AASA,IAASA,IAAI;IACN,yBAACC,CAAC,EAAOC,CAAC,CAAQ,CAAC;QAClB,0BAAMC,CAAC,GAAGC,CAAC;QADZ,OACC,0BAAMD,CAAC;IADXE,EAAE,CAAC;IAGA,yBAACJ,CAAC,EAAOC,CAAC;QACT,0BAAMC,CAAC,GAAGC,CAAC;QADZ,OACC,0BAAMD,CAAC;IADXE,EAAE,CAAC;IAGA;QAAG,IAAE;IAARC,EAAE,CAAC;IACG,yBAACL,CAAC,EAAOC,CAAC,CAAQ,CAAC;QACrB,0BAAMC,CAAC,GAAGC,CAAC;QADT,OACF,0BAAMD,CAAC;IADXI,EAAE,CAACC,EAAE,CAAC;IAGK,yBAACP,CAAC,EAAOC,CAAC,CAAQ,CAAC;QAC1B,0BAAMC,CAAC,GAAGC,CAAC;QADJ,OACP,0BAAMD,CAAC;IADX,IAAQK,EAAE,CAAC;IAAX;IAGAD,EAAE,CAACE,CAAC","file":"gen_input.py"} \ No newline at end of file +{"version":3,"sources":["input.sdstest"],"names":["test","a","b","d","g","f1","f2","g2","f3","c"],"mappings":"AAAA;;;;;;AASA,IAASA,IAAI;IACN,yBAACC,CAAC,EAAOC,CAAC,CAAQ,CAAC;QAClB,0BAAMC,CAAC,GAAG,qGAAAC,CAAC;QADZ,OACC,0BAAMD,CAAC;IADXE,EAAE,CAAC;IAGA,yBAACJ,CAAC,EAAOC,CAAC;QACT,0BAAMC,CAAC,GAAG,qGAAAC,CAAC;QADZ,OACC,0BAAMD,CAAC;IADXE,EAAE,CAAC;IAGA;QAAG,IAAE;IAARC,EAAE,CAAC;IACG,yBAACL,CAAC,EAAOC,CAAC,CAAQ,CAAC;QACrB,0BAAMC,CAAC,GAAG,qGAAAC,CAAC;QADT,OACF,0BAAMD,CAAC;IADXI,EAAE,CAAC,sGAAAC,EAAE,GAAC;IAGK,yBAACP,CAAC,EAAOC,CAAC,CAAQ,CAAC;QAC1B,0BAAMC,CAAC,GAAG,qGAAAC,CAAC;QADJ,OACP,0BAAMD,CAAC;IADX,IAAQ,sGAAAK,EAAE,GAAC;IAAX;IAGAD,EAAE,CAACE,CAAC","file":"gen_input.py"} \ No newline at end of file diff --git a/packages/safe-ds-lang/tests/resources/generation/expressions/call/input.sdstest b/packages/safe-ds-lang/tests/resources/generation/expressions/call/input.sdstest index fad1d70f2..91d4c1da7 100644 --- a/packages/safe-ds-lang/tests/resources/generation/expressions/call/input.sdstest +++ b/packages/safe-ds-lang/tests/resources/generation/expressions/call/input.sdstest @@ -29,6 +29,7 @@ pipeline test { f((g(param2 = 1, param1 = 2))); f((h(1, 2))); f((h(param2 = 1, param1 = 2))); + f((h(param1 = 2))); i("abc"); j("abc", 123); k(1.23, 456); diff --git a/packages/safe-ds-lang/tests/resources/generation/expressions/call/output/tests/generator/call/gen_input.py b/packages/safe-ds-lang/tests/resources/generation/expressions/call/output/tests/generator/call/gen_input.py index 1e10a4633..6a83dd212 100644 --- a/packages/safe-ds-lang/tests/resources/generation/expressions/call/output/tests/generator/call/gen_input.py +++ b/packages/safe-ds-lang/tests/resources/generation/expressions/call/output/tests/generator/call/gen_input.py @@ -1,10 +1,15 @@ +# Imports ---------------------------------------------------------------------- + +import safeds_runner.server.pipeline_manager + # Pipelines -------------------------------------------------------------------- def test(): - f(g(1, param2=2)) - f(g(2, param2=1)) - f(h(1, param_2=2)) - f(h(2, param_2=1)) + f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.call.g", lambda *_ : g(1, param2=2), [1, 2], [])) + f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.call.g", lambda *_ : g(2, param2=1), [2, 1], [])) + f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.call.h", lambda *_ : h(1, param_2=2), [1, 2], [])) + f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.call.h", lambda *_ : h(2, param_2=1), [2, 1], [])) + f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.call.h", h, [2, 0], [])) 'abc'.i() 'abc'.j(123) k(456, 1.23) diff --git a/packages/safe-ds-lang/tests/resources/generation/expressions/call/output/tests/generator/call/gen_input.py.map b/packages/safe-ds-lang/tests/resources/generation/expressions/call/output/tests/generator/call/gen_input.py.map index c5c8979dc..442925169 100644 --- a/packages/safe-ds-lang/tests/resources/generation/expressions/call/output/tests/generator/call/gen_input.py.map +++ b/packages/safe-ds-lang/tests/resources/generation/expressions/call/output/tests/generator/call/gen_input.py.map @@ -1 +1 @@ -{"version":3,"sources":["input.sdstest"],"names":["test","f","g","param2","h"],"mappings":"AAAA;;AA0BA,IAASA,IAAI;IACTC,CAAC,CAAEC,CAAC,CAAC,CAAC,EArBNC,MAAM,CAqBE,CAAC;IACTF,CAAC,CAAEC,CAAC,CAAsB,CAAC,EAtB3BC,MAAM,CAsBQ,CAAC;IACfF,CAAC,CAAEG,CAAC,CAAC,CAAC,EAlBiBD,OAAM,CAkBrB,CAAC;IACTF,CAAC,CAAEG,CAAC,CAAsB,CAAC,EAnBJD,OAAM,CAmBf,CAAC;IACb,KAAK;IACL,KAAK,GAAE,GAAG;IACZ,EAAQ,GAAG,EAAT,IAAI","file":"gen_input.py"} \ No newline at end of file +{"version":3,"sources":["input.sdstest"],"names":["test","f","g","param2","h"],"mappings":"AAAA;;;;;;AA0BA,IAASA,IAAI;IACTC,CAAC,CAAE,0GAAAC,CAAC,CAAC,CAAC,EArBNC,MAAM,CAqBE,CAAC,IAAJ,CAAC,EAAE,CAAC;IACTF,CAAC,CAAE,0GAAAC,CAAC,CAAsB,CAAC,EAtB3BC,MAAM,CAsBQ,CAAC,IAAW,CAAC,EAAb,CAAC;IACfF,CAAC,CAAE,0GAAAG,CAAC,CAAC,CAAC,EAlBiBD,OAAM,CAkBrB,CAAC,IAAJ,CAAC,EAAE,CAAC;IACTF,CAAC,CAAE,0GAAAG,CAAC,CAAsB,CAAC,EAnBJD,OAAM,CAmBf,CAAC,IAAW,CAAC,EAAb,CAAC;IACfF,CAAC,CAAE,8FAAAG,CAAC,GAAU,CAAC,EApBsB,CAAC;IAqBpC,KAAK;IACL,KAAK,GAAE,GAAG;IACZ,EAAQ,GAAG,EAAT,IAAI","file":"gen_input.py"} \ No newline at end of file diff --git a/packages/safe-ds-lang/tests/resources/generation/expressions/infix operation/output/tests/generator/infixOperation/gen_input.py b/packages/safe-ds-lang/tests/resources/generation/expressions/infix operation/output/tests/generator/infixOperation/gen_input.py index b9d770db1..192da8512 100644 --- a/packages/safe-ds-lang/tests/resources/generation/expressions/infix operation/output/tests/generator/infixOperation/gen_input.py +++ b/packages/safe-ds-lang/tests/resources/generation/expressions/infix operation/output/tests/generator/infixOperation/gen_input.py @@ -1,22 +1,23 @@ # Imports ---------------------------------------------------------------------- import safeds_runner.codegen +import safeds_runner.server.pipeline_manager # Pipelines -------------------------------------------------------------------- def test(): - f(safeds_runner.codegen.eager_or(g(), g())) - f(safeds_runner.codegen.eager_and(g(), g())) - f((h()) == (h())) - f((h()) != (h())) - f((h()) is (h())) - f((h()) is not (h())) - f((h()) < (h())) - f((h()) <= (h())) - f((h()) >= (h())) - f((h()) > (h())) - f((h()) + (h())) - f((h()) - (h())) - f((h()) * (h())) - f((h()) / (h())) - f(safeds_runner.codegen.eager_elvis(i(), i())) + f(safeds_runner.codegen.eager_or(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.infixOperation.g", g, [], []), safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.infixOperation.g", g, [], []))) + f(safeds_runner.codegen.eager_and(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.infixOperation.g", g, [], []), safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.infixOperation.g", g, [], []))) + f((safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.infixOperation.h", h, [], [])) == (safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.infixOperation.h", h, [], []))) + f((safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.infixOperation.h", h, [], [])) != (safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.infixOperation.h", h, [], []))) + f((safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.infixOperation.h", h, [], [])) is (safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.infixOperation.h", h, [], []))) + f((safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.infixOperation.h", h, [], [])) is not (safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.infixOperation.h", h, [], []))) + f((safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.infixOperation.h", h, [], [])) < (safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.infixOperation.h", h, [], []))) + f((safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.infixOperation.h", h, [], [])) <= (safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.infixOperation.h", h, [], []))) + f((safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.infixOperation.h", h, [], [])) >= (safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.infixOperation.h", h, [], []))) + f((safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.infixOperation.h", h, [], [])) > (safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.infixOperation.h", h, [], []))) + f((safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.infixOperation.h", h, [], [])) + (safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.infixOperation.h", h, [], []))) + f((safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.infixOperation.h", h, [], [])) - (safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.infixOperation.h", h, [], []))) + f((safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.infixOperation.h", h, [], [])) * (safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.infixOperation.h", h, [], []))) + f((safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.infixOperation.h", h, [], [])) / (safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.infixOperation.h", h, [], []))) + f(safeds_runner.codegen.eager_elvis(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.infixOperation.i", i, [], []), safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.infixOperation.i", i, [], []))) diff --git a/packages/safe-ds-lang/tests/resources/generation/expressions/infix operation/output/tests/generator/infixOperation/gen_input.py.map b/packages/safe-ds-lang/tests/resources/generation/expressions/infix operation/output/tests/generator/infixOperation/gen_input.py.map index 210a6bf99..d1e853d11 100644 --- a/packages/safe-ds-lang/tests/resources/generation/expressions/infix operation/output/tests/generator/infixOperation/gen_input.py.map +++ b/packages/safe-ds-lang/tests/resources/generation/expressions/infix operation/output/tests/generator/infixOperation/gen_input.py.map @@ -1 +1 @@ -{"version":3,"sources":["input.sdstest"],"names":["test","f","or","g","and","h","i"],"mappings":"AAAA;;;;;;AAUA,IAASA,IAAI;IACTC,CAAC,CAAKC,8BAAE,CAANC,CAAC,IAAMA,CAAC;IACVF,CAAC,CAAKG,+BAAG,CAAPD,CAAC,IAAOA,CAAC;IAEXF,CAAC,CAAC,CAAAI,CAAC,IAAG,EAAE,EAACA,CAAC;IACVJ,CAAC,CAAC,CAAAI,CAAC,IAAG,EAAE,EAACA,CAAC;IACVJ,CAAC,CAAC,CAAAI,CAAC,IAAG,EAAG,EAACA,CAAC;IACXJ,CAAC,CAAC,CAAAI,CAAC,IAAG,QAAIA,CAAC;IAEXJ,CAAC,CAAC,CAAAI,CAAC,IAAG,CAAC,EAACA,CAAC;IACTJ,CAAC,CAAC,CAAAI,CAAC,IAAG,EAAE,EAACA,CAAC;IACVJ,CAAC,CAAC,CAAAI,CAAC,IAAG,EAAE,EAACA,CAAC;IACVJ,CAAC,CAAC,CAAAI,CAAC,IAAG,CAAC,EAACA,CAAC;IAETJ,CAAC,CAAC,CAAAI,CAAC,IAAG,CAAC,EAACA,CAAC;IACTJ,CAAC,CAAC,CAAAI,CAAC,IAAG,CAAC,EAACA,CAAC;IACTJ,CAAC,CAAC,CAAAI,CAAC,IAAG,CAAC,EAACA,CAAC;IACTJ,CAAC,CAAC,CAAAI,CAAC,IAAG,CAAC,EAACA,CAAC;IAETJ,CAAC,CAAK,iCAAE,CAANK,CAAC,IAAMA,CAAC","file":"gen_input.py"} \ No newline at end of file +{"version":3,"sources":["input.sdstest"],"names":["test","f","or","g","and","h","i"],"mappings":"AAAA;;;;;;;AAUA,IAASA,IAAI;IACTC,CAAC,CAAKC,8BAAE,CAAN,wGAAAC,CAAC,WAAM,wGAAAA,CAAC;IACVF,CAAC,CAAKG,+BAAG,CAAP,wGAAAD,CAAC,WAAO,wGAAAA,CAAC;IAEXF,CAAC,CAAC,CAAA,wGAAAI,CAAC,WAAG,EAAE,EAAC,wGAAAA,CAAC;IACVJ,CAAC,CAAC,CAAA,wGAAAI,CAAC,WAAG,EAAE,EAAC,wGAAAA,CAAC;IACVJ,CAAC,CAAC,CAAA,wGAAAI,CAAC,WAAG,EAAG,EAAC,wGAAAA,CAAC;IACXJ,CAAC,CAAC,CAAA,wGAAAI,CAAC,WAAG,QAAI,wGAAAA,CAAC;IAEXJ,CAAC,CAAC,CAAA,wGAAAI,CAAC,WAAG,CAAC,EAAC,wGAAAA,CAAC;IACTJ,CAAC,CAAC,CAAA,wGAAAI,CAAC,WAAG,EAAE,EAAC,wGAAAA,CAAC;IACVJ,CAAC,CAAC,CAAA,wGAAAI,CAAC,WAAG,EAAE,EAAC,wGAAAA,CAAC;IACVJ,CAAC,CAAC,CAAA,wGAAAI,CAAC,WAAG,CAAC,EAAC,wGAAAA,CAAC;IAETJ,CAAC,CAAC,CAAA,wGAAAI,CAAC,WAAG,CAAC,EAAC,wGAAAA,CAAC;IACTJ,CAAC,CAAC,CAAA,wGAAAI,CAAC,WAAG,CAAC,EAAC,wGAAAA,CAAC;IACTJ,CAAC,CAAC,CAAA,wGAAAI,CAAC,WAAG,CAAC,EAAC,wGAAAA,CAAC;IACTJ,CAAC,CAAC,CAAA,wGAAAI,CAAC,WAAG,CAAC,EAAC,wGAAAA,CAAC;IAETJ,CAAC,CAAK,iCAAE,CAAN,wGAAAK,CAAC,WAAM,wGAAAA,CAAC","file":"gen_input.py"} \ No newline at end of file diff --git a/packages/safe-ds-lang/tests/resources/generation/expressions/lists/output/tests/generator/lists/gen_input.py b/packages/safe-ds-lang/tests/resources/generation/expressions/lists/output/tests/generator/lists/gen_input.py index d5faf3b21..b12c2de8e 100644 --- a/packages/safe-ds-lang/tests/resources/generation/expressions/lists/output/tests/generator/lists/gen_input.py +++ b/packages/safe-ds-lang/tests/resources/generation/expressions/lists/output/tests/generator/lists/gen_input.py @@ -1,6 +1,10 @@ +# Imports ---------------------------------------------------------------------- + +import safeds_runner.server.pipeline_manager + # Pipelines -------------------------------------------------------------------- def test(): f([]) f([1, 2, 3]) - f([1, h(), (h()) + (5)]) + f([1, safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.lists.h", h, [], []), (safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.lists.h", h, [], [])) + (5)]) diff --git a/packages/safe-ds-lang/tests/resources/generation/expressions/lists/output/tests/generator/lists/gen_input.py.map b/packages/safe-ds-lang/tests/resources/generation/expressions/lists/output/tests/generator/lists/gen_input.py.map index e143f4293..3e70abc1f 100644 --- a/packages/safe-ds-lang/tests/resources/generation/expressions/lists/output/tests/generator/lists/gen_input.py.map +++ b/packages/safe-ds-lang/tests/resources/generation/expressions/lists/output/tests/generator/lists/gen_input.py.map @@ -1 +1 @@ -{"version":3,"sources":["input.sdstest"],"names":["test","f","h"],"mappings":"AAAA;;AAMA,IAASA,IAAI;IACTC,CAAC,CAAC,EAAE;IACJA,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;IACVA,CAAC,CAAC,CAAC,CAAC,EAAEC,CAAC,IAAI,CAAAA,CAAC,IAAG,CAAC,EAAC,CAAC","file":"gen_input.py"} \ No newline at end of file +{"version":3,"sources":["input.sdstest"],"names":["test","f","h"],"mappings":"AAAA;;;;;;AAMA,IAASA,IAAI;IACTC,CAAC,CAAC,EAAE;IACJA,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;IACVA,CAAC,CAAC,CAAC,CAAC,EAAE,+FAAAC,CAAC,WAAI,CAAA,+FAAAA,CAAC,WAAG,CAAC,EAAC,CAAC","file":"gen_input.py"} \ No newline at end of file diff --git a/packages/safe-ds-lang/tests/resources/generation/expressions/maps/output/tests/generator/maps/gen_input.py b/packages/safe-ds-lang/tests/resources/generation/expressions/maps/output/tests/generator/maps/gen_input.py index 9db46e6bf..ab07e1b28 100644 --- a/packages/safe-ds-lang/tests/resources/generation/expressions/maps/output/tests/generator/maps/gen_input.py +++ b/packages/safe-ds-lang/tests/resources/generation/expressions/maps/output/tests/generator/maps/gen_input.py @@ -1,8 +1,12 @@ +# Imports ---------------------------------------------------------------------- + +import safeds_runner.server.pipeline_manager + # Pipelines -------------------------------------------------------------------- def test(): g1({}) g1({'a': 1.2, 'b': 1.0}) - g1({h2(): -0.5, 'b': h1()}) + g1({safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.maps.h2", h2, [], []): -0.5, 'b': safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.maps.h1", h1, [], [])}) g2({1.2: 'a', 1.0: 'b'}) - g2({5.6: 'c', h1(): h2()}) + g2({5.6: 'c', safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.maps.h1", h1, [], []): safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.maps.h2", h2, [], [])}) diff --git a/packages/safe-ds-lang/tests/resources/generation/expressions/maps/output/tests/generator/maps/gen_input.py.map b/packages/safe-ds-lang/tests/resources/generation/expressions/maps/output/tests/generator/maps/gen_input.py.map index 54ca34598..4a5130086 100644 --- a/packages/safe-ds-lang/tests/resources/generation/expressions/maps/output/tests/generator/maps/gen_input.py.map +++ b/packages/safe-ds-lang/tests/resources/generation/expressions/maps/output/tests/generator/maps/gen_input.py.map @@ -1 +1 @@ -{"version":3,"sources":["input.sdstest"],"names":["test","g1","h2","h1","g2"],"mappings":"AAAA;;AAUA,IAASA,IAAI;IACTC,EAAE,CAAC,EAAE;IACLA,EAAE,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;IACtBA,EAAE,CAAC,CAACC,EAAE,IAAI,IAAI,EAAE,GAAG,EAAEC,EAAE;IACvBC,EAAE,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;IACtBA,EAAE,CAAC,CAAC,GAAG,EAAE,GAAG,EAAED,EAAE,IAAID,EAAE","file":"gen_input.py"} \ No newline at end of file +{"version":3,"sources":["input.sdstest"],"names":["test","g1","h2","h1","g2"],"mappings":"AAAA;;;;;;AAUA,IAASA,IAAI;IACTC,EAAE,CAAC,EAAE;IACLA,EAAE,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;IACtBA,EAAE,CAAC,CAAC,+FAAAC,EAAE,WAAI,IAAI,EAAE,GAAG,EAAE,+FAAAC,EAAE;IACvBC,EAAE,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG;IACtBA,EAAE,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,+FAAAD,EAAE,WAAI,+FAAAD,EAAE","file":"gen_input.py"} \ No newline at end of file diff --git a/packages/safe-ds-lang/tests/resources/generation/expressions/member access/input.sdstest b/packages/safe-ds-lang/tests/resources/generation/expressions/member access/input.sdstest index 9d5fc1339..5851b645a 100644 --- a/packages/safe-ds-lang/tests/resources/generation/expressions/member access/input.sdstest +++ b/packages/safe-ds-lang/tests/resources/generation/expressions/member access/input.sdstest @@ -13,6 +13,12 @@ class C() { @Pure @PythonCall("$param.i($this)") fun i(param: Any?) -> result: Boolean + + @Pure + fun j(param: Any?) -> result: Boolean + + @Pure + @PythonName("k2") fun k(param: Any?) -> result: Boolean } @Pure fun factory() -> instance: C? @@ -26,4 +32,6 @@ pipeline test { f(factory()?.a); f(factory()?.b); f(C().i(1)); + f(C().j(123)); + f(C().k("abc")); } diff --git a/packages/safe-ds-lang/tests/resources/generation/expressions/member access/output/tests/generator/memberAccess/gen_input.py b/packages/safe-ds-lang/tests/resources/generation/expressions/member access/output/tests/generator/memberAccess/gen_input.py index b508d00de..e8fcc9e19 100644 --- a/packages/safe-ds-lang/tests/resources/generation/expressions/member access/output/tests/generator/memberAccess/gen_input.py +++ b/packages/safe-ds-lang/tests/resources/generation/expressions/member access/output/tests/generator/memberAccess/gen_input.py @@ -1,15 +1,18 @@ # Imports ---------------------------------------------------------------------- import safeds_runner.codegen +import safeds_runner.server.pipeline_manager # Pipelines -------------------------------------------------------------------- def test(): - f(g()) - f(h()[0]) - f(h()[1]) - f(C().a) - f(C().c) - f(safeds_runner.codegen.safe_access(factory(), 'a')) - f(safeds_runner.codegen.safe_access(factory(), 'c')) - f(1.i(C())) + f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.memberAccess.g", g, [], [])) + f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.memberAccess.h", h, [], [])[0]) + f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.memberAccess.h", h, [], [])[1]) + f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.memberAccess.C", C, [], []).a) + f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.memberAccess.C", C, [], []).c) + f(safeds_runner.codegen.safe_access(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.memberAccess.factory", factory, [], []), 'a')) + f(safeds_runner.codegen.safe_access(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.memberAccess.factory", factory, [], []), 'c')) + f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.memberAccess.C.i", lambda *_ : 1.i(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.memberAccess.C", C, [], [])), [1], [])) + f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.memberAccess.C.j", C.j, [safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.memberAccess.C", C, [], []), 123], [])) + f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.memberAccess.C.k2", C.k2, [safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.memberAccess.C", C, [], []), 'abc'], [])) diff --git a/packages/safe-ds-lang/tests/resources/generation/expressions/member access/output/tests/generator/memberAccess/gen_input.py.map b/packages/safe-ds-lang/tests/resources/generation/expressions/member access/output/tests/generator/memberAccess/gen_input.py.map index 18f0bd815..c014b36ef 100644 --- a/packages/safe-ds-lang/tests/resources/generation/expressions/member access/output/tests/generator/memberAccess/gen_input.py.map +++ b/packages/safe-ds-lang/tests/resources/generation/expressions/member access/output/tests/generator/memberAccess/gen_input.py.map @@ -1 +1 @@ -{"version":3,"sources":["input.sdstest"],"names":["test","f","g","h","result1","result2","c","a","b","factory"],"mappings":"AAAA;;;;;;AAmBA,IAASA,IAAI;IACTC,CAAC,CAACC,CAAC;IACHD,CAAC,CAACE,CAAC,GAAGC,CAAO;IACbH,CAAC,CAACE,CAAC,GAAGE,CAAO;IACbJ,CAAC,CAACK,CAAC,GAAGC,CAAC;IACPN,CAAC,CAACK,CAAC,GAAGE,CAAC;IACPP,CAAC,CAAU,iCAAC,CAAVQ,OAAO,KAAIF,CAAC;IACdN,CAAC,CAAU,iCAAC,CAAVQ,OAAO,KAAID,CAAC;IACdP,CAAC,CAAO,CAAC,GAAPK,CAAC","file":"gen_input.py"} \ No newline at end of file +{"version":3,"sources":["input.sdstest"],"names":["test","f","g","h","result1","result2","c","a","b","factory","j","k"],"mappings":"AAAA;;;;;;;AAyBA,IAASA,IAAI;IACTC,CAAC,CAAC,sGAAAC,CAAC;IACHD,CAAC,CAAC,sGAAAE,CAAC,UAAGC,CAAO;IACbH,CAAC,CAAC,sGAAAE,CAAC,UAAGE,CAAO;IACbJ,CAAC,CAAC,sGAAAK,CAAC,UAAGC,CAAC;IACPN,CAAC,CAAC,sGAAAK,CAAC,UAAGE,CAAC;IACPP,CAAC,CAAU,iCAAC,CAAV,4GAAAQ,OAAO,YAAIF,CAAC;IACdN,CAAC,CAAU,iCAAC,CAAV,4GAAAQ,OAAO,YAAID,CAAC;IACdP,CAAC,CAAC,oHAAM,CAAC,GAAP,sGAAAK,CAAC,aAAK,CAAC;IACTL,CAAC,CAAC,wGAAAK,CAAC,CAAGI,CAAC,GAAL,sGAAAJ,CAAC,WAAK,GAAG;IACXL,CAAC,CAAC,yGAAAK,CAAC,CAAGK,EAAC,GAAL,sGAAAL,CAAC,WAAK,KAAK","file":"gen_input.py"} \ No newline at end of file diff --git a/packages/safe-ds-lang/tests/resources/generation/expressions/parenthesized expression/output/tests/generator/parenthesizedExpression/gen_input.py b/packages/safe-ds-lang/tests/resources/generation/expressions/parenthesized expression/output/tests/generator/parenthesizedExpression/gen_input.py index 00162f3cf..87d500bac 100644 --- a/packages/safe-ds-lang/tests/resources/generation/expressions/parenthesized expression/output/tests/generator/parenthesizedExpression/gen_input.py +++ b/packages/safe-ds-lang/tests/resources/generation/expressions/parenthesized expression/output/tests/generator/parenthesizedExpression/gen_input.py @@ -1,4 +1,8 @@ +# Imports ---------------------------------------------------------------------- + +import safeds_runner.server.pipeline_manager + # Pipelines -------------------------------------------------------------------- def test(): - f(g()) + f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.parenthesizedExpression.g", g, [], [])) diff --git a/packages/safe-ds-lang/tests/resources/generation/expressions/parenthesized expression/output/tests/generator/parenthesizedExpression/gen_input.py.map b/packages/safe-ds-lang/tests/resources/generation/expressions/parenthesized expression/output/tests/generator/parenthesizedExpression/gen_input.py.map index 508b1d926..d1b6a368d 100644 --- a/packages/safe-ds-lang/tests/resources/generation/expressions/parenthesized expression/output/tests/generator/parenthesizedExpression/gen_input.py.map +++ b/packages/safe-ds-lang/tests/resources/generation/expressions/parenthesized expression/output/tests/generator/parenthesizedExpression/gen_input.py.map @@ -1 +1 @@ -{"version":3,"sources":["input.sdstest"],"names":["test","f","g"],"mappings":"AAAA;;AAMA,IAASA,IAAI;IACTC,CAAC,CAAEC,CAAC","file":"gen_input.py"} \ No newline at end of file +{"version":3,"sources":["input.sdstest"],"names":["test","f","g"],"mappings":"AAAA;;;;;;AAMA,IAASA,IAAI;IACTC,CAAC,CAAE,iHAAAC,CAAC","file":"gen_input.py"} \ No newline at end of file diff --git a/packages/safe-ds-lang/tests/resources/generation/expressions/prefix operation/output/tests/generator/prefixOperation/gen_input.py b/packages/safe-ds-lang/tests/resources/generation/expressions/prefix operation/output/tests/generator/prefixOperation/gen_input.py index 138c6bf3f..3805f5bc9 100644 --- a/packages/safe-ds-lang/tests/resources/generation/expressions/prefix operation/output/tests/generator/prefixOperation/gen_input.py +++ b/packages/safe-ds-lang/tests/resources/generation/expressions/prefix operation/output/tests/generator/prefixOperation/gen_input.py @@ -1,5 +1,9 @@ +# Imports ---------------------------------------------------------------------- + +import safeds_runner.server.pipeline_manager + # Pipelines -------------------------------------------------------------------- def test(): - f(not (g())) - f(-(h())) + f(not (safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.prefixOperation.g", g, [], []))) + f(-(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.prefixOperation.h", h, [], []))) diff --git a/packages/safe-ds-lang/tests/resources/generation/expressions/prefix operation/output/tests/generator/prefixOperation/gen_input.py.map b/packages/safe-ds-lang/tests/resources/generation/expressions/prefix operation/output/tests/generator/prefixOperation/gen_input.py.map index 9a6640681..1a4e165db 100644 --- a/packages/safe-ds-lang/tests/resources/generation/expressions/prefix operation/output/tests/generator/prefixOperation/gen_input.py.map +++ b/packages/safe-ds-lang/tests/resources/generation/expressions/prefix operation/output/tests/generator/prefixOperation/gen_input.py.map @@ -1 +1 @@ -{"version":3,"sources":["input.sdstest"],"names":["test","f","not","g","h"],"mappings":"AAAA;;AAQA,IAASA,IAAI;IACTC,CAAC,CAACC,GAAG,EAACC,CAAC;IACPF,CAAC,CAAC,CAAC,CAAAG,CAAC","file":"gen_input.py"} \ No newline at end of file +{"version":3,"sources":["input.sdstest"],"names":["test","f","not","g","h"],"mappings":"AAAA;;;;;;AAQA,IAASA,IAAI;IACTC,CAAC,CAACC,GAAG,EAAC,yGAAAC,CAAC;IACPF,CAAC,CAAC,CAAC,CAAA,yGAAAG,CAAC","file":"gen_input.py"} \ No newline at end of file diff --git a/packages/safe-ds-lang/tests/resources/generation/expressions/reference/output/tests/generator/reference/gen_input.py b/packages/safe-ds-lang/tests/resources/generation/expressions/reference/output/tests/generator/reference/gen_input.py index 149d8bb65..9ac59daba 100644 --- a/packages/safe-ds-lang/tests/resources/generation/expressions/reference/output/tests/generator/reference/gen_input.py +++ b/packages/safe-ds-lang/tests/resources/generation/expressions/reference/output/tests/generator/reference/gen_input.py @@ -1,4 +1,8 @@ +# Imports ---------------------------------------------------------------------- + +import safeds_runner.server.pipeline_manager + # Pipelines -------------------------------------------------------------------- def test(): - f(explain_model()) + f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.reference.explain_model", explain_model, [], [])) diff --git a/packages/safe-ds-lang/tests/resources/generation/expressions/reference/output/tests/generator/reference/gen_input.py.map b/packages/safe-ds-lang/tests/resources/generation/expressions/reference/output/tests/generator/reference/gen_input.py.map index e7e444c3a..95e1773b8 100644 --- a/packages/safe-ds-lang/tests/resources/generation/expressions/reference/output/tests/generator/reference/gen_input.py.map +++ b/packages/safe-ds-lang/tests/resources/generation/expressions/reference/output/tests/generator/reference/gen_input.py.map @@ -1 +1 @@ -{"version":3,"sources":["input.sdstest"],"names":["test","f","explainmodel"],"mappings":"AAAA;;AAQA,IAASA,IAAI;IACTC,CAAC,CAACC,aAAY","file":"gen_input.py"} \ No newline at end of file +{"version":3,"sources":["input.sdstest"],"names":["test","f","explainmodel"],"mappings":"AAAA;;;;;;AAQA,IAASA,IAAI;IACTC,CAAC,CAAC,+GAAAC,aAAY","file":"gen_input.py"} \ No newline at end of file diff --git a/packages/safe-ds-lang/tests/resources/generation/expressions/template string/output/tests/generator/templateString/gen_input.py b/packages/safe-ds-lang/tests/resources/generation/expressions/template string/output/tests/generator/templateString/gen_input.py index 7756f36ad..2bc475c4a 100644 --- a/packages/safe-ds-lang/tests/resources/generation/expressions/template string/output/tests/generator/templateString/gen_input.py +++ b/packages/safe-ds-lang/tests/resources/generation/expressions/template string/output/tests/generator/templateString/gen_input.py @@ -1,4 +1,8 @@ +# Imports ---------------------------------------------------------------------- + +import safeds_runner.server.pipeline_manager + # Pipelines -------------------------------------------------------------------- def test(): - f(f'start\n{ g() }\ninner { g() }\nend') + f(f'start\n{ safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.templateString.g", g, [], []) }\ninner { safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.templateString.g", g, [], []) }\nend') diff --git a/packages/safe-ds-lang/tests/resources/generation/expressions/template string/output/tests/generator/templateString/gen_input.py.map b/packages/safe-ds-lang/tests/resources/generation/expressions/template string/output/tests/generator/templateString/gen_input.py.map index 9333bd67d..d02356915 100644 --- a/packages/safe-ds-lang/tests/resources/generation/expressions/template string/output/tests/generator/templateString/gen_input.py.map +++ b/packages/safe-ds-lang/tests/resources/generation/expressions/template string/output/tests/generator/templateString/gen_input.py.map @@ -1 +1 @@ -{"version":3,"sources":["input.sdstest"],"names":["test","f","g"],"mappings":"AAAA;;AAMA,IAASA,IAAI;IACTC,CAAC,CAAC,EAAA,SACHC,CAAC,EAAG,YACEA,CAAC,EAAG","file":"gen_input.py"} \ No newline at end of file +{"version":3,"sources":["input.sdstest"],"names":["test","f","g"],"mappings":"AAAA;;;;;;AAMA,IAASA,IAAI;IACTC,CAAC,CAAC,EAAA,SACH,wGAAAC,CAAC,SAAG,YACE,wGAAAA,CAAC,SAAG","file":"gen_input.py"} \ No newline at end of file diff --git a/packages/safe-ds-lang/tests/resources/generation/imports/general/output/tests/generator/imports/gen_context_same_package.py b/packages/safe-ds-lang/tests/resources/generation/imports/general/output/tests/generator/imports/gen_context_same_package.py index 3d5209468..2bbf4c7d9 100644 --- a/packages/safe-ds-lang/tests/resources/generation/imports/general/output/tests/generator/imports/gen_context_same_package.py +++ b/packages/safe-ds-lang/tests/resources/generation/imports/general/output/tests/generator/imports/gen_context_same_package.py @@ -1,9 +1,13 @@ +# Imports ---------------------------------------------------------------------- + +import safeds_runner.server.pipeline_manager + # Segments --------------------------------------------------------------------- def segment1InSamePackage(): - __gen_yield_result = impureFunction() + __gen_yield_result = safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.imports.impureFunction", impureFunction, [], []) return __gen_yield_result def segment2InSamePackage(): - __gen_yield_result = impureFunction() + __gen_yield_result = safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.imports.impureFunction", impureFunction, [], []) return __gen_yield_result diff --git a/packages/safe-ds-lang/tests/resources/generation/imports/general/output/tests/generator/imports/gen_context_same_package.py.map b/packages/safe-ds-lang/tests/resources/generation/imports/general/output/tests/generator/imports/gen_context_same_package.py.map index d79ad80dc..5e0386e87 100644 --- a/packages/safe-ds-lang/tests/resources/generation/imports/general/output/tests/generator/imports/gen_context_same_package.py.map +++ b/packages/safe-ds-lang/tests/resources/generation/imports/general/output/tests/generator/imports/gen_context_same_package.py.map @@ -1 +1 @@ -{"version":3,"sources":["context same package.sdstest"],"names":["segment1insamepackage","result","impurefunction","segment2insamepackage"],"mappings":"AAAA;;AAIA,IAAQA,qBAAqB;IACzB,YAAMC,MAAM,GAAGC,cAAc;IADD,OAAG;;AAInC,IAAQC,qBAAqB;IACzB,YAAMF,MAAM,GAAGC,cAAc;IADD,OAAG","file":"gen_context_same_package.py"} \ No newline at end of file +{"version":3,"sources":["context same package.sdstest"],"names":["segment1insamepackage","result","impurefunction","segment2insamepackage"],"mappings":"AAAA;;;;;;AAIA,IAAQA,qBAAqB;IACzB,YAAMC,MAAM,GAAG,8GAAAC,cAAc;IADD,OAAG;;AAInC,IAAQC,qBAAqB;IACzB,YAAMF,MAAM,GAAG,8GAAAC,cAAc;IADD,OAAG","file":"gen_context_same_package.py"} \ No newline at end of file diff --git a/packages/safe-ds-lang/tests/resources/generation/imports/general/output/tests/generator/imports/gen_input.py b/packages/safe-ds-lang/tests/resources/generation/imports/general/output/tests/generator/imports/gen_input.py index 8fd2d0cc9..a9ba896ef 100644 --- a/packages/safe-ds-lang/tests/resources/generation/imports/general/output/tests/generator/imports/gen_input.py +++ b/packages/safe-ds-lang/tests/resources/generation/imports/general/output/tests/generator/imports/gen_input.py @@ -1,5 +1,6 @@ # Imports ---------------------------------------------------------------------- +import safeds_runner.server.pipeline_manager from special_location import function1InCompilationUnitWithPythonModule, function2InCompilationUnitWithPythonModule as h from tests.generator.differentPackage import function1InDifferentPackage, function2InDifferentPackage as g from tests.generator.imports.gen_context_same_package import segment1InSamePackage, segment2InSamePackage @@ -11,11 +12,11 @@ def test(): f(segment1InSamePackage()) f(segment2InSamePackage()) f(segment2InSamePackage()) - f(function1InDifferentPackage()) - f(function1InDifferentPackage()) - f(g()) - f(g()) - f(function1InCompilationUnitWithPythonModule()) - f(function1InCompilationUnitWithPythonModule()) - f(h()) - f(h()) + f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.differentPackage.function1InDifferentPackage", function1InDifferentPackage, [], [])) + f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.differentPackage.function1InDifferentPackage", function1InDifferentPackage, [], [])) + f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.differentPackage.function2InDifferentPackage", g, [], [])) + f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.differentPackage.function2InDifferentPackage", g, [], [])) + f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("special_location.function1InCompilationUnitWithPythonModule", function1InCompilationUnitWithPythonModule, [], [])) + f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("special_location.function1InCompilationUnitWithPythonModule", function1InCompilationUnitWithPythonModule, [], [])) + f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("special_location.function2InCompilationUnitWithPythonModule", h, [], [])) + f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("special_location.function2InCompilationUnitWithPythonModule", h, [], [])) diff --git a/packages/safe-ds-lang/tests/resources/generation/imports/general/output/tests/generator/imports/gen_input.py.map b/packages/safe-ds-lang/tests/resources/generation/imports/general/output/tests/generator/imports/gen_input.py.map index b5c506e32..c94a154c9 100644 --- a/packages/safe-ds-lang/tests/resources/generation/imports/general/output/tests/generator/imports/gen_input.py.map +++ b/packages/safe-ds-lang/tests/resources/generation/imports/general/output/tests/generator/imports/gen_input.py.map @@ -1 +1 @@ -{"version":3,"sources":["input.sdstest"],"names":["test","f","segment1insamepackage","segment2insamepackage","function1indifferentpackage","g","function1incompilationunitwithpythonmodule","h"],"mappings":"AAAA;;;;;;;;AASA,IAASA,IAAI;IACTC,CAAC,CAACC,qBAAqB;IACvBD,CAAC,CAACC,qBAAqB;IACvBD,CAAC,CAACE,qBAAqB;IACvBF,CAAC,CAACE,qBAAqB;IAEvBF,CAAC,CAACG,2BAA2B;IAC7BH,CAAC,CAACG,2BAA2B;IAC7BH,CAAC,CAACI,CAAC;IACHJ,CAAC,CAACI,CAAC;IAEHJ,CAAC,CAACK,0CAA0C;IAC5CL,CAAC,CAACK,0CAA0C;IAC5CL,CAAC,CAACM,CAAC;IACHN,CAAC,CAACM,CAAC","file":"gen_input.py"} \ No newline at end of file +{"version":3,"sources":["input.sdstest"],"names":["test","f","segment1insamepackage","segment2insamepackage","function1indifferentpackage","g","function1incompilationunitwithpythonmodule","h"],"mappings":"AAAA;;;;;;;;;AASA,IAASA,IAAI;IACTC,CAAC,CAACC,qBAAqB;IACvBD,CAAC,CAACC,qBAAqB;IACvBD,CAAC,CAACE,qBAAqB;IACvBF,CAAC,CAACE,qBAAqB;IAEvBF,CAAC,CAAC,oIAAAG,2BAA2B;IAC7BH,CAAC,CAAC,oIAAAG,2BAA2B;IAC7BH,CAAC,CAAC,oIAAAI,CAAC;IACHJ,CAAC,CAAC,oIAAAI,CAAC;IAEHJ,CAAC,CAAC,mIAAAK,0CAA0C;IAC5CL,CAAC,CAAC,mIAAAK,0CAA0C;IAC5CL,CAAC,CAAC,mIAAAM,CAAC;IACHN,CAAC,CAAC,mIAAAM,CAAC","file":"gen_input.py"} \ No newline at end of file diff --git a/packages/safe-ds-lang/tests/resources/generation/imports/wildcard/output/tests/generator/wildcard/gen_input.py b/packages/safe-ds-lang/tests/resources/generation/imports/wildcard/output/tests/generator/wildcard/gen_input.py index 4283f3f54..a26fbd25b 100644 --- a/packages/safe-ds-lang/tests/resources/generation/imports/wildcard/output/tests/generator/wildcard/gen_input.py +++ b/packages/safe-ds-lang/tests/resources/generation/imports/wildcard/output/tests/generator/wildcard/gen_input.py @@ -1,16 +1,17 @@ # Imports ---------------------------------------------------------------------- +import safeds_runner.server.pipeline_manager from special_location import function1InCompilationUnitWithPythonModule, function2InCompilationUnitWithPythonModule from tests.generator.differentPackageWildcard import function1InDifferentPackage, function2InDifferentPackage # Pipelines -------------------------------------------------------------------- def test(): - f(function1InDifferentPackage()) - f(function1InDifferentPackage()) - f(function2InDifferentPackage()) - f(function2InDifferentPackage()) - f(function1InCompilationUnitWithPythonModule()) - f(function1InCompilationUnitWithPythonModule()) - f(function2InCompilationUnitWithPythonModule()) - f(function2InCompilationUnitWithPythonModule()) + f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.differentPackageWildcard.function1InDifferentPackage", function1InDifferentPackage, [], [])) + f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.differentPackageWildcard.function1InDifferentPackage", function1InDifferentPackage, [], [])) + f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.differentPackageWildcard.function2InDifferentPackage", function2InDifferentPackage, [], [])) + f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.differentPackageWildcard.function2InDifferentPackage", function2InDifferentPackage, [], [])) + f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("special_location.function1InCompilationUnitWithPythonModule", function1InCompilationUnitWithPythonModule, [], [])) + f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("special_location.function1InCompilationUnitWithPythonModule", function1InCompilationUnitWithPythonModule, [], [])) + f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("special_location.function2InCompilationUnitWithPythonModule", function2InCompilationUnitWithPythonModule, [], [])) + f(safeds_runner.server.pipeline_manager.runner_memoized_function_call("special_location.function2InCompilationUnitWithPythonModule", function2InCompilationUnitWithPythonModule, [], [])) diff --git a/packages/safe-ds-lang/tests/resources/generation/imports/wildcard/output/tests/generator/wildcard/gen_input.py.map b/packages/safe-ds-lang/tests/resources/generation/imports/wildcard/output/tests/generator/wildcard/gen_input.py.map index ff643626d..b88b54e29 100644 --- a/packages/safe-ds-lang/tests/resources/generation/imports/wildcard/output/tests/generator/wildcard/gen_input.py.map +++ b/packages/safe-ds-lang/tests/resources/generation/imports/wildcard/output/tests/generator/wildcard/gen_input.py.map @@ -1 +1 @@ -{"version":3,"sources":["input.sdstest"],"names":["test","f","function1indifferentpackage","function2indifferentpackage","function1incompilationunitwithpythonmodule","function2incompilationunitwithpythonmodule"],"mappings":"AAAA;;;;;;;AAOA,IAASA,IAAI;IACTC,CAAC,CAACC,2BAA2B;IAC7BD,CAAC,CAACC,2BAA2B;IAC7BD,CAAC,CAACE,2BAA2B;IAC7BF,CAAC,CAACE,2BAA2B;IAE7BF,CAAC,CAACG,0CAA0C;IAC5CH,CAAC,CAACG,0CAA0C;IAC5CH,CAAC,CAACI,0CAA0C;IAC5CJ,CAAC,CAACI,0CAA0C","file":"gen_input.py"} \ No newline at end of file +{"version":3,"sources":["input.sdstest"],"names":["test","f","function1indifferentpackage","function2indifferentpackage","function1incompilationunitwithpythonmodule","function2incompilationunitwithpythonmodule"],"mappings":"AAAA;;;;;;;;AAOA,IAASA,IAAI;IACTC,CAAC,CAAC,4IAAAC,2BAA2B;IAC7BD,CAAC,CAAC,4IAAAC,2BAA2B;IAC7BD,CAAC,CAAC,4IAAAE,2BAA2B;IAC7BF,CAAC,CAAC,4IAAAE,2BAA2B;IAE7BF,CAAC,CAAC,mIAAAG,0CAA0C;IAC5CH,CAAC,CAAC,mIAAAG,0CAA0C;IAC5CH,CAAC,CAAC,mIAAAI,0CAA0C;IAC5CJ,CAAC,CAAC,mIAAAI,0CAA0C","file":"gen_input.py"} \ No newline at end of file diff --git a/packages/safe-ds-lang/tests/resources/generation/partial/impure dependency file constant/output/tests/generator/partialImpureDependencyFileConstant/gen_input.py b/packages/safe-ds-lang/tests/resources/generation/partial/impure dependency file constant/output/tests/generator/partialImpureDependencyFileConstant/gen_input.py index 79b803216..757e37144 100644 --- a/packages/safe-ds-lang/tests/resources/generation/partial/impure dependency file constant/output/tests/generator/partialImpureDependencyFileConstant/gen_input.py +++ b/packages/safe-ds-lang/tests/resources/generation/partial/impure dependency file constant/output/tests/generator/partialImpureDependencyFileConstant/gen_input.py @@ -9,13 +9,13 @@ def testPipeline(): safeds_runner.server.pipeline_manager.runner_save_placeholder('impureFileWrite', impureFileWrite) impureFileWrite2 = iFileWriteA() safeds_runner.server.pipeline_manager.runner_save_placeholder('impureFileWrite2', impureFileWrite2) - impureFileReadAgain = iFileReadA() + impureFileReadAgain = safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.partialImpureDependencyFileConstant.iFileReadA", iFileReadA, [], [safeds_runner.server.pipeline_manager.runner_filemtime('a.txt')]) safeds_runner.server.pipeline_manager.runner_save_placeholder('impureFileReadAgain', impureFileReadAgain) impureFileWriteB = iFileWriteB() safeds_runner.server.pipeline_manager.runner_save_placeholder('impureFileWriteB', impureFileWriteB) impureFileWrite2B = iFileWriteB() safeds_runner.server.pipeline_manager.runner_save_placeholder('impureFileWrite2B', impureFileWrite2B) - impureFileReadAgainB = iFileReadB() + impureFileReadAgainB = safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.partialImpureDependencyFileConstant.iFileReadB", iFileReadB, [], [safeds_runner.server.pipeline_manager.runner_filemtime('b.txt')]) safeds_runner.server.pipeline_manager.runner_save_placeholder('impureFileReadAgainB', impureFileReadAgainB) result = (impureFileReadAgain) + (impureFileReadAgainB) safeds_runner.server.pipeline_manager.runner_save_placeholder('result', result) diff --git a/packages/safe-ds-lang/tests/resources/generation/partial/impure dependency file constant/output/tests/generator/partialImpureDependencyFileConstant/gen_input.py.map b/packages/safe-ds-lang/tests/resources/generation/partial/impure dependency file constant/output/tests/generator/partialImpureDependencyFileConstant/gen_input.py.map index 13019f383..daeb4672f 100644 --- a/packages/safe-ds-lang/tests/resources/generation/partial/impure dependency file constant/output/tests/generator/partialImpureDependencyFileConstant/gen_input.py.map +++ b/packages/safe-ds-lang/tests/resources/generation/partial/impure dependency file constant/output/tests/generator/partialImpureDependencyFileConstant/gen_input.py.map @@ -1 +1 @@ -{"version":3,"sources":["input.sdstest"],"names":["testpipeline","ifilewritea","ifilereada","ifilewriteb","ifilereadb","impurefilereadagain","impurefilereadagainb"],"mappings":"AAAA;;;;;;AAUA,IAASA,YAAY;IAEjB,kBAAsBC,WAAW;IAAjC;IACA,mBAAuBA,WAAW;IAAlC;IACA,sBAA0BC,UAAU;IAApC;IAGA,mBAAuBC,WAAW;IAAlC;IACA,oBAAwBA,WAAW;IAAnC;IACA,uBAA2BC,UAAU;IAArC;IAGA,SAAe,CAAAC,mBAAmB,EAAC,CAAC,EAACC,oBAAoB;IAAzD","file":"gen_input.py"} \ No newline at end of file +{"version":3,"sources":["input.sdstest"],"names":["testpipeline","ifilewritea","ifilereada","ifilewriteb","ifilereadb","impurefilereadagain","impurefilereadagainb"],"mappings":"AAAA;;;;;;AAUA,IAASA,YAAY;IAEjB,kBAAsBC,WAAW;IAAjC;IACA,mBAAuBA,WAAW;IAAlC;IACA,sBAA0B,sIAAAC,UAAU,OAAV,+DAAY;IAAtC;IAGA,mBAAuBC,WAAW;IAAlC;IACA,oBAAwBA,WAAW;IAAnC;IACA,uBAA2B,sIAAAC,UAAU,OAAV,+DAAY;IAAvC;IAGA,SAAe,CAAAC,mBAAmB,EAAC,CAAC,EAACC,oBAAoB;IAAzD","file":"gen_input.py"} \ No newline at end of file diff --git a/packages/safe-ds-lang/tests/resources/generation/partial/impure dependency file parameter/output/tests/generator/partialImpureDependencyFileParameter/gen_input.py b/packages/safe-ds-lang/tests/resources/generation/partial/impure dependency file parameter/output/tests/generator/partialImpureDependencyFileParameter/gen_input.py index d96c6f4af..5c232ce1d 100644 --- a/packages/safe-ds-lang/tests/resources/generation/partial/impure dependency file parameter/output/tests/generator/partialImpureDependencyFileParameter/gen_input.py +++ b/packages/safe-ds-lang/tests/resources/generation/partial/impure dependency file parameter/output/tests/generator/partialImpureDependencyFileParameter/gen_input.py @@ -9,7 +9,7 @@ def testPipeline(): safeds_runner.server.pipeline_manager.runner_save_placeholder('impureFileWrite', impureFileWrite) impureFileWrite2 = iFileWrite('c.txt') safeds_runner.server.pipeline_manager.runner_save_placeholder('impureFileWrite2', impureFileWrite2) - impureFileReadAgain = iFileRead('d.txt') + impureFileReadAgain = safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.partialImpureDependencyFileParameter.iFileRead", iFileRead, ['d.txt'], [safeds_runner.server.pipeline_manager.runner_filemtime('d.txt')]) safeds_runner.server.pipeline_manager.runner_save_placeholder('impureFileReadAgain', impureFileReadAgain) result = (impureFileReadAgain) + (2) safeds_runner.server.pipeline_manager.runner_save_placeholder('result', result) diff --git a/packages/safe-ds-lang/tests/resources/generation/partial/impure dependency file parameter/output/tests/generator/partialImpureDependencyFileParameter/gen_input.py.map b/packages/safe-ds-lang/tests/resources/generation/partial/impure dependency file parameter/output/tests/generator/partialImpureDependencyFileParameter/gen_input.py.map index b8b947ca1..ce260cc7a 100644 --- a/packages/safe-ds-lang/tests/resources/generation/partial/impure dependency file parameter/output/tests/generator/partialImpureDependencyFileParameter/gen_input.py.map +++ b/packages/safe-ds-lang/tests/resources/generation/partial/impure dependency file parameter/output/tests/generator/partialImpureDependencyFileParameter/gen_input.py.map @@ -1 +1 @@ -{"version":3,"sources":["input.sdstest"],"names":["testpipeline","ifilewrite","ifileread","impurefilereadagain"],"mappings":"AAAA;;;;;;AAMA,IAASA,YAAY;IAEjB,kBAAsBC,UAAU,CAAC,OAAO;IAAxC;IACA,mBAAuBA,UAAU,CAAC,OAAO;IAAzC;IACA,sBAA0BC,SAAS,CAAC,OAAO;IAA3C;IAGA,SAAe,CAAAC,mBAAmB,EAAC,CAAC,EAAC,CAAC;IAAtC","file":"gen_input.py"} \ No newline at end of file +{"version":3,"sources":["input.sdstest"],"names":["testpipeline","ifilewrite","ifileread","impurefilereadagain"],"mappings":"AAAA;;;;;;AAMA,IAASA,YAAY;IAEjB,kBAAsBC,UAAU,CAAC,OAAO;IAAxC;IACA,mBAAuBA,UAAU,CAAC,OAAO;IAAzC;IACA,sBAA0B,sIAAAC,SAAS,GAAC,OAAO,IAAP,uDAAA,OAAO;IAA3C;IAGA,SAAe,CAAAC,mBAAmB,EAAC,CAAC,EAAC,CAAC;IAAtC","file":"gen_input.py"} \ No newline at end of file diff --git a/packages/safe-ds-lang/tests/resources/generation/partial/impure dependency/output/tests/generator/partialImpureDependency/gen_input.py b/packages/safe-ds-lang/tests/resources/generation/partial/impure dependency/output/tests/generator/partialImpureDependency/gen_input.py index 6319d8f25..dad745575 100644 --- a/packages/safe-ds-lang/tests/resources/generation/partial/impure dependency/output/tests/generator/partialImpureDependency/gen_input.py +++ b/packages/safe-ds-lang/tests/resources/generation/partial/impure dependency/output/tests/generator/partialImpureDependency/gen_input.py @@ -10,7 +10,7 @@ def testPipeline(): safeds_runner.server.pipeline_manager.runner_save_placeholder('impureFileWrite', impureFileWrite) impureFileWrite2 = iFileWrite() safeds_runner.server.pipeline_manager.runner_save_placeholder('impureFileWrite2', impureFileWrite2) - pureValueForImpure2 = noPartialEvalInt(2) + pureValueForImpure2 = safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.partialImpureDependency.noPartialEvalInt", noPartialEvalInt, [2], []) safeds_runner.server.pipeline_manager.runner_save_placeholder('pureValueForImpure2', pureValueForImpure2) pureValueForImpure3 = 3 safeds_runner.server.pipeline_manager.runner_save_placeholder('pureValueForImpure3', pureValueForImpure3) @@ -22,7 +22,7 @@ def __gen_block_lambda_0(): i1(1) impureA1 = i1(pureValueForImpure2) safeds_runner.server.pipeline_manager.runner_save_placeholder('impureA1', impureA1) - impureA2 = i1(noPartialEvalInt(3)) + impureA2 = i1(safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.partialImpureDependency.noPartialEvalInt", noPartialEvalInt, [3], [])) safeds_runner.server.pipeline_manager.runner_save_placeholder('impureA2', impureA2) i1(4) result = i1(impureA2) diff --git a/packages/safe-ds-lang/tests/resources/generation/partial/impure dependency/output/tests/generator/partialImpureDependency/gen_input.py.map b/packages/safe-ds-lang/tests/resources/generation/partial/impure dependency/output/tests/generator/partialImpureDependency/gen_input.py.map index 0809246c5..85bd851ae 100644 --- a/packages/safe-ds-lang/tests/resources/generation/partial/impure dependency/output/tests/generator/partialImpureDependency/gen_input.py.map +++ b/packages/safe-ds-lang/tests/resources/generation/partial/impure dependency/output/tests/generator/partialImpureDependency/gen_input.py.map @@ -1 +1 @@ -{"version":3,"sources":["input.sdstest"],"names":["testpipeline","i1","ifilewrite","nopartialevalint","r","fp","purevalueforimpure2","purevalueforimpure3","impurea2"],"mappings":"AAAA;;;;;;AAeA,IAASA,YAAY;IACjBC,EAAE,CAAC,CAAC;IAGJ,kBAAsBC,UAAU;IAAhC;IACA,mBAAuBA,UAAU;IAAjC;IAEA,sBAA0BC,gBAAgB,CAAC,CAAC;IAA5C;IACA,sBAA0B,CAAC;IAA3B;IAEG;QACCF,EAAE,CAAC,CAAC;QACJ,0BAAMG,CAAC,GAAG,CAAC;QAFZ,OAEC,0BAAMA,CAAC;IAFXC,EAAE,CAAC;IAIHJ,EAAE,CAAC,CAAC;IACJ,WAAeA,EAAE,CAACK,mBAAmB;IAArC;IACA,WAAeL,EAAE,CAACE,gBAAgB,CAACI,CAAmB;IAAtD;IACAN,EAAE,CAAC,CAAC;IAGJ,SAAeA,EAAE,CAACO,QAAQ;IAA1B","file":"gen_input.py"} \ No newline at end of file +{"version":3,"sources":["input.sdstest"],"names":["testpipeline","i1","ifilewrite","nopartialevalint","r","fp","purevalueforimpure2","purevalueforimpure3","impurea2"],"mappings":"AAAA;;;;;;AAeA,IAASA,YAAY;IACjBC,EAAE,CAAC,CAAC;IAGJ,kBAAsBC,UAAU;IAAhC;IACA,mBAAuBA,UAAU;IAAjC;IAEA,sBAA0B,gIAAAC,gBAAgB,GAAC,CAAC;IAA5C;IACA,sBAA0B,CAAC;IAA3B;IAEG;QACCF,EAAE,CAAC,CAAC;QACJ,0BAAMG,CAAC,GAAG,CAAC;QAFZ,OAEC,0BAAMA,CAAC;IAFXC,EAAE,CAAC;IAIHJ,EAAE,CAAC,CAAC;IACJ,WAAeA,EAAE,CAACK,mBAAmB;IAArC;IACA,WAAeL,EAAE,CAAC,gIAAAE,gBAAgB,GAACI,CAAmB;IAAtD;IACAN,EAAE,CAAC,CAAC;IAGJ,SAAeA,EAAE,CAACO,QAAQ;IAA1B","file":"gen_input.py"} \ No newline at end of file diff --git a/packages/safe-ds-lang/tests/resources/generation/partial/pure dependency/output/tests/generator/partialPureDependency/gen_input.py b/packages/safe-ds-lang/tests/resources/generation/partial/pure dependency/output/tests/generator/partialPureDependency/gen_input.py index 57d9deff2..6c02271fe 100644 --- a/packages/safe-ds-lang/tests/resources/generation/partial/pure dependency/output/tests/generator/partialPureDependency/gen_input.py +++ b/packages/safe-ds-lang/tests/resources/generation/partial/pure dependency/output/tests/generator/partialPureDependency/gen_input.py @@ -17,7 +17,7 @@ def testPipeline(): safeds_runner.server.pipeline_manager.runner_save_placeholder('lStrMulti', lStrMulti) boolean1 = True safeds_runner.server.pipeline_manager.runner_save_placeholder('boolean1', boolean1) - value1 = g(True, -1.0, 1, None, 'multi\nline') + value1 = safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.partialPureDependency.g", g, [True, -1.0, 1, None, 'multi\nline'], []) safeds_runner.server.pipeline_manager.runner_save_placeholder('value1', value1) def __gen_block_lambda_0(): i = 1 @@ -26,17 +26,17 @@ def __gen_block_lambda_0(): j2 = 4 __gen_block_lambda_result_z = 7 return __gen_block_lambda_result_z - o = (f(__gen_block_lambda_0)) + (f(lambda : 2)) + o = (safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.partialPureDependency.f", f, [__gen_block_lambda_0], [])) + (safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.partialPureDependency.f", f, [lambda : 2], [])) safeds_runner.server.pipeline_manager.runner_save_placeholder('o', o) mapKey = 'key' safeds_runner.server.pipeline_manager.runner_save_placeholder('mapKey', mapKey) mapValue = 'value' safeds_runner.server.pipeline_manager.runner_save_placeholder('mapValue', mapValue) - mapResult = g2({'key': 'value'}) + mapResult = safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.partialPureDependency.g2", g2, [{'key': 'value'}], []) safeds_runner.server.pipeline_manager.runner_save_placeholder('mapResult', mapResult) listV1 = 1 safeds_runner.server.pipeline_manager.runner_save_placeholder('listV1', listV1) - listV3 = noPartialEvalInt(1) + listV3 = safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.partialPureDependency.noPartialEvalInt", noPartialEvalInt, [1], []) safeds_runner.server.pipeline_manager.runner_save_placeholder('listV3', listV3) list = [1] safeds_runner.server.pipeline_manager.runner_save_placeholder('list', list) @@ -44,7 +44,7 @@ def __gen_block_lambda_0(): safeds_runner.server.pipeline_manager.runner_save_placeholder('list3', list3) listValue = list3[0] safeds_runner.server.pipeline_manager.runner_save_placeholder('listValue', listValue) - listResult = g3(list) + listResult = safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.partialPureDependency.g3", g3, [list], []) safeds_runner.server.pipeline_manager.runner_save_placeholder('listResult', listResult) - result = (((-(o)) + (1)) + (value1)) + (((mapResult) * (listResult)) / (g4(listValue))) + result = (((-(o)) + (1)) + (value1)) + (((mapResult) * (listResult)) / (safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.partialPureDependency.g4", g4, [listValue], []))) safeds_runner.server.pipeline_manager.runner_save_placeholder('result', result) diff --git a/packages/safe-ds-lang/tests/resources/generation/partial/pure dependency/output/tests/generator/partialPureDependency/gen_input.py.map b/packages/safe-ds-lang/tests/resources/generation/partial/pure dependency/output/tests/generator/partialPureDependency/gen_input.py.map index 80e3cdcc6..39bf339de 100644 --- a/packages/safe-ds-lang/tests/resources/generation/partial/pure dependency/output/tests/generator/partialPureDependency/gen_input.py.map +++ b/packages/safe-ds-lang/tests/resources/generation/partial/pure dependency/output/tests/generator/partialPureDependency/gen_input.py.map @@ -1 +1 @@ -{"version":3,"sources":["input.sdstest"],"names":["testpipeline","false","null","g","boolean1","ldouble","lint","lnull","lstrmulti","z","f","g2","mapkey","mapvalue","nopartialevalint","listv1","listv3","list3","g3","list","o","value1","mapresult","listresult","g4","listvalue"],"mappings":"AAAA;;;;;;AAcA,IAASA,YAAY;IACjB,SAAaC,KAAK;IAAlB;IAGA,UAAc,IAAI;IAAlB;IAGA,OAAW,CAAC;IAAZ;IAGA,QAAYC,IAAI;IAAhB;IAGA,YAAgB;IAAhB;IAIA,WAAe;IAAf;IAGA,SAAaC,CAAC,CAACC,IAAQ,EAAEC,IAAO,EAAEC,CAAI,EAAEC,IAAK,EAAEC,aAAS;IAAxD;IAGU;QACN,IAAQ,CAAC;QACT,KAAS,CAAC;QACV,IAAQ;QACR,KAAS;QACT,0BAAMC,CAAC,GAAG;QALJ,OAKN,0BAAMA,CAAC;IALX,IAAQ,CAAAC,CAAC,CAAC,uBAMP,CAAC,EAACA,CAAC,CAAC,SAAM,CAAC;IANd;IAoBA,SAAa,KAAK;IAAlB;IACA,WAAe,OAAO;IAAtB;IACA,YAAgBC,EAAE,CAAC,CAACC,KAAM,EAAEC,OAAQ;IAApC;IAMA,SAAa,CAAC;IAAd;IAEA,SAAaC,gBAAgB,CAACC,CAAM;IAApC;IAEA,OAAW,CAACA,CAAM;IAAlB;IAEA,QAAY,CAACC,MAAM;IAAnB;IACA,YAAgBC,KAAK,CAAC,CAAC;IAAvB;IAEA,aAAiBC,EAAE,CAACC,IAAI;IAAxB;IAIA,SAAe,CAAO,CAAP,CAAA,CAAC,CAAAC,CAAC,GAAC,CAAC,EAAC,CAAC,GAAC,CAAC,EAACC,MAAM,GAAC,CAAC,EAAwB,CAAvB,CAAAC,SAAS,EAAC,CAAC,EAACC,UAAU,GAAC,CAAC,EAACC,EAAE,CAACC,SAAS;IAAtE","file":"gen_input.py"} \ No newline at end of file +{"version":3,"sources":["input.sdstest"],"names":["testpipeline","false","null","g","boolean1","ldouble","lint","lnull","lstrmulti","z","f","g2","mapkey","mapvalue","nopartialevalint","listv1","listv3","list3","g3","list","o","value1","mapresult","listresult","g4","listvalue"],"mappings":"AAAA;;;;;;AAcA,IAASA,YAAY;IACjB,SAAaC,KAAK;IAAlB;IAGA,UAAc,IAAI;IAAlB;IAGA,OAAW,CAAC;IAAZ;IAGA,QAAYC,IAAI;IAAhB;IAGA,YAAgB;IAAhB;IAIA,WAAe;IAAf;IAGA,SAAa,+GAAAC,CAAC,GAACC,IAAQ,EAAEC,IAAO,EAAEC,CAAI,EAAEC,IAAK,EAAEC,aAAS;IAAxD;IAGU;QACN,IAAQ,CAAC;QACT,KAAS,CAAC;QACV,IAAQ;QACR,KAAS;QACT,0BAAMC,CAAC,GAAG;QALJ,OAKN,0BAAMA,CAAC;IALX,IAAQ,CAAA,+GAAAC,CAAC,GAAC,4BAMP,CAAC,EAAC,+GAAAA,CAAC,GAAC,SAAM,CAAC;IANd;IAoBA,SAAa,KAAK;IAAlB;IACA,WAAe,OAAO;IAAtB;IACA,YAAgB,gHAAAC,EAAE,GAAC,CAACC,KAAM,EAAEC,OAAQ;IAApC;IAMA,SAAa,CAAC;IAAd;IAEA,SAAa,8HAAAC,gBAAgB,GAACC,CAAM;IAApC;IAEA,OAAW,CAACA,CAAM;IAAlB;IAEA,QAAY,CAACC,MAAM;IAAnB;IACA,YAAgBC,KAAK,CAAC,CAAC;IAAvB;IAEA,aAAiB,gHAAAC,EAAE,GAACC,IAAI;IAAxB;IAIA,SAAe,CAAO,CAAP,CAAA,CAAC,CAAAC,CAAC,GAAC,CAAC,EAAC,CAAC,GAAC,CAAC,EAACC,MAAM,GAAC,CAAC,EAAwB,CAAvB,CAAAC,SAAS,EAAC,CAAC,EAACC,UAAU,GAAC,CAAC,EAAC,gHAAAC,EAAE,GAACC,SAAS;IAAtE","file":"gen_input.py"} \ No newline at end of file diff --git a/packages/safe-ds-lang/tests/resources/generation/partial/redundant impurity/output/tests/generator/partialRedundantImpurity/gen_input.py b/packages/safe-ds-lang/tests/resources/generation/partial/redundant impurity/output/tests/generator/partialRedundantImpurity/gen_input.py index 8cfea963f..50bc0c245 100644 --- a/packages/safe-ds-lang/tests/resources/generation/partial/redundant impurity/output/tests/generator/partialRedundantImpurity/gen_input.py +++ b/packages/safe-ds-lang/tests/resources/generation/partial/redundant impurity/output/tests/generator/partialRedundantImpurity/gen_input.py @@ -5,7 +5,7 @@ # Pipelines -------------------------------------------------------------------- def testPipeline(): - pureValue = noPartialEvalInt(2) + pureValue = safeds_runner.server.pipeline_manager.runner_memoized_function_call("tests.generator.partialRedundantImpurity.noPartialEvalInt", noPartialEvalInt, [2], []) safeds_runner.server.pipeline_manager.runner_save_placeholder('pureValue', pureValue) result = (pureValue) - (1) safeds_runner.server.pipeline_manager.runner_save_placeholder('result', result) diff --git a/packages/safe-ds-lang/tests/resources/generation/partial/redundant impurity/output/tests/generator/partialRedundantImpurity/gen_input.py.map b/packages/safe-ds-lang/tests/resources/generation/partial/redundant impurity/output/tests/generator/partialRedundantImpurity/gen_input.py.map index 85d40aaa6..a6bb04bcd 100644 --- a/packages/safe-ds-lang/tests/resources/generation/partial/redundant impurity/output/tests/generator/partialRedundantImpurity/gen_input.py.map +++ b/packages/safe-ds-lang/tests/resources/generation/partial/redundant impurity/output/tests/generator/partialRedundantImpurity/gen_input.py.map @@ -1 +1 @@ -{"version":3,"sources":["input.sdstest"],"names":["testpipeline","nopartialevalint","purevalue"],"mappings":"AAAA;;;;;;AAeA,IAASA,YAAY;IAMjB,YAAgBC,gBAAgB,CAAC,CAAC;IAAlC;IAaA,SAAe,CAAAC,SAAS,EAAC,CAAC,EAAC,CAAC;IAA5B","file":"gen_input.py"} \ No newline at end of file +{"version":3,"sources":["input.sdstest"],"names":["testpipeline","nopartialevalint","purevalue"],"mappings":"AAAA;;;;;;AAeA,IAASA,YAAY;IAMjB,YAAgB,iIAAAC,gBAAgB,GAAC,CAAC;IAAlC;IAaA,SAAe,CAAAC,SAAS,EAAC,CAAC,EAAC,CAAC;IAA5B","file":"gen_input.py"} \ No newline at end of file diff --git a/packages/safe-ds-vscode/src/extension/pythonServer.ts b/packages/safe-ds-vscode/src/extension/pythonServer.ts index 313b151e7..c66560216 100644 --- a/packages/safe-ds-vscode/src/extension/pythonServer.ts +++ b/packages/safe-ds-vscode/src/extension/pythonServer.ts @@ -382,7 +382,7 @@ const manageRunnerSubprocessOutputIO = function () { const connectToWebSocket = async function (): Promise { const timeoutMs = 200; - const maxConnectionTries = 5; + const maxConnectionTries = 8; let currentTry = 0; // Attach WS return new Promise((resolve, reject) => {