From 55055e562f61939ffc1a7e2edb8bcba0860ede72 Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Fri, 17 Feb 2023 15:59:31 -0800 Subject: [PATCH 001/673] add types for completeness since these are benerated --- .../Model/SimpleDependenciesTypes.dfy | 480 ++++++++++++++++++ 1 file changed, 480 insertions(+) create mode 100644 TestModels/Dependencies/Model/SimpleDependenciesTypes.dfy diff --git a/TestModels/Dependencies/Model/SimpleDependenciesTypes.dfy b/TestModels/Dependencies/Model/SimpleDependenciesTypes.dfy new file mode 100644 index 0000000000..ac0a788c62 --- /dev/null +++ b/TestModels/Dependencies/Model/SimpleDependenciesTypes.dfy @@ -0,0 +1,480 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 +// Do not modify this file. This file is machine generated, and any changes to it will be overwritten. +include "../../dafny-dependencies/StandardLibrary/src/Index.dfy" + include "../../Constraints/src/Index.dfy" + include "../../Extendable/src/Index.dfy" + include "../../Resource/src/Index.dfy" + module {:extern "Dafny.Simple.Dependencies.Types" } SimpleDependenciesTypes + { + import opened Wrappers + import opened StandardLibrary.UInt + import opened UTF8 + import SimpleConstraintsTypes + import SimpleExtendableResourcesTypes + import SimpleResourcesTypes + // Generic helpers for verification of mock/unit tests. + datatype DafnyCallEvent = DafnyCallEvent(input: I, output: O) + + // Begin Generated Types + + class ISimpleDependenciesClientCallHistory { + ghost constructor() { + GetSimpleResource := []; + UseSimpleResource := []; + UseLocalExtendableResource := []; + LocalExtendableResourceAlwaysError := []; + LocalExtendableResourceAlwaysMultipleErrors := []; + LocalExtendableResourceAlwaysNativeError := []; +} + ghost var GetSimpleResource: seq>> + ghost var UseSimpleResource: seq>> + ghost var UseLocalExtendableResource: seq>> + ghost var LocalExtendableResourceAlwaysError: seq>> + ghost var LocalExtendableResourceAlwaysMultipleErrors: seq>> + ghost var LocalExtendableResourceAlwaysNativeError: seq>> +} + trait {:termination false} ISimpleDependenciesClient + { + // Helper to define any additional modifies/reads clauses. + // If your operations need to mutate state, + // add it in your constructor function: + // Modifies := {your, fields, here, History}; + // If you do not need to mutate anything: +// Modifies := {History}; + + ghost const Modifies: set + // For an unassigned field defined in a trait, + // Dafny can only assign a value in the constructor. + // This means that for Dafny to reason about this value, + // it needs some way to know (an invariant), + // about the state of the object. + // This builds on the Valid/Repr paradigm + // To make this kind requires safe to add + // to methods called from unverified code, + // the predicate MUST NOT take any arguments. + // This means that the correctness of this requires + // MUST only be evaluated by the class itself. + // If you require any additional mutation, + // then you MUST ensure everything you need in ValidState. + // You MUST also ensure ValidState in your constructor. + predicate ValidState() + ensures ValidState() ==> History in Modifies + ghost const History: ISimpleDependenciesClientCallHistory + predicate GetSimpleResourceEnsuresPublicly(input: SimpleResourcesTypes.GetResourcesInput , output: Result) + // The public method to be called by library consumers + method GetSimpleResource ( input: SimpleResourcesTypes.GetResourcesInput ) + returns (output: Result) + requires + && ValidState() + modifies Modifies - {History} , + History`GetSimpleResource + // Dafny will skip type parameters when generating a default decreases clause. + decreases Modifies - {History} + ensures + && ValidState() + && ( output.Success? ==> + && output.value.output.ValidState() + && output.value.output.Modifies !! {History} + && fresh(output.value.output) + && fresh ( output.value.output.Modifies - Modifies - {History} ) ) + ensures GetSimpleResourceEnsuresPublicly(input, output) + ensures History.GetSimpleResource == old(History.GetSimpleResource) + [DafnyCallEvent(input, output)] + + predicate UseSimpleResourceEnsuresPublicly(input: UseSimpleResourceInput , output: Result) + // The public method to be called by library consumers + method UseSimpleResource ( input: UseSimpleResourceInput ) + returns (output: Result) + requires + && ValidState() + && input.value.ValidState() + && input.value.Modifies !! {History} + modifies Modifies - {History} , + input.value.Modifies , + History`UseSimpleResource + // Dafny will skip type parameters when generating a default decreases clause. + decreases Modifies - {History} , + input.value.Modifies + ensures + && ValidState() + ensures UseSimpleResourceEnsuresPublicly(input, output) + ensures History.UseSimpleResource == old(History.UseSimpleResource) + [DafnyCallEvent(input, output)] + + predicate UseLocalExtendableResourceEnsuresPublicly(input: SimpleExtendableResourcesTypes.GetExtendableResourceDataInput , output: Result) + // The public method to be called by library consumers + method UseLocalExtendableResource ( input: SimpleExtendableResourcesTypes.GetExtendableResourceDataInput ) + returns (output: Result) + requires + && ValidState() + modifies Modifies - {History} , + History`UseLocalExtendableResource + // Dafny will skip type parameters when generating a default decreases clause. + decreases Modifies - {History} + ensures + && ValidState() + ensures UseLocalExtendableResourceEnsuresPublicly(input, output) + ensures History.UseLocalExtendableResource == old(History.UseLocalExtendableResource) + [DafnyCallEvent(input, output)] + + predicate LocalExtendableResourceAlwaysErrorEnsuresPublicly(input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput , output: Result) + // The public method to be called by library consumers + method LocalExtendableResourceAlwaysError ( input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput ) + returns (output: Result) + requires + && ValidState() + modifies Modifies - {History} , + History`LocalExtendableResourceAlwaysError + // Dafny will skip type parameters when generating a default decreases clause. + decreases Modifies - {History} + ensures + && ValidState() + ensures LocalExtendableResourceAlwaysErrorEnsuresPublicly(input, output) + ensures History.LocalExtendableResourceAlwaysError == old(History.LocalExtendableResourceAlwaysError) + [DafnyCallEvent(input, output)] + + predicate LocalExtendableResourceAlwaysMultipleErrorsEnsuresPublicly(input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput , output: Result) + // The public method to be called by library consumers + method LocalExtendableResourceAlwaysMultipleErrors ( input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput ) + returns (output: Result) + requires + && ValidState() + modifies Modifies - {History} , + History`LocalExtendableResourceAlwaysMultipleErrors + // Dafny will skip type parameters when generating a default decreases clause. + decreases Modifies - {History} + ensures + && ValidState() + ensures LocalExtendableResourceAlwaysMultipleErrorsEnsuresPublicly(input, output) + ensures History.LocalExtendableResourceAlwaysMultipleErrors == old(History.LocalExtendableResourceAlwaysMultipleErrors) + [DafnyCallEvent(input, output)] + + predicate LocalExtendableResourceAlwaysNativeErrorEnsuresPublicly(input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput , output: Result) + // The public method to be called by library consumers + method LocalExtendableResourceAlwaysNativeError ( input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput ) + returns (output: Result) + requires + && ValidState() + modifies Modifies - {History} , + History`LocalExtendableResourceAlwaysNativeError + // Dafny will skip type parameters when generating a default decreases clause. + decreases Modifies - {History} + ensures + && ValidState() + ensures LocalExtendableResourceAlwaysNativeErrorEnsuresPublicly(input, output) + ensures History.LocalExtendableResourceAlwaysNativeError == old(History.LocalExtendableResourceAlwaysNativeError) + [DafnyCallEvent(input, output)] + +} + datatype SimpleDependenciesConfig = | SimpleDependenciesConfig ( + nameonly simpleResourcesConfig: Option , + nameonly extendableResourceReference: Option , + nameonly specialString: Option + ) + datatype UseSimpleResourceInput = | UseSimpleResourceInput ( + nameonly value: SimpleResourcesTypes.ISimpleResource , + nameonly input: SimpleResourcesTypes.GetResourceDataInput + ) + datatype Error = + // Local Error structures are listed here + + // Any dependent models are listed here + | SimpleConstraints(SimpleConstraints: SimpleConstraintsTypes.Error) + | SimpleExtendableResources(SimpleExtendableResources: SimpleExtendableResourcesTypes.Error) + | SimpleResources(SimpleResources: SimpleResourcesTypes.Error) + // The Collection error is used to collect several errors together + // This is useful when composing OR logic. + // Consider the following method: + // + // method FN(n:I) + // returns (res: Result) + // ensures A(I).Success? ==> res.Success? + // ensures B(I).Success? ==> res.Success? + // ensures A(I).Failure? && B(I).Failure? ==> res.Failure? + // + // If either A || B is successful then FN is successful. + // And if A && B fail then FN will fail. + // But what information should FN transmit back to the caller? + // While it may be correct to hide these details from the caller, + // this can not be the globally correct option. + // Suppose that A and B can be blocked by different ACLs, + // and that their representation of I is only eventually consistent. + // How can the caller distinguish, at a minimum for logging, + // the difference between the four failure modes? + // || (!access(A(I)) && !access(B(I))) + // || (!exit(A(I)) && !exit(B(I))) + // || (!access(A(I)) && !exit(B(I))) + // || (!exit(A(I)) && !access(B(I))) + | CollectionOfErrors(list: seq) + // The Opaque error, used for native, extern, wrapped or unknown errors + | Opaque(obj: object) + type OpaqueError = e: Error | e.Opaque? witness * +} + abstract module AbstractSimpleDependenciesService + { + import opened Wrappers + import opened StandardLibrary.UInt + import opened UTF8 + import opened Types = SimpleDependenciesTypes + import Operations : AbstractSimpleDependenciesOperations + function method DefaultSimpleDependenciesConfig(): SimpleDependenciesConfig + method SimpleDependencies(config: SimpleDependenciesConfig := DefaultSimpleDependenciesConfig()) + returns (res: Result) + requires config.extendableResourceReference.Some? ==> config.extendableResourceReference.value.ValidState() + modifies if config.extendableResourceReference.Some? then config.extendableResourceReference.value.Modifies else {} + ensures res.Success? ==> + && fresh(res.value) + && fresh(res.value.History) + && fresh(res.value.Modifies - Operations.ModifiesInternalConfig(res.value.config)) + && res.value.ValidState() + ensures !(config.extendableResourceReference.Some?) && res.Success? ==> fresh(Operations.ModifiesInternalConfig(res.value.config)) + class SimpleDependenciesClient extends ISimpleDependenciesClient + { + constructor(config: Operations.InternalConfig) + requires Operations.ValidInternalConfig?(config) + ensures + && ValidState() + && fresh(History) + && this.config == config + const config: Operations.InternalConfig + predicate ValidState() + ensures ValidState() ==> + && Operations.ValidInternalConfig?(config) + && History !in Operations.ModifiesInternalConfig(config) + && Modifies == Operations.ModifiesInternalConfig(config) + {History} + predicate GetSimpleResourceEnsuresPublicly(input: SimpleResourcesTypes.GetResourcesInput , output: Result) + {Operations.GetSimpleResourceEnsuresPublicly(input, output)} + // The public method to be called by library consumers + method GetSimpleResource ( input: SimpleResourcesTypes.GetResourcesInput ) + returns (output: Result) + requires + && ValidState() + modifies Modifies - {History}, + History`GetSimpleResource + // Dafny will skip type parameters when generating a default decreases clause. + decreases Modifies - {History} + ensures + && ValidState() + && ( output.Success? ==> + && output.value.output.ValidState() + && output.value.output.Modifies !! {History} + && fresh(output.value.output) + && fresh ( output.value.output.Modifies - Modifies - {History}) ) + ensures GetSimpleResourceEnsuresPublicly(input, output) + ensures History.GetSimpleResource == old(History.GetSimpleResource) + [DafnyCallEvent(input, output)] + { + output := Operations.GetSimpleResource(config, input); + History.GetSimpleResource := History.GetSimpleResource + [DafnyCallEvent(input, output)]; +} + + predicate UseSimpleResourceEnsuresPublicly(input: UseSimpleResourceInput , output: Result) + {Operations.UseSimpleResourceEnsuresPublicly(input, output)} + // The public method to be called by library consumers + method UseSimpleResource ( input: UseSimpleResourceInput ) + returns (output: Result) + requires + && ValidState() + && input.value.ValidState() + && input.value.Modifies !! {History} + modifies Modifies - {History} , + input.value.Modifies , + History`UseSimpleResource + // Dafny will skip type parameters when generating a default decreases clause. + decreases Modifies - {History} , + input.value.Modifies + ensures + && ValidState() + ensures UseSimpleResourceEnsuresPublicly(input, output) + ensures History.UseSimpleResource == old(History.UseSimpleResource) + [DafnyCallEvent(input, output)] + { + output := Operations.UseSimpleResource(config, input); + History.UseSimpleResource := History.UseSimpleResource + [DafnyCallEvent(input, output)]; +} + + predicate UseLocalExtendableResourceEnsuresPublicly(input: SimpleExtendableResourcesTypes.GetExtendableResourceDataInput , output: Result) + {Operations.UseLocalExtendableResourceEnsuresPublicly(input, output)} + // The public method to be called by library consumers + method UseLocalExtendableResource ( input: SimpleExtendableResourcesTypes.GetExtendableResourceDataInput ) + returns (output: Result) + requires + && ValidState() + modifies Modifies - {History} , + History`UseLocalExtendableResource + // Dafny will skip type parameters when generating a default decreases clause. + decreases Modifies - {History} + ensures + && ValidState() + ensures UseLocalExtendableResourceEnsuresPublicly(input, output) + ensures History.UseLocalExtendableResource == old(History.UseLocalExtendableResource) + [DafnyCallEvent(input, output)] + { + output := Operations.UseLocalExtendableResource(config, input); + History.UseLocalExtendableResource := History.UseLocalExtendableResource + [DafnyCallEvent(input, output)]; +} + + predicate LocalExtendableResourceAlwaysErrorEnsuresPublicly(input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput , output: Result) + {Operations.LocalExtendableResourceAlwaysErrorEnsuresPublicly(input, output)} + // The public method to be called by library consumers + method LocalExtendableResourceAlwaysError ( input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput ) + returns (output: Result) + requires + && ValidState() + modifies Modifies - {History} , + History`LocalExtendableResourceAlwaysError + // Dafny will skip type parameters when generating a default decreases clause. + decreases Modifies - {History} + ensures + && ValidState() + ensures LocalExtendableResourceAlwaysErrorEnsuresPublicly(input, output) + ensures History.LocalExtendableResourceAlwaysError == old(History.LocalExtendableResourceAlwaysError) + [DafnyCallEvent(input, output)] + { + output := Operations.LocalExtendableResourceAlwaysError(config, input); + History.LocalExtendableResourceAlwaysError := History.LocalExtendableResourceAlwaysError + [DafnyCallEvent(input, output)]; +} + + predicate LocalExtendableResourceAlwaysMultipleErrorsEnsuresPublicly(input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput , output: Result) + {Operations.LocalExtendableResourceAlwaysMultipleErrorsEnsuresPublicly(input, output)} + // The public method to be called by library consumers + method LocalExtendableResourceAlwaysMultipleErrors ( input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput ) + returns (output: Result) + requires + && ValidState() + modifies Modifies - {History} , + History`LocalExtendableResourceAlwaysMultipleErrors + // Dafny will skip type parameters when generating a default decreases clause. + decreases Modifies - {History} + ensures + && ValidState() + ensures LocalExtendableResourceAlwaysMultipleErrorsEnsuresPublicly(input, output) + ensures History.LocalExtendableResourceAlwaysMultipleErrors == old(History.LocalExtendableResourceAlwaysMultipleErrors) + [DafnyCallEvent(input, output)] + { + output := Operations.LocalExtendableResourceAlwaysMultipleErrors(config, input); + History.LocalExtendableResourceAlwaysMultipleErrors := History.LocalExtendableResourceAlwaysMultipleErrors + [DafnyCallEvent(input, output)]; +} + + predicate LocalExtendableResourceAlwaysNativeErrorEnsuresPublicly(input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput , output: Result) + {Operations.LocalExtendableResourceAlwaysNativeErrorEnsuresPublicly(input, output)} + // The public method to be called by library consumers + method LocalExtendableResourceAlwaysNativeError ( input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput ) + returns (output: Result) + requires + && ValidState() + modifies Modifies - {History} , + History`LocalExtendableResourceAlwaysNativeError + // Dafny will skip type parameters when generating a default decreases clause. + decreases Modifies - {History} + ensures + && ValidState() + ensures LocalExtendableResourceAlwaysNativeErrorEnsuresPublicly(input, output) + ensures History.LocalExtendableResourceAlwaysNativeError == old(History.LocalExtendableResourceAlwaysNativeError) + [DafnyCallEvent(input, output)] + { + output := Operations.LocalExtendableResourceAlwaysNativeError(config, input); + History.LocalExtendableResourceAlwaysNativeError := History.LocalExtendableResourceAlwaysNativeError + [DafnyCallEvent(input, output)]; +} + +} +} + abstract module AbstractSimpleDependenciesOperations { + import opened Wrappers + import opened StandardLibrary.UInt + import opened UTF8 + import opened Types = SimpleDependenciesTypes + type InternalConfig + predicate ValidInternalConfig?(config: InternalConfig) + function ModifiesInternalConfig(config: InternalConfig): set + predicate GetSimpleResourceEnsuresPublicly(input: SimpleResourcesTypes.GetResourcesInput , output: Result) + // The private method to be refined by the library developer + + + method GetSimpleResource ( config: InternalConfig , input: SimpleResourcesTypes.GetResourcesInput ) + returns (output: Result) + requires + && ValidInternalConfig?(config) + modifies ModifiesInternalConfig(config) + // Dafny will skip type parameters when generating a default decreases clause. + decreases ModifiesInternalConfig(config) + ensures + && ValidInternalConfig?(config) + && ( output.Success? ==> + && output.value.output.ValidState() + && fresh(output.value.output) + && fresh ( output.value.output.Modifies - ModifiesInternalConfig(config) ) ) + ensures GetSimpleResourceEnsuresPublicly(input, output) + + + predicate UseSimpleResourceEnsuresPublicly(input: UseSimpleResourceInput , output: Result) + // The private method to be refined by the library developer + + + method UseSimpleResource ( config: InternalConfig , input: UseSimpleResourceInput ) + returns (output: Result) + requires + && ValidInternalConfig?(config) + && input.value.ValidState() + modifies ModifiesInternalConfig(config) , + input.value.Modifies + // Dafny will skip type parameters when generating a default decreases clause. + decreases ModifiesInternalConfig(config) , + input.value.Modifies + ensures + && ValidInternalConfig?(config) + ensures UseSimpleResourceEnsuresPublicly(input, output) + + + predicate UseLocalExtendableResourceEnsuresPublicly(input: SimpleExtendableResourcesTypes.GetExtendableResourceDataInput , output: Result) + // The private method to be refined by the library developer + + + method UseLocalExtendableResource ( config: InternalConfig , input: SimpleExtendableResourcesTypes.GetExtendableResourceDataInput ) + returns (output: Result) + requires + && ValidInternalConfig?(config) + modifies ModifiesInternalConfig(config) + // Dafny will skip type parameters when generating a default decreases clause. + decreases ModifiesInternalConfig(config) + ensures + && ValidInternalConfig?(config) + ensures UseLocalExtendableResourceEnsuresPublicly(input, output) + + + predicate LocalExtendableResourceAlwaysErrorEnsuresPublicly(input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput , output: Result) + // The private method to be refined by the library developer + + + method LocalExtendableResourceAlwaysError ( config: InternalConfig , input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput ) + returns (output: Result) + requires + && ValidInternalConfig?(config) + modifies ModifiesInternalConfig(config) + // Dafny will skip type parameters when generating a default decreases clause. + decreases ModifiesInternalConfig(config) + ensures + && ValidInternalConfig?(config) + ensures LocalExtendableResourceAlwaysErrorEnsuresPublicly(input, output) + + + predicate LocalExtendableResourceAlwaysMultipleErrorsEnsuresPublicly(input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput , output: Result) + // The private method to be refined by the library developer + + + method LocalExtendableResourceAlwaysMultipleErrors ( config: InternalConfig , input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput ) + returns (output: Result) + requires + && ValidInternalConfig?(config) + modifies ModifiesInternalConfig(config) + // Dafny will skip type parameters when generating a default decreases clause. + decreases ModifiesInternalConfig(config) + ensures + && ValidInternalConfig?(config) + ensures LocalExtendableResourceAlwaysMultipleErrorsEnsuresPublicly(input, output) + + + predicate LocalExtendableResourceAlwaysNativeErrorEnsuresPublicly(input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput , output: Result) + // The private method to be refined by the library developer + + + method LocalExtendableResourceAlwaysNativeError ( config: InternalConfig , input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput ) + returns (output: Result) + requires + && ValidInternalConfig?(config) + modifies ModifiesInternalConfig(config) + // Dafny will skip type parameters when generating a default decreases clause. + decreases ModifiesInternalConfig(config) + ensures + && ValidInternalConfig?(config) + ensures LocalExtendableResourceAlwaysNativeErrorEnsuresPublicly(input, output) +} From fe5cd8a94a684a488a2ad663eb4af8c079fb1b1e Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Fri, 17 Feb 2023 15:59:31 -0800 Subject: [PATCH 002/673] add types for completeness since these are benerated --- .../Model/SimpleDependenciesTypes.dfy | 480 ++++++++++++++++++ 1 file changed, 480 insertions(+) create mode 100644 TestModels/Dependencies/Model/SimpleDependenciesTypes.dfy diff --git a/TestModels/Dependencies/Model/SimpleDependenciesTypes.dfy b/TestModels/Dependencies/Model/SimpleDependenciesTypes.dfy new file mode 100644 index 0000000000..ac0a788c62 --- /dev/null +++ b/TestModels/Dependencies/Model/SimpleDependenciesTypes.dfy @@ -0,0 +1,480 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 +// Do not modify this file. This file is machine generated, and any changes to it will be overwritten. +include "../../dafny-dependencies/StandardLibrary/src/Index.dfy" + include "../../Constraints/src/Index.dfy" + include "../../Extendable/src/Index.dfy" + include "../../Resource/src/Index.dfy" + module {:extern "Dafny.Simple.Dependencies.Types" } SimpleDependenciesTypes + { + import opened Wrappers + import opened StandardLibrary.UInt + import opened UTF8 + import SimpleConstraintsTypes + import SimpleExtendableResourcesTypes + import SimpleResourcesTypes + // Generic helpers for verification of mock/unit tests. + datatype DafnyCallEvent = DafnyCallEvent(input: I, output: O) + + // Begin Generated Types + + class ISimpleDependenciesClientCallHistory { + ghost constructor() { + GetSimpleResource := []; + UseSimpleResource := []; + UseLocalExtendableResource := []; + LocalExtendableResourceAlwaysError := []; + LocalExtendableResourceAlwaysMultipleErrors := []; + LocalExtendableResourceAlwaysNativeError := []; +} + ghost var GetSimpleResource: seq>> + ghost var UseSimpleResource: seq>> + ghost var UseLocalExtendableResource: seq>> + ghost var LocalExtendableResourceAlwaysError: seq>> + ghost var LocalExtendableResourceAlwaysMultipleErrors: seq>> + ghost var LocalExtendableResourceAlwaysNativeError: seq>> +} + trait {:termination false} ISimpleDependenciesClient + { + // Helper to define any additional modifies/reads clauses. + // If your operations need to mutate state, + // add it in your constructor function: + // Modifies := {your, fields, here, History}; + // If you do not need to mutate anything: +// Modifies := {History}; + + ghost const Modifies: set + // For an unassigned field defined in a trait, + // Dafny can only assign a value in the constructor. + // This means that for Dafny to reason about this value, + // it needs some way to know (an invariant), + // about the state of the object. + // This builds on the Valid/Repr paradigm + // To make this kind requires safe to add + // to methods called from unverified code, + // the predicate MUST NOT take any arguments. + // This means that the correctness of this requires + // MUST only be evaluated by the class itself. + // If you require any additional mutation, + // then you MUST ensure everything you need in ValidState. + // You MUST also ensure ValidState in your constructor. + predicate ValidState() + ensures ValidState() ==> History in Modifies + ghost const History: ISimpleDependenciesClientCallHistory + predicate GetSimpleResourceEnsuresPublicly(input: SimpleResourcesTypes.GetResourcesInput , output: Result) + // The public method to be called by library consumers + method GetSimpleResource ( input: SimpleResourcesTypes.GetResourcesInput ) + returns (output: Result) + requires + && ValidState() + modifies Modifies - {History} , + History`GetSimpleResource + // Dafny will skip type parameters when generating a default decreases clause. + decreases Modifies - {History} + ensures + && ValidState() + && ( output.Success? ==> + && output.value.output.ValidState() + && output.value.output.Modifies !! {History} + && fresh(output.value.output) + && fresh ( output.value.output.Modifies - Modifies - {History} ) ) + ensures GetSimpleResourceEnsuresPublicly(input, output) + ensures History.GetSimpleResource == old(History.GetSimpleResource) + [DafnyCallEvent(input, output)] + + predicate UseSimpleResourceEnsuresPublicly(input: UseSimpleResourceInput , output: Result) + // The public method to be called by library consumers + method UseSimpleResource ( input: UseSimpleResourceInput ) + returns (output: Result) + requires + && ValidState() + && input.value.ValidState() + && input.value.Modifies !! {History} + modifies Modifies - {History} , + input.value.Modifies , + History`UseSimpleResource + // Dafny will skip type parameters when generating a default decreases clause. + decreases Modifies - {History} , + input.value.Modifies + ensures + && ValidState() + ensures UseSimpleResourceEnsuresPublicly(input, output) + ensures History.UseSimpleResource == old(History.UseSimpleResource) + [DafnyCallEvent(input, output)] + + predicate UseLocalExtendableResourceEnsuresPublicly(input: SimpleExtendableResourcesTypes.GetExtendableResourceDataInput , output: Result) + // The public method to be called by library consumers + method UseLocalExtendableResource ( input: SimpleExtendableResourcesTypes.GetExtendableResourceDataInput ) + returns (output: Result) + requires + && ValidState() + modifies Modifies - {History} , + History`UseLocalExtendableResource + // Dafny will skip type parameters when generating a default decreases clause. + decreases Modifies - {History} + ensures + && ValidState() + ensures UseLocalExtendableResourceEnsuresPublicly(input, output) + ensures History.UseLocalExtendableResource == old(History.UseLocalExtendableResource) + [DafnyCallEvent(input, output)] + + predicate LocalExtendableResourceAlwaysErrorEnsuresPublicly(input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput , output: Result) + // The public method to be called by library consumers + method LocalExtendableResourceAlwaysError ( input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput ) + returns (output: Result) + requires + && ValidState() + modifies Modifies - {History} , + History`LocalExtendableResourceAlwaysError + // Dafny will skip type parameters when generating a default decreases clause. + decreases Modifies - {History} + ensures + && ValidState() + ensures LocalExtendableResourceAlwaysErrorEnsuresPublicly(input, output) + ensures History.LocalExtendableResourceAlwaysError == old(History.LocalExtendableResourceAlwaysError) + [DafnyCallEvent(input, output)] + + predicate LocalExtendableResourceAlwaysMultipleErrorsEnsuresPublicly(input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput , output: Result) + // The public method to be called by library consumers + method LocalExtendableResourceAlwaysMultipleErrors ( input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput ) + returns (output: Result) + requires + && ValidState() + modifies Modifies - {History} , + History`LocalExtendableResourceAlwaysMultipleErrors + // Dafny will skip type parameters when generating a default decreases clause. + decreases Modifies - {History} + ensures + && ValidState() + ensures LocalExtendableResourceAlwaysMultipleErrorsEnsuresPublicly(input, output) + ensures History.LocalExtendableResourceAlwaysMultipleErrors == old(History.LocalExtendableResourceAlwaysMultipleErrors) + [DafnyCallEvent(input, output)] + + predicate LocalExtendableResourceAlwaysNativeErrorEnsuresPublicly(input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput , output: Result) + // The public method to be called by library consumers + method LocalExtendableResourceAlwaysNativeError ( input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput ) + returns (output: Result) + requires + && ValidState() + modifies Modifies - {History} , + History`LocalExtendableResourceAlwaysNativeError + // Dafny will skip type parameters when generating a default decreases clause. + decreases Modifies - {History} + ensures + && ValidState() + ensures LocalExtendableResourceAlwaysNativeErrorEnsuresPublicly(input, output) + ensures History.LocalExtendableResourceAlwaysNativeError == old(History.LocalExtendableResourceAlwaysNativeError) + [DafnyCallEvent(input, output)] + +} + datatype SimpleDependenciesConfig = | SimpleDependenciesConfig ( + nameonly simpleResourcesConfig: Option , + nameonly extendableResourceReference: Option , + nameonly specialString: Option + ) + datatype UseSimpleResourceInput = | UseSimpleResourceInput ( + nameonly value: SimpleResourcesTypes.ISimpleResource , + nameonly input: SimpleResourcesTypes.GetResourceDataInput + ) + datatype Error = + // Local Error structures are listed here + + // Any dependent models are listed here + | SimpleConstraints(SimpleConstraints: SimpleConstraintsTypes.Error) + | SimpleExtendableResources(SimpleExtendableResources: SimpleExtendableResourcesTypes.Error) + | SimpleResources(SimpleResources: SimpleResourcesTypes.Error) + // The Collection error is used to collect several errors together + // This is useful when composing OR logic. + // Consider the following method: + // + // method FN(n:I) + // returns (res: Result) + // ensures A(I).Success? ==> res.Success? + // ensures B(I).Success? ==> res.Success? + // ensures A(I).Failure? && B(I).Failure? ==> res.Failure? + // + // If either A || B is successful then FN is successful. + // And if A && B fail then FN will fail. + // But what information should FN transmit back to the caller? + // While it may be correct to hide these details from the caller, + // this can not be the globally correct option. + // Suppose that A and B can be blocked by different ACLs, + // and that their representation of I is only eventually consistent. + // How can the caller distinguish, at a minimum for logging, + // the difference between the four failure modes? + // || (!access(A(I)) && !access(B(I))) + // || (!exit(A(I)) && !exit(B(I))) + // || (!access(A(I)) && !exit(B(I))) + // || (!exit(A(I)) && !access(B(I))) + | CollectionOfErrors(list: seq) + // The Opaque error, used for native, extern, wrapped or unknown errors + | Opaque(obj: object) + type OpaqueError = e: Error | e.Opaque? witness * +} + abstract module AbstractSimpleDependenciesService + { + import opened Wrappers + import opened StandardLibrary.UInt + import opened UTF8 + import opened Types = SimpleDependenciesTypes + import Operations : AbstractSimpleDependenciesOperations + function method DefaultSimpleDependenciesConfig(): SimpleDependenciesConfig + method SimpleDependencies(config: SimpleDependenciesConfig := DefaultSimpleDependenciesConfig()) + returns (res: Result) + requires config.extendableResourceReference.Some? ==> config.extendableResourceReference.value.ValidState() + modifies if config.extendableResourceReference.Some? then config.extendableResourceReference.value.Modifies else {} + ensures res.Success? ==> + && fresh(res.value) + && fresh(res.value.History) + && fresh(res.value.Modifies - Operations.ModifiesInternalConfig(res.value.config)) + && res.value.ValidState() + ensures !(config.extendableResourceReference.Some?) && res.Success? ==> fresh(Operations.ModifiesInternalConfig(res.value.config)) + class SimpleDependenciesClient extends ISimpleDependenciesClient + { + constructor(config: Operations.InternalConfig) + requires Operations.ValidInternalConfig?(config) + ensures + && ValidState() + && fresh(History) + && this.config == config + const config: Operations.InternalConfig + predicate ValidState() + ensures ValidState() ==> + && Operations.ValidInternalConfig?(config) + && History !in Operations.ModifiesInternalConfig(config) + && Modifies == Operations.ModifiesInternalConfig(config) + {History} + predicate GetSimpleResourceEnsuresPublicly(input: SimpleResourcesTypes.GetResourcesInput , output: Result) + {Operations.GetSimpleResourceEnsuresPublicly(input, output)} + // The public method to be called by library consumers + method GetSimpleResource ( input: SimpleResourcesTypes.GetResourcesInput ) + returns (output: Result) + requires + && ValidState() + modifies Modifies - {History}, + History`GetSimpleResource + // Dafny will skip type parameters when generating a default decreases clause. + decreases Modifies - {History} + ensures + && ValidState() + && ( output.Success? ==> + && output.value.output.ValidState() + && output.value.output.Modifies !! {History} + && fresh(output.value.output) + && fresh ( output.value.output.Modifies - Modifies - {History}) ) + ensures GetSimpleResourceEnsuresPublicly(input, output) + ensures History.GetSimpleResource == old(History.GetSimpleResource) + [DafnyCallEvent(input, output)] + { + output := Operations.GetSimpleResource(config, input); + History.GetSimpleResource := History.GetSimpleResource + [DafnyCallEvent(input, output)]; +} + + predicate UseSimpleResourceEnsuresPublicly(input: UseSimpleResourceInput , output: Result) + {Operations.UseSimpleResourceEnsuresPublicly(input, output)} + // The public method to be called by library consumers + method UseSimpleResource ( input: UseSimpleResourceInput ) + returns (output: Result) + requires + && ValidState() + && input.value.ValidState() + && input.value.Modifies !! {History} + modifies Modifies - {History} , + input.value.Modifies , + History`UseSimpleResource + // Dafny will skip type parameters when generating a default decreases clause. + decreases Modifies - {History} , + input.value.Modifies + ensures + && ValidState() + ensures UseSimpleResourceEnsuresPublicly(input, output) + ensures History.UseSimpleResource == old(History.UseSimpleResource) + [DafnyCallEvent(input, output)] + { + output := Operations.UseSimpleResource(config, input); + History.UseSimpleResource := History.UseSimpleResource + [DafnyCallEvent(input, output)]; +} + + predicate UseLocalExtendableResourceEnsuresPublicly(input: SimpleExtendableResourcesTypes.GetExtendableResourceDataInput , output: Result) + {Operations.UseLocalExtendableResourceEnsuresPublicly(input, output)} + // The public method to be called by library consumers + method UseLocalExtendableResource ( input: SimpleExtendableResourcesTypes.GetExtendableResourceDataInput ) + returns (output: Result) + requires + && ValidState() + modifies Modifies - {History} , + History`UseLocalExtendableResource + // Dafny will skip type parameters when generating a default decreases clause. + decreases Modifies - {History} + ensures + && ValidState() + ensures UseLocalExtendableResourceEnsuresPublicly(input, output) + ensures History.UseLocalExtendableResource == old(History.UseLocalExtendableResource) + [DafnyCallEvent(input, output)] + { + output := Operations.UseLocalExtendableResource(config, input); + History.UseLocalExtendableResource := History.UseLocalExtendableResource + [DafnyCallEvent(input, output)]; +} + + predicate LocalExtendableResourceAlwaysErrorEnsuresPublicly(input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput , output: Result) + {Operations.LocalExtendableResourceAlwaysErrorEnsuresPublicly(input, output)} + // The public method to be called by library consumers + method LocalExtendableResourceAlwaysError ( input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput ) + returns (output: Result) + requires + && ValidState() + modifies Modifies - {History} , + History`LocalExtendableResourceAlwaysError + // Dafny will skip type parameters when generating a default decreases clause. + decreases Modifies - {History} + ensures + && ValidState() + ensures LocalExtendableResourceAlwaysErrorEnsuresPublicly(input, output) + ensures History.LocalExtendableResourceAlwaysError == old(History.LocalExtendableResourceAlwaysError) + [DafnyCallEvent(input, output)] + { + output := Operations.LocalExtendableResourceAlwaysError(config, input); + History.LocalExtendableResourceAlwaysError := History.LocalExtendableResourceAlwaysError + [DafnyCallEvent(input, output)]; +} + + predicate LocalExtendableResourceAlwaysMultipleErrorsEnsuresPublicly(input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput , output: Result) + {Operations.LocalExtendableResourceAlwaysMultipleErrorsEnsuresPublicly(input, output)} + // The public method to be called by library consumers + method LocalExtendableResourceAlwaysMultipleErrors ( input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput ) + returns (output: Result) + requires + && ValidState() + modifies Modifies - {History} , + History`LocalExtendableResourceAlwaysMultipleErrors + // Dafny will skip type parameters when generating a default decreases clause. + decreases Modifies - {History} + ensures + && ValidState() + ensures LocalExtendableResourceAlwaysMultipleErrorsEnsuresPublicly(input, output) + ensures History.LocalExtendableResourceAlwaysMultipleErrors == old(History.LocalExtendableResourceAlwaysMultipleErrors) + [DafnyCallEvent(input, output)] + { + output := Operations.LocalExtendableResourceAlwaysMultipleErrors(config, input); + History.LocalExtendableResourceAlwaysMultipleErrors := History.LocalExtendableResourceAlwaysMultipleErrors + [DafnyCallEvent(input, output)]; +} + + predicate LocalExtendableResourceAlwaysNativeErrorEnsuresPublicly(input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput , output: Result) + {Operations.LocalExtendableResourceAlwaysNativeErrorEnsuresPublicly(input, output)} + // The public method to be called by library consumers + method LocalExtendableResourceAlwaysNativeError ( input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput ) + returns (output: Result) + requires + && ValidState() + modifies Modifies - {History} , + History`LocalExtendableResourceAlwaysNativeError + // Dafny will skip type parameters when generating a default decreases clause. + decreases Modifies - {History} + ensures + && ValidState() + ensures LocalExtendableResourceAlwaysNativeErrorEnsuresPublicly(input, output) + ensures History.LocalExtendableResourceAlwaysNativeError == old(History.LocalExtendableResourceAlwaysNativeError) + [DafnyCallEvent(input, output)] + { + output := Operations.LocalExtendableResourceAlwaysNativeError(config, input); + History.LocalExtendableResourceAlwaysNativeError := History.LocalExtendableResourceAlwaysNativeError + [DafnyCallEvent(input, output)]; +} + +} +} + abstract module AbstractSimpleDependenciesOperations { + import opened Wrappers + import opened StandardLibrary.UInt + import opened UTF8 + import opened Types = SimpleDependenciesTypes + type InternalConfig + predicate ValidInternalConfig?(config: InternalConfig) + function ModifiesInternalConfig(config: InternalConfig): set + predicate GetSimpleResourceEnsuresPublicly(input: SimpleResourcesTypes.GetResourcesInput , output: Result) + // The private method to be refined by the library developer + + + method GetSimpleResource ( config: InternalConfig , input: SimpleResourcesTypes.GetResourcesInput ) + returns (output: Result) + requires + && ValidInternalConfig?(config) + modifies ModifiesInternalConfig(config) + // Dafny will skip type parameters when generating a default decreases clause. + decreases ModifiesInternalConfig(config) + ensures + && ValidInternalConfig?(config) + && ( output.Success? ==> + && output.value.output.ValidState() + && fresh(output.value.output) + && fresh ( output.value.output.Modifies - ModifiesInternalConfig(config) ) ) + ensures GetSimpleResourceEnsuresPublicly(input, output) + + + predicate UseSimpleResourceEnsuresPublicly(input: UseSimpleResourceInput , output: Result) + // The private method to be refined by the library developer + + + method UseSimpleResource ( config: InternalConfig , input: UseSimpleResourceInput ) + returns (output: Result) + requires + && ValidInternalConfig?(config) + && input.value.ValidState() + modifies ModifiesInternalConfig(config) , + input.value.Modifies + // Dafny will skip type parameters when generating a default decreases clause. + decreases ModifiesInternalConfig(config) , + input.value.Modifies + ensures + && ValidInternalConfig?(config) + ensures UseSimpleResourceEnsuresPublicly(input, output) + + + predicate UseLocalExtendableResourceEnsuresPublicly(input: SimpleExtendableResourcesTypes.GetExtendableResourceDataInput , output: Result) + // The private method to be refined by the library developer + + + method UseLocalExtendableResource ( config: InternalConfig , input: SimpleExtendableResourcesTypes.GetExtendableResourceDataInput ) + returns (output: Result) + requires + && ValidInternalConfig?(config) + modifies ModifiesInternalConfig(config) + // Dafny will skip type parameters when generating a default decreases clause. + decreases ModifiesInternalConfig(config) + ensures + && ValidInternalConfig?(config) + ensures UseLocalExtendableResourceEnsuresPublicly(input, output) + + + predicate LocalExtendableResourceAlwaysErrorEnsuresPublicly(input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput , output: Result) + // The private method to be refined by the library developer + + + method LocalExtendableResourceAlwaysError ( config: InternalConfig , input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput ) + returns (output: Result) + requires + && ValidInternalConfig?(config) + modifies ModifiesInternalConfig(config) + // Dafny will skip type parameters when generating a default decreases clause. + decreases ModifiesInternalConfig(config) + ensures + && ValidInternalConfig?(config) + ensures LocalExtendableResourceAlwaysErrorEnsuresPublicly(input, output) + + + predicate LocalExtendableResourceAlwaysMultipleErrorsEnsuresPublicly(input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput , output: Result) + // The private method to be refined by the library developer + + + method LocalExtendableResourceAlwaysMultipleErrors ( config: InternalConfig , input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput ) + returns (output: Result) + requires + && ValidInternalConfig?(config) + modifies ModifiesInternalConfig(config) + // Dafny will skip type parameters when generating a default decreases clause. + decreases ModifiesInternalConfig(config) + ensures + && ValidInternalConfig?(config) + ensures LocalExtendableResourceAlwaysMultipleErrorsEnsuresPublicly(input, output) + + + predicate LocalExtendableResourceAlwaysNativeErrorEnsuresPublicly(input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput , output: Result) + // The private method to be refined by the library developer + + + method LocalExtendableResourceAlwaysNativeError ( config: InternalConfig , input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput ) + returns (output: Result) + requires + && ValidInternalConfig?(config) + modifies ModifiesInternalConfig(config) + // Dafny will skip type parameters when generating a default decreases clause. + decreases ModifiesInternalConfig(config) + ensures + && ValidInternalConfig?(config) + ensures LocalExtendableResourceAlwaysNativeErrorEnsuresPublicly(input, output) +} From 8435e16b98ed15ce9585b7d6d3ae90bc710d418d Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Thu, 23 Mar 2023 17:30:40 -0700 Subject: [PATCH 003/673] testing --- TestModels/SharedMakefile.mk | 8 + .../SimpleBoolean/Model/SimpleBoolean.smithy | 2 +- .../SimpleBoolean/Model/aws-sdk/README.md | 2 + .../SimpleBoolean/Model/aws-sdk/aws.api.json | 215 ++++++++++++++++ .../SimpleBoolean/Model/aws-sdk/aws.auth.json | 76 ++++++ .../Model/aws-sdk/aws.customizations.json | 15 ++ .../Model/aws-sdk/aws.protocols.json | 231 ++++++++++++++++++ .../SimpleBoolean/Model/traits.smithy | 77 ++++++ .../SimpleTypes/SimpleBoolean/Model/update.sh | 30 +++ .../SimpleBoolean/Model/waiters.smithy | 175 +++++++++++++ .../SimpleBoolean/build.gradle.kts | 21 ++ .../SimpleBoolean/gradle.properties | 2 + .../python/simple_boolean/__init__.py | 1 + .../runtimes/python/simple_boolean/client.py | 50 ++++ .../runtimes/python/simple_boolean/config.py | 47 ++++ .../python/simple_boolean/endpoints.py | 7 + .../runtimes/python/simple_boolean/errors.py | 23 ++ .../runtimes/python/simple_boolean/models.py | 195 +++++++++++++++ .../SimpleBoolean/smithy-build.json | 10 + .../dafny-dependencies/build.gradle.kts | 23 ++ .../dafny-dependencies/gradle.properties | 2 + .../dafny-dependencies/smithy-build.json | 10 + 22 files changed, 1221 insertions(+), 1 deletion(-) create mode 100644 TestModels/SimpleTypes/SimpleBoolean/Model/aws-sdk/README.md create mode 100644 TestModels/SimpleTypes/SimpleBoolean/Model/aws-sdk/aws.api.json create mode 100644 TestModels/SimpleTypes/SimpleBoolean/Model/aws-sdk/aws.auth.json create mode 100644 TestModels/SimpleTypes/SimpleBoolean/Model/aws-sdk/aws.customizations.json create mode 100644 TestModels/SimpleTypes/SimpleBoolean/Model/aws-sdk/aws.protocols.json create mode 100644 TestModels/SimpleTypes/SimpleBoolean/Model/traits.smithy create mode 100755 TestModels/SimpleTypes/SimpleBoolean/Model/update.sh create mode 100644 TestModels/SimpleTypes/SimpleBoolean/Model/waiters.smithy create mode 100644 TestModels/SimpleTypes/SimpleBoolean/build.gradle.kts create mode 100644 TestModels/SimpleTypes/SimpleBoolean/gradle.properties create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/__init__.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/client.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/config.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/endpoints.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/errors.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/models.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/smithy-build.json create mode 100644 TestModels/dafny-dependencies/build.gradle.kts create mode 100644 TestModels/dafny-dependencies/gradle.properties create mode 100644 TestModels/dafny-dependencies/smithy-build.json diff --git a/TestModels/SharedMakefile.mk b/TestModels/SharedMakefile.mk index 58c3ea2fce..b914eee8b3 100644 --- a/TestModels/SharedMakefile.mk +++ b/TestModels/SharedMakefile.mk @@ -254,3 +254,11 @@ clean: rm -rf $(LIBRARY_ROOT)/TestResults rm -rf $(LIBRARY_ROOT)/runtimes/net/Generated $(LIBRARY_ROOT)/runtimes/net/bin $(LIBRARY_ROOT)/runtimes/net/obj rm -rf $(LIBRARY_ROOT)/runtimes/net/tests/bin $(LIBRARY_ROOT)/runtimes/net/tests/obj + +# Python Targets + +transpile_python: | transpile_implementation_python + +transpile_implementation_python: TARGET=python +transpile_implementation_python: OUT=runtimes/python/ImplementationFromDafny +transpile_implementation_python: transpile_implementation \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/Model/SimpleBoolean.smithy b/TestModels/SimpleTypes/SimpleBoolean/Model/SimpleBoolean.smithy index 785b4b4353..d1b74a3cd9 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/Model/SimpleBoolean.smithy +++ b/TestModels/SimpleTypes/SimpleBoolean/Model/SimpleBoolean.smithy @@ -4,7 +4,7 @@ namespace simple.types.boolean sdkId: "SimpleBoolean", config: SimpleBooleanConfig, ) -service SimpleTypesBoolean { +service SimpleBoolean { version: "2021-11-01", resources: [], operations: [ GetBoolean ], diff --git a/TestModels/SimpleTypes/SimpleBoolean/Model/aws-sdk/README.md b/TestModels/SimpleTypes/SimpleBoolean/Model/aws-sdk/README.md new file mode 100644 index 0000000000..37ebfd0608 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/Model/aws-sdk/README.md @@ -0,0 +1,2 @@ +The models in this directory are from the [smithy-aws-traits package](https://github.com/awslabs/smithy/tree/main/smithy-aws-traits/src/main/resources/META-INF/smithy). +We vendor them here because the KMS model depends on some of these traits. diff --git a/TestModels/SimpleTypes/SimpleBoolean/Model/aws-sdk/aws.api.json b/TestModels/SimpleTypes/SimpleBoolean/Model/aws-sdk/aws.api.json new file mode 100644 index 0000000000..1f76242c05 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/Model/aws-sdk/aws.api.json @@ -0,0 +1,215 @@ +{ + "smithy": "1.0", + "shapes": { + "aws.api#arn": { + "type": "structure", + "members": { + "template": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "absolute": { + "target": "smithy.api#Boolean" + }, + "noRegion": { + "target": "smithy.api#Boolean" + }, + "noAccount": { + "target": "smithy.api#Boolean" + } + }, + "traits": { + "smithy.api#trait": { + "selector": "resource" + }, + "smithy.api#externalDocumentation": { + "Reference": "https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html" + }, + "smithy.api#documentation": "Specifies an ARN template for the resource." + } + }, + "aws.api#service": { + "type": "structure", + "members": { + "sdkId": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {} + } + }, + "arnNamespace": { + "target": "aws.api#ArnNamespace" + }, + "cloudFormationName": { + "target": "aws.api#CloudFormationName" + }, + "cloudTrailEventSource": { + "target": "smithy.api#String" + }, + "endpointPrefix": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#trait": { + "selector": "service" + } + } + }, + "aws.api#arnReference": { + "type": "structure", + "members": { + "type": { + "target": "smithy.api#String" + }, + "resource": { + "target": "smithy.api#String" + }, + "service": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#trait": { + "selector": "string" + }, + "smithy.api#documentation": "Marks a string as containing an ARN." + } + }, + "aws.api#data": { + "type": "string", + "traits": { + "smithy.api#trait": { + "selector": ":test(simpleType, collection, structure, union, member)" + }, + "smithy.api#enum": [ + { + "value": "content", + "name": "CUSTOMER_CONTENT", + "documentation": "Customer content means any software (including machine images), data, text, audio, video or images that customers or any customer end user transfers to AWS for processing, storage or hosting by AWS services in connection with the customer\u2019s accounts and any computational results that customers or any customer end user derive from the foregoing through their use of AWS services." + }, + { + "value": "account", + "name": "CUSTOMER_ACCOUNT_INFORMATION", + "documentation": "Account information means information about customers that customers provide to AWS in connection with the creation or administration of customers\u2019 accounts." + }, + { + "value": "usage", + "name": "SERVICE_ATTRIBUTES", + "documentation": "Service Attributes means service usage data related to a customer\u2019s account, such as resource identifiers, metadata tags, security and access roles, rules, usage policies, permissions, usage statistics, logging data, and analytics." + }, + { + "value": "tagging", + "name": "TAG_DATA", + "documentation": "Designates metadata tags applied to AWS resources." + }, + { + "value": "permissions", + "name": "PERMISSIONS_DATA", + "documentation": "Designates security and access roles, rules, usage policies, and permissions." + } + ], + "smithy.api#documentation": "Designates the target as containing data of a known classification level." + } + }, + "aws.api#controlPlane": { + "type": "structure", + "traits": { + "smithy.api#trait": { + "selector": ":test(service, resource, operation)", + "conflicts": [ + "aws.api#dataPlane" + ] + }, + "smithy.api#documentation": "Defines a service, resource, or operation as operating on the control plane." + } + }, + "aws.api#dataPlane": { + "type": "structure", + "traits": { + "smithy.api#trait": { + "selector": ":test(service, resource, operation)", + "conflicts": [ + "aws.api#controlPlane" + ] + }, + "smithy.api#documentation": "Defines a service, resource, or operation as operating on the data plane." + } + }, + "aws.api#ArnNamespace": { + "type": "string", + "traits": { + "smithy.api#pattern": "^[a-z0-9.\\-]{1,63}$", + "smithy.api#private": {} + } + }, + "aws.api#CloudFormationName": { + "type": "string", + "traits": { + "smithy.api#pattern": "^[A-Z][A-Za-z0-9]+$", + "smithy.api#private": {} + } + }, + "aws.api#clientDiscoveredEndpoint": { + "type": "structure", + "members": { + "required": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#trait": { + "selector": "operation" + }, + "smithy.api#documentation": "Indicates that the target operation should use the client's endpoint discovery logic." + } + }, + "aws.api#clientEndpointDiscoveryId": { + "type": "structure", + "traits": { + "smithy.api#trait": { + "selector": "operation[trait|aws.api#clientDiscoveredEndpoint] -[input]-> structure > :test(member[trait|required] > string)" + }, + "smithy.api#documentation": "Indicates members of the operation input which should be use to discover endpoints." + } + }, + "aws.api#clientEndpointDiscovery": { + "type": "structure", + "members": { + "operation": { + "target": "smithy.api#String", + "traits": { + "smithy.api#idRef": { + "failWhenMissing": true, + "selector": "operation" + }, + "smithy.api#required": {}, + "smithy.api#documentation": "Indicates the operation that clients should use to discover endpoints for the service." + } + }, + "error": { + "target": "smithy.api#String", + "traits": { + "smithy.api#idRef": { + "failWhenMissing": true, + "selector": "structure[trait|error]" + }, + "smithy.api#recommended": {}, + "smithy.api#documentation": "Indicates the error that tells clients that the endpoint they are using is no longer valid. This error MUST be bound to any operation bound to the service which is marked with the aws.api#clientDiscoveredEndpoint trait." + } + } + }, + "traits": { + "smithy.api#trait": { + "selector": "service" + }, + "smithy.api#documentation": "Configures endpoint discovery for the service." + } + } + } +} diff --git a/TestModels/SimpleTypes/SimpleBoolean/Model/aws-sdk/aws.auth.json b/TestModels/SimpleTypes/SimpleBoolean/Model/aws-sdk/aws.auth.json new file mode 100644 index 0000000000..5a49037053 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/Model/aws-sdk/aws.auth.json @@ -0,0 +1,76 @@ +{ + "smithy": "1.0", + "shapes": { + "aws.auth#sigv4": { + "type": "structure", + "members": { + "name": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "smithy.api#length": { + "min": 1 + }, + "smithy.api#documentation": "The signature version 4 service signing name to use in the credential scope when signing requests. This value SHOULD match the `arnNamespace` property of the `aws.api#service-trait`.", + "smithy.api#externalDocumentation": { + "Reference": "https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html" + } + } + } + }, + "traits": { + "smithy.api#trait": { + "selector": "service" + }, + "smithy.api#authDefinition": { + "traits": [ + "aws.auth#unsignedPayload" + ] + }, + "smithy.api#documentation": "Signature Version 4 is the process to add authentication information to AWS requests sent by HTTP. For security, most requests to AWS must be signed with an access key, which consists of an access key ID and secret access key. These two keys are commonly referred to as your security credentials.", + "smithy.api#externalDocumentation": { + "Reference": "https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html" + } + } + }, + "aws.auth#unsignedPayload": { + "type": "structure", + "traits": { + "smithy.api#trait": { + "selector": "operation" + }, + "smithy.api#documentation": "Indicates that the request payload of a signed request is not to be used as part of the signature." + } + }, + "aws.auth#cognitoUserPools": { + "type": "structure", + "members": { + "providerArns": { + "target": "aws.auth#StringList", + "traits": { + "smithy.api#required": {}, + "smithy.api#documentation": "A list of the Amazon Cognito user pool ARNs. Each element is of this format: arn:aws:cognito-idp:{region}:{account_id}:userpool/{user_pool_id}." + } + } + }, + "traits": { + "smithy.api#trait": { + "selector": "service" + }, + "smithy.api#authDefinition": {}, + "smithy.api#documentation": "Configures an Amazon Cognito User Pools auth scheme.", + "smithy.api#internal": {}, + "smithy.api#tags": ["internal"] + } + }, + "aws.auth#StringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#private": {} + } + } + } +} diff --git a/TestModels/SimpleTypes/SimpleBoolean/Model/aws-sdk/aws.customizations.json b/TestModels/SimpleTypes/SimpleBoolean/Model/aws-sdk/aws.customizations.json new file mode 100644 index 0000000000..0d1129d1f9 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/Model/aws-sdk/aws.customizations.json @@ -0,0 +1,15 @@ +{ + "smithy": "1.0", + "shapes": { + "aws.customizations#s3UnwrappedXmlOutput": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#trait": { + "selector": "operation" + }, + "smithy.api#documentation": "Indicates the response body from S3 is not wrapped in the aws-restxml-protocol operation-level XML node. Intended to only be used by AWS S3." + } + } + } +} diff --git a/TestModels/SimpleTypes/SimpleBoolean/Model/aws-sdk/aws.protocols.json b/TestModels/SimpleTypes/SimpleBoolean/Model/aws-sdk/aws.protocols.json new file mode 100644 index 0000000000..cf9e337d72 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/Model/aws-sdk/aws.protocols.json @@ -0,0 +1,231 @@ +{ + "smithy": "1.0", + "shapes": { + "aws.protocols#restJson1": { + "type": "structure", + "members": { + "http": { + "target": "aws.protocols#StringList" + }, + "eventStreamHttp": { + "target": "aws.protocols#StringList" + } + }, + "traits": { + "smithy.api#trait": { + "selector": "service" + }, + "smithy.api#protocolDefinition": { + "traits": [ + "smithy.api#cors", + "smithy.api#endpoint", + "smithy.api#hostLabel", + "smithy.api#http", + "smithy.api#httpError", + "smithy.api#httpHeader", + "smithy.api#httpLabel", + "smithy.api#httpPayload", + "smithy.api#httpPrefixHeaders", + "smithy.api#httpQuery", + "smithy.api#httpQueryParams", + "smithy.api#httpResponseCode", + "smithy.api#jsonName", + "smithy.api#timestampFormat" + ] + }, + "smithy.api#documentation": "A RESTful protocol that sends JSON in structured payloads." + } + }, + "aws.protocols#restXml": { + "type": "structure", + "members": { + "http": { + "target": "aws.protocols#StringList" + }, + "eventStreamHttp": { + "target": "aws.protocols#StringList" + }, + "noErrorWrapping": { + "target": "smithy.api#Boolean", + "traits": { + "smithy.api#documentation": "Disables the serialization wrapping of error properties in an 'Error' XML element.", + "smithy.api#deprecated": {} + } + } + }, + "traits": { + "smithy.api#trait": { + "selector": "service" + }, + "smithy.api#protocolDefinition": { + "noInlineDocumentSupport": true, + "traits": [ + "smithy.api#cors", + "smithy.api#endpoint", + "smithy.api#hostLabel", + "smithy.api#http", + "smithy.api#httpError", + "smithy.api#httpHeader", + "smithy.api#httpLabel", + "smithy.api#httpPayload", + "smithy.api#httpPrefixHeaders", + "smithy.api#httpQuery", + "smithy.api#httpQueryParams", + "smithy.api#httpResponseCode", + "smithy.api#xmlAttribute", + "smithy.api#xmlFlattened", + "smithy.api#xmlName", + "smithy.api#xmlNamespace" + ] + }, + "smithy.api#documentation": "A RESTful protocol that sends XML in structured payloads.", + "smithy.api#deprecated": {} + } + }, + "aws.protocols#awsJson1_0": { + "type": "structure", + "members": { + "http": { + "target": "aws.protocols#StringList" + }, + "eventStreamHttp": { + "target": "aws.protocols#StringList" + } + }, + "traits": { + "smithy.api#trait": { + "selector": "service" + }, + "smithy.api#protocolDefinition": { + "traits": [ + "smithy.api#jsonName", + "smithy.api#timestampFormat", + "smithy.api#cors", + "smithy.api#endpoint", + "smithy.api#hostLabel" + ] + }, + "smithy.api#documentation": "An RPC-based protocol that sends JSON payloads. This protocol does not use HTTP binding traits." + } + }, + "aws.protocols#awsJson1_1": { + "type": "structure", + "members": { + "http": { + "target": "aws.protocols#StringList" + }, + "eventStreamHttp": { + "target": "aws.protocols#StringList" + } + }, + "traits": { + "smithy.api#trait": { + "selector": "service" + }, + "smithy.api#protocolDefinition": { + "traits": [ + "smithy.api#jsonName", + "smithy.api#timestampFormat", + "smithy.api#cors", + "smithy.api#endpoint", + "smithy.api#hostLabel" + ] + }, + "smithy.api#documentation": "An RPC-based protocol that sends JSON payloads. This protocol does not use HTTP binding traits." + } + }, + "aws.protocols#awsQuery": { + "type": "structure", + "traits": { + "smithy.api#trait": { + "selector": "service [trait|xmlNamespace]" + }, + "smithy.api#protocolDefinition": { + "noInlineDocumentSupport": true, + "traits": [ + "aws.protocols#awsQueryError", + "smithy.api#xmlAttribute", + "smithy.api#xmlFlattened", + "smithy.api#xmlName", + "smithy.api#xmlNamespace", + "smithy.api#timestampFormat", + "smithy.api#cors", + "smithy.api#endpoint", + "smithy.api#hostLabel" + ] + }, + "smithy.api#documentation": "An RPC-based protocol that sends 'POST' requests in the body as `x-www-form-urlencoded` strings and responses in XML documents. This protocol does not use HTTP binding traits.", + "smithy.api#deprecated": {} + } + }, + "aws.protocols#ec2Query": { + "type": "structure", + "traits": { + "smithy.api#trait": { + "selector": "service [trait|xmlNamespace]" + }, + "smithy.api#protocolDefinition": { + "noInlineDocumentSupport": true, + "traits": [ + "aws.protocols#ec2QueryName", + "smithy.api#xmlAttribute", + "smithy.api#xmlFlattened", + "smithy.api#xmlName", + "smithy.api#xmlNamespace", + "smithy.api#timestampFormat", + "smithy.api#cors", + "smithy.api#endpoint", + "smithy.api#hostLabel" + ] + }, + "smithy.api#documentation": "An RPC-based protocol that sends 'POST' requests in the body as Amazon EC2 formatted `x-www-form-urlencoded` strings and responses in XML documents. This protocol does not use HTTP binding traits.", + "smithy.api#deprecated": {} + } + }, + "aws.protocols#ec2QueryName": { + "type": "string", + "traits": { + "smithy.api#trait": { + "selector": "structure > member" + }, + "smithy.api#documentation": "Indicates the serialized name of a structure member when that structure is serialized for the input of an EC2 operation.", + "smithy.api#pattern": "^[a-zA-Z_][a-zA-Z_0-9-]*$" + } + }, + "aws.protocols#awsQueryError": { + "type": "structure", + "members": { + "code": { + "target": "smithy.api#String", + "traits": { + "smithy.api#required": {}, + "smithy.api#documentation": "The value used to distinguish this error shape during serialization." + } + }, + "httpResponseCode": { + "target": "smithy.api#Integer", + "traits": { + "smithy.api#required": {}, + "smithy.api#documentation": "The HTTP response code used on a response containing this error shape." + } + } + }, + "traits": { + "smithy.api#trait": { + "selector": "structure [trait|error]" + }, + "smithy.api#tags": ["diff.error.const"], + "smithy.api#documentation": "Provides the value in the 'Code' distinguishing field and HTTP response code for an operation error." + } + }, + "aws.protocols#StringList": { + "type": "list", + "member": { + "target": "smithy.api#String" + }, + "traits": { + "smithy.api#private": {} + } + } + } +} diff --git a/TestModels/SimpleTypes/SimpleBoolean/Model/traits.smithy b/TestModels/SimpleTypes/SimpleBoolean/Model/traits.smithy new file mode 100644 index 0000000000..4cc9d57efa --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/Model/traits.smithy @@ -0,0 +1,77 @@ +namespace aws.polymorph + +// Smithy doesn't allow passing resources or services as members of structures, +// since it doesn't make sense in a client-server world to pass these over the +// wire. However, in our world we do want to be able to pass around references +// to things like Keyrings, so we create a new trait which indicates that +// a target shape is not actually a structure but instead an opaque reference +// to a service or resource. +@trait(selector: "structure") +structure reference { + // Can refer to either services or resources + // @idRef(failWhenMissing: true, selector: "structure") + service: String, + // @idRef(failWhenMissing: true, selector: "service") + resource: String +} + + +// A trait for explicitly modeling the configuration options that should be +// available in the generated methods for creating clients. +@trait(selector: "service") +structure localService { + // @required + sdkId: String, + // @required + // @idRef(failWhenMissing: true, selector: "structure") + config: String, +} + +// Trait indicates that the member of the given structure MUST be expanded. +// To be used when we want operations to accept +// or return bare values rather than a nested structure. +// Code generation SHOULD throw an error if this is applied to a structure +// that is not used as input or output to an operation. +// At this time, +// Code generation MUST throw an error if this is applied to a structure +// with more than or less than one member. +// i.e: The structure MUST have one and only one member. +// At this time, +// the sole member's requirement status MUST NOT be determined by +// the positional trait. +// TODO: naming +@trait(selector: "structure") +structure positional {} + +// Indicates that a string is represented as a sequence of UTF-8 encoded bytes +// in Dafny, rather than the default sequence of UTF-16 chars. +// +// This is a workaround that should be removed when Dafny's string definition +// is improved: +@trait(selector: "string") +structure dafnyUtf8Bytes {} + +// A trait indicating that the resource may be implemented by native code (instead of Dafny code). +// i.e.: Users may author their own classes that implement and extend this resource. +// Polymorph will generate and utilize NativeWrappers for these resources. +@trait(selector: "resource") +structure extendable {} + +// A trait indicating that a structure is a members of a union +// and MUST NOT be used independently of the union. +// This is syntactic sugar for +// union Foo { +// Bar: structure Bar { baz: String } +// } +// +// It is used like this +// union Foo { +// Bar: Bar +// } +// structure Bar { baz: String } +// This is especilay useful in Dafny. +// Because it results in a single datatype +// whos constructors are the member structures. +// datatypes Foo = Bar( baz: String ) +@trait(selector: "structure") +structure datatypeUnion {} diff --git a/TestModels/SimpleTypes/SimpleBoolean/Model/update.sh b/TestModels/SimpleTypes/SimpleBoolean/Model/update.sh new file mode 100755 index 0000000000..0fcc7580e6 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/Model/update.sh @@ -0,0 +1,30 @@ +#!/bin/bash +# Usage: ./update.sh +# Example: ./update.sh ~/workplace/private-aws-encryption-sdk-dafny-staging v4-seperate-modules +ESDK_PATH="$1" +ESDK_BRANCH="$2" +MDL_SRC_FILES=('traits.smithy' 'waiters.smithy') +MDL_SRC_DIRS=('aws-sdk') + +set -e + +cd "$ESDK_PATH" +if [ "$2" ]; then + git checkout "$ESDK_BRANCH" + git pull +fi +ESDK_COMMIT_SHA=$(git rev-parse --short HEAD) +echo -e "ESDK Commit Sha is $ESDK_COMMIT_SHA" +cd - +for DAFNY_FILE in "${MDL_SRC_FILES[@]}"; do + cp "$ESDK_PATH/model/$DAFNY_FILE" "$DAFNY_FILE" + git add "$DAFNY_FILE" +done +for DIRECTORY in "${MDL_SRC_DIRS[@]}"; do + cp -r "$ESDK_PATH/model/$DIRECTORY" "." + git add "$DIRECTORY" +done +printf "Pulled Files for ESDK's model and staged for commit. \n" +printf "Suggest executing: \n" +COMMIT_MSG="chore(tests): Update ESDK's Model to $ESDK_COMMIT_SHA" +echo "git commit -m \"$COMMIT_MSG\"" diff --git a/TestModels/SimpleTypes/SimpleBoolean/Model/waiters.smithy b/TestModels/SimpleTypes/SimpleBoolean/Model/waiters.smithy new file mode 100644 index 0000000000..cb799a09ab --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/Model/waiters.smithy @@ -0,0 +1,175 @@ +namespace smithy.waiters + +/// Indicates that an operation has various named "waiters" that can be used +/// to poll a resource until it enters a desired state. +@trait(selector: "operation :not(-[input, output]-> structure > member > union[trait|streaming])") +@length(min: 1) +map waitable { + key: WaiterName, + value: Waiter, +} + +@pattern("^[A-Z]+[A-Za-z0-9]*$") +string WaiterName + +/// Defines an individual operation waiter. +@private +structure Waiter { + /// Documentation about the waiter. Can use CommonMark. + documentation: String, + + /// An ordered array of acceptors to check after executing an operation. + @required + acceptors: Acceptors, + + /// The minimum amount of time in seconds to delay between each retry. + /// This value defaults to 2 if not specified. If specified, this value + /// MUST be greater than or equal to 1 and less than or equal to + /// `maxDelay`. + minDelay: WaiterDelay, + + /// The maximum amount of time in seconds to delay between each retry. + /// This value defaults to 120 if not specified (or, 2 minutes). If + /// specified, this value MUST be greater than or equal to 1. + maxDelay: WaiterDelay, + + /// Indicates if the waiter is considered deprecated. A waiter SHOULD + /// be marked as deprecated if it has been replaced by another waiter or + /// if it is no longer needed (for example, if a resource changes from + /// eventually consistent to strongly consistent). + deprecated: PrimitiveBoolean, + + /// A list of tags associated with the waiter that allow waiters to be + /// categorized and grouped. + tags: NonEmptyStringList, +} + +@box +@range(min: 1) +integer WaiterDelay + +@private +@length(min: 1) +list Acceptors { + member: Acceptor +} + +/// Represents an acceptor in a waiter's state machine. +@private +structure Acceptor { + /// The state the acceptor transitions to when matched. + @required + state: AcceptorState, + + /// The matcher used to test if the resource is in a given state. + @required + matcher: Matcher, +} + +/// The transition state of a waiter. +@private +@enum([ + { + "name": "SUCCESS", + "value": "success", + "documentation": """ + The waiter successfully finished waiting. This is a terminal + state that causes the waiter to stop.""" + }, + { + "name": "FAILURE", + "value": "failure", + "documentation": """ + The waiter failed to enter into the desired state. This is a + terminal state that causes the waiter to stop.""" + }, + { + "name": "RETRY", + "value": "retry", + "documentation": """ + The waiter will retry the operation. This state transition is + implicit if no accepter causes a state transition.""" + }, +]) +string AcceptorState + +/// Defines how an acceptor determines if it matches the current state of +/// a resource. +@private +union Matcher { + /// Matches on the successful output of an operation using a + /// JMESPath expression. + output: PathMatcher, + + /// Matches on both the input and output of an operation using a JMESPath + /// expression. input parameters are available through the top-level + /// `input` field, and output data is available through the top-level + /// `output` field. This matcher can only be used on operations that + /// define both input and output. This matcher is checked only if an + /// operation completes successfully. + inputoutput: PathMatcher, + + /// Matches if an operation returns an error and the error matches + /// the expected error type. If an absolute shape ID is provided, the + /// error is matched exactly on the shape ID. A shape name can be + /// provided to match an error in any namespace with the given name. + errorType: String, + + /// When set to `true`, matches when an operation returns a successful + /// response. When set to `false`, matches when an operation fails with + /// any error. + success: Boolean, +} + +/// Defines how to test the result of a JMESPath expression against +/// an expected value. +@private +structure PathMatcher { + /// A JMESPath expression applied to the input or output of an operation. + @required + path: String, + + /// The expected return value of the expression. + @required + expected: String, + + /// The comparator used to compare the result of the expression with the + /// expected value. + @required + comparator: PathComparator, +} + +/// Defines a comparison to perform in a PathMatcher. +@enum([ + { + "name": "STRING_EQUALS", + "value": "stringEquals", + "documentation": "Matches if the return value is a string that is equal to the expected string." + }, + { + "name": "BOOLEAN_EQUALS", + "value": "booleanEquals", + "documentation": "Matches if the return value is a boolean that is equal to the string literal 'true' or 'false'." + }, + { + "name": "ALL_STRING_EQUALS", + "value": "allStringEquals", + "documentation": "Matches if all values in the list matches the expected string." + }, + { + "name": "ANY_STRING_EQUALS", + "value": "anyStringEquals", + "documentation": "Matches if any value in the list matches the expected string." + } +]) +@private +string PathComparator + +@private +list NonEmptyStringList { + member: NonEmptyString, +} + +@private +@length(min: 1) +string NonEmptyString diff --git a/TestModels/SimpleTypes/SimpleBoolean/build.gradle.kts b/TestModels/SimpleTypes/SimpleBoolean/build.gradle.kts new file mode 100644 index 0000000000..67d099512a --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/build.gradle.kts @@ -0,0 +1,21 @@ +plugins { + id("software.amazon.smithy").version("0.6.0") +} + +repositories { + mavenLocal() + mavenCentral() +} + +dependencies { + implementation("software.amazon.smithy:smithy-model:1.28.1") + implementation("software.amazon.smithy.typescript:smithy-aws-typescript-codegen:0.12.0") +} + +configure { + // Uncomment this to use a custom projection when building the JAR. + // projection = "foo" +} + +// Uncomment to disable creating a JAR. +//tasks["jar"].enabled = false \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/gradle.properties b/TestModels/SimpleTypes/SimpleBoolean/gradle.properties new file mode 100644 index 0000000000..8fecd51371 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/gradle.properties @@ -0,0 +1,2 @@ +smithyVersion=[1.26.1,1.27.0[ +smithyGradleVersion=0.6.0 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/__init__.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/__init__.py new file mode 100644 index 0000000000..247be3e3d4 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/__init__.py @@ -0,0 +1 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/client.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/client.py new file mode 100644 index 0000000000..242c243b0a --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/client.py @@ -0,0 +1,50 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +from typing import TypeVar + +from smithy_python._private.http import set_static_endpoint_resolver + +from .config import Config, Plugin +from .models import GetBooleanInput, GetBooleanOutput + + +Input = TypeVar("Input") +Output = TypeVar("Output") + +class SimpleTypesBoolean: + """Client for SimpleTypesBoolean + + :param config: Optional configuration for the client. Here you can set things like the + endpoint for HTTP services or auth credentials. + + :param plugins: A list of callables that modify the configuration dynamically. These + can be used to set defaults, for example. + """ + def __init__(self, config: Config | None = None, plugins: list[Plugin] | None = None): + self._config = config or Config() + + client_plugins: list[Plugin] = [ + set_static_endpoint_resolver, + ] + if plugins: + client_plugins.extend(plugins) + + for plugin in client_plugins: + plugin(self._config) + + async def get_boolean(self, input: GetBooleanInput, plugins: list[Plugin] | None = None) -> GetBooleanOutput: + """Invokes the GetBoolean operation. + + :param input: The operation's input. + + :param plugins: A list of callables that modify the configuration dynamically. + Changes made by these plugins only apply for the duration of the operation + execution and will not affect any other operation invocations. + """ + operation_plugins = [ + + ] + if plugins: + operation_plugins.extend(plugins) + + raise NotImplementedError() diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/config.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/config.py new file mode 100644 index 0000000000..669e14903f --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/config.py @@ -0,0 +1,47 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +from dataclasses import dataclass +from typing import Any, Callable, TypeAlias, Union + +from smithy_python.interfaces import URI +from smithy_python.interfaces.http import ( + EndpointResolver, + HTTPClient, + HTTPRequestConfiguration, +) +from smithy_python.interfaces.interceptor import Interceptor +from smithy_python.interfaces.retries import RetryStrategy + +from .endpoints import EndpointParams +from .models import GetBooleanInput, GetBooleanOutput + + +_ServiceInterceptor = Union[Interceptor[GetBooleanInput, GetBooleanOutput, Any, Any]] +@dataclass(kw_only=True) +class Config: + """Configuration for SimpleTypesBoolean + + :param interceptors: The list of interceptors, which are hooks that are called + during the execution of a request. + + :param retry_strategy: The retry strategy for issuing retry tokens and computing + retry delays. + + :param http_client: The HTTP client used to make requests. + + :param http_request_config: Configuration for individual HTTP requests. + + :param endpoint_resolver: The endpoint resolver used to resolve the final + endpoint per-operation based on the configuration. + + :param endpoint_uri: A static URI to route requests to. + """ + interceptors: list[_ServiceInterceptor] | None = None + retry_strategy: RetryStrategy | None = None + http_client: HTTPClient | None = None + http_request_config: HTTPRequestConfiguration | None = None + endpoint_resolver: EndpointResolver[EndpointParams] | None = None + endpoint_uri: str | URI | None = None + +# A callable that allows customizing the config object on each request. +Plugin: TypeAlias = Callable[[Config], None] diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/endpoints.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/endpoints.py new file mode 100644 index 0000000000..49b2f71554 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/endpoints.py @@ -0,0 +1,7 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +from smithy_python._private.http import StaticEndpointParams, StaticEndpointResolver + + +EndpointParams = StaticEndpointParams +EndpointResolver = StaticEndpointResolver diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/errors.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/errors.py new file mode 100644 index 0000000000..6f38ba4e80 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/errors.py @@ -0,0 +1,23 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +from typing import Generic, Literal, TypeVar + + +class ServiceError(Exception): + """Base error for all errors in the service. + """ + pass + +T = TypeVar('T') +class ApiError(ServiceError, Generic[T]): + """Base error for all api errors in the service. + """ + code: T + def __init__(self, message: str): + super().__init__(message) + self.message = message + +class UnknownApiError(ApiError[Literal['Unknown']]): + """Error representing any unknown api errors + """ + code: Literal['Unknown'] = 'Unknown' diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/models.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/models.py new file mode 100644 index 0000000000..0a63ef3521 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/models.py @@ -0,0 +1,195 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +from typing import Any, Dict, Optional, TypeVar, cast + + +class _DEFAULT: + def __init__(self, wrapped: Any): + """Wraps a value to signal it was provided by default. + + These values will be immediately unwrapped in the associated + initializers so the values can be used as normal, the defaultedness + will then be tracked separately. + """ + self._wrapped = wrapped + + @property + def value(self) -> Any: + # Prevent mutations from leaking by simply returning copies of mutable + # defaults. We could also just make immutable subclasses. + if isinstance(self._wrapped, list): + return list(self._wrapped) + if isinstance(self._wrapped, dict): + return dict(self._wrapped) + return self._wrapped + + def __repr__(self) -> str: + return f"_DEFAULT({repr(self._wrapped)})" + + def __str__(self) -> str: + return str(self._wrapped) + +_D = TypeVar("_D") + +def _default(value: _D) -> _D: + """Wraps a value to signal it was provided by default. + + These values will be immediately unwrapped in the associated + initializers so the values can be used as normal, the defaultedness + will then be tracked separately. + + We use this wrapper function for brevity, but also because many completion + tools will show the code of the default rather than the result, and + `_default(7)` is a bit more clear than `cast(int, _DEFAULT(7))`. + """ + return cast(_D, _DEFAULT(value)) + +class GetBooleanInput: + value: Optional[bool] + def __init__( + self, + *, + value: Optional[bool] = None, + ): + self._has: dict[str, bool] = {} + self.value = value + + def _set_default_attr(self, name: str, value: Any) -> None: + if isinstance(value, _DEFAULT): + object.__setattr__(self, name, value.value) + self._has[name] = False + else: + setattr(self, name, value) + + def __setattr__(self, name: str, value: Any) -> None: + object.__setattr__(self, name, value) + self._has[name] = True + + def _hasattr(self, name: str) -> bool: + if self._has.get(name, False): + return True + # Lists and dicts are mutable. We could make immutable variants, but + # that's kind of a bad experience. Instead we can just check to see if + # the value is empty. + if isinstance((v := getattr(self, name, None)), (dict, list)) and len(v) != 0: + self._has[name] = True + return True + return False + + def as_dict(self) -> Dict[str, Any]: + """Converts the GetBooleanInput to a dictionary. + + The dictionary uses the modeled shape names rather than the parameter names as + keys to be mostly compatible with boto3. + """ + d: Dict[str, Any] = {} + + if self._hasattr("value") and self.value is not None: + d["value"] = self.value + + return d + + @staticmethod + def from_dict(d: Dict[str, Any]) -> "GetBooleanInput": + """Creates a GetBooleanInput from a dictionary. + + The dictionary is expected to use the modeled shape names rather than the + parameter names as keys to be mostly compatible with boto3. + """ + kwargs: Dict[str, Any] = {} + + if "value" in d: + kwargs["value"] = d["value"] + + return GetBooleanInput(**kwargs) + + def __repr__(self) -> str: + result = "GetBooleanInput(" + if self._has["value"]: + result += f"value={repr(self.value)}" + + return result + ")" + + def __eq__(self, other: Any) -> bool: + if not isinstance(other, GetBooleanInput): + return False + attributes: list[str] = ['value',] + return all( + self._hasattr(a) == other._hasattr(a) and getattr(self, a) == getattr(other, a) + for a in attributes + ) + +class GetBooleanOutput: + value: Optional[bool] + def __init__( + self, + *, + value: Optional[bool] = None, + ): + self._has: dict[str, bool] = {} + self.value = value + + def _set_default_attr(self, name: str, value: Any) -> None: + if isinstance(value, _DEFAULT): + object.__setattr__(self, name, value.value) + self._has[name] = False + else: + setattr(self, name, value) + + def __setattr__(self, name: str, value: Any) -> None: + object.__setattr__(self, name, value) + self._has[name] = True + + def _hasattr(self, name: str) -> bool: + if self._has.get(name, False): + return True + # Lists and dicts are mutable. We could make immutable variants, but + # that's kind of a bad experience. Instead we can just check to see if + # the value is empty. + if isinstance((v := getattr(self, name, None)), (dict, list)) and len(v) != 0: + self._has[name] = True + return True + return False + + def as_dict(self) -> Dict[str, Any]: + """Converts the GetBooleanOutput to a dictionary. + + The dictionary uses the modeled shape names rather than the parameter names as + keys to be mostly compatible with boto3. + """ + d: Dict[str, Any] = {} + + if self._hasattr("value") and self.value is not None: + d["value"] = self.value + + return d + + @staticmethod + def from_dict(d: Dict[str, Any]) -> "GetBooleanOutput": + """Creates a GetBooleanOutput from a dictionary. + + The dictionary is expected to use the modeled shape names rather than the + parameter names as keys to be mostly compatible with boto3. + """ + kwargs: Dict[str, Any] = {} + + if "value" in d: + kwargs["value"] = d["value"] + + return GetBooleanOutput(**kwargs) + + def __repr__(self) -> str: + result = "GetBooleanOutput(" + if self._has["value"]: + result += f"value={repr(self.value)}" + + return result + ")" + + def __eq__(self, other: Any) -> bool: + if not isinstance(other, GetBooleanOutput): + return False + attributes: list[str] = ['value',] + return all( + self._hasattr(a) == other._hasattr(a) and getattr(self, a) == getattr(other, a) + for a in attributes + ) diff --git a/TestModels/SimpleTypes/SimpleBoolean/smithy-build.json b/TestModels/SimpleTypes/SimpleBoolean/smithy-build.json new file mode 100644 index 0000000000..d3597b41b3 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/smithy-build.json @@ -0,0 +1,10 @@ +{ + "version": "1.0", + "plugins": { + "python-codegen": { + "service": "example.weather#Weather", + "module": "weather", + "moduleVersion": "0.0.1" + } + } +} diff --git a/TestModels/dafny-dependencies/build.gradle.kts b/TestModels/dafny-dependencies/build.gradle.kts new file mode 100644 index 0000000000..ba9f0a51fd --- /dev/null +++ b/TestModels/dafny-dependencies/build.gradle.kts @@ -0,0 +1,23 @@ +includeBuild "../../../../../smithy-python/codegen:smithy-python-codegen" + +plugins { + id("software.amazon.smithy").version("0.6.0") +} + +repositories { + mavenLocal() + mavenCentral() +} + +dependencies { + implementation("software.amazon.smithy:smithy-model:1.28.1") +// implementation files("../../../../../smithy-python/codegen:smithy-python-codegen") +} + +configure { + // Uncomment this to use a custom projection when building the JAR. + // projection = "foo" +} + +// Uncomment to disable creating a JAR. +//tasks["jar"].enabled = false \ No newline at end of file diff --git a/TestModels/dafny-dependencies/gradle.properties b/TestModels/dafny-dependencies/gradle.properties new file mode 100644 index 0000000000..8fecd51371 --- /dev/null +++ b/TestModels/dafny-dependencies/gradle.properties @@ -0,0 +1,2 @@ +smithyVersion=[1.26.1,1.27.0[ +smithyGradleVersion=0.6.0 diff --git a/TestModels/dafny-dependencies/smithy-build.json b/TestModels/dafny-dependencies/smithy-build.json new file mode 100644 index 0000000000..d3597b41b3 --- /dev/null +++ b/TestModels/dafny-dependencies/smithy-build.json @@ -0,0 +1,10 @@ +{ + "version": "1.0", + "plugins": { + "python-codegen": { + "service": "example.weather#Weather", + "module": "weather", + "moduleVersion": "0.0.1" + } + } +} From 6039676e113e51ba137d0f11123593e3a329361c Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Mon, 3 Apr 2023 15:54:59 -0700 Subject: [PATCH 004/673] working changes --- .gitmodules | 4 + TestModels/SharedMakefile.mk | 4 + .../SimpleBoolean/Model/aws-sdk/README.md | 2 - .../SimpleBoolean/Model/aws-sdk/aws.api.json | 215 ------- .../SimpleBoolean/Model/aws-sdk/aws.auth.json | 76 --- .../Model/aws-sdk/aws.customizations.json | 15 - .../Model/aws-sdk/aws.protocols.json | 231 ------- .../SimpleTypes/SimpleBoolean/Model/update.sh | 30 - .../SimpleBoolean/Model/waiters.smithy | 175 ------ .../SimpleBoolean/build.gradle.kts | 26 +- .../SimpleBoolean/gradle.properties | 1 + .../python/simple_boolean/__init__.py | 1 - .../runtimes/python/simple_boolean/client.py | 50 -- .../runtimes/python/simple_boolean/config.py | 47 -- .../python/simple_boolean/endpoints.py | 7 - .../runtimes/python/simple_boolean/errors.py | 23 - .../runtimes/python/simple_boolean/models.py | 195 ------ .../SimpleBoolean/settings.gradle.kts | 27 + .../SimpleBoolean/smithy-build.json | 10 - .../SimpleTypes/SimpleBoolean/src/Index.dfy | 17 +- .../test/SimpleBooleanImplTest.dfy | 4 +- .../test/WrappedSimpleBooleanTest.dfy | 15 +- .../codegen/DafnyProtocolGenerator.java | 585 ++++++++++++++++++ .../python/codegen/DafnyTestIntegration.java | 110 ++++ .../dafny/python/codegen/build.gradle.kts | 49 ++ .../dafny/python/codegen/gradle.properties | 3 + .../python/codegen/model/SimpleBoolean.smithy | 27 + .../dafny/python/codegen/model/traits.smithy | 77 +++ ...ware.amazon.smithy.build.SmithyBuildPlugin | 6 + ...thon.codegen.integration.PythonIntegration | 6 + .../python/codegen/reserved-class-names.txt | 15 + .../python/codegen/reserved-member-names.txt | 83 +++ .../dafny/python/codegen/settings.gradle.kts | 25 + .../dafny/python/codegen/smithy-build.json | 14 + .../smithy/dafny/python/codegen/smithy-python | 1 + 35 files changed, 1084 insertions(+), 1092 deletions(-) create mode 100644 .gitmodules delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/Model/aws-sdk/README.md delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/Model/aws-sdk/aws.api.json delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/Model/aws-sdk/aws.auth.json delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/Model/aws-sdk/aws.customizations.json delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/Model/aws-sdk/aws.protocols.json delete mode 100755 TestModels/SimpleTypes/SimpleBoolean/Model/update.sh delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/Model/waiters.smithy delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/__init__.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/client.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/config.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/endpoints.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/errors.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/models.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/settings.gradle.kts delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/smithy-build.json create mode 100644 codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/DafnyProtocolGenerator.java create mode 100644 codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/DafnyTestIntegration.java create mode 100644 codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/build.gradle.kts create mode 100644 codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/gradle.properties create mode 100644 codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/model/SimpleBoolean.smithy create mode 100644 codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/model/traits.smithy create mode 100644 codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/resources/META-INF/services/software.amazon.smithy.build.SmithyBuildPlugin create mode 100644 codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/resources/META-INF/services/software.amazon.smithy.python.codegen.integration.PythonIntegration create mode 100644 codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/resources/software/amazon/smithy/python/codegen/reserved-class-names.txt create mode 100644 codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/resources/software/amazon/smithy/python/codegen/reserved-member-names.txt create mode 100644 codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/settings.gradle.kts create mode 100644 codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/smithy-build.json create mode 160000 codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/smithy-python diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000..b0c2ee5179 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ + +[submodule "codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/smithy-python"] + path = codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/smithy-python + url = git@github.com:awslabs/smithy-python.git diff --git a/TestModels/SharedMakefile.mk b/TestModels/SharedMakefile.mk index b914eee8b3..0d42b678d0 100644 --- a/TestModels/SharedMakefile.mk +++ b/TestModels/SharedMakefile.mk @@ -174,6 +174,10 @@ polymorph_java: _polymorph polymorph_java: POLYMORPH_LANGUAGE_TARGET=java polymorph_java: _polymorph_dependencies +smithy_dafny_python: export MODEL_DIR=$(LIBRARY_ROOT)/Model +smithy_dafny_python: + gradle build + ########################## .NET targets transpile_net: | transpile_implementation_net transpile_test_net transpile_dependencies_net diff --git a/TestModels/SimpleTypes/SimpleBoolean/Model/aws-sdk/README.md b/TestModels/SimpleTypes/SimpleBoolean/Model/aws-sdk/README.md deleted file mode 100644 index 37ebfd0608..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/Model/aws-sdk/README.md +++ /dev/null @@ -1,2 +0,0 @@ -The models in this directory are from the [smithy-aws-traits package](https://github.com/awslabs/smithy/tree/main/smithy-aws-traits/src/main/resources/META-INF/smithy). -We vendor them here because the KMS model depends on some of these traits. diff --git a/TestModels/SimpleTypes/SimpleBoolean/Model/aws-sdk/aws.api.json b/TestModels/SimpleTypes/SimpleBoolean/Model/aws-sdk/aws.api.json deleted file mode 100644 index 1f76242c05..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/Model/aws-sdk/aws.api.json +++ /dev/null @@ -1,215 +0,0 @@ -{ - "smithy": "1.0", - "shapes": { - "aws.api#arn": { - "type": "structure", - "members": { - "template": { - "target": "smithy.api#String", - "traits": { - "smithy.api#required": {} - } - }, - "absolute": { - "target": "smithy.api#Boolean" - }, - "noRegion": { - "target": "smithy.api#Boolean" - }, - "noAccount": { - "target": "smithy.api#Boolean" - } - }, - "traits": { - "smithy.api#trait": { - "selector": "resource" - }, - "smithy.api#externalDocumentation": { - "Reference": "https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html" - }, - "smithy.api#documentation": "Specifies an ARN template for the resource." - } - }, - "aws.api#service": { - "type": "structure", - "members": { - "sdkId": { - "target": "smithy.api#String", - "traits": { - "smithy.api#required": {} - } - }, - "arnNamespace": { - "target": "aws.api#ArnNamespace" - }, - "cloudFormationName": { - "target": "aws.api#CloudFormationName" - }, - "cloudTrailEventSource": { - "target": "smithy.api#String" - }, - "endpointPrefix": { - "target": "smithy.api#String" - } - }, - "traits": { - "smithy.api#trait": { - "selector": "service" - } - } - }, - "aws.api#arnReference": { - "type": "structure", - "members": { - "type": { - "target": "smithy.api#String" - }, - "resource": { - "target": "smithy.api#String" - }, - "service": { - "target": "smithy.api#String" - } - }, - "traits": { - "smithy.api#trait": { - "selector": "string" - }, - "smithy.api#documentation": "Marks a string as containing an ARN." - } - }, - "aws.api#data": { - "type": "string", - "traits": { - "smithy.api#trait": { - "selector": ":test(simpleType, collection, structure, union, member)" - }, - "smithy.api#enum": [ - { - "value": "content", - "name": "CUSTOMER_CONTENT", - "documentation": "Customer content means any software (including machine images), data, text, audio, video or images that customers or any customer end user transfers to AWS for processing, storage or hosting by AWS services in connection with the customer\u2019s accounts and any computational results that customers or any customer end user derive from the foregoing through their use of AWS services." - }, - { - "value": "account", - "name": "CUSTOMER_ACCOUNT_INFORMATION", - "documentation": "Account information means information about customers that customers provide to AWS in connection with the creation or administration of customers\u2019 accounts." - }, - { - "value": "usage", - "name": "SERVICE_ATTRIBUTES", - "documentation": "Service Attributes means service usage data related to a customer\u2019s account, such as resource identifiers, metadata tags, security and access roles, rules, usage policies, permissions, usage statistics, logging data, and analytics." - }, - { - "value": "tagging", - "name": "TAG_DATA", - "documentation": "Designates metadata tags applied to AWS resources." - }, - { - "value": "permissions", - "name": "PERMISSIONS_DATA", - "documentation": "Designates security and access roles, rules, usage policies, and permissions." - } - ], - "smithy.api#documentation": "Designates the target as containing data of a known classification level." - } - }, - "aws.api#controlPlane": { - "type": "structure", - "traits": { - "smithy.api#trait": { - "selector": ":test(service, resource, operation)", - "conflicts": [ - "aws.api#dataPlane" - ] - }, - "smithy.api#documentation": "Defines a service, resource, or operation as operating on the control plane." - } - }, - "aws.api#dataPlane": { - "type": "structure", - "traits": { - "smithy.api#trait": { - "selector": ":test(service, resource, operation)", - "conflicts": [ - "aws.api#controlPlane" - ] - }, - "smithy.api#documentation": "Defines a service, resource, or operation as operating on the data plane." - } - }, - "aws.api#ArnNamespace": { - "type": "string", - "traits": { - "smithy.api#pattern": "^[a-z0-9.\\-]{1,63}$", - "smithy.api#private": {} - } - }, - "aws.api#CloudFormationName": { - "type": "string", - "traits": { - "smithy.api#pattern": "^[A-Z][A-Za-z0-9]+$", - "smithy.api#private": {} - } - }, - "aws.api#clientDiscoveredEndpoint": { - "type": "structure", - "members": { - "required": { - "target": "smithy.api#Boolean", - "traits": { - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#trait": { - "selector": "operation" - }, - "smithy.api#documentation": "Indicates that the target operation should use the client's endpoint discovery logic." - } - }, - "aws.api#clientEndpointDiscoveryId": { - "type": "structure", - "traits": { - "smithy.api#trait": { - "selector": "operation[trait|aws.api#clientDiscoveredEndpoint] -[input]-> structure > :test(member[trait|required] > string)" - }, - "smithy.api#documentation": "Indicates members of the operation input which should be use to discover endpoints." - } - }, - "aws.api#clientEndpointDiscovery": { - "type": "structure", - "members": { - "operation": { - "target": "smithy.api#String", - "traits": { - "smithy.api#idRef": { - "failWhenMissing": true, - "selector": "operation" - }, - "smithy.api#required": {}, - "smithy.api#documentation": "Indicates the operation that clients should use to discover endpoints for the service." - } - }, - "error": { - "target": "smithy.api#String", - "traits": { - "smithy.api#idRef": { - "failWhenMissing": true, - "selector": "structure[trait|error]" - }, - "smithy.api#recommended": {}, - "smithy.api#documentation": "Indicates the error that tells clients that the endpoint they are using is no longer valid. This error MUST be bound to any operation bound to the service which is marked with the aws.api#clientDiscoveredEndpoint trait." - } - } - }, - "traits": { - "smithy.api#trait": { - "selector": "service" - }, - "smithy.api#documentation": "Configures endpoint discovery for the service." - } - } - } -} diff --git a/TestModels/SimpleTypes/SimpleBoolean/Model/aws-sdk/aws.auth.json b/TestModels/SimpleTypes/SimpleBoolean/Model/aws-sdk/aws.auth.json deleted file mode 100644 index 5a49037053..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/Model/aws-sdk/aws.auth.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "smithy": "1.0", - "shapes": { - "aws.auth#sigv4": { - "type": "structure", - "members": { - "name": { - "target": "smithy.api#String", - "traits": { - "smithy.api#required": {}, - "smithy.api#length": { - "min": 1 - }, - "smithy.api#documentation": "The signature version 4 service signing name to use in the credential scope when signing requests. This value SHOULD match the `arnNamespace` property of the `aws.api#service-trait`.", - "smithy.api#externalDocumentation": { - "Reference": "https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html" - } - } - } - }, - "traits": { - "smithy.api#trait": { - "selector": "service" - }, - "smithy.api#authDefinition": { - "traits": [ - "aws.auth#unsignedPayload" - ] - }, - "smithy.api#documentation": "Signature Version 4 is the process to add authentication information to AWS requests sent by HTTP. For security, most requests to AWS must be signed with an access key, which consists of an access key ID and secret access key. These two keys are commonly referred to as your security credentials.", - "smithy.api#externalDocumentation": { - "Reference": "https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html" - } - } - }, - "aws.auth#unsignedPayload": { - "type": "structure", - "traits": { - "smithy.api#trait": { - "selector": "operation" - }, - "smithy.api#documentation": "Indicates that the request payload of a signed request is not to be used as part of the signature." - } - }, - "aws.auth#cognitoUserPools": { - "type": "structure", - "members": { - "providerArns": { - "target": "aws.auth#StringList", - "traits": { - "smithy.api#required": {}, - "smithy.api#documentation": "A list of the Amazon Cognito user pool ARNs. Each element is of this format: arn:aws:cognito-idp:{region}:{account_id}:userpool/{user_pool_id}." - } - } - }, - "traits": { - "smithy.api#trait": { - "selector": "service" - }, - "smithy.api#authDefinition": {}, - "smithy.api#documentation": "Configures an Amazon Cognito User Pools auth scheme.", - "smithy.api#internal": {}, - "smithy.api#tags": ["internal"] - } - }, - "aws.auth#StringList": { - "type": "list", - "member": { - "target": "smithy.api#String" - }, - "traits": { - "smithy.api#private": {} - } - } - } -} diff --git a/TestModels/SimpleTypes/SimpleBoolean/Model/aws-sdk/aws.customizations.json b/TestModels/SimpleTypes/SimpleBoolean/Model/aws-sdk/aws.customizations.json deleted file mode 100644 index 0d1129d1f9..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/Model/aws-sdk/aws.customizations.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "smithy": "1.0", - "shapes": { - "aws.customizations#s3UnwrappedXmlOutput": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#trait": { - "selector": "operation" - }, - "smithy.api#documentation": "Indicates the response body from S3 is not wrapped in the aws-restxml-protocol operation-level XML node. Intended to only be used by AWS S3." - } - } - } -} diff --git a/TestModels/SimpleTypes/SimpleBoolean/Model/aws-sdk/aws.protocols.json b/TestModels/SimpleTypes/SimpleBoolean/Model/aws-sdk/aws.protocols.json deleted file mode 100644 index cf9e337d72..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/Model/aws-sdk/aws.protocols.json +++ /dev/null @@ -1,231 +0,0 @@ -{ - "smithy": "1.0", - "shapes": { - "aws.protocols#restJson1": { - "type": "structure", - "members": { - "http": { - "target": "aws.protocols#StringList" - }, - "eventStreamHttp": { - "target": "aws.protocols#StringList" - } - }, - "traits": { - "smithy.api#trait": { - "selector": "service" - }, - "smithy.api#protocolDefinition": { - "traits": [ - "smithy.api#cors", - "smithy.api#endpoint", - "smithy.api#hostLabel", - "smithy.api#http", - "smithy.api#httpError", - "smithy.api#httpHeader", - "smithy.api#httpLabel", - "smithy.api#httpPayload", - "smithy.api#httpPrefixHeaders", - "smithy.api#httpQuery", - "smithy.api#httpQueryParams", - "smithy.api#httpResponseCode", - "smithy.api#jsonName", - "smithy.api#timestampFormat" - ] - }, - "smithy.api#documentation": "A RESTful protocol that sends JSON in structured payloads." - } - }, - "aws.protocols#restXml": { - "type": "structure", - "members": { - "http": { - "target": "aws.protocols#StringList" - }, - "eventStreamHttp": { - "target": "aws.protocols#StringList" - }, - "noErrorWrapping": { - "target": "smithy.api#Boolean", - "traits": { - "smithy.api#documentation": "Disables the serialization wrapping of error properties in an 'Error' XML element.", - "smithy.api#deprecated": {} - } - } - }, - "traits": { - "smithy.api#trait": { - "selector": "service" - }, - "smithy.api#protocolDefinition": { - "noInlineDocumentSupport": true, - "traits": [ - "smithy.api#cors", - "smithy.api#endpoint", - "smithy.api#hostLabel", - "smithy.api#http", - "smithy.api#httpError", - "smithy.api#httpHeader", - "smithy.api#httpLabel", - "smithy.api#httpPayload", - "smithy.api#httpPrefixHeaders", - "smithy.api#httpQuery", - "smithy.api#httpQueryParams", - "smithy.api#httpResponseCode", - "smithy.api#xmlAttribute", - "smithy.api#xmlFlattened", - "smithy.api#xmlName", - "smithy.api#xmlNamespace" - ] - }, - "smithy.api#documentation": "A RESTful protocol that sends XML in structured payloads.", - "smithy.api#deprecated": {} - } - }, - "aws.protocols#awsJson1_0": { - "type": "structure", - "members": { - "http": { - "target": "aws.protocols#StringList" - }, - "eventStreamHttp": { - "target": "aws.protocols#StringList" - } - }, - "traits": { - "smithy.api#trait": { - "selector": "service" - }, - "smithy.api#protocolDefinition": { - "traits": [ - "smithy.api#jsonName", - "smithy.api#timestampFormat", - "smithy.api#cors", - "smithy.api#endpoint", - "smithy.api#hostLabel" - ] - }, - "smithy.api#documentation": "An RPC-based protocol that sends JSON payloads. This protocol does not use HTTP binding traits." - } - }, - "aws.protocols#awsJson1_1": { - "type": "structure", - "members": { - "http": { - "target": "aws.protocols#StringList" - }, - "eventStreamHttp": { - "target": "aws.protocols#StringList" - } - }, - "traits": { - "smithy.api#trait": { - "selector": "service" - }, - "smithy.api#protocolDefinition": { - "traits": [ - "smithy.api#jsonName", - "smithy.api#timestampFormat", - "smithy.api#cors", - "smithy.api#endpoint", - "smithy.api#hostLabel" - ] - }, - "smithy.api#documentation": "An RPC-based protocol that sends JSON payloads. This protocol does not use HTTP binding traits." - } - }, - "aws.protocols#awsQuery": { - "type": "structure", - "traits": { - "smithy.api#trait": { - "selector": "service [trait|xmlNamespace]" - }, - "smithy.api#protocolDefinition": { - "noInlineDocumentSupport": true, - "traits": [ - "aws.protocols#awsQueryError", - "smithy.api#xmlAttribute", - "smithy.api#xmlFlattened", - "smithy.api#xmlName", - "smithy.api#xmlNamespace", - "smithy.api#timestampFormat", - "smithy.api#cors", - "smithy.api#endpoint", - "smithy.api#hostLabel" - ] - }, - "smithy.api#documentation": "An RPC-based protocol that sends 'POST' requests in the body as `x-www-form-urlencoded` strings and responses in XML documents. This protocol does not use HTTP binding traits.", - "smithy.api#deprecated": {} - } - }, - "aws.protocols#ec2Query": { - "type": "structure", - "traits": { - "smithy.api#trait": { - "selector": "service [trait|xmlNamespace]" - }, - "smithy.api#protocolDefinition": { - "noInlineDocumentSupport": true, - "traits": [ - "aws.protocols#ec2QueryName", - "smithy.api#xmlAttribute", - "smithy.api#xmlFlattened", - "smithy.api#xmlName", - "smithy.api#xmlNamespace", - "smithy.api#timestampFormat", - "smithy.api#cors", - "smithy.api#endpoint", - "smithy.api#hostLabel" - ] - }, - "smithy.api#documentation": "An RPC-based protocol that sends 'POST' requests in the body as Amazon EC2 formatted `x-www-form-urlencoded` strings and responses in XML documents. This protocol does not use HTTP binding traits.", - "smithy.api#deprecated": {} - } - }, - "aws.protocols#ec2QueryName": { - "type": "string", - "traits": { - "smithy.api#trait": { - "selector": "structure > member" - }, - "smithy.api#documentation": "Indicates the serialized name of a structure member when that structure is serialized for the input of an EC2 operation.", - "smithy.api#pattern": "^[a-zA-Z_][a-zA-Z_0-9-]*$" - } - }, - "aws.protocols#awsQueryError": { - "type": "structure", - "members": { - "code": { - "target": "smithy.api#String", - "traits": { - "smithy.api#required": {}, - "smithy.api#documentation": "The value used to distinguish this error shape during serialization." - } - }, - "httpResponseCode": { - "target": "smithy.api#Integer", - "traits": { - "smithy.api#required": {}, - "smithy.api#documentation": "The HTTP response code used on a response containing this error shape." - } - } - }, - "traits": { - "smithy.api#trait": { - "selector": "structure [trait|error]" - }, - "smithy.api#tags": ["diff.error.const"], - "smithy.api#documentation": "Provides the value in the 'Code' distinguishing field and HTTP response code for an operation error." - } - }, - "aws.protocols#StringList": { - "type": "list", - "member": { - "target": "smithy.api#String" - }, - "traits": { - "smithy.api#private": {} - } - } - } -} diff --git a/TestModels/SimpleTypes/SimpleBoolean/Model/update.sh b/TestModels/SimpleTypes/SimpleBoolean/Model/update.sh deleted file mode 100755 index 0fcc7580e6..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/Model/update.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -# Usage: ./update.sh -# Example: ./update.sh ~/workplace/private-aws-encryption-sdk-dafny-staging v4-seperate-modules -ESDK_PATH="$1" -ESDK_BRANCH="$2" -MDL_SRC_FILES=('traits.smithy' 'waiters.smithy') -MDL_SRC_DIRS=('aws-sdk') - -set -e - -cd "$ESDK_PATH" -if [ "$2" ]; then - git checkout "$ESDK_BRANCH" - git pull -fi -ESDK_COMMIT_SHA=$(git rev-parse --short HEAD) -echo -e "ESDK Commit Sha is $ESDK_COMMIT_SHA" -cd - -for DAFNY_FILE in "${MDL_SRC_FILES[@]}"; do - cp "$ESDK_PATH/model/$DAFNY_FILE" "$DAFNY_FILE" - git add "$DAFNY_FILE" -done -for DIRECTORY in "${MDL_SRC_DIRS[@]}"; do - cp -r "$ESDK_PATH/model/$DIRECTORY" "." - git add "$DIRECTORY" -done -printf "Pulled Files for ESDK's model and staged for commit. \n" -printf "Suggest executing: \n" -COMMIT_MSG="chore(tests): Update ESDK's Model to $ESDK_COMMIT_SHA" -echo "git commit -m \"$COMMIT_MSG\"" diff --git a/TestModels/SimpleTypes/SimpleBoolean/Model/waiters.smithy b/TestModels/SimpleTypes/SimpleBoolean/Model/waiters.smithy deleted file mode 100644 index cb799a09ab..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/Model/waiters.smithy +++ /dev/null @@ -1,175 +0,0 @@ -namespace smithy.waiters - -/// Indicates that an operation has various named "waiters" that can be used -/// to poll a resource until it enters a desired state. -@trait(selector: "operation :not(-[input, output]-> structure > member > union[trait|streaming])") -@length(min: 1) -map waitable { - key: WaiterName, - value: Waiter, -} - -@pattern("^[A-Z]+[A-Za-z0-9]*$") -string WaiterName - -/// Defines an individual operation waiter. -@private -structure Waiter { - /// Documentation about the waiter. Can use CommonMark. - documentation: String, - - /// An ordered array of acceptors to check after executing an operation. - @required - acceptors: Acceptors, - - /// The minimum amount of time in seconds to delay between each retry. - /// This value defaults to 2 if not specified. If specified, this value - /// MUST be greater than or equal to 1 and less than or equal to - /// `maxDelay`. - minDelay: WaiterDelay, - - /// The maximum amount of time in seconds to delay between each retry. - /// This value defaults to 120 if not specified (or, 2 minutes). If - /// specified, this value MUST be greater than or equal to 1. - maxDelay: WaiterDelay, - - /// Indicates if the waiter is considered deprecated. A waiter SHOULD - /// be marked as deprecated if it has been replaced by another waiter or - /// if it is no longer needed (for example, if a resource changes from - /// eventually consistent to strongly consistent). - deprecated: PrimitiveBoolean, - - /// A list of tags associated with the waiter that allow waiters to be - /// categorized and grouped. - tags: NonEmptyStringList, -} - -@box -@range(min: 1) -integer WaiterDelay - -@private -@length(min: 1) -list Acceptors { - member: Acceptor -} - -/// Represents an acceptor in a waiter's state machine. -@private -structure Acceptor { - /// The state the acceptor transitions to when matched. - @required - state: AcceptorState, - - /// The matcher used to test if the resource is in a given state. - @required - matcher: Matcher, -} - -/// The transition state of a waiter. -@private -@enum([ - { - "name": "SUCCESS", - "value": "success", - "documentation": """ - The waiter successfully finished waiting. This is a terminal - state that causes the waiter to stop.""" - }, - { - "name": "FAILURE", - "value": "failure", - "documentation": """ - The waiter failed to enter into the desired state. This is a - terminal state that causes the waiter to stop.""" - }, - { - "name": "RETRY", - "value": "retry", - "documentation": """ - The waiter will retry the operation. This state transition is - implicit if no accepter causes a state transition.""" - }, -]) -string AcceptorState - -/// Defines how an acceptor determines if it matches the current state of -/// a resource. -@private -union Matcher { - /// Matches on the successful output of an operation using a - /// JMESPath expression. - output: PathMatcher, - - /// Matches on both the input and output of an operation using a JMESPath - /// expression. input parameters are available through the top-level - /// `input` field, and output data is available through the top-level - /// `output` field. This matcher can only be used on operations that - /// define both input and output. This matcher is checked only if an - /// operation completes successfully. - inputoutput: PathMatcher, - - /// Matches if an operation returns an error and the error matches - /// the expected error type. If an absolute shape ID is provided, the - /// error is matched exactly on the shape ID. A shape name can be - /// provided to match an error in any namespace with the given name. - errorType: String, - - /// When set to `true`, matches when an operation returns a successful - /// response. When set to `false`, matches when an operation fails with - /// any error. - success: Boolean, -} - -/// Defines how to test the result of a JMESPath expression against -/// an expected value. -@private -structure PathMatcher { - /// A JMESPath expression applied to the input or output of an operation. - @required - path: String, - - /// The expected return value of the expression. - @required - expected: String, - - /// The comparator used to compare the result of the expression with the - /// expected value. - @required - comparator: PathComparator, -} - -/// Defines a comparison to perform in a PathMatcher. -@enum([ - { - "name": "STRING_EQUALS", - "value": "stringEquals", - "documentation": "Matches if the return value is a string that is equal to the expected string." - }, - { - "name": "BOOLEAN_EQUALS", - "value": "booleanEquals", - "documentation": "Matches if the return value is a boolean that is equal to the string literal 'true' or 'false'." - }, - { - "name": "ALL_STRING_EQUALS", - "value": "allStringEquals", - "documentation": "Matches if all values in the list matches the expected string." - }, - { - "name": "ANY_STRING_EQUALS", - "value": "anyStringEquals", - "documentation": "Matches if any value in the list matches the expected string." - } -]) -@private -string PathComparator - -@private -list NonEmptyStringList { - member: NonEmptyString, -} - -@private -@length(min: 1) -string NonEmptyString diff --git a/TestModels/SimpleTypes/SimpleBoolean/build.gradle.kts b/TestModels/SimpleTypes/SimpleBoolean/build.gradle.kts index 67d099512a..eaf5ede2aa 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/build.gradle.kts +++ b/TestModels/SimpleTypes/SimpleBoolean/build.gradle.kts @@ -2,20 +2,26 @@ plugins { id("software.amazon.smithy").version("0.6.0") } +buildscript { + repositories { + mavenLocal() + mavenCentral() + } + dependencies { + classpath("software.amazon.smithy:smithy-aws-traits:1.29.0") + } +} + repositories { mavenLocal() mavenCentral() } dependencies { - implementation("software.amazon.smithy:smithy-model:1.28.1") - implementation("software.amazon.smithy.typescript:smithy-aws-typescript-codegen:0.12.0") -} - -configure { - // Uncomment this to use a custom projection when building the JAR. - // projection = "foo" -} + implementation("software.amazon.smithy:smithy-model:1.29.0") -// Uncomment to disable creating a JAR. -//tasks["jar"].enabled = false \ No newline at end of file + // Any dependencies that the projected model needs must be (re)declared + // here. For example, let's assume that the smithy-aws-traits package is + // needed in the projected model too. + implementation("software.amazon.smithy:smithy-aws-traits:1.29.0") +} \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/gradle.properties b/TestModels/SimpleTypes/SimpleBoolean/gradle.properties index 8fecd51371..0a78a30476 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/gradle.properties +++ b/TestModels/SimpleTypes/SimpleBoolean/gradle.properties @@ -1,2 +1,3 @@ smithyVersion=[1.26.1,1.27.0[ smithyGradleVersion=0.6.0 +gnsp.disableApplyOnlyOnRootProjectEnforcement \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/__init__.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/__init__.py deleted file mode 100644 index 247be3e3d4..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/client.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/client.py deleted file mode 100644 index 242c243b0a..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/client.py +++ /dev/null @@ -1,50 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -from typing import TypeVar - -from smithy_python._private.http import set_static_endpoint_resolver - -from .config import Config, Plugin -from .models import GetBooleanInput, GetBooleanOutput - - -Input = TypeVar("Input") -Output = TypeVar("Output") - -class SimpleTypesBoolean: - """Client for SimpleTypesBoolean - - :param config: Optional configuration for the client. Here you can set things like the - endpoint for HTTP services or auth credentials. - - :param plugins: A list of callables that modify the configuration dynamically. These - can be used to set defaults, for example. - """ - def __init__(self, config: Config | None = None, plugins: list[Plugin] | None = None): - self._config = config or Config() - - client_plugins: list[Plugin] = [ - set_static_endpoint_resolver, - ] - if plugins: - client_plugins.extend(plugins) - - for plugin in client_plugins: - plugin(self._config) - - async def get_boolean(self, input: GetBooleanInput, plugins: list[Plugin] | None = None) -> GetBooleanOutput: - """Invokes the GetBoolean operation. - - :param input: The operation's input. - - :param plugins: A list of callables that modify the configuration dynamically. - Changes made by these plugins only apply for the duration of the operation - execution and will not affect any other operation invocations. - """ - operation_plugins = [ - - ] - if plugins: - operation_plugins.extend(plugins) - - raise NotImplementedError() diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/config.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/config.py deleted file mode 100644 index 669e14903f..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/config.py +++ /dev/null @@ -1,47 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -from dataclasses import dataclass -from typing import Any, Callable, TypeAlias, Union - -from smithy_python.interfaces import URI -from smithy_python.interfaces.http import ( - EndpointResolver, - HTTPClient, - HTTPRequestConfiguration, -) -from smithy_python.interfaces.interceptor import Interceptor -from smithy_python.interfaces.retries import RetryStrategy - -from .endpoints import EndpointParams -from .models import GetBooleanInput, GetBooleanOutput - - -_ServiceInterceptor = Union[Interceptor[GetBooleanInput, GetBooleanOutput, Any, Any]] -@dataclass(kw_only=True) -class Config: - """Configuration for SimpleTypesBoolean - - :param interceptors: The list of interceptors, which are hooks that are called - during the execution of a request. - - :param retry_strategy: The retry strategy for issuing retry tokens and computing - retry delays. - - :param http_client: The HTTP client used to make requests. - - :param http_request_config: Configuration for individual HTTP requests. - - :param endpoint_resolver: The endpoint resolver used to resolve the final - endpoint per-operation based on the configuration. - - :param endpoint_uri: A static URI to route requests to. - """ - interceptors: list[_ServiceInterceptor] | None = None - retry_strategy: RetryStrategy | None = None - http_client: HTTPClient | None = None - http_request_config: HTTPRequestConfiguration | None = None - endpoint_resolver: EndpointResolver[EndpointParams] | None = None - endpoint_uri: str | URI | None = None - -# A callable that allows customizing the config object on each request. -Plugin: TypeAlias = Callable[[Config], None] diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/endpoints.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/endpoints.py deleted file mode 100644 index 49b2f71554..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/endpoints.py +++ /dev/null @@ -1,7 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -from smithy_python._private.http import StaticEndpointParams, StaticEndpointResolver - - -EndpointParams = StaticEndpointParams -EndpointResolver = StaticEndpointResolver diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/errors.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/errors.py deleted file mode 100644 index 6f38ba4e80..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/errors.py +++ /dev/null @@ -1,23 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -from typing import Generic, Literal, TypeVar - - -class ServiceError(Exception): - """Base error for all errors in the service. - """ - pass - -T = TypeVar('T') -class ApiError(ServiceError, Generic[T]): - """Base error for all api errors in the service. - """ - code: T - def __init__(self, message: str): - super().__init__(message) - self.message = message - -class UnknownApiError(ApiError[Literal['Unknown']]): - """Error representing any unknown api errors - """ - code: Literal['Unknown'] = 'Unknown' diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/models.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/models.py deleted file mode 100644 index 0a63ef3521..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/simple_boolean/models.py +++ /dev/null @@ -1,195 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -from typing import Any, Dict, Optional, TypeVar, cast - - -class _DEFAULT: - def __init__(self, wrapped: Any): - """Wraps a value to signal it was provided by default. - - These values will be immediately unwrapped in the associated - initializers so the values can be used as normal, the defaultedness - will then be tracked separately. - """ - self._wrapped = wrapped - - @property - def value(self) -> Any: - # Prevent mutations from leaking by simply returning copies of mutable - # defaults. We could also just make immutable subclasses. - if isinstance(self._wrapped, list): - return list(self._wrapped) - if isinstance(self._wrapped, dict): - return dict(self._wrapped) - return self._wrapped - - def __repr__(self) -> str: - return f"_DEFAULT({repr(self._wrapped)})" - - def __str__(self) -> str: - return str(self._wrapped) - -_D = TypeVar("_D") - -def _default(value: _D) -> _D: - """Wraps a value to signal it was provided by default. - - These values will be immediately unwrapped in the associated - initializers so the values can be used as normal, the defaultedness - will then be tracked separately. - - We use this wrapper function for brevity, but also because many completion - tools will show the code of the default rather than the result, and - `_default(7)` is a bit more clear than `cast(int, _DEFAULT(7))`. - """ - return cast(_D, _DEFAULT(value)) - -class GetBooleanInput: - value: Optional[bool] - def __init__( - self, - *, - value: Optional[bool] = None, - ): - self._has: dict[str, bool] = {} - self.value = value - - def _set_default_attr(self, name: str, value: Any) -> None: - if isinstance(value, _DEFAULT): - object.__setattr__(self, name, value.value) - self._has[name] = False - else: - setattr(self, name, value) - - def __setattr__(self, name: str, value: Any) -> None: - object.__setattr__(self, name, value) - self._has[name] = True - - def _hasattr(self, name: str) -> bool: - if self._has.get(name, False): - return True - # Lists and dicts are mutable. We could make immutable variants, but - # that's kind of a bad experience. Instead we can just check to see if - # the value is empty. - if isinstance((v := getattr(self, name, None)), (dict, list)) and len(v) != 0: - self._has[name] = True - return True - return False - - def as_dict(self) -> Dict[str, Any]: - """Converts the GetBooleanInput to a dictionary. - - The dictionary uses the modeled shape names rather than the parameter names as - keys to be mostly compatible with boto3. - """ - d: Dict[str, Any] = {} - - if self._hasattr("value") and self.value is not None: - d["value"] = self.value - - return d - - @staticmethod - def from_dict(d: Dict[str, Any]) -> "GetBooleanInput": - """Creates a GetBooleanInput from a dictionary. - - The dictionary is expected to use the modeled shape names rather than the - parameter names as keys to be mostly compatible with boto3. - """ - kwargs: Dict[str, Any] = {} - - if "value" in d: - kwargs["value"] = d["value"] - - return GetBooleanInput(**kwargs) - - def __repr__(self) -> str: - result = "GetBooleanInput(" - if self._has["value"]: - result += f"value={repr(self.value)}" - - return result + ")" - - def __eq__(self, other: Any) -> bool: - if not isinstance(other, GetBooleanInput): - return False - attributes: list[str] = ['value',] - return all( - self._hasattr(a) == other._hasattr(a) and getattr(self, a) == getattr(other, a) - for a in attributes - ) - -class GetBooleanOutput: - value: Optional[bool] - def __init__( - self, - *, - value: Optional[bool] = None, - ): - self._has: dict[str, bool] = {} - self.value = value - - def _set_default_attr(self, name: str, value: Any) -> None: - if isinstance(value, _DEFAULT): - object.__setattr__(self, name, value.value) - self._has[name] = False - else: - setattr(self, name, value) - - def __setattr__(self, name: str, value: Any) -> None: - object.__setattr__(self, name, value) - self._has[name] = True - - def _hasattr(self, name: str) -> bool: - if self._has.get(name, False): - return True - # Lists and dicts are mutable. We could make immutable variants, but - # that's kind of a bad experience. Instead we can just check to see if - # the value is empty. - if isinstance((v := getattr(self, name, None)), (dict, list)) and len(v) != 0: - self._has[name] = True - return True - return False - - def as_dict(self) -> Dict[str, Any]: - """Converts the GetBooleanOutput to a dictionary. - - The dictionary uses the modeled shape names rather than the parameter names as - keys to be mostly compatible with boto3. - """ - d: Dict[str, Any] = {} - - if self._hasattr("value") and self.value is not None: - d["value"] = self.value - - return d - - @staticmethod - def from_dict(d: Dict[str, Any]) -> "GetBooleanOutput": - """Creates a GetBooleanOutput from a dictionary. - - The dictionary is expected to use the modeled shape names rather than the - parameter names as keys to be mostly compatible with boto3. - """ - kwargs: Dict[str, Any] = {} - - if "value" in d: - kwargs["value"] = d["value"] - - return GetBooleanOutput(**kwargs) - - def __repr__(self) -> str: - result = "GetBooleanOutput(" - if self._has["value"]: - result += f"value={repr(self.value)}" - - return result + ")" - - def __eq__(self, other: Any) -> bool: - if not isinstance(other, GetBooleanOutput): - return False - attributes: list[str] = ['value',] - return all( - self._hasattr(a) == other._hasattr(a) and getattr(self, a) == getattr(other, a) - for a in attributes - ) diff --git a/TestModels/SimpleTypes/SimpleBoolean/settings.gradle.kts b/TestModels/SimpleTypes/SimpleBoolean/settings.gradle.kts new file mode 100644 index 0000000000..3d460496a2 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/settings.gradle.kts @@ -0,0 +1,27 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +rootProject.name = "simple-types-boolean" +include(":smithy-dafny-python") +project(":smithy-dafny-python").projectDir = file("../../../codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen") +include(":smithy-python") +project(":smithy-python").projectDir = file("../../../codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/smithy-python/codegen") + +pluginManagement { + repositories { + mavenLocal() + gradlePluginPortal() + } +} diff --git a/TestModels/SimpleTypes/SimpleBoolean/smithy-build.json b/TestModels/SimpleTypes/SimpleBoolean/smithy-build.json deleted file mode 100644 index d3597b41b3..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/smithy-build.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "version": "1.0", - "plugins": { - "python-codegen": { - "service": "example.weather#Weather", - "module": "weather", - "moduleVersion": "0.0.1" - } - } -} diff --git a/TestModels/SimpleTypes/SimpleBoolean/src/Index.dfy b/TestModels/SimpleTypes/SimpleBoolean/src/Index.dfy index 577c20c6ec..7ac36a954d 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/src/Index.dfy +++ b/TestModels/SimpleTypes/SimpleBoolean/src/Index.dfy @@ -21,9 +21,22 @@ module {:extern "Dafny.Simple.Types.Boolean" } SimpleBoolean refines AbstractSim } constructor(config: Operations.InternalConfig) { this.config := config; - History := new ISimpleTypesBooleanClientCallHistory(); + History := new ISimpleBooleanClientCallHistory(); Modifies := Operations.ModifiesInternalConfig(config) + {History}; } } -} \ No newline at end of file +} +/* +dafny \ + -vcsCores:2 \ + -compileTarget:py \ + -spillTargetCode:3 \ + -runAllTests:1 \ + -compile:0 \ + -optimizeErasableDatatypeWrapper:0 \ + -useRuntimeLib \ + -out runtimes/java/TestsFromDafny \ + `find ./test -name '*.dfy'` \ + -library:src/Index.dfy +*/ \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy b/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy index 32da70b78d..2c6cda534f 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy +++ b/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy @@ -13,7 +13,7 @@ module SimpleBooleanImplTest { TestGetBooleanFalse(client); } - method TestGetBooleanTrue(client: ISimpleTypesBooleanClient) + method TestGetBooleanTrue(client: ISimpleBooleanClient) requires client.ValidState() modifies client.Modifies ensures client.ValidState() @@ -23,7 +23,7 @@ module SimpleBooleanImplTest { print ret; } - method TestGetBooleanFalse(client: ISimpleTypesBooleanClient) + method TestGetBooleanFalse(client: ISimpleBooleanClient) requires client.ValidState() modifies client.Modifies ensures client.ValidState() diff --git a/TestModels/SimpleTypes/SimpleBoolean/test/WrappedSimpleBooleanTest.dfy b/TestModels/SimpleTypes/SimpleBoolean/test/WrappedSimpleBooleanTest.dfy index bc7a7170cb..11c5e566c7 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/test/WrappedSimpleBooleanTest.dfy +++ b/TestModels/SimpleTypes/SimpleBoolean/test/WrappedSimpleBooleanTest.dfy @@ -13,4 +13,17 @@ module WrappedSimpleTypesBooleanTest { var client :- expect WrappedSimpleTypesBooleanService.WrappedSimpleBoolean(); SimpleBooleanImplTest.TestGetBooleanFalse(client); } -} \ No newline at end of file +} + +/* +dafny \ + -vcsCores:2 \ + -compileTarget:py \ + -spillTargetCode:3 \ + -compile:0 \ + -optimizeErasableDatatypeWrapper:0 \ + -useRuntimeLib \ + -out runtimes/net/ImplementationFromDafny \ + ./src/Index.dfy \ + -library:/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/dafny-dependencies/StandardLibrary/src/Index.dfy \ +*/ \ No newline at end of file diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/DafnyProtocolGenerator.java b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/DafnyProtocolGenerator.java new file mode 100644 index 0000000000..0fd50e03df --- /dev/null +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/DafnyProtocolGenerator.java @@ -0,0 +1,585 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +package software.amazon.smithy.python.codegen.integration; + + +import static java.lang.String.format; +import static software.amazon.smithy.model.knowledge.HttpBinding.Location.HEADER; +import static software.amazon.smithy.model.knowledge.HttpBinding.Location.PAYLOAD; +import static software.amazon.smithy.model.knowledge.HttpBinding.Location.PREFIX_HEADERS; +import static software.amazon.smithy.model.traits.TimestampFormatTrait.Format; + +import java.util.Set; +import java.util.TreeSet; +import software.amazon.smithy.codegen.core.CodegenException; +import software.amazon.smithy.model.knowledge.HttpBinding.Location; +import software.amazon.smithy.model.knowledge.HttpBindingIndex; +import software.amazon.smithy.model.knowledge.TopDownIndex; +import software.amazon.smithy.model.shapes.BigDecimalShape; +import software.amazon.smithy.model.shapes.BigIntegerShape; +import software.amazon.smithy.model.shapes.BlobShape; +import software.amazon.smithy.model.shapes.BooleanShape; +import software.amazon.smithy.model.shapes.ByteShape; +import software.amazon.smithy.model.shapes.DoubleShape; +import software.amazon.smithy.model.shapes.FloatShape; +import software.amazon.smithy.model.shapes.IntegerShape; +import software.amazon.smithy.model.shapes.ListShape; +import software.amazon.smithy.model.shapes.LongShape; +import software.amazon.smithy.model.shapes.MemberShape; +import software.amazon.smithy.model.shapes.OperationShape; +import software.amazon.smithy.model.shapes.Shape; +import software.amazon.smithy.model.shapes.ShapeId; +import software.amazon.smithy.model.shapes.ShapeVisitor; +import software.amazon.smithy.model.shapes.ShortShape; +import software.amazon.smithy.model.shapes.StringShape; +import software.amazon.smithy.model.shapes.StructureShape; +import software.amazon.smithy.model.shapes.TimestampShape; +import software.amazon.smithy.model.traits.MediaTypeTrait; +import software.amazon.smithy.model.traits.StreamingTrait; +import software.amazon.smithy.python.codegen.ApplicationProtocol; +import software.amazon.smithy.python.codegen.CodegenUtils; +import software.amazon.smithy.python.codegen.GenerationContext; +import software.amazon.smithy.python.codegen.PythonWriter; +import software.amazon.smithy.python.codegen.SmithyPythonDependency; +import software.amazon.smithy.utils.CodeSection; +import software.amazon.smithy.utils.SmithyUnstableApi; +/* +dafny \ + -vcsCores:2 \ + -compileTarget:java\ + -spillTargetCode:3 \ + -compile:0 \ + -useRuntimeLib \ + -out runtimes/java \ + ./src/Index.dfy \ + -library:$(PROJECT_ROOT)/dafny-dependencies/StandardLibrary/src/Index.dfy \ + $(patsubst %, -library:$(PROJECT_ROOT)/%/src/Index.dfy, $(LIBRARIES)) + + */ + +/** + * Abstract implementation useful for all protocols that use HTTP bindings. + * + *

This will implement any handling of components outside the request + * body and error handling. + */ +@SmithyUnstableApi +public abstract class DafnyProtocolGenerator implements ProtocolGenerator { + + private final Set serializingDocumentShapes = new TreeSet<>(); + private final Set deserializingDocumentShapes = new TreeSet<>(); + + @Override + public ApplicationProtocol getApplicationProtocol() { + return DafnyTestIntegration.createDafnyApplicationProtocol(); + } + + @Override + public void generateRequestSerializers(GenerationContext context) { + var topDownIndex = TopDownIndex.of(context.model()); + var delegator = context.writerDelegator(); + var configSymbol = CodegenUtils.getConfigSymbol(context.settings()); + var transportRequest = context.applicationProtocol().requestType(); + for (OperationShape operation : topDownIndex.getContainedOperations(context.settings().getService())) { + var serFunction = getSerializationFunction(context, operation); + var input = context.model().expectShape(operation.getInputShape()); + var inputSymbol = context.symbolProvider().toSymbol(input); + delegator.useFileWriter(serFunction.getDefinitionFile(), serFunction.getNamespace(), writer -> { + writer.pushState(new RequestSerializerSection(operation)); + writer.write(""" + async def $L(input: $T, config: $T) -> $T: + ${C|} + """, serFunction.getName(), inputSymbol, configSymbol, transportRequest, + writer.consumer(w -> generateRequestSerializer(context, operation, w))); + writer.popState(); + }); + } +// generateDocumentBodyShapeSerializers(context, serializingDocumentShapes); + } + + /** + * A section that controls writing out the entire serialization function. + * + * @param operation The operation whose serializer is being generated. + */ + public record RequestSerializerSection(OperationShape operation) implements CodeSection {} + + + /** + * Generates the content of the operation request serializer. + * + *

Serialization of the http-level components will be inline + * since there isn't any use for them elsewhere. Serialization + * of document body components should be delegated, however, + * as they will need to be re-used in all likelihood. + * + *

This function has the following in scope: + *

    + *
  • input - the operation's input
  • + *
  • config - the client config
  • + *
+ */ + private void generateRequestSerializer( + GenerationContext context, + OperationShape operation, + PythonWriter writer + ) { + writer.addDependency(SmithyPythonDependency.SMITHY_PYTHON); + writer.addImport("Dafny.Path.To.Dafny.Code.", "SimpleBooleanHardCoded", "_SimpleBooleanHardCoded"); + + writer.write(""" + return _SimpleBooleanHardCoded.get_boolean() + """); + } + + @Override + public void generateResponseDeserializers(GenerationContext context) { + var topDownIndex = TopDownIndex.of(context.model()); + var service = context.settings().getService(context.model()); + var deserializingErrorShapes = new TreeSet(); + for (OperationShape operation : topDownIndex.getContainedOperations(context.settings().getService())) { + generateOperationResponseDeserializer(context, operation); + deserializingErrorShapes.addAll(operation.getErrors(service)); + } + for (ShapeId errorId : deserializingErrorShapes) { + var error = context.model().expectShape(errorId, StructureShape.class); + generateErrorResponseDeserializer(context, error); + } + generateDocumentBodyShapeDeserializers(context, deserializingDocumentShapes); + } + + /** + * Generates the content of the operation response deserializer. + * + *

Deserialization of the http-level components will be inline + * since there isn't any use for them elsewhere. Deserialization + * of document body components should be delegated, however, + * as they will need to be re-used in all likelihood. + * + *

This function has the following in scope: + *

    + *
  • http_response - the http-level response
  • + *
  • config - the client config
  • + *
+ */ + private void generateOperationResponseDeserializer( + GenerationContext context, + OperationShape operation + ) { + var delegator = context.writerDelegator(); + var deserFunction = getDeserializationFunction(context, operation); + delegator.useFileWriter(deserFunction.getDefinitionFile(), deserFunction.getNamespace(), writer -> { + writer.pushState(new ResponseDeserializerSection(operation)); + + writer.addStdlibImport("typing", "Any"); + writer.write(""" + # This is the output of Dafny, + # so it probably needs to call the impl and get the result? + """); + writer.popState(); + }); + } + + /** + * A section that controls writing out the entire deserialization function for an operation. + * + * @param operation The operation whose deserializer is being generated. + */ + public record ResponseDeserializerSection(OperationShape operation) implements CodeSection {} + + private void generateErrorResponseDeserializer(GenerationContext context, StructureShape error) { + var deserFunction = getErrorDeserializationFunction(context, error); + var errorSymbol = context.symbolProvider().toSymbol(error); + var delegator = context.writerDelegator(); + var transportResponse = context.applicationProtocol().responseType(); + var configSymbol = CodegenUtils.getConfigSymbol(context.settings()); + delegator.useFileWriter(deserFunction.getDefinitionFile(), deserFunction.getNamespace(), writer -> { + writer.pushState(new ErrorDeserializerSection(error)); + writer.addStdlibImport("typing", "Any"); + writer.write(""" + async def $L( + http_response: $T, + config: $T, + parsed_body: dict[str, Document]| None, + default_message: str, + ) -> $T: + kwargs: dict[str, Any] = {"message": default_message} + + """, deserFunction.getName(), transportResponse, configSymbol, errorSymbol); + writer.popState(); + }); + } + + + /** + * A section that controls writing out the entire deserialization function for an error. + * + * @param error The error whose deserializer is being generated. + */ + public record ErrorDeserializerSection(StructureShape error) implements CodeSection {} + + /** + * Generates deserialization functions for shapes in the given set. + * + *

These are the functions that deserializeDocumentBody will call out to. + * + * @param context The generation context. + * @param shapes The shapes to generate deserialization for. + */ + protected abstract void generateDocumentBodyShapeDeserializers( + GenerationContext context, + Set shapes + ); + + /** + * Given context and a source of data, generate an input value provider for the + * shape. This may use native types or invoke complex type serializers to + * manipulate the dataSource into the proper input content. + */ + private static class HttpMemberSerVisitor extends ShapeVisitor.Default { + private final GenerationContext context; + private final PythonWriter writer; + private final String dataSource; + private final Location bindingType; + private final MemberShape member; + private final Format defaultTimestampFormat; + + /** + * @param context The generation context. + * @param writer The writer to add dependencies to. + * @param bindingType How this value is bound to the operation input. + * @param dataSource The in-code location of the data to provide an output of + * ({@code input.foo}, {@code entry}, etc.) + * @param member The member that points to the value being provided. + * @param defaultTimestampFormat The default timestamp format to use. + */ + HttpMemberSerVisitor( + GenerationContext context, + PythonWriter writer, + Location bindingType, + String dataSource, + MemberShape member, + Format defaultTimestampFormat + ) { + this.context = context; + this.writer = writer; + this.dataSource = dataSource; + this.bindingType = bindingType; + this.member = member; + this.defaultTimestampFormat = defaultTimestampFormat; + } + + @Override + protected String getDefault(Shape shape) { + var protocolName = context.protocolGenerator().getName(); + throw new CodegenException(String.format( + "Unsupported %s binding of %s to %s in %s using the %s protocol", + bindingType, member.getMemberName(), shape.getType(), member.getContainer(), protocolName)); + } + + @Override + public String blobShape(BlobShape shape) { + if (member.getMemberTrait(context.model(), StreamingTrait.class).isPresent()) { + return dataSource; + } + writer.addStdlibImport("base64", "b64encode"); + return format("b64encode(%s).decode('utf-8')", dataSource); + } + + @Override + public String booleanShape(BooleanShape shape) { + return String.format("('true' if %s else 'false')", dataSource); + } + + @Override + public String stringShape(StringShape shape) { + if (bindingType == Location.HEADER) { + if (shape.hasTrait(MediaTypeTrait.class)) { + writer.addStdlibImport("base64", "b64encode"); + return format("b64encode(%s.encode('utf-8')).decode('utf-8')", dataSource); + } + } + return dataSource; + } + + @Override + public String byteShape(ByteShape shape) { + // TODO: perform bounds checks + return integerShape(); + } + + @Override + public String shortShape(ShortShape shape) { + // TODO: perform bounds checks + return integerShape(); + } + + @Override + public String integerShape(IntegerShape shape) { + // TODO: perform bounds checks + return integerShape(); + } + + @Override + public String longShape(LongShape shape) { + // TODO: perform bounds checks + return integerShape(); + } + + @Override + public String bigIntegerShape(BigIntegerShape shape) { + return integerShape(); + } + + private String integerShape() { + return String.format("str(%s)", dataSource); + } + + @Override + public String floatShape(FloatShape shape) { + // TODO: use strict parsing + return floatShapes(); + } + + @Override + public String doubleShape(DoubleShape shape) { + // TODO: use strict parsing + return floatShapes(); + } + + @Override + public String bigDecimalShape(BigDecimalShape shape) { + return floatShapes(); + } + + private String floatShapes() { + writer.addDependency(SmithyPythonDependency.SMITHY_PYTHON); + writer.addImport("smithy_python.utils", "serialize_float"); + return String.format("serialize_float(%s)", dataSource); + } + + @Override + public String timestampShape(TimestampShape shape) { + var httpIndex = HttpBindingIndex.of(context.model()); + var format = switch (bindingType) { + case HEADER -> httpIndex.determineTimestampFormat(member, bindingType, Format.HTTP_DATE); + case LABEL -> httpIndex.determineTimestampFormat(member, bindingType, defaultTimestampFormat); + case QUERY -> httpIndex.determineTimestampFormat(member, bindingType, Format.DATE_TIME); + default -> + throw new CodegenException("Unexpected named member shape binding location `" + bindingType + "`"); + }; + + var result = HttpProtocolGeneratorUtils.getTimestampInputParam( + context, writer, dataSource, member, format); + if (format == Format.EPOCH_SECONDS) { + result = format("str(%s)", result); + } + return result; + } + } + + /** + * Given context and a source of data, generate an output value provider for the + * shape. This may use native types (like generating a datetime for timestamps) + * converters (like a b64decode) or invoke complex type deserializers to + * manipulate the dataSource into the proper output content. + */ + private static class HttpMemberDeserVisitor extends ShapeVisitor.Default { + + private final GenerationContext context; + private final PythonWriter writer; + private final String dataSource; + private final Location bindingType; + private final MemberShape member; + private final Format defaultTimestampFormat; + + /** + * @param context The generation context. + * @param writer The writer to add dependencies to. + * @param bindingType How this value is bound to the operation output. + * @param dataSource The in-code location of the data to provide an output of + * ({@code output.foo}, {@code entry}, etc.) + * @param member The member that points to the value being provided. + * @param defaultTimestampFormat The default timestamp format to use. + */ + HttpMemberDeserVisitor( + GenerationContext context, + PythonWriter writer, + Location bindingType, + String dataSource, + MemberShape member, + Format defaultTimestampFormat + ) { + this.context = context; + this.writer = writer; + this.dataSource = dataSource; + this.bindingType = bindingType; + this.member = member; + this.defaultTimestampFormat = defaultTimestampFormat; + } + + @Override + protected String getDefault(Shape shape) { + var protocolName = context.protocolGenerator().getName(); + throw new CodegenException(String.format( + "Unsupported %s binding of %s to %s in %s using the %s protocol", + bindingType, member.getMemberName(), shape.getType(), member.getContainer(), protocolName)); + } + + @Override + public String blobShape(BlobShape shape) { + if (bindingType == PAYLOAD) { + return dataSource; + } + throw new CodegenException("Unexpected blob binding location `" + bindingType + "`"); + } + + @Override + public String booleanShape(BooleanShape shape) { + switch (bindingType) { + case QUERY, LABEL, HEADER -> { + writer.addDependency(SmithyPythonDependency.SMITHY_PYTHON); + writer.addImport("smithy_python.utils", "strict_parse_bool"); + return "strict_parse_bool(" + dataSource + ")"; + } + default -> throw new CodegenException("Unexpected boolean binding location `" + bindingType + "`"); + } + } + + @Override + public String byteShape(ByteShape shape) { + // TODO: perform bounds checks + return integerShape(); + } + + @Override + public String shortShape(ShortShape shape) { + // TODO: perform bounds checks + return integerShape(); + } + + @Override + public String integerShape(IntegerShape shape) { + // TODO: perform bounds checks + return integerShape(); + } + + @Override + public String longShape(LongShape shape) { + // TODO: perform bounds checks + return integerShape(); + } + + @Override + public String bigIntegerShape(BigIntegerShape shape) { + return integerShape(); + } + + private String integerShape() { + return switch (bindingType) { + case QUERY, LABEL, HEADER, RESPONSE_CODE -> "int(" + dataSource + ")"; + default -> throw new CodegenException("Unexpected integer binding location `" + bindingType + "`"); + }; + } + + @Override + public String floatShape(FloatShape shape) { + // TODO: use strict parsing + return floatShapes(); + } + + @Override + public String doubleShape(DoubleShape shape) { + // TODO: use strict parsing + return floatShapes(); + } + + private String floatShapes() { + switch (bindingType) { + case QUERY, LABEL, HEADER -> { + writer.addDependency(SmithyPythonDependency.SMITHY_PYTHON); + writer.addImport("smithy_python.utils", "strict_parse_float"); + return "strict_parse_float(" + dataSource + ")"; + } + default -> throw new CodegenException("Unexpected float binding location `" + bindingType + "`"); + } + } + + @Override + public String bigDecimalShape(BigDecimalShape shape) { + switch (bindingType) { + case QUERY, LABEL, HEADER -> { + writer.addStdlibImport("decimal", "Decimal", "_Decimal"); + return "_Decimal(" + dataSource + ")"; + } + default -> throw new CodegenException("Unexpected bigDecimal binding location `" + bindingType + "`"); + } + } + + @Override + public String stringShape(StringShape shape) { + if ((bindingType == HEADER || bindingType == PREFIX_HEADERS) && shape.hasTrait(MediaTypeTrait.ID)) { + writer.addStdlibImport("base64", "b64decode"); + return "b64decode(" + dataSource + ").decode('utf-8')"; + } + + return dataSource; + } + + @Override + public String timestampShape(TimestampShape shape) { + HttpBindingIndex httpIndex = HttpBindingIndex.of(context.model()); + Format format = httpIndex.determineTimestampFormat(member, bindingType, defaultTimestampFormat); + var source = dataSource; + if (format == Format.EPOCH_SECONDS) { + writer.addDependency(SmithyPythonDependency.SMITHY_PYTHON); + writer.addImport("smithy_python.utils", "strict_parse_float"); + source = "strict_parse_float(" + dataSource + ")"; + } + return HttpProtocolGeneratorUtils.getTimestampOutputParam(writer, source, member, format); + } + + @Override + public String listShape(ListShape shape) { + if (bindingType != HEADER) { + throw new CodegenException("Unexpected list binding location `" + bindingType + "`"); + } + var collectionTarget = context.model().expectShape(shape.getMember().getTarget()); + writer.addImport("smithy_python.httputils", "split_header"); + writer.addDependency(SmithyPythonDependency.SMITHY_PYTHON); + String split = String.format("split_header(%s or '')", dataSource);; + + // Headers that have HTTP_DATE formatted timestamps may not be quoted, so we need + // to enable special handling for them. + if (isHttpDate(shape.getMember(), collectionTarget)) { + split = String.format("split_header(%s or '', True)", dataSource); + } + + var targetDeserVisitor = new HttpMemberDeserVisitor( + context, writer, bindingType, "e.strip()", shape.getMember(), defaultTimestampFormat); + return String.format("[%s for e in %s]", collectionTarget.accept(targetDeserVisitor), split); + } + + private boolean isHttpDate(MemberShape member, Shape target) { + if (target.isTimestampShape()) { + HttpBindingIndex httpIndex = HttpBindingIndex.of(context.model()); + Format format = httpIndex.determineTimestampFormat(member, bindingType, Format.HTTP_DATE); + return format == Format.HTTP_DATE; + } + return false; + } + } +} diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/DafnyTestIntegration.java b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/DafnyTestIntegration.java new file mode 100644 index 0000000000..428d1f11a3 --- /dev/null +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/DafnyTestIntegration.java @@ -0,0 +1,110 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +package software.amazon.smithy.python.codegen.integration; + +import java.util.Collections; +import java.util.List; +import java.util.Set; +import software.amazon.smithy.codegen.core.Symbol; +import software.amazon.smithy.codegen.core.SymbolReference; +import software.amazon.smithy.model.shapes.Shape; +import software.amazon.smithy.model.shapes.ShapeId; +import software.amazon.smithy.python.codegen.ApplicationProtocol; +import software.amazon.smithy.python.codegen.ConfigField; +import software.amazon.smithy.python.codegen.GenerationContext; +import software.amazon.smithy.python.codegen.PythonDependency; +import software.amazon.smithy.python.codegen.SmithyPythonDependency; + + +/** + * Integration that registers {@link RestJsonProtocolGenerator}. + */ +public final class DafnyTestIntegration implements + software.amazon.smithy.python.codegen.integration.PythonIntegration { + + private RuntimeClientPlugin assignDafnyImplRuntimeClientPlugin = RuntimeClientPlugin.builder() + .configFields( + Collections.singletonList(new ConfigField("impl", + Symbol.builder() + .name("config_type") + .namespace("Path.To.Config.Namespace", ".") + .build(), + false, ""))) + .pythonPlugin(SymbolReference.builder() + .symbol(Symbol.builder() + .name("set_config_impl") + .namespace(".", ".") + .build()) + .build()) + .build(); + + + @Override + public void customize(GenerationContext codegenContext) { + codegenContext.writerDelegator().useFileWriter("Iamaredme", "", writer -> { + // The $ character is escaped using $$ + writer.write("yo"); + }); + } + + /** + * Creates a default HTTP application protocol. + * + * @return Returns the created application protocol. + */ + public static ApplicationProtocol createDafnyApplicationProtocol() { + return new ApplicationProtocol( + "dafny", + SymbolReference.builder() + .symbol(createHttpSymbol("IaAmDafny")) + .build(), + SymbolReference.builder() + .symbol(createHttpSymbol("IamaAlsoDafny")) + .build() + ); + } + + private static Symbol createHttpSymbol(String symbolName) { + PythonDependency dependency = SmithyPythonDependency.SMITHY_PYTHON; + return Symbol.builder() + .namespace(dependency.packageName() + ".interfaces.http", ".") + .name(symbolName) + .addDependency(dependency) + .build(); + } + + @Override + public List getProtocolGenerators() { + return Collections.singletonList(new DafnyProtocolGenerator() { + + @Override + protected void generateDocumentBodyShapeDeserializers(GenerationContext context, + Set shapes) { + + } + + @Override + public ShapeId getProtocol() { + return ShapeId.from("aws.polymorph#localService"); + } + }); + } + + @Override + public List getClientPlugins() { + return Collections.singletonList(assignDafnyImplRuntimeClientPlugin); + } +} diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/build.gradle.kts b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/build.gradle.kts new file mode 100644 index 0000000000..8bacf16e4a --- /dev/null +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/build.gradle.kts @@ -0,0 +1,49 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +extra["displayName"] = "Smithy :: Dafny :: Python :: Codegen" +extra["moduleName"] = "software.amazon.smithy.dafny.python.codegen" + +tasks["jar"].enabled = false + +val smithyVersion: String by project + +buildscript { + val smithyVersion: String by project + + repositories { + mavenLocal() + mavenCentral() + } + dependencies { + "classpath"("software.amazon.smithy:smithy-cli:$smithyVersion") + } +} + +plugins { + val smithyGradleVersion: String by project + id("software.amazon.smithy").version(smithyGradleVersion) +} + +repositories { + mavenLocal() + mavenCentral() +} + +dependencies { + implementation(project(":smithy-python-codegen")) + implementation("software.amazon.smithy:smithy-waiters:$smithyVersion") + implementation("software.amazon.smithy:smithy-protocol-test-traits:$smithyVersion") +} diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/gradle.properties b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/gradle.properties new file mode 100644 index 0000000000..0a78a30476 --- /dev/null +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/gradle.properties @@ -0,0 +1,3 @@ +smithyVersion=[1.26.1,1.27.0[ +smithyGradleVersion=0.6.0 +gnsp.disableApplyOnlyOnRootProjectEnforcement \ No newline at end of file diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/model/SimpleBoolean.smithy b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/model/SimpleBoolean.smithy new file mode 100644 index 0000000000..785b4b4353 --- /dev/null +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/model/SimpleBoolean.smithy @@ -0,0 +1,27 @@ +namespace simple.types.boolean + +@aws.polymorph#localService( + sdkId: "SimpleBoolean", + config: SimpleBooleanConfig, +) +service SimpleTypesBoolean { + version: "2021-11-01", + resources: [], + operations: [ GetBoolean ], + errors: [], +} + +structure SimpleBooleanConfig {} + +operation GetBoolean { + input: GetBooleanInput, + output: GetBooleanOutput, +} + +structure GetBooleanInput { + value: Boolean +} + +structure GetBooleanOutput { + value: Boolean +} \ No newline at end of file diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/model/traits.smithy b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/model/traits.smithy new file mode 100644 index 0000000000..4cc9d57efa --- /dev/null +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/model/traits.smithy @@ -0,0 +1,77 @@ +namespace aws.polymorph + +// Smithy doesn't allow passing resources or services as members of structures, +// since it doesn't make sense in a client-server world to pass these over the +// wire. However, in our world we do want to be able to pass around references +// to things like Keyrings, so we create a new trait which indicates that +// a target shape is not actually a structure but instead an opaque reference +// to a service or resource. +@trait(selector: "structure") +structure reference { + // Can refer to either services or resources + // @idRef(failWhenMissing: true, selector: "structure") + service: String, + // @idRef(failWhenMissing: true, selector: "service") + resource: String +} + + +// A trait for explicitly modeling the configuration options that should be +// available in the generated methods for creating clients. +@trait(selector: "service") +structure localService { + // @required + sdkId: String, + // @required + // @idRef(failWhenMissing: true, selector: "structure") + config: String, +} + +// Trait indicates that the member of the given structure MUST be expanded. +// To be used when we want operations to accept +// or return bare values rather than a nested structure. +// Code generation SHOULD throw an error if this is applied to a structure +// that is not used as input or output to an operation. +// At this time, +// Code generation MUST throw an error if this is applied to a structure +// with more than or less than one member. +// i.e: The structure MUST have one and only one member. +// At this time, +// the sole member's requirement status MUST NOT be determined by +// the positional trait. +// TODO: naming +@trait(selector: "structure") +structure positional {} + +// Indicates that a string is represented as a sequence of UTF-8 encoded bytes +// in Dafny, rather than the default sequence of UTF-16 chars. +// +// This is a workaround that should be removed when Dafny's string definition +// is improved: +@trait(selector: "string") +structure dafnyUtf8Bytes {} + +// A trait indicating that the resource may be implemented by native code (instead of Dafny code). +// i.e.: Users may author their own classes that implement and extend this resource. +// Polymorph will generate and utilize NativeWrappers for these resources. +@trait(selector: "resource") +structure extendable {} + +// A trait indicating that a structure is a members of a union +// and MUST NOT be used independently of the union. +// This is syntactic sugar for +// union Foo { +// Bar: structure Bar { baz: String } +// } +// +// It is used like this +// union Foo { +// Bar: Bar +// } +// structure Bar { baz: String } +// This is especilay useful in Dafny. +// Because it results in a single datatype +// whos constructors are the member structures. +// datatypes Foo = Bar( baz: String ) +@trait(selector: "structure") +structure datatypeUnion {} diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/resources/META-INF/services/software.amazon.smithy.build.SmithyBuildPlugin b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/resources/META-INF/services/software.amazon.smithy.build.SmithyBuildPlugin new file mode 100644 index 0000000000..71cf01ed8c --- /dev/null +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/resources/META-INF/services/software.amazon.smithy.build.SmithyBuildPlugin @@ -0,0 +1,6 @@ +# +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 +# + +software.amazon.smithy.python.codegen.PythonCodegenPlugin diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/resources/META-INF/services/software.amazon.smithy.python.codegen.integration.PythonIntegration b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/resources/META-INF/services/software.amazon.smithy.python.codegen.integration.PythonIntegration new file mode 100644 index 0000000000..c8d0a31a28 --- /dev/null +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/resources/META-INF/services/software.amazon.smithy.python.codegen.integration.PythonIntegration @@ -0,0 +1,6 @@ +# +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 +# + +software.amazon.smithy.python.codegen.integration.DafnyTestIntegration diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/resources/software/amazon/smithy/python/codegen/reserved-class-names.txt b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/resources/software/amazon/smithy/python/codegen/reserved-class-names.txt new file mode 100644 index 0000000000..a0a78e1853 --- /dev/null +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/resources/software/amazon/smithy/python/codegen/reserved-class-names.txt @@ -0,0 +1,15 @@ +# +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 +# +# Python reserved words for class names +# +# Most of python's reserved words are lower-case, so there isn't much +# here. Furthermore, import aliases can resolve any other conflicts +# with non-reserved builtins or other conflicting classes. +# +# A full list of reserved words can be found here: +# https://docs.python.org/3/reference/lexical_analysis.html#keywords +True +False +None diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/resources/software/amazon/smithy/python/codegen/reserved-member-names.txt b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/resources/software/amazon/smithy/python/codegen/reserved-member-names.txt new file mode 100644 index 0000000000..1831fb341f --- /dev/null +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/resources/software/amazon/smithy/python/codegen/reserved-member-names.txt @@ -0,0 +1,83 @@ +# +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 +# +# Python reserved words for members. + +# The following are reserved words that can't be used as identifiers at all. +# For example, the following would produce a syntax error: +# +# class Foo: +# pass: int +# +# A full list of these can be found here: +# +# https://docs.python.org/3/reference/lexical_analysis.html#keywords +# +# Note that None, True, and False aren't here - members are always lower +# cased, so they'll never match here. Those are in the clas names reserve +# list. +and +as +assert +async +await +break +class +continue +def +del +elif +else +except +finally +for +from +global +if +import +in +is +lambda +nonlocal +not +or +pass +raise +return +try +while +with +yield + +# The following aren't reserved words, but are built-in types / functions that +# would break if you ever tried to refer to the type again in scope. For +# example: +# +# class Foo: +# str: str +# +# def __init__(self, str: str): +# pass +# +# That would have an exception in the definition of __init__ since when you use +# `str` as the type after you've defined `str` in scope, it thinks you're +# referencing `Foo.str` rather than the built-in type (or a type at all). +# +# A listing of these types can be found here: +# https://docs.python.org/3/library/stdtypes.html +# +# Note though that we only need to escape the types we use. +bool +bytes +bytearray +dict +float +int +list +str + +# For the exact same reason as above, these are names of common types +# that are likely imported in the generated code (e.g. datetime) +# We only escape the types we use. +datetime diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/settings.gradle.kts b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/settings.gradle.kts new file mode 100644 index 0000000000..94d7fce156 --- /dev/null +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/settings.gradle.kts @@ -0,0 +1,25 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +rootProject.name = "smithy-dafny-python" +include(":smithy-python-codegen") +project(":smithy-python-codegen").projectDir = file("smithy-python/codegen/smithy-python-codegen") + +pluginManagement { + repositories { + mavenLocal() + gradlePluginPortal() + } +} diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/smithy-build.json b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/smithy-build.json new file mode 100644 index 0000000000..27f56ad764 --- /dev/null +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/smithy-build.json @@ -0,0 +1,14 @@ +{ + "version": "1.0", + "outputDirectory": "runtimes/python", + "sources": ["${MODEL_DIR}"], + "plugins": { + "python-client-codegen": { + "service": "simple.types.boolean#SimpleTypesBoolean", + "module": "simple_boolean", + "moduleVersion": "0.0.1", + "protocol": "aws.polymorph#localService" + } + }, + "protocol": "aws.polymorph#localService" +} diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/smithy-python b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/smithy-python new file mode 160000 index 0000000000..b7909d2997 --- /dev/null +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/smithy-python @@ -0,0 +1 @@ +Subproject commit b7909d2997053fd4a3b69b68f149e6a575466ee1 From c7a568850e2c7dc322ee54a651383f881ae646c6 Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Fri, 17 Feb 2023 15:59:31 -0800 Subject: [PATCH 005/673] add types for completeness since these are benerated --- .../Model/SimpleDependenciesTypes.dfy | 480 ++++++++++++++++++ 1 file changed, 480 insertions(+) create mode 100644 TestModels/Dependencies/Model/SimpleDependenciesTypes.dfy diff --git a/TestModels/Dependencies/Model/SimpleDependenciesTypes.dfy b/TestModels/Dependencies/Model/SimpleDependenciesTypes.dfy new file mode 100644 index 0000000000..ac0a788c62 --- /dev/null +++ b/TestModels/Dependencies/Model/SimpleDependenciesTypes.dfy @@ -0,0 +1,480 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 +// Do not modify this file. This file is machine generated, and any changes to it will be overwritten. +include "../../dafny-dependencies/StandardLibrary/src/Index.dfy" + include "../../Constraints/src/Index.dfy" + include "../../Extendable/src/Index.dfy" + include "../../Resource/src/Index.dfy" + module {:extern "Dafny.Simple.Dependencies.Types" } SimpleDependenciesTypes + { + import opened Wrappers + import opened StandardLibrary.UInt + import opened UTF8 + import SimpleConstraintsTypes + import SimpleExtendableResourcesTypes + import SimpleResourcesTypes + // Generic helpers for verification of mock/unit tests. + datatype DafnyCallEvent = DafnyCallEvent(input: I, output: O) + + // Begin Generated Types + + class ISimpleDependenciesClientCallHistory { + ghost constructor() { + GetSimpleResource := []; + UseSimpleResource := []; + UseLocalExtendableResource := []; + LocalExtendableResourceAlwaysError := []; + LocalExtendableResourceAlwaysMultipleErrors := []; + LocalExtendableResourceAlwaysNativeError := []; +} + ghost var GetSimpleResource: seq>> + ghost var UseSimpleResource: seq>> + ghost var UseLocalExtendableResource: seq>> + ghost var LocalExtendableResourceAlwaysError: seq>> + ghost var LocalExtendableResourceAlwaysMultipleErrors: seq>> + ghost var LocalExtendableResourceAlwaysNativeError: seq>> +} + trait {:termination false} ISimpleDependenciesClient + { + // Helper to define any additional modifies/reads clauses. + // If your operations need to mutate state, + // add it in your constructor function: + // Modifies := {your, fields, here, History}; + // If you do not need to mutate anything: +// Modifies := {History}; + + ghost const Modifies: set + // For an unassigned field defined in a trait, + // Dafny can only assign a value in the constructor. + // This means that for Dafny to reason about this value, + // it needs some way to know (an invariant), + // about the state of the object. + // This builds on the Valid/Repr paradigm + // To make this kind requires safe to add + // to methods called from unverified code, + // the predicate MUST NOT take any arguments. + // This means that the correctness of this requires + // MUST only be evaluated by the class itself. + // If you require any additional mutation, + // then you MUST ensure everything you need in ValidState. + // You MUST also ensure ValidState in your constructor. + predicate ValidState() + ensures ValidState() ==> History in Modifies + ghost const History: ISimpleDependenciesClientCallHistory + predicate GetSimpleResourceEnsuresPublicly(input: SimpleResourcesTypes.GetResourcesInput , output: Result) + // The public method to be called by library consumers + method GetSimpleResource ( input: SimpleResourcesTypes.GetResourcesInput ) + returns (output: Result) + requires + && ValidState() + modifies Modifies - {History} , + History`GetSimpleResource + // Dafny will skip type parameters when generating a default decreases clause. + decreases Modifies - {History} + ensures + && ValidState() + && ( output.Success? ==> + && output.value.output.ValidState() + && output.value.output.Modifies !! {History} + && fresh(output.value.output) + && fresh ( output.value.output.Modifies - Modifies - {History} ) ) + ensures GetSimpleResourceEnsuresPublicly(input, output) + ensures History.GetSimpleResource == old(History.GetSimpleResource) + [DafnyCallEvent(input, output)] + + predicate UseSimpleResourceEnsuresPublicly(input: UseSimpleResourceInput , output: Result) + // The public method to be called by library consumers + method UseSimpleResource ( input: UseSimpleResourceInput ) + returns (output: Result) + requires + && ValidState() + && input.value.ValidState() + && input.value.Modifies !! {History} + modifies Modifies - {History} , + input.value.Modifies , + History`UseSimpleResource + // Dafny will skip type parameters when generating a default decreases clause. + decreases Modifies - {History} , + input.value.Modifies + ensures + && ValidState() + ensures UseSimpleResourceEnsuresPublicly(input, output) + ensures History.UseSimpleResource == old(History.UseSimpleResource) + [DafnyCallEvent(input, output)] + + predicate UseLocalExtendableResourceEnsuresPublicly(input: SimpleExtendableResourcesTypes.GetExtendableResourceDataInput , output: Result) + // The public method to be called by library consumers + method UseLocalExtendableResource ( input: SimpleExtendableResourcesTypes.GetExtendableResourceDataInput ) + returns (output: Result) + requires + && ValidState() + modifies Modifies - {History} , + History`UseLocalExtendableResource + // Dafny will skip type parameters when generating a default decreases clause. + decreases Modifies - {History} + ensures + && ValidState() + ensures UseLocalExtendableResourceEnsuresPublicly(input, output) + ensures History.UseLocalExtendableResource == old(History.UseLocalExtendableResource) + [DafnyCallEvent(input, output)] + + predicate LocalExtendableResourceAlwaysErrorEnsuresPublicly(input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput , output: Result) + // The public method to be called by library consumers + method LocalExtendableResourceAlwaysError ( input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput ) + returns (output: Result) + requires + && ValidState() + modifies Modifies - {History} , + History`LocalExtendableResourceAlwaysError + // Dafny will skip type parameters when generating a default decreases clause. + decreases Modifies - {History} + ensures + && ValidState() + ensures LocalExtendableResourceAlwaysErrorEnsuresPublicly(input, output) + ensures History.LocalExtendableResourceAlwaysError == old(History.LocalExtendableResourceAlwaysError) + [DafnyCallEvent(input, output)] + + predicate LocalExtendableResourceAlwaysMultipleErrorsEnsuresPublicly(input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput , output: Result) + // The public method to be called by library consumers + method LocalExtendableResourceAlwaysMultipleErrors ( input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput ) + returns (output: Result) + requires + && ValidState() + modifies Modifies - {History} , + History`LocalExtendableResourceAlwaysMultipleErrors + // Dafny will skip type parameters when generating a default decreases clause. + decreases Modifies - {History} + ensures + && ValidState() + ensures LocalExtendableResourceAlwaysMultipleErrorsEnsuresPublicly(input, output) + ensures History.LocalExtendableResourceAlwaysMultipleErrors == old(History.LocalExtendableResourceAlwaysMultipleErrors) + [DafnyCallEvent(input, output)] + + predicate LocalExtendableResourceAlwaysNativeErrorEnsuresPublicly(input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput , output: Result) + // The public method to be called by library consumers + method LocalExtendableResourceAlwaysNativeError ( input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput ) + returns (output: Result) + requires + && ValidState() + modifies Modifies - {History} , + History`LocalExtendableResourceAlwaysNativeError + // Dafny will skip type parameters when generating a default decreases clause. + decreases Modifies - {History} + ensures + && ValidState() + ensures LocalExtendableResourceAlwaysNativeErrorEnsuresPublicly(input, output) + ensures History.LocalExtendableResourceAlwaysNativeError == old(History.LocalExtendableResourceAlwaysNativeError) + [DafnyCallEvent(input, output)] + +} + datatype SimpleDependenciesConfig = | SimpleDependenciesConfig ( + nameonly simpleResourcesConfig: Option , + nameonly extendableResourceReference: Option , + nameonly specialString: Option + ) + datatype UseSimpleResourceInput = | UseSimpleResourceInput ( + nameonly value: SimpleResourcesTypes.ISimpleResource , + nameonly input: SimpleResourcesTypes.GetResourceDataInput + ) + datatype Error = + // Local Error structures are listed here + + // Any dependent models are listed here + | SimpleConstraints(SimpleConstraints: SimpleConstraintsTypes.Error) + | SimpleExtendableResources(SimpleExtendableResources: SimpleExtendableResourcesTypes.Error) + | SimpleResources(SimpleResources: SimpleResourcesTypes.Error) + // The Collection error is used to collect several errors together + // This is useful when composing OR logic. + // Consider the following method: + // + // method FN(n:I) + // returns (res: Result) + // ensures A(I).Success? ==> res.Success? + // ensures B(I).Success? ==> res.Success? + // ensures A(I).Failure? && B(I).Failure? ==> res.Failure? + // + // If either A || B is successful then FN is successful. + // And if A && B fail then FN will fail. + // But what information should FN transmit back to the caller? + // While it may be correct to hide these details from the caller, + // this can not be the globally correct option. + // Suppose that A and B can be blocked by different ACLs, + // and that their representation of I is only eventually consistent. + // How can the caller distinguish, at a minimum for logging, + // the difference between the four failure modes? + // || (!access(A(I)) && !access(B(I))) + // || (!exit(A(I)) && !exit(B(I))) + // || (!access(A(I)) && !exit(B(I))) + // || (!exit(A(I)) && !access(B(I))) + | CollectionOfErrors(list: seq) + // The Opaque error, used for native, extern, wrapped or unknown errors + | Opaque(obj: object) + type OpaqueError = e: Error | e.Opaque? witness * +} + abstract module AbstractSimpleDependenciesService + { + import opened Wrappers + import opened StandardLibrary.UInt + import opened UTF8 + import opened Types = SimpleDependenciesTypes + import Operations : AbstractSimpleDependenciesOperations + function method DefaultSimpleDependenciesConfig(): SimpleDependenciesConfig + method SimpleDependencies(config: SimpleDependenciesConfig := DefaultSimpleDependenciesConfig()) + returns (res: Result) + requires config.extendableResourceReference.Some? ==> config.extendableResourceReference.value.ValidState() + modifies if config.extendableResourceReference.Some? then config.extendableResourceReference.value.Modifies else {} + ensures res.Success? ==> + && fresh(res.value) + && fresh(res.value.History) + && fresh(res.value.Modifies - Operations.ModifiesInternalConfig(res.value.config)) + && res.value.ValidState() + ensures !(config.extendableResourceReference.Some?) && res.Success? ==> fresh(Operations.ModifiesInternalConfig(res.value.config)) + class SimpleDependenciesClient extends ISimpleDependenciesClient + { + constructor(config: Operations.InternalConfig) + requires Operations.ValidInternalConfig?(config) + ensures + && ValidState() + && fresh(History) + && this.config == config + const config: Operations.InternalConfig + predicate ValidState() + ensures ValidState() ==> + && Operations.ValidInternalConfig?(config) + && History !in Operations.ModifiesInternalConfig(config) + && Modifies == Operations.ModifiesInternalConfig(config) + {History} + predicate GetSimpleResourceEnsuresPublicly(input: SimpleResourcesTypes.GetResourcesInput , output: Result) + {Operations.GetSimpleResourceEnsuresPublicly(input, output)} + // The public method to be called by library consumers + method GetSimpleResource ( input: SimpleResourcesTypes.GetResourcesInput ) + returns (output: Result) + requires + && ValidState() + modifies Modifies - {History}, + History`GetSimpleResource + // Dafny will skip type parameters when generating a default decreases clause. + decreases Modifies - {History} + ensures + && ValidState() + && ( output.Success? ==> + && output.value.output.ValidState() + && output.value.output.Modifies !! {History} + && fresh(output.value.output) + && fresh ( output.value.output.Modifies - Modifies - {History}) ) + ensures GetSimpleResourceEnsuresPublicly(input, output) + ensures History.GetSimpleResource == old(History.GetSimpleResource) + [DafnyCallEvent(input, output)] + { + output := Operations.GetSimpleResource(config, input); + History.GetSimpleResource := History.GetSimpleResource + [DafnyCallEvent(input, output)]; +} + + predicate UseSimpleResourceEnsuresPublicly(input: UseSimpleResourceInput , output: Result) + {Operations.UseSimpleResourceEnsuresPublicly(input, output)} + // The public method to be called by library consumers + method UseSimpleResource ( input: UseSimpleResourceInput ) + returns (output: Result) + requires + && ValidState() + && input.value.ValidState() + && input.value.Modifies !! {History} + modifies Modifies - {History} , + input.value.Modifies , + History`UseSimpleResource + // Dafny will skip type parameters when generating a default decreases clause. + decreases Modifies - {History} , + input.value.Modifies + ensures + && ValidState() + ensures UseSimpleResourceEnsuresPublicly(input, output) + ensures History.UseSimpleResource == old(History.UseSimpleResource) + [DafnyCallEvent(input, output)] + { + output := Operations.UseSimpleResource(config, input); + History.UseSimpleResource := History.UseSimpleResource + [DafnyCallEvent(input, output)]; +} + + predicate UseLocalExtendableResourceEnsuresPublicly(input: SimpleExtendableResourcesTypes.GetExtendableResourceDataInput , output: Result) + {Operations.UseLocalExtendableResourceEnsuresPublicly(input, output)} + // The public method to be called by library consumers + method UseLocalExtendableResource ( input: SimpleExtendableResourcesTypes.GetExtendableResourceDataInput ) + returns (output: Result) + requires + && ValidState() + modifies Modifies - {History} , + History`UseLocalExtendableResource + // Dafny will skip type parameters when generating a default decreases clause. + decreases Modifies - {History} + ensures + && ValidState() + ensures UseLocalExtendableResourceEnsuresPublicly(input, output) + ensures History.UseLocalExtendableResource == old(History.UseLocalExtendableResource) + [DafnyCallEvent(input, output)] + { + output := Operations.UseLocalExtendableResource(config, input); + History.UseLocalExtendableResource := History.UseLocalExtendableResource + [DafnyCallEvent(input, output)]; +} + + predicate LocalExtendableResourceAlwaysErrorEnsuresPublicly(input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput , output: Result) + {Operations.LocalExtendableResourceAlwaysErrorEnsuresPublicly(input, output)} + // The public method to be called by library consumers + method LocalExtendableResourceAlwaysError ( input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput ) + returns (output: Result) + requires + && ValidState() + modifies Modifies - {History} , + History`LocalExtendableResourceAlwaysError + // Dafny will skip type parameters when generating a default decreases clause. + decreases Modifies - {History} + ensures + && ValidState() + ensures LocalExtendableResourceAlwaysErrorEnsuresPublicly(input, output) + ensures History.LocalExtendableResourceAlwaysError == old(History.LocalExtendableResourceAlwaysError) + [DafnyCallEvent(input, output)] + { + output := Operations.LocalExtendableResourceAlwaysError(config, input); + History.LocalExtendableResourceAlwaysError := History.LocalExtendableResourceAlwaysError + [DafnyCallEvent(input, output)]; +} + + predicate LocalExtendableResourceAlwaysMultipleErrorsEnsuresPublicly(input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput , output: Result) + {Operations.LocalExtendableResourceAlwaysMultipleErrorsEnsuresPublicly(input, output)} + // The public method to be called by library consumers + method LocalExtendableResourceAlwaysMultipleErrors ( input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput ) + returns (output: Result) + requires + && ValidState() + modifies Modifies - {History} , + History`LocalExtendableResourceAlwaysMultipleErrors + // Dafny will skip type parameters when generating a default decreases clause. + decreases Modifies - {History} + ensures + && ValidState() + ensures LocalExtendableResourceAlwaysMultipleErrorsEnsuresPublicly(input, output) + ensures History.LocalExtendableResourceAlwaysMultipleErrors == old(History.LocalExtendableResourceAlwaysMultipleErrors) + [DafnyCallEvent(input, output)] + { + output := Operations.LocalExtendableResourceAlwaysMultipleErrors(config, input); + History.LocalExtendableResourceAlwaysMultipleErrors := History.LocalExtendableResourceAlwaysMultipleErrors + [DafnyCallEvent(input, output)]; +} + + predicate LocalExtendableResourceAlwaysNativeErrorEnsuresPublicly(input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput , output: Result) + {Operations.LocalExtendableResourceAlwaysNativeErrorEnsuresPublicly(input, output)} + // The public method to be called by library consumers + method LocalExtendableResourceAlwaysNativeError ( input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput ) + returns (output: Result) + requires + && ValidState() + modifies Modifies - {History} , + History`LocalExtendableResourceAlwaysNativeError + // Dafny will skip type parameters when generating a default decreases clause. + decreases Modifies - {History} + ensures + && ValidState() + ensures LocalExtendableResourceAlwaysNativeErrorEnsuresPublicly(input, output) + ensures History.LocalExtendableResourceAlwaysNativeError == old(History.LocalExtendableResourceAlwaysNativeError) + [DafnyCallEvent(input, output)] + { + output := Operations.LocalExtendableResourceAlwaysNativeError(config, input); + History.LocalExtendableResourceAlwaysNativeError := History.LocalExtendableResourceAlwaysNativeError + [DafnyCallEvent(input, output)]; +} + +} +} + abstract module AbstractSimpleDependenciesOperations { + import opened Wrappers + import opened StandardLibrary.UInt + import opened UTF8 + import opened Types = SimpleDependenciesTypes + type InternalConfig + predicate ValidInternalConfig?(config: InternalConfig) + function ModifiesInternalConfig(config: InternalConfig): set + predicate GetSimpleResourceEnsuresPublicly(input: SimpleResourcesTypes.GetResourcesInput , output: Result) + // The private method to be refined by the library developer + + + method GetSimpleResource ( config: InternalConfig , input: SimpleResourcesTypes.GetResourcesInput ) + returns (output: Result) + requires + && ValidInternalConfig?(config) + modifies ModifiesInternalConfig(config) + // Dafny will skip type parameters when generating a default decreases clause. + decreases ModifiesInternalConfig(config) + ensures + && ValidInternalConfig?(config) + && ( output.Success? ==> + && output.value.output.ValidState() + && fresh(output.value.output) + && fresh ( output.value.output.Modifies - ModifiesInternalConfig(config) ) ) + ensures GetSimpleResourceEnsuresPublicly(input, output) + + + predicate UseSimpleResourceEnsuresPublicly(input: UseSimpleResourceInput , output: Result) + // The private method to be refined by the library developer + + + method UseSimpleResource ( config: InternalConfig , input: UseSimpleResourceInput ) + returns (output: Result) + requires + && ValidInternalConfig?(config) + && input.value.ValidState() + modifies ModifiesInternalConfig(config) , + input.value.Modifies + // Dafny will skip type parameters when generating a default decreases clause. + decreases ModifiesInternalConfig(config) , + input.value.Modifies + ensures + && ValidInternalConfig?(config) + ensures UseSimpleResourceEnsuresPublicly(input, output) + + + predicate UseLocalExtendableResourceEnsuresPublicly(input: SimpleExtendableResourcesTypes.GetExtendableResourceDataInput , output: Result) + // The private method to be refined by the library developer + + + method UseLocalExtendableResource ( config: InternalConfig , input: SimpleExtendableResourcesTypes.GetExtendableResourceDataInput ) + returns (output: Result) + requires + && ValidInternalConfig?(config) + modifies ModifiesInternalConfig(config) + // Dafny will skip type parameters when generating a default decreases clause. + decreases ModifiesInternalConfig(config) + ensures + && ValidInternalConfig?(config) + ensures UseLocalExtendableResourceEnsuresPublicly(input, output) + + + predicate LocalExtendableResourceAlwaysErrorEnsuresPublicly(input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput , output: Result) + // The private method to be refined by the library developer + + + method LocalExtendableResourceAlwaysError ( config: InternalConfig , input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput ) + returns (output: Result) + requires + && ValidInternalConfig?(config) + modifies ModifiesInternalConfig(config) + // Dafny will skip type parameters when generating a default decreases clause. + decreases ModifiesInternalConfig(config) + ensures + && ValidInternalConfig?(config) + ensures LocalExtendableResourceAlwaysErrorEnsuresPublicly(input, output) + + + predicate LocalExtendableResourceAlwaysMultipleErrorsEnsuresPublicly(input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput , output: Result) + // The private method to be refined by the library developer + + + method LocalExtendableResourceAlwaysMultipleErrors ( config: InternalConfig , input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput ) + returns (output: Result) + requires + && ValidInternalConfig?(config) + modifies ModifiesInternalConfig(config) + // Dafny will skip type parameters when generating a default decreases clause. + decreases ModifiesInternalConfig(config) + ensures + && ValidInternalConfig?(config) + ensures LocalExtendableResourceAlwaysMultipleErrorsEnsuresPublicly(input, output) + + + predicate LocalExtendableResourceAlwaysNativeErrorEnsuresPublicly(input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput , output: Result) + // The private method to be refined by the library developer + + + method LocalExtendableResourceAlwaysNativeError ( config: InternalConfig , input: SimpleExtendableResourcesTypes.GetExtendableResourceErrorsInput ) + returns (output: Result) + requires + && ValidInternalConfig?(config) + modifies ModifiesInternalConfig(config) + // Dafny will skip type parameters when generating a default decreases clause. + decreases ModifiesInternalConfig(config) + ensures + && ValidInternalConfig?(config) + ensures LocalExtendableResourceAlwaysNativeErrorEnsuresPublicly(input, output) +} From bac886a99806e4bbc07d8ce5c37c26fb48de2d72 Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Tue, 4 Apr 2023 12:17:47 -0700 Subject: [PATCH 006/673] building from TestModel dir with local maven publishing --- .../SimpleBoolean/build.gradle.kts | 19 +---- .../SimpleBoolean/smithy-build.json | 16 ++++ .../dafny/python/codegen/build.gradle.kts | 61 ++++++--------- .../dafny/python/codegen/gradle.properties | 1 - .../python/codegen/model/SimpleBoolean.smithy | 27 ------- .../dafny/python/codegen/model/traits.smithy | 77 ------------------- .../dafny/python/codegen/settings.gradle.kts | 2 - .../dafny/python/codegen/smithy-build.json | 14 ---- .../smithy/dafny/python/codegen/smithy-python | 1 - .../dafny/python}/DafnyProtocolGenerator.java | 31 +------- .../dafny/python}/DafnyTestIntegration.java | 6 +- ...are.amazon.smithy.build.SmithyBuildPlugin} | 2 +- ...hon.codegen.integration.PythonIntegration} | 2 +- .../python/codegen/reserved-class-names.txt | 0 .../python/codegen/reserved-member-names.txt | 0 15 files changed, 54 insertions(+), 205 deletions(-) create mode 100644 TestModels/SimpleTypes/SimpleBoolean/smithy-build.json delete mode 100644 codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/model/SimpleBoolean.smithy delete mode 100644 codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/model/traits.smithy delete mode 100644 codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/smithy-build.json delete mode 160000 codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/smithy-python rename codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/{ => src/main/java/software/amazon/smithy/dafny/python}/DafnyProtocolGenerator.java (93%) rename codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/{ => src/main/java/software/amazon/smithy/dafny/python}/DafnyTestIntegration.java (94%) rename codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/{resources/META-INF/services/software.amazon.smithy.python.codegen.integration.PythonIntegration => src/main/resources/META-INF/services/software.amazon.smithy.build.SmithyBuildPlugin} (61%) rename codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/{resources/META-INF/services/software.amazon.smithy.build.SmithyBuildPlugin => src/main/resources/META-INF/services/software.amazon.smithy.python.codegen.integration.PythonIntegration} (65%) rename codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/{ => src/main}/resources/software/amazon/smithy/python/codegen/reserved-class-names.txt (100%) rename codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/{ => src/main}/resources/software/amazon/smithy/python/codegen/reserved-member-names.txt (100%) diff --git a/TestModels/SimpleTypes/SimpleBoolean/build.gradle.kts b/TestModels/SimpleTypes/SimpleBoolean/build.gradle.kts index eaf5ede2aa..e65b17dc04 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/build.gradle.kts +++ b/TestModels/SimpleTypes/SimpleBoolean/build.gradle.kts @@ -2,26 +2,13 @@ plugins { id("software.amazon.smithy").version("0.6.0") } -buildscript { - repositories { - mavenLocal() - mavenCentral() - } - dependencies { - classpath("software.amazon.smithy:smithy-aws-traits:1.29.0") - } -} - repositories { mavenLocal() mavenCentral() } dependencies { - implementation("software.amazon.smithy:smithy-model:1.29.0") - - // Any dependencies that the projected model needs must be (re)declared - // here. For example, let's assume that the smithy-aws-traits package is - // needed in the projected model too. - implementation("software.amazon.smithy:smithy-aws-traits:1.29.0") + implementation("software.amazon.smithy:smithy-model:1.28.1") + implementation("software.amazon.smithy:smithy-aws-traits:1.28.1") + implementation("software.amazon.smithy.dafny.python:smithy-dafny-python:0.1.0") } \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/smithy-build.json b/TestModels/SimpleTypes/SimpleBoolean/smithy-build.json new file mode 100644 index 0000000000..532ee3c70e --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/smithy-build.json @@ -0,0 +1,16 @@ +{ + "version": "1.0", + "outputDirectory": "runtimes/python", + "projections": { + "simple-boolean": { + "plugins": { + "python-client-codegen": { + "service": "simple.types.boolean#SimpleBoolean", + "module": "simple_boolean", + "moduleVersion": "0.0.1", + "protocolDefinition": "aws.polymorph#localService" + } + } + } + } +} diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/build.gradle.kts b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/build.gradle.kts index 8bacf16e4a..fb06cbd6ee 100644 --- a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/build.gradle.kts +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/build.gradle.kts @@ -1,49 +1,38 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"). - * You may not use this file except in compliance with the License. - * A copy of the License is located at - * - * http://aws.amazon.com/apache2.0 - * - * or in the "license" file accompanying this file. This file is distributed - * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either - * express or implied. See the License for the specific language governing - * permissions and limitations under the License. - */ +plugins { + id("software.amazon.smithy").version("0.6.0") + `maven-publish` +} + +allprojects { + group = "software.amazon.smithy.dafny.python" + version = "0.1.0" +} +description = "Generates Python code from Smithy models" extra["displayName"] = "Smithy :: Dafny :: Python :: Codegen" extra["moduleName"] = "software.amazon.smithy.dafny.python.codegen" -tasks["jar"].enabled = false - val smithyVersion: String by project -buildscript { - val smithyVersion: String by project - - repositories { - mavenLocal() - mavenCentral() - } - dependencies { - "classpath"("software.amazon.smithy:smithy-cli:$smithyVersion") - } -} - -plugins { - val smithyGradleVersion: String by project - id("software.amazon.smithy").version(smithyGradleVersion) -} - repositories { mavenLocal() mavenCentral() } dependencies { - implementation(project(":smithy-python-codegen")) - implementation("software.amazon.smithy:smithy-waiters:$smithyVersion") - implementation("software.amazon.smithy:smithy-protocol-test-traits:$smithyVersion") + implementation("software.amazon.smithy:smithy-model:1.28.1") + implementation("software.amazon.smithy:smithy-aws-traits:1.28.1") + implementation("software.amazon.smithy.python:smithy-python-codegen:0.1.0") } + +publishing { + publications { + create("maven") { + groupId = "software.amazon.smithy.dafny.python" + artifactId = "smithy-dafny-python" + version = "0.1.0" + + from(components["java"]) + } + } +} \ No newline at end of file diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/gradle.properties b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/gradle.properties index 0a78a30476..8fecd51371 100644 --- a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/gradle.properties +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/gradle.properties @@ -1,3 +1,2 @@ smithyVersion=[1.26.1,1.27.0[ smithyGradleVersion=0.6.0 -gnsp.disableApplyOnlyOnRootProjectEnforcement \ No newline at end of file diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/model/SimpleBoolean.smithy b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/model/SimpleBoolean.smithy deleted file mode 100644 index 785b4b4353..0000000000 --- a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/model/SimpleBoolean.smithy +++ /dev/null @@ -1,27 +0,0 @@ -namespace simple.types.boolean - -@aws.polymorph#localService( - sdkId: "SimpleBoolean", - config: SimpleBooleanConfig, -) -service SimpleTypesBoolean { - version: "2021-11-01", - resources: [], - operations: [ GetBoolean ], - errors: [], -} - -structure SimpleBooleanConfig {} - -operation GetBoolean { - input: GetBooleanInput, - output: GetBooleanOutput, -} - -structure GetBooleanInput { - value: Boolean -} - -structure GetBooleanOutput { - value: Boolean -} \ No newline at end of file diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/model/traits.smithy b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/model/traits.smithy deleted file mode 100644 index 4cc9d57efa..0000000000 --- a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/model/traits.smithy +++ /dev/null @@ -1,77 +0,0 @@ -namespace aws.polymorph - -// Smithy doesn't allow passing resources or services as members of structures, -// since it doesn't make sense in a client-server world to pass these over the -// wire. However, in our world we do want to be able to pass around references -// to things like Keyrings, so we create a new trait which indicates that -// a target shape is not actually a structure but instead an opaque reference -// to a service or resource. -@trait(selector: "structure") -structure reference { - // Can refer to either services or resources - // @idRef(failWhenMissing: true, selector: "structure") - service: String, - // @idRef(failWhenMissing: true, selector: "service") - resource: String -} - - -// A trait for explicitly modeling the configuration options that should be -// available in the generated methods for creating clients. -@trait(selector: "service") -structure localService { - // @required - sdkId: String, - // @required - // @idRef(failWhenMissing: true, selector: "structure") - config: String, -} - -// Trait indicates that the member of the given structure MUST be expanded. -// To be used when we want operations to accept -// or return bare values rather than a nested structure. -// Code generation SHOULD throw an error if this is applied to a structure -// that is not used as input or output to an operation. -// At this time, -// Code generation MUST throw an error if this is applied to a structure -// with more than or less than one member. -// i.e: The structure MUST have one and only one member. -// At this time, -// the sole member's requirement status MUST NOT be determined by -// the positional trait. -// TODO: naming -@trait(selector: "structure") -structure positional {} - -// Indicates that a string is represented as a sequence of UTF-8 encoded bytes -// in Dafny, rather than the default sequence of UTF-16 chars. -// -// This is a workaround that should be removed when Dafny's string definition -// is improved: -@trait(selector: "string") -structure dafnyUtf8Bytes {} - -// A trait indicating that the resource may be implemented by native code (instead of Dafny code). -// i.e.: Users may author their own classes that implement and extend this resource. -// Polymorph will generate and utilize NativeWrappers for these resources. -@trait(selector: "resource") -structure extendable {} - -// A trait indicating that a structure is a members of a union -// and MUST NOT be used independently of the union. -// This is syntactic sugar for -// union Foo { -// Bar: structure Bar { baz: String } -// } -// -// It is used like this -// union Foo { -// Bar: Bar -// } -// structure Bar { baz: String } -// This is especilay useful in Dafny. -// Because it results in a single datatype -// whos constructors are the member structures. -// datatypes Foo = Bar( baz: String ) -@trait(selector: "structure") -structure datatypeUnion {} diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/settings.gradle.kts b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/settings.gradle.kts index 94d7fce156..a189c77236 100644 --- a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/settings.gradle.kts +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/settings.gradle.kts @@ -14,8 +14,6 @@ */ rootProject.name = "smithy-dafny-python" -include(":smithy-python-codegen") -project(":smithy-python-codegen").projectDir = file("smithy-python/codegen/smithy-python-codegen") pluginManagement { repositories { diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/smithy-build.json b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/smithy-build.json deleted file mode 100644 index 27f56ad764..0000000000 --- a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/smithy-build.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "version": "1.0", - "outputDirectory": "runtimes/python", - "sources": ["${MODEL_DIR}"], - "plugins": { - "python-client-codegen": { - "service": "simple.types.boolean#SimpleTypesBoolean", - "module": "simple_boolean", - "moduleVersion": "0.0.1", - "protocol": "aws.polymorph#localService" - } - }, - "protocol": "aws.polymorph#localService" -} diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/smithy-python b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/smithy-python deleted file mode 160000 index b7909d2997..0000000000 --- a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/smithy-python +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b7909d2997053fd4a3b69b68f149e6a575466ee1 diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/DafnyProtocolGenerator.java b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyProtocolGenerator.java similarity index 93% rename from codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/DafnyProtocolGenerator.java rename to codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyProtocolGenerator.java index 0fd50e03df..131565fcab 100644 --- a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/DafnyProtocolGenerator.java +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyProtocolGenerator.java @@ -1,4 +1,4 @@ -/* +package software.amazon.smithy.dafny.python;/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). @@ -13,8 +13,6 @@ * permissions and limitations under the License. */ -package software.amazon.smithy.python.codegen.integration; - import static java.lang.String.format; import static software.amazon.smithy.model.knowledge.HttpBinding.Location.HEADER; @@ -54,6 +52,7 @@ import software.amazon.smithy.python.codegen.GenerationContext; import software.amazon.smithy.python.codegen.PythonWriter; import software.amazon.smithy.python.codegen.SmithyPythonDependency; +import software.amazon.smithy.python.codegen.integration.ProtocolGenerator; import software.amazon.smithy.utils.CodeSection; import software.amazon.smithy.utils.SmithyUnstableApi; /* @@ -373,21 +372,7 @@ private String floatShapes() { @Override public String timestampShape(TimestampShape shape) { - var httpIndex = HttpBindingIndex.of(context.model()); - var format = switch (bindingType) { - case HEADER -> httpIndex.determineTimestampFormat(member, bindingType, Format.HTTP_DATE); - case LABEL -> httpIndex.determineTimestampFormat(member, bindingType, defaultTimestampFormat); - case QUERY -> httpIndex.determineTimestampFormat(member, bindingType, Format.DATE_TIME); - default -> - throw new CodegenException("Unexpected named member shape binding location `" + bindingType + "`"); - }; - - var result = HttpProtocolGeneratorUtils.getTimestampInputParam( - context, writer, dataSource, member, format); - if (format == Format.EPOCH_SECONDS) { - result = format("str(%s)", result); - } - return result; + return "timestampshape"; } } @@ -541,15 +526,7 @@ public String stringShape(StringShape shape) { @Override public String timestampShape(TimestampShape shape) { - HttpBindingIndex httpIndex = HttpBindingIndex.of(context.model()); - Format format = httpIndex.determineTimestampFormat(member, bindingType, defaultTimestampFormat); - var source = dataSource; - if (format == Format.EPOCH_SECONDS) { - writer.addDependency(SmithyPythonDependency.SMITHY_PYTHON); - writer.addImport("smithy_python.utils", "strict_parse_float"); - source = "strict_parse_float(" + dataSource + ")"; - } - return HttpProtocolGeneratorUtils.getTimestampOutputParam(writer, source, member, format); + return "timestampshape"; } @Override diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/DafnyTestIntegration.java b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyTestIntegration.java similarity index 94% rename from codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/DafnyTestIntegration.java rename to codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyTestIntegration.java index 428d1f11a3..0857e0b243 100644 --- a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/DafnyTestIntegration.java +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyTestIntegration.java @@ -13,7 +13,7 @@ * permissions and limitations under the License. */ -package software.amazon.smithy.python.codegen.integration; +package software.amazon.smithy.dafny.python; import java.util.Collections; import java.util.List; @@ -27,7 +27,8 @@ import software.amazon.smithy.python.codegen.GenerationContext; import software.amazon.smithy.python.codegen.PythonDependency; import software.amazon.smithy.python.codegen.SmithyPythonDependency; - +import software.amazon.smithy.python.codegen.integration.ProtocolGenerator; +import software.amazon.smithy.python.codegen.integration.RuntimeClientPlugin; /** * Integration that registers {@link RestJsonProtocolGenerator}. @@ -88,6 +89,7 @@ private static Symbol createHttpSymbol(String symbolName) { @Override public List getProtocolGenerators() { + return Collections.singletonList(new DafnyProtocolGenerator() { @Override diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/resources/META-INF/services/software.amazon.smithy.python.codegen.integration.PythonIntegration b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/resources/META-INF/services/software.amazon.smithy.build.SmithyBuildPlugin similarity index 61% rename from codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/resources/META-INF/services/software.amazon.smithy.python.codegen.integration.PythonIntegration rename to codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/resources/META-INF/services/software.amazon.smithy.build.SmithyBuildPlugin index c8d0a31a28..9df651510d 100644 --- a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/resources/META-INF/services/software.amazon.smithy.python.codegen.integration.PythonIntegration +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/resources/META-INF/services/software.amazon.smithy.build.SmithyBuildPlugin @@ -3,4 +3,4 @@ # SPDX-License-Identifier: Apache-2.0 # -software.amazon.smithy.python.codegen.integration.DafnyTestIntegration +software.amazon.smithy.python.codegen.PythonClientCodegenPlugin diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/resources/META-INF/services/software.amazon.smithy.build.SmithyBuildPlugin b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/resources/META-INF/services/software.amazon.smithy.python.codegen.integration.PythonIntegration similarity index 65% rename from codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/resources/META-INF/services/software.amazon.smithy.build.SmithyBuildPlugin rename to codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/resources/META-INF/services/software.amazon.smithy.python.codegen.integration.PythonIntegration index 71cf01ed8c..8f4f600b51 100644 --- a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/resources/META-INF/services/software.amazon.smithy.build.SmithyBuildPlugin +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/resources/META-INF/services/software.amazon.smithy.python.codegen.integration.PythonIntegration @@ -3,4 +3,4 @@ # SPDX-License-Identifier: Apache-2.0 # -software.amazon.smithy.python.codegen.PythonCodegenPlugin +software.amazon.smithy.dafny.python.DafnyTestIntegration diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/resources/software/amazon/smithy/python/codegen/reserved-class-names.txt b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/resources/software/amazon/smithy/python/codegen/reserved-class-names.txt similarity index 100% rename from codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/resources/software/amazon/smithy/python/codegen/reserved-class-names.txt rename to codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/resources/software/amazon/smithy/python/codegen/reserved-class-names.txt diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/resources/software/amazon/smithy/python/codegen/reserved-member-names.txt b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/resources/software/amazon/smithy/python/codegen/reserved-member-names.txt similarity index 100% rename from codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/resources/software/amazon/smithy/python/codegen/reserved-member-names.txt rename to codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/resources/software/amazon/smithy/python/codegen/reserved-member-names.txt From fec65f3e82ac5d27a0fada65d2fd4721938a6d63 Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Wed, 5 Apr 2023 16:48:05 -0700 Subject: [PATCH 007/673] working --- .../SimpleBoolean/Model/traits.smithy | 1 + .../Simpletypes/Boolean/Types/__init__.py | 143 ++++++ .../__pycache__/__init__.cpython-311.pyc | Bin 0 -> 17095 bytes .../Simpletypes/Boolean/Wrapped/__init__.py | 22 + .../__pycache__/__init__.cpython-311.pyc | Bin 0 -> 1714 bytes .../Dafny/Simpletypes/Boolean/__init__.py | 58 +++ .../__pycache__/Wrapped.cpython-311.pyc | Bin 0 -> 1877 bytes .../__pycache__/__init__.cpython-311.pyc | Bin 0 -> 4195 bytes .../__pycache__/Boolean.cpython-311.pyc | Bin 0 -> 4060 bytes .../SimpleBooleanImplTest_Compile.py | 80 +++ .../SimpleBooleanImpl_Compile.py | 63 +++ .../StandardLibrary_Compile.py | 193 ++++++++ .../StandardLibrary_mUInt_Compile.py | 208 ++++++++ .../python/TestsFromDafny-py/System_.py | 20 + .../TestsFromDafny-py/TestsFromDafny.py | 15 + .../runtimes/python/TestsFromDafny-py/UTF8.py | 118 +++++ .../WrappedSimpleTypesBooleanTest_Compile.py | 46 ++ .../TestsFromDafny-py/Wrappers_Compile.py | 190 +++++++ ...pleBooleanImplTest_Compile.cpython-311.pyc | Bin 0 -> 6992 bytes .../SimpleBooleanImpl_Compile.cpython-311.pyc | Bin 0 -> 6188 bytes .../__pycache__/System_.cpython-311.pyc | Bin 0 -> 1361 bytes ...leTypesBooleanTest_Compile.cpython-311.pyc | Bin 0 -> 3651 bytes .../Wrappers_Compile.cpython-311.pyc | Bin 0 -> 14810 bytes .../__pycache__/_dafny.cpython-311.pyc | Bin 0 -> 34539 bytes .../__pycache__/module_.cpython-311.pyc | Bin 0 -> 6400 bytes .../python/TestsFromDafny-py/_dafny.py | 467 ++++++++++++++++++ .../python/TestsFromDafny-py/module_.py | 101 ++++ .../SimpleBoolean/smithy-build.json | 2 +- ...ware.amazon.smithy.build.SmithyBuildPlugin | 6 - ...thon.codegen.integration.PythonIntegration | 6 - .../python/codegen/reserved-class-names.txt | 15 - .../python/codegen/reserved-member-names.txt | 83 ---- 32 files changed, 1726 insertions(+), 111 deletions(-) create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Dafny/Simpletypes/Boolean/Types/__init__.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Dafny/Simpletypes/Boolean/Types/__pycache__/__init__.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Dafny/Simpletypes/Boolean/Wrapped/__init__.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Dafny/Simpletypes/Boolean/Wrapped/__pycache__/__init__.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Dafny/Simpletypes/Boolean/__init__.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Dafny/Simpletypes/Boolean/__pycache__/Wrapped.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Dafny/Simpletypes/Boolean/__pycache__/__init__.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Dafny/Simpletypes/__pycache__/Boolean.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/SimpleBooleanImplTest_Compile.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/SimpleBooleanImpl_Compile.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/StandardLibrary_Compile.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/StandardLibrary_mUInt_Compile.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/System_.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/TestsFromDafny.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/UTF8.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/WrappedSimpleTypesBooleanTest_Compile.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Wrappers_Compile.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/__pycache__/SimpleBooleanImplTest_Compile.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/__pycache__/SimpleBooleanImpl_Compile.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/__pycache__/System_.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/__pycache__/WrappedSimpleTypesBooleanTest_Compile.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/__pycache__/Wrappers_Compile.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/__pycache__/_dafny.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/__pycache__/module_.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/_dafny.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/module_.py delete mode 100644 codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/resources/META-INF/services/software.amazon.smithy.build.SmithyBuildPlugin delete mode 100644 codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/resources/META-INF/services/software.amazon.smithy.python.codegen.integration.PythonIntegration delete mode 100644 codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/resources/software/amazon/smithy/python/codegen/reserved-class-names.txt delete mode 100644 codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/resources/software/amazon/smithy/python/codegen/reserved-member-names.txt diff --git a/TestModels/SimpleTypes/SimpleBoolean/Model/traits.smithy b/TestModels/SimpleTypes/SimpleBoolean/Model/traits.smithy index 4cc9d57efa..5e3e7ca47e 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/Model/traits.smithy +++ b/TestModels/SimpleTypes/SimpleBoolean/Model/traits.smithy @@ -19,6 +19,7 @@ structure reference { // A trait for explicitly modeling the configuration options that should be // available in the generated methods for creating clients. @trait(selector: "service") +@protocolDefinition structure localService { // @required sdkId: String, diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Dafny/Simpletypes/Boolean/Types/__init__.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Dafny/Simpletypes/Boolean/Types/__init__.py new file mode 100644 index 0000000000..4cb491adbd --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Dafny/Simpletypes/Boolean/Types/__init__.py @@ -0,0 +1,143 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny +import System_ +import Wrappers_Compile +import Dafny.Simpletypes.Boolean + +class DafnyCallEvent: + @classmethod + def default(cls, default_I, default_O): + return lambda: DafnyCallEvent_DafnyCallEvent(default_I(), default_O()) + def __ne__(self, __o: object) -> bool: + return not self.__eq__(__o) + @property + def is_DafnyCallEvent(self) -> bool: + return isinstance(self, Dafny.Simpletypes.Boolean.Types.DafnyCallEvent_DafnyCallEvent) + +class DafnyCallEvent_DafnyCallEvent(DafnyCallEvent, NamedTuple('DafnyCallEvent', [('input', Any), ('output', Any)])): + def __dafnystr__(self) -> str: + return f'Dafny.Simpletypes.Boolean.Types_Compile.DafnyCallEvent.DafnyCallEvent({_dafny.string_of(self.input)}, {_dafny.string_of(self.output)})' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, Dafny.Simpletypes.Boolean.Types.DafnyCallEvent_DafnyCallEvent) and self.input == __o.input and self.output == __o.output + def __hash__(self) -> int: + return super().__hash__() + + +class GetBooleanInput: + @classmethod + def default(cls, ): + return lambda: GetBooleanInput_GetBooleanInput(Wrappers_Compile.Option_None.default()()) + def __ne__(self, __o: object) -> bool: + return not self.__eq__(__o) + @property + def is_GetBooleanInput(self) -> bool: + return isinstance(self, Dafny.Simpletypes.Boolean.Types.GetBooleanInput_GetBooleanInput) + +class GetBooleanInput_GetBooleanInput(GetBooleanInput, NamedTuple('GetBooleanInput', [('value', Any)])): + def __dafnystr__(self) -> str: + return f'Dafny.Simpletypes.Boolean.Types_Compile.GetBooleanInput.GetBooleanInput({_dafny.string_of(self.value)})' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, Dafny.Simpletypes.Boolean.Types.GetBooleanInput_GetBooleanInput) and self.value == __o.value + def __hash__(self) -> int: + return super().__hash__() + + +class GetBooleanOutput: + @classmethod + def default(cls, ): + return lambda: GetBooleanOutput_GetBooleanOutput(Wrappers_Compile.Option_None.default()()) + def __ne__(self, __o: object) -> bool: + return not self.__eq__(__o) + @property + def is_GetBooleanOutput(self) -> bool: + return isinstance(self, Dafny.Simpletypes.Boolean.Types.GetBooleanOutput_GetBooleanOutput) + +class GetBooleanOutput_GetBooleanOutput(GetBooleanOutput, NamedTuple('GetBooleanOutput', [('value', Any)])): + def __dafnystr__(self) -> str: + return f'Dafny.Simpletypes.Boolean.Types_Compile.GetBooleanOutput.GetBooleanOutput({_dafny.string_of(self.value)})' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, Dafny.Simpletypes.Boolean.Types.GetBooleanOutput_GetBooleanOutput) and self.value == __o.value + def __hash__(self) -> int: + return super().__hash__() + + +class ISimpleBooleanClientCallHistory: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "Dafny.Simpletypes.Boolean.Types_Compile.ISimpleBooleanClientCallHistory" + +class ISimpleBooleanClient: + pass + def GetBoolean(self, input): + pass + + +class SimpleBooleanConfig: + @_dafny.classproperty + def AllSingletonConstructors(cls): + return [SimpleBooleanConfig_SimpleBooleanConfig()] + @classmethod + def default(cls, ): + return lambda: SimpleBooleanConfig_SimpleBooleanConfig() + def __ne__(self, __o: object) -> bool: + return not self.__eq__(__o) + @property + def is_SimpleBooleanConfig(self) -> bool: + return isinstance(self, Dafny.Simpletypes.Boolean.Types.SimpleBooleanConfig_SimpleBooleanConfig) + +class SimpleBooleanConfig_SimpleBooleanConfig(SimpleBooleanConfig, NamedTuple('SimpleBooleanConfig', [])): + def __dafnystr__(self) -> str: + return f'Dafny.Simpletypes.Boolean.Types_Compile.SimpleBooleanConfig.SimpleBooleanConfig' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, Dafny.Simpletypes.Boolean.Types.SimpleBooleanConfig_SimpleBooleanConfig) + def __hash__(self) -> int: + return super().__hash__() + + +class Error: + @classmethod + def default(cls, ): + return lambda: Error_CollectionOfErrors(_dafny.Seq({})) + def __ne__(self, __o: object) -> bool: + return not self.__eq__(__o) + @property + def is_CollectionOfErrors(self) -> bool: + return isinstance(self, Dafny.Simpletypes.Boolean.Types.Error_CollectionOfErrors) + @property + def is_Opaque(self) -> bool: + return isinstance(self, Dafny.Simpletypes.Boolean.Types.Error_Opaque) + +class Error_CollectionOfErrors(Error, NamedTuple('CollectionOfErrors', [('list', Any)])): + def __dafnystr__(self) -> str: + return f'Dafny.Simpletypes.Boolean.Types_Compile.Error.CollectionOfErrors({_dafny.string_of(self.list)})' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, Dafny.Simpletypes.Boolean.Types.Error_CollectionOfErrors) and self.list == __o.list + def __hash__(self) -> int: + return super().__hash__() + +class Error_Opaque(Error, NamedTuple('Opaque', [('obj', Any)])): + def __dafnystr__(self) -> str: + return f'Dafny.Simpletypes.Boolean.Types_Compile.Error.Opaque({_dafny.string_of(self.obj)})' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, Dafny.Simpletypes.Boolean.Types.Error_Opaque) and self.obj == __o.obj + def __hash__(self) -> int: + return super().__hash__() + + +class OpaqueError: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return Dafny.Simpletypes.Boolean.Types.Error_CollectionOfErrors.default()() + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Dafny/Simpletypes/Boolean/Types/__pycache__/__init__.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Dafny/Simpletypes/Boolean/Types/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9aa4ec63819e8948e1e8e9905073c230a8185c18 GIT binary patch literal 17095 zcmdU0U2GIrmaghQm;WeZ1Lh}*4JHJW#3VCh977h&03k4>J;Wy14W``gs_G&P^^+hLR!tkzQLM@C{KINxz*iO z)z#PuW+qeJefrk@J@?*ozx&;LtNy*UwMl^MWvNg7!v;b4AG|4F&9-Cd=K(>uDX4-f zriB>(2hw6D5DR32v0x??3uVHwu!#P_bR^RdYan+hEoB;GjpP>7O|d3Q-yCbE|CU$_ z{kO(i>3>a34hTmDHGExABe$Wv&)~sen8F?GU7f zpPhOwrEZ4QE$(=+b_!{QkTn{(A>S5NrW{3gOizv-l&%fZt#!wXt)q~32-;KDP%K*Y|+3CT5OsU+;KcL+C(XygA~uZ zQ=X|ppCXrx^0lI$4<9heQ^cpo}+X-Al*wIO`cc9VWD^D|6;dB zdqb9VD4tHoC)1i0JeZxc8b;>w+WT>4HAUkYO&yudr?p^;f8o405&aNmmqZ@>QXffu{tpN zVGzH8$ORD`_7xC*;ZYZSM7L7z#vB&zh*4;i=iM4A?%Upg)u?L8_-wkM9IHBqbX0zR z{+r+LKBa3+-<_UKWD;sFyZf-FpD*O{yD#O~`FuK_(01o@>A6gf<)?R#XnNt@oT{bu z-NUI2bPo1c+5O{OF0IA0yBTy*Dg)m6xxzGLh>7&KSuR70y_%ofO%6MU0_9Ln%kxu| zR5n#ml)n7jH_}__cxFWrG5(RpDBTmFvF8?=Inw9YUUYXhNUmv&D~u(j}SHQ2=z zH~1IdiYWkeg|DHs2XfSKex)eG4!7DpouVi?E5fwGEXyV;5D5{nWHP8eaNHEG3JdUG zdtDW8gXMfyv7Q!TSYW8g9np#?igrO!pxZ;bmQJ!x@TR`*?&cMO2w6>0it9b~;ojH) zOPFR}SnTM$x$oEeZt10t91zHq!CBs>tL<>0d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pleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Dafny/Simpletypes/Boolean/Wrapped/__init__.py new file mode 100644 index 0000000000..1f691cf26f --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Dafny/Simpletypes/Boolean/Wrapped/__init__.py @@ -0,0 +1,22 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny +import System_ +import SimpleBooleanImplTest_Compile +import Dafny.Simpletypes.Boolean.Types + + +class default__: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "Dafny.Simpletypes.Boolean.Wrapped_Compile._default" + @staticmethod + def WrappedDefaultSimpleBooleanConfig(): + return Dafny.Simpletypes.Boolean.Types.SimpleBooleanConfig_SimpleBooleanConfig() + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Dafny/Simpletypes/Boolean/Wrapped/__pycache__/__init__.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Dafny/Simpletypes/Boolean/Wrapped/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ae59ae0a3b20eaaa084efeb9d12b1a8cfa0bb9d6 GIT binary patch literal 1714 zcmah}&2Jnv6u0L)o83$kpd6s0NQknk*pZOngpgoYAP($-4I#0RM#I|MOzQc-Gb^+? z?O_l62jSRLQN`cEeL;~}`BVvU;Fc-pBmX>9i2Ehp0#I z7zq8P7EQBi=6nv!38IK%j)u-`xJ-10)&mGdy^A_<9^aY~!0#WB7Sn?};RU4V^#f{7yF({VDUSsDyjalg#+;Kxkd&v`UvL7wqhl8O8<*kwieRYn;vf>E3R zK!v&CKg%-CqBIZyGfqI9&&or%P$?Cki!2#LlXUieJ_|Hc-%#os8r^S2l;?~FVHl?| zAnN5a={1Yvoi);4BijNHg$rbkR$luj>l|1l9l^?}NMGm=6-;Az{DC&6SHaQ7^lD>z zwJ~8oOY)erURXabI`D?jFKZu)8|uw=7*YkWC`A|^-@I( str: + return "Dafny.Simpletypes.Boolean_Compile.SimpleBooleanClient" + def ctor__(self, config): + (self)._config = config + + def GetBoolean(self, input): + output: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(Dafny.Simpletypes.Boolean.Types.GetBooleanOutput.default())() + out0_: Wrappers_Compile.Result + out0_ = SimpleBooleanImpl_Compile.default__.GetBoolean((self).config, input) + output = out0_ + return output + + @property + def config(self): + return self._config + +class default__: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "Dafny.Simpletypes.Boolean_Compile._default" + @staticmethod + def DefaultSimpleBooleanConfig(): + return Dafny.Simpletypes.Boolean.Types.SimpleBooleanConfig_SimpleBooleanConfig() + + @staticmethod + def SimpleBoolean(config): + res: Wrappers_Compile.Result = None + d_1_client_: Dafny.Simpletypes.Boolean.SimpleBooleanClient + nw0_ = Dafny.Simpletypes.Boolean.SimpleBooleanClient() + nw0_.ctor__(SimpleBooleanImpl_Compile.Config_Config()) + d_1_client_ = nw0_ + res = Wrappers_Compile.Result_Success(d_1_client_) + return res + return res + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Dafny/Simpletypes/Boolean/__pycache__/Wrapped.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Dafny/Simpletypes/Boolean/__pycache__/Wrapped.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8fff00896e3cce0239db01bf6e82cf52d76add43 GIT binary patch literal 1877 zcmah}&2QsG6o2E`v707!+ubcxuu>~kS^{b!t;9-52niB_0FeVJrL|VFOlGo8YR6{m z2&Jb8<-nOsIdVV?tG)1Na15(RM02WyI3O-vmD6(J&BRVywo7NmZ=TYZ?Cxsz z)4h>#?#+zT-~*uf5m56Xp7vOsD0R*)N}5o%{**tBvM#Ke=lk9lJ`=fjdjnza3?jDc zaZzY^0i!$p$Y*6DjJ6+!Tr#b&-%E}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gn4fc->3oE+c%G?-Fg&=*xX+b2MxwQz#Z`bdMybcV)Jsu4SB-CKdB48N{jR+9EeHi{1#|GAqYZ`47d5!Bky!yboa<) zH-7iX*>3!POww(B^+>ACuijuL+aaJ z^`_ry%N`l?$W&j-3Q!-PCih?Wau>ba+g@(o%Pl`ai5~}IvsnQm;%S0%S(H1u%46jJ DAfBbH literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Dafny/Simpletypes/__pycache__/Boolean.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Dafny/Simpletypes/__pycache__/Boolean.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..e718d19820f0e48daec4c5d0474fabef8156e27e GIT binary patch literal 4060 zcmb7H-EZ606~ClNN|r5A{;1QqS*oocshq}YQFMS3*TCu^LD0o(Z7)rU0h}h%wG>iR zFDVrEWIzvo5QYGKOds=QcO~`lHh>9FC#{*y<5Q7+kMKr8MORz;vv{PEjmNdzhHCe#^ zl%?2dEzNn!%GeXy1m^`St7ZB6No|tXQ`!`-b6Os1*;4I-RtV=#YtwveMw=1IO=2kf z#7LX@#%v^5V=m?jG512mJxUSs1b#u$=J_5O*kj_62qW+dN6s0-1}SBKz~)*>Vwu&d zWmW%TnJo3Y<_=45?zGH1Rm!q!RogT++bzp12~6Iy9ET!PbJ|T08Jy_W!fkmK9di6W zG#?O?Xo5jB(Gd2DmNG91U-r&15KM5{M1LV;z_)hHesYe$PAm^sM{dG z`;KFo)#j>IH=ABfi02W4UyQ$F4afuHofvDx{KH7F6AQ`Mkx2nMM2~f8kPY%!KvkVj zNOKD$(^nn4RR`VWR-NWn{ZnXT#nOhkRc%`yOY1e>^H^Y#Yg$__3RV2+i}D{`le%TA zU9)S3(=1;%-Fu$XDu3?Kdo8P4Gs`W<+OZwl+AeRJu6NrpOv^0?0&vZTe5jf-1*_C; z(=E4lylvPJ7r8g6V_&asHFvJ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X_=`0W5x+;JjI!H$KXJ;J@??hob-h literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/SimpleBooleanImplTest_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/SimpleBooleanImplTest_Compile.py new file mode 100644 index 0000000000..98c5d6bf0d --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/SimpleBooleanImplTest_Compile.py @@ -0,0 +1,80 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny +import System_ +import Dafny.Simpletypes.Boolean +import Wrappers_Compile + +assert "SimpleBooleanImplTest_Compile" == __name__ +SimpleBooleanImplTest_Compile = sys.modules[__name__] + +class default__: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "SimpleBooleanImplTest_Compile._default" + @staticmethod + def GetBooleanTrue(): + d_0_client_: Dafny.Simpletypes.Boolean.SimpleBooleanClient + d_1_valueOrError0_: Wrappers_Compile.Result = None + out0_: Wrappers_Compile.Result + out0_ = Dafny.Simpletypes.Boolean.default__.SimpleBoolean(Dafny.Simpletypes.Boolean.default__.DefaultSimpleBooleanConfig()) + d_1_valueOrError0_ = out0_ + if not(not((d_1_valueOrError0_).IsFailure())): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(8,19): " + _dafny.string_of(d_1_valueOrError0_) + ) + d_0_client_ = (d_1_valueOrError0_).Extract() + SimpleBooleanImplTest_Compile.default__.TestGetBooleanTrue(d_0_client_) + + @staticmethod + def GetBooleanFalse(): + d_2_client_: Dafny.Simpletypes.Boolean.SimpleBooleanClient + d_3_valueOrError0_: Wrappers_Compile.Result = None + out1_: Wrappers_Compile.Result + out1_ = Dafny.Simpletypes.Boolean.default__.SimpleBoolean(Dafny.Simpletypes.Boolean.default__.DefaultSimpleBooleanConfig()) + d_3_valueOrError0_ = out1_ + if not(not((d_3_valueOrError0_).IsFailure())): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(12,19): " + _dafny.string_of(d_3_valueOrError0_) + ) + d_2_client_ = (d_3_valueOrError0_).Extract() + SimpleBooleanImplTest_Compile.default__.TestGetBooleanFalse(d_2_client_) + + @staticmethod + def TestGetBooleanTrue(client): + d_4_ret_: Dafny.Simpletypes.Boolean.Types.GetBooleanOutput + d_5_valueOrError0_: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(Dafny.Simpletypes.Boolean.Types.GetBooleanOutput.default())() + out2_: Wrappers_Compile.Result + out2_ = (client).GetBoolean(Dafny.Simpletypes.Boolean.Types.GetBooleanInput_GetBooleanInput(Wrappers_Compile.Option_Some(True))) + d_5_valueOrError0_ = out2_ + if not(not((d_5_valueOrError0_).IsFailure())): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(21,16): " + _dafny.string_of(d_5_valueOrError0_) + ) + d_4_ret_ = (d_5_valueOrError0_).Extract() + if not((((d_4_ret_).value).UnwrapOr(False)) == (True)): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(22,8): " + _dafny.string_of(_dafny.Seq("expectation violation")) + ) + _dafny.print(_dafny.string_of(d_4_ret_) + ) + + @staticmethod + def TestGetBooleanFalse(client): + d_6_ret_: Dafny.Simpletypes.Boolean.Types.GetBooleanOutput + d_7_valueOrError0_: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(Dafny.Simpletypes.Boolean.Types.GetBooleanOutput.default())() + out3_: Wrappers_Compile.Result + out3_ = (client).GetBoolean(Dafny.Simpletypes.Boolean.Types.GetBooleanInput_GetBooleanInput(Wrappers_Compile.Option_Some(False))) + d_7_valueOrError0_ = out3_ + if not(not((d_7_valueOrError0_).IsFailure())): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(31,16): " + _dafny.string_of(d_7_valueOrError0_) + ) + d_6_ret_ = (d_7_valueOrError0_).Extract() + if not((((d_6_ret_).value).UnwrapOr(True)) == (False)): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(32,8): " + _dafny.string_of(_dafny.Seq("expectation violation")) + ) + _dafny.print(_dafny.string_of(d_6_ret_) + ) + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/SimpleBooleanImpl_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/SimpleBooleanImpl_Compile.py new file mode 100644 index 0000000000..333f6202cc --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/SimpleBooleanImpl_Compile.py @@ -0,0 +1,63 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny +import System_ +import Dafny.Simpletypes.Boolean.Types +import Wrappers_Compile + +assert "SimpleBooleanImpl_Compile" == __name__ +SimpleBooleanImpl_Compile = sys.modules[__name__] + +class Config: + @_dafny.classproperty + def AllSingletonConstructors(cls): + return [Config_Config()] + @classmethod + def default(cls, ): + return lambda: Config_Config() + def __ne__(self, __o: object) -> bool: + return not self.__eq__(__o) + @property + def is_Config(self) -> bool: + return isinstance(self, SimpleBooleanImpl_Compile.Config_Config) + +class Config_Config(Config, NamedTuple('Config', [])): + def __dafnystr__(self) -> str: + return f'SimpleBooleanImpl_Compile.Config.Config' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, SimpleBooleanImpl_Compile.Config_Config) + def __hash__(self) -> int: + return super().__hash__() + + +class default__: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "SimpleBooleanImpl_Compile._default" + @staticmethod + def GetBoolean(config, input): + output: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(Dafny.Simpletypes.Boolean.Types.GetBooleanOutput.default())() + if not(((input).value).is_Some): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(15,4): " + _dafny.string_of(_dafny.Seq("expectation violation")) + ) + if not(((((input).value).value) == (True)) or ((((input).value).value) == (False))): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(17,4): " + _dafny.string_of(_dafny.Seq("expectation violation")) + ) + d_0_res_: Dafny.Simpletypes.Boolean.Types.GetBooleanOutput + d_0_res_ = Dafny.Simpletypes.Boolean.Types.GetBooleanOutput_GetBooleanOutput((input).value) + if not(((((d_0_res_).value).value) == (True)) or ((((d_0_res_).value).value) == (False))): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(20,4): " + _dafny.string_of(_dafny.Seq("expectation violation")) + ) + if not((((input).value).value) == (((d_0_res_).value).value)): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(22,4): " + _dafny.string_of(_dafny.Seq("expectation violation")) + ) + output = Wrappers_Compile.Result_Success(d_0_res_) + return output + return output + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/StandardLibrary_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/StandardLibrary_Compile.py new file mode 100644 index 0000000000..913ac8feb4 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/StandardLibrary_Compile.py @@ -0,0 +1,193 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny +import System_ +import Wrappers_Compile +import StandardLibrary_mUInt_Compile + +assert "StandardLibrary_Compile" == __name__ +StandardLibrary_Compile = sys.modules[__name__] + +class default__: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "StandardLibrary_Compile._default" + @staticmethod + def Join(ss, joiner): + d_50___accumulator_ = _dafny.Seq([]) + while True: + with _dafny.label(): + if (len(ss)) == (1): + return (d_50___accumulator_) + ((ss)[0]) + elif True: + d_50___accumulator_ = (d_50___accumulator_) + (((ss)[0]) + (joiner)) + in0_ = _dafny.Seq((ss)[1::]) + in1_ = joiner + ss = in0_ + joiner = in1_ + raise _dafny.TailCall() + break + + @staticmethod + def Split(s, delim): + d_51___accumulator_ = _dafny.Seq([]) + while True: + with _dafny.label(): + d_52_i_ = StandardLibrary_Compile.default__.FindIndexMatching(s, delim, 0) + if (d_52_i_).is_Some: + d_51___accumulator_ = (d_51___accumulator_) + (_dafny.Seq([_dafny.Seq((s)[:(d_52_i_).value:])])) + in2_ = _dafny.Seq((s)[((d_52_i_).value) + (1)::]) + in3_ = delim + s = in2_ + delim = in3_ + raise _dafny.TailCall() + elif True: + return (d_51___accumulator_) + (_dafny.Seq([s])) + break + + @staticmethod + def SplitOnce(s, delim): + d_53_i_ = StandardLibrary_Compile.default__.FindIndexMatching(s, delim, 0) + return (_dafny.Seq((s)[:(d_53_i_).value:]), _dafny.Seq((s)[((d_53_i_).value) + (1)::])) + + @staticmethod + def SplitOnce_q(s, delim): + d_54_valueOrError0_ = StandardLibrary_Compile.default__.FindIndexMatching(s, delim, 0) + if (d_54_valueOrError0_).IsFailure(): + return (d_54_valueOrError0_).PropagateFailure() + elif True: + d_55_i_ = (d_54_valueOrError0_).Extract() + return Wrappers_Compile.Option_Some((_dafny.Seq((s)[:d_55_i_:]), _dafny.Seq((s)[(d_55_i_) + (1)::]))) + + @staticmethod + def FindIndexMatching(s, c, i): + def lambda0_(d_56_c_): + def lambda1_(d_57_x_): + return (d_57_x_) == (d_56_c_) + + return lambda1_ + + return StandardLibrary_Compile.default__.FindIndex(s, lambda0_(c), i) + + @staticmethod + def FindIndex(s, f, i): + while True: + with _dafny.label(): + if (i) == (len(s)): + return Wrappers_Compile.Option_None() + elif f((s)[i]): + return Wrappers_Compile.Option_Some(i) + elif True: + in4_ = s + in5_ = f + in6_ = (i) + (1) + s = in4_ + f = in5_ + i = in6_ + raise _dafny.TailCall() + break + + @staticmethod + def Filter(s, f): + d_58___accumulator_ = _dafny.Seq([]) + while True: + with _dafny.label(): + if (len(s)) == (0): + return (d_58___accumulator_) + (_dafny.Seq([])) + elif f((s)[0]): + d_58___accumulator_ = (d_58___accumulator_) + (_dafny.Seq([(s)[0]])) + in7_ = _dafny.Seq((s)[1::]) + in8_ = f + s = in7_ + f = in8_ + raise _dafny.TailCall() + elif True: + in9_ = _dafny.Seq((s)[1::]) + in10_ = f + s = in9_ + f = in10_ + raise _dafny.TailCall() + break + + @staticmethod + def Min(a, b): + if (a) < (b): + return a + elif True: + return b + + @staticmethod + def Fill(value, n): + return _dafny.Seq([value for d_59___v0_ in range(n)]) + + @staticmethod + def SeqToArray(s): + a: _dafny.Array = _dafny.Array(None, 0) + nw0_ = _dafny.Array(None, len(s)) + def lambda2_(d_60_s_): + def lambda3_(d_61_i_): + return (d_60_s_)[d_61_i_] + + return lambda3_ + + arrayinit0_ = lambda2_(s) + for arrayinit_00_ in range(nw0_.length(0)): + nw0_[arrayinit_00_] = arrayinit0_(arrayinit_00_) + a = nw0_ + return a + + @staticmethod + def LexicographicLessOrEqual(a, b, less): + def lambda4_(exists_var_0_): + d_62_k_: int = exists_var_0_ + return (((0) <= (d_62_k_)) and ((d_62_k_) <= (len(a)))) and (StandardLibrary_Compile.default__.LexicographicLessOrEqualAux(a, b, less, d_62_k_)) + + return _dafny.quantifier(_dafny.IntegerRange(0, (len(a)) + (1)), False, lambda4_) + + @staticmethod + def LexicographicLessOrEqualAux(a, b, less, lengthOfCommonPrefix): + def lambda5_(forall_var_0_): + d_63_i_: int = forall_var_0_ + return not (((0) <= (d_63_i_)) and ((d_63_i_) < (lengthOfCommonPrefix))) or (((a)[d_63_i_]) == ((b)[d_63_i_])) + + return (((lengthOfCommonPrefix) <= (len(b))) and (_dafny.quantifier(_dafny.IntegerRange(0, lengthOfCommonPrefix), True, lambda5_))) and (((lengthOfCommonPrefix) == (len(a))) or (((lengthOfCommonPrefix) < (len(b))) and (less((a)[lengthOfCommonPrefix], (b)[lengthOfCommonPrefix])))) + + @staticmethod + def SetToOrderedSequence(s, less): + d_64___accumulator_ = _dafny.Seq([]) + while True: + with _dafny.label(): + pat_let_tv0_ = s + pat_let_tv1_ = less + if (s) == (_dafny.Set({})): + return (d_64___accumulator_) + (_dafny.Seq([])) + elif True: + def iife0_(_let_dummy_0): + d_65_a_: _dafny.Seq = None + with _dafny.label("_ASSIGN_SUCH_THAT_d_0"): + assign_such_that_0_: _dafny.Seq + for assign_such_that_0_ in (s).Elements: + d_65_a_ = assign_such_that_0_ + if ((d_65_a_) in (s)) and (StandardLibrary_Compile.default__.IsMinimum(d_65_a_, s, less)): + raise _dafny.Break("_ASSIGN_SUCH_THAT_d_0") + raise Exception("assign-such-that search produced no value (line 369)") + pass + return (_dafny.Seq([d_65_a_])) + (StandardLibrary_Compile.default__.SetToOrderedSequence((pat_let_tv0_) - (_dafny.Set({d_65_a_})), pat_let_tv1_)) + return iife0_(0) + + break + + @staticmethod + def IsMinimum(a, s, less): + def lambda6_(forall_var_1_): + d_66_z_: _dafny.Seq = forall_var_1_ + return not ((d_66_z_) in (s)) or (StandardLibrary_Compile.default__.LexicographicLessOrEqual(a, d_66_z_, less)) + + return ((a) in (s)) and (_dafny.quantifier((s).Elements, True, lambda6_)) + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/StandardLibrary_mUInt_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/StandardLibrary_mUInt_Compile.py new file mode 100644 index 0000000000..cd6f10f64a --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/StandardLibrary_mUInt_Compile.py @@ -0,0 +1,208 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny +import System_ +import Wrappers_Compile + +assert "StandardLibrary_mUInt_Compile" == __name__ +StandardLibrary_mUInt_Compile = sys.modules[__name__] + +class uint8: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return int(0) + +class uint16: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return int(0) + +class uint32: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return int(0) + +class uint64: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return int(0) + +class int32: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return int(0) + +class int64: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return int(0) + +class posInt64: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return 1 + +class seq16: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return _dafny.Seq({}) + +class seq32: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return _dafny.Seq({}) + +class seq64: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return _dafny.Seq({}) + +class default__: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "StandardLibrary.StandardLibrary_mUInt_Compile._default" + @staticmethod + def UInt8Less(a, b): + return (a) < (b) + + @staticmethod + def HasUint16Len(s): + return (len(s)) < ((StandardLibrary_mUInt_Compile.default__).UINT16__LIMIT) + + @staticmethod + def HasUint32Len(s): + return (len(s)) < ((StandardLibrary_mUInt_Compile.default__).UINT32__LIMIT) + + @staticmethod + def HasUint64Len(s): + return (len(s)) < ((StandardLibrary_mUInt_Compile.default__).UINT64__LIMIT) + + @staticmethod + def UInt16ToSeq(x): + d_16_b0_ = _dafny.euclidian_division(x, 256) + d_17_b1_ = _dafny.euclidian_modulus(x, 256) + return _dafny.Seq([d_16_b0_, d_17_b1_]) + + @staticmethod + def SeqToUInt16(s): + d_18_x0_ = ((s)[0]) * (256) + return (d_18_x0_) + ((s)[1]) + + @staticmethod + def UInt32ToSeq(x): + d_19_b0_ = _dafny.euclidian_division(x, 16777216) + d_20_x0_ = (x) - ((d_19_b0_) * (16777216)) + d_21_b1_ = _dafny.euclidian_division(d_20_x0_, 65536) + d_22_x1_ = (d_20_x0_) - ((d_21_b1_) * (65536)) + d_23_b2_ = _dafny.euclidian_division(d_22_x1_, 256) + d_24_b3_ = _dafny.euclidian_modulus(d_22_x1_, 256) + return _dafny.Seq([d_19_b0_, d_21_b1_, d_23_b2_, d_24_b3_]) + + @staticmethod + def SeqToUInt32(s): + d_25_x0_ = ((s)[0]) * (16777216) + d_26_x1_ = (d_25_x0_) + (((s)[1]) * (65536)) + d_27_x2_ = (d_26_x1_) + (((s)[2]) * (256)) + return (d_27_x2_) + ((s)[3]) + + @staticmethod + def UInt64ToSeq(x): + d_28_b0_ = _dafny.euclidian_division(x, 72057594037927936) + d_29_x0_ = (x) - ((d_28_b0_) * (72057594037927936)) + d_30_b1_ = _dafny.euclidian_division(d_29_x0_, 281474976710656) + d_31_x1_ = (d_29_x0_) - ((d_30_b1_) * (281474976710656)) + d_32_b2_ = _dafny.euclidian_division(d_31_x1_, 1099511627776) + d_33_x2_ = (d_31_x1_) - ((d_32_b2_) * (1099511627776)) + d_34_b3_ = _dafny.euclidian_division(d_33_x2_, 4294967296) + d_35_x3_ = (d_33_x2_) - ((d_34_b3_) * (4294967296)) + d_36_b4_ = _dafny.euclidian_division(d_35_x3_, 16777216) + d_37_x4_ = (d_35_x3_) - ((d_36_b4_) * (16777216)) + d_38_b5_ = _dafny.euclidian_division(d_37_x4_, 65536) + d_39_x5_ = (d_37_x4_) - ((d_38_b5_) * (65536)) + d_40_b6_ = _dafny.euclidian_division(d_39_x5_, 256) + d_41_b7_ = _dafny.euclidian_modulus(d_39_x5_, 256) + return _dafny.Seq([d_28_b0_, d_30_b1_, d_32_b2_, d_34_b3_, d_36_b4_, d_38_b5_, d_40_b6_, d_41_b7_]) + + @staticmethod + def SeqToUInt64(s): + d_42_x0_ = ((s)[0]) * (72057594037927936) + d_43_x1_ = (d_42_x0_) + (((s)[1]) * (281474976710656)) + d_44_x2_ = (d_43_x1_) + (((s)[2]) * (1099511627776)) + d_45_x3_ = (d_44_x2_) + (((s)[3]) * (4294967296)) + d_46_x4_ = (d_45_x3_) + (((s)[4]) * (16777216)) + d_47_x5_ = (d_46_x4_) + (((s)[5]) * (65536)) + d_48_x6_ = (d_47_x5_) + (((s)[6]) * (256)) + d_49_x_ = (d_48_x6_) + ((s)[7]) + return d_49_x_ + + @_dafny.classproperty + def UINT16__LIMIT(instance): + return 65536 + @_dafny.classproperty + def UINT32__LIMIT(instance): + return 4294967296 + @_dafny.classproperty + def UINT64__LIMIT(instance): + return 18446744073709551616 + @_dafny.classproperty + def INT32__MAX__LIMIT(instance): + return 2147483648 + @_dafny.classproperty + def INT64__MAX__LIMIT(instance): + return 9223372036854775808 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/System_.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/System_.py new file mode 100644 index 0000000000..32e6d896ff --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/System_.py @@ -0,0 +1,20 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny + +assert "System_" == __name__ +System_ = sys.modules[__name__] + +class nat: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return int(0) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/TestsFromDafny.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/TestsFromDafny.py new file mode 100644 index 0000000000..44f32aefaf --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/TestsFromDafny.py @@ -0,0 +1,15 @@ +# Dafny program the_program compiled into Python +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny + +try: + dafnyArgs = [_dafny.Seq(a) for a in sys.argv] + module_.default__.Main(dafnyArgs) +except _dafny.HaltException as e: + _dafny.print("[Program halted] " + e.message + "\n") + sys.exit(1) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/UTF8.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/UTF8.py new file mode 100644 index 0000000000..45e3b8b7a5 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/UTF8.py @@ -0,0 +1,118 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny +import System_ +import Wrappers_Compile +import StandardLibrary_mUInt_Compile +import StandardLibrary_Compile + +assert "UTF8" == __name__ +UTF8 = sys.modules[__name__] + +class ValidUTF8Bytes: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return _dafny.Seq([]) + +class default__: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "UTF8_Compile._default" + @staticmethod + def IsASCIIString(s): + def lambda7_(forall_var_2_): + d_67_i_: int = forall_var_2_ + return not (((0) <= (d_67_i_)) and ((d_67_i_) < (len(s)))) or ((ord((s)[d_67_i_])) < (128)) + + return _dafny.quantifier(_dafny.IntegerRange(0, len(s)), True, lambda7_) + + @staticmethod + def EncodeAscii(s): + d_68___accumulator_ = _dafny.Seq([]) + while True: + with _dafny.label(): + if (len(s)) == (0): + return (d_68___accumulator_) + (_dafny.Seq([])) + elif True: + d_69_x_ = _dafny.Seq([ord((s)[0])]) + d_68___accumulator_ = (d_68___accumulator_) + (d_69_x_) + in11_ = _dafny.Seq((s)[1::]) + s = in11_ + raise _dafny.TailCall() + break + + @staticmethod + def Uses1Byte(s): + return ((0) <= ((s)[0])) and (((s)[0]) <= (127)) + + @staticmethod + def Uses2Bytes(s): + return (((194) <= ((s)[0])) and (((s)[0]) <= (223))) and (((128) <= ((s)[1])) and (((s)[1]) <= (191))) + + @staticmethod + def Uses3Bytes(s): + return (((((((s)[0]) == (224)) and (((160) <= ((s)[1])) and (((s)[1]) <= (191)))) and (((128) <= ((s)[2])) and (((s)[2]) <= (191)))) or (((((225) <= ((s)[0])) and (((s)[0]) <= (236))) and (((128) <= ((s)[1])) and (((s)[1]) <= (191)))) and (((128) <= ((s)[2])) and (((s)[2]) <= (191))))) or (((((s)[0]) == (237)) and (((128) <= ((s)[1])) and (((s)[1]) <= (159)))) and (((128) <= ((s)[2])) and (((s)[2]) <= (191))))) or (((((238) <= ((s)[0])) and (((s)[0]) <= (239))) and (((128) <= ((s)[1])) and (((s)[1]) <= (191)))) and (((128) <= ((s)[2])) and (((s)[2]) <= (191)))) + + @staticmethod + def Uses4Bytes(s): + return (((((((s)[0]) == (240)) and (((144) <= ((s)[1])) and (((s)[1]) <= (191)))) and (((128) <= ((s)[2])) and (((s)[2]) <= (191)))) and (((128) <= ((s)[3])) and (((s)[3]) <= (191)))) or ((((((241) <= ((s)[0])) and (((s)[0]) <= (243))) and (((128) <= ((s)[1])) and (((s)[1]) <= (191)))) and (((128) <= ((s)[2])) and (((s)[2]) <= (191)))) and (((128) <= ((s)[3])) and (((s)[3]) <= (191))))) or ((((((s)[0]) == (244)) and (((128) <= ((s)[1])) and (((s)[1]) <= (143)))) and (((128) <= ((s)[2])) and (((s)[2]) <= (191)))) and (((128) <= ((s)[3])) and (((s)[3]) <= (191)))) + + @staticmethod + def ValidUTF8Range(a, lo, hi): + while True: + with _dafny.label(): + if (lo) == (hi): + return True + elif True: + d_70_r_ = _dafny.Seq((a)[lo:hi:]) + if UTF8.default__.Uses1Byte(d_70_r_): + in12_ = a + in13_ = (lo) + (1) + in14_ = hi + a = in12_ + lo = in13_ + hi = in14_ + raise _dafny.TailCall() + elif ((2) <= (len(d_70_r_))) and (UTF8.default__.Uses2Bytes(d_70_r_)): + in15_ = a + in16_ = (lo) + (2) + in17_ = hi + a = in15_ + lo = in16_ + hi = in17_ + raise _dafny.TailCall() + elif ((3) <= (len(d_70_r_))) and (UTF8.default__.Uses3Bytes(d_70_r_)): + in18_ = a + in19_ = (lo) + (3) + in20_ = hi + a = in18_ + lo = in19_ + hi = in20_ + raise _dafny.TailCall() + elif ((4) <= (len(d_70_r_))) and (UTF8.default__.Uses4Bytes(d_70_r_)): + in21_ = a + in22_ = (lo) + (4) + in23_ = hi + a = in21_ + lo = in22_ + hi = in23_ + raise _dafny.TailCall() + elif True: + return False + break + + @staticmethod + def ValidUTF8Seq(s): + return UTF8.default__.ValidUTF8Range(s, 0, len(s)) + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/WrappedSimpleTypesBooleanTest_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/WrappedSimpleTypesBooleanTest_Compile.py new file mode 100644 index 0000000000..4b3307fd8d --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/WrappedSimpleTypesBooleanTest_Compile.py @@ -0,0 +1,46 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny +import System_ +import SimpleBooleanImplTest_Compile +import Dafny.Simpletypes.Boolean.Wrapped + +assert "WrappedSimpleTypesBooleanTest_Compile" == __name__ +WrappedSimpleTypesBooleanTest_Compile = sys.modules[__name__] + +class default__: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "WrappedSimpleTypesBooleanTest_Compile._default" + @staticmethod + def GetBooleanTrue(): + d_8_client_: Dafny.Simpletypes.Boolean.Types.ISimpleBooleanClient + d_9_valueOrError0_: Wrappers_Compile.Result = None + out4_: Wrappers_Compile.Result + out4_ = Dafny.Simpletypes.Boolean.Wrapped.default__.WrappedSimpleBoolean(Dafny.Simpletypes.Boolean.Wrapped.default__.WrappedDefaultSimpleBooleanConfig()) + d_9_valueOrError0_ = out4_ + if not(not((d_9_valueOrError0_).IsFailure())): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/WrappedSimpleBooleanTest.dfy(9,19): " + _dafny.string_of(d_9_valueOrError0_) + ) + d_8_client_ = (d_9_valueOrError0_).Extract() + SimpleBooleanImplTest_Compile.default__.TestGetBooleanTrue(d_8_client_) + + @staticmethod + def GetBooleanFalse(): + d_10_client_: Dafny.Simpletypes.Boolean.Types.ISimpleBooleanClient + d_11_valueOrError0_: Wrappers_Compile.Result = None + out5_: Wrappers_Compile.Result + out5_ = Dafny.Simpletypes.Boolean.Wrapped.default__.WrappedSimpleBoolean(Dafny.Simpletypes.Boolean.Wrapped.default__.WrappedDefaultSimpleBooleanConfig()) + d_11_valueOrError0_ = out5_ + if not(not((d_11_valueOrError0_).IsFailure())): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/WrappedSimpleBooleanTest.dfy(13,19): " + _dafny.string_of(d_11_valueOrError0_) + ) + d_10_client_ = (d_11_valueOrError0_).Extract() + SimpleBooleanImplTest_Compile.default__.TestGetBooleanFalse(d_10_client_) + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Wrappers_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Wrappers_Compile.py new file mode 100644 index 0000000000..ddde85ac6b --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Wrappers_Compile.py @@ -0,0 +1,190 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny +import System_ + +assert "Wrappers_Compile" == __name__ +Wrappers_Compile = sys.modules[__name__] + +class Option: + @classmethod + def default(cls, ): + return lambda: Option_None() + def __ne__(self, __o: object) -> bool: + return not self.__eq__(__o) + @property + def is_None(self) -> bool: + return isinstance(self, Wrappers_Compile.Option_None) + @property + def is_Some(self) -> bool: + return isinstance(self, Wrappers_Compile.Option_Some) + def ToResult(self): + source0_ = self + if source0_.is_None: + return Wrappers_Compile.Result_Failure(_dafny.Seq("Option is None")) + elif True: + d_0___mcc_h0_ = source0_.value + d_1_v_ = d_0___mcc_h0_ + return Wrappers_Compile.Result_Success(d_1_v_) + + def UnwrapOr(self, default): + source1_ = self + if source1_.is_None: + return default + elif True: + d_2___mcc_h0_ = source1_.value + d_3_v_ = d_2___mcc_h0_ + return d_3_v_ + + def IsFailure(self): + return (self).is_None + + def PropagateFailure(self): + return Wrappers_Compile.Option_None() + + def Extract(self): + return (self).value + + +class Option_None(Option, NamedTuple('None_', [])): + def __dafnystr__(self) -> str: + return f'Wrappers_Compile.Option.None' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, Wrappers_Compile.Option_None) + def __hash__(self) -> int: + return super().__hash__() + +class Option_Some(Option, NamedTuple('Some', [('value', Any)])): + def __dafnystr__(self) -> str: + return f'Wrappers_Compile.Option.Some({_dafny.string_of(self.value)})' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, Wrappers_Compile.Option_Some) and self.value == __o.value + def __hash__(self) -> int: + return super().__hash__() + + +class Result: + @classmethod + def default(cls, default_T): + return lambda: Result_Success(default_T()) + def __ne__(self, __o: object) -> bool: + return not self.__eq__(__o) + @property + def is_Success(self) -> bool: + return isinstance(self, Wrappers_Compile.Result_Success) + @property + def is_Failure(self) -> bool: + return isinstance(self, Wrappers_Compile.Result_Failure) + def ToOption(self): + source2_ = self + if source2_.is_Success: + d_4___mcc_h0_ = source2_.value + d_5_s_ = d_4___mcc_h0_ + return Wrappers_Compile.Option_Some(d_5_s_) + elif True: + d_6___mcc_h1_ = source2_.error + d_7_e_ = d_6___mcc_h1_ + return Wrappers_Compile.Option_None() + + def UnwrapOr(self, default): + source3_ = self + if source3_.is_Success: + d_8___mcc_h0_ = source3_.value + d_9_s_ = d_8___mcc_h0_ + return d_9_s_ + elif True: + d_10___mcc_h1_ = source3_.error + d_11_e_ = d_10___mcc_h1_ + return default + + def IsFailure(self): + return (self).is_Failure + + def PropagateFailure(self): + return Wrappers_Compile.Result_Failure((self).error) + + def MapFailure(self, reWrap): + source4_ = self + if source4_.is_Success: + d_12___mcc_h0_ = source4_.value + d_13_s_ = d_12___mcc_h0_ + return Wrappers_Compile.Result_Success(d_13_s_) + elif True: + d_14___mcc_h1_ = source4_.error + d_15_e_ = d_14___mcc_h1_ + return Wrappers_Compile.Result_Failure(reWrap(d_15_e_)) + + def Extract(self): + return (self).value + + +class Result_Success(Result, NamedTuple('Success', [('value', Any)])): + def __dafnystr__(self) -> str: + return f'Wrappers_Compile.Result.Success({_dafny.string_of(self.value)})' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, Wrappers_Compile.Result_Success) and self.value == __o.value + def __hash__(self) -> int: + return super().__hash__() + +class Result_Failure(Result, NamedTuple('Failure', [('error', Any)])): + def __dafnystr__(self) -> str: + return f'Wrappers_Compile.Result.Failure({_dafny.string_of(self.error)})' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, Wrappers_Compile.Result_Failure) and self.error == __o.error + def __hash__(self) -> int: + return super().__hash__() + + +class Outcome: + @classmethod + def default(cls, ): + return lambda: Outcome_Pass() + def __ne__(self, __o: object) -> bool: + return not self.__eq__(__o) + @property + def is_Pass(self) -> bool: + return isinstance(self, Wrappers_Compile.Outcome_Pass) + @property + def is_Fail(self) -> bool: + return isinstance(self, Wrappers_Compile.Outcome_Fail) + def IsFailure(self): + return (self).is_Fail + + def PropagateFailure(self): + return Wrappers_Compile.Result_Failure((self).error) + + +class Outcome_Pass(Outcome, NamedTuple('Pass', [])): + def __dafnystr__(self) -> str: + return f'Wrappers_Compile.Outcome.Pass' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, Wrappers_Compile.Outcome_Pass) + def __hash__(self) -> int: + return super().__hash__() + +class Outcome_Fail(Outcome, NamedTuple('Fail', [('error', Any)])): + def __dafnystr__(self) -> str: + return f'Wrappers_Compile.Outcome.Fail({_dafny.string_of(self.error)})' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, Wrappers_Compile.Outcome_Fail) and self.error == __o.error + def __hash__(self) -> int: + return super().__hash__() + + +class default__: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "Wrappers_Compile._default" + @staticmethod + def Need(condition, error): + if condition: + return Wrappers_Compile.Outcome_Pass() + elif True: + return Wrappers_Compile.Outcome_Fail(error) + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/__pycache__/SimpleBooleanImplTest_Compile.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/__pycache__/SimpleBooleanImplTest_Compile.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1a528439c7425754308f9bd074858c5e953a5f36 GIT binary patch literal 6992 zcmeHMOKcm*8J=Cfmeh+9E%}kSp<~H4VOtC-zgpLYEy?nusN_^~T(gcB40jZhUUHe) zrERGaDg-|GkXunWM;%(%u7M!O9&>2#6tRJb0Sp)j0<<@|c2K~l{{JkO#$DW=D0r#nWKnwK~@)bs0=Whg_{0Rbgh(cF_a03uwPe-;Y?VBB|Vafi1J;TF5!1)x`p49=@ouorcVpd=rtMJ zH05*TV~LUi^vH2Ey4?+u%z#Wz6D@d)Xra51|A8oj$(fiY&60%jcZ^IY{9KvH>U#DA zopRsF(gF|7EtKhdS;iyN*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n)Q z8OD9H^dlZ90~NI3>Kt@v9J0MbovN#AG?Sk0in=N$kf)KLE zB;+vv0_ML$z5$YVTCxvcSU>!J?eP0wUdh>44ExFr`^qvL)v7cj1H)6Li^%ZMgM(X@ zF5%gZ9>k7hFai?8mqqxp3`Fly|JL>B?pk#BA5PiBhwS0w_VC2|aIQ9-`%<$I1%NdI zG>pqrSdvPo1zvy$v5_+v0SV#$vls^Xat!jnKp$kL$yzMA7E9T&)NQ3cu*2@(wI1D9 zi|)I3YAu?!qv=2UYkkM7eaBx+Spobi@~^Sa75O(f!V|uW2zM3vmk567K}?e`Idt}t zfI^fWDEwOK{iOSM@7aSRt5??sllEW|GK3?*cf%3jyY1pN4#IAJjf1aoaC++1gn2~)0kC2ei7hY>3nmZ3n;^W{F}!RtBwq|KiYy3%`-@rY zD#J@659ck)EciEu$?%%TLyZX*4+cCm3lG?|sPgUNxpB1ZwQ>sZJs*;#Vh!s{ih*lcB2jtCKgX-tQ6V zT@k-J=~)rKdP@_plEzmjTdVH(D75F^-dZSKb-#Li_wT#zow4K4rJWo86Osgz-dR2t L`ll~Q6|3|w!)yCB literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/__pycache__/SimpleBooleanImpl_Compile.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/__pycache__/SimpleBooleanImpl_Compile.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b0232e44d0042759318a6cfc6ab9b46c31d99004 GIT binary patch literal 6188 zcmc&&-ER~}67QMa*$><6S$mDae4N)949kZN#2mqJ2!anAIDEnD1X!XQEjwepW_D-k znFYLO6f3e6M>;8&6A^y62S0HjUh5J+mL<50OYA z*E?I&T~*yvUERN$>iJtF(mMidy(!hi?vYe8yNfAN7L@26 z9-pc6m&j+FLMB^W3y2c!s8mU+l_x_)4$Klc_yqKyvpy(J#h4@nlCT1GMUaEHiC5=| zA9}#wDXBKr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T5!~h3! zpBmIcV#v<>RY41jVLQ*M5iw%-kBU({Z4=w@h_lXtNjYw<4?>Xlv41tl0JOszbEA*ZV~+X_tmX}9(EIwE?574MMpiB7 zw497+E7h5cR86|5TBmd!Ww%`?anc18sa8`)CD zoMZz+C*v&9wbOFGSlM5yWZ&rgGNlR?B&kp=u$|2$*EX4PWeK)^Bg9}H)rGc2|0>HO z8YI{(lj2_<1zZAtbSCp=>yVmLlNcMH#2Gk8M_>W8O_CJYmthjN%&yjDuFF%f(eC|+)~n3ar@uk;`NVBl!_SZ_K` z12&mx)S;mXHi(9r&1tB4u?ZXp?etu8w@qJDdfG7_&N$7=5xtl%OwjNJQmdDIA^4~MJ5wx1GPtVExcNLz^kD>1yBxK>MC`(f;+HFnDyo3h4;H8%SjLgSpo z|KcPsA(8o4PQpqZx1hjqF;L&Ji;Y?D+_Rh-sHFy$QU|Tn!3N^P@#o1NE4inEP`|?e ziqHhFL8l4+F3)7s{6!xdXoA1wvxS$S)DOs|;;#T2h>OKny3@;DgSD=~rLG~XYiKe0 zT-a?1*=6BWO*r*zcuBZw30JFb{NJ?v=S|C(|AJ{5IOy6I(#@Dcz(x{qs>n6~uq0$V zz&ijt0Cobr3(yPD2e69)O?f$fR#pulc}kH61~y~)A&IuJx&xcjynUU__DC~ZH{-co z1+%Xc{mAjEu>CC)edl{@%zEeE<5V zL?e=<=}K9JJabIGD9fr-Lpne&K4z{77(?1-n6g>OX_$Fv3fapr@Oe|z!wQfc zw`<2+Yh4j^8|Umj+sjIKvh7q18f0%Ddx8kO48#ur9uNWNh59wwoFw3l&~U-T#AIH& zLBJ2Aq2@W+mzajGGye^1l5>6g?6)=3^0a1}ua)aDIuyyY3}g^+VVnc=9^z}^xHH$s zWSBJpZ^?MUpyA^ literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/__pycache__/Wrappers_Compile.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/__pycache__/Wrappers_Compile.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..51fa3e8895f5318fa4f99d92a14908c8a0302e18 GIT binary patch literal 14810 zcmd5jTW}OtcHQ$Hy;^8^NeD9_fh{l^F+3N6BtUDISu>Im#xRiW3^Oed%tO9CGL|9{ z?Uu6EZd}QF%Pv&OZc3YMSco?%Hn9^v^1%nG%11tWl-aVXtG0@&Bp>+`B|cLA$~pJm z?&-$}8J+3A_uPBWJ@=e*&pEgC%li5n0j{OY%bEY&APE1355`4n;9>byk09I> zGD1eo3Q7F+WW}5(>B)JM-kdM#%lVUj5zD>VKrWaJ(tBSvlnW=r^j^%?Bx`8<+GH*L ztxMKr{7U^b=vfd{&q?9?q9R;vFoss@n~hr`DS3p~g-l>Z$OLZz{-?AJRwo;2O$chj z3fwFHOwDD%j&sWgE#Qw`$u+b^EwrfPE$TB3ig(y^S$txv+5MnGLI;WF2j{5!y97C|OTyTA*f=0{1{k>r=R~fwtHTEnea+ zwycVVjkH}9+HG~v(3}y6gpO_hi|kHx`1H_;R5qKslvQ-^vHZ9mJTpG3oJ|qECXvc1 znKNUfS*1hN{lnQpf#6NLFqSXsjqi}u=%_+e`9vW%I+9h=eEsN;v6{<2g2$VJA|%C( zkn||tj5s6Qg0fFd?4&Q_0X}$@z_2gloAD)sN{BvrGX5E#12=5e1zdGCnc$27vJ0{X zk{bqCpQ!=ZkO5grN|`#Cb-f-K7%h$z@@df|KoIcW3xCTY0H8%cBj9=xwke@VM-b^H zid3|8U?*}&xFaTjQMGI&IZ?f!+L>wLlRx@s>f@by=OEWYAt|i;i1&7 z!8g=SJJM@p&MCQ|2Z&M}Bl)yxK%fCG4PBm2xVb4z3iI&mz9z+6K*p!$y41lU5*!tX z49K$bt}J(Wbf2nZhY8qGFlhjyoN7SGE3!OM&xvM_IL~FoofZ}&8*X<0qh&qy2i>Z8CAz|o^NC57L zq!oT_3?EUcjF}AQ&s12~1M;-+KT`8t`){IM<>--;bhI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RVhh^IuIyWxkU3BIqY=dDfUOT?PG?E`F!fRqp z#&NR@3dPF)36b&C1(YdNH|t{?@@lurW|xl3e2A)~ux)a^m5RzsZ2ydu7_X}B)TEtE zb`3^CE!|z{4uctSJZT`!MJ(sn>T*b7`zedHf1@KfGpK$>z|U6b?tu#rul$G8g?wfN z|LcQ>rB*H0eF;U$Of*#Hi_iCh9qyLKKG@?U?l%4(~y9t7Sgg+JELYX!{ z_*z&!?rR)Crg<0J4|idy1w8bxS@QV&hn55Y=p{DIT&xt(QYKM2Qb!BC(KfE?f#Ucm zyah#YDTxn(9|3w{x-XY1ULh!udU&J=Z??j#t|~#X(1ZL%S@tSbaA;gDDmj@l!l+YO z;DymBdjk_KCCzlRqx%kgq|URsgp>yk=D>fju(5i`zd;LBH}#hwC`(>Z6c>e>Y5G|d z_G?f3E(+^4`*%^;q}jg@g@$SRSrqE0>1WX>c^GV-JGT(rt{LCO$oh}F=iV^LmOZXi>{y8#2j@=Cot%H~HYv5n%dPQMlgHcL-Egn%Zi5!< bEw%QQTl<{Nn`%YSFE@CEWsj>=P>uV4aiU$* literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/__pycache__/_dafny.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/__pycache__/_dafny.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..968342d3a13c19bd9b0f446aaec48161f5396be4 GIT binary patch literal 34539 zcmd6Q3v?UTdFBjW1PG8r5~N7#MNp(H(UM3>d`OmL$&^UyO+O^NHvOO>0+c9$1T_Qd zflvvPDhcQ^HRP4oup`xUYNu2zZ<(&$D5=xqlkM3yr%e}7u@x6vo%Lx?&Z*DYJxj0L zJzjP9bie=JnZe9}l8EC_!`H`?V= z9e4iLCJ3(xA)!wQi6L7=>=W^CkJyIoeRh%j91+K`v(L%g&WLNcsIQ2*T@m-Nr_aOO zMUmoRZ=aXB-4Wk#Nn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o}^d=gqMKiT%#IBgJD?rFyZ&TaClp)NR!c1M5d8+j$8L1^RwPeKdW-RZbw-cr? z`js%dEzBCioGHxJg}J9%Z%alhZ>I7_Og3ZkzIwZ`EnF~!i>7d~E?j(y^w#W0LZXS- zKzOHb!0dw)1|62zZxO^_SJ}I?(kWDBe?_4x`x_QUoaPGLZ3-=OHgcIlGP^<{S^;#J zmdt@LoID4@aPox0O%9mYoU~;)WIr1l7>}XPW08q4_xYjmkqpe;|m-J#D zZl)DgCTT#mB7`)wXWt(7HE9<#Qm9>lVzc`-S%we6qC16`;h%pmPZ7`GSKQ*GP4+y) zgJNiTn?v5dtt)#`tqwb;XtPWAgP1kV^6Iq;-0FlzfQW|{G@?gnFwgRoBz=X@7oHU; z!riJv1Xd$7T1Kd2Kn7@!Zyw^BxRfIYDKuyYVKc3#0g%R8ru`D>Jf|$)9zq5wg(EhF zRuENd>B5encJ*`5|MOPwDRL6V()X|SZz!4^!!QjL+_b+2I#J&*H&DFp%nkHh-I;Hp z@TUDWP-xTs8oQW7b=1xcbhzHh4fJBYlW+Ni>(kr5gY`~s1VeBC str: + if hasattr(value, '__dafnystr__'): + return value.__dafnystr__() + elif value is None: + return "null" + elif isinstance(value, bool): + return "true" if value else "false" + elif isinstance(value, str): + # This is only for Dafny char values. + # Dafny strings are represented as Seq's of individual char values, + # and Seq defines __dafnystr__. + return string_from_utf_16(value) + elif isinstance(value, tuple): + return '(' + ', '.join(map(string_of, value)) + ')' + elif isinstance(value, FunctionType): + return "Function" + else: + return str(value) + +@dataclass +class Break(Exception): + target: str + +@dataclass +class Continue(Exception): + target: str + +class TailCall(Exception): + pass + +@contextmanager +def label(name: str = None): + try: + yield + except Break as g: + if g.target != name: + raise g + except TailCall as g: + if name is not None: + raise g + +@contextmanager +def c_label(name: str = None): + try: + yield + except Continue as g: + if g.target != name: + raise g + +class CodePoint(str): + + escapes = { + '\n' : "\\n", + '\r' : "\\r", + '\t' : "\\t", + '\0' : "\\0", + '\'' : "\\'", + '\"' : "\\\"", + '\\' : "\\\\", + } + + def __escaped__(self): + return self.escapes.get(self, self) + + def __dafnystr__(self): + return f"'{self.__escaped__()}'" + +class Seq(tuple): + def __init__(self, __iterable = None, isStr = False): + ''' + isStr defines whether this value should be tracked at runtime as a string (a.k.a. seq) + It accepts three different values: + - True: this value is definitely a string, mark it as such + - False: this value might be a string, apply heuristics to make a best guess + - None: don't apply heuristics, don't mark it as a string + + None is used when --unicode-char is true, to ensure consistent printing of strings + across backends without depending on any runtime tracking. + See docs/Compilation/StringsAndChars.md. + ''' + + if __iterable is None: + __iterable = [] + if isStr is None: + self.isStr = False + else: + self.isStr = isStr \ + or isinstance(__iterable, str) \ + or (isinstance(__iterable, Seq) and __iterable.isStr) \ + or (not isinstance(__iterable, GeneratorType) + and all(isinstance(e, str) and len(e) == 1 for e in __iterable) + and len(__iterable) > 0) + + @property + def Elements(self): + return self + + @property + def UniqueElements(self): + return frozenset(self) + + def VerbatimString(self, asliteral): + if asliteral: + return f"\"{''.join(map(lambda c: c.__escaped__(), self))}\"" + else: + return ''.join(self) + + def __dafnystr__(self) -> str: + if self.isStr: + # This should never be true when using --unicode-char, + # so it is safe to assume we are a sequence of UTF-16 code units. + return string_from_utf_16(self) + return '[' + ', '.join(map(string_of, self)) + ']' + + def __add__(self, other): + return Seq(super().__add__(other), isStr=self.isStr and other.isStr) + + def __getitem__(self, key): + if isinstance(key, slice): + indices = range(*key.indices(len(self))) + return Seq((self[i] for i in indices), isStr=self.isStr) + return super().__getitem__(key) + + def set(self, key, value): + l = list(self) + l[key] = value + return Seq(l, isStr=self.isStr) + + def __hash__(self) -> int: + return hash(tuple(self)) + + def __lt__(self, other): + return len(self) < len(other) and self == other[:len(self)] + + def __le__(self, other): + return len(self) <= len(other) and self == other[:len(self)] + +class Array: + class Box(list): + def __dafnystr__(self) -> str: + return '[' + ', '.join(map(string_of, self)) + ']' + + def __init__(self, initValue, *dims): + self.arr = initValue + self.dims = list(dims) + for i in reversed(self.dims): + self.arr = Array.Box([copy.copy(self.arr) for _ in range(i)]) + + def __dafnystr__(self) -> str: + return '[' + ', '.join(map(string_of, self.arr)) + ']' + + def __str__(self): + return self.__dafnystr__() + + def length(self, i): + return self.dims[i] if i < len(self.dims) else None + + def __len__(self): + return self.length(0) + + def __getitem__(self, key): + if not isinstance(key, Iterable): + return self.arr[key] + arr = self.arr + for i in key: + arr = arr[i] + return arr + + def __setitem__(self, key, value): + if not isinstance(key, Iterable): + self.arr[key] = value + return + arr = self.arr + for i in range(len(key)-1): + arr = arr[key[i]] + arr[key[-1]] = value + +class Set(frozenset): + @property + def Elements(self): + return self + + @property + def AllSubsets(self): + # https://docs.python.org/3/library/itertools.html#itertools-recipes + s = list(self) + return map(Set, chain.from_iterable(combinations(s, r) for r in range(len(s)+1))) + + def __dafnystr__(self) -> str: + return '{' + ', '.join(map(string_of, self)) + '}' + + def union(self, other): + return Set(super().union(self, other)) + + def intersection(self, other): + return Set(super().intersection(other)) + + def ispropersubset(self, other): + return self.issubset(other) and self != other + + def __or__(self, other): + return self.union(other) + + def __sub__(self, other): + return Set(super().__sub__(other)) + +class MultiSet(Counter): + def __dafnystr__(self) -> str: + return 'multiset{' + ', '.join(map(string_of, self.elements())) + '}' + + def __len__(self): + return reduce(lambda acc, key: acc + self[key], self, 0) + + def union(self, other): + return MultiSet(self + other) + + def __or__(self, other): + return self.union(other) + + def intersection(self, other): + return MultiSet(self & other) + + def __sub__(self, other): + return MultiSet(super().__sub__(other)) + + @property + def keys(self): + return Set(key for key in self if self[key] > 0) + + @property + def Elements(self): + return self.elements() + + @property + def UniqueElements(self): + return self.keys + + def isdisjoint(self, other): + return frozenset(self.keys).isdisjoint(frozenset(other.keys)) + + def issubset(self, other): + return all(self[key] <= other[key] for key in frozenset(self).union(frozenset(other))) + + def ispropersubset(self, other): + return self.issubset(other) and len(self) < len(other) + + def set(self, key, value): + set = Counter(self) + set[key] = value + return MultiSet(set) + + def __hash__(self): + return hash(frozenset(self.keys)) + + def __eq__(self, other): + return all(self[key] == other[key] for key in self.keys | other.keys) + + def __setattr__(self, key, value): + raise TypeError("'Map' object is immutable") + + def __contains__(self, item): + return self[item] > 0 + +class Map(dict): + def __dafnystr__(self) -> str: + return 'map[' + ', '.join(map(lambda i: f'{string_of(i[0])} := {string_of(i[1])}', self.items)) + ']' + + @property + def Elements(self): + return self + + @property + def keys(self): + return Set(super().keys()) + + @property + def values(self): + return Set(super().values()) + + @property + def items(self): + return Set(super().items()) + + def set(self, key, value): + map = dict(self) + map[key] = value + return Map(map) + + def __sub__(self, other): + map = dict(self) + for key in list(other): + map.pop(key, None) + return Map(map) + + def __or__(self, other): + map = dict(self) + for k, v in other.items: + map[k] = v + return Map(map) + + def __hash__(self): + return hash(frozenset(self)) + + def __setattr__(self, key, value): + raise TypeError("'Map' object is immutable") + +class BigOrdinal: + @staticmethod + def is_limit(ord): + return ord == 0 + + @staticmethod + def is_succ(ord): + return 0 < ord + + @staticmethod + def offset(ord): + return ord + + @staticmethod + def is_nat(ord): + # at run time, every ORDINAL is a natural number + return True + +class BigRational(Fraction): + def __dafnystr__(self): + if self.denominator == 1: + return f"{self.numerator}.0" + correction = self.divides_a_power_of_10(self.denominator) + if correction is None: + return f"({self.numerator}.0 / {self.denominator}.0)" + compensation, shift = correction + if self.numerator < 0: + sign, digits = "-", str(-self.numerator*compensation) + else: + sign, digits = "", str(self.numerator*compensation) + if shift < len(digits): + n = len(digits) - shift + return f"{sign}{digits[:n]}.{digits[n:]}" + return f"{sign}0.{'0' * (shift - len(digits))}{digits}" + + @staticmethod + def isolate_factor(f, x): + y = 0 + while x > 1 and x % f == 0: + y += 1 + x //= f + return x, y + + @staticmethod + def divides_a_power_of_10(x): + rem, expA = BigRational.isolate_factor(10, x) + if rem % 5 == 0 or rem % 2 == 0 or rem == 1: + major, minor = (5, 2) if rem % 5 == 0 else (2, 5) + rem, expB = BigRational.isolate_factor(major, rem) + return (minor**expB, expA+expB) if rem == 1 else None + return None + + def __add__(self, other): + return BigRational(super().__add__(other)) + + def __sub__(self, other): + return BigRational(super().__sub__(other)) + + def __mul__(self, other): + return BigRational(super().__mul__(other)) + + def __truediv__(self, other): + return BigRational(super().__truediv__(other)) + +def plus_char(a, b): + return chr(ord(a) + ord(b)) + +def minus_char(a, b): + return chr(ord(a) - ord(b)) + +def euclidian_division(a, b): + if 0 <= a: + if 0 <= b: + return a // b + else: + return -(a // (-b)) + else: + if 0 <= b: + return -((-a-1) // b) - 1 + else: + return (-a-1) // (-b) + 1 + +def euclidian_modulus(a, b): + bp = abs(b) + if 0 <= a: + return a % bp + c = (-a) % bp + return c if c == 0 else bp - c + +@dataclass +class HaltException(Exception): + message: str + +def quantifier(vals, frall, pred): + for u in vals: + if pred(u) != frall: + return not frall + return frall + +def AllBooleans(): + return [False, True] + +def AllChars(): + return (chr(i) for i in range(0x10000)) + +def AllUnicodeChars(): + return chain((CodePoint(chr(i)) for i in range(0xD800)), + (CodePoint(chr(i)) for i in range(0xE000, 0x11_0000))) + +def AllIntegers(): + return (i//2 if i % 2 == 0 else -i//2 for i in count(0)) + +def IntegerRange(lo, hi): + if lo is None: + return count(hi-1, -1) + if hi is None: + return count(lo) + return range(lo, hi) + +class Doubler: + def __init__(self, start): + self.start = start + + def __iter__(self): + i = self.start + while True: + yield i + i *= 2 + +class defaults: + bool = staticmethod(lambda: False) + char = staticmethod(lambda: 'D') + int = staticmethod(lambda: 0) + real = staticmethod(BigRational) + pointer = staticmethod(lambda: None) + tuple = staticmethod(lambda *args: lambda: tuple(a() for a in args)) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/module_.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/module_.py new file mode 100644 index 0000000000..3307c1412d --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/module_.py @@ -0,0 +1,101 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny +import System_ +import SimpleBooleanImplTest_Compile +import Dafny.Simpletypes.Boolean.Wrapped +import WrappedSimpleTypesBooleanTest_Compile + +assert "module_" == __name__ +module_ = sys.modules[__name__] + +class default__: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "_module._default" + @staticmethod + def Main(noArgsParameter__): + d_12_success_: bool + d_12_success_ = True + _dafny.print(_dafny.string_of(_dafny.Seq("SimpleBooleanImplTest.GetBooleanTrue: ")) + ) + try: + if True: + SimpleBooleanImplTest_Compile.default__.GetBooleanTrue() + if True: + _dafny.print(_dafny.string_of(_dafny.Seq("PASSED\n")) + ) + except _dafny.HaltException as e: + d_13_haltMessage_ = e.message + if True: + _dafny.print(_dafny.string_of(_dafny.Seq("FAILED\n ")) + ) + _dafny.print(_dafny.string_of(d_13_haltMessage_) + ) + _dafny.print(_dafny.string_of(_dafny.Seq("\n")) + ) + d_12_success_ = False + _dafny.print(_dafny.string_of(_dafny.Seq("SimpleBooleanImplTest.GetBooleanFalse: ")) + ) + try: + if True: + SimpleBooleanImplTest_Compile.default__.GetBooleanFalse() + if True: + _dafny.print(_dafny.string_of(_dafny.Seq("PASSED\n")) + ) + except _dafny.HaltException as e: + d_14_haltMessage_ = e.message + if True: + _dafny.print(_dafny.string_of(_dafny.Seq("FAILED\n ")) + ) + _dafny.print(_dafny.string_of(d_14_haltMessage_) + ) + _dafny.print(_dafny.string_of(_dafny.Seq("\n")) + ) + d_12_success_ = False + _dafny.print(_dafny.string_of(_dafny.Seq("WrappedSimpleTypesBooleanTest.GetBooleanTrue: ")) + ) + try: + if True: + WrappedSimpleTypesBooleanTest_Compile.default__.GetBooleanTrue() + if True: + _dafny.print(_dafny.string_of(_dafny.Seq("PASSED\n")) + ) + except _dafny.HaltException as e: + d_15_haltMessage_ = e.message + if True: + _dafny.print(_dafny.string_of(_dafny.Seq("FAILED\n ")) + ) + _dafny.print(_dafny.string_of(d_15_haltMessage_) + ) + _dafny.print(_dafny.string_of(_dafny.Seq("\n")) + ) + d_12_success_ = False + _dafny.print(_dafny.string_of(_dafny.Seq("WrappedSimpleTypesBooleanTest.GetBooleanFalse: ")) + ) + try: + if True: + WrappedSimpleTypesBooleanTest_Compile.default__.GetBooleanFalse() + if True: + _dafny.print(_dafny.string_of(_dafny.Seq("PASSED\n")) + ) + except _dafny.HaltException as e: + d_16_haltMessage_ = e.message + if True: + _dafny.print(_dafny.string_of(_dafny.Seq("FAILED\n ")) + ) + _dafny.print(_dafny.string_of(d_16_haltMessage_) + ) + _dafny.print(_dafny.string_of(_dafny.Seq("\n")) + ) + d_12_success_ = False + if not(d_12_success_): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(7,18): " + _dafny.string_of(_dafny.Seq("Test failures occurred: see above.\n")) + ) + diff --git a/TestModels/SimpleTypes/SimpleBoolean/smithy-build.json b/TestModels/SimpleTypes/SimpleBoolean/smithy-build.json index 532ee3c70e..5381ae80b5 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/smithy-build.json +++ b/TestModels/SimpleTypes/SimpleBoolean/smithy-build.json @@ -8,7 +8,7 @@ "service": "simple.types.boolean#SimpleBoolean", "module": "simple_boolean", "moduleVersion": "0.0.1", - "protocolDefinition": "aws.polymorph#localService" + "protocol": "aws.polymorph#localService" } } } diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/resources/META-INF/services/software.amazon.smithy.build.SmithyBuildPlugin b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/resources/META-INF/services/software.amazon.smithy.build.SmithyBuildPlugin deleted file mode 100644 index 9df651510d..0000000000 --- a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/resources/META-INF/services/software.amazon.smithy.build.SmithyBuildPlugin +++ /dev/null @@ -1,6 +0,0 @@ -# -# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -# SPDX-License-Identifier: Apache-2.0 -# - -software.amazon.smithy.python.codegen.PythonClientCodegenPlugin diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/resources/META-INF/services/software.amazon.smithy.python.codegen.integration.PythonIntegration b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/resources/META-INF/services/software.amazon.smithy.python.codegen.integration.PythonIntegration deleted file mode 100644 index 8f4f600b51..0000000000 --- a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/resources/META-INF/services/software.amazon.smithy.python.codegen.integration.PythonIntegration +++ /dev/null @@ -1,6 +0,0 @@ -# -# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -# SPDX-License-Identifier: Apache-2.0 -# - -software.amazon.smithy.dafny.python.DafnyTestIntegration diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/resources/software/amazon/smithy/python/codegen/reserved-class-names.txt b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/resources/software/amazon/smithy/python/codegen/reserved-class-names.txt deleted file mode 100644 index a0a78e1853..0000000000 --- a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/resources/software/amazon/smithy/python/codegen/reserved-class-names.txt +++ /dev/null @@ -1,15 +0,0 @@ -# -# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -# SPDX-License-Identifier: Apache-2.0 -# -# Python reserved words for class names -# -# Most of python's reserved words are lower-case, so there isn't much -# here. Furthermore, import aliases can resolve any other conflicts -# with non-reserved builtins or other conflicting classes. -# -# A full list of reserved words can be found here: -# https://docs.python.org/3/reference/lexical_analysis.html#keywords -True -False -None diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/resources/software/amazon/smithy/python/codegen/reserved-member-names.txt b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/resources/software/amazon/smithy/python/codegen/reserved-member-names.txt deleted file mode 100644 index 1831fb341f..0000000000 --- a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/resources/software/amazon/smithy/python/codegen/reserved-member-names.txt +++ /dev/null @@ -1,83 +0,0 @@ -# -# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. -# SPDX-License-Identifier: Apache-2.0 -# -# Python reserved words for members. - -# The following are reserved words that can't be used as identifiers at all. -# For example, the following would produce a syntax error: -# -# class Foo: -# pass: int -# -# A full list of these can be found here: -# -# https://docs.python.org/3/reference/lexical_analysis.html#keywords -# -# Note that None, True, and False aren't here - members are always lower -# cased, so they'll never match here. Those are in the clas names reserve -# list. -and -as -assert -async -await -break -class -continue -def -del -elif -else -except -finally -for -from -global -if -import -in -is -lambda -nonlocal -not -or -pass -raise -return -try -while -with -yield - -# The following aren't reserved words, but are built-in types / functions that -# would break if you ever tried to refer to the type again in scope. For -# example: -# -# class Foo: -# str: str -# -# def __init__(self, str: str): -# pass -# -# That would have an exception in the definition of __init__ since when you use -# `str` as the type after you've defined `str` in scope, it thinks you're -# referencing `Foo.str` rather than the built-in type (or a type at all). -# -# A listing of these types can be found here: -# https://docs.python.org/3/library/stdtypes.html -# -# Note though that we only need to escape the types we use. -bool -bytes -bytearray -dict -float -int -list -str - -# For the exact same reason as above, these are names of common types -# that are likely imported in the generated code (e.g. datetime) -# We only escape the types we use. -datetime From 47c3d35c328409bef54d118dcb801a1865f993e9 Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Thu, 6 Apr 2023 16:23:25 -0700 Subject: [PATCH 008/673] add wrapping files --- TestModels/SharedMakefile.mk | 45 ++- TestModels/SimpleTypes/SimpleBoolean/Makefile | 2 +- .../SimpleBoolean/Model/SimpleBoolean.smithy | 2 +- .../SimpleBoolean/build.gradle.kts | 3 +- .../__pycache__/__init__.cpython-311.pyc | Bin 1714 -> 0 bytes .../__pycache__/Boolean.cpython-311.pyc | Bin 4060 -> 0 bytes ...leTypesBooleanTest_Compile.cpython-311.pyc | Bin 3651 -> 0 bytes .../Simpletypes/Boolean/Types/__init__.py | 6 +- .../__pycache__/__init__.cpython-311.pyc | Bin 17095 -> 17101 bytes .../Simpletypes/Boolean/Wrapped/__init__.py | 3 + .../__pycache__/__default.cpython-311.pyc | Bin 0 -> 1279 bytes .../__pycache__/__init__.cpython-311.pyc | Bin 0 -> 1892 bytes .../Dafny/Simpletypes/Boolean/__init__.py | 2 +- .../__pycache__/Wrapped.cpython-311.pyc | Bin .../__pycache__/__init__.cpython-311.pyc | Bin 0 -> 4188 bytes .../__pycache__/Boolean.cpython-311.pyc | Bin 0 -> 4179 bytes .../__pycache__/__init__.cpython-311.pyc | Bin 4195 -> 4187 bytes .../python/TestsFromDafny_py/Extern.py | 22 ++ .../runtimes/python/TestsFromDafny_py/Shim.py | 31 ++ .../SimpleBooleanImplTest_Compile.py | 2 + .../SimpleBooleanImpl_Compile.py | 1 + .../StandardLibrary_Compile.py | 0 .../StandardLibrary_mUInt_Compile.py | 0 .../System_.py | 0 .../UTF8.py | 0 .../WrappedSimpleTypesBooleanTest_Compile.py | 1 + .../Wrappers_Compile.py | 0 .../__init__.py} | 0 .../__pycache__/Extern.cpython-311.pyc | Bin 0 -> 1354 bytes .../ManualTypeConversion.cpython-311.pyc | Bin 0 -> 503 bytes .../__pycache__/Shim.cpython-311.pyc | Bin 0 -> 2384 bytes ...pleBooleanImplTest_Compile.cpython-311.pyc | Bin 6992 -> 7243 bytes .../SimpleBooleanImpl_Compile.cpython-311.pyc | Bin 6188 -> 6306 bytes .../__pycache__/System_.cpython-311.pyc | Bin ...leTypesBooleanTest_Compile.cpython-311.pyc | Bin 0 -> 3728 bytes .../Wrappers_Compile.cpython-311.pyc | Bin .../__pycache__/_dafny.cpython-311.pyc | Bin .../__pycache__/module_.cpython-311.pyc | Bin 6400 -> 6425 bytes .../_dafny.py | 0 .../module_.py | 1 + .../simple_boolean/__init__.py | 1 + .../__pycache__/__init__.cpython-311.pyc | Bin 0 -> 250 bytes .../__pycache__/client.cpython-311.pyc | Bin 0 -> 12665 bytes .../__pycache__/config.cpython-311.pyc | Bin 0 -> 1507 bytes .../__pycache__/deserialize.cpython-311.pyc | Bin 0 -> 800 bytes .../__pycache__/errors.cpython-311.pyc | Bin 0 -> 1819 bytes .../__pycache__/models.cpython-311.pyc | Bin 0 -> 5271 bytes .../__pycache__/serialize.cpython-311.pyc | Bin 0 -> 778 bytes .../simple_boolean/client.py | 369 ++++++++++++++++++ .../simple_boolean/config.py | 28 ++ .../simple_boolean/deserialize.py | 11 + .../simple_boolean/errors.py | 23 ++ .../simple_boolean/models.py | 108 +++++ .../simple_boolean/serialize.py | 11 + .../SimpleBoolean/settings.gradle.kts | 2 - .../SimpleBoolean/smithy-build.json | 18 +- .../SimpleTypes/SimpleBoolean/src/Index.dfy | 2 +- .../SimpleBoolean/src/SimpleBooleanImpl.dfy | 2 +- .../src/WrappedSimpleBooleanImpl.dfy | 2 +- .../test/SimpleBooleanImplTest.dfy | 2 +- codegen/smithy-dafny-codegen/build.gradle.kts | 3 + .../dafny/python/DafnyTestIntegration.java | 7 +- 62 files changed, 681 insertions(+), 29 deletions(-) delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Dafny/Simpletypes/Boolean/Wrapped/__pycache__/__init__.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Dafny/Simpletypes/__pycache__/Boolean.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/__pycache__/WrappedSimpleTypesBooleanTest_Compile.cpython-311.pyc rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{TestsFromDafny-py => TestsFromDafny_py}/Dafny/Simpletypes/Boolean/Types/__init__.py (97%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{TestsFromDafny-py => TestsFromDafny_py}/Dafny/Simpletypes/Boolean/Types/__pycache__/__init__.cpython-311.pyc (77%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{TestsFromDafny-py => TestsFromDafny_py}/Dafny/Simpletypes/Boolean/Wrapped/__init__.py (82%) create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/Boolean/Wrapped/__pycache__/__default.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/Boolean/Wrapped/__pycache__/__init__.cpython-311.pyc rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{TestsFromDafny-py => TestsFromDafny_py}/Dafny/Simpletypes/Boolean/__init__.py (97%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{TestsFromDafny-py => TestsFromDafny_py}/Dafny/Simpletypes/Boolean/__pycache__/Wrapped.cpython-311.pyc (100%) create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/Boolean/__pycache__/__init__.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/__pycache__/Boolean.cpython-311.pyc rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{TestsFromDafny-py/Dafny/Simpletypes/Boolean => TestsFromDafny_py/Dafny/Simpletypes}/__pycache__/__init__.cpython-311.pyc (80%) create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Extern.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Shim.py rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{TestsFromDafny-py => TestsFromDafny_py}/SimpleBooleanImplTest_Compile.py (98%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{TestsFromDafny-py => TestsFromDafny_py}/SimpleBooleanImpl_Compile.py (97%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{TestsFromDafny-py => TestsFromDafny_py}/StandardLibrary_Compile.py (100%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{TestsFromDafny-py => TestsFromDafny_py}/StandardLibrary_mUInt_Compile.py (100%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{TestsFromDafny-py => TestsFromDafny_py}/System_.py (100%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{TestsFromDafny-py => TestsFromDafny_py}/UTF8.py (100%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{TestsFromDafny-py => TestsFromDafny_py}/WrappedSimpleTypesBooleanTest_Compile.py (97%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{TestsFromDafny-py => TestsFromDafny_py}/Wrappers_Compile.py (100%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{TestsFromDafny-py/TestsFromDafny.py => TestsFromDafny_py/__init__.py} (100%) create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/Extern.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/ManualTypeConversion.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/Shim.cpython-311.pyc rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{TestsFromDafny-py => TestsFromDafny_py}/__pycache__/SimpleBooleanImplTest_Compile.cpython-311.pyc (62%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{TestsFromDafny-py => TestsFromDafny_py}/__pycache__/SimpleBooleanImpl_Compile.cpython-311.pyc (50%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{TestsFromDafny-py => TestsFromDafny_py}/__pycache__/System_.cpython-311.pyc (100%) create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/WrappedSimpleTypesBooleanTest_Compile.cpython-311.pyc rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{TestsFromDafny-py => TestsFromDafny_py}/__pycache__/Wrappers_Compile.cpython-311.pyc (100%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{TestsFromDafny-py => TestsFromDafny_py}/__pycache__/_dafny.cpython-311.pyc (100%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{TestsFromDafny-py => TestsFromDafny_py}/__pycache__/module_.cpython-311.pyc (89%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{TestsFromDafny-py => TestsFromDafny_py}/_dafny.py (100%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{TestsFromDafny-py => TestsFromDafny_py}/module_.py (99%) create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__init__.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/__init__.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/client.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/config.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/deserialize.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/errors.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/models.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/serialize.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/client.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/config.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/deserialize.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/errors.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/models.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/serialize.py diff --git a/TestModels/SharedMakefile.mk b/TestModels/SharedMakefile.mk index 7467e13c69..435575fb50 100644 --- a/TestModels/SharedMakefile.mk +++ b/TestModels/SharedMakefile.mk @@ -67,6 +67,26 @@ dafny-reportgenerator: # and can be the same for all such runtimes. # Since such targets are all shared, # this is tractable. + +# TODO refactor +# Dafny-compiled Python code requires the Python runtime +build_implementation: + dafny build \ + -t:$(TARGET) \ + ./src/Index.dfy \ + -o $(OUT) \ + --optimize-erasable-datatype-wrapper:false \ + --library:$(PROJECT_ROOT)/dafny-dependencies/StandardLibrary/src/Index.dfy \ + $(patsubst %, -library:$(PROJECT_ROOT)/%/src/Index.dfy, $(LIBRARIES)) + +build_test: + dafny build \ + -t:$(TARGET) \ + `find ./test -name '*.dfy'` \ + -o $(OUT) \ + --optimize-erasable-datatype-wrapper:false \ + --library:src/Index.dfy + transpile_implementation: dafny \ -vcsCores:$(CORES) \ @@ -179,9 +199,15 @@ polymorph_java: _polymorph_wrapped polymorph_java: POLYMORPH_LANGUAGE_TARGET=java polymorph_java: _polymorph_dependencies -smithy_dafny_python: export MODEL_DIR=$(LIBRARY_ROOT)/Model smithy_dafny_python: gradle build + # Smithy outputDirectory can be overridden in smithy-build.json: + # https://smithy.io/2.0/guides/building-models/build-config.html#smithy-build-json + # However, outputDirectory is currently bugged, and overrides do not apply: + # https://github.com/awslabs/smithy/issues/1425 + # As a workaround, the Make script will move output to the correct directory until #1425 is resolved. + cp -r build/smithyprojections/simple-types-boolean/source/python-client-codegen runtimes/python + ########################## .NET targets @@ -266,8 +292,19 @@ clean: # Python Targets -transpile_python: | transpile_implementation_python +transpile_python: | transpile_implementation_python transpile_test_python -transpile_implementation_python: TARGET=python +transpile_implementation_python: TARGET=py transpile_implementation_python: OUT=runtimes/python/ImplementationFromDafny -transpile_implementation_python: transpile_implementation \ No newline at end of file +transpile_implementation_python: build_implementation + +transpile_test_python: TARGET=py +transpile_test_python: OUT=runtimes/python/TestsFromDafny +transpile_test_python: transpile_test + +cleanup_filenames: + cd runtimes/Pyt + + +test_python: + python3 runtimes/python/TestsFromDafny_py/__init__.py \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/Makefile b/TestModels/SimpleTypes/SimpleBoolean/Makefile index b525bde181..9eac3ab9be 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/Makefile +++ b/TestModels/SimpleTypes/SimpleBoolean/Makefile @@ -8,7 +8,7 @@ CORES=2 include ../../SharedMakefile.mk -NAMESPACE=simple.types.boolean +NAMESPACE=simpletypes.boolean # This project has no dependencies # DEPENDENT-MODELS:= diff --git a/TestModels/SimpleTypes/SimpleBoolean/Model/SimpleBoolean.smithy b/TestModels/SimpleTypes/SimpleBoolean/Model/SimpleBoolean.smithy index d1b74a3cd9..3f4abbee43 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/Model/SimpleBoolean.smithy +++ b/TestModels/SimpleTypes/SimpleBoolean/Model/SimpleBoolean.smithy @@ -1,4 +1,4 @@ -namespace simple.types.boolean +namespace simpletypes.boolean @aws.polymorph#localService( sdkId: "SimpleBoolean", diff --git a/TestModels/SimpleTypes/SimpleBoolean/build.gradle.kts b/TestModels/SimpleTypes/SimpleBoolean/build.gradle.kts index e65b17dc04..6d8f51e913 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/build.gradle.kts +++ b/TestModels/SimpleTypes/SimpleBoolean/build.gradle.kts @@ -10,5 +10,6 @@ repositories { dependencies { implementation("software.amazon.smithy:smithy-model:1.28.1") implementation("software.amazon.smithy:smithy-aws-traits:1.28.1") - implementation("software.amazon.smithy.dafny.python:smithy-dafny-python:0.1.0") + //implementation("software.amazon.smithy.dafny.python:smithy-dafny-python:0.1.0") + implementation(project(":smithy-dafny-python")) } \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Dafny/Simpletypes/Boolean/Wrapped/__pycache__/__init__.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Dafny/Simpletypes/Boolean/Wrapped/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index ae59ae0a3b20eaaa084efeb9d12b1a8cfa0bb9d6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1714 zcmah}&2Jnv6u0L)o83$kpd6s0NQknk*pZOngpgoYAP($-4I#0RM#I|MOzQc-Gb^+? z?O_l62jSRLQN`cEeL;~}`BVvU;Fc-pBmX>9i2Ehp0#I z7zq8P7EQBi=6nv!38IK%j)u-`xJ-10)&mGdy^A_<9^aY~!0#WB7Sn?};RU4V^#f{7yF({VDUSsDyjalg#+;Kxkd&v`UvL7wqhl8O8<*kwieRYn;vf>E3R zK!v&CKg%-CqBIZyGfqI9&&or%P$?Cki!2#LlXUieJ_|Hc-%#os8r^S2l;?~FVHl?| zAnN5a={1Yvoi);4BijNHg$rbkR$luj>l|1l9l^?}NMGm=6-;Az{DC&6SHaQ7^lD>z zwJ~8oOY)erURXabI`D?jFKZu)8|uw=7*YkWC`A|^-@I(iR zFDVrEWIzvo5QYGKOds=QcO~`lHh>9FC#{*y<5Q7+kMKr8MORz;vv{PEjmNdzhHCe#^ zl%?2dEzNn!%GeXy1m^`St7ZB6No|tXQ`!`-b6Os1*;4I-RtV=#YtwveMw=1IO=2kf z#7LX@#%v^5V=m?jG512mJxUSs1b#u$=J_5O*kj_62qW+dN6s0-1}SBKz~)*>Vwu&d zWmW%TnJo3Y<_=45?zG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kH@A~T9e&%kVtCN6$U(9v&H86Nf z-V>guuZOX|U`bq(T0&SqTbo{-4j_3b(emW#M$% z2b_>6@zTV&g*aMpXu)JaaYI@}@@pV~|ENBeqNdBF=I3weY|_x*)@%H(I+g)gE@7zM zb0ZTa29{t)cM}M};-$;IRBW0fb@@_dXi?6!e);|FmLpfo0mATI|{}(Pr?_lXL(=a8tL$dS++#^j}XVa(Pi8~5Af2u#aw({8KH;BMr z;-F`9w-WXaZrMB|ab1on`KQcsAk_-J2{K|Fx+>6NN)Utr$#(fOAn*2{_YTN>Klu*G zOa0{gl;peo8IW9;KZ8-vi+vKl19G{ad(X_=`0W5x+;JjI!H$KXJ;J@??hob-h diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/__pycache__/WrappedSimpleTypesBooleanTest_Compile.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/__pycache__/WrappedSimpleTypesBooleanTest_Compile.cpython-311.pyc deleted file mode 100644 index edcbbbe3da2e79b6f4b43f3fbb12fec68462f6da..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3651 zcmeHJTW=Fb6rNq*)^_YTc1Qvgn$QBVC^iX!0-=Qx?w3FUrP8X>YVnQ}hh48byM{PT z)ClDv|A0z;;R!_P0}uTH`~=6^D%MCyk!TC>Dz#7EXS@U%4Y7^a2WQ@HaE7-?Geoq#%V;kq9ZTavCr4nosm;e$lT5!~h3! zpBmIcV#v<>RY41jVLQ*M5iw%-kBU({Z4=w@h_lXtNjYw<4?>Xlv41tl0JOszbEA*ZV~+X_tmX}9(EIwE?574MMpiB7 zw497+E7h5cR86|5TBmd!Ww%`?anc18sa8`)CD zoMZz+C*v&9wbOFGSlM5yWZ&rgGNlR?B&kp=u$|2$*EX4PWeK)^Bg9}H)rGc2|0>HO z8YI{(lj2_<1zZAtbSCp=>yVmLlNcMH#2Gk8M_>W8O_CJYmthjN%&yjDuFF%f(eC|+)~n3ar@uk;`NVBl!_SZ_K` z12&mx)S;mXHi(9r&1tB4u?ZXp?etu8w@qJDdfG7_&N$7=5xtl%OwjNJQmdDIA^4~MJ5wx1GPtVExcNLz^kD>1yBxK>MC`(f;+HFnDyo3h4;H8%SjLgSpo z|KcPsA(8o4PQpqZx1hjqF;L&Ji;Y?D+_Rh-sHFy$QU|Tn!3N^P@#o1NE4inEP`|?e ziqHhFL8l4+F3)7s{6!xdXoA1wvxS$S)DOs|;;#T2h>OKny3@;DgSD=~rLG~XYiKe0 zT-a?1*=6BWO*r*zcuBZw30JFb{NJ?v=S|C(|AJ{5IOy6I(#@Dcz(x{qs>n6~uq0$V zz&ijt0Cobr3(yPD2e69)O?f$fR#pulc}kH61~y~)A&IuJx&xcjynUU__DC~ZH{-co z1+%Xc{mAjEu>CC)edl{@%zEeE<5V zL?e=<=}K9JJabIGD9fr-Lpne&K4z{77(?1-n6g>OX_$Fv3fapr@Oe|z!wQfc zw`<2+Yh4j^8|Umj+sjIKvh7q18f0%Ddx8kO48#ur9uNWNh59wwoFw3l&~U-T#AIH& zLBJ2Aq2@W+mzajGGye^1l5>6g?6)=3^0a1}ua)aDIuyyY3}g^+VVnc=9^z}^xHH$s zWSBJpZ^?MUpyA^ diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Dafny/Simpletypes/Boolean/Types/__init__.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/Boolean/Types/__init__.py similarity index 97% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Dafny/Simpletypes/Boolean/Types/__init__.py rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/Boolean/Types/__init__.py index 4cb491adbd..2dabba34e7 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Dafny/Simpletypes/Boolean/Types/__init__.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/Boolean/Types/__init__.py @@ -7,7 +7,11 @@ import _dafny import System_ import Wrappers_Compile -import Dafny.Simpletypes.Boolean +import Dafny.Simpletypes.Boolean.Types + +# assert "Dafny.Simpletypes.Boolean.Types" == __name__ +# Dafny.Simpletypes.Boolean.Types = sys.modules[__name__] + class DafnyCallEvent: @classmethod diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Dafny/Simpletypes/Boolean/Types/__pycache__/__init__.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/Boolean/Types/__pycache__/__init__.cpython-311.pyc similarity index 77% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Dafny/Simpletypes/Boolean/Types/__pycache__/__init__.cpython-311.pyc rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/Boolean/Types/__pycache__/__init__.cpython-311.pyc index 9aa4ec63819e8948e1e8e9905073c230a8185c18..3ff514c504f107aa854a267af9a8134fb45677f0 100644 GIT binary patch delta 549 zcmX|;Ur3W-6vll%*{tQ(=AX&-%|6|i+nRGusg<^G71~9@N(~IcA(WWlq)-crTIB(c%aVbMvX;-N;gq!&a8t3(N4G2P!AWzfhkd((3RLd4Edcdg z+S3AP6tw5zrChv@KiHEB0#xq2g#9$;Ttblgf;sAGQ|YZMg#(fnu1Z6fwC7dZK$LIQ z^aC+kt^I~}T69OyB4K~sAq5?zdq!}WW;}1uxdZ#^?L|VuPOE9ec~1QSoZu(*13;Gm z`N*by!bw`!A~-H#-Ui{(L*tDrNYPRM8Jyx-zXRx}r@Db&-qfD~=V+>F8G~d5`f#2e z1>PYoEdO9gT3rZT!vJrEHh^KC4_5#qwA8$fQIT1hgb_x~uL0 delta 553 zcmX}oUr19?90zc}w>D*Y=Qi@n^)Bw*MYpy!|CGaO*AZDzI7&4LiX^>I64)uQKT1?WCmHHl?4}v@B~qK%m&W7h5?G%$j1HdHz5^yd+%W`XY$!+` z{T&X_Cq03*z#2n##$me9w2C9NKYR>__)gdh^wA^3L@$3f9s`3k*}Q@iWVZBUi0-#6 zd9nXmkn#ydGTx&hSF48W^R;_y)%8nGMf`{g;=WG9vQU6BQswACp;}r>539 z%kiCZg{{;tpum$| zaloR|-VeATTJAY5PMPM?z7gQ|gLDovluv)dT^ckkw{v~sG|h%XR571IC4Wq%SKU8r TL*=Uf`^Q#V$|zjU{FVLzGAOP0 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Dafny/Simpletypes/Boolean/Wrapped/__init__.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/Boolean/Wrapped/__init__.py similarity index 82% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Dafny/Simpletypes/Boolean/Wrapped/__init__.py rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/Boolean/Wrapped/__init__.py index 1f691cf26f..6ef4848f65 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Dafny/Simpletypes/Boolean/Wrapped/__init__.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/Boolean/Wrapped/__init__.py @@ -9,6 +9,9 @@ import SimpleBooleanImplTest_Compile import Dafny.Simpletypes.Boolean.Types +assert "Dafny.Simpletypes.Boolean.Wrapped" == __name__ +Dafny.Simpletypes.Boolean.Wrapped = sys.modules[__name__] + class default__: def __init__(self): diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/Boolean/Wrapped/__pycache__/__default.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/Boolean/Wrapped/__pycache__/__default.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a2fe92d0f8f073f08fbbbd4f8c359f2945cd01bf GIT binary patch literal 1279 zcmah|&1=+95T9f>*^lhDU9AQ2TZ*z4H&E~<;@Tp3u!pvO5DFn~-nP4a*@TxYl7n;) z{tvzCrBds^;XO*k@IVked0VModh)%u$=1b+lgZ3)CNsm#yq7oCY8e>)n$hixGQc-( zWW;Pihi{qM1siM$gTb|oB}X=7CuiiGypeYlLy@>YhgGLw6a>!WqEj+T0!z4TltsQ~ zXhK(viqKV~D)f{wE%Xf2%1bb6sD`Gyr_v6fdwPs!$LLIk%vy$QX$|V?cW$oK^R&2R zVQf9ah~}ETkQUZM4?VUBEw5M(ve)|_Msa-X)Q0p5UWbo)F9PkiCrBRv!l^gb;o)eBRIH zqu2T)9}!>2{g%_R-JZUT{O!Q?^yeHwpI-7bYCL#RVO!GMw znHazqZ6?;v$J%_X-T17ne$-Y!ZM^ufu@i6XMB3^PfJ#&TDdZ49Y08Hz3+i(;=Z8L3 zSr?t&CgDd+_~{ab3zZ3)cdTHG6gVt(0z?9KEIui6yWqHXA0v~hrY#Pzuon6Oa!h(* zqSpuPRQVRnCD-vf?8;se8)%Gz#0DDa1{z|cq{7QD{5vY$NMpPwu?|vYX=F;YmPXLh zIAk9P|G^0V^NxzQN4?)6SDDGLg8!b0VNQ~y1j+;PBycPGA15#uO>zR~qDlS=Qv>lN zP#uUTIrhv)ka7aoqKp$*j4~b;C8;S7;SZ_8vh-9MC^6JxI2*&27#3o<8wnO;{sv0a BU_$@^ literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/Boolean/Wrapped/__pycache__/__init__.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/Boolean/Wrapped/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000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LSl1?z(^BID@tI`cM(i z=lTVR;9wr>kgv6APs@7R&pmDNNV{{W-8s`6u-r9*c@2=1WC*(yu zH*(rSJX`S8g2jO1hBS-drvM=Tqxx8aS`L$HpItH7m}$Iel=!9fR0UwEn4wzdh9-(l zT!9^(4FHf9FJ9^~CX#9s6?nvNwJ0VEP?z`ke!H*;AK$ z>T-W(t~>Ts`hu6f{Q34l`l^?{+D-Je$?hmO<|=$9+MZrUu!sP2Da|9mIAY_DTXf5% zss;B-ll}_n*ASdarEee&0sfpOfKK#ao`X~x0Y#9P{7kxp)Dz%|Jb}y~@dW#kfO&Fq z@8f`^z+fP%^3;F;h~`29r}~)&WysA!LD+Ga0`|*Bhz;U{bZ{Zc$8B zY^3Z$nSg&a4n^-^$)M6O#lJ(cM``*CWCEB>C$8)?sq77ry=ZSN{Iq=c+gVW=HnOghyrv u(v$$z@mcWTXWrZ;Z|*H`uHenBK1GgihHMK{0{FwT0Qshn@ANG9kpBVW`J@B@ literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/__pycache__/Boolean.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/__pycache__/Boolean.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..111512d87bdeff12096be79249f0782939f9c2a4 GIT binary patch literal 4179 zcmb6cO>Y~=b#}SCq)3rVeMF9A)nSt~F6CNu8l(ViML;9NhMQVVB*k$S1-2}A6_Hwg zWOj*EDg_XQ4n$!fN9WLkPEHK}g&um$krFl#F+czVMGn2uQIG;T<-OStYH2xcXP0l@ zym>S8_I(aNPp6Xvnm)d0{3TAvzi|*W*+))h1VZi;gBXHEH0(u7sEL|bi)pc%q)9bd zlLe&5ETtCL;vAQ(L~TqP04aeBTQ&Q~)5XLTmP9>fTF z1V687=lC9Dut)L%$nl8Ff^*u7hOkcZssG?$H7~KmO3AWHf3{2(`)z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r-)EqE literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Dafny/Simpletypes/Boolean/__pycache__/__init__.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/__pycache__/__init__.cpython-311.pyc similarity index 80% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Dafny/Simpletypes/Boolean/__pycache__/__init__.cpython-311.pyc rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/__pycache__/__init__.cpython-311.pyc index dfa7e1b24820eae399479e9704a7be56c84fe810..ba13d403f508ef1f842c4a2486350934eec0e533 100644 GIT binary patch delta 30 lcmaE?a9e?EIWI340}#yS+Q@Z{iE+Z@hfJ-T^O(Q#004_h3B3RS delta 38 scmcbu@K}LsIWI340}%9ZY~;Ge#5iN}L#9@Cr~Le!)Wp2asm$Ma0N;KLa{vGU diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Extern.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Extern.py new file mode 100644 index 0000000000..7919c9c3a0 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Extern.py @@ -0,0 +1,22 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny +import System_ +import SimpleBooleanImplTest_Compile +import Dafny.Simpletypes.Boolean.Types +from simple_boolean.client import SimpleBoolean +from Shim import SimpleBooleanShim +import Wrappers_Compile + +@staticmethod +def WrappedSimpleBoolean(config): + wrapped_config = config + impl = SimpleBoolean(wrapped_config) + wrapped_client = SimpleBooleanShim(impl) + return Wrappers_Compile.Result_Success(wrapped_client) + +Dafny.Simpletypes.Boolean.Wrapped.default__.WrappedSimpleBoolean = WrappedSimpleBoolean \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Shim.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Shim.py new file mode 100644 index 0000000000..adbdae275a --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Shim.py @@ -0,0 +1,31 @@ +# TODO generate this + +import Dafny.Simpletypes.Boolean.Types +import simple_boolean.client as SimpleBoolean +import Wrappers_Compile +import asyncio +from simple_boolean.models import GetBooleanInput + +class SimpleBooleanShim(Dafny.Simpletypes.Boolean.Types.ISimpleBooleanClient): + def __init__(self, _impl: SimpleBoolean) : + self._impl = _impl + + def GetBoolean(self, input: Dafny.Simpletypes.Boolean.Types.GetBooleanInput_GetBooleanInput) -> Dafny.Simpletypes.Boolean.Types.GetBooleanOutput_GetBooleanOutput: + ''' + unwrapped_request = TypeConversion.ToNative(input) + try: + wrapped_response = self._impl.get_boolean(unwrapped_request) + return Wrappers_Compile.Result_Success(wrapped_response) + catch ex: + return Wrappers_Compile.Result_Failure(ex) + ''' + + print(f"this is input.value {input.value}") + unwrapped_request: GetBooleanInput = GetBooleanInput(value=input.value) + print(f"this is unwrapped_request {unwrapped_request}") + wrapped_response = asyncio.run(self._impl.get_boolean(unwrapped_request)) + print(f"this is wrapped_response {wrapped_response}") + return Wrappers_Compile.Result_Success(wrapped_response) + + + \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/SimpleBooleanImplTest_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/SimpleBooleanImplTest_Compile.py similarity index 98% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/SimpleBooleanImplTest_Compile.py rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/SimpleBooleanImplTest_Compile.py index 98c5d6bf0d..02a7d30bf6 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/SimpleBooleanImplTest_Compile.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/SimpleBooleanImplTest_Compile.py @@ -49,7 +49,9 @@ def TestGetBooleanTrue(client): d_4_ret_: Dafny.Simpletypes.Boolean.Types.GetBooleanOutput d_5_valueOrError0_: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(Dafny.Simpletypes.Boolean.Types.GetBooleanOutput.default())() out2_: Wrappers_Compile.Result + print(f"\n this is client {client}") out2_ = (client).GetBoolean(Dafny.Simpletypes.Boolean.Types.GetBooleanInput_GetBooleanInput(Wrappers_Compile.Option_Some(True))) + print(f"\n this is out2 {out2_}") d_5_valueOrError0_ = out2_ if not(not((d_5_valueOrError0_).IsFailure())): raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(21,16): " + _dafny.string_of(d_5_valueOrError0_) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/SimpleBooleanImpl_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/SimpleBooleanImpl_Compile.py similarity index 97% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/SimpleBooleanImpl_Compile.py rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/SimpleBooleanImpl_Compile.py index 333f6202cc..184846d199 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/SimpleBooleanImpl_Compile.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/SimpleBooleanImpl_Compile.py @@ -42,6 +42,7 @@ def __dafnystr__(self) -> str: return "SimpleBooleanImpl_Compile._default" @staticmethod def GetBoolean(config, input): + print(f"\n this is input from SimpleBooleanImpl GetBoolean {input}") output: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(Dafny.Simpletypes.Boolean.Types.GetBooleanOutput.default())() if not(((input).value).is_Some): raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(15,4): " + _dafny.string_of(_dafny.Seq("expectation violation")) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/StandardLibrary_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/StandardLibrary_Compile.py similarity index 100% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/StandardLibrary_Compile.py rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/StandardLibrary_Compile.py diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/StandardLibrary_mUInt_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/StandardLibrary_mUInt_Compile.py similarity index 100% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/StandardLibrary_mUInt_Compile.py rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/StandardLibrary_mUInt_Compile.py diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/System_.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/System_.py similarity index 100% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/System_.py rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/System_.py diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/UTF8.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/UTF8.py similarity index 100% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/UTF8.py rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/UTF8.py diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/WrappedSimpleTypesBooleanTest_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/WrappedSimpleTypesBooleanTest_Compile.py similarity index 97% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/WrappedSimpleTypesBooleanTest_Compile.py rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/WrappedSimpleTypesBooleanTest_Compile.py index 4b3307fd8d..88be6eff12 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/WrappedSimpleTypesBooleanTest_Compile.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/WrappedSimpleTypesBooleanTest_Compile.py @@ -25,6 +25,7 @@ def GetBooleanTrue(): out4_: Wrappers_Compile.Result out4_ = Dafny.Simpletypes.Boolean.Wrapped.default__.WrappedSimpleBoolean(Dafny.Simpletypes.Boolean.Wrapped.default__.WrappedDefaultSimpleBooleanConfig()) d_9_valueOrError0_ = out4_ + print(f"this is {d_9_valueOrError0_}") if not(not((d_9_valueOrError0_).IsFailure())): raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/WrappedSimpleBooleanTest.dfy(9,19): " + _dafny.string_of(d_9_valueOrError0_) ) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Wrappers_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Wrappers_Compile.py similarity index 100% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/Wrappers_Compile.py rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Wrappers_Compile.py diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/TestsFromDafny.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__init__.py similarity index 100% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/TestsFromDafny.py rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__init__.py diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/Extern.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/Extern.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..eff9007c17ee654f9370992cf5667760522bfbfb GIT binary patch literal 1354 zcmah{y>Ht_6hDfTD2b9B$CmTqek4JV#BCq~0kXJ7&?ZiS4)svEZNPkg1ysZ<+e;L@HL79v|P=y}Ntw_ulXQeiy-tx9#9n z1EKfQs2A93o&E*lH40Fm5#&hOAR28r4XQgjH5`LBou(%JI%!eUF_mtRHtjearE8?? zbk%vwv6SpNJtg~2U&(>90*3(HqF+?L05w&IaDV zD~A_q$Kl0=c4?tqt~Ga~)&gyew%UJ7b9c)S?FSwq-eZD={%w>Ab1zHq&mI%qU60~m zZ;}warHSS~iDM=eKb}M>DE)CrVeft%6YNFcSY2|A4?^l|^_w8|>OVaM+QnxqLIoI)tWZ`v#Y1gdJmz)MdVapj)O`yD3Wy`n8|L7bH6YzNigH?gP0~E zls)(n^9f1a@x=Er=Kx8|kE8wYi5NUnv4LCJhOGFEmxMS9n@oJ_ z2XSQYVE#0X6Z=`ro+iZev7N*uqcKYk>^;oWAL0NLZqIR(xYv3Gs?7lEkb*nO(gV0q z9^&7znC^J{QRXI@{qT8;Su{#Au|6*>Sn2{>gXC7==XZe3(D86{w)@Vy`0Hm!)~&+2 zHQRYNyzyIlG`w95Z_Ay{!usNmdq>uGVQuHe_9>h~Tbn}X85gZIOTy?0lV~$pHIqGH zEnvc+UV6Yxsdhq0DTT4%tSxPm#=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+P_Tkv;99T?MhdW;RvWpQ&t zB4m&}+w5n=;Sw-EfgHgJj2w7F_v5c43ex10dIzy)kfd_bRpCGil(|6pBv6(EMeQKq z`I;VRUZCy0L^@pO;p--q2d_f)F^ITkw^<5c+wE z6c`V(yz?C+orE9=ofHzLee_;f57DgOUk}lnepC-pcAtNTXwL7io#Y$BRiT5g9jPa@_v{$dG5e literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/__pycache__/SimpleBooleanImplTest_Compile.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/SimpleBooleanImplTest_Compile.cpython-311.pyc similarity index 62% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/__pycache__/SimpleBooleanImplTest_Compile.cpython-311.pyc rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/SimpleBooleanImplTest_Compile.cpython-311.pyc index 1a528439c7425754308f9bd074858c5e953a5f36..e50e791c9014f5df74972a87aead787d38036926 100644 GIT binary patch delta 687 zcmca$cG`k>IWI340}$}p>8HeP-zVJ_1$Mh1q}Knwwl3^kJ-cqAq(2y0E=z#=+1UYM7g8zz~;G+B{PX0kpXpI$8! zidoDxOjylgs%5NUT);DVBa0GCk!FeXh5CsxIbdf{z3Ww$e4$a9MxZ*eW3hrjH)D$Vw13I-xA4C{{2yqZ00U{(pgdvD9 z0ud%4!W2Z90g1^E`6VTa%t2fW5Mc=-jDdtEOOe&&K(Q!Br_F1`4ls!cuyTE101_XW z8Q6qcVm>f|1XLzBNiJps+w3%1TgrgZe{zh}R(mH#MxbKs+L9NLfxZ)@8k&xZ&A~cVMvq%qU zt|m*7^<*FMC`O0P%f$~cO>UABWmK44E47$SA1GVoJXuZJfH7clxb#+g2S!G&4-DAJ Pk6`gHIAn{2fMx*zOt?A8 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/__pycache__/SimpleBooleanImpl_Compile.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/SimpleBooleanImpl_Compile.cpython-311.pyc similarity index 50% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/__pycache__/SimpleBooleanImpl_Compile.cpython-311.pyc rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/SimpleBooleanImpl_Compile.cpython-311.pyc index b0232e44d0042759318a6cfc6ab9b46c31d99004..1ad53b6321a0d4a2714ae2889d5dbd5e58a0aec4 100644 GIT binary patch delta 940 zcmZ2uu*i^iIWI340}#v$&`+t|$a{{7F@EzMCI?QZFU$-K(-}$_L6Q)V!dSyNn_(`~ zGN9OMxHuz22~Z^rWHG^53z#Pha*D8&a4;}Tj^R<`$pSJU04$?4`3E205^imnY;( zcA{Jfvk!N0VRs&ZAmSj(a%fzoFvC*T&Vf$a{{7QFrqlCI?Qr3(O1*(-}$_L6Q)V1!pf{nk>jE z!dJoulVV`VVwr5fr_KnHP?~&-N70o7CYQwtV-;JMh{D)F9o#T>3L}a*4@|s7bn*pW z5vCNT$$b3Axd;Q{tQ6*KCXnJ{?;6G|xF~{^!UC1YWicyZiw!WnDZ{jY4-^0_AX_IF z@JSPJ8#BU12o^!Nu@QEgaUvE^*I>1dKtQk)whR~$@B{#iJ;ur3_~n^6{3ag|%-y_0 zpq7!5f3vL+4;nUk_{hw_Ce#x1fe9u66rJ2I p*39MvjKm^`$pYf`jM19|#AO*xB^iNQFo};Ku`gI8ibQ}$002K-U>N`a diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/__pycache__/System_.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/System_.cpython-311.pyc similarity index 100% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py/__pycache__/System_.cpython-311.pyc rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/System_.cpython-311.pyc diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/WrappedSimpleTypesBooleanTest_Compile.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/WrappedSimpleTypesBooleanTest_Compile.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ff622de26472fe2b733d9759a080aaa932054653 GIT binary patch literal 3728 zcmdT`TW=Fb6rNq*)=BI*aYzD`l0c!cC^iX!5}<_=?w3G-QfXCbwRqQw!>-qzU6(iw zYJ~E@KcEt-l$TOb`oK@%p+CThwu&_pRV3PnzL|!q66!Xs*cBJX3m+* znVJ2*Ip0PiEd4Qr~5^}9uNZ@ z>U~;J4~ZeC?$-o8EQXyrr?rSJ&iGcb)hXM=Hm8h;5vPob?Mgt6-QaOelRrytb1IqY zsChut*haTX#7>@^B1&+cD53k%|DiJm&0<{Pu8@TAD>lXwekP2{nkHY@ROb6AS7f29 z#k_h=rmSU5)>Y+dA+MZgO2%JrA0@L?t4p5Rq57c_R80UiD{q#W(L418Pw5&y)Mm>!CZAh#}Ah z)@TJK2%8D9u%c$;ZYeF~6y5852A7y||b9*i@;R z(h6xktr)q~an-zG8Tr&rgWkw%a#~I04XvmfG(VZb{ar8=RWnmfo3GVtXON1OLqsh&fUg+V1#Q zp-Nbgs#byKUU?Mw5%6O($=CBksx3_;Fh7lgs2&|f2UwdVDY!4wqTptCvzrZl90vh> z(AD-MrS>DV6B?c`1aHZ?t{>oD@Vagh3si2Js$cDt`z?_v?C+#07m8#d;Od&oe>D?& zv?h7K%=_Tg!@6g;xLFRoZf^`yxLIk<>&&NhMPp7Zv=%ZJ3)Q-_Pz?qY50Z6xK;ic3uW650 zsirzl%{Xf0GT8|h$kQy4WB81DQqF1xs(hmb*h*P!m4ZsYoNz=dxB%FVYi~8g!4u0!G0amRPGI z9gxymR?S(Gi7@Hw>#O25>YZk$w}Du%Wdn>d{{%5dDnau8p^~uam)Hh7)^EoWc5Kj& z9a@fET8drzar~M+e%&6Qvd5`CKKlnDmpO_5ty(<8Lgt@W3utv*#|Fqdf%2AZFy|8? zQi|>_ZQO-2x_ePb+Cs7NoTL!xwAsZfWrSy$ONzB zWE1>N9(2?ESsyGg!JqRv%5&HnK*`0U&rwte7m2R)B$m5}mb!-)yNB)W;XAEQgdMh! zS{9Bi3CA8ES`;qY!o`xCU%^ug|8t%KCcwvIP4Y4Ua8O61%T(B{E1XAP=cd=>pgL!{ z^I_>-891o7VQu0de1_Jfmv9iga$o!h%rm&RMmZiPz$ScXXYodCdDnklmj$o8v3TvuRHWNs?n8}Nwi7}NS zOBlohfmET1n^YM^Hr}XWWE7el%+$juy7>XqSzbo*&FcgV*%$>UKM>1j6rCI(-pp}} n&9$N=wJ2}$WpQ0D3!r93ATItsnM+~@=M4tl1~8nwNFojZIs_%W delta 120 zcmbPf)L_KBoR^o20SFwn=%(D7$ScXXX`*_bENiM@HWNs=n8}Nwi7}NSO9;dRfmFeX zyHpv4H$JFhWE7kn&D6svviSwmSzbo5&D#VF*%$>TzYxo36qy_$-aPrSxGtADP!A&z P7r&bV4e5VV7cA|%8&NRutoAPR)&pn=rZ<-CX!ws&Rwg!~9M0H+`vWGJNPz$V literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/client.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/client.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..fd0a2641e3101106f8484e079e4d34f04981f5f7 GIT binary patch literal 12665 zcmds7Yit`=cD_S$_#BEOzVwzxFFT4YDt=3jtwfG($&biNEXOtzFGG_7kj*be!YIGu8&ondF%6?TzlYl=y` z!)}tcrCQRSu!p4WDK_02ZcTf`U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ng@qSA|^l#_yKycR`|3(OXlMidbqgWA>&E7zk4XBk&j&n2jx+qe%~tX;QW!S<46 zW3d9|)s+R=X9>;JZ|GdF?W-SyLrH}USP`c&;aPB-%8}xEaKyzZXE>%o&e=HSA|D0^ z(A6(FR4s$rrQXL&yoeTvB2!5U>U^w*;86c0KNCEyQjGF(AglcmJ*@Y65LbI?Hy?`* zWK@YZ0C^9@@ug>Ox18o2X|aK>Zaz^zy*IJ9fv5KN*+zF_Yo6NOGjDz7U7L9~X5L2= zTl2J%0L1n(Lg{|Rib0a~*30(ANu^TgQ&hUpKv-#E>)HAS60R2dgp^xV8M~Jny}PJf zY-+m;D+mn|`sfIKuhmt(tl&(bp literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/deserialize.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/deserialize.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..80872e493716b303e869f40b5df7dd9a47d1d01b GIT binary patch literal 800 zcmZ`$&x;c=6i%iy>9}J>5JgmQ6+Kj;Ian_uE9jyJaXqwNdKtzh?aprI2T4X5@gV3Q z;LWQCQAGa`k0UH1BZAPZxbwx z%*k{O$Q#5E!vZCE;9$fY))0-v9k`ae!b`}20Qb1V2zObNlM!M5D|gUjM|!BevTHVL z*J_8Gs2?5F)1Q0{Di0`EyA3f^|4>4^*gfHw{I0hBp+ zb#?DGeWbWlR20Kx$g-5KbG5CroIcIub}phJr+FsIB$N3j?Q^9cWQ+?%dvTHr-Y;{$ z;PVbqS)@8nAf1(MAJ!@Q)*t_>g0T1puQ1#u+eXS|b__37|HA{=wQ zD3mRbY@S}71NZ~q3-mKM`}Xp?t2-C3RYCV_(A^2TmD`=dJlbgc^?7?{XC_t~v7Nch zj+HJ=$Lo`}YWcxzo1|w7NMbKN>!eZf5y@lVWMe@I-8~iiLu|$^YP}r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olean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/serialize.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/serialize.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..363bf85b4380eba815457e98deebbea854b8ed96 GIT binary patch literal 778 zcmZ`%zl+pB6rRZ@v+?4(#mRv-dtjAjN7h!Z&_faR;JCBdCdSO{UEE1BOcEuBg`l;q zt%djl{UiJXEFxG)KoD%aZehEtd^49_yait--}_$X&3j*7^1jzwLtwkRlzqhr{no+4 zNK58hKwcw;7#1kOV+$i@v5x2@_SiPu7EVIO1h~TqBiv?PZcPYtU)tj?JGY1YwPRh( z$Iak2FK%R+;9+_vm1PmE#K)jQ=aHLPI*AW}^;a?)C)NiW5}AyKC|;B*jV#@vwGQ|f zaL=y-+(j7V7rJn3&(Py#^clYc{%IM5SZfE`I!{7Ta^Gq$Zikb!S`nc@I(T?vn1Ji7Hs GetBooleanOutput: + """Invokes the GetBoolean operation. + + :param input: The operation's input. + + :param plugins: A list of callables that modify the configuration dynamically. + Changes made by these plugins only apply for the duration of the operation + execution and will not affect any other operation invocations. + """ + operation_plugins = [ + + ] + if plugins: + operation_plugins.extend(plugins) + + return await self._execute_operation( + input=input, + plugins=operation_plugins, + serialize=_serialize_get_boolean, + deserialize=_deserialize_get_boolean, + config=self._config, + ) + + async def _execute_operation( + self, + input: Input, + plugins: list[Plugin], + serialize: Callable[[Input, Config], Awaitable[DafnyGetBooleanInput]], + deserialize: Callable[[DafnyGetBooleanOutput, Config], Awaitable[Output]], + config: Config, + ) -> Output: + try: + return await self._handle_execution( + input, plugins, serialize, deserialize, config + ) + except Exception as e: + # Make sure every exception that we throw is an instance of ServiceError so + # customers can reliably catch everything we throw. + if not isinstance(e, ServiceError): + raise ServiceError(e) from e + raise e + + async def _handle_execution( + self, + input: Input, + plugins: list[Plugin], + serialize: Callable[[Input, Config], Awaitable[DafnyGetBooleanInput]], + deserialize: Callable[[DafnyGetBooleanOutput, Config], Awaitable[Output]], + config: Config, + ) -> Output: + context: InterceptorContext[Input, None, None, None] = InterceptorContext( + request=input, + response=None, + transport_request=None, + transport_response=None, + ) + _client_interceptors = config.interceptors or [] + client_interceptors = cast( + list[Interceptor[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput]], _client_interceptors + ) + interceptors = client_interceptors + + try: + # Step 1a: Invoke read_before_execution on client-level interceptors + for interceptor in client_interceptors: + interceptor.read_before_execution(context) + + # Step 1b: Run operation-level plugins + config = deepcopy(config) + for plugin in plugins: + plugin(config) + + _client_interceptors = config.interceptors or [] + interceptors = cast( + list[Interceptor[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput]], + _client_interceptors, + ) + + # Step 1c: Invoke the read_before_execution hooks on newly added + # interceptors. + for interceptor in interceptors: + if interceptor not in client_interceptors: + interceptor.read_before_execution(context) + + # Step 2: Invoke the modify_before_serialization hooks + for interceptor in interceptors: + context._request = interceptor.modify_before_serialization(context) + + # Step 3: Invoke the read_before_serialization hooks + for interceptor in interceptors: + interceptor.read_before_serialization(context) + + # Step 4: Serialize the request + context_with_transport_request = cast( + InterceptorContext[Input, None, DafnyGetBooleanInput, None], context + ) + context_with_transport_request._transport_request = await serialize( + context_with_transport_request.request, config + ) + + # Step 5: Invoke read_after_serialization + for interceptor in interceptors: + interceptor.read_after_serialization(context_with_transport_request) + + # Step 6: Invoke modify_before_retry_loop + for interceptor in interceptors: + context_with_transport_request._transport_request = ( + interceptor.modify_before_retry_loop(context_with_transport_request) + ) + + # Step 7: Acquire the retry token. + retry_strategy = config.retry_strategy + if retry_strategy is None: + # raise ServiceError( + # "No retry_strategy found on the operation config." + # ) + pass + retry_token = None # retry_strategy.acquire_initial_retry_token() + + while True: + # Make an attempt, creating a copy of the context so we don't pass + # around old data. + context_with_response = await self._handle_attempt( + deserialize, + interceptors, + context_with_transport_request.copy(), + config, + ) + + # We perform this type-ignored re-assignment because `context` needs + # to point at the latest context so it can be generically handled + # later on. This is only an issue here because we've created a copy, + # so we're no longer simply pointing at the same object in memory + # with different names and type hints. It is possible to address this + # without having to fall back to the type ignore, but it would impose + # unnecessary runtime costs. + context = context_with_response # type: ignore + + if isinstance(context_with_response.response, Exception): + # Step 7u: Reacquire retry token if the attempt failed + raise context_with_response.response + + else: + # Step 8: Invoke record_success + # retry_strategy.record_success(token=retry_token) + break + except Exception as e: + if context.response is not None: + # config.logger.exception(f"Exception occurred while handling: {context.response}") + pass + context._response = e + + # At this point, the context's request will have been definitively set, and + # The response will be set either with the modeled output or an exception. The + # transport_request and transport_response may be set or None. + execution_context = cast( + InterceptorContext[Input, Output, DafnyGetBooleanInput | None, DafnyGetBooleanOutput | None], context + ) + return await self._finalize_execution(interceptors, execution_context) + + async def _handle_attempt( + self, + deserialize: Callable[[DafnyGetBooleanOutput, Config], Awaitable[Output]], + interceptors: list[Interceptor[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput]], + context: InterceptorContext[Input, None, DafnyGetBooleanInput, None], + config: Config, + ) -> InterceptorContext[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput | None]: + try: + # assert config.interceptors is not None + # Step 7a: Invoke read_before_attempt + for interceptor in interceptors: + interceptor.read_before_attempt(context) + + # Steps 7b-e haven't had their python designs finalized yet + # Step 7b: Invoke service_auth_scheme_resolver.resolve_auth_scheme + # Step 7c: Invoke auth_scheme.identity_resolver + # Step 7d: Invoke auth_scheme.signer + # Step 7e: Invoke identity_resolver.resolve_identity + + # Step 7g: Invoke modify_before_signing + for interceptor in interceptors: + context._transport_request = interceptor.modify_before_signing(context) + + # Step 7h: Invoke read_before_signing + for interceptor in interceptors: + interceptor.read_before_signing(context) + + # Step 7i: Invoke signer.sign_request + # This step hasn't had its python design finalized yet + + # Step 7j: Invoke read_after_signing + for interceptor in interceptors: + interceptor.read_after_signing(context) + + # Step 7k: Invoke modify_before_transmit + for interceptor in interceptors: + context._transport_request = interceptor.modify_before_transmit(context) + + # Step 7l: Invoke read_before_transmit + for interceptor in interceptors: + interceptor.read_before_transmit(context) + + ## HERE + # Step 7m: Invoke http_client.send + if config.impl is None: + raise Exception("No impl found on the operation config.") + + context_with_response = cast( + InterceptorContext[Input, None, DafnyGetBooleanInput, DafnyGetBooleanOutput], context + ) + + print(f"\ntransport_request is {context_with_response.transport_request}") + + context_with_response._transport_response = config.impl.GetBoolean( + input=context_with_response.transport_request + ) + + # Step 7n: Invoke read_after_transmit + for interceptor in interceptors: + interceptor.read_after_transmit(context_with_response) + + # Step 7o: Invoke modify_before_deserialization + for interceptor in interceptors: + context_with_response._transport_response = ( + interceptor.modify_before_deserialization(context_with_response) + ) + + # Step 7p: Invoke read_before_deserialization + for interceptor in interceptors: + interceptor.read_before_deserialization(context_with_response) + + # Step 7q: deserialize + context_with_output = cast( + InterceptorContext[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput], + context_with_response, + ) + context_with_output._response = await deserialize( + context_with_output._transport_response, config + ) + + # Step 7r: Invoke read_after_deserialization + for interceptor in interceptors: + interceptor.read_after_deserialization(context_with_output) + except Exception as e: + if context.response is not None: + # config.logger.exception(f"Exception occurred while handling: {context.response}") + pass + context._response = e + + # At this point, the context's request and transport_request have definitively been set, + # the response is either set or an exception, and the transport_resposne is either set or + # None. This will also be true after _finalize_attempt because there is no opportunity + # there to set the transport_response. + attempt_context = cast( + InterceptorContext[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput | None], context + ) + return await self._finalize_attempt(interceptors, attempt_context) + + async def _finalize_attempt( + self, + interceptors: list[Interceptor[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput]], + context: InterceptorContext[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput | None], + ) -> InterceptorContext[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput | None]: + # Step 7s: Invoke modify_before_attempt_completion + try: + for interceptor in interceptors: + context._response = interceptor.modify_before_attempt_completion( + context + ) + except Exception as e: + if context.response is not None: + # config.logger.exception(f"Exception occurred while handling: {context.response}") + pass + context._response = e + + # Step 7t: Invoke read_after_attempt + for interceptor in interceptors: + try: + interceptor.read_after_attempt(context) + except Exception as e: + if context.response is not None: + # config.logger.exception(f"Exception occurred while handling: {context.response}") + pass + context._response = e + + return context + + async def _finalize_execution( + self, + interceptors: list[Interceptor[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput]], + context: InterceptorContext[Input, Output, DafnyGetBooleanInput | None, DafnyGetBooleanOutput | None], + ) -> Output: + try: + # Step 9: Invoke modify_before_completion + for interceptor in interceptors: + context._response = interceptor.modify_before_completion(context) + + # Step 10: Invoke trace_probe.dispatch_events + try: + pass + except Exception as e: + # log and ignore exceptions + # config.logger.exception(f"Exception occurred while dispatching trace events: {e}") + pass + except Exception as e: + if context.response is not None: + # config.logger.exception(f"Exception occurred while handling: {context.response}") + pass + context._response = e + + # Step 11: Invoke read_after_execution + for interceptor in interceptors: + try: + interceptor.read_after_execution(context) + except Exception as e: + if context.response is not None: + # config.logger.exception(f"Exception occurred while handling: {context.response}") + pass + context._response = e + + # Step 12: Return / throw + if isinstance(context.response, Exception): + raise context.response + + # We may want to add some aspects of this context to the output types so we can + # return it to the end-users. + return context.response diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/config.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/config.py new file mode 100644 index 0000000000..031767f4fb --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/config.py @@ -0,0 +1,28 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +from dataclasses import dataclass +from typing import Any, Callable, TypeAlias, Union + +import Dafny.Simpletypes.Boolean + +from .models import GetBooleanInput, GetBooleanOutput + + +@dataclass(kw_only=True) +class Config: + """Configuration for SimpleBoolean + + :param interceptors: The list of interceptors, which are hooks that are called + during the execution of a request. + + :param retry_strategy: The retry strategy for issuing retry tokens and computing + retry delays. + + :param impl: + """ + interceptors: list[None] + retry_strategy: None + impl: Dafny.Simpletypes.Boolean.SimpleBooleanClient + +# A callable that allows customizing the config object on each request. +Plugin: TypeAlias = Callable[[Config], None] diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/deserialize.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/deserialize.py new file mode 100644 index 0000000000..fdb60af923 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/deserialize.py @@ -0,0 +1,11 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +#from Dafny.Path.To.Dafny.Code. import SimpleBooleanHardCoded as _SimpleBooleanHardCoded +from Dafny.Simpletypes.Boolean.Types import GetBooleanOutput_GetBooleanOutput as DafnyGetBooleanOutput + +from .config import Config +from .models import GetBooleanOutput + + +async def _deserialize_get_boolean(input: DafnyGetBooleanOutput, config: Config) -> GetBooleanOutput: + return GetBooleanOutput(value=input.value.value) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/errors.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/errors.py new file mode 100644 index 0000000000..6f38ba4e80 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/errors.py @@ -0,0 +1,23 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +from typing import Generic, Literal, TypeVar + + +class ServiceError(Exception): + """Base error for all errors in the service. + """ + pass + +T = TypeVar('T') +class ApiError(ServiceError, Generic[T]): + """Base error for all api errors in the service. + """ + code: T + def __init__(self, message: str): + super().__init__(message) + self.message = message + +class UnknownApiError(ApiError[Literal['Unknown']]): + """Error representing any unknown api errors + """ + code: Literal['Unknown'] = 'Unknown' diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/models.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/models.py new file mode 100644 index 0000000000..43b48bab05 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/models.py @@ -0,0 +1,108 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +from typing import Any, Dict, Optional + + +class GetBooleanInput: + value: Optional[bool] + def __init__( + self, + *, + value: Optional[bool] = None, + ): + self.value = value + + def as_dict(self) -> Dict[str, Any]: + """Converts the GetBooleanInput to a dictionary. + + The dictionary uses the modeled shape names rather than the parameter names as + keys to be mostly compatible with boto3. + """ + d: Dict[str, Any] = {} + + if self.value is not None: + d["value"] = self.value + + return d + + @staticmethod + def from_dict(d: Dict[str, Any]) -> "GetBooleanInput": + """Creates a GetBooleanInput from a dictionary. + + The dictionary is expected to use the modeled shape names rather than the + parameter names as keys to be mostly compatible with boto3. + """ + kwargs: Dict[str, Any] = {} + + if "value" in d: + kwargs["value"] = d["value"] + + return GetBooleanInput(**kwargs) + + def __repr__(self) -> str: + result = "GetBooleanInput(" + if self.value is not None: + result += f"value={repr(self.value)}" + + return result + ")" + + def __eq__(self, other: Any) -> bool: + if not isinstance(other, GetBooleanInput): + return False + attributes: list[str] = ['value',] + return all( + getattr(self, a) == getattr(other, a) + for a in attributes + ) + +class GetBooleanOutput: + value: Optional[bool] + def __init__( + self, + *, + value: Optional[bool] = None, + ): + self.value = value + + def as_dict(self) -> Dict[str, Any]: + """Converts the GetBooleanOutput to a dictionary. + + The dictionary uses the modeled shape names rather than the parameter names as + keys to be mostly compatible with boto3. + """ + d: Dict[str, Any] = {} + + if self.value is not None: + d["value"] = self.value + + return d + + @staticmethod + def from_dict(d: Dict[str, Any]) -> "GetBooleanOutput": + """Creates a GetBooleanOutput from a dictionary. + + The dictionary is expected to use the modeled shape names rather than the + parameter names as keys to be mostly compatible with boto3. + """ + kwargs: Dict[str, Any] = {} + + if "value" in d: + kwargs["value"] = d["value"] + + return GetBooleanOutput(**kwargs) + + def __repr__(self) -> str: + result = "GetBooleanOutput(" + if self.value is not None: + result += f"value={repr(self.value)}" + + return result + ")" + + def __eq__(self, other: Any) -> bool: + if not isinstance(other, GetBooleanOutput): + return False + attributes: list[str] = ['value',] + return all( + getattr(self, a) == getattr(other, a) + for a in attributes + ) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/serialize.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/serialize.py new file mode 100644 index 0000000000..b6379f5c73 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/serialize.py @@ -0,0 +1,11 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +#from Dafny.Path.To.Dafny.Code. import SimpleBooleanHardCoded as _SimpleBooleanHardCoded +from Dafny.Simpletypes.Boolean.Types import GetBooleanInput_GetBooleanInput as DafnyGetBooleanInput + +from .config import Config +from .models import GetBooleanInput + + +async def _serialize_get_boolean(input: GetBooleanInput, config: Config) -> DafnyGetBooleanInput: + return DafnyGetBooleanInput(value=input.value) diff --git a/TestModels/SimpleTypes/SimpleBoolean/settings.gradle.kts b/TestModels/SimpleTypes/SimpleBoolean/settings.gradle.kts index 3d460496a2..0fdf6818cd 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/settings.gradle.kts +++ b/TestModels/SimpleTypes/SimpleBoolean/settings.gradle.kts @@ -16,8 +16,6 @@ rootProject.name = "simple-types-boolean" include(":smithy-dafny-python") project(":smithy-dafny-python").projectDir = file("../../../codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen") -include(":smithy-python") -project(":smithy-python").projectDir = file("../../../codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/smithy-python/codegen") pluginManagement { repositories { diff --git a/TestModels/SimpleTypes/SimpleBoolean/smithy-build.json b/TestModels/SimpleTypes/SimpleBoolean/smithy-build.json index 5381ae80b5..cf46a33d0c 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/smithy-build.json +++ b/TestModels/SimpleTypes/SimpleBoolean/smithy-build.json @@ -1,16 +1,12 @@ { "version": "1.0", - "outputDirectory": "runtimes/python", - "projections": { - "simple-boolean": { - "plugins": { - "python-client-codegen": { - "service": "simple.types.boolean#SimpleBoolean", - "module": "simple_boolean", - "moduleVersion": "0.0.1", - "protocol": "aws.polymorph#localService" - } - } + "outputDirectory": "runtimes/python (outputDirectory doesn't work until Smithy/1425 is resolved; see SharedMakefile.mk)", + "plugins": { + "python-client-codegen": { + "service": "simple.types.boolean#SimpleBoolean", + "module": "simple_boolean", + "moduleVersion": "0.0.1", + "protocol": "aws.polymorph#localService" } } } diff --git a/TestModels/SimpleTypes/SimpleBoolean/src/Index.dfy b/TestModels/SimpleTypes/SimpleBoolean/src/Index.dfy index 7ac36a954d..b68d66b97b 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/src/Index.dfy +++ b/TestModels/SimpleTypes/SimpleBoolean/src/Index.dfy @@ -1,6 +1,6 @@ include "SimpleBooleanImpl.dfy" -module {:extern "Dafny.Simple.Types.Boolean" } SimpleBoolean refines AbstractSimpleTypesBooleanService { +module {:extern "Dafny.Simpletypes.Boolean" } SimpleBoolean refines AbstractSimpletypesBooleanService { import Operations = SimpleBooleanImpl function method DefaultSimpleBooleanConfig(): SimpleBooleanConfig { diff --git a/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy b/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy index c28e8eeb52..cea9db0e44 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy +++ b/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy @@ -1,6 +1,6 @@ include "../Model/SimpleTypesBooleanTypes.dfy" -module SimpleBooleanImpl refines AbstractSimpleTypesBooleanOperations { +module SimpleBooleanImpl refines AbstractSimpletypesBooleanOperations { datatype Config = Config type InternalConfig = Config predicate ValidInternalConfig?(config: InternalConfig) diff --git a/TestModels/SimpleTypes/SimpleBoolean/src/WrappedSimpleBooleanImpl.dfy b/TestModels/SimpleTypes/SimpleBoolean/src/WrappedSimpleBooleanImpl.dfy index 3e36f44b23..2df5ae370f 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/src/WrappedSimpleBooleanImpl.dfy +++ b/TestModels/SimpleTypes/SimpleBoolean/src/WrappedSimpleBooleanImpl.dfy @@ -1,6 +1,6 @@ include "../Model/SimpleTypesBooleanTypesWrapped.dfy" -module {:extern "Dafny.Simple.Types.Boolean.Wrapped"} WrappedSimpleTypesBooleanService refines WrappedAbstractSimpleTypesBooleanService { +module {:extern "Dafny.Simpletypes.Boolean.Wrapped"} WrappedSimpleTypesBooleanService refines WrappedAbstractSimpletypesBooleanService { import WrappedService = SimpleBoolean function method WrappedDefaultSimpleBooleanConfig(): SimpleBooleanConfig { SimpleBooleanConfig diff --git a/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy b/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy index 2c6cda534f..38ff6760a4 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy +++ b/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy @@ -2,7 +2,7 @@ include "../src/Index.dfy" module SimpleBooleanImplTest { import SimpleBoolean - import opened SimpleTypesBooleanTypes + import opened SimpletypesBooleanTypes import opened Wrappers method{:test} GetBooleanTrue(){ var client :- expect SimpleBoolean.SimpleBoolean(); diff --git a/codegen/smithy-dafny-codegen/build.gradle.kts b/codegen/smithy-dafny-codegen/build.gradle.kts index b9908cd2a4..b0a2cd4598 100644 --- a/codegen/smithy-dafny-codegen/build.gradle.kts +++ b/codegen/smithy-dafny-codegen/build.gradle.kts @@ -36,6 +36,9 @@ dependencies { implementation("software.amazon.awssdk:codegen:2.20.26") implementation("com.squareup:javapoet:1.13.0") + // Smithy-Dafny-Python + implementation("software.amazon.smithy.python:smithy-python-codegen:0.1.0") + // Used for parsing-based tests testImplementation("org.antlr:antlr4:4.9.2") } diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyTestIntegration.java b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyTestIntegration.java index 0857e0b243..f9fea47d35 100644 --- a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyTestIntegration.java +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyTestIntegration.java @@ -18,21 +18,22 @@ import java.util.Collections; import java.util.List; import java.util.Set; +import software.amazon.smithy.codegen.core.ReservedWords; +import software.amazon.smithy.codegen.core.ReservedWordsBuilder; import software.amazon.smithy.codegen.core.Symbol; import software.amazon.smithy.codegen.core.SymbolReference; +import software.amazon.smithy.model.Model; import software.amazon.smithy.model.shapes.Shape; import software.amazon.smithy.model.shapes.ShapeId; import software.amazon.smithy.python.codegen.ApplicationProtocol; import software.amazon.smithy.python.codegen.ConfigField; import software.amazon.smithy.python.codegen.GenerationContext; import software.amazon.smithy.python.codegen.PythonDependency; +import software.amazon.smithy.python.codegen.PythonSettings; import software.amazon.smithy.python.codegen.SmithyPythonDependency; import software.amazon.smithy.python.codegen.integration.ProtocolGenerator; import software.amazon.smithy.python.codegen.integration.RuntimeClientPlugin; -/** - * Integration that registers {@link RestJsonProtocolGenerator}. - */ public final class DafnyTestIntegration implements software.amazon.smithy.python.codegen.integration.PythonIntegration { From 8e0081cf241f2be1cec5ea0cece36f773caf3bf2 Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Fri, 7 Apr 2023 15:06:34 -0700 Subject: [PATCH 009/673] wrapped benerated tests pass --- .../ImplementationFromDafny.py | 9 + .../ImplementationFromDafny-py/System_.py | 20 + .../ImplementationFromDafny-py/_dafny.py | 467 ++++++++++++++++++ .../ImplementationFromDafny-py/module_.py | 15 + .../python/python_client_codegen/Iamaredme | 3 + .../python/python_client_codegen/README.md | 3 + .../python/python_client_codegen/__init__.py | 0 .../python_client_codegen/pyproject.toml | 46 ++ .../simple_boolean.egg-info/PKG-INFO | 21 + .../simple_boolean.egg-info/SOURCES.txt | 14 + .../dependency_links.txt | 1 + .../simple_boolean.egg-info/requires.txt | 1 + .../simple_boolean.egg-info/top_level.txt | 1 + .../simple_boolean/__init__.py | 1 + .../simple_boolean/client.py | 363 ++++++++++++++ .../simple_boolean/config.py | 31 ++ .../simple_boolean/deserialize.py | 7 + .../simple_boolean/errors.py | 23 + .../simple_boolean/models.py | 108 ++++ .../simple_boolean/serialize.py | 11 + 20 files changed, 1145 insertions(+) create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/ImplementationFromDafny-py/ImplementationFromDafny.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/ImplementationFromDafny-py/System_.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/ImplementationFromDafny-py/_dafny.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/ImplementationFromDafny-py/module_.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/Iamaredme create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/README.md create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/__init__.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/pyproject.toml create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean.egg-info/PKG-INFO create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean.egg-info/SOURCES.txt create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean.egg-info/dependency_links.txt create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean.egg-info/requires.txt create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean.egg-info/top_level.txt create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/__init__.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/client.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/config.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/deserialize.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/errors.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/models.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/serialize.py diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/ImplementationFromDafny-py/ImplementationFromDafny.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/ImplementationFromDafny-py/ImplementationFromDafny.py new file mode 100644 index 0000000000..992697c0c2 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/ImplementationFromDafny-py/ImplementationFromDafny.py @@ -0,0 +1,9 @@ +# Dafny program the_program compiled into Python +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/ImplementationFromDafny-py/System_.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/ImplementationFromDafny-py/System_.py new file mode 100644 index 0000000000..32e6d896ff --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/ImplementationFromDafny-py/System_.py @@ -0,0 +1,20 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny + +assert "System_" == __name__ +System_ = sys.modules[__name__] + +class nat: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return int(0) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/ImplementationFromDafny-py/_dafny.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/ImplementationFromDafny-py/_dafny.py new file mode 100644 index 0000000000..e23cd1aa9e --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/ImplementationFromDafny-py/_dafny.py @@ -0,0 +1,467 @@ +"""Runtime enabling Dafny language features.""" +import builtins +from dataclasses import dataclass +from contextlib import contextmanager +from fractions import Fraction +from collections import Counter +from collections.abc import Iterable +from functools import reduce +from types import GeneratorType, FunctionType +from itertools import chain, combinations, count +import copy + +class classproperty(property): + def __get__(self, instance, owner): + return classmethod(self.fget).__get__(None, owner)() + +def print(value): + builtins.print(value, end="") + +# Dafny strings are currently sequences of UTF-16 code units. +# To make a best effort attempt at printing the right characters we attempt to decode, +# but have to allow for invalid sequences. +def string_from_utf_16(utf_16_code_units): + return b''.join(ord(c).to_bytes(2, 'little') for c in utf_16_code_units).decode("utf-16-le", errors = 'replace') + +def string_of(value) -> str: + if hasattr(value, '__dafnystr__'): + return value.__dafnystr__() + elif value is None: + return "null" + elif isinstance(value, bool): + return "true" if value else "false" + elif isinstance(value, str): + # This is only for Dafny char values. + # Dafny strings are represented as Seq's of individual char values, + # and Seq defines __dafnystr__. + return string_from_utf_16(value) + elif isinstance(value, tuple): + return '(' + ', '.join(map(string_of, value)) + ')' + elif isinstance(value, FunctionType): + return "Function" + else: + return str(value) + +@dataclass +class Break(Exception): + target: str + +@dataclass +class Continue(Exception): + target: str + +class TailCall(Exception): + pass + +@contextmanager +def label(name: str = None): + try: + yield + except Break as g: + if g.target != name: + raise g + except TailCall as g: + if name is not None: + raise g + +@contextmanager +def c_label(name: str = None): + try: + yield + except Continue as g: + if g.target != name: + raise g + +class CodePoint(str): + + escapes = { + '\n' : "\\n", + '\r' : "\\r", + '\t' : "\\t", + '\0' : "\\0", + '\'' : "\\'", + '\"' : "\\\"", + '\\' : "\\\\", + } + + def __escaped__(self): + return self.escapes.get(self, self) + + def __dafnystr__(self): + return f"'{self.__escaped__()}'" + +class Seq(tuple): + def __init__(self, __iterable = None, isStr = False): + ''' + isStr defines whether this value should be tracked at runtime as a string (a.k.a. seq) + It accepts three different values: + - True: this value is definitely a string, mark it as such + - False: this value might be a string, apply heuristics to make a best guess + - None: don't apply heuristics, don't mark it as a string + + None is used when --unicode-char is true, to ensure consistent printing of strings + across backends without depending on any runtime tracking. + See docs/Compilation/StringsAndChars.md. + ''' + + if __iterable is None: + __iterable = [] + if isStr is None: + self.isStr = False + else: + self.isStr = isStr \ + or isinstance(__iterable, str) \ + or (isinstance(__iterable, Seq) and __iterable.isStr) \ + or (not isinstance(__iterable, GeneratorType) + and all(isinstance(e, str) and len(e) == 1 for e in __iterable) + and len(__iterable) > 0) + + @property + def Elements(self): + return self + + @property + def UniqueElements(self): + return frozenset(self) + + def VerbatimString(self, asliteral): + if asliteral: + return f"\"{''.join(map(lambda c: c.__escaped__(), self))}\"" + else: + return ''.join(self) + + def __dafnystr__(self) -> str: + if self.isStr: + # This should never be true when using --unicode-char, + # so it is safe to assume we are a sequence of UTF-16 code units. + return string_from_utf_16(self) + return '[' + ', '.join(map(string_of, self)) + ']' + + def __add__(self, other): + return Seq(super().__add__(other), isStr=self.isStr and other.isStr) + + def __getitem__(self, key): + if isinstance(key, slice): + indices = range(*key.indices(len(self))) + return Seq((self[i] for i in indices), isStr=self.isStr) + return super().__getitem__(key) + + def set(self, key, value): + l = list(self) + l[key] = value + return Seq(l, isStr=self.isStr) + + def __hash__(self) -> int: + return hash(tuple(self)) + + def __lt__(self, other): + return len(self) < len(other) and self == other[:len(self)] + + def __le__(self, other): + return len(self) <= len(other) and self == other[:len(self)] + +class Array: + class Box(list): + def __dafnystr__(self) -> str: + return '[' + ', '.join(map(string_of, self)) + ']' + + def __init__(self, initValue, *dims): + self.arr = initValue + self.dims = list(dims) + for i in reversed(self.dims): + self.arr = Array.Box([copy.copy(self.arr) for _ in range(i)]) + + def __dafnystr__(self) -> str: + return '[' + ', '.join(map(string_of, self.arr)) + ']' + + def __str__(self): + return self.__dafnystr__() + + def length(self, i): + return self.dims[i] if i < len(self.dims) else None + + def __len__(self): + return self.length(0) + + def __getitem__(self, key): + if not isinstance(key, Iterable): + return self.arr[key] + arr = self.arr + for i in key: + arr = arr[i] + return arr + + def __setitem__(self, key, value): + if not isinstance(key, Iterable): + self.arr[key] = value + return + arr = self.arr + for i in range(len(key)-1): + arr = arr[key[i]] + arr[key[-1]] = value + +class Set(frozenset): + @property + def Elements(self): + return self + + @property + def AllSubsets(self): + # https://docs.python.org/3/library/itertools.html#itertools-recipes + s = list(self) + return map(Set, chain.from_iterable(combinations(s, r) for r in range(len(s)+1))) + + def __dafnystr__(self) -> str: + return '{' + ', '.join(map(string_of, self)) + '}' + + def union(self, other): + return Set(super().union(self, other)) + + def intersection(self, other): + return Set(super().intersection(other)) + + def ispropersubset(self, other): + return self.issubset(other) and self != other + + def __or__(self, other): + return self.union(other) + + def __sub__(self, other): + return Set(super().__sub__(other)) + +class MultiSet(Counter): + def __dafnystr__(self) -> str: + return 'multiset{' + ', '.join(map(string_of, self.elements())) + '}' + + def __len__(self): + return reduce(lambda acc, key: acc + self[key], self, 0) + + def union(self, other): + return MultiSet(self + other) + + def __or__(self, other): + return self.union(other) + + def intersection(self, other): + return MultiSet(self & other) + + def __sub__(self, other): + return MultiSet(super().__sub__(other)) + + @property + def keys(self): + return Set(key for key in self if self[key] > 0) + + @property + def Elements(self): + return self.elements() + + @property + def UniqueElements(self): + return self.keys + + def isdisjoint(self, other): + return frozenset(self.keys).isdisjoint(frozenset(other.keys)) + + def issubset(self, other): + return all(self[key] <= other[key] for key in frozenset(self).union(frozenset(other))) + + def ispropersubset(self, other): + return self.issubset(other) and len(self) < len(other) + + def set(self, key, value): + set = Counter(self) + set[key] = value + return MultiSet(set) + + def __hash__(self): + return hash(frozenset(self.keys)) + + def __eq__(self, other): + return all(self[key] == other[key] for key in self.keys | other.keys) + + def __setattr__(self, key, value): + raise TypeError("'Map' object is immutable") + + def __contains__(self, item): + return self[item] > 0 + +class Map(dict): + def __dafnystr__(self) -> str: + return 'map[' + ', '.join(map(lambda i: f'{string_of(i[0])} := {string_of(i[1])}', self.items)) + ']' + + @property + def Elements(self): + return self + + @property + def keys(self): + return Set(super().keys()) + + @property + def values(self): + return Set(super().values()) + + @property + def items(self): + return Set(super().items()) + + def set(self, key, value): + map = dict(self) + map[key] = value + return Map(map) + + def __sub__(self, other): + map = dict(self) + for key in list(other): + map.pop(key, None) + return Map(map) + + def __or__(self, other): + map = dict(self) + for k, v in other.items: + map[k] = v + return Map(map) + + def __hash__(self): + return hash(frozenset(self)) + + def __setattr__(self, key, value): + raise TypeError("'Map' object is immutable") + +class BigOrdinal: + @staticmethod + def is_limit(ord): + return ord == 0 + + @staticmethod + def is_succ(ord): + return 0 < ord + + @staticmethod + def offset(ord): + return ord + + @staticmethod + def is_nat(ord): + # at run time, every ORDINAL is a natural number + return True + +class BigRational(Fraction): + def __dafnystr__(self): + if self.denominator == 1: + return f"{self.numerator}.0" + correction = self.divides_a_power_of_10(self.denominator) + if correction is None: + return f"({self.numerator}.0 / {self.denominator}.0)" + compensation, shift = correction + if self.numerator < 0: + sign, digits = "-", str(-self.numerator*compensation) + else: + sign, digits = "", str(self.numerator*compensation) + if shift < len(digits): + n = len(digits) - shift + return f"{sign}{digits[:n]}.{digits[n:]}" + return f"{sign}0.{'0' * (shift - len(digits))}{digits}" + + @staticmethod + def isolate_factor(f, x): + y = 0 + while x > 1 and x % f == 0: + y += 1 + x //= f + return x, y + + @staticmethod + def divides_a_power_of_10(x): + rem, expA = BigRational.isolate_factor(10, x) + if rem % 5 == 0 or rem % 2 == 0 or rem == 1: + major, minor = (5, 2) if rem % 5 == 0 else (2, 5) + rem, expB = BigRational.isolate_factor(major, rem) + return (minor**expB, expA+expB) if rem == 1 else None + return None + + def __add__(self, other): + return BigRational(super().__add__(other)) + + def __sub__(self, other): + return BigRational(super().__sub__(other)) + + def __mul__(self, other): + return BigRational(super().__mul__(other)) + + def __truediv__(self, other): + return BigRational(super().__truediv__(other)) + +def plus_char(a, b): + return chr(ord(a) + ord(b)) + +def minus_char(a, b): + return chr(ord(a) - ord(b)) + +def euclidian_division(a, b): + if 0 <= a: + if 0 <= b: + return a // b + else: + return -(a // (-b)) + else: + if 0 <= b: + return -((-a-1) // b) - 1 + else: + return (-a-1) // (-b) + 1 + +def euclidian_modulus(a, b): + bp = abs(b) + if 0 <= a: + return a % bp + c = (-a) % bp + return c if c == 0 else bp - c + +@dataclass +class HaltException(Exception): + message: str + +def quantifier(vals, frall, pred): + for u in vals: + if pred(u) != frall: + return not frall + return frall + +def AllBooleans(): + return [False, True] + +def AllChars(): + return (chr(i) for i in range(0x10000)) + +def AllUnicodeChars(): + return chain((CodePoint(chr(i)) for i in range(0xD800)), + (CodePoint(chr(i)) for i in range(0xE000, 0x11_0000))) + +def AllIntegers(): + return (i//2 if i % 2 == 0 else -i//2 for i in count(0)) + +def IntegerRange(lo, hi): + if lo is None: + return count(hi-1, -1) + if hi is None: + return count(lo) + return range(lo, hi) + +class Doubler: + def __init__(self, start): + self.start = start + + def __iter__(self): + i = self.start + while True: + yield i + i *= 2 + +class defaults: + bool = staticmethod(lambda: False) + char = staticmethod(lambda: 'D') + int = staticmethod(lambda: 0) + real = staticmethod(BigRational) + pointer = staticmethod(lambda: None) + tuple = staticmethod(lambda *args: lambda: tuple(a() for a in args)) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/ImplementationFromDafny-py/module_.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/ImplementationFromDafny-py/module_.py new file mode 100644 index 0000000000..4629717d05 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/ImplementationFromDafny-py/module_.py @@ -0,0 +1,15 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny +import System_ +import Dafny.Simpletypes.Boolean.Types +import SimpleBooleanImpl_Compile +import Dafny.Simpletypes.Boolean + +assert "module_" == __name__ +module_ = sys.modules[__name__] + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/Iamaredme b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/Iamaredme new file mode 100644 index 0000000000..63b8568325 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/Iamaredme @@ -0,0 +1,3 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +yo diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/README.md b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/README.md new file mode 100644 index 0000000000..4d95aa6598 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/README.md @@ -0,0 +1,3 @@ +## Simple_boolean Client + +simple_boolean client diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/__init__.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/pyproject.toml b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/pyproject.toml new file mode 100644 index 0000000000..cb3492f592 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/pyproject.toml @@ -0,0 +1,46 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +[build-system] +requires = ["setuptools", "setuptools-scm", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "simple_boolean" +version = "0.0.1" +description = "simple_boolean client" +readme = "README.md" +requires-python = ">=3.11" +keywords = ["smithy", "simple_boolean"] +license = {text = "Apache-2.0"} +classifiers = [ + "Development Status :: 2 - Pre-Alpha", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Natural Language :: English", + "License :: OSI Approved :: Apache Software License", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.11" +] + +dependencies = [ + "smithy_python==0.0.1" +] +[tool.setuptools.packages.find] +exclude=["tests*"] + +[tool.mypy] +strict = true +warn_unused_configs = true + +[[tool.mypy.overrides]] +module = ["awscrt", "pytest"] +ignore_missing_imports = true + +[tool.black] +target-version = ["py311"] + +[tool.pytest.ini_options] +python_classes = ["!Test"] +asyncio_mode = "auto" diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean.egg-info/PKG-INFO b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean.egg-info/PKG-INFO new file mode 100644 index 0000000000..0e1e065aa0 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean.egg-info/PKG-INFO @@ -0,0 +1,21 @@ +Metadata-Version: 2.1 +Name: simple-boolean +Version: 0.0.1 +Summary: simple_boolean client +License: Apache-2.0 +Keywords: smithy,simple_boolean +Classifier: Development Status :: 2 - Pre-Alpha +Classifier: Intended Audience :: Developers +Classifier: Intended Audience :: System Administrators +Classifier: Natural Language :: English +Classifier: License :: OSI Approved :: Apache Software License +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3 :: Only +Classifier: Programming Language :: Python :: 3.11 +Requires-Python: >=3.11 +Description-Content-Type: text/markdown + +## Simple_boolean Client + +simple_boolean client diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean.egg-info/SOURCES.txt b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean.egg-info/SOURCES.txt new file mode 100644 index 0000000000..1453b42f2b --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean.egg-info/SOURCES.txt @@ -0,0 +1,14 @@ +README.md +pyproject.toml +simple_boolean/__init__.py +simple_boolean/client.py +simple_boolean/config.py +simple_boolean/deserialize.py +simple_boolean/errors.py +simple_boolean/models.py +simple_boolean/serialize.py +simple_boolean.egg-info/PKG-INFO +simple_boolean.egg-info/SOURCES.txt +simple_boolean.egg-info/dependency_links.txt +simple_boolean.egg-info/requires.txt +simple_boolean.egg-info/top_level.txt \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean.egg-info/dependency_links.txt b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean.egg-info/dependency_links.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean.egg-info/dependency_links.txt @@ -0,0 +1 @@ + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean.egg-info/requires.txt b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean.egg-info/requires.txt new file mode 100644 index 0000000000..31bc6d2c48 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean.egg-info/requires.txt @@ -0,0 +1 @@ +smithy_python==0.0.1 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean.egg-info/top_level.txt b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean.egg-info/top_level.txt new file mode 100644 index 0000000000..ab0668a6b3 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean.egg-info/top_level.txt @@ -0,0 +1 @@ +simple_boolean diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/__init__.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/__init__.py new file mode 100644 index 0000000000..247be3e3d4 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/__init__.py @@ -0,0 +1 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/client.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/client.py new file mode 100644 index 0000000000..9c02cbd30f --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/client.py @@ -0,0 +1,363 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +from asyncio import sleep +from copy import deepcopy +from typing import Awaitable, Callable, TypeVar, cast + +from . import set_config_impl +from smithy_python.exceptions import SmithyRetryException +from smithy_python.interfaces.http import IaAmDafny, IamaAlsoDafny +from smithy_python.interfaces.interceptor import Interceptor, InterceptorContext +from smithy_python.interfaces.retries import RetryErrorInfo, RetryErrorType + +from .config import Config, Plugin +from .deserialize import _deserialize_get_boolean +from .errors import ServiceError +from .models import GetBooleanInput, GetBooleanOutput +from .serialize import _serialize_get_boolean + + +Input = TypeVar("Input") +Output = TypeVar("Output") + +class SimpleBoolean: + """Client for SimpleBoolean + + :param config: Optional configuration for the client. Here you can set things like the + endpoint for HTTP services or auth credentials. + + :param plugins: A list of callables that modify the configuration dynamically. These + can be used to set defaults, for example. + """ + def __init__(self, config: Config | None = None, plugins: list[Plugin] | None = None): + self._config = config or Config() + + client_plugins: list[Plugin] = [ + set_config_impl, + ] + if plugins: + client_plugins.extend(plugins) + + for plugin in client_plugins: + plugin(self._config) + + async def get_boolean(self, input: GetBooleanInput, plugins: list[Plugin] | None = None) -> GetBooleanOutput: + """Invokes the GetBoolean operation. + + :param input: The operation's input. + + :param plugins: A list of callables that modify the configuration dynamically. + Changes made by these plugins only apply for the duration of the operation + execution and will not affect any other operation invocations. + """ + operation_plugins = [ + + ] + if plugins: + operation_plugins.extend(plugins) + + return await self._execute_operation( + input=input, + plugins=operation_plugins, + serialize=_serialize_get_boolean, + deserialize=_deserialize_get_boolean, + config=self._config, + ) + + async def _execute_operation( + self, + input: Input, + plugins: list[Plugin], + serialize: Callable[[Input, Config], Awaitable[IaAmDafny]], + deserialize: Callable[[IamaAlsoDafny, Config], Awaitable[Output]], + config: Config, + ) -> Output: + try: + return await self._handle_execution( + input, plugins, serialize, deserialize, config + ) + except Exception as e: + # Make sure every exception that we throw is an instance of ServiceError so + # customers can reliably catch everything we throw. + if not isinstance(e, ServiceError): + raise ServiceError(e) from e + raise e + + async def _handle_execution( + self, + input: Input, + plugins: list[Plugin], + serialize: Callable[[Input, Config], Awaitable[IaAmDafny]], + deserialize: Callable[[IamaAlsoDafny, Config], Awaitable[Output]], + config: Config, + ) -> Output: + context: InterceptorContext[Input, None, None, None] = InterceptorContext( + request=input, + response=None, + transport_request=None, + transport_response=None, + ) + _client_interceptors = config.interceptors or [] + client_interceptors = cast( + list[Interceptor[Input, Output, IaAmDafny, IamaAlsoDafny]], _client_interceptors + ) + interceptors = client_interceptors + + try: + # Step 1a: Invoke read_before_execution on client-level interceptors + for interceptor in client_interceptors: + interceptor.read_before_execution(context) + + # Step 1b: Run operation-level plugins + config = deepcopy(config) + for plugin in plugins: + plugin(config) + + _client_interceptors = config.interceptors or [] + interceptors = cast( + list[Interceptor[Input, Output, IaAmDafny, IamaAlsoDafny]], + _client_interceptors, + ) + + # Step 1c: Invoke the read_before_execution hooks on newly added + # interceptors. + for interceptor in interceptors: + if interceptor not in client_interceptors: + interceptor.read_before_execution(context) + + # Step 2: Invoke the modify_before_serialization hooks + for interceptor in interceptors: + context._request = interceptor.modify_before_serialization(context) + + # Step 3: Invoke the read_before_serialization hooks + for interceptor in interceptors: + interceptor.read_before_serialization(context) + + # Step 4: Serialize the request + context_with_transport_request = cast( + InterceptorContext[Input, None, IaAmDafny, None], context + ) + context_with_transport_request._transport_request = await serialize( + context_with_transport_request.request, config + ) + + # Step 5: Invoke read_after_serialization + for interceptor in interceptors: + interceptor.read_after_serialization(context_with_transport_request) + + # Step 6: Invoke modify_before_retry_loop + for interceptor in interceptors: + context_with_transport_request._transport_request = ( + interceptor.modify_before_retry_loop(context_with_transport_request) + ) + + # Step 7: Acquire the retry token. + retry_strategy = config.retry_strategy + if retry_strategy is None: + raise ServiceError( + "No retry_strategy found on the operation config." + ) + retry_token = retry_strategy.acquire_initial_retry_token() + + while True: + # Make an attempt, creating a copy of the context so we don't pass + # around old data. + context_with_response = await self._handle_attempt( + deserialize, + interceptors, + context_with_transport_request.copy(), + config, + ) + + # We perform this type-ignored re-assignment because `context` needs + # to point at the latest context so it can be generically handled + # later on. This is only an issue here because we've created a copy, + # so we're no longer simply pointing at the same object in memory + # with different names and type hints. It is possible to address this + # without having to fall back to the type ignore, but it would impose + # unnecessary runtime costs. + context = context_with_response # type: ignore + + if isinstance(context_with_response.response, Exception): + # Step 7u: Reacquire retry token if the attempt failed + try: + retry_token = retry_strategy.refresh_retry_token_for_retry( + token_to_renew=retry_token, + error_info=RetryErrorInfo( + # TODO: Determine the error type. + error_type=RetryErrorType.CLIENT_ERROR, + ) + ) + except SmithyRetryException: + raise context_with_response.response + await sleep(retry_token.retry_delay) + else: + # Step 8: Invoke record_success + retry_strategy.record_success(token=retry_token) + break + except Exception as e: + if context.response is not None: + # config.logger.exception(f"Exception occurred while handling: {context.response}") + pass + context._response = e + + # At this point, the context's request will have been definitively set, and + # The response will be set either with the modeled output or an exception. The + # transport_request and transport_response may be set or None. + execution_context = cast( + InterceptorContext[Input, Output, IaAmDafny | None, IamaAlsoDafny | None], context + ) + return await self._finalize_execution(interceptors, execution_context) + + async def _handle_attempt( + self, + deserialize: Callable[[IamaAlsoDafny, Config], Awaitable[Output]], + interceptors: list[Interceptor[Input, Output, IaAmDafny, IamaAlsoDafny]], + context: InterceptorContext[Input, None, IaAmDafny, None], + config: Config, + ) -> InterceptorContext[Input, Output, IaAmDafny, IamaAlsoDafny | None]: + try: + # assert config.interceptors is not None + # Step 7a: Invoke read_before_attempt + for interceptor in interceptors: + interceptor.read_before_attempt(context) + + # Steps 7b-e haven't had their python designs finalized yet + # Step 7b: Invoke service_auth_scheme_resolver.resolve_auth_scheme + # Step 7c: Invoke auth_scheme.identity_resolver + # Step 7d: Invoke auth_scheme.signer + # Step 7e: Invoke identity_resolver.resolve_identity + + # Step 7g: Invoke modify_before_signing + for interceptor in interceptors: + context._transport_request = interceptor.modify_before_signing(context) + + # Step 7h: Invoke read_before_signing + for interceptor in interceptors: + interceptor.read_before_signing(context) + + # Step 7i: Invoke signer.sign_request + # This step hasn't had its python design finalized yet + + # Step 7j: Invoke read_after_signing + for interceptor in interceptors: + interceptor.read_after_signing(context) + + # Step 7k: Invoke modify_before_transmit + for interceptor in interceptors: + context._transport_request = interceptor.modify_before_transmit(context) + + # Step 7l: Invoke read_before_transmit + for interceptor in interceptors: + interceptor.read_before_transmit(context) + + # Step 7n: Invoke read_after_transmit + for interceptor in interceptors: + interceptor.read_after_transmit(context_with_response) + + # Step 7o: Invoke modify_before_deserialization + for interceptor in interceptors: + context_with_response._transport_response = ( + interceptor.modify_before_deserialization(context_with_response) + ) + + # Step 7p: Invoke read_before_deserialization + for interceptor in interceptors: + interceptor.read_before_deserialization(context_with_response) + + # Step 7q: deserialize + context_with_output = cast( + InterceptorContext[Input, Output, IaAmDafny, IamaAlsoDafny], + context_with_response, + ) + context_with_output._response = await deserialize( + context_with_output._transport_response, config + ) + + # Step 7r: Invoke read_after_deserialization + for interceptor in interceptors: + interceptor.read_after_deserialization(context_with_output) + except Exception as e: + if context.response is not None: + # config.logger.exception(f"Exception occurred while handling: {context.response}") + pass + context._response = e + + # At this point, the context's request and transport_request have definitively been set, + # the response is either set or an exception, and the transport_resposne is either set or + # None. This will also be true after _finalize_attempt because there is no opportunity + # there to set the transport_response. + attempt_context = cast( + InterceptorContext[Input, Output, IaAmDafny, IamaAlsoDafny | None], context + ) + return await self._finalize_attempt(interceptors, attempt_context) + + async def _finalize_attempt( + self, + interceptors: list[Interceptor[Input, Output, IaAmDafny, IamaAlsoDafny]], + context: InterceptorContext[Input, Output, IaAmDafny, IamaAlsoDafny | None], + ) -> InterceptorContext[Input, Output, IaAmDafny, IamaAlsoDafny | None]: + # Step 7s: Invoke modify_before_attempt_completion + try: + for interceptor in interceptors: + context._response = interceptor.modify_before_attempt_completion( + context + ) + except Exception as e: + if context.response is not None: + # config.logger.exception(f"Exception occurred while handling: {context.response}") + pass + context._response = e + + # Step 7t: Invoke read_after_attempt + for interceptor in interceptors: + try: + interceptor.read_after_attempt(context) + except Exception as e: + if context.response is not None: + # config.logger.exception(f"Exception occurred while handling: {context.response}") + pass + context._response = e + + return context + + async def _finalize_execution( + self, + interceptors: list[Interceptor[Input, Output, IaAmDafny, IamaAlsoDafny]], + context: InterceptorContext[Input, Output, IaAmDafny | None, IamaAlsoDafny | None], + ) -> Output: + try: + # Step 9: Invoke modify_before_completion + for interceptor in interceptors: + context._response = interceptor.modify_before_completion(context) + + # Step 10: Invoke trace_probe.dispatch_events + try: + pass + except Exception as e: + # log and ignore exceptions + # config.logger.exception(f"Exception occurred while dispatching trace events: {e}") + pass + except Exception as e: + if context.response is not None: + # config.logger.exception(f"Exception occurred while handling: {context.response}") + pass + context._response = e + + # Step 11: Invoke read_after_execution + for interceptor in interceptors: + try: + interceptor.read_after_execution(context) + except Exception as e: + if context.response is not None: + # config.logger.exception(f"Exception occurred while handling: {context.response}") + pass + context._response = e + + # Step 12: Return / throw + if isinstance(context.response, Exception): + raise context.response + + # We may want to add some aspects of this context to the output types so we can + # return it to the end-users. + return context.response diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/config.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/config.py new file mode 100644 index 0000000000..9c440a6abe --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/config.py @@ -0,0 +1,31 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +from dataclasses import dataclass +from typing import Any, Callable, TypeAlias, Union + +from Path.To.Config.Namespace import config_type +from smithy_python.interfaces.interceptor import Interceptor +from smithy_python.interfaces.retries import RetryStrategy + +from .models import GetBooleanInput, GetBooleanOutput + + +_ServiceInterceptor = Union[Interceptor[GetBooleanInput, GetBooleanOutput, Any, Any]] +@dataclass(kw_only=True) +class Config: + """Configuration for SimpleBoolean + + :param interceptors: The list of interceptors, which are hooks that are called + during the execution of a request. + + :param retry_strategy: The retry strategy for issuing retry tokens and computing + retry delays. + + :param impl: + """ + interceptors: list[_ServiceInterceptor] | None = None + retry_strategy: RetryStrategy | None = None + impl: config_type + +# A callable that allows customizing the config object on each request. +Plugin: TypeAlias = Callable[[Config], None] diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/deserialize.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/deserialize.py new file mode 100644 index 0000000000..ce968c3438 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/deserialize.py @@ -0,0 +1,7 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +from typing import Any + + +# This is the output of Dafny, +# so it probably needs to call the impl and get the result? diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/errors.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/errors.py new file mode 100644 index 0000000000..6f38ba4e80 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/errors.py @@ -0,0 +1,23 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +from typing import Generic, Literal, TypeVar + + +class ServiceError(Exception): + """Base error for all errors in the service. + """ + pass + +T = TypeVar('T') +class ApiError(ServiceError, Generic[T]): + """Base error for all api errors in the service. + """ + code: T + def __init__(self, message: str): + super().__init__(message) + self.message = message + +class UnknownApiError(ApiError[Literal['Unknown']]): + """Error representing any unknown api errors + """ + code: Literal['Unknown'] = 'Unknown' diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/models.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/models.py new file mode 100644 index 0000000000..43b48bab05 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/models.py @@ -0,0 +1,108 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +from typing import Any, Dict, Optional + + +class GetBooleanInput: + value: Optional[bool] + def __init__( + self, + *, + value: Optional[bool] = None, + ): + self.value = value + + def as_dict(self) -> Dict[str, Any]: + """Converts the GetBooleanInput to a dictionary. + + The dictionary uses the modeled shape names rather than the parameter names as + keys to be mostly compatible with boto3. + """ + d: Dict[str, Any] = {} + + if self.value is not None: + d["value"] = self.value + + return d + + @staticmethod + def from_dict(d: Dict[str, Any]) -> "GetBooleanInput": + """Creates a GetBooleanInput from a dictionary. + + The dictionary is expected to use the modeled shape names rather than the + parameter names as keys to be mostly compatible with boto3. + """ + kwargs: Dict[str, Any] = {} + + if "value" in d: + kwargs["value"] = d["value"] + + return GetBooleanInput(**kwargs) + + def __repr__(self) -> str: + result = "GetBooleanInput(" + if self.value is not None: + result += f"value={repr(self.value)}" + + return result + ")" + + def __eq__(self, other: Any) -> bool: + if not isinstance(other, GetBooleanInput): + return False + attributes: list[str] = ['value',] + return all( + getattr(self, a) == getattr(other, a) + for a in attributes + ) + +class GetBooleanOutput: + value: Optional[bool] + def __init__( + self, + *, + value: Optional[bool] = None, + ): + self.value = value + + def as_dict(self) -> Dict[str, Any]: + """Converts the GetBooleanOutput to a dictionary. + + The dictionary uses the modeled shape names rather than the parameter names as + keys to be mostly compatible with boto3. + """ + d: Dict[str, Any] = {} + + if self.value is not None: + d["value"] = self.value + + return d + + @staticmethod + def from_dict(d: Dict[str, Any]) -> "GetBooleanOutput": + """Creates a GetBooleanOutput from a dictionary. + + The dictionary is expected to use the modeled shape names rather than the + parameter names as keys to be mostly compatible with boto3. + """ + kwargs: Dict[str, Any] = {} + + if "value" in d: + kwargs["value"] = d["value"] + + return GetBooleanOutput(**kwargs) + + def __repr__(self) -> str: + result = "GetBooleanOutput(" + if self.value is not None: + result += f"value={repr(self.value)}" + + return result + ")" + + def __eq__(self, other: Any) -> bool: + if not isinstance(other, GetBooleanOutput): + return False + attributes: list[str] = ['value',] + return all( + getattr(self, a) == getattr(other, a) + for a in attributes + ) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/serialize.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/serialize.py new file mode 100644 index 0000000000..f3ff8edc0e --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/serialize.py @@ -0,0 +1,11 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +from Dafny.Path.To.Dafny.Code. import SimpleBooleanHardCoded as _SimpleBooleanHardCoded +from smithy_python.interfaces.http import IaAmDafny + +from .config import Config +from .models import GetBooleanInput + + +async def _serialize_get_boolean(input: GetBooleanInput, config: Config) -> IaAmDafny: + return _SimpleBooleanHardCoded.get_boolean() From 3193452065eb40fe37568e2bc45793eedcbe85a7 Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Thu, 25 May 2023 09:54:11 -0700 Subject: [PATCH 010/673] work --- .../__pycache__/__init__.cpython-311.pyc | Bin 17101 -> 17101 bytes .../__pycache__/__init__.cpython-311.pyc | Bin 1892 -> 1892 bytes .../__pycache__/__init__.cpython-311.pyc | Bin 4188 -> 4188 bytes .../__pycache__/Extern.cpython-311.pyc | Bin 1354 -> 1354 bytes .../__pycache__/Shim.cpython-311.pyc | Bin 2384 -> 2384 bytes ...pleBooleanImplTest_Compile.cpython-311.pyc | Bin 7243 -> 7243 bytes .../SimpleBooleanImpl_Compile.cpython-311.pyc | Bin 6306 -> 6306 bytes .../__pycache__/System_.cpython-311.pyc | Bin 1361 -> 1361 bytes ...leTypesBooleanTest_Compile.cpython-311.pyc | Bin 3728 -> 3728 bytes .../Wrappers_Compile.cpython-311.pyc | Bin 14810 -> 14810 bytes .../__pycache__/_dafny.cpython-311.pyc | Bin 34539 -> 34539 bytes .../__pycache__/module_.cpython-311.pyc | Bin 6425 -> 6425 bytes .../__pycache__/__init__.cpython-311.pyc | Bin 250 -> 250 bytes .../__pycache__/client.cpython-311.pyc | Bin 12665 -> 12665 bytes .../__pycache__/config.cpython-311.pyc | Bin 1507 -> 1507 bytes .../__pycache__/deserialize.cpython-311.pyc | Bin 800 -> 800 bytes .../__pycache__/errors.cpython-311.pyc | Bin 1819 -> 1819 bytes .../__pycache__/models.cpython-311.pyc | Bin 5271 -> 5271 bytes .../__pycache__/serialize.cpython-311.pyc | Bin 778 -> 778 bytes .../SimpleBoolean/smithy-build.json | 2 +- .../dafny/python/DafnyProtocolGenerator.java | 16 +++++++---- .../dafny/python/DafnyTestIntegration.java | 27 +++++++++--------- 22 files changed, 24 insertions(+), 21 deletions(-) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/Boolean/Types/__pycache__/__init__.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/Boolean/Types/__pycache__/__init__.cpython-311.pyc index 3ff514c504f107aa854a267af9a8134fb45677f0..4be80fc8bb7c2e8390395bba52b713f42ce6b61b 100644 GIT binary patch delta 29 jcmX@x%6PVwk$X8WFBbz4)FioVTl%sW@6Oc9L~hc3IJU31-SqK diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/Boolean/__pycache__/__init__.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/Boolean/__pycache__/__init__.cpython-311.pyc index 77fdb5f3b4992d0f3b889339c67c56752007df26..547c87cd6f5ef8f1e49a5c1059d6f9ab195aa400 100644 GIT binary patch delta 27 hcmcbka7TfAIWI340}#|CxoqTiU}lWp?87X;3jk%V25$fW delta 27 hcmcbka7TfAIWI340}xaR>Tl$BU}n_a?87X;3jkkD1=Rom diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/Extern.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/Extern.cpython-311.pyc index eff9007c17ee654f9370992cf5667760522bfbfb..3ca61fbb098a31a894903ff8770ffaac4d92f889 100644 GIT binary patch delta 20 acmX@bb&897IWI340}#|CxoqUNX9WN@Gz6gl delta 20 acmX@bb&897IWI340}$j}>2Kt=X9WN>fCN_n diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/Shim.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/Shim.cpython-311.pyc index 95c20d3bad95dfed58e0f74dcca4efdc4e17ef46..b04b386fb557c632515f851566d28a3ca3defe1e 100644 GIT binary patch delta 20 acmca0bU}!FIWI340}#|CxoqTi2KtAjf78 delta 20 acmX?YaoU1=IWI340}$}p>2KtAkO2TVs045T diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/SimpleBooleanImpl_Compile.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/SimpleBooleanImpl_Compile.cpython-311.pyc index 1ad53b6321a0d4a2714ae2889d5dbd5e58a0aec4..2520312d766ff25417251f4cba9a5377683adef4 100644 GIT binary patch delta 20 acmZ2vxX6%uIWI340}#|CxoqT~E&%{Gg9Qoz delta 20 acmZ2vxX6%uIWI340}#v$(BH^CT>=0$oCO5{ diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/System_.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/System_.cpython-311.pyc index 84a7664eef4eb6750ff2ddfbe2272376b0ae1987..a5b4623ea2ce001d28860cc7e68f8f95a6caba6d 100644 GIT binary patch delta 27 hcmcb}b&-pEIWI340}#|CxoqVA%E%bMnUN`g831Iu2Fd^c delta 27 hcmcb}b&-pEIWI340}wcD(cQ@Xm61_*Gb2*~GXP^;2A2Q; diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/WrappedSimpleTypesBooleanTest_Compile.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/WrappedSimpleTypesBooleanTest_Compile.cpython-311.pyc index ff622de26472fe2b733d9759a080aaa932054653..ee85d33bd1492663d46b63f7c0020f6356bfecd4 100644 GIT binary patch delta 20 acmbOrJ3*FvIWI340}#|CxoqTaS)b{Z7ywxc23!CD diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/__init__.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/__init__.cpython-311.pyc index 68483f08852f533975ecd08e27d49e1898820fbe..c793dee34d8621ef24005048ce181925a4100d4f 100644 GIT binary patch delta 19 Zcmeyx_=}NyIWI340}#|CxlH7K4*)lD1$qDg delta 19 Zcmeyx_=}NyIWI340}$wI=uhN+4*)bR1l|Au diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/client.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/client.cpython-311.pyc index fd0a2641e3101106f8484e079e4d34f04981f5f7..da1ea94f00e49bee03066969e033aa651668c48b 100644 GIT binary patch delta 20 acmeyF^fQTjIWI340}#|CxoqUlGXwxi7zPRe delta 20 acmeyF^fQTjIWI340}wa{>2KuDGXwxfvIVLD diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/config.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/config.cpython-311.pyc index df89070b3f2d9e5a84bb2d91e3347d1604e48e32..1d19016719b6c2b1759e2474395c9524583fee4d 100644 GIT binary patch delta 20 acmaFN{g|73IWI340}#|CxoqUV!3qF7Km~39 delta 20 acmaFN{g|73IWI340}w=d=x^k{!3qF5Mg<%I diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/deserialize.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/deserialize.cpython-311.pyc index 80872e493716b303e869f40b5df7dd9a47d1d01b..0529efbf4897d0e7e44192cd83f1e59d7b4c96f7 100644 GIT binary patch delta 20 acmZ3$wt$U$IWI340}!+&xoqSXWd;B*SOg;g delta 20 acmZ3$wt$U$IWI340}$K}*5Al2$_xN7=mb;% diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/errors.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/errors.cpython-311.pyc index 19586494fa802c70f8bad1ca440c9d47ac24570d..8321d042bf2647db2a03532d10cdc31b91c1a6b3 100644 GIT binary patch delta 20 acmbQuH=B=pIWI340}#|CxoqSXUu=;1Uu==l5di=&fCNzh diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/serialize.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/serialize.cpython-311.pyc index 363bf85b4380eba815457e98deebbea854b8ed96..ab57d34f9ff63142d760cce590712c0b500c0e17 100644 GIT binary patch delta 20 acmeBT>tf?x&dbZi00cEjE*rW3GXVfCp#;_d delta 20 acmeBT>tf?x&dbZi00e=7`Ww0bGXVfAr38fl diff --git a/TestModels/SimpleTypes/SimpleBoolean/smithy-build.json b/TestModels/SimpleTypes/SimpleBoolean/smithy-build.json index cf46a33d0c..b37a07f8c0 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/smithy-build.json +++ b/TestModels/SimpleTypes/SimpleBoolean/smithy-build.json @@ -3,7 +3,7 @@ "outputDirectory": "runtimes/python (outputDirectory doesn't work until Smithy/1425 is resolved; see SharedMakefile.mk)", "plugins": { "python-client-codegen": { - "service": "simple.types.boolean#SimpleBoolean", + "service": "simpletypes.boolean#SimpleBoolean", "module": "simple_boolean", "moduleVersion": "0.0.1", "protocol": "aws.polymorph#localService" diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyProtocolGenerator.java b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyProtocolGenerator.java index 131565fcab..4d17d66f43 100644 --- a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyProtocolGenerator.java +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyProtocolGenerator.java @@ -137,10 +137,12 @@ private void generateRequestSerializer( PythonWriter writer ) { writer.addDependency(SmithyPythonDependency.SMITHY_PYTHON); - writer.addImport("Dafny.Path.To.Dafny.Code.", "SimpleBooleanHardCoded", "_SimpleBooleanHardCoded"); + // get this from... topdownindex? + // i have freedom to pass in anything i want to generateRequestSerializer + writer.addImport("Dafny.Simpletypes.Boolean.Types", "GetBooleanInput_GetBooleanInput", "DafnyGetBooleanInput"); writer.write(""" - return _SimpleBooleanHardCoded.get_boolean() + return DafnyGetBooleanInput(value=input.value) """); } @@ -182,12 +184,14 @@ private void generateOperationResponseDeserializer( var deserFunction = getDeserializationFunction(context, operation); delegator.useFileWriter(deserFunction.getDefinitionFile(), deserFunction.getNamespace(), writer -> { writer.pushState(new ResponseDeserializerSection(operation)); + + writer.addImport("Dafny.Simpletypes.Boolean.Types", "GetBooleanOutput_GetBooleanOutput", "DafnyGetBooleanOutput"); + writer.addImport(".config", "Config", "Config"); + writer.addImport(".models", "GetBooleanOutput", "GetBooleanOutput"); - writer.addStdlibImport("typing", "Any"); writer.write(""" - # This is the output of Dafny, - # so it probably needs to call the impl and get the result? - """); + return GetBooleanOutput(value=input.value.value) + """); writer.popState(); }); } diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyTestIntegration.java b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyTestIntegration.java index f9fea47d35..07dda264d7 100644 --- a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyTestIntegration.java +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyTestIntegration.java @@ -41,16 +41,16 @@ public final class DafnyTestIntegration implements .configFields( Collections.singletonList(new ConfigField("impl", Symbol.builder() - .name("config_type") - .namespace("Path.To.Config.Namespace", ".") + .name("SimpleBooleanClient") + .namespace("Dafny.Simpletypes.Boolean", ".") .build(), false, ""))) - .pythonPlugin(SymbolReference.builder() - .symbol(Symbol.builder() - .name("set_config_impl") - .namespace(".", ".") - .build()) - .build()) + // .pythonPlugin(SymbolReference.builder() + // .symbol(Symbol.builder() + // .name("set_config_impl") + // .namespace(".", ".") + // .build()) + // .build()) .build(); @@ -71,20 +71,19 @@ public static ApplicationProtocol createDafnyApplicationProtocol() { return new ApplicationProtocol( "dafny", SymbolReference.builder() - .symbol(createHttpSymbol("IaAmDafny")) + .symbol(createDafnySymbol("DafnyGetBooleanInput")) .build(), SymbolReference.builder() - .symbol(createHttpSymbol("IamaAlsoDafny")) + .symbol(createDafnySymbol("DafnyGetBooleanOutput")) .build() ); } - private static Symbol createHttpSymbol(String symbolName) { - PythonDependency dependency = SmithyPythonDependency.SMITHY_PYTHON; + private static Symbol createDafnySymbol(String symbolName) { return Symbol.builder() - .namespace(dependency.packageName() + ".interfaces.http", ".") + .namespace("Dafny.Simpletypes.Boolean.Types", ".") .name(symbolName) - .addDependency(dependency) +// .addDependency(dependency) .build(); } From 198edb2b71b26d8c5562670646120c2934be0f80 Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Mon, 12 Jun 2023 12:10:35 -0700 Subject: [PATCH 011/673] added target --- .../python/TestsFromDafny-py-goal/Extern.py | 22 + .../ImplementationFromDafny.py | 9 + .../python/TestsFromDafny-py-goal/Shim.py | 31 ++ .../SimpleBooleanImplTest_Compile.py | 73 +++ .../SimpleBooleanImpl_Compile.py | 60 +++ .../python/TestsFromDafny-py-goal/System_.py | 20 + .../TestsFromDafny-py-goal/TestsFromDafny.py | 15 + .../WrappedSimpleTypesBooleanTest_Compile.py | 42 ++ .../Wrappers_Compile.py | 190 +++++++ .../__pycache__/Extern.cpython-311.pyc | Bin 0 -> 1385 bytes .../__pycache__/Shim.cpython-311.pyc | Bin 0 -> 2441 bytes ...pleBooleanImplTest_Compile.cpython-311.pyc | Bin 0 -> 7121 bytes .../SimpleBooleanImpl_Compile.cpython-311.pyc | Bin 0 -> 6236 bytes .../__pycache__/System_.cpython-311.pyc | Bin 0 -> 1361 bytes ...leTypesBooleanTest_Compile.cpython-311.pyc | Bin 0 -> 3569 bytes .../Wrappers_Compile.cpython-311.pyc | Bin 0 -> 14810 bytes .../__pycache__/_dafny.cpython-311.pyc | Bin 0 -> 34539 bytes .../__pycache__/module_.cpython-311.pyc | Bin 0 -> 6344 bytes .../python/TestsFromDafny-py-goal/_dafny.py | 467 ++++++++++++++++++ .../python/TestsFromDafny-py-goal/module_.py | 82 +++ .../types/boolean/internaldafny/__init__.py | 56 +++ .../__pycache__/__init__.cpython-311.pyc | Bin 0 -> 3794 bytes .../__pycache__/types.cpython-311.pyc | Bin 0 -> 17432 bytes .../__pycache__/wrapped.cpython-311.pyc | Bin 0 -> 1829 bytes .../types/boolean/internaldafny/types.py | 145 ++++++ .../types/boolean/internaldafny/wrapped.py | 23 + .../simple_boolean/__init__.py | 1 + .../__pycache__/__init__.cpython-311.pyc | Bin 0 -> 250 bytes .../__pycache__/client.cpython-311.pyc | Bin 0 -> 12683 bytes .../__pycache__/config.cpython-311.pyc | Bin 0 -> 1546 bytes .../__pycache__/deserialize.cpython-311.pyc | Bin 0 -> 809 bytes .../__pycache__/endpoints.cpython-311.pyc | Bin 0 -> 434 bytes .../__pycache__/errors.cpython-311.pyc | Bin 0 -> 1819 bytes .../__pycache__/models.cpython-311.pyc | Bin 0 -> 5271 bytes .../__pycache__/serialize.cpython-311.pyc | Bin 0 -> 787 bytes .../simple_boolean/client.py | 369 ++++++++++++++ .../simple_boolean/config.py | 28 ++ .../simple_boolean/deserialize.py | 11 + .../simple_boolean/endpoints.py | 7 + .../simple_boolean/errors.py | 23 + .../simple_boolean/models.py | 108 ++++ .../simple_boolean/serialize.py | 11 + 42 files changed, 1793 insertions(+) create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/Extern.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/ImplementationFromDafny.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/Shim.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/SimpleBooleanImplTest_Compile.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/SimpleBooleanImpl_Compile.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/System_.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/TestsFromDafny.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/WrappedSimpleTypesBooleanTest_Compile.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/Wrappers_Compile.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/Extern.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/Shim.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/SimpleBooleanImplTest_Compile.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/SimpleBooleanImpl_Compile.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/System_.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/WrappedSimpleTypesBooleanTest_Compile.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/Wrappers_Compile.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/_dafny.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/module_.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/_dafny.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/module_.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/__init__.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/__pycache__/__init__.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/__pycache__/types.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/__pycache__/wrapped.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/types.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/wrapped.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/__init__.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/__pycache__/__init__.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/__pycache__/client.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/__pycache__/config.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/__pycache__/deserialize.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/__pycache__/endpoints.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/__pycache__/errors.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/__pycache__/models.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/__pycache__/serialize.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/client.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/config.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/deserialize.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/endpoints.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/errors.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/models.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/serialize.py diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/Extern.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/Extern.py new file mode 100644 index 0000000000..e929ec644d --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/Extern.py @@ -0,0 +1,22 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny +import System_ +import SimpleBooleanImplTest_Compile +import simple.types.boolean.internaldafny.types +from simple_boolean.client import SimpleBoolean +from Shim import SimpleBooleanShim +import Wrappers_Compile + +@staticmethod +def WrappedSimpleBoolean(config): + wrapped_config = config + impl = SimpleBoolean(wrapped_config) + wrapped_client = SimpleBooleanShim(impl) + return Wrappers_Compile.Result_Success(wrapped_client) + +simple.types.boolean.internaldafny.wrapped.default__.WrappedSimpleBoolean = WrappedSimpleBoolean \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/ImplementationFromDafny.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/ImplementationFromDafny.py new file mode 100644 index 0000000000..992697c0c2 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/ImplementationFromDafny.py @@ -0,0 +1,9 @@ +# Dafny program the_program compiled into Python +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/Shim.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/Shim.py new file mode 100644 index 0000000000..8a16d5366c --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/Shim.py @@ -0,0 +1,31 @@ +# TODO generate this + +import simple.types.boolean.internaldafny.types +import simple_boolean.client as SimpleBoolean +import Wrappers_Compile +import asyncio +from simple_boolean.models import GetBooleanInput + +class SimpleBooleanShim(simple.types.boolean.internaldafny.types.ISimpleBooleanClient): + def __init__(self, _impl: SimpleBoolean) : + self._impl = _impl + + def GetBoolean(self, input: simple.types.boolean.internaldafny.types.GetBooleanInput_GetBooleanInput) -> simple.types.boolean.internaldafny.types.GetBooleanOutput_GetBooleanOutput: + ''' + unwrapped_request = TypeConversion.ToNative(input) + try: + wrapped_response = self._impl.get_boolean(unwrapped_request) + return Wrappers_Compile.Result_Success(wrapped_response) + catch ex: + return Wrappers_Compile.Result_Failure(ex) + ''' + + print(f"this is input.value {input.value}") + unwrapped_request: GetBooleanInput = GetBooleanInput(value=input.value) + print(f"this is unwrapped_request {unwrapped_request}") + wrapped_response = asyncio.run(self._impl.get_boolean(unwrapped_request)) + print(f"this is wrapped_response {wrapped_response}") + return Wrappers_Compile.Result_Success(wrapped_response) + + + \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/SimpleBooleanImplTest_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/SimpleBooleanImplTest_Compile.py new file mode 100644 index 0000000000..cca9eb456f --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/SimpleBooleanImplTest_Compile.py @@ -0,0 +1,73 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import simple.types.boolean.internaldafny + +import module_ +import _dafny +import System_ +import Wrappers_Compile + +assert "SimpleBooleanImplTest_Compile" == __name__ +SimpleBooleanImplTest_Compile = sys.modules[__name__] + +class default__: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "SimpleBooleanImplTest_Compile._default" + @staticmethod + def GetBooleanTrue(): + d_0_client_: simple.types.boolean.internaldafny.SimpleBooleanClient + d_1_valueOrError0_: Wrappers_Compile.Result = None + out0_: Wrappers_Compile.Result + out0_ = simple.types.boolean.internaldafny.default__.SimpleBoolean(simple.types.boolean.internaldafny.default__.DefaultSimpleBooleanConfig()) + d_1_valueOrError0_ = out0_ + if not(not((d_1_valueOrError0_).IsFailure())): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(10,19): " + _dafny.string_of(d_1_valueOrError0_)) + d_0_client_ = (d_1_valueOrError0_).Extract() + SimpleBooleanImplTest_Compile.default__.TestGetBooleanTrue(d_0_client_) + + @staticmethod + def GetBooleanFalse(): + d_2_client_: simple.types.boolean.internaldafny.SimpleBooleanClient + d_3_valueOrError0_: Wrappers_Compile.Result = None + out1_: Wrappers_Compile.Result + out1_ = simple.types.boolean.internaldafny.default__.SimpleBoolean(simple.types.boolean.internaldafny.default__.DefaultSimpleBooleanConfig()) + d_3_valueOrError0_ = out1_ + if not(not((d_3_valueOrError0_).IsFailure())): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(14,19): " + _dafny.string_of(d_3_valueOrError0_)) + d_2_client_ = (d_3_valueOrError0_).Extract() + SimpleBooleanImplTest_Compile.default__.TestGetBooleanFalse(d_2_client_) + + @staticmethod + def TestGetBooleanTrue(client): + d_4_ret_: simple.types.boolean.internaldafny.types.GetBooleanOutput + d_5_valueOrError0_: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(simple.types.boolean.internaldafny.types.GetBooleanOutput.default())() + out2_: Wrappers_Compile.Result + out2_ = (client).GetBoolean(simple.types.boolean.internaldafny.types.GetBooleanInput_GetBooleanInput(Wrappers_Compile.Option_Some(True))) + d_5_valueOrError0_ = out2_ + if not(not((d_5_valueOrError0_).IsFailure())): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(23,16): " + _dafny.string_of(d_5_valueOrError0_)) + d_4_ret_ = (d_5_valueOrError0_).Extract() + if not((((d_4_ret_).value).UnwrapOr(False)) == (True)): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(24,8): " + _dafny.string_of(_dafny.Seq("expectation violation"))) + _dafny.print(_dafny.string_of(d_4_ret_)) + + @staticmethod + def TestGetBooleanFalse(client): + d_6_ret_: simple.types.boolean.internaldafny.types.GetBooleanOutput + d_7_valueOrError0_: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(simple.types.boolean.internaldafny.types.GetBooleanOutput.default())() + out3_: Wrappers_Compile.Result + out3_ = (client).GetBoolean(simple.types.boolean.internaldafny.types.GetBooleanInput_GetBooleanInput(Wrappers_Compile.Option_Some(False))) + d_7_valueOrError0_ = out3_ + if not(not((d_7_valueOrError0_).IsFailure())): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(33,16): " + _dafny.string_of(d_7_valueOrError0_)) + d_6_ret_ = (d_7_valueOrError0_).Extract() + if not((((d_6_ret_).value).UnwrapOr(True)) == (False)): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(34,8): " + _dafny.string_of(_dafny.Seq("expectation violation"))) + _dafny.print(_dafny.string_of(d_6_ret_)) + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/SimpleBooleanImpl_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/SimpleBooleanImpl_Compile.py new file mode 100644 index 0000000000..fe636ca528 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/SimpleBooleanImpl_Compile.py @@ -0,0 +1,60 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny +import System_ +import simple.types.boolean.internaldafny.types + +import Wrappers_Compile + +assert "SimpleBooleanImpl_Compile" == __name__ +SimpleBooleanImpl_Compile = sys.modules[__name__] + +class Config: + @_dafny.classproperty + def AllSingletonConstructors(cls): + return [Config_Config()] + @classmethod + def default(cls, ): + return lambda: Config_Config() + def __ne__(self, __o: object) -> bool: + return not self.__eq__(__o) + @property + def is_Config(self) -> bool: + return isinstance(self, SimpleBooleanImpl_Compile.Config_Config) + +class Config_Config(Config, NamedTuple('Config', [])): + def __dafnystr__(self) -> str: + return f'SimpleBooleanImpl_Compile.Config.Config' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, SimpleBooleanImpl_Compile.Config_Config) + def __hash__(self) -> int: + return super().__hash__() + + +class default__: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "SimpleBooleanImpl_Compile._default" + @staticmethod + def GetBoolean(config, input): + output: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(simple.types.boolean.internaldafny.types.GetBooleanOutput.default())() + if not(((input).value).is_Some): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(17,4): " + _dafny.string_of(_dafny.Seq("expectation violation"))) + if not(((((input).value).value) == (True)) or ((((input).value).value) == (False))): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(19,4): " + _dafny.string_of(_dafny.Seq("expectation violation"))) + d_0_res_: simple.types.boolean.internaldafny.types.GetBooleanOutput + d_0_res_ = simple.types.boolean.internaldafny.types.GetBooleanOutput_GetBooleanOutput((input).value) + if not(((((d_0_res_).value).value) == (True)) or ((((d_0_res_).value).value) == (False))): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(22,4): " + _dafny.string_of(_dafny.Seq("expectation violation"))) + if not((((input).value).value) == (((d_0_res_).value).value)): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(24,4): " + _dafny.string_of(_dafny.Seq("expectation violation"))) + output = Wrappers_Compile.Result_Success(d_0_res_) + return output + return output + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/System_.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/System_.py new file mode 100644 index 0000000000..32e6d896ff --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/System_.py @@ -0,0 +1,20 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny + +assert "System_" == __name__ +System_ = sys.modules[__name__] + +class nat: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return int(0) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/TestsFromDafny.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/TestsFromDafny.py new file mode 100644 index 0000000000..7fef7fc1c6 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/TestsFromDafny.py @@ -0,0 +1,15 @@ +# Dafny program the_program compiled into Python +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny + +try: + dafnyArgs = [_dafny.Seq(a) for a in sys.argv] + module_.default__.Test____Main____(dafnyArgs) +except _dafny.HaltException as e: + _dafny.print("[Program halted] " + e.message + "\n") + sys.exit(1) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/WrappedSimpleTypesBooleanTest_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/WrappedSimpleTypesBooleanTest_Compile.py new file mode 100644 index 0000000000..5dc51aea2d --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/WrappedSimpleTypesBooleanTest_Compile.py @@ -0,0 +1,42 @@ +import sys +from math import floor + +import module_ +import _dafny +import System_ +import SimpleBooleanImplTest_Compile +import simple.types.boolean.internaldafny.wrapped + +assert "WrappedSimpleTypesBooleanTest_Compile" == __name__ +WrappedSimpleTypesBooleanTest_Compile = sys.modules[__name__] + +class default__: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "WrappedSimpleTypesBooleanTest_Compile._default" + @staticmethod + def GetBooleanTrue(): + d_8_client_: simple.types.boolean.internaldafny.types.ISimpleBooleanClient + d_9_valueOrError0_: Wrappers_Compile.Result = None + out4_: Wrappers_Compile.Result + out4_ = simple.types.boolean.internaldafny.wrapped.default__.WrappedSimpleBoolean(simple.types.boolean.internaldafny.wrapped.default__.WrappedDefaultSimpleBooleanConfig()) + d_9_valueOrError0_ = out4_ + if not(not((d_9_valueOrError0_).IsFailure())): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/WrappedSimpleBooleanTest.dfy(11,19): " + _dafny.string_of(d_9_valueOrError0_)) + d_8_client_ = (d_9_valueOrError0_).Extract() + SimpleBooleanImplTest_Compile.default__.TestGetBooleanTrue(d_8_client_) + + @staticmethod + def GetBooleanFalse(): + d_10_client_: simple.types.boolean.internaldafny.types.ISimpleBooleanClient + d_11_valueOrError0_: Wrappers_Compile.Result = None + out5_: Wrappers_Compile.Result + out5_ = simple.types.boolean.internaldafny.wrapped.default__.WrappedSimpleBoolean(simple.types.boolean.internaldafny.wrapped.default__.WrappedDefaultSimpleBooleanConfig()) + d_11_valueOrError0_ = out5_ + if not(not((d_11_valueOrError0_).IsFailure())): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/WrappedSimpleBooleanTest.dfy(15,19): " + _dafny.string_of(d_11_valueOrError0_)) + d_10_client_ = (d_11_valueOrError0_).Extract() + SimpleBooleanImplTest_Compile.default__.TestGetBooleanFalse(d_10_client_) + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/Wrappers_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/Wrappers_Compile.py new file mode 100644 index 0000000000..ddde85ac6b --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/Wrappers_Compile.py @@ -0,0 +1,190 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny +import System_ + +assert "Wrappers_Compile" == __name__ +Wrappers_Compile = sys.modules[__name__] + +class Option: + @classmethod + def default(cls, ): + return lambda: Option_None() + def __ne__(self, __o: object) -> bool: + return not self.__eq__(__o) + @property + def is_None(self) -> bool: + return isinstance(self, Wrappers_Compile.Option_None) + @property + def is_Some(self) -> bool: + return isinstance(self, Wrappers_Compile.Option_Some) + def ToResult(self): + source0_ = self + if source0_.is_None: + return Wrappers_Compile.Result_Failure(_dafny.Seq("Option is None")) + elif True: + d_0___mcc_h0_ = source0_.value + d_1_v_ = d_0___mcc_h0_ + return Wrappers_Compile.Result_Success(d_1_v_) + + def UnwrapOr(self, default): + source1_ = self + if source1_.is_None: + return default + elif True: + d_2___mcc_h0_ = source1_.value + d_3_v_ = d_2___mcc_h0_ + return d_3_v_ + + def IsFailure(self): + return (self).is_None + + def PropagateFailure(self): + return Wrappers_Compile.Option_None() + + def Extract(self): + return (self).value + + +class Option_None(Option, NamedTuple('None_', [])): + def __dafnystr__(self) -> str: + return f'Wrappers_Compile.Option.None' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, Wrappers_Compile.Option_None) + def __hash__(self) -> int: + return super().__hash__() + +class Option_Some(Option, NamedTuple('Some', [('value', Any)])): + def __dafnystr__(self) -> str: + return f'Wrappers_Compile.Option.Some({_dafny.string_of(self.value)})' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, Wrappers_Compile.Option_Some) and self.value == __o.value + def __hash__(self) -> int: + return super().__hash__() + + +class Result: + @classmethod + def default(cls, default_T): + return lambda: Result_Success(default_T()) + def __ne__(self, __o: object) -> bool: + return not self.__eq__(__o) + @property + def is_Success(self) -> bool: + return isinstance(self, Wrappers_Compile.Result_Success) + @property + def is_Failure(self) -> bool: + return isinstance(self, Wrappers_Compile.Result_Failure) + def ToOption(self): + source2_ = self + if source2_.is_Success: + d_4___mcc_h0_ = source2_.value + d_5_s_ = d_4___mcc_h0_ + return Wrappers_Compile.Option_Some(d_5_s_) + elif True: + d_6___mcc_h1_ = source2_.error + d_7_e_ = d_6___mcc_h1_ + return Wrappers_Compile.Option_None() + + def UnwrapOr(self, default): + source3_ = self + if source3_.is_Success: + d_8___mcc_h0_ = source3_.value + d_9_s_ = d_8___mcc_h0_ + return d_9_s_ + elif True: + d_10___mcc_h1_ = source3_.error + d_11_e_ = d_10___mcc_h1_ + return default + + def IsFailure(self): + return (self).is_Failure + + def PropagateFailure(self): + return Wrappers_Compile.Result_Failure((self).error) + + def MapFailure(self, reWrap): + source4_ = self + if source4_.is_Success: + d_12___mcc_h0_ = source4_.value + d_13_s_ = d_12___mcc_h0_ + return Wrappers_Compile.Result_Success(d_13_s_) + elif True: + d_14___mcc_h1_ = source4_.error + d_15_e_ = d_14___mcc_h1_ + return Wrappers_Compile.Result_Failure(reWrap(d_15_e_)) + + def Extract(self): + return (self).value + + +class Result_Success(Result, NamedTuple('Success', [('value', Any)])): + def __dafnystr__(self) -> str: + return f'Wrappers_Compile.Result.Success({_dafny.string_of(self.value)})' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, Wrappers_Compile.Result_Success) and self.value == __o.value + def __hash__(self) -> int: + return super().__hash__() + +class Result_Failure(Result, NamedTuple('Failure', [('error', Any)])): + def __dafnystr__(self) -> str: + return f'Wrappers_Compile.Result.Failure({_dafny.string_of(self.error)})' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, Wrappers_Compile.Result_Failure) and self.error == __o.error + def __hash__(self) -> int: + return super().__hash__() + + +class Outcome: + @classmethod + def default(cls, ): + return lambda: Outcome_Pass() + def __ne__(self, __o: object) -> bool: + return not self.__eq__(__o) + @property + def is_Pass(self) -> bool: + return isinstance(self, Wrappers_Compile.Outcome_Pass) + @property + def is_Fail(self) -> bool: + return isinstance(self, Wrappers_Compile.Outcome_Fail) + def IsFailure(self): + return (self).is_Fail + + def PropagateFailure(self): + return Wrappers_Compile.Result_Failure((self).error) + + +class Outcome_Pass(Outcome, NamedTuple('Pass', [])): + def __dafnystr__(self) -> str: + return f'Wrappers_Compile.Outcome.Pass' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, Wrappers_Compile.Outcome_Pass) + def __hash__(self) -> int: + return super().__hash__() + +class Outcome_Fail(Outcome, NamedTuple('Fail', [('error', Any)])): + def __dafnystr__(self) -> str: + return f'Wrappers_Compile.Outcome.Fail({_dafny.string_of(self.error)})' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, Wrappers_Compile.Outcome_Fail) and self.error == __o.error + def __hash__(self) -> int: + return super().__hash__() + + +class default__: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "Wrappers_Compile._default" + @staticmethod + def Need(condition, error): + if condition: + return Wrappers_Compile.Outcome_Pass() + elif True: + return Wrappers_Compile.Outcome_Fail(error) + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/Extern.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/Extern.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ef9c989cb8ee31b5ec4cdada168f20d182196d0b GIT binary patch literal 1385 zcmah{PjB2r6d$j>>;0dm*-Z;62vrCrRf#18mw+lk15yvofelph#d7UQ<8;QhW@c3^ zZKXX#;vZySGWgN)|Yec0;oVW#Y>xnnx^^)bn`1!rxd-LARdvD$^gFzR;`Z@YB zeAz(g52e%#biFQr2k`=hC^QIim241$Hrxg^U6Wd_MVoHZP)BaPb2RoK*-}ede9}_IiFXK$whgpih_nGV- z_!NhS)0E&HLpF~{k}w5=WEu+qgGoeT@2eys*pI=mzG9dhM>H_%J3*R@|MCRD3p7K| z4RK|EX1oIJ_0saZAymX-%^LsNHAS=DL+E7bIWt%Npi%>hWF2s3>fPnFN6b%C%(!Oe=3sHd6uxJDe(jBqzTDr!qQ{s5OeV`2{GYL)i>4m8ZVmaFlco|!JKB| z7!FiH{2P|geg7!VK29^|>mLMW@ot*QQB_#D@(OGNl3RnHe*$cd&c|ExgEzgKKfQm} z+b(+B^ZhsDk6wzi@!ev4SM6*Sy*t0&JL~Ngy}jJpyM!pTb4!{$V@v)orG# zX6g-C3z)R1FOHe5U?+l<1dIh|ZKc~Z38w^mvgL&;ZD~(3E->}vdn>sG?aV5RlH_$JnUtd~kBJ~WgzDldlg)gFjV(4tB z`y`wCCTTCic0zpQtC8`3Lu>?xvFpIzw!f$GzprmMIzmgsiAN+r6H*K}?S tE*h5c`2_;@mx&s~(_59Hj~*JnF>jsr3p6Uw?E>8?(5D4@kZaOC`3E;5fr|hD literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/Shim.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/Shim.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..576f4e081ae4f9b91aca72766d26aab154301bc2 GIT binary patch literal 2441 zcma(SO>Y}Tbaw4^HXpVdk%}}abSa0}fNdafN%PgDYUzO_B?(C8uv)wmyzYK=b~lYJ zSIQw$D}=akNF<7sLsW#ykKn)$SfiDQM#_m3H=~qGPt44E*Rc~m#^d+qy?OKAoA=(l z{UMzm0%UxpJyu5r0Dh-LGziVc=^jD*Km{tNgEGf3ZzRe|F60Sif$>u16v4bcV2EXr z13b6`)WjZ8laQ+oc65Onvq!1gaLnuOjzqj?2>_mxe>lo%m0JgS;SWl#JQQCAMa!R^aF)FHMmTp1kzH8Z~hZeeT>q-TdY)h{j z7P70Q4d}QZTPoC@Qs~@9-G@;;JFV9Mv3Xf?90l zFs`A-0Ai2Kh)k< zG~Gim2Y0%P8e?u%b0j)x1s1mz-GdV8Hv(HVCZg?gH1UrTickY^0ekqFF<< zeDQ$d)Xj=!;RJbC?B(L&GaCB~0lVO@F)*0%Gw&a69(_&_nJsZT5T|`{`lK-X^M}9O@C&Q0!fH@h z^~EbEV%pEl`)|)un3->h3xT-ciwh@{*Pq@vbdMUpP0jr}HRsQ-wx-sCskPSRy@*}k6n2G^q84t;_ zVX2-@*CVq0z*F?jPP*roh&CXca#%CQf=fFd9_UmoPLpgwWGcE!n;X8?4F~(&$bB?^ zqsv(JTv9q`BtixnC-!~>%wt3|fM}awfKtw50(RqHo9Bed1EUQH>IbQ;aFaVs9gPIi z2Z6K{NFN1KwGAlOH=MwzzW~7GmUxENLiA~fcKA^4-(lz@buXX6xiCUS7NBA$KEkKC{DU;}{BPMWa+Cl7 literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/SimpleBooleanImplTest_Compile.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/SimpleBooleanImplTest_Compile.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1eef12f285717dcc236f0dfdb528ddbda65f98f4 GIT binary patch literal 7121 zcmeHM-ES1v6~8mHAG5aCUVFh1CnOFSkaW~AU3SK>%k0kP z&Merjty&RMdB|H^(MLa|6pB>!v5)x!+G@R;$lEI+p;me5n<xD1CBk{ZXj9sG{SKvr$5AE9<4&cM$6ZR77SvX*`#wN0nx!Y!gmny3dBL`}LCP=b0$3)~`iq0|Gf zE>XfD4epT2Ace_oD;oi6c!#u2lVQRU7SZ&Dbjh$)H6zs9Cj@y3{+@(@;0{7zVfsF~ zFR*~68w(Z|=zsc)Da~32Np~r56fI-zhHD>ONzQhl)!~R@H1F z3o}~osZVamli|Uz!a&wYRqnVQcmgb8A*$OYTKL)}zyl&qFCY5aJswhPUD7D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vO6-c;d?8+{-GMpT8LAV$Op(3>h;ar3TV>SzWNK#|uuuZsW` zA9e59j2)=N4*X`~)AP>2F=t@H892W=U{nT-&-1HLryxusLYxw3ux>$^#mX2#>fi-T z00qALJ>-Et7Zi#JH(7}%H{vNLp1Lhpd-|O2H#cK%Rbp@5JH3HOdgPCRO4mE(u6G*9 zH;u?w6LUCHxBxL#5`T)RlK3;6G;`!Ui(VC5%fBrUd z)U}ZmuX>sUk_gb_5TQXi+RC7ea)UC~%AgEFz2$w+GAR5pasrCHm==ZGkb=OC2u5(b z9^_U8DDd5L+@j3A02bxcMl9vTQhzADU>0RM(T;xR0{k~XRau*==1r|+AP+9yk4kC7 z&7s|Ryd?00(cQ>(ScuFrc^!P)8a)IedKd}96N*R5bsHm)=I$-`(Ty)}#PingfvnYk zTcQw*f{)1~At89|*BKNX+eRJ*ySKzha8}qNNFPfi)N|{{HBm1lkiEcjFErdQBAc@ro_8uq>~@%`cxtVi&B#lEp&cg#@P{#b+u-kVf%|Nkc$bAfL9cQG8Ug zNEUpPHh3y6iqAr}-*sXRaUbST&4oGS_h6#ef`w~4!F>}fJO{pZJ+IPX$fM&;1uX8U za2J^S>g$XCR6gOh@qIcA74Qvh{T0ZTBnU#4w5{=9mAqa4rmsqR%l@xQUM>5-M(+@-1w-q=hz~b*Dk5Tqz JiwwR={{iyJ8vXzP literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/SimpleBooleanImpl_Compile.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/SimpleBooleanImpl_Compile.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cc54aed71e039a9a2dd6666b0d8fa3f9a4ef8fd7 GIT binary patch literal 6236 zcmc&&-ES1v6~8mHU;bFn+6xBrQLk+<7>EstDZ!=)f{P7FT;Vlen}pG_GsbIXca}S| zfVW1mQcE~er8bo#{Llw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&rGjphD z3hc(j2xV}g&5Qp#3)s83c^2@}#m#dGTeD^_pf_vwWw>+l!LQ-V7wuVedJkVaIsC2j$}GI{ SB8J8LCwWZRU;lE^l=E-u`bAa% literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/WrappedSimpleTypesBooleanTest_Compile.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/WrappedSimpleTypesBooleanTest_Compile.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..505a9798a7decc63d35c973ab6c00244d6cc5806 GIT binary patch literal 3569 zcmeHJTW=dh6rNq*){Wh`ad6TrfnJDPu5asp7lgVXEsJ;DI9>0$vuj$1 zL_}2t`2m%R#7m!ws)E!9en5YMV=am`Ql(0W2i{Urgw!YI%zEQ22~Y`m>+I~AnRDiL z&Ybhjd>fB%KrBVBex;q45c&xkUJAA<%U`m}9i$;m(2)$Ks0(FL76q3VkON#6l!Lqs z$st~bkzgOTcK7uL~R;-3$d!a)*e{AT2nDw9q}){{bHZA~~iB zmry$V3pDa+frg5@X%f2oL!wqHSi4jzS9E;2R>9UO)6}tQT*j8I44LIhNyh~k4auS=%ps+8kNB0F9w6I>ZphMsDZ?Yd)m{?i8S|}GZ)5s2E>zZv= zvNud}t)i<1oUNF8t!$FYL>BZLGc~MR*;UH7>Ma{&N!74RWo%_DHG6_h2!pKC#4Hc1 zMWgmsrIvjm`(-LMDk)0IC^5~Zx>l6Tc)X2l|5k*NS=5wb^TB0SMKnyXT_wifngUK$ z%ui)rY#&N%X~LWpktids=|~5x7gH1s^s;QiwwYSJ%{G4%41(cotDPt6ohL|~HGCcd zr^Juz2X-!STrtn)EN{1aq%Res8_UcKTpt zw==@DFoUMiUC@3_@{c5GJK65ij#f?Z@xkmoO(XwWQ;h59+!ENzu~v6q;a_=1w70ay zt8559wkA!B{#5{zT#x$vKMy9G1&=>oRzXchE7t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j4_5Ppqh9CAy zm9HOez7lVLje~6FXHeC7il0FR0s-=-+NpRKJ7nuZ9k2qB>mGK#*29k1dJw}3zMO-P zH0eGRhv%vgzl33)^P%`luGrkLm$+f@$Q(C4mvwy|3MWiuLTsBd{Tiy(C;*Jh2R;py zyZZ3_x777Ux$6y08sOj1fK$n^r)8DwG<4|LL|3F_f6O^JoJB_O6TskKiIAf4wVPb%^y9dh0akH*tX*rsHJ=wOiTX(=J2#=fbt2! z9h`NQhyLh-bH6_!WJ0T;OT|k*abu&J;A+L0+Y)_S?;z*jmJ^HU$P9r*WNZIK>vYR0INBC3mEtF~V zgRh0vzLjSH0mTFN8}N9t&SH`>NkJy0AU zg}0yxE+z3H@FPGkO!wtd#mfW*QV)+5;muZf)m0@Z7J87sD9c`@3J#5{MI|RwMi_M} z3%oEIWp7}jrKFi|c68r?kJNcKmyq(n!5sJx7B*H7`8Q~R>Zbk*1ZB}HisFJ$Gfh7W z!d~rZ-vwchDf+}h`C-c&1se!0OTEPGs~f@<9V1D@qwPXGV_ literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/_dafny.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/_dafny.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d62888bf59a9143dd9103f90bf95b8a627a43dfa GIT binary patch literal 34539 zcmd6Q3v?UTdFBjW1PG8r5~N7#MNp(H(UM3>d`OmL$&^UyO+O^NHvOO>0+c9$1T_Qd zflvvPDhcQ^HRP4oup`xUYNu2zZ<(&$D5=xqlkM3yr%e}7u@x6vo%Lx?&Z*DYJxj0L zJzjP9bie=JnZe9}l#6A)K_K0oR-e(ud&k=D9JNul>?TomFi~5R~+ZAySd-^=g zT@)!E_V#(1+a2)@m-Lk|w@E7lpo>P$^(-ND40*0X$ukg$3oU3q$ylvNwq$7KYC|FXdPg4Xgy#{XanFz74O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y+I~Y2yZnv4c^j1DBIh j>Y&suLVzv=ACuoF`G887xF7j03_oW6pDYr}W|036-zOv7 literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/module_.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/module_.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b84210ebd1348094311c679bd67fb63c4e57e36c GIT binary patch literal 6344 zcmd@YOKcm*b#|AZB_)b0MO2i;M5)MPEjK1ByH1U?utdfB)|O>Rb>X!PcEue^l$Ts) zb{Uz1)e3=t=8%IA3DQe}9ugOclUoY}MNR?Q0R5o5!U7={5MZFE+-TTA1E2b4`P14e z)f7Is%IxsXyf>fs=FQ{Gy!X3MD2O2abM;s9M$mKnvC+`)#45f35FYg!qPTiyM`G6R3>WmT;gUrI&-e53Vd!{ZC!adJ5sz?m7XbQ=`Z6y0|L;pL@7}_lM%FF^9 z=D(!K+_1;yUzHR^T2`>lr3z)+zgRBf%M!7Jb5b75i>0E1hZ)yRNInxxnm;FH3*{5Va2$7;1KBrvn#)KuXmqPIKY%S%;XB{- z+=nW%eFW-W zARYh+6CNBm&RMx;B63zy= zv+b#N2yHXqw!d~*TiZMg=cex|w@qLB-ErO1|J!@1t@XRPA9SbRWV9c-Bx=5<OD9&DV`>z(MJzyaApIytzB)7B}KG*P!kW%z&FfJ%Gd%*6XB2Qo^sqHvIFcg@uW8 z!3};gHFF*+frm_Ra^t%P4WE=0jgC+Jj7Y^ImiKrf4F>!2Oa8b08w_55;;xYng4I2z zN7W-|%g0W=^!;I2*dWzcEGy-d62V$b&16c1VEL7phH*?F}M>+OTTU|Do4Eycwf|?>L+Pp--JJvDyS9VBFkDN?vrA!89PumQ(yMb~ly$ZZ9 z)EK56(hnXdoqnA3vWw)ni?Ld&Id=lpW*X83DOaH7#`7%)@6on?(2DjY1TD5u)rX#o zz8Tu(yWZ-2=du+UdO!Q#nlW<4jEh!WG$U87$W@bHviK!~U#hYlfq0eWLO)@4g%g(W z!!Lx%9bwWGrY&LG5T>gv(+y3%&%b^C{XT18q)kwX4ZIgHI-^zA6N>K&eQ$UE=CTz%@p1N}wNG9!6BAZq!i-K@ zQQ$gd2~&nJ)#_v5E7L#l>AC@8<`LV>VLGol&4YQ?XbktHj#Wb)T6{+hvG+eb4~JHnJH%vi#VAO#nz^_mTr`DCmT<`sE*(D2RJ)K6ts*9{%I)^_TRrf%N5_87egy$0Hpf1o zg+?)*-JqBb{yg;fC5yRx6w7iBF-x%wyFxKq0CvoQ&#Y1sKo}GP$WcZ$cG?OYd7q~G z$0O*oNO+=)`|Rj=Y$Cw@Dc}X<&%spx)FAqNFg$yN`~2j1Z1!31FVA`b`D=fw|NIF0 z+erB0aqjPEJa%!2`^S(M5F?)Izch->(eUCKZl`NJws?xOPI&>D8|G=iuK-s8+ylXM zJvs+85uR2lp9?&|0UaOL{H?_s6O#lVKp$!gw_P=A7})W##}%(v|>h zH9s&GZwS`f06xb1;;%E5@ZuxjuD83&p7B!6P str: + if hasattr(value, '__dafnystr__'): + return value.__dafnystr__() + elif value is None: + return "null" + elif isinstance(value, bool): + return "true" if value else "false" + elif isinstance(value, str): + # This is only for Dafny char values. + # Dafny strings are represented as Seq's of individual char values, + # and Seq defines __dafnystr__. + return string_from_utf_16(value) + elif isinstance(value, tuple): + return '(' + ', '.join(map(string_of, value)) + ')' + elif isinstance(value, FunctionType): + return "Function" + else: + return str(value) + +@dataclass +class Break(Exception): + target: str + +@dataclass +class Continue(Exception): + target: str + +class TailCall(Exception): + pass + +@contextmanager +def label(name: str = None): + try: + yield + except Break as g: + if g.target != name: + raise g + except TailCall as g: + if name is not None: + raise g + +@contextmanager +def c_label(name: str = None): + try: + yield + except Continue as g: + if g.target != name: + raise g + +class CodePoint(str): + + escapes = { + '\n' : "\\n", + '\r' : "\\r", + '\t' : "\\t", + '\0' : "\\0", + '\'' : "\\'", + '\"' : "\\\"", + '\\' : "\\\\", + } + + def __escaped__(self): + return self.escapes.get(self, self) + + def __dafnystr__(self): + return f"'{self.__escaped__()}'" + +class Seq(tuple): + def __init__(self, __iterable = None, isStr = False): + ''' + isStr defines whether this value should be tracked at runtime as a string (a.k.a. seq) + It accepts three different values: + - True: this value is definitely a string, mark it as such + - False: this value might be a string, apply heuristics to make a best guess + - None: don't apply heuristics, don't mark it as a string + + None is used when --unicode-char is true, to ensure consistent printing of strings + across backends without depending on any runtime tracking. + See docs/Compilation/StringsAndChars.md. + ''' + + if __iterable is None: + __iterable = [] + if isStr is None: + self.isStr = False + else: + self.isStr = isStr \ + or isinstance(__iterable, str) \ + or (isinstance(__iterable, Seq) and __iterable.isStr) \ + or (not isinstance(__iterable, GeneratorType) + and all(isinstance(e, str) and len(e) == 1 for e in __iterable) + and len(__iterable) > 0) + + @property + def Elements(self): + return self + + @property + def UniqueElements(self): + return frozenset(self) + + def VerbatimString(self, asliteral): + if asliteral: + return f"\"{''.join(map(lambda c: c.__escaped__(), self))}\"" + else: + return ''.join(self) + + def __dafnystr__(self) -> str: + if self.isStr: + # This should never be true when using --unicode-char, + # so it is safe to assume we are a sequence of UTF-16 code units. + return string_from_utf_16(self) + return '[' + ', '.join(map(string_of, self)) + ']' + + def __add__(self, other): + return Seq(super().__add__(other), isStr=self.isStr and other.isStr) + + def __getitem__(self, key): + if isinstance(key, slice): + indices = range(*key.indices(len(self))) + return Seq((self[i] for i in indices), isStr=self.isStr) + return super().__getitem__(key) + + def set(self, key, value): + l = list(self) + l[key] = value + return Seq(l, isStr=self.isStr) + + def __hash__(self) -> int: + return hash(tuple(self)) + + def __lt__(self, other): + return len(self) < len(other) and self == other[:len(self)] + + def __le__(self, other): + return len(self) <= len(other) and self == other[:len(self)] + +class Array: + class Box(list): + def __dafnystr__(self) -> str: + return '[' + ', '.join(map(string_of, self)) + ']' + + def __init__(self, initValue, *dims): + self.arr = initValue + self.dims = list(dims) + for i in reversed(self.dims): + self.arr = Array.Box([copy.copy(self.arr) for _ in range(i)]) + + def __dafnystr__(self) -> str: + return '[' + ', '.join(map(string_of, self.arr)) + ']' + + def __str__(self): + return self.__dafnystr__() + + def length(self, i): + return self.dims[i] if i < len(self.dims) else None + + def __len__(self): + return self.length(0) + + def __getitem__(self, key): + if not isinstance(key, Iterable): + return self.arr[key] + arr = self.arr + for i in key: + arr = arr[i] + return arr + + def __setitem__(self, key, value): + if not isinstance(key, Iterable): + self.arr[key] = value + return + arr = self.arr + for i in range(len(key)-1): + arr = arr[key[i]] + arr[key[-1]] = value + +class Set(frozenset): + @property + def Elements(self): + return self + + @property + def AllSubsets(self): + # https://docs.python.org/3/library/itertools.html#itertools-recipes + s = list(self) + return map(Set, chain.from_iterable(combinations(s, r) for r in range(len(s)+1))) + + def __dafnystr__(self) -> str: + return '{' + ', '.join(map(string_of, self)) + '}' + + def union(self, other): + return Set(super().union(self, other)) + + def intersection(self, other): + return Set(super().intersection(other)) + + def ispropersubset(self, other): + return self.issubset(other) and self != other + + def __or__(self, other): + return self.union(other) + + def __sub__(self, other): + return Set(super().__sub__(other)) + +class MultiSet(Counter): + def __dafnystr__(self) -> str: + return 'multiset{' + ', '.join(map(string_of, self.elements())) + '}' + + def __len__(self): + return reduce(lambda acc, key: acc + self[key], self, 0) + + def union(self, other): + return MultiSet(self + other) + + def __or__(self, other): + return self.union(other) + + def intersection(self, other): + return MultiSet(self & other) + + def __sub__(self, other): + return MultiSet(super().__sub__(other)) + + @property + def keys(self): + return Set(key for key in self if self[key] > 0) + + @property + def Elements(self): + return self.elements() + + @property + def UniqueElements(self): + return self.keys + + def isdisjoint(self, other): + return frozenset(self.keys).isdisjoint(frozenset(other.keys)) + + def issubset(self, other): + return all(self[key] <= other[key] for key in frozenset(self).union(frozenset(other))) + + def ispropersubset(self, other): + return self.issubset(other) and len(self) < len(other) + + def set(self, key, value): + set = Counter(self) + set[key] = value + return MultiSet(set) + + def __hash__(self): + return hash(frozenset(self.keys)) + + def __eq__(self, other): + return all(self[key] == other[key] for key in self.keys | other.keys) + + def __setattr__(self, key, value): + raise TypeError("'Map' object is immutable") + + def __contains__(self, item): + return self[item] > 0 + +class Map(dict): + def __dafnystr__(self) -> str: + return 'map[' + ', '.join(map(lambda i: f'{string_of(i[0])} := {string_of(i[1])}', self.items)) + ']' + + @property + def Elements(self): + return self + + @property + def keys(self): + return Set(super().keys()) + + @property + def values(self): + return Set(super().values()) + + @property + def items(self): + return Set(super().items()) + + def set(self, key, value): + map = dict(self) + map[key] = value + return Map(map) + + def __sub__(self, other): + map = dict(self) + for key in list(other): + map.pop(key, None) + return Map(map) + + def __or__(self, other): + map = dict(self) + for k, v in other.items: + map[k] = v + return Map(map) + + def __hash__(self): + return hash(frozenset(self)) + + def __setattr__(self, key, value): + raise TypeError("'Map' object is immutable") + +class BigOrdinal: + @staticmethod + def is_limit(ord): + return ord == 0 + + @staticmethod + def is_succ(ord): + return 0 < ord + + @staticmethod + def offset(ord): + return ord + + @staticmethod + def is_nat(ord): + # at run time, every ORDINAL is a natural number + return True + +class BigRational(Fraction): + def __dafnystr__(self): + if self.denominator == 1: + return f"{self.numerator}.0" + correction = self.divides_a_power_of_10(self.denominator) + if correction is None: + return f"({self.numerator}.0 / {self.denominator}.0)" + compensation, shift = correction + if self.numerator < 0: + sign, digits = "-", str(-self.numerator*compensation) + else: + sign, digits = "", str(self.numerator*compensation) + if shift < len(digits): + n = len(digits) - shift + return f"{sign}{digits[:n]}.{digits[n:]}" + return f"{sign}0.{'0' * (shift - len(digits))}{digits}" + + @staticmethod + def isolate_factor(f, x): + y = 0 + while x > 1 and x % f == 0: + y += 1 + x //= f + return x, y + + @staticmethod + def divides_a_power_of_10(x): + rem, expA = BigRational.isolate_factor(10, x) + if rem % 5 == 0 or rem % 2 == 0 or rem == 1: + major, minor = (5, 2) if rem % 5 == 0 else (2, 5) + rem, expB = BigRational.isolate_factor(major, rem) + return (minor**expB, expA+expB) if rem == 1 else None + return None + + def __add__(self, other): + return BigRational(super().__add__(other)) + + def __sub__(self, other): + return BigRational(super().__sub__(other)) + + def __mul__(self, other): + return BigRational(super().__mul__(other)) + + def __truediv__(self, other): + return BigRational(super().__truediv__(other)) + +def plus_char(a, b): + return chr(ord(a) + ord(b)) + +def minus_char(a, b): + return chr(ord(a) - ord(b)) + +def euclidian_division(a, b): + if 0 <= a: + if 0 <= b: + return a // b + else: + return -(a // (-b)) + else: + if 0 <= b: + return -((-a-1) // b) - 1 + else: + return (-a-1) // (-b) + 1 + +def euclidian_modulus(a, b): + bp = abs(b) + if 0 <= a: + return a % bp + c = (-a) % bp + return c if c == 0 else bp - c + +@dataclass +class HaltException(Exception): + message: str + +def quantifier(vals, frall, pred): + for u in vals: + if pred(u) != frall: + return not frall + return frall + +def AllBooleans(): + return [False, True] + +def AllChars(): + return (chr(i) for i in range(0x10000)) + +def AllUnicodeChars(): + return chain((CodePoint(chr(i)) for i in range(0xD800)), + (CodePoint(chr(i)) for i in range(0xE000, 0x11_0000))) + +def AllIntegers(): + return (i//2 if i % 2 == 0 else -i//2 for i in count(0)) + +def IntegerRange(lo, hi): + if lo is None: + return count(hi-1, -1) + if hi is None: + return count(lo) + return range(lo, hi) + +class Doubler: + def __init__(self, start): + self.start = start + + def __iter__(self): + i = self.start + while True: + yield i + i *= 2 + +class defaults: + bool = staticmethod(lambda: False) + char = staticmethod(lambda: 'D') + int = staticmethod(lambda: 0) + real = staticmethod(BigRational) + pointer = staticmethod(lambda: None) + tuple = staticmethod(lambda *args: lambda: tuple(a() for a in args)) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/module_.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/module_.py new file mode 100644 index 0000000000..96d10ce75e --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/module_.py @@ -0,0 +1,82 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny +import System_ +import SimpleBooleanImplTest_Compile +import simple.types.boolean.internaldafny.wrapped +import WrappedSimpleTypesBooleanTest_Compile + +import Extern + +assert "module_" == __name__ +module_ = sys.modules[__name__] + +class default__: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "_module._default" + @staticmethod + def Test____Main____(noArgsParameter__): + d_12_success_: bool + d_12_success_ = True + _dafny.print(_dafny.string_of(_dafny.Seq("SimpleBooleanImplTest.GetBooleanTrue: "))) + try: + if True: + SimpleBooleanImplTest_Compile.default__.GetBooleanTrue() + if True: + _dafny.print(_dafny.string_of(_dafny.Seq("PASSED\n"))) + except _dafny.HaltException as e: + d_13_haltMessage_ = e.message + if True: + _dafny.print(_dafny.string_of(_dafny.Seq("FAILED\n "))) + _dafny.print(_dafny.string_of(d_13_haltMessage_)) + _dafny.print(_dafny.string_of(_dafny.Seq("\n"))) + d_12_success_ = False + _dafny.print(_dafny.string_of(_dafny.Seq("SimpleBooleanImplTest.GetBooleanFalse: "))) + try: + if True: + SimpleBooleanImplTest_Compile.default__.GetBooleanFalse() + if True: + _dafny.print(_dafny.string_of(_dafny.Seq("PASSED\n"))) + except _dafny.HaltException as e: + d_14_haltMessage_ = e.message + if True: + _dafny.print(_dafny.string_of(_dafny.Seq("FAILED\n "))) + _dafny.print(_dafny.string_of(d_14_haltMessage_)) + _dafny.print(_dafny.string_of(_dafny.Seq("\n"))) + d_12_success_ = False + _dafny.print(_dafny.string_of(_dafny.Seq("WrappedSimpleTypesBooleanTest.GetBooleanTrue: "))) + try: + if True: + WrappedSimpleTypesBooleanTest_Compile.default__.GetBooleanTrue() + if True: + _dafny.print(_dafny.string_of(_dafny.Seq("PASSED\n"))) + except _dafny.HaltException as e: + d_15_haltMessage_ = e.message + if True: + _dafny.print(_dafny.string_of(_dafny.Seq("FAILED\n "))) + _dafny.print(_dafny.string_of(d_15_haltMessage_)) + _dafny.print(_dafny.string_of(_dafny.Seq("\n"))) + d_12_success_ = False + _dafny.print(_dafny.string_of(_dafny.Seq("WrappedSimpleTypesBooleanTest.GetBooleanFalse: "))) + try: + if True: + WrappedSimpleTypesBooleanTest_Compile.default__.GetBooleanFalse() + if True: + _dafny.print(_dafny.string_of(_dafny.Seq("PASSED\n"))) + except _dafny.HaltException as e: + d_16_haltMessage_ = e.message + if True: + _dafny.print(_dafny.string_of(_dafny.Seq("FAILED\n "))) + _dafny.print(_dafny.string_of(d_16_haltMessage_)) + _dafny.print(_dafny.string_of(_dafny.Seq("\n"))) + d_12_success_ = False + if not(d_12_success_): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(3,0): " + _dafny.string_of(_dafny.Seq("Test failures occurred: see above.\n"))) + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/__init__.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/__init__.py new file mode 100644 index 0000000000..1e70592714 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/__init__.py @@ -0,0 +1,56 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny +import System_ +import types +import SimpleBooleanImpl_Compile +import Wrappers_Compile + +assert "simple.types.boolean.internaldafny" == __name__ + +class SimpleBooleanClient(types.ISimpleBooleanClient): + def __init__(self): + self._config: SimpleBooleanImpl_Compile.Config = SimpleBooleanImpl_Compile.Config_Config.default()() + pass + + def __dafnystr__(self) -> str: + return "simple.types.boolean.internaldafny_Compile.SimpleBooleanClient" + def ctor__(self, config): + (self)._config = config + + def GetBoolean(self, input): + output: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(types.GetBooleanOutput.default())() + out0_: Wrappers_Compile.Result + out0_ = SimpleBooleanImpl_Compile.default__.GetBoolean((self).config, input) + output = out0_ + return output + + @property + def config(self): + return self._config + +class default__: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "simple.types.boolean.internaldafny_Compile._default" + @staticmethod + def DefaultSimpleBooleanConfig(): + return types.SimpleBooleanConfig_SimpleBooleanConfig() + + @staticmethod + def SimpleBoolean(config): + res: Wrappers_Compile.Result = None + d_1_client_: SimpleBooleanClient + nw0_ = SimpleBooleanClient() + nw0_.ctor__(SimpleBooleanImpl_Compile.Config_Config()) + d_1_client_ = nw0_ + res = Wrappers_Compile.Result_Success(d_1_client_) + return res + return res + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/__pycache__/__init__.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..dd38dfa1706a3bcd009e8fba6f1d0aac334a7a39 GIT binary patch literal 3794 zcmb7H-EZ606~ClN>ciGYY}H*p)@qH5PRe3+$colk>tcz!F2m-uvey>G09F<0SPChs zmlQGyG9U~FCJX`gm_BXkOWGj+LNWBQkCMT{!UYNh81m3J72Z>ycFv_pnU0gLm(;mm z=iGbl`S@MxvvfK|pd8%zoBl6_kpEyODDt#%_-|<3Av)0olc-pWreKMxXvNf+C8?4n ztFnOOF;lVPYMi$vGhrpwByS65N=q7Zs0*Ac0bI#@Ap3yJ=8Ali-xo<>ajgZm30Y5 z6kP@yHxhWxdm!;3Scj-dJr4RO*y1MF;EKQXRkLn1-I@^c5rW3R-=PZR4snmnHNy7Y zK(Ql&&AAqZMrP3 z)%eJLfk}>GZab({;rma^e{u}!l+AX{s_AyKylyx*UAtAjWz(B2vsyFCE!*r^Hf`;c zw+zSqqpcgJQ}z`=?*;9tY04BFR<~fd)p2)VK@@U+OKoc%-E^_lDf`YWb7z*P&MZfq zS=O|Av+iozN~^;XL8p5za%|rTE5U3I&f}a1(kI`nR=m{@4_0^fS9eCM4R5tES~a~@ zb0FQGA1CGq(jnTPDb#S=v>9#x@c_qZDmb~sx1NCR!oOHYVG+it8E z+ZB7_)UL%O%e_yltrlcc5DF|)F&s!fZL?jg8ID7utByb}8DE zC8r6iX)HD4pyyz&DEU5<>rG&1ip|BC4E4*JgC;6K;Xb6x(Ca>Tk^^Upo(3ML0t7Oq zblEFiJ1D)oUwZfJ%KKhr=b+Nsue3%L>Q(5dquiF4+ZxE@Q%eJ7oPB1H_9G$m0qhYb7DgXLCuu%~Lm%fkoQTr7qx7FBO?77$gr29 zx$9r*CyX5nOm=47zwl3B?Jm#G^JK0Po(|pBCy%muFZ=o^yXIxrhKV)*m`9UZ0ycik ze?kMlQFn!-A3o6oB3Rx%Dh)Dzaf5GN=r(XYUZT?XKyn7^0_lmnF*h0Tf?T*pFBaw9 z6?zaJ{PHU*JZJqZN4TXKB+nx$00D$Wpk*;?I818ZdRb$0y7o)0#=rNDVJu5WY}|cz zX5Gld3ase-4hSIBOBV*QN7)xf*<~-gJdhy7|1tOXxv%pVz5K67`8T}$8>7UUmq2Te zm(C34zR5i2WiEbxbCkL4WiAh5lbt8Tq! z8SojV(@Qx18j@p3b{@x&EW^*a1*9K72s40WAyEYRttpbd#gQyZAIhgt;!Tuz6On3R z@6Y~#0_};IkQXNeNH`S?@KHb2QIldG5V_+p1#ZfE^9IF`pb`>vGF5;u$*Q_L6p?}@ z>+nCog)ei5Vpg*F6zZAce?YPLX2)?2OXHcvuUX&aXg`*}7V(zd1d%R@0ctNqwkoU9Y)`WB-7{5n56ss8P7)M`}`S` z!Z3Kp?!fyy%_z)pt1Y-`Q+wQ2=K>PLOXA`Hs(W G_x%qOmumz7 literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/__pycache__/types.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/__pycache__/types.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..910c07718458876a80b4f77bbbe57735c9f1fd2d GIT binary patch literal 17432 zcmdU0TWl0pny#w8xP7CHZ7`Q4Hkc5bB=(SyaZEB`FkS;YYe)>3G=_3ts_kx9UtHCO zxbcwIj5Q&e>}YqS5gyGX^2070mKR3KN_k|ZeVE5;R47(SBO$H!Vc%fQN>QHn|IexF zt~y=DCYWqe-SyY0bN$bM{_~&jT`w>60UrH*N-$j$t|4x}5=z&GYl)jz>cVv-eSNr|JR8Cd zW4wvv$h%`QIX07Yn;~7ZJ6^bj zgtS0Ns|;?)v3XrNwvu#PAl+6b$1NnJ4MMgtAzMkvb_m(QgtU>6oe=VZ3~u0J$0X;D z!_;USN%112c*z|vyq$!!Lr8}VZpdp_eD^wJw1cGUgminXbT7yEt|Q$}lI|5q*Tr!1 zLYyDvy1V}yn{}kyZ-xdViV}$`vgtdLnKNt7%;n^B5!I|4iKONDnc18ock^Z-p=7fv zI%3(`Ouo>iCDRbnlZV(^Pc)lVj zvYg4seC6yo4*LPVuQUVsnEzO~!CmLC3!we{LI_d|BQ9105UT~F9|Q7xh@9uaVO;|E z3BxY<@NTBuVjtyh@gpF<7u_66?$>U?tc}Zw$gGl=PE?$yG-SS5{Py$Svzn}Gy~=DX z9gAl(y~kv2I-kw;UdgJ{IVBR4dvjT3E}d0#Q@v+oE&q4fxU6WsqolF0Wo`FS+G4#b zG-fgl-nqH_6l92rw7*faX~Nj+xw&52(7mLgd##4&eZ18+uoXq@(f3p+c9t zVm(%^dfrvCv52A_0tbz`8EU4z1mv3{cfakxoe%DO@aGF(Ubx$RxBK5;{f}2mZ6ik8 zNReAX$=~9-eWov_XsQTrY7-C*o3vwMLdAT{8mpMXR`235nYI&tpepBQ)l95xOd%qcOcbgI95=XmZV8^%*F1j{H0O3%dm6Y=PHlvEw|Fxs zN%D*&L9_ccSxKlcf`AbR($PUH1Q9Z_Bo($W^`YLV$t#$q$St?D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bNq2jc)2|{f>zyc}WP6x1+QQNvuq@+B>1V^V*uN^` z1U&5mR*QBo%NUK)cAOTJrx7F3ARV=D@hHzJ>8n3gt%~F1U9cP=iULefU=Tb(fk_N% z4GdyVtiYxYu_ov)th!(AMS)9fh~1GZgbt!1E5fjk7hZ&vZo+fofKZTk(LLO`2SQqc zvVl+wUVePX|58vcd^YSSeUhdACKY={mixCdzL&G8PyIY&qa@?`j=xPsv6T_Zgx}RE zD|{;blQM6g10-<*=6qD_zz5YP@hQ)eO$Ef8`N%Kf@-zeE`JVJJ0Hnf7{+M~ z>FuvCGHq8j50Vfrh%uVg8b4Skpd#sTS`2ymzj!F(jn4l2&(2-AktKNyJcsi*coTlc zS3#6u@{8){jWE=di-JSUm!FLJ)V{7Z)j&Yp-u0<>oh!>z)u9Qz0iFX?fUMf?g6Q3< zhS08BtJ|sfPIc}om!6mFsEc?5%q?3wB^1)u#7K9}jBGAZBVRA6pVPgOrGxlpc!sS+ zN2OKb^2*oc5!fut^^6_+*G|DYcky%ZVet}(G5XWH^y7Dj-m8b+TZi6zzkA^WFZ|7m z4!vkvi!`vER!!AW3a2;>Wjzd&j0~C5fvs4ZbH$V2)o>T0<035%&`cg-rO1 zVER{5TwQru=qiZdZM^8m2DY2WXdxVIZ{eT&%Cd!@mPhuQ+R@Xl9)4sZXMJ+xNt4>s z!#W}T&(=D`Iugp4<)#jCRsZr0asGX$YluIu;<%!O21=ioMMXTWeNaa5A-@JoR85PA zAdXFp@eI|+y3f!%)APm*U7jwF8G2#5JdV)nSoaxfj&+}%T3(x?`IsSpT8$(3?O(rr Z;C?i%#<5kyil4LPBW?ftKfIc@e*h8B?H&LC literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/types.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/types.py new file mode 100644 index 0000000000..c2019a8cf9 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/types.py @@ -0,0 +1,145 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny +import System_ + +import Wrappers_Compile + +assert "simple.types.boolean.internaldafny.types" == __name__ + +class DafnyCallEvent: + @classmethod + def default(cls, default_I, default_O): + return lambda: DafnyCallEvent_DafnyCallEvent(default_I(), default_O()) + def __ne__(self, __o: object) -> bool: + return not self.__eq__(__o) + @property + def is_DafnyCallEvent(self) -> bool: + return isinstance(self, simple.types.boolean.internaldafny.types.DafnyCallEvent_DafnyCallEvent) + +class DafnyCallEvent_DafnyCallEvent(DafnyCallEvent, NamedTuple('DafnyCallEvent', [('input', Any), ('output', Any)])): + def __dafnystr__(self) -> str: + return f'simple.types.boolean.internaldafny.types_Compile.DafnyCallEvent.DafnyCallEvent({_dafny.string_of(self.input)}, {_dafny.string_of(self.output)})' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, simple.types.boolean.internaldafny.types.DafnyCallEvent_DafnyCallEvent) and self.input == __o.input and self.output == __o.output + def __hash__(self) -> int: + return super().__hash__() + + +class GetBooleanInput: + @classmethod + def default(cls, ): + return lambda: GetBooleanInput_GetBooleanInput(Wrappers_Compile.Option_None.default()()) + def __ne__(self, __o: object) -> bool: + return not self.__eq__(__o) + @property + def is_GetBooleanInput(self) -> bool: + return isinstance(self, simple.types.boolean.internaldafny.types.GetBooleanInput_GetBooleanInput) + +class GetBooleanInput_GetBooleanInput(GetBooleanInput, NamedTuple('GetBooleanInput', [('value', Any)])): + def __dafnystr__(self) -> str: + return f'simple.types.boolean.internaldafny.types_Compile.GetBooleanInput.GetBooleanInput({_dafny.string_of(self.value)})' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, simple.types.boolean.internaldafny.types.GetBooleanInput_GetBooleanInput) and self.value == __o.value + def __hash__(self) -> int: + return super().__hash__() + + +class GetBooleanOutput: + @classmethod + def default(cls, ): + return lambda: GetBooleanOutput_GetBooleanOutput(Wrappers_Compile.Option_None.default()()) + def __ne__(self, __o: object) -> bool: + return not self.__eq__(__o) + @property + def is_GetBooleanOutput(self) -> bool: + return isinstance(self, simple.types.boolean.internaldafny.types.GetBooleanOutput_GetBooleanOutput) + +class GetBooleanOutput_GetBooleanOutput(GetBooleanOutput, NamedTuple('GetBooleanOutput', [('value', Any)])): + def __dafnystr__(self) -> str: + return f'simple.types.boolean.internaldafny.types_Compile.GetBooleanOutput.GetBooleanOutput({_dafny.string_of(self.value)})' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, simple.types.boolean.internaldafny.types.GetBooleanOutput_GetBooleanOutput) and self.value == __o.value + def __hash__(self) -> int: + return super().__hash__() + + +class ISimpleBooleanClientCallHistory: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "simple.types.boolean.internaldafny.types_Compile.ISimpleBooleanClientCallHistory" + +class ISimpleBooleanClient: + pass + def GetBoolean(self, input): + pass + + +class SimpleBooleanConfig: + @_dafny.classproperty + def AllSingletonConstructors(cls): + return [SimpleBooleanConfig_SimpleBooleanConfig()] + @classmethod + def default(cls, ): + return lambda: SimpleBooleanConfig_SimpleBooleanConfig() + def __ne__(self, __o: object) -> bool: + return not self.__eq__(__o) + @property + def is_SimpleBooleanConfig(self) -> bool: + return isinstance(self, simple.types.boolean.internaldafny.types.SimpleBooleanConfig_SimpleBooleanConfig) + +class SimpleBooleanConfig_SimpleBooleanConfig(SimpleBooleanConfig, NamedTuple('SimpleBooleanConfig', [])): + def __dafnystr__(self) -> str: + return f'simple.types.boolean.internaldafny.types_Compile.SimpleBooleanConfig.SimpleBooleanConfig' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, simple.types.boolean.internaldafny.types.SimpleBooleanConfig_SimpleBooleanConfig) + def __hash__(self) -> int: + return super().__hash__() + + +class Error: + @classmethod + def default(cls, ): + return lambda: Error_CollectionOfErrors(_dafny.Seq({})) + def __ne__(self, __o: object) -> bool: + return not self.__eq__(__o) + @property + def is_CollectionOfErrors(self) -> bool: + return isinstance(self, simple.types.boolean.internaldafny.types.Error_CollectionOfErrors) + @property + def is_Opaque(self) -> bool: + return isinstance(self, simple.types.boolean.internaldafny.types.Error_Opaque) + +class Error_CollectionOfErrors(Error, NamedTuple('CollectionOfErrors', [('list', Any)])): + def __dafnystr__(self) -> str: + return f'simple.types.boolean.internaldafny.types_Compile.Error.CollectionOfErrors({_dafny.string_of(self.list)})' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, simple.types.boolean.internaldafny.types.Error_CollectionOfErrors) and self.list == __o.list + def __hash__(self) -> int: + return super().__hash__() + +class Error_Opaque(Error, NamedTuple('Opaque', [('obj', Any)])): + def __dafnystr__(self) -> str: + return f'simple.types.boolean.internaldafny.types_Compile.Error.Opaque({_dafny.string_of(self.obj)})' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, simple.types.boolean.internaldafny.types.Error_Opaque) and self.obj == __o.obj + def __hash__(self) -> int: + return super().__hash__() + + +class OpaqueError: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return simple.types.boolean.internaldafny.types.Error_CollectionOfErrors.default()() + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/wrapped.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/wrapped.py new file mode 100644 index 0000000000..725dbd0993 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/wrapped.py @@ -0,0 +1,23 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny +import System_ +import SimpleBooleanImplTest_Compile +import simple.types.boolean.internaldafny.types + +assert "simple.types.boolean.internaldafny.wrapped" == __name__ + +class default__: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "simple.types.boolean.internaldafny.wrapped_Compile._default" + @staticmethod + def WrappedDefaultSimpleBooleanConfig(): + return simple.types.boolean.internaldafny.types.SimpleBooleanConfig_SimpleBooleanConfig() + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/__init__.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/__init__.py new file mode 100644 index 0000000000..247be3e3d4 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/__init__.py @@ -0,0 +1 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/__pycache__/__init__.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6cd3213ca451d1207e2c3d866c99914f157dbee6 GIT binary patch literal 250 zcmXv|v1&p=5WG_i5|Dg{MY5%hqzIBOHX2BGJm0PO@a}fGyNBEtSXt*2LcS|MAlO-D zpZKPjotb5p{h3T2m0?N1+tBcVgUhNr(Ps!{i8ozV7IUr1=c|S42dyB5HKL1SfKllMiSK6Up@B@ zIh-M-B#Ye^MMtB!F7{ow#fJ0Tqmw~@3f)t>GMcaS`DN_fp7&cw4;XGYX;4;a|PNeI(b@kjt6SG>WsgQM~mt6Y#@-mA^mk zJwzsHXwRGAi2JfDMvJr2LIY;JkPQg%$;h$f}z)f8X0zY$HPNXj<9oa5h#3S~Vb1fy2gw+J zLJ+b7)b&jB(lNF4R3^71mDzg6xg`m5pi*Bwk1$0Vo`I#mo~2gP@o4S%&L`8k6kqM{ zjZ~7);O5&SaeixgO=Z`qjKm8uJ||^`vRC&2W0v?2r82FGZB;vosWYrnPxaxek74RR zMLY^qaTGSisjxZ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^&gX;NB&2Nf9sa#<_lBvBtw2b zM}8YgsFn6_di)g{egR;3gKLRTx+^yPWJmt)yBF3^-aU8!vV7=_GJ00-KCAfNtT=F~ z6GFLi-~I;)x%cS9)(^_NUX!QZ zkuP5lpoy|NVtPN8jx zYAM)AW=96fwy3zAi6yfFhK<5WOfaM?Tczb3KIs#CB$kO|dg_s!e3wVQ-y;US3l}h? z5|2O27Rk3DWh?jv_`gAV2^1)mPn&!n&^`q_(c?kqBo#ObjI<-u|Q5@9^;K-4B z=pXp*+T?pe@;wgu2B|zGLYU#&azy=tPwgoIp8|?%QvEDj=TwLr!to~6hoo_8Cnngh z{K0-i^>mZM5fW?_R&8sxg1ud_x8I^m4tBL|t-avr bR2-eRtQE_9GzA*DHGNL_94 literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/__pycache__/config.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/__pycache__/config.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..67d71d7561dbb82b5f392d9c3adfad9afd6c34da GIT binary patch literal 1546 zcmah}&1)Pt6xV$0?3XtV#BJ8#q|?yL7S{`qE!0&rQ)knfo2bU*GGpj&)GOJu@(fKvvfXy&oe|(4xn8M}adgJ|%$UM)xHapM9tFOc0KGlCVhYAsY7=wO%UgY*EeLje^m z1y)c}IN&0Dm}Ui|^MYEf5NNx=0%u{GD=HFNC@$o7xHqIBOQj0=V9Bx>9uCuF7-B)g zA?G6*sv%Z(m_Rcru`Wp|()<8SG^F3tq_p9|6AlG^Qc|h5mO=}v#5k4;@}vjjD!A2! z3!Tk9m9jK$E0f|Qn#&O9Busb)`v4{zyfPEY@K`R#F|}{oIS=&8)q3@{FYYgu!rUz#Ku2NMg>Pn?|B?udF!x5^ zsq){lP2ZYVv9;84anno;U|XSA!rUxjE>%_FI|jXN#D)a_&sfyZ_-c^x@?H_yy`s7W@KzJb4p?d$)bG{`8}X)15lqQ>Qy~JI;UwOz~zg!Wbw{9H|j=%j)9e;Paws{o%)SRGA;Hi}WY{~xuYYDjF literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/__pycache__/deserialize.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/__pycache__/deserialize.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..16a6c816e65f156e753405d6ecbdf944e099bbe1 GIT binary patch literal 809 zcmZ`$zl+pB6rRZ@v+?4JAd0BPDGKf#ZVJ~%@C)e^EJ>K{Jp)dFYL_hCmfVr~)47?{1&sf`0b|xwS1-NOk4@%p< z%gcLj!iSnE9rA3L45>)Nb*9Hg$ndF9W67f-3#H(BB9zWGP zxSmj`ved*0gk^5F;Xu1d-%%o2k49;JMdqQd_6{D+MjBEE4C08#&saz1<>|qJz+j7+ zd7)|nW&8B{9H>9=y+A*Lv+pjwU){NIwFtW3g6>YxE!^%D@@S*&mzQU)I>z$s)D1gv zYM4qRPA#EXPTA3yCo77JFIUY=dA5Kg)$L~^wRAoqbqtI;3Tn^40qKmhHFW}9`yg6_ wnlv!R6CYuT3nUJ%U+7G6czs6~i^FR|Fuqo-+?*h=Ur$x0=+VmlS5>6`0@s(`y#N3J literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/__pycache__/endpoints.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/__pycache__/endpoints.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..646296696738cf1bb3dd7aabd878d3ec10b56c56 GIT binary patch literal 434 zcmZWkJxc>Y5Z%3t5|xCYVk1}zSC}nq#X{6h5tD#i6V}_2JF;KwZX(;++1dIN#D9}g zuCcJP3#3cs=Hm)=n4Ntyv+wctt@(b7^QMYu1*Qi9yds7e=1AZaiztmS z0-VMWr8O3HP!fO7A16_{+i}zt*@a|U71G^MLxnB(eot?~Dn0^povfAnRunGxeeGSY zWV^3TF`^FIxpUgYLDbYjDVu*3TUB3ay`$;e!t90gEEr4pFcTS5lAMDbIHk#>G6T(N z21G0Fg)%xPU9j#-G2oVT3ZXf4y@m>(DaCJ3XM&17zR@;Y9&5xaAj9SYy8-e!& DP05NP literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/__pycache__/errors.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/__pycache__/errors.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..aca27397392b15f72482900712c2678ba0c1c100 GIT binary patch literal 1819 zcmb7E&2QX96rZuZws*5jT0m`(pm8oxOLSMQxFA&sO3GeBB$NbNUq;5BZLIi<887KZ zIk-}!E~1BAP;%gqQxNoD;gF(8AWKL{oVabZJybpMX1va(X+i4P@8|h=^WK~Hex9FN ztp7230dAo$)Ww*+V|^afl-9;7D%nb`;b&%38UFJ=^$WImB_;ncWA&MOABS-PEqxuTiQ;X&b zW#0xKy~$X@w%RvbPAw|>Ru9At!*ax}Ahxn~YVlIN-LRl7+gf1~61x#4q-YQlC4N5? z{U#yb^xbf>Vi4jd9w9%Yu?Xwg_nkGc!#iQ$i#$JxJByTWWJ%iDOxQ*mx*qMMNjQiS zmacbJDbGGnd>Zo3N)V+X6$h>QHp-CjJnk`6jt z?j>JOHpnybb~<2!3lenba8ZE#hFNZAfftyFUeZR6*;j$vjSkrN+2f&<`Xpi_f;h+sVQ+vHnAbQBdvZ|J3GqUgb3(WX%Cd6y8hqIWfUWaY4%(H4b1=={1$dgH zKh4&6#slMbbM7~DZvWyVbK%%rI5HRhxOi!(J!lT$ktMS0%oHZ;0>mxAW(3Rv6tjf5 zahzms79=qQQK&p)(s|LEMCQ>jB*eyS4mNO+k&nv|&kHL8nquKL00cFCPO+silXvs( zz3xa+YV!x`2*Kx-pro4c<$;_ukulN6ZGh#ym8{bw!)DjwjX2qi zt0Zr=CEqMYQ${(3Unss~x$(g2mwMKebn<^MjEMmz?vrKPcxjr&8WXo26M-<1tMW9m z%$+APXoXI1}14^LlxIeZ&?(Pt=|N3NTVJ#v>i!D@W-4|9VHd zit8ivBJ6(nSj;||E;UfCnRkbu-doyP%JE3iF;L@07;f)>b@0WH&SSCmWU6pZ#kO#C a7IxS7HxCBK^H+~AToW#B;qt7KOx?d~A)y5T literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/__pycache__/models.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/__pycache__/models.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..18809b174c7b896e408e97f07a1a09ba6aa67163 GIT binary patch literal 5271 zcmeHK|7#n`6`$E%eX%54wv+f`#}}_Jmz-pJ(kbb+H24D7xH)=9ozmn=5!X}J+Oe(k zN~_GSl1ezm1w#~SihpRa;Bw#}?$R^q|8V^ST9AtiX5qk43fEtXg0B$#Q{S7FR$pvG zdNhp{MmhdBTUHOu+zGfW@CRA8XH6>IyFe1rfFVE zOL;jhQzDUfh%T)XU4A4H@)&OSN-JVSfe~NNh)?(5Ao0LIP%$n$^4o>7qs-*8wiCQw zv~y-bGqO!9;^Av{_WuBl4Z=v8>Le|_PngVw&|gx=$zbiXL259)b18-uKcGuoZ;4eK5CQ53xSzE1(&M z{(vsQ9wScl9cF*uG!3Q|epo1$Y{z#;GfHfBi}D~?%F?Ded?I!--1{d%Y>;KTOft}N zFP+>VTXdH9L3c}X6pI=2!i0s>RQ2H3$@eYBt)x-P=Cit4NX{^8$u^70yCz>M8d{bm zi>6V|o4mM~yvZ#4N2bmUD|sWAFBpi(n8ZS=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gY^21wE$9%2>NPG@8`iaFqihrPXdHf<7u;t(7#IHPIs%wu#1VLYlx?VY zFEM@=zRD+1s3=|m(S-q4iX+dpOU^z-{T4X`&iYNrnJCl$r)J&MjK|O&g8M4a@@N=; z9UU^&>&W97SPtzZP+*3L%RGr~5%6zdOVAvQyB04JyrA>{$!6HQY>9!Ubqj>YivBv8 z+Kyh_iC%mTw1|HjzSPT6#M)6@hWmfZQKq^%%2Yje8R^MXTXb-gssAcRK>%jse#dW@ zi@Cyr%l9x;1W9y>oIt9Z;T;60U2b`W{{WP+?prG$8ZxD{;V1O9I=OJ%ui?K)fwUeL WPw?H>?SVylSVzq3RrIEa==?X^G{;H+ literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/__pycache__/serialize.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/__pycache__/serialize.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ffc19d82a947a1b784bc4f2af611c4b63b26e95a GIT binary patch literal 787 zcmZ`%zl+pB6rRZ@v+?4(g>sA);?{YiIgvrDsVj(El z+1gr&KhQry|APn$5)cF%uUpveD&J(Yi?`s*O2LEVc9Q0LxD+3Q3X?~+WHO5OfpwQMDkm}rD-zZj6;WL0DhVyqp|KYD zXK+ui0o*|t&Dm|ckJk$3i<07NGQJf0C zSEPK-n<-J1CpwDZaa!mDC}<94HZ}1X7Ucj`B(7glnLn!T`~j)1;T?bz_d0Cnf^Vwx5SkB>DS$}}V?1#Y pj&X^^zv~yeRGwZx(B<; GetBooleanOutput: + """Invokes the GetBoolean operation. + + :param input: The operation's input. + + :param plugins: A list of callables that modify the configuration dynamically. + Changes made by these plugins only apply for the duration of the operation + execution and will not affect any other operation invocations. + """ + operation_plugins = [ + + ] + if plugins: + operation_plugins.extend(plugins) + + return await self._execute_operation( + input=input, + plugins=operation_plugins, + serialize=_serialize_get_boolean, + deserialize=_deserialize_get_boolean, + config=self._config, + ) + + async def _execute_operation( + self, + input: Input, + plugins: list[Plugin], + serialize: Callable[[Input, Config], Awaitable[DafnyGetBooleanInput]], + deserialize: Callable[[DafnyGetBooleanOutput, Config], Awaitable[Output]], + config: Config, + ) -> Output: + try: + return await self._handle_execution( + input, plugins, serialize, deserialize, config + ) + except Exception as e: + # Make sure every exception that we throw is an instance of ServiceError so + # customers can reliably catch everything we throw. + if not isinstance(e, ServiceError): + raise ServiceError(e) from e + raise e + + async def _handle_execution( + self, + input: Input, + plugins: list[Plugin], + serialize: Callable[[Input, Config], Awaitable[DafnyGetBooleanInput]], + deserialize: Callable[[DafnyGetBooleanOutput, Config], Awaitable[Output]], + config: Config, + ) -> Output: + context: InterceptorContext[Input, None, None, None] = InterceptorContext( + request=input, + response=None, + transport_request=None, + transport_response=None, + ) + _client_interceptors = config.interceptors or [] + client_interceptors = cast( + list[Interceptor[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput]], _client_interceptors + ) + interceptors = client_interceptors + + try: + # Step 1a: Invoke read_before_execution on client-level interceptors + for interceptor in client_interceptors: + interceptor.read_before_execution(context) + + # Step 1b: Run operation-level plugins + config = deepcopy(config) + for plugin in plugins: + plugin(config) + + _client_interceptors = config.interceptors or [] + interceptors = cast( + list[Interceptor[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput]], + _client_interceptors, + ) + + # Step 1c: Invoke the read_before_execution hooks on newly added + # interceptors. + for interceptor in interceptors: + if interceptor not in client_interceptors: + interceptor.read_before_execution(context) + + # Step 2: Invoke the modify_before_serialization hooks + for interceptor in interceptors: + context._request = interceptor.modify_before_serialization(context) + + # Step 3: Invoke the read_before_serialization hooks + for interceptor in interceptors: + interceptor.read_before_serialization(context) + + # Step 4: Serialize the request + context_with_transport_request = cast( + InterceptorContext[Input, None, DafnyGetBooleanInput, None], context + ) + context_with_transport_request._transport_request = await serialize( + context_with_transport_request.request, config + ) + + # Step 5: Invoke read_after_serialization + for interceptor in interceptors: + interceptor.read_after_serialization(context_with_transport_request) + + # Step 6: Invoke modify_before_retry_loop + for interceptor in interceptors: + context_with_transport_request._transport_request = ( + interceptor.modify_before_retry_loop(context_with_transport_request) + ) + + # Step 7: Acquire the retry token. + retry_strategy = config.retry_strategy + if retry_strategy is None: + # raise ServiceError( + # "No retry_strategy found on the operation config." + # ) + pass + retry_token = None # retry_strategy.acquire_initial_retry_token() + + while True: + # Make an attempt, creating a copy of the context so we don't pass + # around old data. + context_with_response = await self._handle_attempt( + deserialize, + interceptors, + context_with_transport_request.copy(), + config, + ) + + # We perform this type-ignored re-assignment because `context` needs + # to point at the latest context so it can be generically handled + # later on. This is only an issue here because we've created a copy, + # so we're no longer simply pointing at the same object in memory + # with different names and type hints. It is possible to address this + # without having to fall back to the type ignore, but it would impose + # unnecessary runtime costs. + context = context_with_response # type: ignore + + if isinstance(context_with_response.response, Exception): + # Step 7u: Reacquire retry token if the attempt failed + raise context_with_response.response + + else: + # Step 8: Invoke record_success + # retry_strategy.record_success(token=retry_token) + break + except Exception as e: + if context.response is not None: + # config.logger.exception(f"Exception occurred while handling: {context.response}") + pass + context._response = e + + # At this point, the context's request will have been definitively set, and + # The response will be set either with the modeled output or an exception. The + # transport_request and transport_response may be set or None. + execution_context = cast( + InterceptorContext[Input, Output, DafnyGetBooleanInput | None, DafnyGetBooleanOutput | None], context + ) + return await self._finalize_execution(interceptors, execution_context) + + async def _handle_attempt( + self, + deserialize: Callable[[DafnyGetBooleanOutput, Config], Awaitable[Output]], + interceptors: list[Interceptor[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput]], + context: InterceptorContext[Input, None, DafnyGetBooleanInput, None], + config: Config, + ) -> InterceptorContext[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput | None]: + try: + # assert config.interceptors is not None + # Step 7a: Invoke read_before_attempt + for interceptor in interceptors: + interceptor.read_before_attempt(context) + + # Steps 7b-e haven't had their python designs finalized yet + # Step 7b: Invoke service_auth_scheme_resolver.resolve_auth_scheme + # Step 7c: Invoke auth_scheme.identity_resolver + # Step 7d: Invoke auth_scheme.signer + # Step 7e: Invoke identity_resolver.resolve_identity + + # Step 7g: Invoke modify_before_signing + for interceptor in interceptors: + context._transport_request = interceptor.modify_before_signing(context) + + # Step 7h: Invoke read_before_signing + for interceptor in interceptors: + interceptor.read_before_signing(context) + + # Step 7i: Invoke signer.sign_request + # This step hasn't had its python design finalized yet + + # Step 7j: Invoke read_after_signing + for interceptor in interceptors: + interceptor.read_after_signing(context) + + # Step 7k: Invoke modify_before_transmit + for interceptor in interceptors: + context._transport_request = interceptor.modify_before_transmit(context) + + # Step 7l: Invoke read_before_transmit + for interceptor in interceptors: + interceptor.read_before_transmit(context) + + ## HERE + # Step 7m: Invoke http_client.send + if config.impl is None: + raise Exception("No impl found on the operation config.") + + context_with_response = cast( + InterceptorContext[Input, None, DafnyGetBooleanInput, DafnyGetBooleanOutput], context + ) + + print(f"\ntransport_request is {context_with_response.transport_request}") + + context_with_response._transport_response = config.impl.GetBoolean( + input=context_with_response.transport_request + ) + + # Step 7n: Invoke read_after_transmit + for interceptor in interceptors: + interceptor.read_after_transmit(context_with_response) + + # Step 7o: Invoke modify_before_deserialization + for interceptor in interceptors: + context_with_response._transport_response = ( + interceptor.modify_before_deserialization(context_with_response) + ) + + # Step 7p: Invoke read_before_deserialization + for interceptor in interceptors: + interceptor.read_before_deserialization(context_with_response) + + # Step 7q: deserialize + context_with_output = cast( + InterceptorContext[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput], + context_with_response, + ) + context_with_output._response = await deserialize( + context_with_output._transport_response, config + ) + + # Step 7r: Invoke read_after_deserialization + for interceptor in interceptors: + interceptor.read_after_deserialization(context_with_output) + except Exception as e: + if context.response is not None: + # config.logger.exception(f"Exception occurred while handling: {context.response}") + pass + context._response = e + + # At this point, the context's request and transport_request have definitively been set, + # the response is either set or an exception, and the transport_resposne is either set or + # None. This will also be true after _finalize_attempt because there is no opportunity + # there to set the transport_response. + attempt_context = cast( + InterceptorContext[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput | None], context + ) + return await self._finalize_attempt(interceptors, attempt_context) + + async def _finalize_attempt( + self, + interceptors: list[Interceptor[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput]], + context: InterceptorContext[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput | None], + ) -> InterceptorContext[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput | None]: + # Step 7s: Invoke modify_before_attempt_completion + try: + for interceptor in interceptors: + context._response = interceptor.modify_before_attempt_completion( + context + ) + except Exception as e: + if context.response is not None: + # config.logger.exception(f"Exception occurred while handling: {context.response}") + pass + context._response = e + + # Step 7t: Invoke read_after_attempt + for interceptor in interceptors: + try: + interceptor.read_after_attempt(context) + except Exception as e: + if context.response is not None: + # config.logger.exception(f"Exception occurred while handling: {context.response}") + pass + context._response = e + + return context + + async def _finalize_execution( + self, + interceptors: list[Interceptor[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput]], + context: InterceptorContext[Input, Output, DafnyGetBooleanInput | None, DafnyGetBooleanOutput | None], + ) -> Output: + try: + # Step 9: Invoke modify_before_completion + for interceptor in interceptors: + context._response = interceptor.modify_before_completion(context) + + # Step 10: Invoke trace_probe.dispatch_events + try: + pass + except Exception as e: + # log and ignore exceptions + # config.logger.exception(f"Exception occurred while dispatching trace events: {e}") + pass + except Exception as e: + if context.response is not None: + # config.logger.exception(f"Exception occurred while handling: {context.response}") + pass + context._response = e + + # Step 11: Invoke read_after_execution + for interceptor in interceptors: + try: + interceptor.read_after_execution(context) + except Exception as e: + if context.response is not None: + # config.logger.exception(f"Exception occurred while handling: {context.response}") + pass + context._response = e + + # Step 12: Return / throw + if isinstance(context.response, Exception): + raise context.response + + # We may want to add some aspects of this context to the output types so we can + # return it to the end-users. + return context.response diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/config.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/config.py new file mode 100644 index 0000000000..0c35b36244 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/config.py @@ -0,0 +1,28 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +from dataclasses import dataclass +from typing import Any, Callable, TypeAlias, Union + +import simple.types.boolean.internaldafny + +from .models import GetBooleanInput, GetBooleanOutput + + +@dataclass(kw_only=True) +class Config: + """Configuration for SimpleBoolean + + :param interceptors: The list of interceptors, which are hooks that are called + during the execution of a request. + + :param retry_strategy: The retry strategy for issuing retry tokens and computing + retry delays. + + :param impl: + """ + interceptors: list[None] + retry_strategy: None + impl: simple.types.boolean.internaldafny.SimpleBooleanClient + +# A callable that allows customizing the config object on each request. +Plugin: TypeAlias = Callable[[Config], None] diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/deserialize.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/deserialize.py new file mode 100644 index 0000000000..f8cb771fa7 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/deserialize.py @@ -0,0 +1,11 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +#from Dafny.Path.To.Dafny.Code. import SimpleBooleanHardCoded as _SimpleBooleanHardCoded +from simple.types.boolean.internaldafny.types import GetBooleanOutput_GetBooleanOutput as DafnyGetBooleanOutput + +from .config import Config +from .models import GetBooleanOutput + + +async def _deserialize_get_boolean(input: DafnyGetBooleanOutput, config: Config) -> GetBooleanOutput: + return GetBooleanOutput(value=input.value.value) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/endpoints.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/endpoints.py new file mode 100644 index 0000000000..49b2f71554 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/endpoints.py @@ -0,0 +1,7 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +from smithy_python._private.http import StaticEndpointParams, StaticEndpointResolver + + +EndpointParams = StaticEndpointParams +EndpointResolver = StaticEndpointResolver diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/errors.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/errors.py new file mode 100644 index 0000000000..6f38ba4e80 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/errors.py @@ -0,0 +1,23 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +from typing import Generic, Literal, TypeVar + + +class ServiceError(Exception): + """Base error for all errors in the service. + """ + pass + +T = TypeVar('T') +class ApiError(ServiceError, Generic[T]): + """Base error for all api errors in the service. + """ + code: T + def __init__(self, message: str): + super().__init__(message) + self.message = message + +class UnknownApiError(ApiError[Literal['Unknown']]): + """Error representing any unknown api errors + """ + code: Literal['Unknown'] = 'Unknown' diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/models.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/models.py new file mode 100644 index 0000000000..43b48bab05 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/models.py @@ -0,0 +1,108 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +from typing import Any, Dict, Optional + + +class GetBooleanInput: + value: Optional[bool] + def __init__( + self, + *, + value: Optional[bool] = None, + ): + self.value = value + + def as_dict(self) -> Dict[str, Any]: + """Converts the GetBooleanInput to a dictionary. + + The dictionary uses the modeled shape names rather than the parameter names as + keys to be mostly compatible with boto3. + """ + d: Dict[str, Any] = {} + + if self.value is not None: + d["value"] = self.value + + return d + + @staticmethod + def from_dict(d: Dict[str, Any]) -> "GetBooleanInput": + """Creates a GetBooleanInput from a dictionary. + + The dictionary is expected to use the modeled shape names rather than the + parameter names as keys to be mostly compatible with boto3. + """ + kwargs: Dict[str, Any] = {} + + if "value" in d: + kwargs["value"] = d["value"] + + return GetBooleanInput(**kwargs) + + def __repr__(self) -> str: + result = "GetBooleanInput(" + if self.value is not None: + result += f"value={repr(self.value)}" + + return result + ")" + + def __eq__(self, other: Any) -> bool: + if not isinstance(other, GetBooleanInput): + return False + attributes: list[str] = ['value',] + return all( + getattr(self, a) == getattr(other, a) + for a in attributes + ) + +class GetBooleanOutput: + value: Optional[bool] + def __init__( + self, + *, + value: Optional[bool] = None, + ): + self.value = value + + def as_dict(self) -> Dict[str, Any]: + """Converts the GetBooleanOutput to a dictionary. + + The dictionary uses the modeled shape names rather than the parameter names as + keys to be mostly compatible with boto3. + """ + d: Dict[str, Any] = {} + + if self.value is not None: + d["value"] = self.value + + return d + + @staticmethod + def from_dict(d: Dict[str, Any]) -> "GetBooleanOutput": + """Creates a GetBooleanOutput from a dictionary. + + The dictionary is expected to use the modeled shape names rather than the + parameter names as keys to be mostly compatible with boto3. + """ + kwargs: Dict[str, Any] = {} + + if "value" in d: + kwargs["value"] = d["value"] + + return GetBooleanOutput(**kwargs) + + def __repr__(self) -> str: + result = "GetBooleanOutput(" + if self.value is not None: + result += f"value={repr(self.value)}" + + return result + ")" + + def __eq__(self, other: Any) -> bool: + if not isinstance(other, GetBooleanOutput): + return False + attributes: list[str] = ['value',] + return all( + getattr(self, a) == getattr(other, a) + for a in attributes + ) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/serialize.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/serialize.py new file mode 100644 index 0000000000..19b8a7f32a --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/serialize.py @@ -0,0 +1,11 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +#from Dafny.Path.To.Dafny.Code. import SimpleBooleanHardCoded as _SimpleBooleanHardCoded +from simple.types.boolean.internaldafny.types import GetBooleanInput_GetBooleanInput as DafnyGetBooleanInput + +from .config import Config +from .models import GetBooleanInput + + +async def _serialize_get_boolean(input: GetBooleanInput, config: Config) -> DafnyGetBooleanInput: + return DafnyGetBooleanInput(value=input.value) From c14c343baa0067f85b95c7f1bd8400d86a54a4c9 Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Mon, 12 Jun 2023 13:52:31 -0700 Subject: [PATCH 012/673] paint layer --- .../python/TestsFromDafny-py-goal/Extern.py | 2 +- .../ImplementationFromDafny.py | 9 ---- .../python/TestsFromDafny-py-goal/Shim.py | 7 +-- .../SimpleBooleanImplTest_Compile.py | 13 ++--- .../SimpleBooleanImpl_Compile.py | 2 - .../WrappedSimpleTypesBooleanTest_Compile.py | 4 +- .../__pycache__/Extern.cpython-311.pyc | Bin 1385 -> 1407 bytes .../__pycache__/Shim.cpython-311.pyc | Bin 2441 -> 2241 bytes ...pleBooleanImplTest_Compile.cpython-311.pyc | Bin 7121 -> 7201 bytes .../SimpleBooleanImpl_Compile.cpython-311.pyc | Bin 6236 -> 6236 bytes .../__pycache__/System_.cpython-311.pyc | Bin 1361 -> 1361 bytes ...leTypesBooleanTest_Compile.cpython-311.pyc | Bin 3569 -> 3770 bytes .../__pycache__/module_.cpython-311.pyc | Bin 6344 -> 6344 bytes .../python_client_codegen/README.md | 3 ++ .../python_client_codegen/pyproject.toml | 46 ++++++++++++++++++ .../simple_boolean/__init__.py | 0 .../__pycache__/__init__.cpython-311.pyc | Bin 0 -> 272 bytes .../__pycache__/client.cpython-311.pyc | Bin 12683 -> 12710 bytes .../__pycache__/config.cpython-311.pyc | Bin 0 -> 1591 bytes .../__pycache__/deserialize.cpython-311.pyc | Bin 809 -> 831 bytes .../__pycache__/endpoints.cpython-311.pyc | Bin 0 -> 456 bytes .../__pycache__/errors.cpython-311.pyc | Bin 1819 -> 1841 bytes .../__pycache__/models.cpython-311.pyc | Bin 5271 -> 5293 bytes .../__pycache__/serialize.cpython-311.pyc | Bin 787 -> 809 bytes .../simple_boolean/client.py | 2 +- .../simple_boolean/config.py | 4 +- .../simple_boolean/deserialize.py | 0 .../simple_boolean/endpoints.py | 0 .../simple_boolean/errors.py | 0 .../simple_boolean/models.py | 0 .../simple_boolean/serialize.py | 0 .../__pycache__/__init__.cpython-311.pyc | Bin 3794 -> 0 bytes .../__pycache__/impl.cpython-311.pyc | Bin 0 -> 4221 bytes .../__pycache__/types.cpython-311.pyc | Bin 17432 -> 17720 bytes .../__pycache__/wrapped.cpython-311.pyc | Bin 1829 -> 1829 bytes .../internaldafny/{__init__.py => impl.py} | 19 ++++---- .../types/boolean/internaldafny/types.py | 9 ++-- .../types/boolean/internaldafny/wrapped.py | 1 - .../__pycache__/__init__.cpython-311.pyc | Bin 250 -> 0 bytes .../__pycache__/config.cpython-311.pyc | Bin 1546 -> 0 bytes .../__pycache__/endpoints.cpython-311.pyc | Bin 434 -> 0 bytes 41 files changed, 79 insertions(+), 42 deletions(-) delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/ImplementationFromDafny.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/README.md create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/pyproject.toml rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/{ => python_client_codegen}/simple_boolean/__init__.py (100%) create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/__pycache__/__init__.cpython-311.pyc rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/{ => python_client_codegen}/simple_boolean/__pycache__/client.cpython-311.pyc (93%) create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/__pycache__/config.cpython-311.pyc rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/{ => python_client_codegen}/simple_boolean/__pycache__/deserialize.cpython-311.pyc (79%) create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/__pycache__/endpoints.cpython-311.pyc rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/{ => python_client_codegen}/simple_boolean/__pycache__/errors.cpython-311.pyc (78%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/{ => python_client_codegen}/simple_boolean/__pycache__/models.cpython-311.pyc (94%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/{ => python_client_codegen}/simple_boolean/__pycache__/serialize.cpython-311.pyc (78%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/{ => python_client_codegen}/simple_boolean/client.py (99%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/{ => python_client_codegen}/simple_boolean/config.py (85%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/{ => python_client_codegen}/simple_boolean/deserialize.py (100%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/{ => python_client_codegen}/simple_boolean/endpoints.py (100%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/{ => python_client_codegen}/simple_boolean/errors.py (100%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/{ => python_client_codegen}/simple_boolean/models.py (100%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/{ => python_client_codegen}/simple_boolean/serialize.py (100%) delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/__pycache__/__init__.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/__pycache__/impl.cpython-311.pyc rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/{__init__.py => impl.py} (63%) delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/__pycache__/__init__.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/__pycache__/config.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/__pycache__/endpoints.cpython-311.pyc diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/Extern.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/Extern.py index e929ec644d..09d5af2e5e 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/Extern.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/Extern.py @@ -8,7 +8,7 @@ import System_ import SimpleBooleanImplTest_Compile import simple.types.boolean.internaldafny.types -from simple_boolean.client import SimpleBoolean +from python_client_codegen.simple_boolean.client import SimpleBoolean from Shim import SimpleBooleanShim import Wrappers_Compile diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/ImplementationFromDafny.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/ImplementationFromDafny.py deleted file mode 100644 index 992697c0c2..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/ImplementationFromDafny.py +++ /dev/null @@ -1,9 +0,0 @@ -# Dafny program the_program compiled into Python -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count - -import module_ -import _dafny - diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/Shim.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/Shim.py index 8a16d5366c..ae1efb4bb2 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/Shim.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/Shim.py @@ -1,10 +1,10 @@ # TODO generate this import simple.types.boolean.internaldafny.types -import simple_boolean.client as SimpleBoolean +import python_client_codegen.simple_boolean.client as SimpleBoolean import Wrappers_Compile import asyncio -from simple_boolean.models import GetBooleanInput +from python_client_codegen.simple_boolean.models import GetBooleanInput class SimpleBooleanShim(simple.types.boolean.internaldafny.types.ISimpleBooleanClient): def __init__(self, _impl: SimpleBoolean) : @@ -20,11 +20,8 @@ def GetBoolean(self, input: simple.types.boolean.internaldafny.types.GetBooleanI return Wrappers_Compile.Result_Failure(ex) ''' - print(f"this is input.value {input.value}") unwrapped_request: GetBooleanInput = GetBooleanInput(value=input.value) - print(f"this is unwrapped_request {unwrapped_request}") wrapped_response = asyncio.run(self._impl.get_boolean(unwrapped_request)) - print(f"this is wrapped_response {wrapped_response}") return Wrappers_Compile.Result_Success(wrapped_response) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/SimpleBooleanImplTest_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/SimpleBooleanImplTest_Compile.py index cca9eb456f..a4433aedbc 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/SimpleBooleanImplTest_Compile.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/SimpleBooleanImplTest_Compile.py @@ -3,12 +3,13 @@ from math import floor from itertools import count -import simple.types.boolean.internaldafny +import simple.types.boolean.internaldafny.impl + +import Wrappers_Compile import module_ import _dafny import System_ -import Wrappers_Compile assert "SimpleBooleanImplTest_Compile" == __name__ SimpleBooleanImplTest_Compile = sys.modules[__name__] @@ -21,10 +22,10 @@ def __dafnystr__(self) -> str: return "SimpleBooleanImplTest_Compile._default" @staticmethod def GetBooleanTrue(): - d_0_client_: simple.types.boolean.internaldafny.SimpleBooleanClient + d_0_client_: simple.types.boolean.internaldafny.impl.SimpleBooleanClient d_1_valueOrError0_: Wrappers_Compile.Result = None out0_: Wrappers_Compile.Result - out0_ = simple.types.boolean.internaldafny.default__.SimpleBoolean(simple.types.boolean.internaldafny.default__.DefaultSimpleBooleanConfig()) + out0_ = simple.types.boolean.internaldafny.impl.default__.SimpleBoolean(simple.types.boolean.internaldafny.impl.default__.DefaultSimpleBooleanConfig()) d_1_valueOrError0_ = out0_ if not(not((d_1_valueOrError0_).IsFailure())): raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(10,19): " + _dafny.string_of(d_1_valueOrError0_)) @@ -33,10 +34,10 @@ def GetBooleanTrue(): @staticmethod def GetBooleanFalse(): - d_2_client_: simple.types.boolean.internaldafny.SimpleBooleanClient + d_2_client_: simple.types.boolean.internaldafny.impl.SimpleBooleanClient d_3_valueOrError0_: Wrappers_Compile.Result = None out1_: Wrappers_Compile.Result - out1_ = simple.types.boolean.internaldafny.default__.SimpleBoolean(simple.types.boolean.internaldafny.default__.DefaultSimpleBooleanConfig()) + out1_ = simple.types.boolean.internaldafny.impl.default__.SimpleBoolean(simple.types.boolean.internaldafny.impl.default__.DefaultSimpleBooleanConfig()) d_3_valueOrError0_ = out1_ if not(not((d_3_valueOrError0_).IsFailure())): raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(14,19): " + _dafny.string_of(d_3_valueOrError0_)) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/SimpleBooleanImpl_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/SimpleBooleanImpl_Compile.py index fe636ca528..ab895450be 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/SimpleBooleanImpl_Compile.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/SimpleBooleanImpl_Compile.py @@ -7,9 +7,7 @@ import _dafny import System_ import simple.types.boolean.internaldafny.types - import Wrappers_Compile - assert "SimpleBooleanImpl_Compile" == __name__ SimpleBooleanImpl_Compile = sys.modules[__name__] diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/WrappedSimpleTypesBooleanTest_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/WrappedSimpleTypesBooleanTest_Compile.py index 5dc51aea2d..45e89fab91 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/WrappedSimpleTypesBooleanTest_Compile.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/WrappedSimpleTypesBooleanTest_Compile.py @@ -1,12 +1,14 @@ import sys +from typing import Callable, Any, TypeVar, NamedTuple from math import floor +from itertools import count import module_ import _dafny import System_ import SimpleBooleanImplTest_Compile import simple.types.boolean.internaldafny.wrapped - +import simple.types.boolean.internaldafny.wrapped assert "WrappedSimpleTypesBooleanTest_Compile" == __name__ WrappedSimpleTypesBooleanTest_Compile = sys.modules[__name__] diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/Extern.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/Extern.cpython-311.pyc index ef9c989cb8ee31b5ec4cdada168f20d182196d0b..e4cb2b262db7fc87e5f471698bc1fd57698d93bc 100644 GIT binary patch delta 72 zcmaFK^`DD(IWI340}yaEx2J5|$a{fVT)UvMBqKjBJ~<~dHLoN-IX@*eJvC2n^F3yH PMgi9g3@B(aFKY|{X-gO@ delta 50 tcmey*^^%KsIWI340}#y1Y)@IRk@o^Kqv+-@%<_x^`WF~b&}3!S7yyVI4=Dfu diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/Shim.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/Shim.cpython-311.pyc index 576f4e081ae4f9b91aca72766d26aab154301bc2..1b3f25d2da02ee7027b7a47a30f9ec3cccaca1f1 100644 GIT binary patch delta 735 zcmeAaJ}AhyoR^o20SIn4x2JToOyrZO?*j6sGo&!2Fy=5sF@kBPT;^mZMuuFLC{{*@ z3|kZ%ScW}{9Y{0faO84EaWXP6F}O3NFt;$Iu%t3(fz1V(oy83zK_H6iZGpc#P44O=vA2aJR3TZOlVl7L|DNWVnC;}N<#6P)=b+fb= zklDcSRfIv$_JHXT>kGR67j^xw==xvakepn~rZjmy+g?WT$+_&F;ykR5j0@P7@LW+a zxuW27MZx2WLdFLMp2=s~)%8GfKsFw-2oz*RAirtyPgdg4u9pEaZ)q1)mSp7T#V6-v zrskEzC+DZ6rl;oV6=&ua%+5Cg$luWN-1I3g2Rbh!;tNOcn+a0>qm+c>)Iy zw=77L9EgygyqrUxQEBpV4n?DdK!Fd;jEsyQ*cccME->gr&#yrf!#Jf!J=H(TFl*0ap4%D;nWu~)E{pS0=zrUY+zc2X|e=;b)jYbav zrKkDFT3mQ0C+e%zd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;fH5iOsvX&$5Whf~=4O5%M5H0YoTHo+A(k zwyjELa-g^bYe-RPs@~*$@tK>q2?nx?>VXvL0|`x*B5NRZODHAYd~zY1$YcX?X-197 zKH^G@Hk74F>TGFf{p$bSMCcou=Rb diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/SimpleBooleanImpl_Compile.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/SimpleBooleanImpl_Compile.cpython-311.pyc index cc54aed71e039a9a2dd6666b0d8fa3f9a4ef8fd7..2e530edd63a4cda35b094dbbbca3d3ee081a894e 100644 GIT binary patch delta 129 zcmca(aL0gmIWI340}#w^YEO~h$g9cB$UoVfc{iiT5mj6#zwSvE6@PJYXBfKhz% zI@ZmMe4CTlW-~I%O#a8dl~Hc;7LF^73X?lITN$M{^K( diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/WrappedSimpleTypesBooleanTest_Compile.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/WrappedSimpleTypesBooleanTest_Compile.cpython-311.pyc index 505a9798a7decc63d35c973ab6c00244d6cc5806..12d1c0f31aa94b5e73a55e8d332d7e16270c19e6 100644 GIT binary patch delta 804 zcmaiwy>1gh5XX1#(?0v+i%o#U1QH^oSO@}&=pw>Lfn|x=PysCkVrQ+Oq+)OMoB!(J84K?-TA0^+gTmb!B=k-w3U4FiG}`JXjJ9xLKVWezKy1hTURIpD zE5an9?>>z%4rJR%rhQdUOev&TVL=4)v(aiaV56ikLV0a{Tw53Q53adq;EH@<=PH#t z7x0Xf&L0d1Z9{%5dpAy~1aT4oPZD#0CZGa11(*k%2Alyb02Tpf0ZVe(yRE7}_Ezws z-1k&<`MPrc8Vsv2(@cmNP}MXGv+g#h*-jjZWyrh;&~K@O3IO`AfSL@d&+q922wTTg ztwCBi*&ylm9tsmKTL2s2C=?bCvmN1rEO#?1vN&d`fQb|?kE1@L9sPpB-5jJDL0?YpE!!Xwu8k{(hI%CY7#=HFX8XpZ-wzX=03XPb`?qU(l$z)c^nh delta 573 zcmY+Aze^lJ6vyYy{TL33vWL0Cl;k~AV}7dX)7QVjtSXXCG1PG;A_N>NE{ zb&C82iG{JUv&x^K-EozjSSU%GBILcfMrW7LoA43F+7H)bLw77aK)VcZT&4O?4y*7mAmp=s+^W^^n5%wjMc(pb7i7%@k|5}Mow)9}VXh$d&z z7!&N&f_5Q+{4Ippj!xcLfoicpuf43}rmOjecCgYZq%F1EOjh);%^G`Io}?={PD9MB z*$);;_SbxVrlfw~-rcqIpFvEeN3uT=@}Znsstf)2t@4rR{V+Uy!c)OqAoMm` zM+p{Kwv`xODQ`J+7J(_WNSQaV!crf|VJNWlkpr$8jU2AW4U?ws+Wu1>C+I7&>Sg8@J1`13U0^^# IlVuG%0ip;L=>Px# diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/__pycache__/config.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/__pycache__/config.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..75bbf3287d6113d205c2a07b7f660ada797991dc GIT binary patch literal 1591 zcmahJO>5jnbo8;>FK=v!+t}cwYAKWr&My7Bm{3TaCiKv>5F3gP5fjbqu53x8%#3h# z^C8e4ddQ&=AKM;WO8R4V!3Q&^Ku@`Ca8Eh)&1l#5mO!7Lp5DAS^S(!abUG~rFnIbS z`P4z^Z@rj9ZN{Aa4$O13iwGiCf>JB6EX~`AojQS&x`CV4f?DbYo{>9AJ!lY@)RJb} z3R-D9Xj{le)FR$r^%uU|+z zv_`Lx)@_gw=OOC0Uuj*}QcZ#-juI?H*HzA)tW=F{oFw>hLRE98%;}vZ#zNJ0vzTQM zUg>DMwpzYV<(G^l6lY&&c_G!xh2Yylf@BA5*Y^)XmL+ARea!(XXW%S{&vQgkU=bA9 zP%$fTs7o$IO>4w45!=AInxo!cy*iH2UgMl=o^z%{dbQV{%iwISvI2Q~%G+kyARgj% zNTp&6jwK}L4;c3!#%Z3=S!%7853rSEj#EF*B;^s!CF5et-x*OqiG}ppU_rC#AB^H? z*FVoZ{P$Jr26)Tckts4(uq681TLQcxj#3$8hpybOheIO(vg zoEw=xmzmgOAqs7_Qc1Q?GvVWm_z_E?BcL+QD>b1BF2$lBo%@#A^FS?K&R1Po3_-bi zYj;UC!Z5=r4MWum!<3OC(fm>vJ}GcA)6~O|un5GiE|^*lL!4zynwkp`d&1OQ)g(-t zQ1!>vT&a$UAj1j4gRJB$&`))Bp+DP6Of&f>I@7Iw^ILycP%ipO5v37fS^q8-`;z7T z1IG9B1V^-=v!qNJ&qw_oDDpQ9iXi%xNj>Uwe%AgzFESaYAkIrU0)zUHxW`#~S4VU! zFK3D{GJ%8<7#z~9UnLaI66r@~;Cgw4i%x_a%I{N?7@ z-2j}p8>g#lV^`zET{~^9{JeS6x^dD1`teEYtFfzbVkj{D`rM83zDtT>oOPE~`~03$ z!Sx+f9@HCVg1dUR{(o^#6MetbM^y?v(~{mSk={Z>db(@;n%?a}=b@5ZUqh~MV3p{5 zntNB14NXi`H-LN7xLu9P7yLt5>R*bO0GT?LWlcR~eK1Dv{|8UeC*%Lam#8p2n^K literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/__pycache__/deserialize.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/__pycache__/deserialize.cpython-311.pyc similarity index 79% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/__pycache__/deserialize.cpython-311.pyc rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/__pycache__/deserialize.cpython-311.pyc index 16a6c816e65f156e753405d6ecbdf944e099bbe1..707d658d068ee84f3bc4c08a852941ff044a2094 100644 GIT binary patch delta 40 wcmZ3+ES+%MWB^X*^F4e&{pHtYa|1d1ete=I?*5z?wRu%C-FL||qKIOKIF2y) zA`c_Lkq=(fpk5CJ{@46*;FUW)o7g-(6I97u*sDY*+?2b&yVqbO8-czIR?0oYbDI^h zDr_c2CssNiB^ElFwMzRAsv9nptv|$eUDvEPG@VPBy^y{EZ3r8tJf%{QE|`Ipirh;* zP%KG-D9H*gwaQ2c#$HGY%#dEr6@#!)Q0J#oGDrl`Lt%67+DnOxC3CJN?uyN{ucOZya5aXK)1J#$9jw)tr$6V4OgA={!L}Pc%kqZ+aV?0?!xR1vu{O@kG Sb@0%7-wwv8y>z|q_I?0`f|M}; literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/__pycache__/errors.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/__pycache__/errors.cpython-311.pyc similarity index 78% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/__pycache__/errors.cpython-311.pyc rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/__pycache__/errors.cpython-311.pyc index aca27397392b15f72482900712c2678ba0c1c100..a60d2c19a4226e5cf0782026d0fe1264a44af8a1 100644 GIT binary patch delta 52 zcmbQuw~>!)IWI340}y;|+{iVFk#XVVxs1i41(hWk`FZilIhm<>CGpAmDXHnHd7Jr} Gcvu0h8W83H delta 30 kcmdnUH=B=ZIWI340}yaTY~-56$k;u3E@Sa#H70IW0Bl$X2LJ#7 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/__pycache__/models.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/__pycache__/models.cpython-311.pyc similarity index 94% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/__pycache__/models.cpython-311.pyc rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/__pycache__/models.cpython-311.pyc index 18809b174c7b896e408e97f07a1a09ba6aa67163..685a847284eeba7ea2c0ff59caa2521e06c7922a 100644 GIT binary patch delta 52 zcmbQPxmJ^FIWI340}y;|+{m?`k#XVVQ;fx;1(hWk`FZilIhm<>CGpAmDXHnHd7EvR GqJ;p%+7b5v delta 30 kcmZ3hIbD-$IWI340}yaTY~ciGYY}H*p)@qH5PRe3+$colk>tcz!F2m-uvey>G09F<0SPChs zmlQGyG9U~FCJX`gm_BXkOWGj+LNWBQkCMT{!UYNh81m3J72Z>ycFv_pnU0gLm(;mm z=iGbl`S@MxvvfK|pd8%zoBl6_kpEyODDt#%_-|<3Av)0olc-pWreKMxXvNf+C8?4n ztFnOOF;lVPYMi$vGhrpwByS65N=q7Zs0*Ac0bI#@Ap3yJ=8Ali-xo<>ajgZm30Y5 z6kP@yHxhWxdm!;3Scj-dJr4RO*y1MF;EKQXRkLn1-I@^c5rW3R-=PZR4snmnHNy7Y zK(Ql&&AAqZMrP3 z)%eJLfk}>GZab({;rma^e{u}!l+AX{s_AyKylyx*UAtAjWz(B2vsyFCE!*r^Hf`;c zw+zSqqpcgJQ}z`=?*;9tY04BFR<~fd)p2)VK@@U+OKoc%-E^_lDf`YWb7z*P&MZfq zS=O|Av+iozN~^;XL8p5za%|rTE5U3I&f}a1(kI`nR=m{@4_0^fS9eCM4R5tES~a~@ zb0FQGA1CGq(jnTPDb#S=v>9#x@c_qZDmb~sx1NCR!oOHYVG+it8E z+ZB7_)UL%O%e_yltrlcc5DF|)F&s!fZL?jg8ID7utByb}8DE zC8r6iX)HD4pyyz&DEU5<>rG&1ip|BC4E4*JgC;6K;Xb6x(Ca>Tk^^Upo(3ML0t7Oq zblEFiJ1D)oUwZfJ%KKhr=b+Nsue3%L>Q(5dquiF4+ZxE@Q%eJ7oPB1H_9G$m0qhYb7DgXLCuu%~Lm%fkoQTr7qx7FBO?77$gr29 zx$9r*CyX5nOm=47zwl3B?Jm#G^JK0Po(|pBCy%muFZ=o^yXIxrhKV)*m`9UZ0ycik ze?kMlQFn!-A3o6oB3Rx%Dh)Dzaf5GN=r(XYUZT?XKyn7^0_lmnF*h0Tf?T*pFBaw9 z6?zaJ{PHU*JZJqZN4TXKB+nx$00D$Wpk*;?I818ZdRb$0y7o)0#=rNDVJu5WY}|cz zX5Gld3ase-4hSIBOBV*QN7)xf*<~-gJdhy7|1tOXxv%pVz5K67`8T}$8>7UUmq2Te zm(C34zR5i2WiEbxbCkL4WiAh5lbt8Tq! z8SojV(@Qx18j@p3b{@x&EW^*a1*9K72s40WAyEYRttpbd#gQyZAIhgt;!Tuz6On3R z@6Y~#0_};IkQXNeNH`S?@KHb2QIldG5V_+p1#ZfE^9IF`pb`>vGF5;u$*Q_L6p?}@ z>+nCog)ei5Vpg*F6zZAce?YPLX2)?2OXHcvuUX&aXg`*}7V(zd1d%R@0ctNqwkoU9Y)`WB-7{5n56ss8P7)M`}`S` z!Z3Kp?!fyy%_z)pt1Y-`Q+wQ2=K>PLOXA`Hs(W G_x%qOmumz7 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/__pycache__/impl.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/__pycache__/impl.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..feab82e683cb85735cc4190e2291a9350e560585 GIT binary patch literal 4221 zcmb6cO>Y~=b#}SCq$rU~Te2L>ZlcDiUCJ@(plDjTj(}Q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ax(00}HuKI?n{_H^2_f>sQEx2l-n<#jCJDw`=%v^6@0D^b( zE#Z6UF4Wj=Sf1cBVT{zG&YC0QvOdrA{njyEhNi<$ZN|Prc=;w>lC;=%2>_F#h?} zWq0ZqdsA<@Q*Z4h7Tm-_H?h#0p6QH#nSR+#U;f+uz4TQ#eYF$osV6&0Zt#`t7=0af zp_dWl5MU;zxINFrY{GU5PN`Ti;p%G8H<5k~!B8T;fHVX@f}h<2upK^_B_R=qKoR6+ zKM^nUL>z^O@(EmVkF)Lxm}*b%eCU%D81%)2JlQ7zLS8`NR4-YfFxi)&rZjD)zKYN;(oDWig)c~@wKMym=&G<*yewJ zo}1zL9mR7h?ls(DxUz?G!_-p5^xjS0^Es~8sH(q7T=T?Qpf^ECj95DZupbiyp+}P2 z{OOUOc3<@N$aFXQ_Q=_8^gSf$ZT|E~YMVd30VUrh{@Ww7-QYbWr@O&>7{BuOxA)`M zy20C*CIu*=&w@`c{P}fvCg;vvb7!u*Gk2cioUaEH=OzWP`Lh7$P2#*^F86}}1C<}R AGXMYp literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/__pycache__/types.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/__pycache__/types.cpython-311.pyc index 910c07718458876a80b4f77bbbe57735c9f1fd2d..de718b7bc203ac79a1a4a5c6a8b3353b0edc7b5e 100644 GIT binary patch delta 2582 zcmai0ZA_C_6z+L}3dI(v#Zo9(zFJD5AYY=RP!&N1L;?=QvQnWy83?>D;?!;8AfgWO zTKZYd(XZ1x#xY( z$L*;DFm?!(7nDkcjD6mDYq06NV@e&IxMGSCf}0ZE0nI{-fCh+-j22|2vZkZ~SyQrG zC&=7EO~xh@77B^+F?=S4&6r08nd~zA_kZg2O;9Z}r+PmX4hRsAtApA>g&zlvLxgv) zJON-4jxUYF>kIlp=`9Z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olX%0sriC|>h0Uz=J9`9?Ukf&pqkj&fntVug)DuHyqj1rGcw+o Ie1$C#0D~nDA^-pY delta 53 zcmZ3=x0H`}IWI340}x!xY)@(0$eYQ;$UnK9X*;9PW_@NyMn;jzg)DuHe4AJ=GcrDy Ie1$C#0DVml1poj5 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/__init__.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/impl.py similarity index 63% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/__init__.py rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/impl.py index 1e70592714..243917d03e 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/__init__.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/impl.py @@ -6,24 +6,25 @@ import module_ import _dafny import System_ -import types +import simple.types.boolean.internaldafny.types import SimpleBooleanImpl_Compile + import Wrappers_Compile -assert "simple.types.boolean.internaldafny" == __name__ +assert "simple.types.boolean.internaldafny.impl" == __name__ -class SimpleBooleanClient(types.ISimpleBooleanClient): +class SimpleBooleanClient(simple.types.boolean.internaldafny.types.ISimpleBooleanClient): def __init__(self): self._config: SimpleBooleanImpl_Compile.Config = SimpleBooleanImpl_Compile.Config_Config.default()() pass def __dafnystr__(self) -> str: - return "simple.types.boolean.internaldafny_Compile.SimpleBooleanClient" + return "simple.types.boolean.internaldafny.impl_Compile.SimpleBooleanClient" def ctor__(self, config): (self)._config = config def GetBoolean(self, input): - output: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(types.GetBooleanOutput.default())() + output: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(simple.types.boolean.internaldafny.types.GetBooleanOutput.default())() out0_: Wrappers_Compile.Result out0_ = SimpleBooleanImpl_Compile.default__.GetBoolean((self).config, input) output = out0_ @@ -38,16 +39,16 @@ def __init__(self): pass def __dafnystr__(self) -> str: - return "simple.types.boolean.internaldafny_Compile._default" + return "simple.types.boolean.internaldafny.impl_Compile._default" @staticmethod def DefaultSimpleBooleanConfig(): - return types.SimpleBooleanConfig_SimpleBooleanConfig() + return simple.types.boolean.internaldafny.types.SimpleBooleanConfig_SimpleBooleanConfig() @staticmethod def SimpleBoolean(config): res: Wrappers_Compile.Result = None - d_1_client_: SimpleBooleanClient - nw0_ = SimpleBooleanClient() + d_1_client_: simple.types.boolean.internaldafny.impl.SimpleBooleanClient + nw0_ = simple.types.boolean.internaldafny.impl.SimpleBooleanClient() nw0_.ctor__(SimpleBooleanImpl_Compile.Config_Config()) d_1_client_ = nw0_ res = Wrappers_Compile.Result_Success(d_1_client_) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/types.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/types.py index c2019a8cf9..6c0fbaf673 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/types.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/types.py @@ -6,7 +6,6 @@ import module_ import _dafny import System_ - import Wrappers_Compile assert "simple.types.boolean.internaldafny.types" == __name__ @@ -106,7 +105,7 @@ def __hash__(self) -> int: class Error: @classmethod def default(cls, ): - return lambda: Error_CollectionOfErrors(_dafny.Seq({})) + return lambda: Error_CollectionOfErrors(_dafny.Seq({}), _dafny.Seq({})) def __ne__(self, __o: object) -> bool: return not self.__eq__(__o) @property @@ -116,11 +115,11 @@ def is_CollectionOfErrors(self) -> bool: def is_Opaque(self) -> bool: return isinstance(self, simple.types.boolean.internaldafny.types.Error_Opaque) -class Error_CollectionOfErrors(Error, NamedTuple('CollectionOfErrors', [('list', Any)])): +class Error_CollectionOfErrors(Error, NamedTuple('CollectionOfErrors', [('list', Any), ('message', Any)])): def __dafnystr__(self) -> str: - return f'simple.types.boolean.internaldafny.types_Compile.Error.CollectionOfErrors({_dafny.string_of(self.list)})' + return f'simple.types.boolean.internaldafny.types_Compile.Error.CollectionOfErrors({_dafny.string_of(self.list)}, {_dafny.string_of(self.message)})' def __eq__(self, __o: object) -> bool: - return isinstance(__o, simple.types.boolean.internaldafny.types.Error_CollectionOfErrors) and self.list == __o.list + return isinstance(__o, simple.types.boolean.internaldafny.types.Error_CollectionOfErrors) and self.list == __o.list and self.message == __o.message def __hash__(self) -> int: return super().__hash__() diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/wrapped.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/wrapped.py index 725dbd0993..e5749eab21 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/wrapped.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/wrapped.py @@ -8,7 +8,6 @@ import System_ import SimpleBooleanImplTest_Compile import simple.types.boolean.internaldafny.types - assert "simple.types.boolean.internaldafny.wrapped" == __name__ class default__: diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/__pycache__/__init__.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index 6cd3213ca451d1207e2c3d866c99914f157dbee6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 250 zcmXv|v1&p=5WG_i5|Dg{MY5%hqzIBOHX2BGJm0PO@a}fGyNBEtSXt*2LcS|MAlO-D zpZKPjotb5p{h3T2m0qE!0&rQ)knfo2bU*GGpj&)GOJu@(fKvvfXy&oe|(4xn8M}adgJ|%$UM)xHapM9tFOc0KGlCVhYAsY7=wO%UgY*EeLje^m z1y)c}IN&0Dm}Ui|^MYEf5NNx=0%u{GD=HFNC@$o7xHqIBOQj0=V9Bx>9uCuF7-B)g zA?G6*sv%Z(m_Rcru`Wp|()<8SG^F3tq_p9|6AlG^Qc|h5mO=}v#5k4;@}vjjD!A2! z3!Tk9m9jK$E0f|Qn#&O9Busb)`v4{zyfPEY@K`R#F|}{oIS=&8)q3@{FYYgu!rUz#Ku2NMg>Pn?|B?udF!x5^ zsq){lP2ZYVv9;84anno;U|XSA!rUxjE>%_FI|jXN#D)a_&sfyZ_-c^x@?H_yy`s7W@KzJb4p?d$)bG{`8}X)15lqQ>Qy~JI;UwOz~zg!Wbw{9H|j=%j)9e;Paws{o%)SRGA;Hi}WY{~xuYYDjF diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/__pycache__/endpoints.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple_boolean/__pycache__/endpoints.cpython-311.pyc deleted file mode 100644 index 646296696738cf1bb3dd7aabd878d3ec10b56c56..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 434 zcmZWkJxc>Y5Z%3t5|xCYVk1}zSC}nq#X{6h5tD#i6V}_2JF;KwZX(;++1dIN#D9}g zuCcJP3#3cs=Hm)=n4Ntyv+wctt@(b7^QMYu1*Qi9yds7e=1AZaiztmS z0-VMWr8O3HP!fO7A16_{+i}zt*@a|U71G^MLxnB(eot?~Dn0^povfAnRunGxeeGSY zWV^3TF`^FIxpUgYLDbYjDVu*3TUB3ay`$;e!t90gEEr4pFcTS5lAMDbIHk#>G6T(N z21G0Fg)%xPU9j#-G2oVT3ZXf4y@m>(DaCJ3XM&17zR@;Y9&5xaAj9SYy8-e!& DP05NP From 6bf748dbfb0238d3a8d74c508863711d744e0410 Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Tue, 13 Jun 2023 14:37:14 -0700 Subject: [PATCH 013/673] src/test directories --- TestModels/SharedMakefile.mk | 46 ++- TestModels/SimpleTypes/SimpleBoolean/Makefile | 2 +- .../python/TestsFromDafny-py-goal/Extern.py | 2 +- .../__pycache__/Extern.cpython-311.pyc | Bin 1407 -> 1275 bytes .../__pycache__/module_.cpython-311.pyc | Bin 6344 -> 6349 bytes .../__pycache__/client.cpython-311.pyc | Bin 12710 -> 12740 bytes .../simple_boolean/client.py | 2 + .../__pycache__/wrapped.cpython-311.pyc | Bin 1829 -> 1893 bytes .../types/boolean/internaldafny/wrapped.py | 2 + .../__pycache__/__init__.cpython-311.pyc | Bin 17101 -> 0 bytes .../__pycache__/__default.cpython-311.pyc | Bin 1279 -> 0 bytes .../__pycache__/__init__.cpython-311.pyc | Bin 1892 -> 0 bytes .../__pycache__/Wrapped.cpython-311.pyc | Bin 1877 -> 0 bytes .../__pycache__/__init__.cpython-311.pyc | Bin 4188 -> 0 bytes .../__pycache__/Boolean.cpython-311.pyc | Bin 4179 -> 0 bytes .../__pycache__/__init__.cpython-311.pyc | Bin 4187 -> 0 bytes .../python/TestsFromDafny_py/Extern.py | 22 -- .../runtimes/python/TestsFromDafny_py/Shim.py | 31 -- .../StandardLibrary_Compile.py | 193 --------- .../StandardLibrary_mUInt_Compile.py | 208 ---------- .../runtimes/python/TestsFromDafny_py/UTF8.py | 118 ------ .../TestsFromDafny_py/Wrappers_Compile.py | 190 --------- .../__pycache__/Extern.cpython-311.pyc | Bin 1354 -> 0 bytes .../ManualTypeConversion.cpython-311.pyc | Bin 503 -> 0 bytes .../__pycache__/Shim.cpython-311.pyc | Bin 2384 -> 0 bytes ...pleBooleanImplTest_Compile.cpython-311.pyc | Bin 7243 -> 0 bytes .../SimpleBooleanImpl_Compile.cpython-311.pyc | Bin 6306 -> 0 bytes ...leTypesBooleanTest_Compile.cpython-311.pyc | Bin 3728 -> 0 bytes .../Wrappers_Compile.cpython-311.pyc | Bin 14810 -> 0 bytes .../__pycache__/_dafny.cpython-311.pyc | Bin 34539 -> 0 bytes .../simple_boolean/__init__.py | 1 - .../__pycache__/__init__.cpython-311.pyc | Bin 250 -> 0 bytes .../__pycache__/client.cpython-311.pyc | Bin 12665 -> 0 bytes .../__pycache__/config.cpython-311.pyc | Bin 1507 -> 0 bytes .../__pycache__/deserialize.cpython-311.pyc | Bin 800 -> 0 bytes .../__pycache__/errors.cpython-311.pyc | Bin 1819 -> 0 bytes .../__pycache__/models.cpython-311.pyc | Bin 5271 -> 0 bytes .../__pycache__/serialize.cpython-311.pyc | Bin 778 -> 0 bytes .../simple_boolean/client.py | 369 ------------------ .../simple_boolean/config.py | 28 -- .../simple_boolean/deserialize.py | 11 - .../simple_boolean/errors.py | 23 -- .../simple_boolean/models.py | 108 ----- .../simple_boolean/serialize.py | 11 - .../{python_client_codegen => }/__init__.py | 0 .../python/python_client_codegen/Iamaredme | 3 - .../python/python_client_codegen/README.md | 3 - .../python_client_codegen/pyproject.toml | 46 --- .../simple_boolean.egg-info/PKG-INFO | 21 - .../simple_boolean.egg-info/SOURCES.txt | 14 - .../simple_boolean.egg-info/requires.txt | 1 - .../simple_boolean.egg-info/top_level.txt | 1 - .../simple_boolean/__init__.py | 1 - .../simple_boolean/client.py | 363 ----------------- .../simple_boolean/config.py | 31 -- .../simple_boolean/deserialize.py | 7 - .../simple_boolean/errors.py | 23 -- .../simple_boolean/models.py | 108 ----- .../simple_boolean/serialize.py | 11 - .../SimpleBoolean/runtimes/python/setup.py | 64 +++ .../src/simpleboolean.egg-info/PKG-INFO | 22 ++ .../src/simpleboolean.egg-info/SOURCES.txt | 19 + .../dependency_links.txt | 0 .../simpleboolean.egg-info/entry_points.txt | 2 + .../src/simpleboolean.egg-info/top_level.txt | 1 + .../python/src/simpleboolean/__init__.py | 1 + .../__pycache__/__init__.cpython-311.pyc | Bin 0 -> 289 bytes .../SimpleBooleanImpl_Compile.py | 32 +- .../simpleboolean/dafny_generated}/System_.py | 0 .../simpleboolean/dafny_generated/__init__.py | 1 + .../__pycache__/__init__.cpython-311.pyc | Bin 0 -> 296 bytes .../simpleboolean/dafny_generated}/_dafny.py | 29 +- .../dafny_generated/dafny_generated.py} | 0 .../simpleboolean/dafny_generated}/module_.py | 4 +- .../dafny_generated/simple/__init__.py | 1 + .../__pycache__/__init__.cpython-311.pyc | Bin 0 -> 302 bytes .../dafny_generated/simple/types/__init__.py | 1 + .../__pycache__/__init__.cpython-311.pyc | Bin 0 -> 310 bytes .../simple/types/boolean/__init__.py | 1 + .../__pycache__/__init__.cpython-311.pyc | Bin 0 -> 324 bytes .../types/boolean/internaldafny/__init__.py | 1 + .../__pycache__/__init__.cpython-311.pyc | Bin 0 -> 351 bytes .../__pycache__/impl.cpython-311.pyc | Bin 0 -> 4164 bytes .../__pycache__/types.cpython-311.pyc | Bin 0 -> 17653 bytes .../types/boolean/internaldafny/impl.py} | 23 +- .../types/boolean/internaldafny/types.py} | 50 ++- .../SimpleBooleanImplTest_Compile.py | 52 ++- .../dafny_generated}/System_.py | 0 .../WrappedSimpleTypesBooleanTest_Compile.py | 17 +- ...pleBooleanImplTest_Compile.cpython-311.pyc | Bin 0 -> 7399 bytes .../__pycache__/System_.cpython-311.pyc | Bin 1361 -> 1364 bytes ...leTypesBooleanTest_Compile.cpython-311.pyc | Bin 0 -> 3753 bytes .../__pycache__/_dafny.cpython-311.pyc | Bin 0 -> 35101 bytes .../dafny_generated.cpython-311.pyc | Bin 0 -> 1227 bytes .../__pycache__/module_.cpython-311.pyc | Bin 6425 -> 6322 bytes .../dafny_generated}/_dafny.py | 29 +- .../dafny_generated/dafny_generated.py} | 8 +- .../dafny_generated}/module_.py | 68 ++-- .../__pycache__/wrapped.cpython-311.pyc | Bin 0 -> 1765 bytes .../types/boolean/internaldafny/wrapped.py} | 9 +- .../SimpleBoolean/smithy-build.json | 2 +- .../SimpleTypes/SimpleBoolean/src/Index.dfy | 2 +- .../SimpleBoolean/src/SimpleBooleanImpl.dfy | 2 +- .../test/SimpleBooleanImplTest.dfy | 2 +- 104 files changed, 308 insertions(+), 2135 deletions(-) delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/Boolean/Types/__pycache__/__init__.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/Boolean/Wrapped/__pycache__/__default.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/Boolean/Wrapped/__pycache__/__init__.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/Boolean/__pycache__/Wrapped.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/Boolean/__pycache__/__init__.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/__pycache__/Boolean.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/__pycache__/__init__.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Extern.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Shim.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/StandardLibrary_Compile.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/StandardLibrary_mUInt_Compile.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/UTF8.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Wrappers_Compile.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/Extern.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/ManualTypeConversion.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/Shim.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/SimpleBooleanImplTest_Compile.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/SimpleBooleanImpl_Compile.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/WrappedSimpleTypesBooleanTest_Compile.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/Wrappers_Compile.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/_dafny.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__init__.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/__init__.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/client.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/config.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/deserialize.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/errors.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/models.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/serialize.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/client.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/config.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/deserialize.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/errors.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/models.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/serialize.py rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{python_client_codegen => }/__init__.py (100%) delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/Iamaredme delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/README.md delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/pyproject.toml delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean.egg-info/PKG-INFO delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean.egg-info/SOURCES.txt delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean.egg-info/requires.txt delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean.egg-info/top_level.txt delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/__init__.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/client.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/config.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/deserialize.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/errors.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/models.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/serialize.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/setup.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean.egg-info/PKG-INFO create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean.egg-info/SOURCES.txt rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{python_client_codegen/simple_boolean.egg-info => src/simpleboolean.egg-info}/dependency_links.txt (100%) create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean.egg-info/entry_points.txt create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean.egg-info/top_level.txt create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/__init__.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/__pycache__/__init__.cpython-311.pyc rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{TestsFromDafny_py => src/simpleboolean/dafny_generated}/SimpleBooleanImpl_Compile.py (63%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{ImplementationFromDafny-py => src/simpleboolean/dafny_generated}/System_.py (100%) create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/__init__.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/__pycache__/__init__.cpython-311.pyc rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{ImplementationFromDafny-py => src/simpleboolean/dafny_generated}/_dafny.py (94%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{ImplementationFromDafny-py/ImplementationFromDafny.py => src/simpleboolean/dafny_generated/dafny_generated.py} (100%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{ImplementationFromDafny-py => src/simpleboolean/dafny_generated}/module_.py (73%) create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/__init__.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/__pycache__/__init__.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/__init__.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/__pycache__/__init__.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/__init__.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/__pycache__/__init__.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/internaldafny/__init__.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/internaldafny/__pycache__/__init__.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/internaldafny/__pycache__/impl.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/internaldafny/__pycache__/types.cpython-311.pyc rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{TestsFromDafny_py/Dafny/Simpletypes/Boolean/__init__.py => src/simpleboolean/dafny_generated/simple/types/boolean/internaldafny/impl.py} (61%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{TestsFromDafny_py/Dafny/Simpletypes/Boolean/Types/__init__.py => src/simpleboolean/dafny_generated/simple/types/boolean/internaldafny/types.py} (57%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{TestsFromDafny_py => test/dafny_generated}/SimpleBooleanImplTest_Compile.py (59%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{TestsFromDafny_py => test/dafny_generated}/System_.py (100%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{TestsFromDafny_py => test/dafny_generated}/WrappedSimpleTypesBooleanTest_Compile.py (66%) create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/__pycache__/SimpleBooleanImplTest_Compile.cpython-311.pyc rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{TestsFromDafny_py => test/dafny_generated}/__pycache__/System_.cpython-311.pyc (63%) create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/__pycache__/WrappedSimpleTypesBooleanTest_Compile.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/__pycache__/_dafny.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/__pycache__/dafny_generated.cpython-311.pyc rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{TestsFromDafny_py => test/dafny_generated}/__pycache__/module_.cpython-311.pyc (58%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{TestsFromDafny_py => test/dafny_generated}/_dafny.py (94%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{TestsFromDafny_py/__init__.py => test/dafny_generated/dafny_generated.py} (57%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{TestsFromDafny_py => test/dafny_generated}/module_.py (73%) create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/simple/types/boolean/internaldafny/__pycache__/wrapped.cpython-311.pyc rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/{TestsFromDafny_py/Dafny/Simpletypes/Boolean/Wrapped/__init__.py => test/dafny_generated/simple/types/boolean/internaldafny/wrapped.py} (53%) diff --git a/TestModels/SharedMakefile.mk b/TestModels/SharedMakefile.mk index 6a129151b2..3e2fc49c9d 100644 --- a/TestModels/SharedMakefile.mk +++ b/TestModels/SharedMakefile.mk @@ -93,6 +93,8 @@ build_implementation: -t:$(TARGET) \ ./src/Index.dfy \ -o $(OUT) \ + --quantifier-syntax:3 \ + --function-syntax:3 \ --optimize-erasable-datatype-wrapper:false \ --library:$(PROJECT_ROOT)/dafny-dependencies/StandardLibrary/src/Index.dfy \ $(patsubst %, -library:$(PROJECT_ROOT)/%/src/Index.dfy, $(LIBRARIES)) @@ -102,6 +104,8 @@ build_test: -t:$(TARGET) \ `find ./test -name '*.dfy'` \ -o $(OUT) \ + --quantifier-syntax:3 \ + --function-syntax:3 \ --optimize-erasable-datatype-wrapper:false \ --library:src/Index.dfy @@ -227,10 +231,11 @@ smithy_dafny_python: gradle build # Smithy outputDirectory can be overridden in smithy-build.json: # https://smithy.io/2.0/guides/building-models/build-config.html#smithy-build-json - # However, outputDirectory is currently bugged, and overrides do not apply: + # However, outputDirectory is currently bugged, and overrides do not apply:sm # https://github.com/awslabs/smithy/issues/1425 # As a workaround, the Make script will move output to the correct directory until #1425 is resolved. - cp -r build/smithyprojections/simple-types-boolean/source/python-client-codegen runtimes/python + mkdir -p runtimes/python/src/smithy_generated + cp -r build/smithyprojections/simple-types-boolean/source/python-client-codegen/. runtimes/python/src/smithy_generated ########################## .NET targets @@ -316,21 +321,48 @@ _clean: # Python Targets +make_python: | build_implementation_python transpile_test_python + +build_python: | build_implementation_python build_test_python + +build_implementation_python: TARGET=py +build_implementation_python: OUT=runtimes/python/src/dafny_generated +build_implementation_python: build_implementation +build_implementation_python: + rm -rf runtimes/python/src/dafny_generated + mv runtimes/python/src/dafny_generated-py runtimes/python/src/dafny_generated + +build_test_python: TARGET=py +build_test_python: OUT=runtimes/python/test/dafny_generated +build_test_python: build_test + transpile_python: | transpile_implementation_python transpile_test_python transpile_implementation_python: TARGET=py -transpile_implementation_python: OUT=runtimes/python/ImplementationFromDafny -transpile_implementation_python: build_implementation +transpile_implementation_python: OUT=runtimes/python/src/dafny_generated +transpile_implementation_python: transpile_implementation +# TODO: Ask Dafny team to not generate -py suffix +# Python modules can't have a hyphen in them +transpile_implementation_python: + rm -rf runtimes/python/src/dafny_generated + mv runtimes/python/src/dafny_generated-py runtimes/python/src/dafny_generated transpile_test_python: TARGET=py -transpile_test_python: OUT=runtimes/python/TestsFromDafny +transpile_test_python: OUT=runtimes/python/test/dafny_generated transpile_test_python: transpile_test +# TODO: Ask Dafny team to not generate -py suffix +# Python modules can't have a hyphen in them +transpile_test_python: + rm -rf runtimes/python/test/dafny_generated + mv runtimes/python/test/dafny_generated-py runtimes/python/test/dafny_generated + # Assumes that implementation was built, and uses the _dafny from that + cp runtimes/python/src/dafny_generated/_dafny.py runtimes/python/test/dafny_generated cleanup_filenames: cd runtimes/Pyt - test_python: - python3 runtimes/python/TestsFromDafny_py/__init__.py +# python -m pip install -e runtimes/python + python runtimes/python/test/dafny_generated/dafny_generated.py clean: _clean diff --git a/TestModels/SimpleTypes/SimpleBoolean/Makefile b/TestModels/SimpleTypes/SimpleBoolean/Makefile index 9eac3ab9be..b525bde181 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/Makefile +++ b/TestModels/SimpleTypes/SimpleBoolean/Makefile @@ -8,7 +8,7 @@ CORES=2 include ../../SharedMakefile.mk -NAMESPACE=simpletypes.boolean +NAMESPACE=simple.types.boolean # This project has no dependencies # DEPENDENT-MODELS:= diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/Extern.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/Extern.py index 09d5af2e5e..cd0a8e6f37 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/Extern.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/Extern.py @@ -19,4 +19,4 @@ def WrappedSimpleBoolean(config): wrapped_client = SimpleBooleanShim(impl) return Wrappers_Compile.Result_Success(wrapped_client) -simple.types.boolean.internaldafny.wrapped.default__.WrappedSimpleBoolean = WrappedSimpleBoolean \ No newline at end of file +# simple.types.boolean.internaldafny.wrapped.default__.WrappedSimpleBoolean = WrappedSimpleBoolean \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/Extern.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/Extern.cpython-311.pyc index e4cb2b262db7fc87e5f471698bc1fd57698d93bc..ea1e6f083db31be33aa0193d015aa0240aa312c3 100644 GIT binary patch delta 106 zcmey*^_!D-IWI340}#Z`XiwQOkyny&&P4Uuo0%9R85tWV$1oMK>Za!>=1e}vl*TAN z*_8Q@;!1`h5uo}aAt3RK!zMRBr8Fniu1FckWd!2lJCj>kuJJLjFj{{A5n#mtY-k)w delta 237 zcmey(`Jan-IWI340}yaEx2J5I$ScWsXQKLShg7jt{w#5jI0$4(KxiOK63&u>v!r3H zcrh4j-gO#a36C*&4uNo7H5@h$eG{QR8M#JpR)nRz9tMR|!i zDT!%$mABZ-ixLY8Qd4emrlh7Nmgbbi$FF245&@c7Bm^XWaoFVMr#>TMgRb5OgxeR diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/module_.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/module_.cpython-311.pyc index a402241675ec4ab015ac10f97b9ac72842f7849c..a9912ad71d8d73ce93bb1fc252e77c9a5a002240 100644 GIT binary patch delta 36 qcmX?Mc-D|>IWI340}zz7Z{*s-$k;S_KVuQAZhC%V&SpcV>0$uIL<;Bt delta 30 kcmX?Wc*2ltIWI340}!+{Z{*s-$XGjhKV#8mGp6Zc0E)p09{>OV diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/__pycache__/client.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/__pycache__/client.cpython-311.pyc index 8387b281a808acf53068287cbf7e42af78120a2b..7239c279594cc145a00c9585e3d6d506385a04df 100644 GIT binary patch delta 242 zcmZ3Md?cA~IWI340}vc)Yfs^`o5&}@_-CT}+JF>>6uun!D0wD^RQ449WsD3AtAQ8- zq7=ZQ0%)R&ObqS}DS|BwDMHJbfa-x5s$MCDZ?g=e2P323<`gDRR>ozM*RdC|>Za!> z=1f-L2xL^)T*TqP%&5D0GxrBZMwiV?c-uJ`!#C@Q9p_>^yZMWP0V|{aW>vLJW=5aQ z{hA(3jN+SbXv;G*X)162r6Pd@Wz^kltd_~l=(TySrUw(F=;mkI^32SBno675^@SKG ZD;j8Wl>#jRIifgzbBF;aVWN7e6cd9xLke39LkjycCI*JpKnwvmCoyej6x{5^?8wL{Jh_KOkC9{YZWg!6@~o0< zyg=Q>iIeSEBP2dBFtR2wLdYT^pm-6;dQG9p8(CLPPGFPc(gt!FLF%tf?qHki_<@Ck R5u_eF`4KGs1&1uyd;s$`H8}tP diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/wrapped.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/wrapped.py index e5749eab21..0240b759f9 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/wrapped.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/wrapped.py @@ -9,6 +9,7 @@ import SimpleBooleanImplTest_Compile import simple.types.boolean.internaldafny.types assert "simple.types.boolean.internaldafny.wrapped" == __name__ +import Extern class default__: def __init__(self): @@ -19,4 +20,5 @@ def __dafnystr__(self) -> str: @staticmethod def WrappedDefaultSimpleBooleanConfig(): return simple.types.boolean.internaldafny.types.SimpleBooleanConfig_SimpleBooleanConfig() + WrappedSimpleBoolean = Extern.WrappedSimpleBoolean diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/Boolean/Types/__pycache__/__init__.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/Boolean/Types/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index 4be80fc8bb7c2e8390395bba52b713f42ce6b61b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 17101 zcmdU0Uu+adn(v-}9{;0_4VXVkY%n31WKFV5)-lO}SzrllGG5kBum?_Lr!T3RX6X&>$l&OAhUy6^j{ zr`=uCgPmaZvOP23RM+3Hs=oTwud2HLt+lmDf@@*&nD$hsB>gwuRIg^ovHV_0l0K9) zNt1I@68}RvIUh=f^5JASA4x{?(PUIc|8OprZ%8(fJCcj%8>;t5Fc zq(5GAJB2(2AzeDSA+K(2=Nj5*2c_Eu>3W=WyS1m+knRaew+GTaBWUuZCJ#%!d;bT! zHPIWf<404uTxv3>+u0wR2D%}9TPu$qah!%pnhxJ${qD8Jok_~#C?m}R(5g~4) z76VNi>QKU`Y7}C1 zVDw`kehZ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WdeL0%dso_G`oDLj9j5>LrLwwJy=QH z9+&aC>0pUvr(`VKjZ?Sm!maYHviYN7^UQg3B5l5@nQ!Qo{*2Y12`CaDLyF5m5{pbz zk#1lF)b4Dz$t&Xa{e)0Og>-&~QZ*Bf8 he5>W-E0yhstnG)y)L>T#Ji!t>d4xJSC=S8s{{eH<`LO^1 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/Boolean/Wrapped/__pycache__/__default.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/Boolean/Wrapped/__pycache__/__default.cpython-311.pyc deleted file mode 100644 index a2fe92d0f8f073f08fbbbd4f8c359f2945cd01bf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1279 zcmah|&1=+95T9f>*^lhDU9AQ2TZ*z4H&E~<;@Tp3u!pvO5DFn~-nP4a*@TxYl7n;) z{tvzCrBds^;XO*k@IVked0VModh)%u$=1b+lgZ3)CNsm#yq7oCY8e>)n$hixGQc-( zWW;Pihi{qM1siM$gTb|oB}X=7CuiiGypeYlLy@>YhgGLw6a>!WqEj+T0!z4TltsQ~ zXhK(viqKV~D)f{wE%Xf2%1bb6sD`Gyr_v6fdwPs!$LLIk%vy$QX$|V?cW$oK^R&2R zVQf9ah~}ETkQUZM4?VUBEw5M(ve)|_Msa-X)Q0p5UWbo)F9PkiCrBRv!l^gb;o)eBRIH zqu2T)9}!>2{g%_R-JZUT{O!Q?^yeHwpI-7bYCL#RVO!GMw znHazqZ6?;v$J%_X-T17ne$-Y!ZM^ufu@i6XMB3^PfJ#&TDdZ49Y08Hz3+i(;=Z8L3 zSr?t&CgDd+_~{ab3zZ3)cdTHG6gVt(0z?9KEIui6yWqHXA0v~hrY#Pzuon6Oa!h(* zqSpuPRQVRnCD-vf?8;se8)%Gz#0DDa1{z|cq{7QD{5vY$NMpPwu?|vYX=F;YmPXLh zIAk9P|G^0V^NxzQN4?)6SDDGLg8!b0VNQ~y1j+;PBycPGA15#uO>zR~qDlS=Qv>lN zP#uUTIrhv)ka7aoqKp$*j4~b;C8;S7;SZ_8vh-9MC^6JxI2*&27#3o<8wnO;{sv0a BU_$@^ diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/Boolean/Wrapped/__pycache__/__init__.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/Boolean/Wrapped/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index 547a1e96a090bf6324e293e26c56a94b5215461b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1892 zcmah}&2Jk;6o0ecuQ+x#32mT)ibjek2H};EsDy-&AQlJ^Igk*N71C!zz02%c z$QB0+<-mUsxb=VvRWJM*98F~jYfh062gD^+IQ7K5@vf7!X)`nX=FOXV^YMPax4%@Y zWsv2&+YS1Y2JjaSilXPr$?sA*1PYXd;9;+YB+@)BDtVl{41)GjXhxQ2DP0fk zXwI8cItj~OS^3X<^Qy0S71dY0s_GX!hZ<~gU)}*A)joyq34_j3egj~O*9sMw(^)PC zofittzfx!#d<@h)0BYTnyFE}l;+%Jtl1-@D|KMPwrVD#L2*coZ$VBObZeLhi{e*1? zT$DG0h|#TH60#Z*Mk|bCj!HA`b+f^0BWQK|_04u9=QHV&)<2BnkOkfPS3F1(Mw@s* zQHtYFZb{1_Fz^TkPov}jyb{%z-qL94K=%x0QvCq#$yE;uU+^qy$Sa#-jLvM|m{K4@n{c0O+?PV=DGOUEF1YdduKQ)mc=N#9jU zzJrRATlnTta(%zuZOa$clfJNv!C-mz(t2S-7NnLGLzvi=AM_Kcf-pJDdc6DGcp%=| z#^CKsA@kScC~1eR?&rtzsyu@)NHL8eU&J#jzE2VTG~>QMSUG#uQ#%qdwWW~Pb=F7D zI!C%bMGA%67jothGAWDFnc>?hr~@5btIFLXCkun>&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z^DrEaM6RLd_&U#zufie+9iT&=s8jdaz0`Sr_*#AxQ&J7e6zW{ptG3aw5Qo_QtWmW5 z8H#0-B_Ph}93FoG0cx40>eL2@aGP8NidC6!>>C1Iiz2{qb=m+r(Q_<{a{8D=ASK8* zg$Jc$g8dm#6673`1E9$A%rS{ThA5e1QIO}6W&UXbhI@Ah1Wxq@Lvc#*i&~g}PTmL7 zkCjzZ!NMAkHYl*X&<;_d=t8bd(l=nsA5F<&O7k^0lwi5qTa!^xMCAch?_kD&)P*I$ z|FUy0IxNWl3op+9dT{31VxbSTW=@MWNb(CPTA1Xo_0(%zwr3R1oqQd5A)x{c+u%}B z3C%(($jjTl6k@0Qxaz}XB~$cy`Wk}Q5%9coF`g9sOT`(qAxCC&*Zm8}8LX|>2a0$; z*DpW>2lH5me5X!(YR*%C?x~AM>YYRN&VhQ@Q}6atcYR%*P6+tLTvuNKg7@%U;YIq| zkMspgq88T@ruDP6=|<%MiiZ*|kFS0R5)R6bK-%JN!c{|FScmrKt(}PT?h0*iLSDr4 zBf}Qr*@CAQECv)eq&WmX1pxUU)yERlbeL58{EE)T4E;^L#4oKw6@aBWZhXbR~$fzmEN7?Ca^v-t@JD>36*8cMei3UTUS6 zTItWsb;rKRT<|iNzuY;kU-^FsWK}w<#tn zHd1z>Ou)YyhoX0|WKe0C;@=@zas%#>W>sg;|2M>A*!LRlAvxHHYd74@8N@rAz7;dI zf5GO(h^ui(zdxjweSuc!P1qGf(D^06M``*CWCEB>C$8_F;0d7ry=ZSN`_imnm=l&5rDm36IPk uOH%?=$7jKVpLuhayt%i$xg~FI?J076KVVy!62Kpx1;{sre8aQcL;edBhNPYV diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/__pycache__/Boolean.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/__pycache__/Boolean.cpython-311.pyc deleted file mode 100644 index 111512d87bdeff12096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H;gDrnDB?l?Z)7(gcoNm0l%2*>PtZI`n@MSPhSV2 zzFhGzqrZ2nG*AA!Oa;M)qOf0*JYr6EuRdCAM9OGrHh9?KKR{2@=U9}1W!C-?v8 zlN1;X#DqLGAOOO-fWWC9+*f6BQe) zI8Y|w&x}pcJ6PPWG)(dCkSx9q_eis*vuFPa;xX)b4fl{7Y{a!2>}C(+olW10nA*Ew z^J2u+IHKPl5=)*y%k(DfiXmwK8sH!%2tuDEJN)UBH+#=}`(&mUef#8mFZwzRKG-^nFZP1BKmXD{-uWWo&cEJ~T{7X4*?}}A rKy`c?eD(`>?vgwAhC5eu=T@H}$9F@vg((62;c0+;Q^+?u%RS^r-)EqE diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/__pycache__/__init__.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index ba13d403f508ef1f842c4a2486350934eec0e533..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4187 zcmb7H&2JmW6`x)1E-8xSQlcV9vTCdOawylL(;z5hD*_rBHr&)oA}NluD6nC{$NAJodS-OeuG zyqS43`}TeO-twR6bdo^(dvf0RBu>b;I0%~TGe?sGA@_(u48bBA_M#6v{+Tr zq^hjR0?x-Qr5e}boR_RbbwnHCykI4@B;P-(jq*OFr3~3ntaLS_WqcV`%ks4`ZH)Kh z+PD!nb6Xbe-=zqnF!P~b5j9J%xvX_V4zP1oJejEBe6@2k>l%?aJ`ZVBr9hE z?tYArhw$^7_98zc31^Jn2R$BgU2sjCGK4jfPkoPrmAu3f%SFp7{?Rg7?6m@$(Kwy$>S{pVhHT%=w z3Ln}gwF_3WR4p0xTH%^$Z#nfw;qyA(YFNdRS!mR)?P{GiHVf;f?cAyxrezmA1-Mgu z-ZxEwg4fDb(=If&olQ6pH`&)|y~}^vv%t=N2u9-J0iiiK#lD+jbUbR1=Ne<0-y>}SA_O?EVT4f3*#`ne1LZ}EVodRTZ{z0KSx+^k zC=?*)?Ng0I}HTXnL6K{xSQ$1^`uUSgIuTo0`vdHzJrGMTSW@F09i>TT(1E7 zdhLJ8BJk|PFz=!{wIe#&;4DHaBLTn1kvheXUt4nYK;G;4mih0Ar(`?RgTgxF1Xu)nM5hrsGe%*K`_9hpIR| z;^(ujv*b{Mo`bc#j9TYT^ZfA8vmj&t2?%7^ z+!c53=Hc822Xh~Mz50>6T5?yn+||#1AY@Hg7JtOV{p`A%UGK{MvB|E|S6}F+y;uwV2+D*Ri!Oxt zCl%%67PujG>mNj0cZXmee!){Ulx zJmmIg&7$S4P)uDGgFL5bH+mikTA3vpvp`FG>S~{V7xu3u-jmps?}+dtw%fEnsb&UVtN?3CRJZd6qi?u-xpe@h~aE@_@(M zh!_A}SOUB^LqL1x!+iXodp`c_{xeTk3uB-)d0ed_$j_l_0mxtNsaLsfPZ*p7>MFi-B@28?V=0wi1uCitv}G^k8|8VbU;%@nBb<=UqdqmE*@QvAH3 z7&=U<7M)FsK*dJN4wMP_H)B(b4i@(-4O6^tNETm%??|(%Ge1?I{%6RG8y+J(JkY+u zdG;{l*~HC=v%ODjUXHjSPgwY;#G3t={wQKAG%A z?>;%(i{6h&ro*p3Nq6|wAI{`@By#u3Y%jQ@{Fxr{??>^M_BIdV^S$8i&z%3qyI&^U znKwGJOU7I>HIQ-w)W;{u7q7b07v1SM-RT8)dgU=n{4f-o%Lxz>PZE^Nq1?$;9wR>k DwKt;1 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Extern.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Extern.py deleted file mode 100644 index 7919c9c3a0..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Extern.py +++ /dev/null @@ -1,22 +0,0 @@ -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count - -import module_ -import _dafny -import System_ -import SimpleBooleanImplTest_Compile -import Dafny.Simpletypes.Boolean.Types -from simple_boolean.client import SimpleBoolean -from Shim import SimpleBooleanShim -import Wrappers_Compile - -@staticmethod -def WrappedSimpleBoolean(config): - wrapped_config = config - impl = SimpleBoolean(wrapped_config) - wrapped_client = SimpleBooleanShim(impl) - return Wrappers_Compile.Result_Success(wrapped_client) - -Dafny.Simpletypes.Boolean.Wrapped.default__.WrappedSimpleBoolean = WrappedSimpleBoolean \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Shim.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Shim.py deleted file mode 100644 index adbdae275a..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Shim.py +++ /dev/null @@ -1,31 +0,0 @@ -# TODO generate this - -import Dafny.Simpletypes.Boolean.Types -import simple_boolean.client as SimpleBoolean -import Wrappers_Compile -import asyncio -from simple_boolean.models import GetBooleanInput - -class SimpleBooleanShim(Dafny.Simpletypes.Boolean.Types.ISimpleBooleanClient): - def __init__(self, _impl: SimpleBoolean) : - self._impl = _impl - - def GetBoolean(self, input: Dafny.Simpletypes.Boolean.Types.GetBooleanInput_GetBooleanInput) -> Dafny.Simpletypes.Boolean.Types.GetBooleanOutput_GetBooleanOutput: - ''' - unwrapped_request = TypeConversion.ToNative(input) - try: - wrapped_response = self._impl.get_boolean(unwrapped_request) - return Wrappers_Compile.Result_Success(wrapped_response) - catch ex: - return Wrappers_Compile.Result_Failure(ex) - ''' - - print(f"this is input.value {input.value}") - unwrapped_request: GetBooleanInput = GetBooleanInput(value=input.value) - print(f"this is unwrapped_request {unwrapped_request}") - wrapped_response = asyncio.run(self._impl.get_boolean(unwrapped_request)) - print(f"this is wrapped_response {wrapped_response}") - return Wrappers_Compile.Result_Success(wrapped_response) - - - \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/StandardLibrary_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/StandardLibrary_Compile.py deleted file mode 100644 index 913ac8feb4..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/StandardLibrary_Compile.py +++ /dev/null @@ -1,193 +0,0 @@ -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count - -import module_ -import _dafny -import System_ -import Wrappers_Compile -import StandardLibrary_mUInt_Compile - -assert "StandardLibrary_Compile" == __name__ -StandardLibrary_Compile = sys.modules[__name__] - -class default__: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "StandardLibrary_Compile._default" - @staticmethod - def Join(ss, joiner): - d_50___accumulator_ = _dafny.Seq([]) - while True: - with _dafny.label(): - if (len(ss)) == (1): - return (d_50___accumulator_) + ((ss)[0]) - elif True: - d_50___accumulator_ = (d_50___accumulator_) + (((ss)[0]) + (joiner)) - in0_ = _dafny.Seq((ss)[1::]) - in1_ = joiner - ss = in0_ - joiner = in1_ - raise _dafny.TailCall() - break - - @staticmethod - def Split(s, delim): - d_51___accumulator_ = _dafny.Seq([]) - while True: - with _dafny.label(): - d_52_i_ = StandardLibrary_Compile.default__.FindIndexMatching(s, delim, 0) - if (d_52_i_).is_Some: - d_51___accumulator_ = (d_51___accumulator_) + (_dafny.Seq([_dafny.Seq((s)[:(d_52_i_).value:])])) - in2_ = _dafny.Seq((s)[((d_52_i_).value) + (1)::]) - in3_ = delim - s = in2_ - delim = in3_ - raise _dafny.TailCall() - elif True: - return (d_51___accumulator_) + (_dafny.Seq([s])) - break - - @staticmethod - def SplitOnce(s, delim): - d_53_i_ = StandardLibrary_Compile.default__.FindIndexMatching(s, delim, 0) - return (_dafny.Seq((s)[:(d_53_i_).value:]), _dafny.Seq((s)[((d_53_i_).value) + (1)::])) - - @staticmethod - def SplitOnce_q(s, delim): - d_54_valueOrError0_ = StandardLibrary_Compile.default__.FindIndexMatching(s, delim, 0) - if (d_54_valueOrError0_).IsFailure(): - return (d_54_valueOrError0_).PropagateFailure() - elif True: - d_55_i_ = (d_54_valueOrError0_).Extract() - return Wrappers_Compile.Option_Some((_dafny.Seq((s)[:d_55_i_:]), _dafny.Seq((s)[(d_55_i_) + (1)::]))) - - @staticmethod - def FindIndexMatching(s, c, i): - def lambda0_(d_56_c_): - def lambda1_(d_57_x_): - return (d_57_x_) == (d_56_c_) - - return lambda1_ - - return StandardLibrary_Compile.default__.FindIndex(s, lambda0_(c), i) - - @staticmethod - def FindIndex(s, f, i): - while True: - with _dafny.label(): - if (i) == (len(s)): - return Wrappers_Compile.Option_None() - elif f((s)[i]): - return Wrappers_Compile.Option_Some(i) - elif True: - in4_ = s - in5_ = f - in6_ = (i) + (1) - s = in4_ - f = in5_ - i = in6_ - raise _dafny.TailCall() - break - - @staticmethod - def Filter(s, f): - d_58___accumulator_ = _dafny.Seq([]) - while True: - with _dafny.label(): - if (len(s)) == (0): - return (d_58___accumulator_) + (_dafny.Seq([])) - elif f((s)[0]): - d_58___accumulator_ = (d_58___accumulator_) + (_dafny.Seq([(s)[0]])) - in7_ = _dafny.Seq((s)[1::]) - in8_ = f - s = in7_ - f = in8_ - raise _dafny.TailCall() - elif True: - in9_ = _dafny.Seq((s)[1::]) - in10_ = f - s = in9_ - f = in10_ - raise _dafny.TailCall() - break - - @staticmethod - def Min(a, b): - if (a) < (b): - return a - elif True: - return b - - @staticmethod - def Fill(value, n): - return _dafny.Seq([value for d_59___v0_ in range(n)]) - - @staticmethod - def SeqToArray(s): - a: _dafny.Array = _dafny.Array(None, 0) - nw0_ = _dafny.Array(None, len(s)) - def lambda2_(d_60_s_): - def lambda3_(d_61_i_): - return (d_60_s_)[d_61_i_] - - return lambda3_ - - arrayinit0_ = lambda2_(s) - for arrayinit_00_ in range(nw0_.length(0)): - nw0_[arrayinit_00_] = arrayinit0_(arrayinit_00_) - a = nw0_ - return a - - @staticmethod - def LexicographicLessOrEqual(a, b, less): - def lambda4_(exists_var_0_): - d_62_k_: int = exists_var_0_ - return (((0) <= (d_62_k_)) and ((d_62_k_) <= (len(a)))) and (StandardLibrary_Compile.default__.LexicographicLessOrEqualAux(a, b, less, d_62_k_)) - - return _dafny.quantifier(_dafny.IntegerRange(0, (len(a)) + (1)), False, lambda4_) - - @staticmethod - def LexicographicLessOrEqualAux(a, b, less, lengthOfCommonPrefix): - def lambda5_(forall_var_0_): - d_63_i_: int = forall_var_0_ - return not (((0) <= (d_63_i_)) and ((d_63_i_) < (lengthOfCommonPrefix))) or (((a)[d_63_i_]) == ((b)[d_63_i_])) - - return (((lengthOfCommonPrefix) <= (len(b))) and (_dafny.quantifier(_dafny.IntegerRange(0, lengthOfCommonPrefix), True, lambda5_))) and (((lengthOfCommonPrefix) == (len(a))) or (((lengthOfCommonPrefix) < (len(b))) and (less((a)[lengthOfCommonPrefix], (b)[lengthOfCommonPrefix])))) - - @staticmethod - def SetToOrderedSequence(s, less): - d_64___accumulator_ = _dafny.Seq([]) - while True: - with _dafny.label(): - pat_let_tv0_ = s - pat_let_tv1_ = less - if (s) == (_dafny.Set({})): - return (d_64___accumulator_) + (_dafny.Seq([])) - elif True: - def iife0_(_let_dummy_0): - d_65_a_: _dafny.Seq = None - with _dafny.label("_ASSIGN_SUCH_THAT_d_0"): - assign_such_that_0_: _dafny.Seq - for assign_such_that_0_ in (s).Elements: - d_65_a_ = assign_such_that_0_ - if ((d_65_a_) in (s)) and (StandardLibrary_Compile.default__.IsMinimum(d_65_a_, s, less)): - raise _dafny.Break("_ASSIGN_SUCH_THAT_d_0") - raise Exception("assign-such-that search produced no value (line 369)") - pass - return (_dafny.Seq([d_65_a_])) + (StandardLibrary_Compile.default__.SetToOrderedSequence((pat_let_tv0_) - (_dafny.Set({d_65_a_})), pat_let_tv1_)) - return iife0_(0) - - break - - @staticmethod - def IsMinimum(a, s, less): - def lambda6_(forall_var_1_): - d_66_z_: _dafny.Seq = forall_var_1_ - return not ((d_66_z_) in (s)) or (StandardLibrary_Compile.default__.LexicographicLessOrEqual(a, d_66_z_, less)) - - return ((a) in (s)) and (_dafny.quantifier((s).Elements, True, lambda6_)) - diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/StandardLibrary_mUInt_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/StandardLibrary_mUInt_Compile.py deleted file mode 100644 index cd6f10f64a..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/StandardLibrary_mUInt_Compile.py +++ /dev/null @@ -1,208 +0,0 @@ -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count - -import module_ -import _dafny -import System_ -import Wrappers_Compile - -assert "StandardLibrary_mUInt_Compile" == __name__ -StandardLibrary_mUInt_Compile = sys.modules[__name__] - -class uint8: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "" - @staticmethod - def default(): - return int(0) - -class uint16: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "" - @staticmethod - def default(): - return int(0) - -class uint32: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "" - @staticmethod - def default(): - return int(0) - -class uint64: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "" - @staticmethod - def default(): - return int(0) - -class int32: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "" - @staticmethod - def default(): - return int(0) - -class int64: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "" - @staticmethod - def default(): - return int(0) - -class posInt64: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "" - @staticmethod - def default(): - return 1 - -class seq16: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "" - @staticmethod - def default(): - return _dafny.Seq({}) - -class seq32: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "" - @staticmethod - def default(): - return _dafny.Seq({}) - -class seq64: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "" - @staticmethod - def default(): - return _dafny.Seq({}) - -class default__: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "StandardLibrary.StandardLibrary_mUInt_Compile._default" - @staticmethod - def UInt8Less(a, b): - return (a) < (b) - - @staticmethod - def HasUint16Len(s): - return (len(s)) < ((StandardLibrary_mUInt_Compile.default__).UINT16__LIMIT) - - @staticmethod - def HasUint32Len(s): - return (len(s)) < ((StandardLibrary_mUInt_Compile.default__).UINT32__LIMIT) - - @staticmethod - def HasUint64Len(s): - return (len(s)) < ((StandardLibrary_mUInt_Compile.default__).UINT64__LIMIT) - - @staticmethod - def UInt16ToSeq(x): - d_16_b0_ = _dafny.euclidian_division(x, 256) - d_17_b1_ = _dafny.euclidian_modulus(x, 256) - return _dafny.Seq([d_16_b0_, d_17_b1_]) - - @staticmethod - def SeqToUInt16(s): - d_18_x0_ = ((s)[0]) * (256) - return (d_18_x0_) + ((s)[1]) - - @staticmethod - def UInt32ToSeq(x): - d_19_b0_ = _dafny.euclidian_division(x, 16777216) - d_20_x0_ = (x) - ((d_19_b0_) * (16777216)) - d_21_b1_ = _dafny.euclidian_division(d_20_x0_, 65536) - d_22_x1_ = (d_20_x0_) - ((d_21_b1_) * (65536)) - d_23_b2_ = _dafny.euclidian_division(d_22_x1_, 256) - d_24_b3_ = _dafny.euclidian_modulus(d_22_x1_, 256) - return _dafny.Seq([d_19_b0_, d_21_b1_, d_23_b2_, d_24_b3_]) - - @staticmethod - def SeqToUInt32(s): - d_25_x0_ = ((s)[0]) * (16777216) - d_26_x1_ = (d_25_x0_) + (((s)[1]) * (65536)) - d_27_x2_ = (d_26_x1_) + (((s)[2]) * (256)) - return (d_27_x2_) + ((s)[3]) - - @staticmethod - def UInt64ToSeq(x): - d_28_b0_ = _dafny.euclidian_division(x, 72057594037927936) - d_29_x0_ = (x) - ((d_28_b0_) * (72057594037927936)) - d_30_b1_ = _dafny.euclidian_division(d_29_x0_, 281474976710656) - d_31_x1_ = (d_29_x0_) - ((d_30_b1_) * (281474976710656)) - d_32_b2_ = _dafny.euclidian_division(d_31_x1_, 1099511627776) - d_33_x2_ = (d_31_x1_) - ((d_32_b2_) * (1099511627776)) - d_34_b3_ = _dafny.euclidian_division(d_33_x2_, 4294967296) - d_35_x3_ = (d_33_x2_) - ((d_34_b3_) * (4294967296)) - d_36_b4_ = _dafny.euclidian_division(d_35_x3_, 16777216) - d_37_x4_ = (d_35_x3_) - ((d_36_b4_) * (16777216)) - d_38_b5_ = _dafny.euclidian_division(d_37_x4_, 65536) - d_39_x5_ = (d_37_x4_) - ((d_38_b5_) * (65536)) - d_40_b6_ = _dafny.euclidian_division(d_39_x5_, 256) - d_41_b7_ = _dafny.euclidian_modulus(d_39_x5_, 256) - return _dafny.Seq([d_28_b0_, d_30_b1_, d_32_b2_, d_34_b3_, d_36_b4_, d_38_b5_, d_40_b6_, d_41_b7_]) - - @staticmethod - def SeqToUInt64(s): - d_42_x0_ = ((s)[0]) * (72057594037927936) - d_43_x1_ = (d_42_x0_) + (((s)[1]) * (281474976710656)) - d_44_x2_ = (d_43_x1_) + (((s)[2]) * (1099511627776)) - d_45_x3_ = (d_44_x2_) + (((s)[3]) * (4294967296)) - d_46_x4_ = (d_45_x3_) + (((s)[4]) * (16777216)) - d_47_x5_ = (d_46_x4_) + (((s)[5]) * (65536)) - d_48_x6_ = (d_47_x5_) + (((s)[6]) * (256)) - d_49_x_ = (d_48_x6_) + ((s)[7]) - return d_49_x_ - - @_dafny.classproperty - def UINT16__LIMIT(instance): - return 65536 - @_dafny.classproperty - def UINT32__LIMIT(instance): - return 4294967296 - @_dafny.classproperty - def UINT64__LIMIT(instance): - return 18446744073709551616 - @_dafny.classproperty - def INT32__MAX__LIMIT(instance): - return 2147483648 - @_dafny.classproperty - def INT64__MAX__LIMIT(instance): - return 9223372036854775808 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/UTF8.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/UTF8.py deleted file mode 100644 index 45e3b8b7a5..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/UTF8.py +++ /dev/null @@ -1,118 +0,0 @@ -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count - -import module_ -import _dafny -import System_ -import Wrappers_Compile -import StandardLibrary_mUInt_Compile -import StandardLibrary_Compile - -assert "UTF8" == __name__ -UTF8 = sys.modules[__name__] - -class ValidUTF8Bytes: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "" - @staticmethod - def default(): - return _dafny.Seq([]) - -class default__: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "UTF8_Compile._default" - @staticmethod - def IsASCIIString(s): - def lambda7_(forall_var_2_): - d_67_i_: int = forall_var_2_ - return not (((0) <= (d_67_i_)) and ((d_67_i_) < (len(s)))) or ((ord((s)[d_67_i_])) < (128)) - - return _dafny.quantifier(_dafny.IntegerRange(0, len(s)), True, lambda7_) - - @staticmethod - def EncodeAscii(s): - d_68___accumulator_ = _dafny.Seq([]) - while True: - with _dafny.label(): - if (len(s)) == (0): - return (d_68___accumulator_) + (_dafny.Seq([])) - elif True: - d_69_x_ = _dafny.Seq([ord((s)[0])]) - d_68___accumulator_ = (d_68___accumulator_) + (d_69_x_) - in11_ = _dafny.Seq((s)[1::]) - s = in11_ - raise _dafny.TailCall() - break - - @staticmethod - def Uses1Byte(s): - return ((0) <= ((s)[0])) and (((s)[0]) <= (127)) - - @staticmethod - def Uses2Bytes(s): - return (((194) <= ((s)[0])) and (((s)[0]) <= (223))) and (((128) <= ((s)[1])) and (((s)[1]) <= (191))) - - @staticmethod - def Uses3Bytes(s): - return (((((((s)[0]) == (224)) and (((160) <= ((s)[1])) and (((s)[1]) <= (191)))) and (((128) <= ((s)[2])) and (((s)[2]) <= (191)))) or (((((225) <= ((s)[0])) and (((s)[0]) <= (236))) and (((128) <= ((s)[1])) and (((s)[1]) <= (191)))) and (((128) <= ((s)[2])) and (((s)[2]) <= (191))))) or (((((s)[0]) == (237)) and (((128) <= ((s)[1])) and (((s)[1]) <= (159)))) and (((128) <= ((s)[2])) and (((s)[2]) <= (191))))) or (((((238) <= ((s)[0])) and (((s)[0]) <= (239))) and (((128) <= ((s)[1])) and (((s)[1]) <= (191)))) and (((128) <= ((s)[2])) and (((s)[2]) <= (191)))) - - @staticmethod - def Uses4Bytes(s): - return (((((((s)[0]) == (240)) and (((144) <= ((s)[1])) and (((s)[1]) <= (191)))) and (((128) <= ((s)[2])) and (((s)[2]) <= (191)))) and (((128) <= ((s)[3])) and (((s)[3]) <= (191)))) or ((((((241) <= ((s)[0])) and (((s)[0]) <= (243))) and (((128) <= ((s)[1])) and (((s)[1]) <= (191)))) and (((128) <= ((s)[2])) and (((s)[2]) <= (191)))) and (((128) <= ((s)[3])) and (((s)[3]) <= (191))))) or ((((((s)[0]) == (244)) and (((128) <= ((s)[1])) and (((s)[1]) <= (143)))) and (((128) <= ((s)[2])) and (((s)[2]) <= (191)))) and (((128) <= ((s)[3])) and (((s)[3]) <= (191)))) - - @staticmethod - def ValidUTF8Range(a, lo, hi): - while True: - with _dafny.label(): - if (lo) == (hi): - return True - elif True: - d_70_r_ = _dafny.Seq((a)[lo:hi:]) - if UTF8.default__.Uses1Byte(d_70_r_): - in12_ = a - in13_ = (lo) + (1) - in14_ = hi - a = in12_ - lo = in13_ - hi = in14_ - raise _dafny.TailCall() - elif ((2) <= (len(d_70_r_))) and (UTF8.default__.Uses2Bytes(d_70_r_)): - in15_ = a - in16_ = (lo) + (2) - in17_ = hi - a = in15_ - lo = in16_ - hi = in17_ - raise _dafny.TailCall() - elif ((3) <= (len(d_70_r_))) and (UTF8.default__.Uses3Bytes(d_70_r_)): - in18_ = a - in19_ = (lo) + (3) - in20_ = hi - a = in18_ - lo = in19_ - hi = in20_ - raise _dafny.TailCall() - elif ((4) <= (len(d_70_r_))) and (UTF8.default__.Uses4Bytes(d_70_r_)): - in21_ = a - in22_ = (lo) + (4) - in23_ = hi - a = in21_ - lo = in22_ - hi = in23_ - raise _dafny.TailCall() - elif True: - return False - break - - @staticmethod - def ValidUTF8Seq(s): - return UTF8.default__.ValidUTF8Range(s, 0, len(s)) - diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Wrappers_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Wrappers_Compile.py deleted file mode 100644 index ddde85ac6b..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Wrappers_Compile.py +++ /dev/null @@ -1,190 +0,0 @@ -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count - -import module_ -import _dafny -import System_ - -assert "Wrappers_Compile" == __name__ -Wrappers_Compile = sys.modules[__name__] - -class Option: - @classmethod - def default(cls, ): - return lambda: Option_None() - def __ne__(self, __o: object) -> bool: - return not self.__eq__(__o) - @property - def is_None(self) -> bool: - return isinstance(self, Wrappers_Compile.Option_None) - @property - def is_Some(self) -> bool: - return isinstance(self, Wrappers_Compile.Option_Some) - def ToResult(self): - source0_ = self - if source0_.is_None: - return Wrappers_Compile.Result_Failure(_dafny.Seq("Option is None")) - elif True: - d_0___mcc_h0_ = source0_.value - d_1_v_ = d_0___mcc_h0_ - return Wrappers_Compile.Result_Success(d_1_v_) - - def UnwrapOr(self, default): - source1_ = self - if source1_.is_None: - return default - elif True: - d_2___mcc_h0_ = source1_.value - d_3_v_ = d_2___mcc_h0_ - return d_3_v_ - - def IsFailure(self): - return (self).is_None - - def PropagateFailure(self): - return Wrappers_Compile.Option_None() - - def Extract(self): - return (self).value - - -class Option_None(Option, NamedTuple('None_', [])): - def __dafnystr__(self) -> str: - return f'Wrappers_Compile.Option.None' - def __eq__(self, __o: object) -> bool: - return isinstance(__o, Wrappers_Compile.Option_None) - def __hash__(self) -> int: - return super().__hash__() - -class Option_Some(Option, NamedTuple('Some', [('value', Any)])): - def __dafnystr__(self) -> str: - return f'Wrappers_Compile.Option.Some({_dafny.string_of(self.value)})' - def __eq__(self, __o: object) -> bool: - return isinstance(__o, Wrappers_Compile.Option_Some) and self.value == __o.value - def __hash__(self) -> int: - return super().__hash__() - - -class Result: - @classmethod - def default(cls, default_T): - return lambda: Result_Success(default_T()) - def __ne__(self, __o: object) -> bool: - return not self.__eq__(__o) - @property - def is_Success(self) -> bool: - return isinstance(self, Wrappers_Compile.Result_Success) - @property - def is_Failure(self) -> bool: - return isinstance(self, Wrappers_Compile.Result_Failure) - def ToOption(self): - source2_ = self - if source2_.is_Success: - d_4___mcc_h0_ = source2_.value - d_5_s_ = d_4___mcc_h0_ - return Wrappers_Compile.Option_Some(d_5_s_) - elif True: - d_6___mcc_h1_ = source2_.error - d_7_e_ = d_6___mcc_h1_ - return Wrappers_Compile.Option_None() - - def UnwrapOr(self, default): - source3_ = self - if source3_.is_Success: - d_8___mcc_h0_ = source3_.value - d_9_s_ = d_8___mcc_h0_ - return d_9_s_ - elif True: - d_10___mcc_h1_ = source3_.error - d_11_e_ = d_10___mcc_h1_ - return default - - def IsFailure(self): - return (self).is_Failure - - def PropagateFailure(self): - return Wrappers_Compile.Result_Failure((self).error) - - def MapFailure(self, reWrap): - source4_ = self - if source4_.is_Success: - d_12___mcc_h0_ = source4_.value - d_13_s_ = d_12___mcc_h0_ - return Wrappers_Compile.Result_Success(d_13_s_) - elif True: - d_14___mcc_h1_ = source4_.error - d_15_e_ = d_14___mcc_h1_ - return Wrappers_Compile.Result_Failure(reWrap(d_15_e_)) - - def Extract(self): - return (self).value - - -class Result_Success(Result, NamedTuple('Success', [('value', Any)])): - def __dafnystr__(self) -> str: - return f'Wrappers_Compile.Result.Success({_dafny.string_of(self.value)})' - def __eq__(self, __o: object) -> bool: - return isinstance(__o, Wrappers_Compile.Result_Success) and self.value == __o.value - def __hash__(self) -> int: - return super().__hash__() - -class Result_Failure(Result, NamedTuple('Failure', [('error', Any)])): - def __dafnystr__(self) -> str: - return f'Wrappers_Compile.Result.Failure({_dafny.string_of(self.error)})' - def __eq__(self, __o: object) -> bool: - return isinstance(__o, Wrappers_Compile.Result_Failure) and self.error == __o.error - def __hash__(self) -> int: - return super().__hash__() - - -class Outcome: - @classmethod - def default(cls, ): - return lambda: Outcome_Pass() - def __ne__(self, __o: object) -> bool: - return not self.__eq__(__o) - @property - def is_Pass(self) -> bool: - return isinstance(self, Wrappers_Compile.Outcome_Pass) - @property - def is_Fail(self) -> bool: - return isinstance(self, Wrappers_Compile.Outcome_Fail) - def IsFailure(self): - return (self).is_Fail - - def PropagateFailure(self): - return Wrappers_Compile.Result_Failure((self).error) - - -class Outcome_Pass(Outcome, NamedTuple('Pass', [])): - def __dafnystr__(self) -> str: - return f'Wrappers_Compile.Outcome.Pass' - def __eq__(self, __o: object) -> bool: - return isinstance(__o, Wrappers_Compile.Outcome_Pass) - def __hash__(self) -> int: - return super().__hash__() - -class Outcome_Fail(Outcome, NamedTuple('Fail', [('error', Any)])): - def __dafnystr__(self) -> str: - return f'Wrappers_Compile.Outcome.Fail({_dafny.string_of(self.error)})' - def __eq__(self, __o: object) -> bool: - return isinstance(__o, Wrappers_Compile.Outcome_Fail) and self.error == __o.error - def __hash__(self) -> int: - return super().__hash__() - - -class default__: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "Wrappers_Compile._default" - @staticmethod - def Need(condition, error): - if condition: - return Wrappers_Compile.Outcome_Pass() - elif True: - return Wrappers_Compile.Outcome_Fail(error) - diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/Extern.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/Extern.cpython-311.pyc deleted file mode 100644 index 3ca61fbb098a31a894903ff8770ffaac4d92f889..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1354 zcmah{y>Ht_6hDfTD2b9B$CmTqexpd^HV}aVUECmO5~VgK{*roKCoiq)mZ$M<#b?%w;o_ea0qMX+WES?pyL+E%JIn!6;pi&KrWE}`*vfJX)&&*2_%(#0$rb!58 z4}QRWN>X<+^?l4aK+^K#=rDXJ29H&2;8wOFE56_*A&ydRz_lO2dONd!KT6}oejKw$3GsYvCo#!r%#tH}AM^D4IKYJ43*02`wO)a0Gk`jz;7+pi2riU| z__r*kWA8A^+$6If{F-7Gjgm}kE(!})y1+Idxi$Ftm%!%ebhtg=du?6){eu(hW?|i& zk6#aOJWo%Cw~FB{xwBnZpZ|I1#M&*a-Q3tchf`>0Tj)IFqLpSz7(HYXZ6>Q`vIndM zOc>NlkC-XdP6#QbFczG(rEStUm=f%YmK(^lg*nN1im5B!U&-}509O{cY|MwM%F!YS z-o|`X0W(ryiKYq=L#`&#Jy?w5$X9()Jr{ZPGiG2j^}bcA)`0by1z z2(yAybOLMF)mAs}?t$)@qw6D()uzz&a h7(9J%;pm~U_KP-e7HGXd*9!D;fxalvH@PB($iI|(cG&;` diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/ManualTypeConversion.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/ManualTypeConversion.cpython-311.pyc deleted file mode 100644 index cab4e4a07f34758b3ba258a7093a474eeea0cb22..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 503 zcmah_y-ve05Vn(23aASM;t}WoegOm$L~N~)QWlmd#D+$7Z0nqW!qkC@7vK?4-w1W( z1tN9p#9d2^gpjaw-+jLSyZ3H)m*G1<67m}LCwk~b#V3%g~KBXSwUtQThM zNYWG?qRiU}6dkiEA50mv$cVxguj0ll@IqHvkx6Srr2M$FPCQu{JDp}qIIHWzf*XmU z@@3yjrM-yr!f7?Eom%q?Yqd&^fXbA4fo4~iBP>Ws{t9dnrT3;zTrK*ksZve3m)1OD z_uQHjSI-U;sc@J))%mkZ9#om!t!lzHj!MhSiA>l>t22pU3;BQR0q`J)H+S1Qb8$1JNstl&6_vB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leTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/SimpleBooleanImplTest_Compile.cpython-311.pyc deleted file mode 100644 index 88009efdf8b01c47f3c4d8f0b30ae569f2db4c45..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7243 zcmeHMO>7&-6`o!GEh&kjBuoBD+|aS)ny@OGlr1@NUDT2+{}h#+N{(yR@q*^AV$#c> z%r0$9l~5t@!H3*}!Uc)~I<&4+14WNL=Fr|LVgnHi7%&h7Xm4`tpny+(ZSSqGD$LUERJY<& zBR54HQx`9g4+WLvKqEV-k-ZK}QoSNMOBDZIq68j5{YR_~7N`0YVUEP4zhh=5=C!2B zw5Fx6YpUfrU0AdN^NS_*-88jAGwHml%$G}=8WSwvf>tb2WHQBa!LatvW%E!nQ7md| zx^N!&c~v*$$zr~g)zl1j?gVG(XLmqypQt1yC?q8+!d;T`D5C0J5Eai|Z_20o74Kd0 z0BSvQ+LBZNq`oau38e6GEp>w+4Q!Ey6bU{!XayB@AzjuCS~CEX1c&{iabY#cvns&61YRsPR%!Tg(?} z=|&vq;>Sfr)%3VMPdKR#U!Su$g?Y^8L0noiZa|0FNS~&~{8W0Ouqc-n>utB0UBSE#F0fnZ#@8HmDHrpd){Zj63b6jqf84godVn-;>^;am#*=MTpyBl zLBBK%#GWdO16!T4tl)R(1_kv7n$>H_`>>G&1XS!EuXK;oUdV8}2UmqH&quHhxI8Pw z0Fe`N?o#HQeMWLvpM^EYJRJc`zeal>*RY=9cijWf;E}7vim)uKkY%!ldT$AQOByq} z8&z^R4=gAGCl5OEWx|iO1O>e0Ljgu+hn3UDN%@giL}S1yAceAvoVKjV6KeW;x16d`TelmWtBJKMk(r-o%n30$n8QqASu0~G(b;z8UGbes# zPN@GNWKuXSerYF9F_{#f+X>`)rZ5Bap0Bq5P3Ww)>(EADqS}{O?;ADyMmLEV3_tGO zWA+}}B;;^f{E7g)<*<<=8Y0Nb;#m)Lq=@G{On44+hmi_>;pa#;iO>~(v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__/SimpleBooleanImpl_Compile.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/SimpleBooleanImpl_Compile.cpython-311.pyc deleted file mode 100644 index 2520312d766ff25417251f4cba9a5377683adef4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6306 zcmc&&-ESMm5#KxV$fG2Rlqk!VKPt+yWz%*g+mY*7c7wQ5Ecr`KL?yNvqX&w2vM3*U z^xo07SQ!xl0a1$rZ3+h#&=$~>Yr`*j%tIggC!B;cEF54!K#_;O$(7O;dFssG@#FLX zCqSGok8`^_vwO3%^PAhbzlOtg1j_W-fc&7IkbhvKTtaST?cY#&L}Vg!DoNp;SGgRY z;&Z-~FXvDBb3#hsu-~T!a=}!P)%~iN3#CG=&Z%{&IySyORnP7XsRnirryAKkl8VTJ z61~miGj;wF`IJ-0WRt4_QKD_-DoHi-WRS>#St17?gZwi#2HB|?ytCW_Lp|k&pK^BCnFf}Kvq6V1qv|>i zjDP$4o)2|}>OE>Plgr3jzGpzuZyQ>n=blDy7u0k{=_zRHR8FIXiJnnKH?C^3qUt@4 z0nys!x@*iH3I@*Rpt~?-Ou&RVNWVa}+(3FfKP45W+_762zq>GH?>eul$!z|Xsu)@x zG}aAT%orNgOYM&S-P;L7VL^HX$PD>9y6^MI!-yG)n__$ox`@YyxO8Si5h?&7*h8>4 zKkV6jG;|F9Yd>K^+Z#GbXc$CjBao+rwqU&($hYD-HJuxi)9;kxuIjQfo-V3J_c>L| zq*eVLs5lZkKwd}8&yX)3eE!M9PiEYScH(SoWo*CL#CFh~r_|`37uD4vUcf9XkuDQ1 zv5Vz>D!K01?KE3a3|BcrmSZ~~o&Dq4d3`a~X~jCt zNT(@wGW|Wf=Lcb?>(8L#MZh#MYF0H_se6NntMgNzU6<9f;9==}Mxhv2DZ0;7j^dU( z0C7|gWp&qprKoH2O3yBo#Z`dYMcU>MJddBT;)9EkAuBRuibG8Q;Y8RLVZ9KOBndV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SJ=0{1%vs-{{T1$jz0hZ diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/WrappedSimpleTypesBooleanTest_Compile.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/WrappedSimpleTypesBooleanTest_Compile.cpython-311.pyc deleted file mode 100644 index ee85d33bd1492663d46b63f7c0020f6356bfecd4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3728 zcmdT`TW=Fb6rNq*)=BI*aYzCbNTASI6q|%VxwTLd?hpu2Dy=H5Hr`F*u!GfTg4g)DH82N-%LYQ3H71pti7?f2^3XGRmbBqGw00Z z%*=k@obMu$CIV@8Y*_hLAmkY~+~luSR=pr^14s->3-3#2gCq} zdY=~5Lt@CO`!zuii(#kEX-#62Grn1DcFGp9#VI3V#3`dlovlv&n>m(ukij9$kp9w>;+yx20X3-j=g9-;^~fDd#1Lo$ z>$HLrgw2FlSW(C2yk<#Knp+z~2-bb@Uk!r5+kwv9$V2jwV}4WB#!c+d^YVV`6H}#T zO3SD9v|?ma!>W19GIFWg2ECQj@X^3F~Z79LzJO*uq_4TbmU zo82C>#JkQ67`&Rh;Ll=<+rP2&u6&2Lw$!Z+r;E40F3qmnp941E$c$i3X3QSQGc#`; zW){H8i=+k;N-E=pz9aAVA4weTNwl(n13lJU1+9gQ#X`02EL4L5#e-xW9#FV_dTZL@ zD%DiysTqfi?09B^1#&b486(TW0F_L3LNdl# z==8Kj<+R1Nd1gEhyxK^mtQ}itRmFKHBHR_#arn`<5GZfk33EOb zBE{&w;^w_5qx+VGq%9KwE?2N#;33cGC~ zwJe+}38$VMTN19=!j+<%U&B+2|8t%KCcwvIUGg#ka8O&l%T(B{E1XBa#!YX?L2I1l z&WELUW#FLhy0w9W@EKZ{Uco`|%6<7CFi-!18udhJ7r07sBNQVvinQtw4c&^hcTj9c zu>(a9ie3~uQS1W2;$G~Zku?*+A6KOQ{*BOoP+~1$+rKgVTk9ZqW}4Z&5&j($u5SJe z!Xbde$BV+&w@d)rcfp+Hj`x=11Eu)DQhd;k5B?44Dgu3y&mzz#`Dp}tfxm>%p5!kh z(6KPP~MHj>EjwTgML{ z0|fIc5OZt43eN>1z)!9Sa)FcF*J;$8mzy` zx?t#KJ_AwlaU54BO>@q#Ob!m75@$nuVrKT+|j>yh1I#OzW@`bb?g8D diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/Wrappers_Compile.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/Wrappers_Compile.cpython-311.pyc deleted file mode 100644 index 5bdd3e978e81cdbb527924f28067df712400e6d1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14810 zcmd5jTW}OtcHQ$Hy;^8^NeD9_!CGK6Vt6hBNr2Wavt}eCjA0<#8D?4_n1_6OWGqD@ z+AU?R-MEtVmR+d!kRH|IymXDzfykkKX5&^!N*>`gArqJpGQnGb{|Rk_)yYO$6M~ws z0{4nPQ*&9cA6B{o{fj^_$w^h)fEq83jTGD=pB4UObr8E|Ec`{RW|R!QY!1Quf?2gRe~#VgPu zHd0?Dgnt})j2x;Md(O2mAjNl^-M$=m7N)7I5n0nb{@$V(y6T412+t# z5$IOY&P)p*|H+3_A5BdQWDPtLthgiU-gH(~kr`3a1W*t1o+cXXJ)_}JYXM9P52bbu zzM*#7kzONnPRRv5K$PMb$)`;N0u69!=<;;J%}rran1^5YH7VW#GCncar4AO6;HW@k zK$ewvWVyqm`&1=6Ou&wUNdpk&R0Bd@k>!bcPBeSOc`hUFw6GZ2aI^cz-E(Rw(pHYN zX;PaOYNPbqLV)RDYeOy$!G2}5s00&qtp zt?*-G_=rkn%w#x!roy@&kf(+Jk(%e)e;e&8M~{@Gqh;x+7CQR;Xz%cntw=8tZEC?# zA*YaSRY=DQE9v-*RFifDxB@l?`=Nj`_*1w+VVDvp#j9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olean/runtimes/python/TestsFromDafny_py/simple_boolean/__init__.py deleted file mode 100644 index 247be3e3d4..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/__init__.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index c793dee34d8621ef24005048ce181925a4100d4f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 250 zcmXv|F=_)b5R_~ZOu+aZX|iP+lOi1HlE!u|&ZjkZSkf+%4kO4HQu_(U@5%=Z?p$Rr z_@&+eH3w2R;|>t{yM8T5q}+)w;$Lfj0s%d_{LIz z3e!Fl!-3+SUELrsx#B5u3u{dIlPtOftIo5-bzvO!JCVaWKAyu@5`D+h;C`iSJK vdKZe}0_neNw)cWDUFfngFI;Z3r6=1ve2WkA-SB@}2wkRH>x&vGP9^&TxvWVY diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/client.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/client.cpython-311.pyc deleted file mode 100644 index da1ea94f00e49bee03066969e033aa651668c48b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12665 zcmds7Yit`=cD_S$_#BEOzVwzxFFT4YDt=3jt*ji|k{^+kwH(__9EK)`GG)GYW)w$W zDs{6)A)x-D1+tBcVgUhNr(R^!`bU4bz;0nL3ao+t84_cNAYed15up2zMiSK6Up@B@ zIh-M-B#Wd)(b4Ge&b{Z}d+xpGocrA~^AB#f6Ty|gdOZH+QH1^jKh!QuHSy(FkoW|} zQJh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ean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/config.cpython-311.pyc deleted file mode 100644 index 1d19016719b6c2b1759e2474395c9524583fee4d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1507 zcmah}&1)M+6rcUjN?KWQA#N=Zr)-;(it$27X)&RY+BEdgq!1g*Qo4+HM$$&JJDZtV zTtN>$^ib#}heCWTJ-C$gAL&g39n78rJ>{n0o^tA&UCFW9Lf^i9`-`9Nn+HSiD z=)0qRvS}goryeY+wg4Bu0CVVg*)W2X;~mYKap#rQTxoph0X> zW6i`3+@uw>3}hl|5a;*$nSs!Acq=l|eMB1HBhoxGK@V?5XYhHx9H3y0+H`GT5UX!? z-)P&kMz0a~E@+7L2=!VowXJ6qO@bAU7?!eU7uLOWTr~DDWB7>CqIodR=sgx=S=0{G zn5Pe3>TG&uv3{SbPdR54r=O=;u8OzbC?4htGzZ|jJ~|G0%Epn7wIt|VNf%$k=NY0X zFbE1v=$H{$)FxN5rZr-f8JmD?ji~duUj2^Hy*}7t*d^ zF0g_^ygnD+qd3VJU6kRv9?))v1x~y;Ra8VYQ(VYh?_fwh7E9&v{)%PWJ08Z-(8Gdy zL(WIiQ$wuEVFWFtq;yGg5vKz%QICF0qr40cp0FqAlblMmvl3cRCB~stkS86CtKg;1 zTk6W(V<~g(wlXO`qN((7O1y|C(0wqK!7DSN43Fh%99{cvIp;yKcD3H(+G+}gt*7?f zq7jBEPG}ewZWtz<tgxhi`uL0#L&eb{2Hs`U!C zmn`aw6)3K+EXW>e9#NGm)+FR!vor$e^YIn}v^_hEP=H8mQ zA5Cn{(^3KuTgwQA^Cim%aoSriT9+r4N}*3t;XngnrG>3$>l;WoTIdr}bjvb!t~7dQ zQMuUEb_Z4v8YJ}55&B-Ms(M$WceJ>nMVZG|Rdw(Azgp`=?+1tWLj~ZET-7KQt$38+cku0A;Cv19FtEmjD0& diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/deserialize.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/deserialize.cpython-311.pyc deleted file mode 100644 index 0529efbf4897d0e7e44192cd83f1e59d7b4c96f7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 800 zcmZ`$&x_PB6izyArfwY(L=hESMGvDeJvd%OR?tBY;(FNeGMCbAGP8BlA0(+#@gOLk zy?ON@is&EWvBDx!5CkvoZD4MD@+H$*cL#h;zxTbDm*mUK$4+MjfxX@w(C-+b-#SbG*Wmj+3 z#r1`IOx?~h&cgIzq4Gin%ZXjkp)1LqEFH%aV8@qBY9~%%X-y(iQWL>cA=1dwhcwm# z{}TS$4S@Ry!wr<)xv}Ty@qYA=eZe0f`+0u`lw0edzml6OUx48n0*26^dAvo_eAx74Q$6vQEqpRrzE)~AC5iD1Ii zqEK`|vVMAb4&V=bFVIi#?7PeFukKvDR(btzUVq2yS9X5}^Ju;6*5}Qcy}4MW#r7JR zJtJM{j@Ktm)$)UxHVH=;ki=Yi-btM!cH+N=No diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/errors.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/errors.cpython-311.pyc deleted file mode 100644 index 8321d042bf2647db2a03532d10cdc31b91c1a6b3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1819 zcmb7E&2QX96rZuZws*5jT0m`(pm8oxOR%d}T#zaRWy@YdB$NcGFC*8UZLIi<887KZ zIk-|J7STg4C^>M*DG2(na7a-kkR>D}PTaQI9#Bub8LzWxT96p~{X8FU-g|!UH}gZQ z)j-g8?sWZS1))F1plZgnGx-TR`^ZN=4pD?194U?xsg8<~f_lhTc9E}A?MOxFAxPPr znu4h6YeyJnL8i01+);xaI;~Mm_1CH;bfkeM$W+sing(c^)S!xApJ~o|=X{!eV-?wR ze+d(|S{OYVQxVvppSdO?A#8$RJEncd(8y2(`TPsXLVmG3M6b(Y6#2@9Ir%U-}mZY7ngl(pw>(Ne{gu^Id z=|*Rb^6Znury=jG22mPP@uOA$W|D-|jXP`*XF&wh=`h;>gJKi^m?cry?Z-os4m(`# zC3mJ9EQ>UE%& z0~De)U%3HmKqtMgj8Gr@+HTV^M(7@POejUIFh5L#vJBT>PzE;*{;L#)=0T1M19HIK zyVL{5pEePkkjWPS-{F0fRlI=l5y(T3vK^jTspjAe;b*yyVP*%BQy)HpAHXX>ry3um zlnGJUgn_rJN<76wY zlDyrPe6tu$8RZm?P<+>Ndt=#7^@iLv5xRN$LQ^Ud&jzp z>tpmh?7jC`%s!bdHBhaY_eLMxU*28L@mSF@P~&+R?Hqi5`04k~W3l#Rrf@;Uws3SF Z_BIZ-4u>a;*G?{77cOn#^1PBv-9HH#p>hBK diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/models.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/models.cpython-311.pyc deleted file mode 100644 index b8518558a73b3b8a427ab1240d64f3fffc3c03ba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5271 zcmeHK|7#q_6`$GN`=Yy(PLgfKk`-$e$Bs_4cahz+)F_73szVbhm)gk>BFTAmJCZKi zyFJhD*}dajR1oA$MbQr}I*0@MA#o$z{~`SYS~wLI#6mz&3h6K9j1n;VDeukR?cJUv za6?Tobanf7X6Mb@na_Lk-ba7z?Trw)D)Te?MwF0$V5fB{&Bp#LG&YD%bZU?soufHv zPRhx1G9?muljzba(dCB{A&=m8uQ^4GC@>P}8VTsZ8zd3>7b+%XM}8w;a+H~D#&*Kj z3wGAbYeuGNMLYt{&i?Bo-XO~1FBR1=z^pxtHHUT z9$+CBW<3j1dnSwpSCzR4i|V1nqk2Fm3yL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UZc4eQ#|QMR#qJORJW3+}TXP6&VbjsWHuaRidIDlCuv`zeUb~vwjzHCd%~xshOXe@d4gAC1?)DU5gh9UeNjfWHantw!}cwx&^{xMSmZk z+Kyk`iC=sMw21!zzSPZ8#M)6@hWmfZQ6~KyWwJhT8R^MnTXb-g$^R-xK>%hGK__UJ z3fcUk%l9x;1W9y>oIuLY@D9S$F1NhGe+tT2_pKEW4VhBf2om~Aom@EX*9cyuKw1xr W$N28+_P`Q7tRv=iD|%Bzbbbpjh{v}8 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/serialize.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/__pycache__/serialize.cpython-311.pyc deleted file mode 100644 index ab57d34f9ff63142d760cce590712c0b500c0e17..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 778 zcmZ`%J&)5s5Z!g`jX4uifKGxYCsDbHQE1T>5P=YI%^gh|G@OVw2Gj!Bi=-*wP(Z>wtd& z_u?ABJ%mBN(uG?)LXTI`XZ#NMr&SDMtsQ9VJc)S8e5<)Mj;2|)CPH{n%C|%poNxi8 zZojp4@+x>JnUDc5<20su7L1vksk{iD=3-XxC}u&C^D50naTx3|sUGB%aT)9;X~EfE zRj?&*rxb`XQ%MSsi%K0rL48Qx7I|uPg+&!eb2i*R9cuvnlZYqJ*s!RY&2SZl2TU!K z#08M6KfSyR@CUBv=%+V$!`{wnZ}iO@efLJSJzBsf+VS0HV44k2RVuA=*yk4W@2?*W{+H(leCG gpItxD)%xt36O6Ba=+6OV diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/client.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/client.py deleted file mode 100644 index 56c86a0fb0..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/client.py +++ /dev/null @@ -1,369 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -from asyncio import sleep -from copy import deepcopy -from typing import Awaitable, Callable, TypeVar, cast - - -from .config import Config, Plugin -from .serialize import _serialize_get_boolean -from .errors import ServiceError -from .models import GetBooleanInput, GetBooleanOutput -from Dafny.Simpletypes.Boolean.Types import GetBooleanInput_GetBooleanInput as DafnyGetBooleanInput -from Dafny.Simpletypes.Boolean.Types import GetBooleanOutput_GetBooleanOutput as DafnyGetBooleanOutput -from Dafny.Simpletypes.Boolean import SimpleBooleanClient -from .deserialize import _deserialize_get_boolean -from smithy_python.interfaces.interceptor import Interceptor, InterceptorContext - -Input = TypeVar("Input") -Output = TypeVar("Output") - -class SimpleBoolean: - """Client for SimpleBoolean - - :param config: Optional configuration for the client. Here you can set things like the - endpoint for HTTP services or auth credentials. - - :param plugins: A list of callables that modify the configuration dynamically. These - can be used to set defaults, for example. - """ - def __init__(self, config: Config | None = None, plugins: list[Plugin] | None = None): - self._config = config or Config(interceptors=None, retry_strategy=None, impl=SimpleBooleanClient()) - - # TODO add plugin to get impl from plugin? - - client_plugins: list[Plugin] = [ - ] - if plugins: - client_plugins.extend(plugins) - - for plugin in client_plugins: - plugin(self._config) - - async def get_boolean(self, input: GetBooleanInput, plugins: list[Plugin] | None = None) -> GetBooleanOutput: - """Invokes the GetBoolean operation. - - :param input: The operation's input. - - :param plugins: A list of callables that modify the configuration dynamically. - Changes made by these plugins only apply for the duration of the operation - execution and will not affect any other operation invocations. - """ - operation_plugins = [ - - ] - if plugins: - operation_plugins.extend(plugins) - - return await self._execute_operation( - input=input, - plugins=operation_plugins, - serialize=_serialize_get_boolean, - deserialize=_deserialize_get_boolean, - config=self._config, - ) - - async def _execute_operation( - self, - input: Input, - plugins: list[Plugin], - serialize: Callable[[Input, Config], Awaitable[DafnyGetBooleanInput]], - deserialize: Callable[[DafnyGetBooleanOutput, Config], Awaitable[Output]], - config: Config, - ) -> Output: - try: - return await self._handle_execution( - input, plugins, serialize, deserialize, config - ) - except Exception as e: - # Make sure every exception that we throw is an instance of ServiceError so - # customers can reliably catch everything we throw. - if not isinstance(e, ServiceError): - raise ServiceError(e) from e - raise e - - async def _handle_execution( - self, - input: Input, - plugins: list[Plugin], - serialize: Callable[[Input, Config], Awaitable[DafnyGetBooleanInput]], - deserialize: Callable[[DafnyGetBooleanOutput, Config], Awaitable[Output]], - config: Config, - ) -> Output: - context: InterceptorContext[Input, None, None, None] = InterceptorContext( - request=input, - response=None, - transport_request=None, - transport_response=None, - ) - _client_interceptors = config.interceptors or [] - client_interceptors = cast( - list[Interceptor[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput]], _client_interceptors - ) - interceptors = client_interceptors - - try: - # Step 1a: Invoke read_before_execution on client-level interceptors - for interceptor in client_interceptors: - interceptor.read_before_execution(context) - - # Step 1b: Run operation-level plugins - config = deepcopy(config) - for plugin in plugins: - plugin(config) - - _client_interceptors = config.interceptors or [] - interceptors = cast( - list[Interceptor[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput]], - _client_interceptors, - ) - - # Step 1c: Invoke the read_before_execution hooks on newly added - # interceptors. - for interceptor in interceptors: - if interceptor not in client_interceptors: - interceptor.read_before_execution(context) - - # Step 2: Invoke the modify_before_serialization hooks - for interceptor in interceptors: - context._request = interceptor.modify_before_serialization(context) - - # Step 3: Invoke the read_before_serialization hooks - for interceptor in interceptors: - interceptor.read_before_serialization(context) - - # Step 4: Serialize the request - context_with_transport_request = cast( - InterceptorContext[Input, None, DafnyGetBooleanInput, None], context - ) - context_with_transport_request._transport_request = await serialize( - context_with_transport_request.request, config - ) - - # Step 5: Invoke read_after_serialization - for interceptor in interceptors: - interceptor.read_after_serialization(context_with_transport_request) - - # Step 6: Invoke modify_before_retry_loop - for interceptor in interceptors: - context_with_transport_request._transport_request = ( - interceptor.modify_before_retry_loop(context_with_transport_request) - ) - - # Step 7: Acquire the retry token. - retry_strategy = config.retry_strategy - if retry_strategy is None: - # raise ServiceError( - # "No retry_strategy found on the operation config." - # ) - pass - retry_token = None # retry_strategy.acquire_initial_retry_token() - - while True: - # Make an attempt, creating a copy of the context so we don't pass - # around old data. - context_with_response = await self._handle_attempt( - deserialize, - interceptors, - context_with_transport_request.copy(), - config, - ) - - # We perform this type-ignored re-assignment because `context` needs - # to point at the latest context so it can be generically handled - # later on. This is only an issue here because we've created a copy, - # so we're no longer simply pointing at the same object in memory - # with different names and type hints. It is possible to address this - # without having to fall back to the type ignore, but it would impose - # unnecessary runtime costs. - context = context_with_response # type: ignore - - if isinstance(context_with_response.response, Exception): - # Step 7u: Reacquire retry token if the attempt failed - raise context_with_response.response - - else: - # Step 8: Invoke record_success - # retry_strategy.record_success(token=retry_token) - break - except Exception as e: - if context.response is not None: - # config.logger.exception(f"Exception occurred while handling: {context.response}") - pass - context._response = e - - # At this point, the context's request will have been definitively set, and - # The response will be set either with the modeled output or an exception. The - # transport_request and transport_response may be set or None. - execution_context = cast( - InterceptorContext[Input, Output, DafnyGetBooleanInput | None, DafnyGetBooleanOutput | None], context - ) - return await self._finalize_execution(interceptors, execution_context) - - async def _handle_attempt( - self, - deserialize: Callable[[DafnyGetBooleanOutput, Config], Awaitable[Output]], - interceptors: list[Interceptor[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput]], - context: InterceptorContext[Input, None, DafnyGetBooleanInput, None], - config: Config, - ) -> InterceptorContext[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput | None]: - try: - # assert config.interceptors is not None - # Step 7a: Invoke read_before_attempt - for interceptor in interceptors: - interceptor.read_before_attempt(context) - - # Steps 7b-e haven't had their python designs finalized yet - # Step 7b: Invoke service_auth_scheme_resolver.resolve_auth_scheme - # Step 7c: Invoke auth_scheme.identity_resolver - # Step 7d: Invoke auth_scheme.signer - # Step 7e: Invoke identity_resolver.resolve_identity - - # Step 7g: Invoke modify_before_signing - for interceptor in interceptors: - context._transport_request = interceptor.modify_before_signing(context) - - # Step 7h: Invoke read_before_signing - for interceptor in interceptors: - interceptor.read_before_signing(context) - - # Step 7i: Invoke signer.sign_request - # This step hasn't had its python design finalized yet - - # Step 7j: Invoke read_after_signing - for interceptor in interceptors: - interceptor.read_after_signing(context) - - # Step 7k: Invoke modify_before_transmit - for interceptor in interceptors: - context._transport_request = interceptor.modify_before_transmit(context) - - # Step 7l: Invoke read_before_transmit - for interceptor in interceptors: - interceptor.read_before_transmit(context) - - ## HERE - # Step 7m: Invoke http_client.send - if config.impl is None: - raise Exception("No impl found on the operation config.") - - context_with_response = cast( - InterceptorContext[Input, None, DafnyGetBooleanInput, DafnyGetBooleanOutput], context - ) - - print(f"\ntransport_request is {context_with_response.transport_request}") - - context_with_response._transport_response = config.impl.GetBoolean( - input=context_with_response.transport_request - ) - - # Step 7n: Invoke read_after_transmit - for interceptor in interceptors: - interceptor.read_after_transmit(context_with_response) - - # Step 7o: Invoke modify_before_deserialization - for interceptor in interceptors: - context_with_response._transport_response = ( - interceptor.modify_before_deserialization(context_with_response) - ) - - # Step 7p: Invoke read_before_deserialization - for interceptor in interceptors: - interceptor.read_before_deserialization(context_with_response) - - # Step 7q: deserialize - context_with_output = cast( - InterceptorContext[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput], - context_with_response, - ) - context_with_output._response = await deserialize( - context_with_output._transport_response, config - ) - - # Step 7r: Invoke read_after_deserialization - for interceptor in interceptors: - interceptor.read_after_deserialization(context_with_output) - except Exception as e: - if context.response is not None: - # config.logger.exception(f"Exception occurred while handling: {context.response}") - pass - context._response = e - - # At this point, the context's request and transport_request have definitively been set, - # the response is either set or an exception, and the transport_resposne is either set or - # None. This will also be true after _finalize_attempt because there is no opportunity - # there to set the transport_response. - attempt_context = cast( - InterceptorContext[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput | None], context - ) - return await self._finalize_attempt(interceptors, attempt_context) - - async def _finalize_attempt( - self, - interceptors: list[Interceptor[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput]], - context: InterceptorContext[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput | None], - ) -> InterceptorContext[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput | None]: - # Step 7s: Invoke modify_before_attempt_completion - try: - for interceptor in interceptors: - context._response = interceptor.modify_before_attempt_completion( - context - ) - except Exception as e: - if context.response is not None: - # config.logger.exception(f"Exception occurred while handling: {context.response}") - pass - context._response = e - - # Step 7t: Invoke read_after_attempt - for interceptor in interceptors: - try: - interceptor.read_after_attempt(context) - except Exception as e: - if context.response is not None: - # config.logger.exception(f"Exception occurred while handling: {context.response}") - pass - context._response = e - - return context - - async def _finalize_execution( - self, - interceptors: list[Interceptor[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput]], - context: InterceptorContext[Input, Output, DafnyGetBooleanInput | None, DafnyGetBooleanOutput | None], - ) -> Output: - try: - # Step 9: Invoke modify_before_completion - for interceptor in interceptors: - context._response = interceptor.modify_before_completion(context) - - # Step 10: Invoke trace_probe.dispatch_events - try: - pass - except Exception as e: - # log and ignore exceptions - # config.logger.exception(f"Exception occurred while dispatching trace events: {e}") - pass - except Exception as e: - if context.response is not None: - # config.logger.exception(f"Exception occurred while handling: {context.response}") - pass - context._response = e - - # Step 11: Invoke read_after_execution - for interceptor in interceptors: - try: - interceptor.read_after_execution(context) - except Exception as e: - if context.response is not None: - # config.logger.exception(f"Exception occurred while handling: {context.response}") - pass - context._response = e - - # Step 12: Return / throw - if isinstance(context.response, Exception): - raise context.response - - # We may want to add some aspects of this context to the output types so we can - # return it to the end-users. - return context.response diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/config.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/config.py deleted file mode 100644 index 031767f4fb..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/config.py +++ /dev/null @@ -1,28 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -from dataclasses import dataclass -from typing import Any, Callable, TypeAlias, Union - -import Dafny.Simpletypes.Boolean - -from .models import GetBooleanInput, GetBooleanOutput - - -@dataclass(kw_only=True) -class Config: - """Configuration for SimpleBoolean - - :param interceptors: The list of interceptors, which are hooks that are called - during the execution of a request. - - :param retry_strategy: The retry strategy for issuing retry tokens and computing - retry delays. - - :param impl: - """ - interceptors: list[None] - retry_strategy: None - impl: Dafny.Simpletypes.Boolean.SimpleBooleanClient - -# A callable that allows customizing the config object on each request. -Plugin: TypeAlias = Callable[[Config], None] diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/deserialize.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/deserialize.py deleted file mode 100644 index fdb60af923..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/deserialize.py +++ /dev/null @@ -1,11 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -#from Dafny.Path.To.Dafny.Code. import SimpleBooleanHardCoded as _SimpleBooleanHardCoded -from Dafny.Simpletypes.Boolean.Types import GetBooleanOutput_GetBooleanOutput as DafnyGetBooleanOutput - -from .config import Config -from .models import GetBooleanOutput - - -async def _deserialize_get_boolean(input: DafnyGetBooleanOutput, config: Config) -> GetBooleanOutput: - return GetBooleanOutput(value=input.value.value) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/errors.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/errors.py deleted file mode 100644 index 6f38ba4e80..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/errors.py +++ /dev/null @@ -1,23 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -from typing import Generic, Literal, TypeVar - - -class ServiceError(Exception): - """Base error for all errors in the service. - """ - pass - -T = TypeVar('T') -class ApiError(ServiceError, Generic[T]): - """Base error for all api errors in the service. - """ - code: T - def __init__(self, message: str): - super().__init__(message) - self.message = message - -class UnknownApiError(ApiError[Literal['Unknown']]): - """Error representing any unknown api errors - """ - code: Literal['Unknown'] = 'Unknown' diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/models.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/models.py deleted file mode 100644 index 43b48bab05..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/models.py +++ /dev/null @@ -1,108 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -from typing import Any, Dict, Optional - - -class GetBooleanInput: - value: Optional[bool] - def __init__( - self, - *, - value: Optional[bool] = None, - ): - self.value = value - - def as_dict(self) -> Dict[str, Any]: - """Converts the GetBooleanInput to a dictionary. - - The dictionary uses the modeled shape names rather than the parameter names as - keys to be mostly compatible with boto3. - """ - d: Dict[str, Any] = {} - - if self.value is not None: - d["value"] = self.value - - return d - - @staticmethod - def from_dict(d: Dict[str, Any]) -> "GetBooleanInput": - """Creates a GetBooleanInput from a dictionary. - - The dictionary is expected to use the modeled shape names rather than the - parameter names as keys to be mostly compatible with boto3. - """ - kwargs: Dict[str, Any] = {} - - if "value" in d: - kwargs["value"] = d["value"] - - return GetBooleanInput(**kwargs) - - def __repr__(self) -> str: - result = "GetBooleanInput(" - if self.value is not None: - result += f"value={repr(self.value)}" - - return result + ")" - - def __eq__(self, other: Any) -> bool: - if not isinstance(other, GetBooleanInput): - return False - attributes: list[str] = ['value',] - return all( - getattr(self, a) == getattr(other, a) - for a in attributes - ) - -class GetBooleanOutput: - value: Optional[bool] - def __init__( - self, - *, - value: Optional[bool] = None, - ): - self.value = value - - def as_dict(self) -> Dict[str, Any]: - """Converts the GetBooleanOutput to a dictionary. - - The dictionary uses the modeled shape names rather than the parameter names as - keys to be mostly compatible with boto3. - """ - d: Dict[str, Any] = {} - - if self.value is not None: - d["value"] = self.value - - return d - - @staticmethod - def from_dict(d: Dict[str, Any]) -> "GetBooleanOutput": - """Creates a GetBooleanOutput from a dictionary. - - The dictionary is expected to use the modeled shape names rather than the - parameter names as keys to be mostly compatible with boto3. - """ - kwargs: Dict[str, Any] = {} - - if "value" in d: - kwargs["value"] = d["value"] - - return GetBooleanOutput(**kwargs) - - def __repr__(self) -> str: - result = "GetBooleanOutput(" - if self.value is not None: - result += f"value={repr(self.value)}" - - return result + ")" - - def __eq__(self, other: Any) -> bool: - if not isinstance(other, GetBooleanOutput): - return False - attributes: list[str] = ['value',] - return all( - getattr(self, a) == getattr(other, a) - for a in attributes - ) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/serialize.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/serialize.py deleted file mode 100644 index b6379f5c73..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/simple_boolean/serialize.py +++ /dev/null @@ -1,11 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -#from Dafny.Path.To.Dafny.Code. import SimpleBooleanHardCoded as _SimpleBooleanHardCoded -from Dafny.Simpletypes.Boolean.Types import GetBooleanInput_GetBooleanInput as DafnyGetBooleanInput - -from .config import Config -from .models import GetBooleanInput - - -async def _serialize_get_boolean(input: GetBooleanInput, config: Config) -> DafnyGetBooleanInput: - return DafnyGetBooleanInput(value=input.value) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/__init__.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/__init__.py similarity index 100% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/__init__.py rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/__init__.py diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/Iamaredme b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/Iamaredme deleted file mode 100644 index 63b8568325..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/Iamaredme +++ /dev/null @@ -1,3 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -yo diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/README.md b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/README.md deleted file mode 100644 index 4d95aa6598..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/README.md +++ /dev/null @@ -1,3 +0,0 @@ -## Simple_boolean Client - -simple_boolean client diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/pyproject.toml b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/pyproject.toml deleted file mode 100644 index cb3492f592..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/pyproject.toml +++ /dev/null @@ -1,46 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -[build-system] -requires = ["setuptools", "setuptools-scm", "wheel"] -build-backend = "setuptools.build_meta" - -[project] -name = "simple_boolean" -version = "0.0.1" -description = "simple_boolean client" -readme = "README.md" -requires-python = ">=3.11" -keywords = ["smithy", "simple_boolean"] -license = {text = "Apache-2.0"} -classifiers = [ - "Development Status :: 2 - Pre-Alpha", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Natural Language :: English", - "License :: OSI Approved :: Apache Software License", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.11" -] - -dependencies = [ - "smithy_python==0.0.1" -] -[tool.setuptools.packages.find] -exclude=["tests*"] - -[tool.mypy] -strict = true -warn_unused_configs = true - -[[tool.mypy.overrides]] -module = ["awscrt", "pytest"] -ignore_missing_imports = true - -[tool.black] -target-version = ["py311"] - -[tool.pytest.ini_options] -python_classes = ["!Test"] -asyncio_mode = "auto" diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean.egg-info/PKG-INFO b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean.egg-info/PKG-INFO deleted file mode 100644 index 0e1e065aa0..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean.egg-info/PKG-INFO +++ /dev/null @@ -1,21 +0,0 @@ -Metadata-Version: 2.1 -Name: simple-boolean -Version: 0.0.1 -Summary: simple_boolean client -License: Apache-2.0 -Keywords: smithy,simple_boolean -Classifier: Development Status :: 2 - Pre-Alpha -Classifier: Intended Audience :: Developers -Classifier: Intended Audience :: System Administrators -Classifier: Natural Language :: English -Classifier: License :: OSI Approved :: Apache Software License -Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3 :: Only -Classifier: Programming Language :: Python :: 3.11 -Requires-Python: >=3.11 -Description-Content-Type: text/markdown - -## Simple_boolean Client - -simple_boolean client diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean.egg-info/SOURCES.txt b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean.egg-info/SOURCES.txt deleted file mode 100644 index 1453b42f2b..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean.egg-info/SOURCES.txt +++ /dev/null @@ -1,14 +0,0 @@ -README.md -pyproject.toml -simple_boolean/__init__.py -simple_boolean/client.py -simple_boolean/config.py -simple_boolean/deserialize.py -simple_boolean/errors.py -simple_boolean/models.py -simple_boolean/serialize.py -simple_boolean.egg-info/PKG-INFO -simple_boolean.egg-info/SOURCES.txt -simple_boolean.egg-info/dependency_links.txt -simple_boolean.egg-info/requires.txt -simple_boolean.egg-info/top_level.txt \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean.egg-info/requires.txt b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean.egg-info/requires.txt deleted file mode 100644 index 31bc6d2c48..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean.egg-info/requires.txt +++ /dev/null @@ -1 +0,0 @@ -smithy_python==0.0.1 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean.egg-info/top_level.txt b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean.egg-info/top_level.txt deleted file mode 100644 index ab0668a6b3..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean.egg-info/top_level.txt +++ /dev/null @@ -1 +0,0 @@ -simple_boolean diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/__init__.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/__init__.py deleted file mode 100644 index 247be3e3d4..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/client.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/client.py deleted file mode 100644 index 9c02cbd30f..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/client.py +++ /dev/null @@ -1,363 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -from asyncio import sleep -from copy import deepcopy -from typing import Awaitable, Callable, TypeVar, cast - -from . import set_config_impl -from smithy_python.exceptions import SmithyRetryException -from smithy_python.interfaces.http import IaAmDafny, IamaAlsoDafny -from smithy_python.interfaces.interceptor import Interceptor, InterceptorContext -from smithy_python.interfaces.retries import RetryErrorInfo, RetryErrorType - -from .config import Config, Plugin -from .deserialize import _deserialize_get_boolean -from .errors import ServiceError -from .models import GetBooleanInput, GetBooleanOutput -from .serialize import _serialize_get_boolean - - -Input = TypeVar("Input") -Output = TypeVar("Output") - -class SimpleBoolean: - """Client for SimpleBoolean - - :param config: Optional configuration for the client. Here you can set things like the - endpoint for HTTP services or auth credentials. - - :param plugins: A list of callables that modify the configuration dynamically. These - can be used to set defaults, for example. - """ - def __init__(self, config: Config | None = None, plugins: list[Plugin] | None = None): - self._config = config or Config() - - client_plugins: list[Plugin] = [ - set_config_impl, - ] - if plugins: - client_plugins.extend(plugins) - - for plugin in client_plugins: - plugin(self._config) - - async def get_boolean(self, input: GetBooleanInput, plugins: list[Plugin] | None = None) -> GetBooleanOutput: - """Invokes the GetBoolean operation. - - :param input: The operation's input. - - :param plugins: A list of callables that modify the configuration dynamically. - Changes made by these plugins only apply for the duration of the operation - execution and will not affect any other operation invocations. - """ - operation_plugins = [ - - ] - if plugins: - operation_plugins.extend(plugins) - - return await self._execute_operation( - input=input, - plugins=operation_plugins, - serialize=_serialize_get_boolean, - deserialize=_deserialize_get_boolean, - config=self._config, - ) - - async def _execute_operation( - self, - input: Input, - plugins: list[Plugin], - serialize: Callable[[Input, Config], Awaitable[IaAmDafny]], - deserialize: Callable[[IamaAlsoDafny, Config], Awaitable[Output]], - config: Config, - ) -> Output: - try: - return await self._handle_execution( - input, plugins, serialize, deserialize, config - ) - except Exception as e: - # Make sure every exception that we throw is an instance of ServiceError so - # customers can reliably catch everything we throw. - if not isinstance(e, ServiceError): - raise ServiceError(e) from e - raise e - - async def _handle_execution( - self, - input: Input, - plugins: list[Plugin], - serialize: Callable[[Input, Config], Awaitable[IaAmDafny]], - deserialize: Callable[[IamaAlsoDafny, Config], Awaitable[Output]], - config: Config, - ) -> Output: - context: InterceptorContext[Input, None, None, None] = InterceptorContext( - request=input, - response=None, - transport_request=None, - transport_response=None, - ) - _client_interceptors = config.interceptors or [] - client_interceptors = cast( - list[Interceptor[Input, Output, IaAmDafny, IamaAlsoDafny]], _client_interceptors - ) - interceptors = client_interceptors - - try: - # Step 1a: Invoke read_before_execution on client-level interceptors - for interceptor in client_interceptors: - interceptor.read_before_execution(context) - - # Step 1b: Run operation-level plugins - config = deepcopy(config) - for plugin in plugins: - plugin(config) - - _client_interceptors = config.interceptors or [] - interceptors = cast( - list[Interceptor[Input, Output, IaAmDafny, IamaAlsoDafny]], - _client_interceptors, - ) - - # Step 1c: Invoke the read_before_execution hooks on newly added - # interceptors. - for interceptor in interceptors: - if interceptor not in client_interceptors: - interceptor.read_before_execution(context) - - # Step 2: Invoke the modify_before_serialization hooks - for interceptor in interceptors: - context._request = interceptor.modify_before_serialization(context) - - # Step 3: Invoke the read_before_serialization hooks - for interceptor in interceptors: - interceptor.read_before_serialization(context) - - # Step 4: Serialize the request - context_with_transport_request = cast( - InterceptorContext[Input, None, IaAmDafny, None], context - ) - context_with_transport_request._transport_request = await serialize( - context_with_transport_request.request, config - ) - - # Step 5: Invoke read_after_serialization - for interceptor in interceptors: - interceptor.read_after_serialization(context_with_transport_request) - - # Step 6: Invoke modify_before_retry_loop - for interceptor in interceptors: - context_with_transport_request._transport_request = ( - interceptor.modify_before_retry_loop(context_with_transport_request) - ) - - # Step 7: Acquire the retry token. - retry_strategy = config.retry_strategy - if retry_strategy is None: - raise ServiceError( - "No retry_strategy found on the operation config." - ) - retry_token = retry_strategy.acquire_initial_retry_token() - - while True: - # Make an attempt, creating a copy of the context so we don't pass - # around old data. - context_with_response = await self._handle_attempt( - deserialize, - interceptors, - context_with_transport_request.copy(), - config, - ) - - # We perform this type-ignored re-assignment because `context` needs - # to point at the latest context so it can be generically handled - # later on. This is only an issue here because we've created a copy, - # so we're no longer simply pointing at the same object in memory - # with different names and type hints. It is possible to address this - # without having to fall back to the type ignore, but it would impose - # unnecessary runtime costs. - context = context_with_response # type: ignore - - if isinstance(context_with_response.response, Exception): - # Step 7u: Reacquire retry token if the attempt failed - try: - retry_token = retry_strategy.refresh_retry_token_for_retry( - token_to_renew=retry_token, - error_info=RetryErrorInfo( - # TODO: Determine the error type. - error_type=RetryErrorType.CLIENT_ERROR, - ) - ) - except SmithyRetryException: - raise context_with_response.response - await sleep(retry_token.retry_delay) - else: - # Step 8: Invoke record_success - retry_strategy.record_success(token=retry_token) - break - except Exception as e: - if context.response is not None: - # config.logger.exception(f"Exception occurred while handling: {context.response}") - pass - context._response = e - - # At this point, the context's request will have been definitively set, and - # The response will be set either with the modeled output or an exception. The - # transport_request and transport_response may be set or None. - execution_context = cast( - InterceptorContext[Input, Output, IaAmDafny | None, IamaAlsoDafny | None], context - ) - return await self._finalize_execution(interceptors, execution_context) - - async def _handle_attempt( - self, - deserialize: Callable[[IamaAlsoDafny, Config], Awaitable[Output]], - interceptors: list[Interceptor[Input, Output, IaAmDafny, IamaAlsoDafny]], - context: InterceptorContext[Input, None, IaAmDafny, None], - config: Config, - ) -> InterceptorContext[Input, Output, IaAmDafny, IamaAlsoDafny | None]: - try: - # assert config.interceptors is not None - # Step 7a: Invoke read_before_attempt - for interceptor in interceptors: - interceptor.read_before_attempt(context) - - # Steps 7b-e haven't had their python designs finalized yet - # Step 7b: Invoke service_auth_scheme_resolver.resolve_auth_scheme - # Step 7c: Invoke auth_scheme.identity_resolver - # Step 7d: Invoke auth_scheme.signer - # Step 7e: Invoke identity_resolver.resolve_identity - - # Step 7g: Invoke modify_before_signing - for interceptor in interceptors: - context._transport_request = interceptor.modify_before_signing(context) - - # Step 7h: Invoke read_before_signing - for interceptor in interceptors: - interceptor.read_before_signing(context) - - # Step 7i: Invoke signer.sign_request - # This step hasn't had its python design finalized yet - - # Step 7j: Invoke read_after_signing - for interceptor in interceptors: - interceptor.read_after_signing(context) - - # Step 7k: Invoke modify_before_transmit - for interceptor in interceptors: - context._transport_request = interceptor.modify_before_transmit(context) - - # Step 7l: Invoke read_before_transmit - for interceptor in interceptors: - interceptor.read_before_transmit(context) - - # Step 7n: Invoke read_after_transmit - for interceptor in interceptors: - interceptor.read_after_transmit(context_with_response) - - # Step 7o: Invoke modify_before_deserialization - for interceptor in interceptors: - context_with_response._transport_response = ( - interceptor.modify_before_deserialization(context_with_response) - ) - - # Step 7p: Invoke read_before_deserialization - for interceptor in interceptors: - interceptor.read_before_deserialization(context_with_response) - - # Step 7q: deserialize - context_with_output = cast( - InterceptorContext[Input, Output, IaAmDafny, IamaAlsoDafny], - context_with_response, - ) - context_with_output._response = await deserialize( - context_with_output._transport_response, config - ) - - # Step 7r: Invoke read_after_deserialization - for interceptor in interceptors: - interceptor.read_after_deserialization(context_with_output) - except Exception as e: - if context.response is not None: - # config.logger.exception(f"Exception occurred while handling: {context.response}") - pass - context._response = e - - # At this point, the context's request and transport_request have definitively been set, - # the response is either set or an exception, and the transport_resposne is either set or - # None. This will also be true after _finalize_attempt because there is no opportunity - # there to set the transport_response. - attempt_context = cast( - InterceptorContext[Input, Output, IaAmDafny, IamaAlsoDafny | None], context - ) - return await self._finalize_attempt(interceptors, attempt_context) - - async def _finalize_attempt( - self, - interceptors: list[Interceptor[Input, Output, IaAmDafny, IamaAlsoDafny]], - context: InterceptorContext[Input, Output, IaAmDafny, IamaAlsoDafny | None], - ) -> InterceptorContext[Input, Output, IaAmDafny, IamaAlsoDafny | None]: - # Step 7s: Invoke modify_before_attempt_completion - try: - for interceptor in interceptors: - context._response = interceptor.modify_before_attempt_completion( - context - ) - except Exception as e: - if context.response is not None: - # config.logger.exception(f"Exception occurred while handling: {context.response}") - pass - context._response = e - - # Step 7t: Invoke read_after_attempt - for interceptor in interceptors: - try: - interceptor.read_after_attempt(context) - except Exception as e: - if context.response is not None: - # config.logger.exception(f"Exception occurred while handling: {context.response}") - pass - context._response = e - - return context - - async def _finalize_execution( - self, - interceptors: list[Interceptor[Input, Output, IaAmDafny, IamaAlsoDafny]], - context: InterceptorContext[Input, Output, IaAmDafny | None, IamaAlsoDafny | None], - ) -> Output: - try: - # Step 9: Invoke modify_before_completion - for interceptor in interceptors: - context._response = interceptor.modify_before_completion(context) - - # Step 10: Invoke trace_probe.dispatch_events - try: - pass - except Exception as e: - # log and ignore exceptions - # config.logger.exception(f"Exception occurred while dispatching trace events: {e}") - pass - except Exception as e: - if context.response is not None: - # config.logger.exception(f"Exception occurred while handling: {context.response}") - pass - context._response = e - - # Step 11: Invoke read_after_execution - for interceptor in interceptors: - try: - interceptor.read_after_execution(context) - except Exception as e: - if context.response is not None: - # config.logger.exception(f"Exception occurred while handling: {context.response}") - pass - context._response = e - - # Step 12: Return / throw - if isinstance(context.response, Exception): - raise context.response - - # We may want to add some aspects of this context to the output types so we can - # return it to the end-users. - return context.response diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/config.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/config.py deleted file mode 100644 index 9c440a6abe..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/config.py +++ /dev/null @@ -1,31 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -from dataclasses import dataclass -from typing import Any, Callable, TypeAlias, Union - -from Path.To.Config.Namespace import config_type -from smithy_python.interfaces.interceptor import Interceptor -from smithy_python.interfaces.retries import RetryStrategy - -from .models import GetBooleanInput, GetBooleanOutput - - -_ServiceInterceptor = Union[Interceptor[GetBooleanInput, GetBooleanOutput, Any, Any]] -@dataclass(kw_only=True) -class Config: - """Configuration for SimpleBoolean - - :param interceptors: The list of interceptors, which are hooks that are called - during the execution of a request. - - :param retry_strategy: The retry strategy for issuing retry tokens and computing - retry delays. - - :param impl: - """ - interceptors: list[_ServiceInterceptor] | None = None - retry_strategy: RetryStrategy | None = None - impl: config_type - -# A callable that allows customizing the config object on each request. -Plugin: TypeAlias = Callable[[Config], None] diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/deserialize.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/deserialize.py deleted file mode 100644 index ce968c3438..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/deserialize.py +++ /dev/null @@ -1,7 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -from typing import Any - - -# This is the output of Dafny, -# so it probably needs to call the impl and get the result? diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/errors.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/errors.py deleted file mode 100644 index 6f38ba4e80..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/errors.py +++ /dev/null @@ -1,23 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -from typing import Generic, Literal, TypeVar - - -class ServiceError(Exception): - """Base error for all errors in the service. - """ - pass - -T = TypeVar('T') -class ApiError(ServiceError, Generic[T]): - """Base error for all api errors in the service. - """ - code: T - def __init__(self, message: str): - super().__init__(message) - self.message = message - -class UnknownApiError(ApiError[Literal['Unknown']]): - """Error representing any unknown api errors - """ - code: Literal['Unknown'] = 'Unknown' diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/models.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/models.py deleted file mode 100644 index 43b48bab05..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/models.py +++ /dev/null @@ -1,108 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -from typing import Any, Dict, Optional - - -class GetBooleanInput: - value: Optional[bool] - def __init__( - self, - *, - value: Optional[bool] = None, - ): - self.value = value - - def as_dict(self) -> Dict[str, Any]: - """Converts the GetBooleanInput to a dictionary. - - The dictionary uses the modeled shape names rather than the parameter names as - keys to be mostly compatible with boto3. - """ - d: Dict[str, Any] = {} - - if self.value is not None: - d["value"] = self.value - - return d - - @staticmethod - def from_dict(d: Dict[str, Any]) -> "GetBooleanInput": - """Creates a GetBooleanInput from a dictionary. - - The dictionary is expected to use the modeled shape names rather than the - parameter names as keys to be mostly compatible with boto3. - """ - kwargs: Dict[str, Any] = {} - - if "value" in d: - kwargs["value"] = d["value"] - - return GetBooleanInput(**kwargs) - - def __repr__(self) -> str: - result = "GetBooleanInput(" - if self.value is not None: - result += f"value={repr(self.value)}" - - return result + ")" - - def __eq__(self, other: Any) -> bool: - if not isinstance(other, GetBooleanInput): - return False - attributes: list[str] = ['value',] - return all( - getattr(self, a) == getattr(other, a) - for a in attributes - ) - -class GetBooleanOutput: - value: Optional[bool] - def __init__( - self, - *, - value: Optional[bool] = None, - ): - self.value = value - - def as_dict(self) -> Dict[str, Any]: - """Converts the GetBooleanOutput to a dictionary. - - The dictionary uses the modeled shape names rather than the parameter names as - keys to be mostly compatible with boto3. - """ - d: Dict[str, Any] = {} - - if self.value is not None: - d["value"] = self.value - - return d - - @staticmethod - def from_dict(d: Dict[str, Any]) -> "GetBooleanOutput": - """Creates a GetBooleanOutput from a dictionary. - - The dictionary is expected to use the modeled shape names rather than the - parameter names as keys to be mostly compatible with boto3. - """ - kwargs: Dict[str, Any] = {} - - if "value" in d: - kwargs["value"] = d["value"] - - return GetBooleanOutput(**kwargs) - - def __repr__(self) -> str: - result = "GetBooleanOutput(" - if self.value is not None: - result += f"value={repr(self.value)}" - - return result + ")" - - def __eq__(self, other: Any) -> bool: - if not isinstance(other, GetBooleanOutput): - return False - attributes: list[str] = ['value',] - return all( - getattr(self, a) == getattr(other, a) - for a in attributes - ) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/serialize.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/serialize.py deleted file mode 100644 index f3ff8edc0e..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean/serialize.py +++ /dev/null @@ -1,11 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -from Dafny.Path.To.Dafny.Code. import SimpleBooleanHardCoded as _SimpleBooleanHardCoded -from smithy_python.interfaces.http import IaAmDafny - -from .config import Config -from .models import GetBooleanInput - - -async def _serialize_get_boolean(input: GetBooleanInput, config: Config) -> IaAmDafny: - return _SimpleBooleanHardCoded.get_boolean() diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/setup.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/setup.py new file mode 100644 index 0000000000..a65ea3057c --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/setup.py @@ -0,0 +1,64 @@ +"""DynamoDB Encryption Client for Python.""" +import io +import os +import re + +from setuptools import find_packages, setup + +VERSION_RE = re.compile(r"""__version__ = ['"]([0-9.]+)['"]""") +HERE = os.path.abspath(os.path.dirname(__file__)) + + +# def read(*args): +# """Reads complete file contents.""" +# return io.open(os.path.join(HERE, *args), encoding="utf-8").read() # pylint: disable=consider-using-with +# +# +# def get_version(): +# """Reads the version from this module.""" +# init = read("src", "dynamodb_encryption_sdk", "identifiers.py") +# return VERSION_RE.search(init).group(1) +# +# +# def get_requirements(): +# """Reads the requirements file.""" +# requirements = read("requirements.txt") +# return requirements.strip().splitlines() +# + +setup( + name="simpleboolean", + # version=get_version(), + packages=find_packages("src"), + package_dir={"": "src"}, + author="Amazon Web Services", + author_email="aws-cryptools@amazon.com", + maintainer="Amazon Web Services", + description="DynamoDB Encryption Client for Python", + # long_description=read("README.rst"), + # keywords="dynamodb-encryption-sdk aws kms encryption dynamodb", + # data_files=["README.rst", "CHANGELOG.rst", "LICENSE", "requirements.txt"], + license="Apache License 2.0", + # install_requires=get_requirements(), + classifiers=[ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Natural Language :: English", + "License :: OSI Approved :: Apache Software License", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: Implementation :: CPython", + "Topic :: Security", + "Topic :: Security :: Cryptography", + ], + entry_points={ + 'run_tests': [ + 'tests = src.test.dafny_generated:main', + ] + } +) \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean.egg-info/PKG-INFO b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean.egg-info/PKG-INFO new file mode 100644 index 0000000000..d578a1557c --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean.egg-info/PKG-INFO @@ -0,0 +1,22 @@ +Metadata-Version: 2.1 +Name: simpleboolean +Version: 0.0.0 +Summary: DynamoDB Encryption Client for Python +Author: Amazon Web Services +Author-email: aws-cryptools@amazon.com +Maintainer: Amazon Web Services +License: Apache License 2.0 +Classifier: Development Status :: 5 - Production/Stable +Classifier: Intended Audience :: Developers +Classifier: Natural Language :: English +Classifier: License :: OSI Approved :: Apache Software License +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Classifier: Programming Language :: Python :: Implementation :: CPython +Classifier: Topic :: Security +Classifier: Topic :: Security :: Cryptography diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean.egg-info/SOURCES.txt b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean.egg-info/SOURCES.txt new file mode 100644 index 0000000000..06297c3703 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean.egg-info/SOURCES.txt @@ -0,0 +1,19 @@ +setup.py +src/simpleboolean/__init__.py +src/simpleboolean.egg-info/PKG-INFO +src/simpleboolean.egg-info/SOURCES.txt +src/simpleboolean.egg-info/dependency_links.txt +src/simpleboolean.egg-info/entry_points.txt +src/simpleboolean.egg-info/top_level.txt +src/simpleboolean/dafny_generated/SimpleBooleanImpl_Compile.py +src/simpleboolean/dafny_generated/System_.py +src/simpleboolean/dafny_generated/__init__.py +src/simpleboolean/dafny_generated/_dafny.py +src/simpleboolean/dafny_generated/dafny_generated.py +src/simpleboolean/dafny_generated/module_.py +src/simpleboolean/dafny_generated/simple/__init__.py +src/simpleboolean/dafny_generated/simple/types/__init__.py +src/simpleboolean/dafny_generated/simple/types/boolean/__init__.py +src/simpleboolean/dafny_generated/simple/types/boolean/internaldafny/__init__.py +src/simpleboolean/dafny_generated/simple/types/boolean/internaldafny/impl.py +src/simpleboolean/dafny_generated/simple/types/boolean/internaldafny/types.py \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean.egg-info/dependency_links.txt b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean.egg-info/dependency_links.txt similarity index 100% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/python_client_codegen/simple_boolean.egg-info/dependency_links.txt rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean.egg-info/dependency_links.txt diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean.egg-info/entry_points.txt b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean.egg-info/entry_points.txt new file mode 100644 index 0000000000..a6fd3b442d --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean.egg-info/entry_points.txt @@ -0,0 +1,2 @@ +[run_tests] +tests = src.test.dafny_generated:main diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean.egg-info/top_level.txt b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean.egg-info/top_level.txt new file mode 100644 index 0000000000..2f1ab7258d --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean.egg-info/top_level.txt @@ -0,0 +1 @@ +simpleboolean diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/__init__.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/__init__.py new file mode 100644 index 0000000000..de0caa9aeb --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/__init__.py @@ -0,0 +1 @@ +from . import dafny_generated \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/__pycache__/__init__.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b1523ee8a847d15637cbf65ee7f471ff390733d8 GIT binary patch literal 289 zcmZusu}T9$5S_gP2|^I;^8wemKOh!jt4(5Kvz#}hIkLO6?Cv4kSo;Tlg7`O<} literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/SimpleBooleanImpl_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/SimpleBooleanImpl_Compile.py similarity index 63% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/SimpleBooleanImpl_Compile.py rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/SimpleBooleanImpl_Compile.py index 184846d199..d32863d1cc 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/SimpleBooleanImpl_Compile.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/SimpleBooleanImpl_Compile.py @@ -1,13 +1,7 @@ import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count +from typing import NamedTuple -import module_ import _dafny -import System_ -import Dafny.Simpletypes.Boolean.Types -import Wrappers_Compile assert "SimpleBooleanImpl_Compile" == __name__ SimpleBooleanImpl_Compile = sys.modules[__name__] @@ -42,22 +36,22 @@ def __dafnystr__(self) -> str: return "SimpleBooleanImpl_Compile._default" @staticmethod def GetBoolean(config, input): - print(f"\n this is input from SimpleBooleanImpl GetBoolean {input}") - output: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(Dafny.Simpletypes.Boolean.Types.GetBooleanOutput.default())() + output: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default( + TestModels.SimpleTypes.SimpleBoolean.runtimes.python.src.simple_boolean.dafny_generated.simple.types.boolean.internaldafny.types.GetBooleanOutput.default())() if not(((input).value).is_Some): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(15,4): " + _dafny.string_of(_dafny.Seq("expectation violation")) - ) + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(17,4): " + ( + _dafny.SeqWithoutIsStrInference(map(_dafny.CodePoint, "expectation violation"))).VerbatimString(False)) if not(((((input).value).value) == (True)) or ((((input).value).value) == (False))): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(17,4): " + _dafny.string_of(_dafny.Seq("expectation violation")) - ) - d_0_res_: Dafny.Simpletypes.Boolean.Types.GetBooleanOutput - d_0_res_ = Dafny.Simpletypes.Boolean.Types.GetBooleanOutput_GetBooleanOutput((input).value) + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(19,4): " + ( + _dafny.SeqWithoutIsStrInference(map(_dafny.CodePoint, "expectation violation"))).VerbatimString(False)) + d_0_res_: TestModels.SimpleTypes.SimpleBoolean.runtimes.python.src.simple_boolean.dafny_generated.simple.types.boolean.internaldafny.types.GetBooleanOutput + d_0_res_ = TestModels.SimpleTypes.SimpleBoolean.runtimes.python.src.simple_boolean.dafny_generated.simple.types.boolean.internaldafny.types.GetBooleanOutput_GetBooleanOutput((input).value) if not(((((d_0_res_).value).value) == (True)) or ((((d_0_res_).value).value) == (False))): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(20,4): " + _dafny.string_of(_dafny.Seq("expectation violation")) - ) + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(22,4): " + ( + _dafny.SeqWithoutIsStrInference(map(_dafny.CodePoint, "expectation violation"))).VerbatimString(False)) if not((((input).value).value) == (((d_0_res_).value).value)): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(22,4): " + _dafny.string_of(_dafny.Seq("expectation violation")) - ) + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(24,4): " + ( + _dafny.SeqWithoutIsStrInference(map(_dafny.CodePoint, "expectation violation"))).VerbatimString(False)) output = Wrappers_Compile.Result_Success(d_0_res_) return output return output diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/ImplementationFromDafny-py/System_.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/System_.py similarity index 100% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/ImplementationFromDafny-py/System_.py rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/System_.py diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/__init__.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/__init__.py new file mode 100644 index 0000000000..95b3391388 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/__init__.py @@ -0,0 +1 @@ +from . import simple \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/__pycache__/__init__.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b249c28dd7a0f9f1960f46abdbcf29a6fddddc04 GIT binary patch literal 296 zcmZury-EW?5Z=9m5QH?6HV<%(^8#Waw%R0VY?kwOVvg(|vwO(CL8`Pqg7`L;l1i|$ z6H*ANGN(!BFwA^2^UcinG8&x;wx5r+9&`Tei<1>cusdh)EVR(l2rKWU6uOv-s{E2X zsN{AKTN@1CRmE0N$-P&x>v#7Xm`9`trfY1Yy@MN!tK str: - return '[' + ', '.join(map(string_of, self)) + ']' +# Convenience for translation when --unicode-char is enabled +def SeqWithoutIsStrInference(__iterable = None): + return Seq(__iterable, isStr = None) +class Array: def __init__(self, initValue, *dims): - self.arr = initValue + def create_structure(initValue, *dims): + return [initValue if len(dims) <= 1 else create_structure(initValue, *dims[1:]) for _ in range(dims[0])] self.dims = list(dims) - for i in reversed(self.dims): - self.arr = Array.Box([copy.copy(self.arr) for _ in range(i)]) + self.arr = create_structure(initValue, *dims) def __dafnystr__(self) -> str: - return '[' + ', '.join(map(string_of, self.arr)) + ']' + return f'array{self.dims}' def __str__(self): return self.__dafnystr__() @@ -280,6 +285,9 @@ def __hash__(self): def __eq__(self, other): return all(self[key] == other[key] for key in self.keys | other.keys) + def __ne__(self, other): + return not (self == other) + def __setattr__(self, key, value): raise TypeError("'Map' object is immutable") @@ -461,6 +469,7 @@ def __iter__(self): class defaults: bool = staticmethod(lambda: False) char = staticmethod(lambda: 'D') + codepoint = staticmethod(lambda: CodePoint(defaults.char())) int = staticmethod(lambda: 0) real = staticmethod(BigRational) pointer = staticmethod(lambda: None) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/ImplementationFromDafny-py/ImplementationFromDafny.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/dafny_generated.py similarity index 100% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/ImplementationFromDafny-py/ImplementationFromDafny.py rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/dafny_generated.py diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/ImplementationFromDafny-py/module_.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/module_.py similarity index 73% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/ImplementationFromDafny-py/module_.py rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/module_.py index 4629717d05..c5114085e1 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/ImplementationFromDafny-py/module_.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/module_.py @@ -6,9 +6,9 @@ import module_ import _dafny import System_ -import Dafny.Simpletypes.Boolean.Types +import simple.types.boolean.internaldafny.types import SimpleBooleanImpl_Compile -import Dafny.Simpletypes.Boolean +import simple.types.boolean.internaldafny.impl assert "module_" == __name__ module_ = sys.modules[__name__] diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/__init__.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/__init__.py new file mode 100644 index 0000000000..e7c7bace08 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/__init__.py @@ -0,0 +1 @@ +from . import types \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/__pycache__/__init__.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9a235393c135e767a891ef4b979438dcc93becf4 GIT binary patch literal 302 zcmZusJ5B>Z44v5(D2kLOsX4$l_yQ%QW!cYu&zAi1;Z^Zx(QwA>r1xhW9ypvL3u@Y7JEt#m~ z{w!rraak365lU{oi9vi;hesE7Ue^tQcRCvv{1(;}(~U#Y z5mv47n%4c&0WX}>R9gt0O|9X!&uPmGV`w1$sqY5`)*GAE16c}nA{eA=q e=*l?kG|j_^uk3$_7aV>{DdmTly`S=M&Wc}H*jVNO literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/__init__.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/__init__.py new file mode 100644 index 0000000000..91e7678c2a --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/__init__.py @@ -0,0 +1 @@ +from . import boolean \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/__pycache__/__init__.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..58cf1a5149f8e634f573e8434673e3cc01f6d54b GIT binary patch literal 310 zcmZusJ5B>Z44v7PAVErll#&B%gD-$mAX;b=8k*6vW5_D=lV?_FZomyFH~``{lqemd zqC-lT3U9LMuq^x8&)>Jn0{# z_3^#;25Way6>C8yC*Q@UZ{EJbZA6M-y2duzJGjEQNBx*0%N-N z8cl?GYlFc>4tT(q`xQW)OReQ}$Z5#~BQ+3r)x!~>>j#(BBRZryp&nRByJ1STu1!jv hhrAtKSg$*SGaB)&{V(y1&2K5C{1nrV|CEln;tzLyTowQT literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/__init__.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/__init__.py new file mode 100644 index 0000000000..f002fa7ce8 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/__init__.py @@ -0,0 +1 @@ +from . import internaldafny \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/__pycache__/__init__.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1e998e3efe8e9b2aa5a29dc3745569627ffe3c13 GIT binary patch literal 324 zcmZusy-EW?5Z=853Bn=R1|Q%W=LN(fq}3*|u{qY;iCMCL%v_l~>HVVL=5zK@TYx2ig2InKVGxE(1?p^6Ca-;p+iV!9g)pceM#XSS^N1EnM3f^7aWI=i oO{1)eO>^nfadu^#>@;4}EZ^LJ7A|u6Ejj0(Z2s|I(n(hQ0ft6l{r~^~ literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/internaldafny/__init__.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/internaldafny/__init__.py new file mode 100644 index 0000000000..82e57136ff --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/internaldafny/__init__.py @@ -0,0 +1 @@ +from . import impl, types \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/internaldafny/__pycache__/__init__.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/internaldafny/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0b1e604285b4ec085e047bc0077d49c23e837ca9 GIT binary patch literal 351 zcmZ`!yH3ME5WKU4ct~jxsj1wsKY%C@Ei?&Dnv?M@#LB(2cNX#=@CSSXqU28~kvl|1 zhm}efLSs?^( zTI(sSV1Y5+dW|N+ypP63pFHww?+um?sBx*bybf(zabTnh;^2N59lCsUt$IR-R3_A; z3d1*HZ>n8Fa-|u}pj7SZq|`-dw?~)O>&D;}9rFeKsqviQFPBn&iP`7>j}FY~=b#}SCT#+J|wq&`HT}P>%x>Rb?LD8miV*#}S1Tq{IkrX>wB-zs3l|_1& zWM`KML{J3}IuM0{9-TuEI=MBB{DU5P?2!^S6)`{n7e#>PMppp>nR)X*M}N*_QUuyZ|LmGhl8}GlAZ+pwIs6A84~a=k!6rKPqAfV0E;e^C#z>UPtw+$oSqYiNZux< zxr^!x3R68DVN(${qE3f%j}nADfnU({Gkmuc?3R8c0tJ3U%8V(jk^JOWI9$m~ zOkFD3cImEdvBa-yTP(T0)v#`tC`+xB9Lrp9Hf$>|FnPnS*C`_9db8$zCBSMNdBE)g z^3qzx0nQusx^0ze%YYk8b*E9Wt#WW~07EejZ@~B=v4}31L>EnAhv*4Yw4@EuOzcRy zY)UYrm@>emrJBkPc?2t-M0@EIW)iNUvZ>g?OLoPod1aI?Y^W3b9qIrc67LAD8sWR4 zVBsp>$B&GU+Qf*oZIU(eSO8_xG^}HprFw0nat{=M9ZQLVApB3M8E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u&8E*TRkj{9wjT7R1`R{|;ZL!- N&(Y@gi$go>{{y#jSyli5 literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/Boolean/__init__.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/internaldafny/impl.py similarity index 61% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/Boolean/__init__.py rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/internaldafny/impl.py index 9febb2cb14..7de8a1ab27 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/Boolean/__init__.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/internaldafny/impl.py @@ -6,26 +6,23 @@ import module_ import _dafny import System_ -from Dafny.Simpletypes.Boolean import Types -import Dafny.Simpletypes.Boolean -import SimpleBooleanImpl_Compile -import Wrappers_Compile +from . import types +from dafny_generated import SimpleBooleanImpl_Compile -assert "Dafny.Simpletypes.Boolean" == __name__ -Dafny.Simpletypes.Boolean = sys.modules[__name__] +# assert "simple.types.boolean.internaldafny.impl" == __name__ -class SimpleBooleanClient(Dafny.Simpletypes.Boolean.Types.ISimpleBooleanClient): +class SimpleBooleanClient(simple.types.boolean.internaldafny.types.ISimpleBooleanClient): def __init__(self): self._config: SimpleBooleanImpl_Compile.Config = SimpleBooleanImpl_Compile.Config_Config.default()() pass def __dafnystr__(self) -> str: - return "Dafny.Simpletypes.Boolean_Compile.SimpleBooleanClient" + return "simple.types.boolean.internaldafny.impl_Compile.SimpleBooleanClient" def ctor__(self, config): (self)._config = config def GetBoolean(self, input): - output: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(Dafny.Simpletypes.Boolean.Types.GetBooleanOutput.default())() + output: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(simple.types.boolean.internaldafny.types.GetBooleanOutput.default())() out0_: Wrappers_Compile.Result out0_ = SimpleBooleanImpl_Compile.default__.GetBoolean((self).config, input) output = out0_ @@ -40,16 +37,16 @@ def __init__(self): pass def __dafnystr__(self) -> str: - return "Dafny.Simpletypes.Boolean_Compile._default" + return "simple.types.boolean.internaldafny.impl_Compile._default" @staticmethod def DefaultSimpleBooleanConfig(): - return Dafny.Simpletypes.Boolean.Types.SimpleBooleanConfig_SimpleBooleanConfig() + return simple.types.boolean.internaldafny.types.SimpleBooleanConfig_SimpleBooleanConfig() @staticmethod def SimpleBoolean(config): res: Wrappers_Compile.Result = None - d_1_client_: Dafny.Simpletypes.Boolean.SimpleBooleanClient - nw0_ = Dafny.Simpletypes.Boolean.SimpleBooleanClient() + d_1_client_: simple.types.boolean.internaldafny.impl.SimpleBooleanClient + nw0_ = simple.types.boolean.internaldafny.impl.SimpleBooleanClient() nw0_.ctor__(SimpleBooleanImpl_Compile.Config_Config()) d_1_client_ = nw0_ res = Wrappers_Compile.Result_Success(d_1_client_) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/Boolean/Types/__init__.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/internaldafny/types.py similarity index 57% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/Boolean/Types/__init__.py rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/internaldafny/types.py index 2dabba34e7..b93faea1dc 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/Boolean/Types/__init__.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/internaldafny/types.py @@ -6,12 +6,8 @@ import module_ import _dafny import System_ -import Wrappers_Compile -import Dafny.Simpletypes.Boolean.Types - -# assert "Dafny.Simpletypes.Boolean.Types" == __name__ -# Dafny.Simpletypes.Boolean.Types = sys.modules[__name__] +# assert "simple.types.boolean.internaldafny.types" == __name__ class DafnyCallEvent: @classmethod @@ -21,13 +17,13 @@ def __ne__(self, __o: object) -> bool: return not self.__eq__(__o) @property def is_DafnyCallEvent(self) -> bool: - return isinstance(self, Dafny.Simpletypes.Boolean.Types.DafnyCallEvent_DafnyCallEvent) + return isinstance(self, simple.types.boolean.internaldafny.types.DafnyCallEvent_DafnyCallEvent) class DafnyCallEvent_DafnyCallEvent(DafnyCallEvent, NamedTuple('DafnyCallEvent', [('input', Any), ('output', Any)])): def __dafnystr__(self) -> str: - return f'Dafny.Simpletypes.Boolean.Types_Compile.DafnyCallEvent.DafnyCallEvent({_dafny.string_of(self.input)}, {_dafny.string_of(self.output)})' + return f'simple.types.boolean.internaldafny.types_Compile.DafnyCallEvent.DafnyCallEvent({_dafny.string_of(self.input)}, {_dafny.string_of(self.output)})' def __eq__(self, __o: object) -> bool: - return isinstance(__o, Dafny.Simpletypes.Boolean.Types.DafnyCallEvent_DafnyCallEvent) and self.input == __o.input and self.output == __o.output + return isinstance(__o, simple.types.boolean.internaldafny.types.DafnyCallEvent_DafnyCallEvent) and self.input == __o.input and self.output == __o.output def __hash__(self) -> int: return super().__hash__() @@ -40,13 +36,13 @@ def __ne__(self, __o: object) -> bool: return not self.__eq__(__o) @property def is_GetBooleanInput(self) -> bool: - return isinstance(self, Dafny.Simpletypes.Boolean.Types.GetBooleanInput_GetBooleanInput) + return isinstance(self, simple.types.boolean.internaldafny.types.GetBooleanInput_GetBooleanInput) class GetBooleanInput_GetBooleanInput(GetBooleanInput, NamedTuple('GetBooleanInput', [('value', Any)])): def __dafnystr__(self) -> str: - return f'Dafny.Simpletypes.Boolean.Types_Compile.GetBooleanInput.GetBooleanInput({_dafny.string_of(self.value)})' + return f'simple.types.boolean.internaldafny.types_Compile.GetBooleanInput.GetBooleanInput({_dafny.string_of(self.value)})' def __eq__(self, __o: object) -> bool: - return isinstance(__o, Dafny.Simpletypes.Boolean.Types.GetBooleanInput_GetBooleanInput) and self.value == __o.value + return isinstance(__o, simple.types.boolean.internaldafny.types.GetBooleanInput_GetBooleanInput) and self.value == __o.value def __hash__(self) -> int: return super().__hash__() @@ -59,13 +55,13 @@ def __ne__(self, __o: object) -> bool: return not self.__eq__(__o) @property def is_GetBooleanOutput(self) -> bool: - return isinstance(self, Dafny.Simpletypes.Boolean.Types.GetBooleanOutput_GetBooleanOutput) + return isinstance(self, simple.types.boolean.internaldafny.types.GetBooleanOutput_GetBooleanOutput) class GetBooleanOutput_GetBooleanOutput(GetBooleanOutput, NamedTuple('GetBooleanOutput', [('value', Any)])): def __dafnystr__(self) -> str: - return f'Dafny.Simpletypes.Boolean.Types_Compile.GetBooleanOutput.GetBooleanOutput({_dafny.string_of(self.value)})' + return f'simple.types.boolean.internaldafny.types_Compile.GetBooleanOutput.GetBooleanOutput({_dafny.string_of(self.value)})' def __eq__(self, __o: object) -> bool: - return isinstance(__o, Dafny.Simpletypes.Boolean.Types.GetBooleanOutput_GetBooleanOutput) and self.value == __o.value + return isinstance(__o, simple.types.boolean.internaldafny.types.GetBooleanOutput_GetBooleanOutput) and self.value == __o.value def __hash__(self) -> int: return super().__hash__() @@ -75,7 +71,7 @@ def __init__(self): pass def __dafnystr__(self) -> str: - return "Dafny.Simpletypes.Boolean.Types_Compile.ISimpleBooleanClientCallHistory" + return "simple.types.boolean.internaldafny.types_Compile.ISimpleBooleanClientCallHistory" class ISimpleBooleanClient: pass @@ -94,13 +90,13 @@ def __ne__(self, __o: object) -> bool: return not self.__eq__(__o) @property def is_SimpleBooleanConfig(self) -> bool: - return isinstance(self, Dafny.Simpletypes.Boolean.Types.SimpleBooleanConfig_SimpleBooleanConfig) + return isinstance(self, simple.types.boolean.internaldafny.types.SimpleBooleanConfig_SimpleBooleanConfig) class SimpleBooleanConfig_SimpleBooleanConfig(SimpleBooleanConfig, NamedTuple('SimpleBooleanConfig', [])): def __dafnystr__(self) -> str: - return f'Dafny.Simpletypes.Boolean.Types_Compile.SimpleBooleanConfig.SimpleBooleanConfig' + return f'simple.types.boolean.internaldafny.types_Compile.SimpleBooleanConfig.SimpleBooleanConfig' def __eq__(self, __o: object) -> bool: - return isinstance(__o, Dafny.Simpletypes.Boolean.Types.SimpleBooleanConfig_SimpleBooleanConfig) + return isinstance(__o, simple.types.boolean.internaldafny.types.SimpleBooleanConfig_SimpleBooleanConfig) def __hash__(self) -> int: return super().__hash__() @@ -108,29 +104,29 @@ def __hash__(self) -> int: class Error: @classmethod def default(cls, ): - return lambda: Error_CollectionOfErrors(_dafny.Seq({})) + return lambda: Error_CollectionOfErrors(_dafny.Seq({}), _dafny.Seq({})) def __ne__(self, __o: object) -> bool: return not self.__eq__(__o) @property def is_CollectionOfErrors(self) -> bool: - return isinstance(self, Dafny.Simpletypes.Boolean.Types.Error_CollectionOfErrors) + return isinstance(self, simple.types.boolean.internaldafny.types.Error_CollectionOfErrors) @property def is_Opaque(self) -> bool: - return isinstance(self, Dafny.Simpletypes.Boolean.Types.Error_Opaque) + return isinstance(self, simple.types.boolean.internaldafny.types.Error_Opaque) -class Error_CollectionOfErrors(Error, NamedTuple('CollectionOfErrors', [('list', Any)])): +class Error_CollectionOfErrors(Error, NamedTuple('CollectionOfErrors', [('list', Any), ('message', Any)])): def __dafnystr__(self) -> str: - return f'Dafny.Simpletypes.Boolean.Types_Compile.Error.CollectionOfErrors({_dafny.string_of(self.list)})' + return f'simple.types.boolean.internaldafny.types_Compile.Error.CollectionOfErrors({_dafny.string_of(self.list)}, {self.message.VerbatimString(True)})' def __eq__(self, __o: object) -> bool: - return isinstance(__o, Dafny.Simpletypes.Boolean.Types.Error_CollectionOfErrors) and self.list == __o.list + return isinstance(__o, simple.types.boolean.internaldafny.types.Error_CollectionOfErrors) and self.list == __o.list and self.message == __o.message def __hash__(self) -> int: return super().__hash__() class Error_Opaque(Error, NamedTuple('Opaque', [('obj', Any)])): def __dafnystr__(self) -> str: - return f'Dafny.Simpletypes.Boolean.Types_Compile.Error.Opaque({_dafny.string_of(self.obj)})' + return f'simple.types.boolean.internaldafny.types_Compile.Error.Opaque({_dafny.string_of(self.obj)})' def __eq__(self, __o: object) -> bool: - return isinstance(__o, Dafny.Simpletypes.Boolean.Types.Error_Opaque) and self.obj == __o.obj + return isinstance(__o, simple.types.boolean.internaldafny.types.Error_Opaque) and self.obj == __o.obj def __hash__(self) -> int: return super().__hash__() @@ -143,5 +139,5 @@ def __dafnystr__(self) -> str: return "" @staticmethod def default(): - return Dafny.Simpletypes.Boolean.Types.Error_CollectionOfErrors.default()() + return simple.types.boolean.internaldafny.types.Error_CollectionOfErrors.default()() diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/SimpleBooleanImplTest_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/SimpleBooleanImplTest_Compile.py similarity index 59% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/SimpleBooleanImplTest_Compile.py rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/SimpleBooleanImplTest_Compile.py index 02a7d30bf6..3d9e9a058e 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/SimpleBooleanImplTest_Compile.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/SimpleBooleanImplTest_Compile.py @@ -6,8 +6,8 @@ import module_ import _dafny import System_ -import Dafny.Simpletypes.Boolean -import Wrappers_Compile + +import simpleboolean assert "SimpleBooleanImplTest_Compile" == __name__ SimpleBooleanImplTest_Compile = sys.modules[__name__] @@ -20,63 +20,55 @@ def __dafnystr__(self) -> str: return "SimpleBooleanImplTest_Compile._default" @staticmethod def GetBooleanTrue(): - d_0_client_: Dafny.Simpletypes.Boolean.SimpleBooleanClient + d_0_client_: simpleboolean.simple.types.boolean.internaldafny.impl.SimpleBooleanClient d_1_valueOrError0_: Wrappers_Compile.Result = None out0_: Wrappers_Compile.Result - out0_ = Dafny.Simpletypes.Boolean.default__.SimpleBoolean(Dafny.Simpletypes.Boolean.default__.DefaultSimpleBooleanConfig()) + print(simpleboolean) + print(dir(simpleboolean)) + out0_ = simpleboolean.dafny_generated.simple.types.boolean.internaldafny.impl.default__.SimpleBoolean(simple.types.boolean.internaldafny.impl.default__.DefaultSimpleBooleanConfig()) d_1_valueOrError0_ = out0_ if not(not((d_1_valueOrError0_).IsFailure())): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(8,19): " + _dafny.string_of(d_1_valueOrError0_) - ) + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(10,19): " + _dafny.string_of(d_1_valueOrError0_)) d_0_client_ = (d_1_valueOrError0_).Extract() SimpleBooleanImplTest_Compile.default__.TestGetBooleanTrue(d_0_client_) @staticmethod def GetBooleanFalse(): - d_2_client_: Dafny.Simpletypes.Boolean.SimpleBooleanClient + d_2_client_: simple.types.boolean.internaldafny.impl.SimpleBooleanClient d_3_valueOrError0_: Wrappers_Compile.Result = None out1_: Wrappers_Compile.Result - out1_ = Dafny.Simpletypes.Boolean.default__.SimpleBoolean(Dafny.Simpletypes.Boolean.default__.DefaultSimpleBooleanConfig()) + out1_ = simple.types.boolean.internaldafny.impl.default__.SimpleBoolean(simple.types.boolean.internaldafny.impl.default__.DefaultSimpleBooleanConfig()) d_3_valueOrError0_ = out1_ if not(not((d_3_valueOrError0_).IsFailure())): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(12,19): " + _dafny.string_of(d_3_valueOrError0_) - ) + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(14,19): " + _dafny.string_of(d_3_valueOrError0_)) d_2_client_ = (d_3_valueOrError0_).Extract() SimpleBooleanImplTest_Compile.default__.TestGetBooleanFalse(d_2_client_) @staticmethod def TestGetBooleanTrue(client): - d_4_ret_: Dafny.Simpletypes.Boolean.Types.GetBooleanOutput - d_5_valueOrError0_: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(Dafny.Simpletypes.Boolean.Types.GetBooleanOutput.default())() + d_4_ret_: simple.types.boolean.internaldafny.types.GetBooleanOutput + d_5_valueOrError0_: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(simple.types.boolean.internaldafny.types.GetBooleanOutput.default())() out2_: Wrappers_Compile.Result - print(f"\n this is client {client}") - out2_ = (client).GetBoolean(Dafny.Simpletypes.Boolean.Types.GetBooleanInput_GetBooleanInput(Wrappers_Compile.Option_Some(True))) - print(f"\n this is out2 {out2_}") + out2_ = (client).GetBoolean(simple.types.boolean.internaldafny.types.GetBooleanInput_GetBooleanInput(Wrappers_Compile.Option_Some(True))) d_5_valueOrError0_ = out2_ if not(not((d_5_valueOrError0_).IsFailure())): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(21,16): " + _dafny.string_of(d_5_valueOrError0_) - ) + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(23,16): " + _dafny.string_of(d_5_valueOrError0_)) d_4_ret_ = (d_5_valueOrError0_).Extract() if not((((d_4_ret_).value).UnwrapOr(False)) == (True)): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(22,8): " + _dafny.string_of(_dafny.Seq("expectation violation")) - ) - _dafny.print(_dafny.string_of(d_4_ret_) - ) + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(24,8): " + _dafny.string_of(_dafny.Seq("expectation violation"))) + _dafny.print(_dafny.string_of(d_4_ret_)) @staticmethod def TestGetBooleanFalse(client): - d_6_ret_: Dafny.Simpletypes.Boolean.Types.GetBooleanOutput - d_7_valueOrError0_: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(Dafny.Simpletypes.Boolean.Types.GetBooleanOutput.default())() + d_6_ret_: simple.types.boolean.internaldafny.types.GetBooleanOutput + d_7_valueOrError0_: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(simple.types.boolean.internaldafny.types.GetBooleanOutput.default())() out3_: Wrappers_Compile.Result - out3_ = (client).GetBoolean(Dafny.Simpletypes.Boolean.Types.GetBooleanInput_GetBooleanInput(Wrappers_Compile.Option_Some(False))) + out3_ = (client).GetBoolean(simple.types.boolean.internaldafny.types.GetBooleanInput_GetBooleanInput(Wrappers_Compile.Option_Some(False))) d_7_valueOrError0_ = out3_ if not(not((d_7_valueOrError0_).IsFailure())): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(31,16): " + _dafny.string_of(d_7_valueOrError0_) - ) + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(33,16): " + _dafny.string_of(d_7_valueOrError0_)) d_6_ret_ = (d_7_valueOrError0_).Extract() if not((((d_6_ret_).value).UnwrapOr(True)) == (False)): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(32,8): " + _dafny.string_of(_dafny.Seq("expectation violation")) - ) - _dafny.print(_dafny.string_of(d_6_ret_) - ) + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(34,8): " + _dafny.string_of(_dafny.Seq("expectation violation"))) + _dafny.print(_dafny.string_of(d_6_ret_)) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/System_.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/System_.py similarity index 100% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/System_.py rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/System_.py diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/WrappedSimpleTypesBooleanTest_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/WrappedSimpleTypesBooleanTest_Compile.py similarity index 66% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/WrappedSimpleTypesBooleanTest_Compile.py rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/WrappedSimpleTypesBooleanTest_Compile.py index 88be6eff12..7efa7c4686 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/WrappedSimpleTypesBooleanTest_Compile.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/WrappedSimpleTypesBooleanTest_Compile.py @@ -7,7 +7,7 @@ import _dafny import System_ import SimpleBooleanImplTest_Compile -import Dafny.Simpletypes.Boolean.Wrapped +import simple.types.boolean.internaldafny.wrapped assert "WrappedSimpleTypesBooleanTest_Compile" == __name__ WrappedSimpleTypesBooleanTest_Compile = sys.modules[__name__] @@ -20,28 +20,25 @@ def __dafnystr__(self) -> str: return "WrappedSimpleTypesBooleanTest_Compile._default" @staticmethod def GetBooleanTrue(): - d_8_client_: Dafny.Simpletypes.Boolean.Types.ISimpleBooleanClient + d_8_client_: simple.types.boolean.internaldafny.types.ISimpleBooleanClient d_9_valueOrError0_: Wrappers_Compile.Result = None out4_: Wrappers_Compile.Result - out4_ = Dafny.Simpletypes.Boolean.Wrapped.default__.WrappedSimpleBoolean(Dafny.Simpletypes.Boolean.Wrapped.default__.WrappedDefaultSimpleBooleanConfig()) + out4_ = simple.types.boolean.internaldafny.wrapped.default__.WrappedSimpleBoolean(simple.types.boolean.internaldafny.wrapped.default__.WrappedDefaultSimpleBooleanConfig()) d_9_valueOrError0_ = out4_ - print(f"this is {d_9_valueOrError0_}") if not(not((d_9_valueOrError0_).IsFailure())): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/WrappedSimpleBooleanTest.dfy(9,19): " + _dafny.string_of(d_9_valueOrError0_) - ) + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/WrappedSimpleBooleanTest.dfy(11,19): " + _dafny.string_of(d_9_valueOrError0_)) d_8_client_ = (d_9_valueOrError0_).Extract() SimpleBooleanImplTest_Compile.default__.TestGetBooleanTrue(d_8_client_) @staticmethod def GetBooleanFalse(): - d_10_client_: Dafny.Simpletypes.Boolean.Types.ISimpleBooleanClient + d_10_client_: simple.types.boolean.internaldafny.types.ISimpleBooleanClient d_11_valueOrError0_: Wrappers_Compile.Result = None out5_: Wrappers_Compile.Result - out5_ = Dafny.Simpletypes.Boolean.Wrapped.default__.WrappedSimpleBoolean(Dafny.Simpletypes.Boolean.Wrapped.default__.WrappedDefaultSimpleBooleanConfig()) + out5_ = simple.types.boolean.internaldafny.wrapped.default__.WrappedSimpleBoolean(simple.types.boolean.internaldafny.wrapped.default__.WrappedDefaultSimpleBooleanConfig()) d_11_valueOrError0_ = out5_ if not(not((d_11_valueOrError0_).IsFailure())): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/WrappedSimpleBooleanTest.dfy(13,19): " + _dafny.string_of(d_11_valueOrError0_) - ) + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/WrappedSimpleBooleanTest.dfy(15,19): " + _dafny.string_of(d_11_valueOrError0_)) d_10_client_ = (d_11_valueOrError0_).Extract() SimpleBooleanImplTest_Compile.default__.TestGetBooleanFalse(d_10_client_) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/__pycache__/SimpleBooleanImplTest_Compile.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/__pycache__/SimpleBooleanImplTest_Compile.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a12d9301ee685d43130784cc13287fded0344cbc GIT binary patch literal 7399 zcmeHM&2JRR6|e63>ajg`+XIGWan>w`*y3Xt+lvW=WWiuQc4M2hVK<|NW|(fn3_TxP z-2>QbC)SDshvb$GIgX+Y0TD$x4^H59|s> zgabA0SM^?1z53{WzxS&A$4I1&K>E|_9d)6bkbfZKB!9i|^!HG>OH`r?I!RzI>Oxjb zh*@94m-Q$7*+3#7pxmbiv!O(Ym;Jhw4JX39Ea+{CHr~HI(a!UZLbk#>DTIX9%ktAf1oFZ!QHc>aHkr(7>TI!~YeNDH%<1_&#X>4y%$cljCY^ zJgXU|GM>*C(z=#HUspDJqpIZ^f9_9p^bQ1#y?_n_57 zr!Pr_KpNN}l|TxMTh}%W($EHJn<~MA!z`?7bIGD^DoRRl^%H_+AN)NH0>L*2jfKev zn3MhM6*~w3;2zQlMB0F_?q`C^&x2l z^wLfs_HI!em~|)$Uyfl?m|k!5^cwOgc9MX=6uZXCU1PKd7|#cUFNVLNVfd8r4J{F~ z=?$9B2L{dVf&8IcCwSWhpg}!7zt08@P1-X!3!XBLy_1ZqHG}iCYjMl%60XcHg`HA~ zqlm*fx#_kfFQc>F(bJrJ&BMF0C1FumB8#Nd(cHr+dwbF$^KGXFW{2;YC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S-{EgFujp6By(}e4k;N--scbX%0r#buTo#u$`H0cO@ z0(2C}ke~h(GW0QHt$fS~_b~@s`IvpsZ=vsbK8BxKjzW{y+R1RYk`uUJ!3+R*7k4Z` zq1-*goy^Q@;ABozVbWjH&_tvMd5;y;!&2OgQ9r-PJ=+0KbthKQ9O9E za2jq)O}J?_C>|YIsJ_Acih_k^<_%NJDs(IMJ=N5};P(~wzTv6Ho&cVbo=HEpb^L_R z0E^!TX p-S-Epq2aRg)cSXR)qel9)eqC?Tk{_lU>`S?byiO%E;I-c_L$?NJ(mOiGE6AT3%&*dTL&3QDRAI%4TLJ GKV|@(9S~#y delta 49 zcmcb@b&-pEIWI340}#|CxoqTaWn`?KJdrU`FeJ6Oq}Z(}Ki4HOEw3`ZpmH-ClOHnx DVdf6@ diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/__pycache__/WrappedSimpleTypesBooleanTest_Compile.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/__pycache__/WrappedSimpleTypesBooleanTest_Compile.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..5d555002fa24758a9a2b24ce5de46ec4eaec8bc2 GIT binary patch literal 3753 zcmeHJTW=Fb6rNq*)`?A=m?qpCu8m7&lMpDkwv-SqZDPu$t=LxDF5WS5SnrzIb-`&+ zBb0~yfJ*eCs(7NJ^nr)|0DgiK8O0h22?_O~Z=s>8#8b~1dlPSy7NoXs%+7u@bLM)^ z%=u=1h{xLq1o`2N@ts1*6D)Wk*vu^c2$@^NAckZT6;s)iin1yf18SfcRD;Ek8j?^R zFvG=&8WH)RsT8AXROBVIO>GnX+tqfF#?+Wd<7!-_Yt#-SL=#tJoYRp%AU7pS#yguU zAT+Vw%M!IqCMSszo+d`*4z#}~`e3!1G^Fz+rTmJ8Y%0i=A>B0fOD5%k_pJ(#T&R@j zCpzP8S-nV&3+0kYQxXs5P1|Oe$=PMg^MxWbz&_3~+cv3gU7(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Vf=50Z7Fl*>aP7KP?39*dgL+r(%$N_9pp$S_nELwusni zSqzeEZ<6n)g`mg8Dnev2xJiDW76R6860!JG3{uTE$@kMj(32Q_cs;ldT)K<-xynU6 zy{3bDr^tFx1C<(~!JI0JR*+)kSxt0PZ6MET9O+MSb$|guPp{A>Zrlsc$%i%=zs!Aj z#f4eOAqOvlqQ@MTxQibA7xXWfS!S`Rli(@0KrWKK?5mC)O)kEA_3HOtRlTq3epRjN z2uS&N#d(Pl`XrT{v@c-uB<#FE4stLw03h@Y_xMcRJIZBBt2-SJ#|1i&duxz`)qLfr%TIj6LD|2D+4j5~&mx{Vg` zB3e>!qea{(ugibEdn4ALHG5K2@F^nni!3h9U|r$DW52)LHrf zROQrZf$c~Er}g^Qig`1lJTh6Y?X{i2H!slWejJ46V!-c*%x+UN3|Qg?JX|p6XcS)y z9Lged*7cwQSyYZ^f`C!mH#yYddSDKdcmW*7aLLRvXmzMhxgAqyuYM{_w)C^ijpBCT zh3B|@$O_D;4x*0+wdOXjHlI&CJN$C`>EyG?9pfgPL63|(H+azDwpU-U8HBi7-@^L3 z>`&vMP@^Ogg*XXazr$ruIgvtkm={0@;@R;6FG^T;W6EPFCgLTj7rnsgG1}rXAwg{3 zc__+RJ=44s0i^SGkHxK)sLB4cfUeoDFIQ2$1i4&XYSS=w17Bb&w2-@g3{Ghj*&Qkf zU2H(ijE9+^G7t+ z&qj)>{cLOy4cF4F=YOehO3>(GtvRYS`LGBqMo12UD8ef{&xmsWoJMuttZV{;ZyroJE30RInBEI;f3 literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/module_.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/__pycache__/module_.cpython-311.pyc similarity index 58% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__pycache__/module_.cpython-311.pyc rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/__pycache__/module_.cpython-311.pyc index b6260ca33320ec87524502a793cd6028eb2cff9e..543e0dbf8e57e838b47dcc9051000ed98ad43622 100644 GIT binary patch delta 1247 zcmd5+%}*0S6yKQwSw6OX-L9pgD-Z*M(jtBYZf#Eu7$r4oOoZUdPN782`>5E3rG>_U<9#}DW}eS-|m zA-2@|cgC8@qiRP|hLx6+X?gJBnjeY~%FAB^aH$|jRdS2p+bPG=(fY|68mm@;89ab>cn(+Zqr zkX(b&RT%Xk%OLAQ_CHN|;a^UOACy4%CDb?_sHicf^0O)RT*q6IG>P+gQy5zy2hR)S z;Cq-yEMO9-3X}`f$ecivcuF8)IO>^d7bY?-IIek?!gWAY+NnnmM&BZ!8_{(CP`x09 zt_GwA^#Q+9yVQ=OB(8p`nX6unUTwWRbllF*6bmHb%oT~9xG_6hAcmF5TMj8%Mxpi+ zB<_}sVv(5d8+Kw#ojjd>YK=Dy@(tp@{e`y07NY~M^kc0{eeTaiU&Y#!NhDhPv#!?o K&A)hS9e)RfN}3V? delta 1361 zcmd5+&rcIU6rP#3G+Ws1?6$kb$cn^JN`x9P2q!^IOKG|#ib^0v z6Av7yqX!S(Fy7%{V)P&IK(@^$G$a@jL*j9pKGwS+R8%#MvkZ62Zt^brr)z>%vZ02$w&4VD9LKNGf)o0Yb4vx(a`aZdsF zw1CrVT&N>q0MEgE#;B4l;<$n1XR8Mb2R*QY0LvCY47V**n*u%JAfljs08})E z_UtKZvsv`aX0vDk(TFZr!d0@_xXW>l+e}3hHnS(nA~wPRNAE;{qj!SkEEi4UWYWh0 zAYa9AkSDLC8&~?Fhx%RV$?!^U4Irb0=?atN(zl4DNFaR)j5BR=-tWbbW+RC zr8PZzb7m%~DXHlFjFL`k>Xyd|$<$HNR>iF+SuK+yFGJ0~4(fpP)qjyMp{4nV0S>GP xnv6p$0(Q}PcD#5cR`AvshgS5l%a>OsOkeGy*K!X+NcaAKEIIzY6IPv)eghK6f8ziE diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/_dafny.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/_dafny.py similarity index 94% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/_dafny.py rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/_dafny.py index e23cd1aa9e..2bcd742785 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/_dafny.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/_dafny.py @@ -8,7 +8,6 @@ from functools import reduce from types import GeneratorType, FunctionType from itertools import chain, combinations, count -import copy class classproperty(property): def __get__(self, instance, owner): @@ -90,6 +89,12 @@ def __escaped__(self): def __dafnystr__(self): return f"'{self.__escaped__()}'" + def __add__(self, other): + return CodePoint(plus_char(self, other)) + + def __sub__(self, other): + return CodePoint(minus_char(self, other)) + class Seq(tuple): def __init__(self, __iterable = None, isStr = False): ''' @@ -107,7 +112,7 @@ def __init__(self, __iterable = None, isStr = False): if __iterable is None: __iterable = [] if isStr is None: - self.isStr = False + self.isStr = None else: self.isStr = isStr \ or isinstance(__iterable, str) \ @@ -160,19 +165,19 @@ def __lt__(self, other): def __le__(self, other): return len(self) <= len(other) and self == other[:len(self)] -class Array: - class Box(list): - def __dafnystr__(self) -> str: - return '[' + ', '.join(map(string_of, self)) + ']' +# Convenience for translation when --unicode-char is enabled +def SeqWithoutIsStrInference(__iterable = None): + return Seq(__iterable, isStr = None) +class Array: def __init__(self, initValue, *dims): - self.arr = initValue + def create_structure(initValue, *dims): + return [initValue if len(dims) <= 1 else create_structure(initValue, *dims[1:]) for _ in range(dims[0])] self.dims = list(dims) - for i in reversed(self.dims): - self.arr = Array.Box([copy.copy(self.arr) for _ in range(i)]) + self.arr = create_structure(initValue, *dims) def __dafnystr__(self) -> str: - return '[' + ', '.join(map(string_of, self.arr)) + ']' + return f'array{self.dims}' def __str__(self): return self.__dafnystr__() @@ -280,6 +285,9 @@ def __hash__(self): def __eq__(self, other): return all(self[key] == other[key] for key in self.keys | other.keys) + def __ne__(self, other): + return not (self == other) + def __setattr__(self, key, value): raise TypeError("'Map' object is immutable") @@ -461,6 +469,7 @@ def __iter__(self): class defaults: bool = staticmethod(lambda: False) char = staticmethod(lambda: 'D') + codepoint = staticmethod(lambda: CodePoint(defaults.char())) int = staticmethod(lambda: 0) real = staticmethod(BigRational) pointer = staticmethod(lambda: None) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__init__.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/dafny_generated.py similarity index 57% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__init__.py rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/dafny_generated.py index 44f32aefaf..7fef7fc1c6 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/__init__.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/dafny_generated.py @@ -8,8 +8,8 @@ import _dafny try: - dafnyArgs = [_dafny.Seq(a) for a in sys.argv] - module_.default__.Main(dafnyArgs) + dafnyArgs = [_dafny.Seq(a) for a in sys.argv] + module_.default__.Test____Main____(dafnyArgs) except _dafny.HaltException as e: - _dafny.print("[Program halted] " + e.message + "\n") - sys.exit(1) + _dafny.print("[Program halted] " + e.message + "\n") + sys.exit(1) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/module_.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/module_.py similarity index 73% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/module_.py rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/module_.py index 3a6f596e0a..2dcf4297b9 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/module_.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/module_.py @@ -7,9 +7,8 @@ import _dafny import System_ import SimpleBooleanImplTest_Compile -import Dafny.Simpletypes.Boolean.Wrapped +import simple.types.boolean.internaldafny.wrapped import WrappedSimpleTypesBooleanTest_Compile -import Extern assert "module_" == __name__ module_ = sys.modules[__name__] @@ -21,82 +20,61 @@ def __init__(self): def __dafnystr__(self) -> str: return "_module._default" @staticmethod - def Main(noArgsParameter__): + def Test____Main____(noArgsParameter__): d_12_success_: bool d_12_success_ = True - _dafny.print(_dafny.string_of(_dafny.Seq("SimpleBooleanImplTest.GetBooleanTrue: ")) - ) + _dafny.print(_dafny.string_of(_dafny.Seq("SimpleBooleanImplTest.GetBooleanTrue: "))) try: if True: SimpleBooleanImplTest_Compile.default__.GetBooleanTrue() if True: - _dafny.print(_dafny.string_of(_dafny.Seq("PASSED\n")) - ) + _dafny.print(_dafny.string_of(_dafny.Seq("PASSED\n"))) except _dafny.HaltException as e: d_13_haltMessage_ = e.message if True: - _dafny.print(_dafny.string_of(_dafny.Seq("FAILED\n ")) - ) - _dafny.print(_dafny.string_of(d_13_haltMessage_) - ) - _dafny.print(_dafny.string_of(_dafny.Seq("\n")) - ) + _dafny.print(_dafny.string_of(_dafny.Seq("FAILED\n "))) + _dafny.print(_dafny.string_of(d_13_haltMessage_)) + _dafny.print(_dafny.string_of(_dafny.Seq("\n"))) d_12_success_ = False - _dafny.print(_dafny.string_of(_dafny.Seq("SimpleBooleanImplTest.GetBooleanFalse: ")) - ) + _dafny.print(_dafny.string_of(_dafny.Seq("SimpleBooleanImplTest.GetBooleanFalse: "))) try: if True: SimpleBooleanImplTest_Compile.default__.GetBooleanFalse() if True: - _dafny.print(_dafny.string_of(_dafny.Seq("PASSED\n")) - ) + _dafny.print(_dafny.string_of(_dafny.Seq("PASSED\n"))) except _dafny.HaltException as e: d_14_haltMessage_ = e.message if True: - _dafny.print(_dafny.string_of(_dafny.Seq("FAILED\n ")) - ) - _dafny.print(_dafny.string_of(d_14_haltMessage_) - ) - _dafny.print(_dafny.string_of(_dafny.Seq("\n")) - ) + _dafny.print(_dafny.string_of(_dafny.Seq("FAILED\n "))) + _dafny.print(_dafny.string_of(d_14_haltMessage_)) + _dafny.print(_dafny.string_of(_dafny.Seq("\n"))) d_12_success_ = False - _dafny.print(_dafny.string_of(_dafny.Seq("WrappedSimpleTypesBooleanTest.GetBooleanTrue: ")) - ) + _dafny.print(_dafny.string_of(_dafny.Seq("WrappedSimpleTypesBooleanTest.GetBooleanTrue: "))) try: if True: WrappedSimpleTypesBooleanTest_Compile.default__.GetBooleanTrue() if True: - _dafny.print(_dafny.string_of(_dafny.Seq("PASSED\n")) - ) + _dafny.print(_dafny.string_of(_dafny.Seq("PASSED\n"))) except _dafny.HaltException as e: d_15_haltMessage_ = e.message if True: - _dafny.print(_dafny.string_of(_dafny.Seq("FAILED\n ")) - ) - _dafny.print(_dafny.string_of(d_15_haltMessage_) - ) - _dafny.print(_dafny.string_of(_dafny.Seq("\n")) - ) + _dafny.print(_dafny.string_of(_dafny.Seq("FAILED\n "))) + _dafny.print(_dafny.string_of(d_15_haltMessage_)) + _dafny.print(_dafny.string_of(_dafny.Seq("\n"))) d_12_success_ = False - _dafny.print(_dafny.string_of(_dafny.Seq("WrappedSimpleTypesBooleanTest.GetBooleanFalse: ")) - ) + _dafny.print(_dafny.string_of(_dafny.Seq("WrappedSimpleTypesBooleanTest.GetBooleanFalse: "))) try: if True: WrappedSimpleTypesBooleanTest_Compile.default__.GetBooleanFalse() if True: - _dafny.print(_dafny.string_of(_dafny.Seq("PASSED\n")) - ) + _dafny.print(_dafny.string_of(_dafny.Seq("PASSED\n"))) except _dafny.HaltException as e: d_16_haltMessage_ = e.message if True: - _dafny.print(_dafny.string_of(_dafny.Seq("FAILED\n ")) - ) - _dafny.print(_dafny.string_of(d_16_haltMessage_) - ) - _dafny.print(_dafny.string_of(_dafny.Seq("\n")) - ) + _dafny.print(_dafny.string_of(_dafny.Seq("FAILED\n "))) + _dafny.print(_dafny.string_of(d_16_haltMessage_)) + _dafny.print(_dafny.string_of(_dafny.Seq("\n"))) d_12_success_ = False if not(d_12_success_): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(7,18): " + _dafny.string_of(_dafny.Seq("Test failures occurred: see above.\n")) - ) + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(3,0): " + _dafny.string_of(_dafny.Seq("Test failures occurred: see above.\n"))) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/simple/types/boolean/internaldafny/__pycache__/wrapped.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/simple/types/boolean/internaldafny/__pycache__/wrapped.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..411904092f9a6a2ad35b7ce8d42c5cf9e049f7f6 GIT binary patch literal 1765 zcma)6&5ImG6tC*-%svLc;hIeTxnBF(S?s5%(@w?`x0phCabP)b{>T zAKkVkz0H`hxX-9GKg`C`-5wY8iZH2W_c(hSEJui<5EB#{1W!?D5`$VpgP2n* zw5da^DY^@@?$>Kk=n@<5?#MMlhw+G&Q8d6yFG5N;;W=|aD5!hr9`4=)AuU1KP^bwn zJ^C^DTu?3oHX5V@l4rq9D)!5~2=3&3zhLoz21U-sY0it?V4I3^D<_nRpr=Dt_|*DG zRonpwNRkxH#kkys4NF)QXb_?uno%B?lmr!GfkrG?AQr437Az3!6l3W{QIaJP;lai- z*iLO*hd6`_VuI#g^Uyj26-kHFa>TR$ghX*~bPwMB|MW$hd0Heub+ot#Z^2<)UqR!^ zFRR0wQKSPFC5Jm-d;HGl_A4+`cp%{3{;ipRi*LZkQwgFuybYcsRD!JA-jeIRI*rht znycHn_lLUVYL|Ymrcw{_CYal{bSfyMt%;HDf*ILbp+>$|vAj{R4T{Wp&NcYgPy2Y&RcA0PYi z%!@U!-L|LlD1$sUw!2urdZt}=it%DJtCs(optakK6g zO(S`Ig`7{||E7w+&VPPg?XDx&1+b*}k@sG;<@@{wOi@WHegSc6VvOggG0}aF-kLpY z%+a;k>X@VFXRG4`txt5Hqt-{V!gP F{Xdpt)|CJN literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/Boolean/Wrapped/__init__.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/simple/types/boolean/internaldafny/wrapped.py similarity index 53% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/Boolean/Wrapped/__init__.py rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/simple/types/boolean/internaldafny/wrapped.py index 6ef4848f65..3a97b8cf40 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny_py/Dafny/Simpletypes/Boolean/Wrapped/__init__.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/simple/types/boolean/internaldafny/wrapped.py @@ -7,19 +7,16 @@ import _dafny import System_ import SimpleBooleanImplTest_Compile -import Dafny.Simpletypes.Boolean.Types - -assert "Dafny.Simpletypes.Boolean.Wrapped" == __name__ -Dafny.Simpletypes.Boolean.Wrapped = sys.modules[__name__] +assert "simple.types.boolean.internaldafny.wrapped" == __name__ class default__: def __init__(self): pass def __dafnystr__(self) -> str: - return "Dafny.Simpletypes.Boolean.Wrapped_Compile._default" + return "simple.types.boolean.internaldafny.wrapped_Compile._default" @staticmethod def WrappedDefaultSimpleBooleanConfig(): - return Dafny.Simpletypes.Boolean.Types.SimpleBooleanConfig_SimpleBooleanConfig() + return simple.types.boolean.internaldafny.types.SimpleBooleanConfig_SimpleBooleanConfig() diff --git a/TestModels/SimpleTypes/SimpleBoolean/smithy-build.json b/TestModels/SimpleTypes/SimpleBoolean/smithy-build.json index b37a07f8c0..cf46a33d0c 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/smithy-build.json +++ b/TestModels/SimpleTypes/SimpleBoolean/smithy-build.json @@ -3,7 +3,7 @@ "outputDirectory": "runtimes/python (outputDirectory doesn't work until Smithy/1425 is resolved; see SharedMakefile.mk)", "plugins": { "python-client-codegen": { - "service": "simpletypes.boolean#SimpleBoolean", + "service": "simple.types.boolean#SimpleBoolean", "module": "simple_boolean", "moduleVersion": "0.0.1", "protocol": "aws.polymorph#localService" diff --git a/TestModels/SimpleTypes/SimpleBoolean/src/Index.dfy b/TestModels/SimpleTypes/SimpleBoolean/src/Index.dfy index e42e378ccf..e4db237ec6 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/src/Index.dfy +++ b/TestModels/SimpleTypes/SimpleBoolean/src/Index.dfy @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 include "SimpleBooleanImpl.dfy" -module {:extern "simple.types.boolean.internaldafny" } SimpleBoolean refines AbstractSimpleTypesBooleanService { +module {:extern "simple.types.boolean.internaldafny.impl" } SimpleBoolean refines AbstractSimpleTypesBooleanService { import Operations = SimpleBooleanImpl function method DefaultSimpleBooleanConfig(): SimpleBooleanConfig { diff --git a/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy b/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy index 3a4e8bea59..8132f4331f 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy +++ b/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 include "../Model/SimpleTypesBooleanTypes.dfy" -module SimpleBooleanImpl refines AbstractSimpletypesBooleanOperations { +module SimpleBooleanImpl refines AbstractSimpleTypesBooleanOperations { datatype Config = Config type InternalConfig = Config predicate ValidInternalConfig?(config: InternalConfig) diff --git a/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy b/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy index 374ae01ebe..34d3982fa4 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy +++ b/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy @@ -4,7 +4,7 @@ include "../src/Index.dfy" module SimpleBooleanImplTest { import SimpleBoolean - import opened SimpletypesBooleanTypes + import opened SimpleTypesBooleanTypes import opened Wrappers method{:test} GetBooleanTrue(){ var client :- expect SimpleBoolean.SimpleBoolean(); From b006f11f0127f1a52a228ad4bb3893b8e58c2b61 Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Tue, 13 Jun 2023 15:15:21 -0700 Subject: [PATCH 014/673] add src-goal --- .../runtimes/python/src-goal/__init__.py | 0 .../python/src-goal/dafny_generated/Extern.py | 22 + .../python/src-goal/dafny_generated/Shim.py | 28 ++ .../SimpleBooleanImplTest_Compile.py | 73 +++ .../SimpleBooleanImpl_Compile.py | 60 +++ .../StandardLibrary_Compile.py | 193 +++++++ .../StandardLibrary_mUInt_Compile.py | 208 ++++++++ .../src-goal/dafny_generated/System_.py | 20 + .../python/src-goal/dafny_generated/UTF8.py | 118 +++++ .../WrappedSimpleTypesBooleanTest_Compile.py | 44 ++ .../dafny_generated/Wrappers_Compile.py | 190 +++++++ .../__pycache__/Extern.cpython-311.pyc | Bin 0 -> 1409 bytes .../__pycache__/Shim.cpython-311.pyc | Bin 0 -> 2243 bytes ...pleBooleanImplTest_Compile.cpython-311.pyc | Bin 0 -> 7203 bytes .../SimpleBooleanImpl_Compile.cpython-311.pyc | Bin 0 -> 6648 bytes .../__pycache__/System_.cpython-311.pyc | Bin 0 -> 1363 bytes ...leTypesBooleanTest_Compile.cpython-311.pyc | Bin 0 -> 3625 bytes .../Wrappers_Compile.cpython-311.pyc | Bin 0 -> 14812 bytes .../__pycache__/_dafny.cpython-311.pyc | Bin 0 -> 35100 bytes .../__pycache__/module_.cpython-311.pyc | Bin 0 -> 6321 bytes .../python/src-goal/dafny_generated/_dafny.py | 476 ++++++++++++++++++ .../dafny_generated/dafny_generated.py | 15 + .../src-goal/dafny_generated/module_.py | 80 +++ .../__pycache__/impl.cpython-311.pyc | Bin 0 -> 4223 bytes .../__pycache__/types.cpython-311.pyc | Bin 0 -> 17744 bytes .../__pycache__/wrapped.cpython-311.pyc | Bin 0 -> 1831 bytes .../types/boolean/internaldafny/impl.py | 56 +++ .../types/boolean/internaldafny/types.py | 145 ++++++ .../types/boolean/internaldafny/wrapped.py | 24 + .../src-goal/python_client_codegen/README.md | 3 + .../python_client_codegen/pyproject.toml | 46 ++ .../simple_boolean/__init__.py | 1 + .../__pycache__/__init__.cpython-311.pyc | Bin 0 -> 258 bytes .../__pycache__/client.cpython-311.pyc | Bin 0 -> 12721 bytes .../__pycache__/config.cpython-311.pyc | Bin 0 -> 1577 bytes .../__pycache__/deserialize.cpython-311.pyc | Bin 0 -> 817 bytes .../__pycache__/errors.cpython-311.pyc | Bin 0 -> 1827 bytes .../__pycache__/models.cpython-311.pyc | Bin 0 -> 5279 bytes .../__pycache__/serialize.cpython-311.pyc | Bin 0 -> 795 bytes .../simple_boolean/client.py | 371 ++++++++++++++ .../simple_boolean/config.py | 28 ++ .../simple_boolean/deserialize.py | 11 + .../simple_boolean/endpoints.py | 7 + .../simple_boolean/errors.py | 23 + .../simple_boolean/models.py | 108 ++++ .../simple_boolean/serialize.py | 11 + 46 files changed, 2361 insertions(+) create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/__init__.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/Extern.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/Shim.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/SimpleBooleanImplTest_Compile.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/SimpleBooleanImpl_Compile.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/StandardLibrary_Compile.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/StandardLibrary_mUInt_Compile.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/System_.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/UTF8.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/WrappedSimpleTypesBooleanTest_Compile.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/Wrappers_Compile.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/__pycache__/Extern.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/__pycache__/Shim.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/__pycache__/SimpleBooleanImplTest_Compile.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/__pycache__/SimpleBooleanImpl_Compile.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/__pycache__/System_.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/__pycache__/WrappedSimpleTypesBooleanTest_Compile.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/__pycache__/Wrappers_Compile.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/__pycache__/_dafny.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/__pycache__/module_.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/_dafny.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/dafny_generated.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/module_.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/simple/types/boolean/internaldafny/__pycache__/impl.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/simple/types/boolean/internaldafny/__pycache__/types.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/simple/types/boolean/internaldafny/__pycache__/wrapped.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/simple/types/boolean/internaldafny/impl.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/simple/types/boolean/internaldafny/types.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/simple/types/boolean/internaldafny/wrapped.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/README.md create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/pyproject.toml create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/__init__.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/__pycache__/__init__.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/__pycache__/client.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/__pycache__/config.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/__pycache__/deserialize.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/__pycache__/errors.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/__pycache__/models.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/__pycache__/serialize.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/client.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/config.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/deserialize.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/endpoints.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/errors.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/models.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/serialize.py diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/__init__.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/__init__.py new file mode 100644 index 0000000000..e69de29bb2 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/Extern.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/Extern.py new file mode 100644 index 0000000000..09d5af2e5e --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/Extern.py @@ -0,0 +1,22 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny +import System_ +import SimpleBooleanImplTest_Compile +import simple.types.boolean.internaldafny.types +from python_client_codegen.simple_boolean.client import SimpleBoolean +from Shim import SimpleBooleanShim +import Wrappers_Compile + +@staticmethod +def WrappedSimpleBoolean(config): + wrapped_config = config + impl = SimpleBoolean(wrapped_config) + wrapped_client = SimpleBooleanShim(impl) + return Wrappers_Compile.Result_Success(wrapped_client) + +simple.types.boolean.internaldafny.wrapped.default__.WrappedSimpleBoolean = WrappedSimpleBoolean \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/Shim.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/Shim.py new file mode 100644 index 0000000000..ae1efb4bb2 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/Shim.py @@ -0,0 +1,28 @@ +# TODO generate this + +import simple.types.boolean.internaldafny.types +import python_client_codegen.simple_boolean.client as SimpleBoolean +import Wrappers_Compile +import asyncio +from python_client_codegen.simple_boolean.models import GetBooleanInput + +class SimpleBooleanShim(simple.types.boolean.internaldafny.types.ISimpleBooleanClient): + def __init__(self, _impl: SimpleBoolean) : + self._impl = _impl + + def GetBoolean(self, input: simple.types.boolean.internaldafny.types.GetBooleanInput_GetBooleanInput) -> simple.types.boolean.internaldafny.types.GetBooleanOutput_GetBooleanOutput: + ''' + unwrapped_request = TypeConversion.ToNative(input) + try: + wrapped_response = self._impl.get_boolean(unwrapped_request) + return Wrappers_Compile.Result_Success(wrapped_response) + catch ex: + return Wrappers_Compile.Result_Failure(ex) + ''' + + unwrapped_request: GetBooleanInput = GetBooleanInput(value=input.value) + wrapped_response = asyncio.run(self._impl.get_boolean(unwrapped_request)) + return Wrappers_Compile.Result_Success(wrapped_response) + + + \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/SimpleBooleanImplTest_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/SimpleBooleanImplTest_Compile.py new file mode 100644 index 0000000000..c0dbd19d81 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/SimpleBooleanImplTest_Compile.py @@ -0,0 +1,73 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny +import System_ + +import simple.types.boolean.internaldafny.impl +import Wrappers_Compile + +assert "SimpleBooleanImplTest_Compile" == __name__ +SimpleBooleanImplTest_Compile = sys.modules[__name__] + +class default__: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "SimpleBooleanImplTest_Compile._default" + @staticmethod + def GetBooleanTrue(): + d_0_client_: simple.types.boolean.internaldafny.impl.SimpleBooleanClient + d_1_valueOrError0_: Wrappers_Compile.Result = None + out0_: Wrappers_Compile.Result + out0_ = simple.types.boolean.internaldafny.impl.default__.SimpleBoolean(simple.types.boolean.internaldafny.impl.default__.DefaultSimpleBooleanConfig()) + d_1_valueOrError0_ = out0_ + if not(not((d_1_valueOrError0_).IsFailure())): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(10,19): " + _dafny.string_of(d_1_valueOrError0_)) + d_0_client_ = (d_1_valueOrError0_).Extract() + SimpleBooleanImplTest_Compile.default__.TestGetBooleanTrue(d_0_client_) + + @staticmethod + def GetBooleanFalse(): + d_2_client_: simple.types.boolean.internaldafny.impl.SimpleBooleanClient + d_3_valueOrError0_: Wrappers_Compile.Result = None + out1_: Wrappers_Compile.Result + out1_ = simple.types.boolean.internaldafny.impl.default__.SimpleBoolean(simple.types.boolean.internaldafny.impl.default__.DefaultSimpleBooleanConfig()) + d_3_valueOrError0_ = out1_ + if not(not((d_3_valueOrError0_).IsFailure())): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(14,19): " + _dafny.string_of(d_3_valueOrError0_)) + d_2_client_ = (d_3_valueOrError0_).Extract() + SimpleBooleanImplTest_Compile.default__.TestGetBooleanFalse(d_2_client_) + + @staticmethod + def TestGetBooleanTrue(client): + d_4_ret_: simple.types.boolean.internaldafny.types.GetBooleanOutput + d_5_valueOrError0_: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(simple.types.boolean.internaldafny.types.GetBooleanOutput.default())() + out2_: Wrappers_Compile.Result + out2_ = (client).GetBoolean(simple.types.boolean.internaldafny.types.GetBooleanInput_GetBooleanInput(Wrappers_Compile.Option_Some(True))) + d_5_valueOrError0_ = out2_ + if not(not((d_5_valueOrError0_).IsFailure())): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(23,16): " + _dafny.string_of(d_5_valueOrError0_)) + d_4_ret_ = (d_5_valueOrError0_).Extract() + if not((((d_4_ret_).value).UnwrapOr(False)) == (True)): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(24,8): " + _dafny.string_of(_dafny.Seq("expectation violation"))) + _dafny.print(_dafny.string_of(d_4_ret_)) + + @staticmethod + def TestGetBooleanFalse(client): + d_6_ret_: simple.types.boolean.internaldafny.types.GetBooleanOutput + d_7_valueOrError0_: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(simple.types.boolean.internaldafny.types.GetBooleanOutput.default())() + out3_: Wrappers_Compile.Result + out3_ = (client).GetBoolean(simple.types.boolean.internaldafny.types.GetBooleanInput_GetBooleanInput(Wrappers_Compile.Option_Some(False))) + d_7_valueOrError0_ = out3_ + if not(not((d_7_valueOrError0_).IsFailure())): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(33,16): " + _dafny.string_of(d_7_valueOrError0_)) + d_6_ret_ = (d_7_valueOrError0_).Extract() + if not((((d_6_ret_).value).UnwrapOr(True)) == (False)): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(34,8): " + _dafny.string_of(_dafny.Seq("expectation violation"))) + _dafny.print(_dafny.string_of(d_6_ret_)) + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/SimpleBooleanImpl_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/SimpleBooleanImpl_Compile.py new file mode 100644 index 0000000000..9c9dba24c5 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/SimpleBooleanImpl_Compile.py @@ -0,0 +1,60 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny +import System_ +import simple.types.boolean.internaldafny.types + +import Wrappers_Compile + +assert "SimpleBooleanImpl_Compile" == __name__ +SimpleBooleanImpl_Compile = sys.modules[__name__] + +class Config: + @_dafny.classproperty + def AllSingletonConstructors(cls): + return [Config_Config()] + @classmethod + def default(cls, ): + return lambda: Config_Config() + def __ne__(self, __o: object) -> bool: + return not self.__eq__(__o) + @property + def is_Config(self) -> bool: + return isinstance(self, SimpleBooleanImpl_Compile.Config_Config) + +class Config_Config(Config, NamedTuple('Config', [])): + def __dafnystr__(self) -> str: + return f'SimpleBooleanImpl_Compile.Config.Config' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, SimpleBooleanImpl_Compile.Config_Config) + def __hash__(self) -> int: + return super().__hash__() + + +class default__: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "SimpleBooleanImpl_Compile._default" + @staticmethod + def GetBoolean(config, input): + output: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(simple.types.boolean.internaldafny.types.GetBooleanOutput.default())() + if not(((input).value).is_Some): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(17,4): " + (_dafny.SeqWithoutIsStrInference(map(_dafny.CodePoint, "expectation violation"))).VerbatimString(False)) + if not(((((input).value).value) == (True)) or ((((input).value).value) == (False))): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(19,4): " + (_dafny.SeqWithoutIsStrInference(map(_dafny.CodePoint, "expectation violation"))).VerbatimString(False)) + d_0_res_: simple.types.boolean.internaldafny.types.GetBooleanOutput + d_0_res_ = simple.types.boolean.internaldafny.types.GetBooleanOutput_GetBooleanOutput((input).value) + if not(((((d_0_res_).value).value) == (True)) or ((((d_0_res_).value).value) == (False))): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(22,4): " + (_dafny.SeqWithoutIsStrInference(map(_dafny.CodePoint, "expectation violation"))).VerbatimString(False)) + if not((((input).value).value) == (((d_0_res_).value).value)): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(24,4): " + (_dafny.SeqWithoutIsStrInference(map(_dafny.CodePoint, "expectation violation"))).VerbatimString(False)) + output = Wrappers_Compile.Result_Success(d_0_res_) + return output + return output + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/StandardLibrary_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/StandardLibrary_Compile.py new file mode 100644 index 0000000000..86ad05007f --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/StandardLibrary_Compile.py @@ -0,0 +1,193 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny +import System_ +import Wrappers_Compile +import StandardLibrary_mUInt_Compile + +assert "StandardLibrary_Compile" == __name__ +StandardLibrary_Compile = sys.modules[__name__] + +class default__: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "StandardLibrary_Compile._default" + @staticmethod + def Join(ss, joiner): + d_50___accumulator_ = _dafny.Seq([]) + while True: + with _dafny.label(): + if (len(ss)) == (1): + return (d_50___accumulator_) + ((ss)[0]) + elif True: + d_50___accumulator_ = (d_50___accumulator_) + (((ss)[0]) + (joiner)) + in0_ = _dafny.Seq((ss)[1::]) + in1_ = joiner + ss = in0_ + joiner = in1_ + raise _dafny.TailCall() + break + + @staticmethod + def Split(s, delim): + d_51___accumulator_ = _dafny.Seq([]) + while True: + with _dafny.label(): + d_52_i_ = StandardLibrary_Compile.default__.FindIndexMatching(s, delim, 0) + if (d_52_i_).is_Some: + d_51___accumulator_ = (d_51___accumulator_) + (_dafny.Seq([_dafny.Seq((s)[:(d_52_i_).value:])])) + in2_ = _dafny.Seq((s)[((d_52_i_).value) + (1)::]) + in3_ = delim + s = in2_ + delim = in3_ + raise _dafny.TailCall() + elif True: + return (d_51___accumulator_) + (_dafny.Seq([s])) + break + + @staticmethod + def SplitOnce(s, delim): + d_53_i_ = StandardLibrary_Compile.default__.FindIndexMatching(s, delim, 0) + return (_dafny.Seq((s)[:(d_53_i_).value:]), _dafny.Seq((s)[((d_53_i_).value) + (1)::])) + + @staticmethod + def SplitOnce_q(s, delim): + d_54_valueOrError0_ = StandardLibrary_Compile.default__.FindIndexMatching(s, delim, 0) + if (d_54_valueOrError0_).IsFailure(): + return (d_54_valueOrError0_).PropagateFailure() + elif True: + d_55_i_ = (d_54_valueOrError0_).Extract() + return Wrappers_Compile.Option_Some((_dafny.Seq((s)[:d_55_i_:]), _dafny.Seq((s)[(d_55_i_) + (1)::]))) + + @staticmethod + def FindIndexMatching(s, c, i): + def lambda0_(d_56_c_): + def lambda1_(d_57_x_): + return (d_57_x_) == (d_56_c_) + + return lambda1_ + + return StandardLibrary_Compile.default__.FindIndex(s, lambda0_(c), i) + + @staticmethod + def FindIndex(s, f, i): + while True: + with _dafny.label(): + if (i) == (len(s)): + return Wrappers_Compile.Option_None() + elif f((s)[i]): + return Wrappers_Compile.Option_Some(i) + elif True: + in4_ = s + in5_ = f + in6_ = (i) + (1) + s = in4_ + f = in5_ + i = in6_ + raise _dafny.TailCall() + break + + @staticmethod + def Filter(s, f): + d_58___accumulator_ = _dafny.Seq([]) + while True: + with _dafny.label(): + if (len(s)) == (0): + return (d_58___accumulator_) + (_dafny.Seq([])) + elif f((s)[0]): + d_58___accumulator_ = (d_58___accumulator_) + (_dafny.Seq([(s)[0]])) + in7_ = _dafny.Seq((s)[1::]) + in8_ = f + s = in7_ + f = in8_ + raise _dafny.TailCall() + elif True: + in9_ = _dafny.Seq((s)[1::]) + in10_ = f + s = in9_ + f = in10_ + raise _dafny.TailCall() + break + + @staticmethod + def Min(a, b): + if (a) < (b): + return a + elif True: + return b + + @staticmethod + def Fill(value, n): + return _dafny.Seq([value for d_59___v0_ in range(n)]) + + @staticmethod + def SeqToArray(s): + a: _dafny.Array = _dafny.Array(None, 0) + def lambda2_(d_60_s_): + def lambda3_(d_61_i_): + return (d_60_s_)[d_61_i_] + + return lambda3_ + + init0_ = lambda2_(s) + nw0_ = _dafny.Array(None, len(s)) + for i0_0_ in range(nw0_.length(0)): + nw0_[i0_0_] = init0_(i0_0_) + a = nw0_ + return a + + @staticmethod + def LexicographicLessOrEqual(a, b, less): + def lambda4_(exists_var_0_): + d_62_k_: int = exists_var_0_ + return (((0) <= (d_62_k_)) and ((d_62_k_) <= (len(a)))) and (StandardLibrary_Compile.default__.LexicographicLessOrEqualAux(a, b, less, d_62_k_)) + + return _dafny.quantifier(_dafny.IntegerRange(0, (len(a)) + (1)), False, lambda4_) + + @staticmethod + def LexicographicLessOrEqualAux(a, b, less, lengthOfCommonPrefix): + def lambda5_(forall_var_0_): + d_63_i_: int = forall_var_0_ + return not (((0) <= (d_63_i_)) and ((d_63_i_) < (lengthOfCommonPrefix))) or (((a)[d_63_i_]) == ((b)[d_63_i_])) + + return (((lengthOfCommonPrefix) <= (len(b))) and (_dafny.quantifier(_dafny.IntegerRange(0, lengthOfCommonPrefix), True, lambda5_))) and (((lengthOfCommonPrefix) == (len(a))) or (((lengthOfCommonPrefix) < (len(b))) and (less((a)[lengthOfCommonPrefix], (b)[lengthOfCommonPrefix])))) + + @staticmethod + def SetToOrderedSequence(s, less): + d_64___accumulator_ = _dafny.Seq([]) + while True: + with _dafny.label(): + pat_let_tv0_ = s + pat_let_tv1_ = less + if (s) == (_dafny.Set({})): + return (d_64___accumulator_) + (_dafny.Seq([])) + elif True: + def iife0_(_let_dummy_0): + d_65_a_: _dafny.Seq = None + with _dafny.label("_ASSIGN_SUCH_THAT_d_0"): + assign_such_that_0_: _dafny.Seq + for assign_such_that_0_ in (s).Elements: + d_65_a_ = assign_such_that_0_ + if ((d_65_a_) in (s)) and (StandardLibrary_Compile.default__.IsMinimum(d_65_a_, s, less)): + raise _dafny.Break("_ASSIGN_SUCH_THAT_d_0") + raise Exception("assign-such-that search produced no value (line 369)") + pass + return (_dafny.Seq([d_65_a_])) + (StandardLibrary_Compile.default__.SetToOrderedSequence((pat_let_tv0_) - (_dafny.Set({d_65_a_})), pat_let_tv1_)) + return iife0_(0) + + break + + @staticmethod + def IsMinimum(a, s, less): + def lambda6_(forall_var_1_): + d_66_z_: _dafny.Seq = forall_var_1_ + return not ((d_66_z_) in (s)) or (StandardLibrary_Compile.default__.LexicographicLessOrEqual(a, d_66_z_, less)) + + return ((a) in (s)) and (_dafny.quantifier((s).Elements, True, lambda6_)) + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/StandardLibrary_mUInt_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/StandardLibrary_mUInt_Compile.py new file mode 100644 index 0000000000..cd6f10f64a --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/StandardLibrary_mUInt_Compile.py @@ -0,0 +1,208 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny +import System_ +import Wrappers_Compile + +assert "StandardLibrary_mUInt_Compile" == __name__ +StandardLibrary_mUInt_Compile = sys.modules[__name__] + +class uint8: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return int(0) + +class uint16: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return int(0) + +class uint32: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return int(0) + +class uint64: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return int(0) + +class int32: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return int(0) + +class int64: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return int(0) + +class posInt64: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return 1 + +class seq16: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return _dafny.Seq({}) + +class seq32: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return _dafny.Seq({}) + +class seq64: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return _dafny.Seq({}) + +class default__: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "StandardLibrary.StandardLibrary_mUInt_Compile._default" + @staticmethod + def UInt8Less(a, b): + return (a) < (b) + + @staticmethod + def HasUint16Len(s): + return (len(s)) < ((StandardLibrary_mUInt_Compile.default__).UINT16__LIMIT) + + @staticmethod + def HasUint32Len(s): + return (len(s)) < ((StandardLibrary_mUInt_Compile.default__).UINT32__LIMIT) + + @staticmethod + def HasUint64Len(s): + return (len(s)) < ((StandardLibrary_mUInt_Compile.default__).UINT64__LIMIT) + + @staticmethod + def UInt16ToSeq(x): + d_16_b0_ = _dafny.euclidian_division(x, 256) + d_17_b1_ = _dafny.euclidian_modulus(x, 256) + return _dafny.Seq([d_16_b0_, d_17_b1_]) + + @staticmethod + def SeqToUInt16(s): + d_18_x0_ = ((s)[0]) * (256) + return (d_18_x0_) + ((s)[1]) + + @staticmethod + def UInt32ToSeq(x): + d_19_b0_ = _dafny.euclidian_division(x, 16777216) + d_20_x0_ = (x) - ((d_19_b0_) * (16777216)) + d_21_b1_ = _dafny.euclidian_division(d_20_x0_, 65536) + d_22_x1_ = (d_20_x0_) - ((d_21_b1_) * (65536)) + d_23_b2_ = _dafny.euclidian_division(d_22_x1_, 256) + d_24_b3_ = _dafny.euclidian_modulus(d_22_x1_, 256) + return _dafny.Seq([d_19_b0_, d_21_b1_, d_23_b2_, d_24_b3_]) + + @staticmethod + def SeqToUInt32(s): + d_25_x0_ = ((s)[0]) * (16777216) + d_26_x1_ = (d_25_x0_) + (((s)[1]) * (65536)) + d_27_x2_ = (d_26_x1_) + (((s)[2]) * (256)) + return (d_27_x2_) + ((s)[3]) + + @staticmethod + def UInt64ToSeq(x): + d_28_b0_ = _dafny.euclidian_division(x, 72057594037927936) + d_29_x0_ = (x) - ((d_28_b0_) * (72057594037927936)) + d_30_b1_ = _dafny.euclidian_division(d_29_x0_, 281474976710656) + d_31_x1_ = (d_29_x0_) - ((d_30_b1_) * (281474976710656)) + d_32_b2_ = _dafny.euclidian_division(d_31_x1_, 1099511627776) + d_33_x2_ = (d_31_x1_) - ((d_32_b2_) * (1099511627776)) + d_34_b3_ = _dafny.euclidian_division(d_33_x2_, 4294967296) + d_35_x3_ = (d_33_x2_) - ((d_34_b3_) * (4294967296)) + d_36_b4_ = _dafny.euclidian_division(d_35_x3_, 16777216) + d_37_x4_ = (d_35_x3_) - ((d_36_b4_) * (16777216)) + d_38_b5_ = _dafny.euclidian_division(d_37_x4_, 65536) + d_39_x5_ = (d_37_x4_) - ((d_38_b5_) * (65536)) + d_40_b6_ = _dafny.euclidian_division(d_39_x5_, 256) + d_41_b7_ = _dafny.euclidian_modulus(d_39_x5_, 256) + return _dafny.Seq([d_28_b0_, d_30_b1_, d_32_b2_, d_34_b3_, d_36_b4_, d_38_b5_, d_40_b6_, d_41_b7_]) + + @staticmethod + def SeqToUInt64(s): + d_42_x0_ = ((s)[0]) * (72057594037927936) + d_43_x1_ = (d_42_x0_) + (((s)[1]) * (281474976710656)) + d_44_x2_ = (d_43_x1_) + (((s)[2]) * (1099511627776)) + d_45_x3_ = (d_44_x2_) + (((s)[3]) * (4294967296)) + d_46_x4_ = (d_45_x3_) + (((s)[4]) * (16777216)) + d_47_x5_ = (d_46_x4_) + (((s)[5]) * (65536)) + d_48_x6_ = (d_47_x5_) + (((s)[6]) * (256)) + d_49_x_ = (d_48_x6_) + ((s)[7]) + return d_49_x_ + + @_dafny.classproperty + def UINT16__LIMIT(instance): + return 65536 + @_dafny.classproperty + def UINT32__LIMIT(instance): + return 4294967296 + @_dafny.classproperty + def UINT64__LIMIT(instance): + return 18446744073709551616 + @_dafny.classproperty + def INT32__MAX__LIMIT(instance): + return 2147483648 + @_dafny.classproperty + def INT64__MAX__LIMIT(instance): + return 9223372036854775808 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/System_.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/System_.py new file mode 100644 index 0000000000..32e6d896ff --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/System_.py @@ -0,0 +1,20 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny + +assert "System_" == __name__ +System_ = sys.modules[__name__] + +class nat: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return int(0) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/UTF8.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/UTF8.py new file mode 100644 index 0000000000..45e3b8b7a5 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/UTF8.py @@ -0,0 +1,118 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny +import System_ +import Wrappers_Compile +import StandardLibrary_mUInt_Compile +import StandardLibrary_Compile + +assert "UTF8" == __name__ +UTF8 = sys.modules[__name__] + +class ValidUTF8Bytes: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return _dafny.Seq([]) + +class default__: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "UTF8_Compile._default" + @staticmethod + def IsASCIIString(s): + def lambda7_(forall_var_2_): + d_67_i_: int = forall_var_2_ + return not (((0) <= (d_67_i_)) and ((d_67_i_) < (len(s)))) or ((ord((s)[d_67_i_])) < (128)) + + return _dafny.quantifier(_dafny.IntegerRange(0, len(s)), True, lambda7_) + + @staticmethod + def EncodeAscii(s): + d_68___accumulator_ = _dafny.Seq([]) + while True: + with _dafny.label(): + if (len(s)) == (0): + return (d_68___accumulator_) + (_dafny.Seq([])) + elif True: + d_69_x_ = _dafny.Seq([ord((s)[0])]) + d_68___accumulator_ = (d_68___accumulator_) + (d_69_x_) + in11_ = _dafny.Seq((s)[1::]) + s = in11_ + raise _dafny.TailCall() + break + + @staticmethod + def Uses1Byte(s): + return ((0) <= ((s)[0])) and (((s)[0]) <= (127)) + + @staticmethod + def Uses2Bytes(s): + return (((194) <= ((s)[0])) and (((s)[0]) <= (223))) and (((128) <= ((s)[1])) and (((s)[1]) <= (191))) + + @staticmethod + def Uses3Bytes(s): + return (((((((s)[0]) == (224)) and (((160) <= ((s)[1])) and (((s)[1]) <= (191)))) and (((128) <= ((s)[2])) and (((s)[2]) <= (191)))) or (((((225) <= ((s)[0])) and (((s)[0]) <= (236))) and (((128) <= ((s)[1])) and (((s)[1]) <= (191)))) and (((128) <= ((s)[2])) and (((s)[2]) <= (191))))) or (((((s)[0]) == (237)) and (((128) <= ((s)[1])) and (((s)[1]) <= (159)))) and (((128) <= ((s)[2])) and (((s)[2]) <= (191))))) or (((((238) <= ((s)[0])) and (((s)[0]) <= (239))) and (((128) <= ((s)[1])) and (((s)[1]) <= (191)))) and (((128) <= ((s)[2])) and (((s)[2]) <= (191)))) + + @staticmethod + def Uses4Bytes(s): + return (((((((s)[0]) == (240)) and (((144) <= ((s)[1])) and (((s)[1]) <= (191)))) and (((128) <= ((s)[2])) and (((s)[2]) <= (191)))) and (((128) <= ((s)[3])) and (((s)[3]) <= (191)))) or ((((((241) <= ((s)[0])) and (((s)[0]) <= (243))) and (((128) <= ((s)[1])) and (((s)[1]) <= (191)))) and (((128) <= ((s)[2])) and (((s)[2]) <= (191)))) and (((128) <= ((s)[3])) and (((s)[3]) <= (191))))) or ((((((s)[0]) == (244)) and (((128) <= ((s)[1])) and (((s)[1]) <= (143)))) and (((128) <= ((s)[2])) and (((s)[2]) <= (191)))) and (((128) <= ((s)[3])) and (((s)[3]) <= (191)))) + + @staticmethod + def ValidUTF8Range(a, lo, hi): + while True: + with _dafny.label(): + if (lo) == (hi): + return True + elif True: + d_70_r_ = _dafny.Seq((a)[lo:hi:]) + if UTF8.default__.Uses1Byte(d_70_r_): + in12_ = a + in13_ = (lo) + (1) + in14_ = hi + a = in12_ + lo = in13_ + hi = in14_ + raise _dafny.TailCall() + elif ((2) <= (len(d_70_r_))) and (UTF8.default__.Uses2Bytes(d_70_r_)): + in15_ = a + in16_ = (lo) + (2) + in17_ = hi + a = in15_ + lo = in16_ + hi = in17_ + raise _dafny.TailCall() + elif ((3) <= (len(d_70_r_))) and (UTF8.default__.Uses3Bytes(d_70_r_)): + in18_ = a + in19_ = (lo) + (3) + in20_ = hi + a = in18_ + lo = in19_ + hi = in20_ + raise _dafny.TailCall() + elif ((4) <= (len(d_70_r_))) and (UTF8.default__.Uses4Bytes(d_70_r_)): + in21_ = a + in22_ = (lo) + (4) + in23_ = hi + a = in21_ + lo = in22_ + hi = in23_ + raise _dafny.TailCall() + elif True: + return False + break + + @staticmethod + def ValidUTF8Seq(s): + return UTF8.default__.ValidUTF8Range(s, 0, len(s)) + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/WrappedSimpleTypesBooleanTest_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/WrappedSimpleTypesBooleanTest_Compile.py new file mode 100644 index 0000000000..be21d9bfcf --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/WrappedSimpleTypesBooleanTest_Compile.py @@ -0,0 +1,44 @@ +import sys +from math import floor +from itertools import count + +import _dafny +import System_ +import SimpleBooleanImplTest_Compile +import simple.types.boolean.internaldafny.wrapped + +import Extern + +assert "WrappedSimpleTypesBooleanTest_Compile" == __name__ +WrappedSimpleTypesBooleanTest_Compile = sys.modules[__name__] + +class default__: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "WrappedSimpleTypesBooleanTest_Compile._default" + @staticmethod + def GetBooleanTrue(): + d_8_client_: simple.types.boolean.internaldafny.types.ISimpleBooleanClient + d_9_valueOrError0_: Wrappers_Compile.Result = None + out4_: Wrappers_Compile.Result + out4_ = simple.types.boolean.internaldafny.wrapped.default__.WrappedSimpleBoolean(simple.types.boolean.internaldafny.wrapped.default__.WrappedDefaultSimpleBooleanConfig()) + d_9_valueOrError0_ = out4_ + if not(not((d_9_valueOrError0_).IsFailure())): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/WrappedSimpleBooleanTest.dfy(11,19): " + _dafny.string_of(d_9_valueOrError0_)) + d_8_client_ = (d_9_valueOrError0_).Extract() + SimpleBooleanImplTest_Compile.default__.TestGetBooleanTrue(d_8_client_) + + @staticmethod + def GetBooleanFalse(): + d_10_client_: simple.types.boolean.internaldafny.types.ISimpleBooleanClient + d_11_valueOrError0_: Wrappers_Compile.Result = None + out5_: Wrappers_Compile.Result + out5_ = simple.types.boolean.internaldafny.wrapped.default__.WrappedSimpleBoolean(simple.types.boolean.internaldafny.wrapped.default__.WrappedDefaultSimpleBooleanConfig()) + d_11_valueOrError0_ = out5_ + if not(not((d_11_valueOrError0_).IsFailure())): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/WrappedSimpleBooleanTest.dfy(15,19): " + _dafny.string_of(d_11_valueOrError0_)) + d_10_client_ = (d_11_valueOrError0_).Extract() + SimpleBooleanImplTest_Compile.default__.TestGetBooleanFalse(d_10_client_) + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/Wrappers_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/Wrappers_Compile.py new file mode 100644 index 0000000000..ddde85ac6b --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/Wrappers_Compile.py @@ -0,0 +1,190 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny +import System_ + +assert "Wrappers_Compile" == __name__ +Wrappers_Compile = sys.modules[__name__] + +class Option: + @classmethod + def default(cls, ): + return lambda: Option_None() + def __ne__(self, __o: object) -> bool: + return not self.__eq__(__o) + @property + def is_None(self) -> bool: + return isinstance(self, Wrappers_Compile.Option_None) + @property + def is_Some(self) -> bool: + return isinstance(self, Wrappers_Compile.Option_Some) + def ToResult(self): + source0_ = self + if source0_.is_None: + return Wrappers_Compile.Result_Failure(_dafny.Seq("Option is None")) + elif True: + d_0___mcc_h0_ = source0_.value + d_1_v_ = d_0___mcc_h0_ + return Wrappers_Compile.Result_Success(d_1_v_) + + def UnwrapOr(self, default): + source1_ = self + if source1_.is_None: + return default + elif True: + d_2___mcc_h0_ = source1_.value + d_3_v_ = d_2___mcc_h0_ + return d_3_v_ + + def IsFailure(self): + return (self).is_None + + def PropagateFailure(self): + return Wrappers_Compile.Option_None() + + def Extract(self): + return (self).value + + +class Option_None(Option, NamedTuple('None_', [])): + def __dafnystr__(self) -> str: + return f'Wrappers_Compile.Option.None' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, Wrappers_Compile.Option_None) + def __hash__(self) -> int: + return super().__hash__() + +class Option_Some(Option, NamedTuple('Some', [('value', Any)])): + def __dafnystr__(self) -> str: + return f'Wrappers_Compile.Option.Some({_dafny.string_of(self.value)})' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, Wrappers_Compile.Option_Some) and self.value == __o.value + def __hash__(self) -> int: + return super().__hash__() + + +class Result: + @classmethod + def default(cls, default_T): + return lambda: Result_Success(default_T()) + def __ne__(self, __o: object) -> bool: + return not self.__eq__(__o) + @property + def is_Success(self) -> bool: + return isinstance(self, Wrappers_Compile.Result_Success) + @property + def is_Failure(self) -> bool: + return isinstance(self, Wrappers_Compile.Result_Failure) + def ToOption(self): + source2_ = self + if source2_.is_Success: + d_4___mcc_h0_ = source2_.value + d_5_s_ = d_4___mcc_h0_ + return Wrappers_Compile.Option_Some(d_5_s_) + elif True: + d_6___mcc_h1_ = source2_.error + d_7_e_ = d_6___mcc_h1_ + return Wrappers_Compile.Option_None() + + def UnwrapOr(self, default): + source3_ = self + if source3_.is_Success: + d_8___mcc_h0_ = source3_.value + d_9_s_ = d_8___mcc_h0_ + return d_9_s_ + elif True: + d_10___mcc_h1_ = source3_.error + d_11_e_ = d_10___mcc_h1_ + return default + + def IsFailure(self): + return (self).is_Failure + + def PropagateFailure(self): + return Wrappers_Compile.Result_Failure((self).error) + + def MapFailure(self, reWrap): + source4_ = self + if source4_.is_Success: + d_12___mcc_h0_ = source4_.value + d_13_s_ = d_12___mcc_h0_ + return Wrappers_Compile.Result_Success(d_13_s_) + elif True: + d_14___mcc_h1_ = source4_.error + d_15_e_ = d_14___mcc_h1_ + return Wrappers_Compile.Result_Failure(reWrap(d_15_e_)) + + def Extract(self): + return (self).value + + +class Result_Success(Result, NamedTuple('Success', [('value', Any)])): + def __dafnystr__(self) -> str: + return f'Wrappers_Compile.Result.Success({_dafny.string_of(self.value)})' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, Wrappers_Compile.Result_Success) and self.value == __o.value + def __hash__(self) -> int: + return super().__hash__() + +class Result_Failure(Result, NamedTuple('Failure', [('error', Any)])): + def __dafnystr__(self) -> str: + return f'Wrappers_Compile.Result.Failure({_dafny.string_of(self.error)})' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, Wrappers_Compile.Result_Failure) and self.error == __o.error + def __hash__(self) -> int: + return super().__hash__() + + +class Outcome: + @classmethod + def default(cls, ): + return lambda: Outcome_Pass() + def __ne__(self, __o: object) -> bool: + return not self.__eq__(__o) + @property + def is_Pass(self) -> bool: + return isinstance(self, Wrappers_Compile.Outcome_Pass) + @property + def is_Fail(self) -> bool: + return isinstance(self, Wrappers_Compile.Outcome_Fail) + def IsFailure(self): + return (self).is_Fail + + def PropagateFailure(self): + return Wrappers_Compile.Result_Failure((self).error) + + +class Outcome_Pass(Outcome, NamedTuple('Pass', [])): + def __dafnystr__(self) -> str: + return f'Wrappers_Compile.Outcome.Pass' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, Wrappers_Compile.Outcome_Pass) + def __hash__(self) -> int: + return super().__hash__() + +class Outcome_Fail(Outcome, NamedTuple('Fail', [('error', Any)])): + def __dafnystr__(self) -> str: + return f'Wrappers_Compile.Outcome.Fail({_dafny.string_of(self.error)})' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, Wrappers_Compile.Outcome_Fail) and self.error == __o.error + def __hash__(self) -> int: + return super().__hash__() + + +class default__: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "Wrappers_Compile._default" + @staticmethod + def Need(condition, error): + if condition: + return Wrappers_Compile.Outcome_Pass() + elif True: + return Wrappers_Compile.Outcome_Fail(error) + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/__pycache__/Extern.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/__pycache__/Extern.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..b724ea7d0f91cdea72d6a222fbc222ce11380751 GIT binary patch literal 1409 zcmah{&2QX96d$j>>-|pC?52ejgeruRQmrKfmw+lk+e49>0~@I1i{;vr#OaJ}&CIG; zO3@y2;6ErwP6gCEe}^OO!5UF15*N4ya_fmV*SzQVe)E1B47v!`mw$X8 z{@Ot3ccoMdbiFQr1NIz+C^QIi6>kuOHrxg^U6Wd_MVoHZPVwF z(sjE!zUTHd@4J1?2kt=gp}PjWNv_a!cU{M{$W^-GZY<+R?g)=V`xL!^T3(iQ!Rc<| zO}ut|tuh>6UrBGRq_@gEZ`&ClaZ+WT3Gzww#u z?)eml`?Hkb9YZz`NRlum1j#HGAPlAv1>YA*La-l$VZCOU9z`@Ts(%7Em*3?v2+z?8 zdS-|>{3pf>&|a=A&l*BSEZ0fnKVDNbD<49~tD7fg{T_5`K$ENkmzjEZdF2uF(-brA z-A!m3LEFQxFrN|OO=m%XIR{8uK@uNChjRE--wnN`ZmEvnu#yPJf?JUGJy@^5bH3(~ z*deok24NCA_b`7VlGJ&cuqP?;1MH*;$!NmTBWE9T@h}N7;ZBL0!o8B0pgIhojwqPZ zOdLT%&H^X&58})_#4%>Rz@c;hTY*_TNi#VrTMKLNz&4<~HTd{PaLm#9cx%4*s(1Z| zch7p;i{AG9-mCEkKZ>*Q?Zx=E@@y@7w|>5J*4th5c5`d@5~9$~4QcX>%a+K}C_ZEg zZ>IWY>J?ZE4rx(e95Gvood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plTest_Compile.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/__pycache__/SimpleBooleanImplTest_Compile.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8ba240c6fe1adcaee57eb18e6a5e19892ad7a247 GIT binary patch literal 7203 zcmeHMTW=f36`tMYWvMGATC(HBjS|a_iMXODIhI=|MSYVmNp*>2CtbweP~4GCdU?t0 z(za9y6#_r#p^pvRM?IvjT?0iQ`q0Pxf`TH}5IcYY0Yy>tO|BCZF#6DQX1OF+q7$Gk z45RRHb>_^O`|X@>j(*eG*+w9&{%zGb(L=~zFyVzjjd}80VD1ou7?MdejAc{G$(o!~ zG$j|%0=b|Tlu)jiptwY3}T9=5swQeIwqt|8Z z(~>Wc&m~H-Fd{e5=qnyev|gE8mJUe`}qRq_rio&~T*wtz@md1c;wJ@z znpVPHCtOsIudP{v!8&GgATBQ0*Pua*r4vSKKEI$}rFqIyHZ^LspRvkA#RabFdM2NN zIW6|qr#Ixu@Mu_JASIj+j|?iO>2m|y(28i{$5bAxhLt? z|NQ#caK~ETk0E1z;ZSn;aPkN79}dL3dB_sFiU)1Hg*-gxDlOib$=j6WQ>HkMJb8IMFdD zdSW9wS&2?QoVw&ped0_R&J=T|ZhlS3v~*JbCq|d$f4C7eG%e|}$kSy=^?Zs6psT^^ zzBi%q>aK$uv1BEdT#t=9vC%CeMJ_0hdiOZJ2e$}0G$(&U2$ip6Eh?8}klm2aDbNy? z&nrTB9#e+|ja@(yP$<@UL8NRR!t9#w$cMhp$A4<>w)gZZ5QnhJ>NlzWJOB~T01*GlxYqDI?g+lsXo4Qw#szEE05|@;WqC96km;KkcKpiZpGf5U~y1$P`S$-QUHdAF))i2robHZOgkpq!vCSXG-Zb zwE$1nRBS7Az@rU?JXx}fC7ZW3B>eRTe?AYH`nEK0pA;BUpDE<%GtCGO3b@GCi}{-{ z*h$8f8TuIy76EqJ@WKzdkP(sPJFP6rh|X0*Kcd6CP`B{C1h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{2=0D6V3Bs zvl47q+_1cg%vq9@RFTSnPYLjd8zgyy4N?FR>C}0jHtz zYpHez7;||zK}HA&;49oXC%eP>PlLdo&4YmAy=z08_-ZJ%)|#^l`GaUu1@iA&(RW?A zR6Gh&f?p>Nmp=j0{a~4_I%=V|1-9bJ#4zTi)vfDfpvtStYozEPo;L2&4?h2^VHEiU~ zjpc9hX7FwEW~~oaN4)Xq->_0bZ`;^v&qAxwXL=2m0Qn-s^zdkj{m+k?c&uC(iF?(| z)PbYN5BK*Bbd410M`9Hj~pTD!G*@<0b zsRHc3@VvyYRGg+UYQULSNfgs*Y8c+p#o$*kPQb)F1SfX!M&XR-NV!zOsXGgo7{AitO-|DV%C5u0$blBzIXInb->0l)z@<|#&2LhiKsJvS z1>rTAhgIc>!l zcF7*QYL8{?G1DF^y(T0fd?fx8vvKinZuSbZ3nG_Y5TSPHB36K6`7$qG7UzQH=GF%h zJBsJDx*_>R%XYg3%H+VO;@=6mCT39ans^Uur=_zJWP{Rq37CV@xCDw9q?`mjo|f{+ z#0+ZJL>+6GfmMolPXenjg9fMN4`onM#B(yJU-goj%Ght?Z4XY_@%?uEm>oa)Jbq;}J=kr>_C3C2 zA3kLtI=d7dw4#G=m5DE!JMHEpUvFP*9aq|K zO^A;M!|jq2^6rk@&=*Qf879ps&H*=~_VR$*>&4SvUpRGT>;rtuX(V`Rt@LNO7hwE~ zh#x(P|es^yE{QUWaJ72df?&`O9^}j-$*Q<&xTLoAO>&YwRz1~2;7stN=(P+DX literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/__pycache__/System_.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/__pycache__/System_.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a3893472f99448b972fe25c67707e3f710c5b267 GIT binary patch literal 1363 zcmah{&5ImG6o1vns~?d$1`eD_i0E%gmRXUN*^!+&k(0TR%Luonm-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yc%zZP(SqYQZRB z(@|}3h`zo)&oeg!hnehM@y(#-HP*}iosk)|7(s`Q)#c58d;MTGjX$ksD1n$T-pyeTqSO?+QsBaMqA5*LmD z*UxEk6hw@&X7N#}*^^#K4Kz{%^Ql2MH8|J)NZ#ej*#-GjLq7HJ*t|UE%42muzk(um z@-G6yD=1P2`DdLg$Lx^N}Vut%nF)wS&#R0tttY*X1q$CnRit zlTFaPR#n=js%1;B8c=6Xp6gZ3@H8Y2 z2PHA2CmW&GVLO^rDwHvM{pn;U6OlbY_~Qw}DF zHJgUYnlnxyq|jK2#ZQMtQ=5bs&o3;EUaHv+F00;E-Q&gH3=h4TR^-hD0&m8TyWku& z!XhFI%49DvQO~$Gf#;iNoS?y;%g4PY?~+5T3B0fD9~oJc1VLz`wi*64QK}xyO|+#R z%#TrghJQ`8VTONAw6pH#Cd$?Qyxj6}H1nXp5j|S>bF+W%_w5hPx&80d(XPeNRsn3e OK7GpN&;CNot^Oxr^-@g$ literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/__pycache__/Wrappers_Compile.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/__pycache__/Wrappers_Compile.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..66b7c5b7e94798beaf31618262a9b8ef5b65b976 GIT binary patch literal 14812 zcmd5jTW}OtcHQ$Hy;^8^NeD9_!CGK6Vt6hBNr2Wavt}eCjA0<#8D?4_n1_6OWGqD@ z+ASs4Zd}>*mR+beyD4q5VIkh6*u+lw$Oj*!Dj)giQD)1kuG%W9@~Fz6DDjcAg{q}&*)6|z31M0?z!ijd(OG7U)I;x2yi|6pV`cRY!HP1#0TS|HSnaYeFV4BV>ZN0RI!(2CI{ev?c^K zVFm6Lf2QWLV8^-TgBI||uH+ipq83`z@fP)&2E{w*g#ush88dJ z7F$+D!$#UJ3hlN!XlTxeLqf;4|3!8uI(&NQL@Jw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|A$@M}2+JN zd2_#WoE6DjUGt_!5uy<{c!Xt-D-}Cd;>N+blXEBM-@Q#rt?_beeAVRfc6T@2YrET^ d#d=GvedX3ZXY;075%kLq9%0$zDiu`Y{vVb4U!ed1 literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/__pycache__/_dafny.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/__pycache__/_dafny.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..318e0cbb0f38fc413a1f319d4cc267776263c4e4 GIT binary patch literal 35100 zcmd6Q3v?UTdFBjW1PG8r5~M`x35t4rfdDlF z$`V4wOsZ}`mq{R3u3^_Yrc>LY{Mg7{d#iMv*4yoF+tZ{w(4s3At+wuVv%A@Ib`Q03 z&-&=>>-+B=3}yzPVkb@70r2C_ec%87_rL%D-#d4{TTxLi;A;BYWa#YDnEsL`naRP6luin9rUxVvdNFzelgx6bAZ(w0f2wNNWSi+iF z*gAx*54Tvt?qXpZ5Y}udZ6gb5LC9U1YiKKAN2mj^Gt>##73u=)4s`==V|Cbu+_qb4x1ELDjgTFdkh?>+LqbbW zqUDi^Xnb@m90*5)MMxe8Y0aXB^~mg8rK^&y26PWsIOW8rwNY-k97LqiC4DB;LR z&OI7c;=$-}IOmK#3q&bY%RnG-`>Sn_D!6TnObm|=hhovTzOZsK9vg3aHYT4Oj|7Lq zZR4@X*|C^Be!T5)ScxBug~Ab~?a=7hcqB~N&Aac9#UkNgv`yx8ptOyjMUA3uiagvF zB2qw=SQmvuZ9~kXb^NSchk7LHOc-s|Dqn#hk6K4-MtYhla*tp@|5&eM3X1CV~+j z!iv5u$jgvKZXi&V2R=BICV(mZvtSdQ_bv##(^KBgspJAWTJxt6-;6R zc-PX$VB`V@lzkv4fbQ+#Xb9BpJ~}ZPiK7p5&T)A(8VBh+PX{9tVTH;J@aj{AWdc+g zWhKCraKqs{KalE5A5|TV8AoH*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 z*op4;bCu%^wbf;l$#Br=E)+9lSwAlm@Q)1){*@C^rI8boURD&CU2+)gbOYt2v;w@( z))`7J>BkR~PCZO|(L-|G#Y8>TojZYQQ-X9>&J}36{`9Vc_h4HeXhr`T!WEmS7C=wM zuSa(Hu6H_rebJ5$eVF}V)f~BGB}F?aTCvM^?6So#+Wex)FV@(OP_o8yk)JU;!V9+W z(wD;IwlHZ4)3z{e3ez=~>4v7>r{6vEVV^xP@~7k-3sa^rwcE)|jaug zBRU6lh`_yGmbH2dp>aQlgZqrcXsuH>WFx1*{jpM1$uN-WVLTdtbI*A9GIIe9=jn?8 zHd`MUi$4NuZGr&ffA%*DB|Q58xb5$*u`m0nW+=SFp+L_T9PPWLdV?GIbJ-2|f|wQE z2^f_U+`WW`X$agNh|sVbp%FL7mzRwdLZ4wyCgT*uwH>M>8ft`#@n+0xW~ z{-^cU)8r-SOP{OyzW{(mFiaJNH{Gv_PMHVgD(W-6xr&}Kz4Tck_ E0l%>>!vFvP literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/_dafny.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/_dafny.py new file mode 100644 index 0000000000..2bcd742785 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/_dafny.py @@ -0,0 +1,476 @@ +"""Runtime enabling Dafny language features.""" +import builtins +from dataclasses import dataclass +from contextlib import contextmanager +from fractions import Fraction +from collections import Counter +from collections.abc import Iterable +from functools import reduce +from types import GeneratorType, FunctionType +from itertools import chain, combinations, count + +class classproperty(property): + def __get__(self, instance, owner): + return classmethod(self.fget).__get__(None, owner)() + +def print(value): + builtins.print(value, end="") + +# Dafny strings are currently sequences of UTF-16 code units. +# To make a best effort attempt at printing the right characters we attempt to decode, +# but have to allow for invalid sequences. +def string_from_utf_16(utf_16_code_units): + return b''.join(ord(c).to_bytes(2, 'little') for c in utf_16_code_units).decode("utf-16-le", errors = 'replace') + +def string_of(value) -> str: + if hasattr(value, '__dafnystr__'): + return value.__dafnystr__() + elif value is None: + return "null" + elif isinstance(value, bool): + return "true" if value else "false" + elif isinstance(value, str): + # This is only for Dafny char values. + # Dafny strings are represented as Seq's of individual char values, + # and Seq defines __dafnystr__. + return string_from_utf_16(value) + elif isinstance(value, tuple): + return '(' + ', '.join(map(string_of, value)) + ')' + elif isinstance(value, FunctionType): + return "Function" + else: + return str(value) + +@dataclass +class Break(Exception): + target: str + +@dataclass +class Continue(Exception): + target: str + +class TailCall(Exception): + pass + +@contextmanager +def label(name: str = None): + try: + yield + except Break as g: + if g.target != name: + raise g + except TailCall as g: + if name is not None: + raise g + +@contextmanager +def c_label(name: str = None): + try: + yield + except Continue as g: + if g.target != name: + raise g + +class CodePoint(str): + + escapes = { + '\n' : "\\n", + '\r' : "\\r", + '\t' : "\\t", + '\0' : "\\0", + '\'' : "\\'", + '\"' : "\\\"", + '\\' : "\\\\", + } + + def __escaped__(self): + return self.escapes.get(self, self) + + def __dafnystr__(self): + return f"'{self.__escaped__()}'" + + def __add__(self, other): + return CodePoint(plus_char(self, other)) + + def __sub__(self, other): + return CodePoint(minus_char(self, other)) + +class Seq(tuple): + def __init__(self, __iterable = None, isStr = False): + ''' + isStr defines whether this value should be tracked at runtime as a string (a.k.a. seq) + It accepts three different values: + - True: this value is definitely a string, mark it as such + - False: this value might be a string, apply heuristics to make a best guess + - None: don't apply heuristics, don't mark it as a string + + None is used when --unicode-char is true, to ensure consistent printing of strings + across backends without depending on any runtime tracking. + See docs/Compilation/StringsAndChars.md. + ''' + + if __iterable is None: + __iterable = [] + if isStr is None: + self.isStr = None + else: + self.isStr = isStr \ + or isinstance(__iterable, str) \ + or (isinstance(__iterable, Seq) and __iterable.isStr) \ + or (not isinstance(__iterable, GeneratorType) + and all(isinstance(e, str) and len(e) == 1 for e in __iterable) + and len(__iterable) > 0) + + @property + def Elements(self): + return self + + @property + def UniqueElements(self): + return frozenset(self) + + def VerbatimString(self, asliteral): + if asliteral: + return f"\"{''.join(map(lambda c: c.__escaped__(), self))}\"" + else: + return ''.join(self) + + def __dafnystr__(self) -> str: + if self.isStr: + # This should never be true when using --unicode-char, + # so it is safe to assume we are a sequence of UTF-16 code units. + return string_from_utf_16(self) + return '[' + ', '.join(map(string_of, self)) + ']' + + def __add__(self, other): + return Seq(super().__add__(other), isStr=self.isStr and other.isStr) + + def __getitem__(self, key): + if isinstance(key, slice): + indices = range(*key.indices(len(self))) + return Seq((self[i] for i in indices), isStr=self.isStr) + return super().__getitem__(key) + + def set(self, key, value): + l = list(self) + l[key] = value + return Seq(l, isStr=self.isStr) + + def __hash__(self) -> int: + return hash(tuple(self)) + + def __lt__(self, other): + return len(self) < len(other) and self == other[:len(self)] + + def __le__(self, other): + return len(self) <= len(other) and self == other[:len(self)] + +# Convenience for translation when --unicode-char is enabled +def SeqWithoutIsStrInference(__iterable = None): + return Seq(__iterable, isStr = None) + +class Array: + def __init__(self, initValue, *dims): + def create_structure(initValue, *dims): + return [initValue if len(dims) <= 1 else create_structure(initValue, *dims[1:]) for _ in range(dims[0])] + self.dims = list(dims) + self.arr = create_structure(initValue, *dims) + + def __dafnystr__(self) -> str: + return f'array{self.dims}' + + def __str__(self): + return self.__dafnystr__() + + def length(self, i): + return self.dims[i] if i < len(self.dims) else None + + def __len__(self): + return self.length(0) + + def __getitem__(self, key): + if not isinstance(key, Iterable): + return self.arr[key] + arr = self.arr + for i in key: + arr = arr[i] + return arr + + def __setitem__(self, key, value): + if not isinstance(key, Iterable): + self.arr[key] = value + return + arr = self.arr + for i in range(len(key)-1): + arr = arr[key[i]] + arr[key[-1]] = value + +class Set(frozenset): + @property + def Elements(self): + return self + + @property + def AllSubsets(self): + # https://docs.python.org/3/library/itertools.html#itertools-recipes + s = list(self) + return map(Set, chain.from_iterable(combinations(s, r) for r in range(len(s)+1))) + + def __dafnystr__(self) -> str: + return '{' + ', '.join(map(string_of, self)) + '}' + + def union(self, other): + return Set(super().union(self, other)) + + def intersection(self, other): + return Set(super().intersection(other)) + + def ispropersubset(self, other): + return self.issubset(other) and self != other + + def __or__(self, other): + return self.union(other) + + def __sub__(self, other): + return Set(super().__sub__(other)) + +class MultiSet(Counter): + def __dafnystr__(self) -> str: + return 'multiset{' + ', '.join(map(string_of, self.elements())) + '}' + + def __len__(self): + return reduce(lambda acc, key: acc + self[key], self, 0) + + def union(self, other): + return MultiSet(self + other) + + def __or__(self, other): + return self.union(other) + + def intersection(self, other): + return MultiSet(self & other) + + def __sub__(self, other): + return MultiSet(super().__sub__(other)) + + @property + def keys(self): + return Set(key for key in self if self[key] > 0) + + @property + def Elements(self): + return self.elements() + + @property + def UniqueElements(self): + return self.keys + + def isdisjoint(self, other): + return frozenset(self.keys).isdisjoint(frozenset(other.keys)) + + def issubset(self, other): + return all(self[key] <= other[key] for key in frozenset(self).union(frozenset(other))) + + def ispropersubset(self, other): + return self.issubset(other) and len(self) < len(other) + + def set(self, key, value): + set = Counter(self) + set[key] = value + return MultiSet(set) + + def __hash__(self): + return hash(frozenset(self.keys)) + + def __eq__(self, other): + return all(self[key] == other[key] for key in self.keys | other.keys) + + def __ne__(self, other): + return not (self == other) + + def __setattr__(self, key, value): + raise TypeError("'Map' object is immutable") + + def __contains__(self, item): + return self[item] > 0 + +class Map(dict): + def __dafnystr__(self) -> str: + return 'map[' + ', '.join(map(lambda i: f'{string_of(i[0])} := {string_of(i[1])}', self.items)) + ']' + + @property + def Elements(self): + return self + + @property + def keys(self): + return Set(super().keys()) + + @property + def values(self): + return Set(super().values()) + + @property + def items(self): + return Set(super().items()) + + def set(self, key, value): + map = dict(self) + map[key] = value + return Map(map) + + def __sub__(self, other): + map = dict(self) + for key in list(other): + map.pop(key, None) + return Map(map) + + def __or__(self, other): + map = dict(self) + for k, v in other.items: + map[k] = v + return Map(map) + + def __hash__(self): + return hash(frozenset(self)) + + def __setattr__(self, key, value): + raise TypeError("'Map' object is immutable") + +class BigOrdinal: + @staticmethod + def is_limit(ord): + return ord == 0 + + @staticmethod + def is_succ(ord): + return 0 < ord + + @staticmethod + def offset(ord): + return ord + + @staticmethod + def is_nat(ord): + # at run time, every ORDINAL is a natural number + return True + +class BigRational(Fraction): + def __dafnystr__(self): + if self.denominator == 1: + return f"{self.numerator}.0" + correction = self.divides_a_power_of_10(self.denominator) + if correction is None: + return f"({self.numerator}.0 / {self.denominator}.0)" + compensation, shift = correction + if self.numerator < 0: + sign, digits = "-", str(-self.numerator*compensation) + else: + sign, digits = "", str(self.numerator*compensation) + if shift < len(digits): + n = len(digits) - shift + return f"{sign}{digits[:n]}.{digits[n:]}" + return f"{sign}0.{'0' * (shift - len(digits))}{digits}" + + @staticmethod + def isolate_factor(f, x): + y = 0 + while x > 1 and x % f == 0: + y += 1 + x //= f + return x, y + + @staticmethod + def divides_a_power_of_10(x): + rem, expA = BigRational.isolate_factor(10, x) + if rem % 5 == 0 or rem % 2 == 0 or rem == 1: + major, minor = (5, 2) if rem % 5 == 0 else (2, 5) + rem, expB = BigRational.isolate_factor(major, rem) + return (minor**expB, expA+expB) if rem == 1 else None + return None + + def __add__(self, other): + return BigRational(super().__add__(other)) + + def __sub__(self, other): + return BigRational(super().__sub__(other)) + + def __mul__(self, other): + return BigRational(super().__mul__(other)) + + def __truediv__(self, other): + return BigRational(super().__truediv__(other)) + +def plus_char(a, b): + return chr(ord(a) + ord(b)) + +def minus_char(a, b): + return chr(ord(a) - ord(b)) + +def euclidian_division(a, b): + if 0 <= a: + if 0 <= b: + return a // b + else: + return -(a // (-b)) + else: + if 0 <= b: + return -((-a-1) // b) - 1 + else: + return (-a-1) // (-b) + 1 + +def euclidian_modulus(a, b): + bp = abs(b) + if 0 <= a: + return a % bp + c = (-a) % bp + return c if c == 0 else bp - c + +@dataclass +class HaltException(Exception): + message: str + +def quantifier(vals, frall, pred): + for u in vals: + if pred(u) != frall: + return not frall + return frall + +def AllBooleans(): + return [False, True] + +def AllChars(): + return (chr(i) for i in range(0x10000)) + +def AllUnicodeChars(): + return chain((CodePoint(chr(i)) for i in range(0xD800)), + (CodePoint(chr(i)) for i in range(0xE000, 0x11_0000))) + +def AllIntegers(): + return (i//2 if i % 2 == 0 else -i//2 for i in count(0)) + +def IntegerRange(lo, hi): + if lo is None: + return count(hi-1, -1) + if hi is None: + return count(lo) + return range(lo, hi) + +class Doubler: + def __init__(self, start): + self.start = start + + def __iter__(self): + i = self.start + while True: + yield i + i *= 2 + +class defaults: + bool = staticmethod(lambda: False) + char = staticmethod(lambda: 'D') + codepoint = staticmethod(lambda: CodePoint(defaults.char())) + int = staticmethod(lambda: 0) + real = staticmethod(BigRational) + pointer = staticmethod(lambda: None) + tuple = staticmethod(lambda *args: lambda: tuple(a() for a in args)) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/dafny_generated.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/dafny_generated.py new file mode 100644 index 0000000000..7fef7fc1c6 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/dafny_generated.py @@ -0,0 +1,15 @@ +# Dafny program the_program compiled into Python +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny + +try: + dafnyArgs = [_dafny.Seq(a) for a in sys.argv] + module_.default__.Test____Main____(dafnyArgs) +except _dafny.HaltException as e: + _dafny.print("[Program halted] " + e.message + "\n") + sys.exit(1) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/module_.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/module_.py new file mode 100644 index 0000000000..2dcf4297b9 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/module_.py @@ -0,0 +1,80 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny +import System_ +import SimpleBooleanImplTest_Compile +import simple.types.boolean.internaldafny.wrapped +import WrappedSimpleTypesBooleanTest_Compile + +assert "module_" == __name__ +module_ = sys.modules[__name__] + +class default__: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "_module._default" + @staticmethod + def Test____Main____(noArgsParameter__): + d_12_success_: bool + d_12_success_ = True + _dafny.print(_dafny.string_of(_dafny.Seq("SimpleBooleanImplTest.GetBooleanTrue: "))) + try: + if True: + SimpleBooleanImplTest_Compile.default__.GetBooleanTrue() + if True: + _dafny.print(_dafny.string_of(_dafny.Seq("PASSED\n"))) + except _dafny.HaltException as e: + d_13_haltMessage_ = e.message + if True: + _dafny.print(_dafny.string_of(_dafny.Seq("FAILED\n "))) + _dafny.print(_dafny.string_of(d_13_haltMessage_)) + _dafny.print(_dafny.string_of(_dafny.Seq("\n"))) + d_12_success_ = False + _dafny.print(_dafny.string_of(_dafny.Seq("SimpleBooleanImplTest.GetBooleanFalse: "))) + try: + if True: + SimpleBooleanImplTest_Compile.default__.GetBooleanFalse() + if True: + _dafny.print(_dafny.string_of(_dafny.Seq("PASSED\n"))) + except _dafny.HaltException as e: + d_14_haltMessage_ = e.message + if True: + _dafny.print(_dafny.string_of(_dafny.Seq("FAILED\n "))) + _dafny.print(_dafny.string_of(d_14_haltMessage_)) + _dafny.print(_dafny.string_of(_dafny.Seq("\n"))) + d_12_success_ = False + _dafny.print(_dafny.string_of(_dafny.Seq("WrappedSimpleTypesBooleanTest.GetBooleanTrue: "))) + try: + if True: + WrappedSimpleTypesBooleanTest_Compile.default__.GetBooleanTrue() + if True: + _dafny.print(_dafny.string_of(_dafny.Seq("PASSED\n"))) + except _dafny.HaltException as e: + d_15_haltMessage_ = e.message + if True: + _dafny.print(_dafny.string_of(_dafny.Seq("FAILED\n "))) + _dafny.print(_dafny.string_of(d_15_haltMessage_)) + _dafny.print(_dafny.string_of(_dafny.Seq("\n"))) + d_12_success_ = False + _dafny.print(_dafny.string_of(_dafny.Seq("WrappedSimpleTypesBooleanTest.GetBooleanFalse: "))) + try: + if True: + WrappedSimpleTypesBooleanTest_Compile.default__.GetBooleanFalse() + if True: + _dafny.print(_dafny.string_of(_dafny.Seq("PASSED\n"))) + except _dafny.HaltException as e: + d_16_haltMessage_ = e.message + if True: + _dafny.print(_dafny.string_of(_dafny.Seq("FAILED\n "))) + _dafny.print(_dafny.string_of(d_16_haltMessage_)) + _dafny.print(_dafny.string_of(_dafny.Seq("\n"))) + d_12_success_ = False + if not(d_12_success_): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(3,0): " + _dafny.string_of(_dafny.Seq("Test failures occurred: see above.\n"))) + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/simple/types/boolean/internaldafny/__pycache__/impl.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/simple/types/boolean/internaldafny/__pycache__/impl.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c17025cb70c9546ee4f52ec15a93f5b69d2fd285 GIT binary patch literal 4223 zcmb6cO>Y~=b#}SCq$rU~Te2L>Zo<}%9V#*DplDjTj(}PLTnVm%NQxaVf^KQ<$|Ak| z=o@><6{9;v}=n zH*em&nR)v@hkr?>k_6iC{?ju)juY}P90X1Fk;8uj@{kzB5G+%yAU$R&)wmYtxMU@&6WRpF1uLl~`T9w1lJ`^E6z@}7n)j-v@;;+w4B0$!U&OO* zafSRr5XlWn4X>2qbmYEZnylK_z6p>QB zS##Q#>~a-m@(ys@`MdSHWfp7sa?LSmt!Np=%~~su93?y^Xn_!i*Mahom_!o{qKSsE zL$sJ7n$o6d#C9Z2HYA`Zh72%nCQvDlV8xSQAEHedarlS?n_lN)T=&jjvdU)7DG4DT zA*d1j9clm`66eTVCB%0F!Hz5>V@E~>=ny^BwL#X&V*yopCL+x;e7?R^uQtk{+tgCM zwpqRhW9(SmFgJ@$%VBZ7#3_#jCfT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ny_generated/simple/types/boolean/internaldafny/__pycache__/wrapped.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/simple/types/boolean/internaldafny/__pycache__/wrapped.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8b27ca57276d572e92f526e431eba18d45479c20 GIT binary patch literal 1831 zcma)6&2Jk;6rb5o$F;LfP|E=-Kp+*jl2-@;2M`ES34t1496+opt=67#vdQcRGiwz` z94zpm2M*lA5pgK0df`toRRq?YA|VdFr3$B>cr)vDY8psqX5YMhZ)W$s-|x-*(rnfd zv@ajtA>SDY{i$B6X3dq8A3!-k1QE(srB{l&29R(I6eQZ}TY6De0>}RjrES3^FD})ZBAuGbLj~8Bqly1Uv;($<)chNoExd%d8 zg0g{73toQwv;Uc(T=;C*Px>TF{To#56yX)^pDECeGZVs37GRyu>&6zyzgra!fl#T9u<`MC1Ab=%%211F9GJy0c+XjdN=txygXGOn!;P)IY0%-s_ibQ z-mR(#?W(o9oqB(&PG05G^KvD15pRIGWlN`oLfV=b>CTyv%_VB&)sp-<;Tu^xh_}Nt zY$ZA>trC}4z9UxE*dmq3isU*4tfzd7_?J@no<^xpZy3mEUbeJ!t}STzy_PL=hEnKcP^{ zgue);eC#3(`T8CIiLOMWLoNjYf0bEheZ6(yvmsS!LJ6xR*xe~*bRKPhETveWQ=O9R@ zELiDwN1~ufD6cG$^9fvU>g-qbFJBku-*~!)`12}`D@tgf^m$oS#N*m~Wd!f@>##)C zwD=vwv57IBq54?&8G37a-k71w)8#QkFHD!m5n3JVK10p1?z2 str: + return "simple.types.boolean.internaldafny.impl_Compile.SimpleBooleanClient" + def ctor__(self, config): + (self)._config = config + + def GetBoolean(self, input): + output: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(simple.types.boolean.internaldafny.types.GetBooleanOutput.default())() + out0_: Wrappers_Compile.Result + out0_ = SimpleBooleanImpl_Compile.default__.GetBoolean((self).config, input) + output = out0_ + return output + + @property + def config(self): + return self._config + +class default__: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "simple.types.boolean.internaldafny.impl_Compile._default" + @staticmethod + def DefaultSimpleBooleanConfig(): + return simple.types.boolean.internaldafny.types.SimpleBooleanConfig_SimpleBooleanConfig() + + @staticmethod + def SimpleBoolean(config): + res: Wrappers_Compile.Result = None + d_1_client_: simple.types.boolean.internaldafny.impl.SimpleBooleanClient + nw0_ = simple.types.boolean.internaldafny.impl.SimpleBooleanClient() + nw0_.ctor__(SimpleBooleanImpl_Compile.Config_Config()) + d_1_client_ = nw0_ + res = Wrappers_Compile.Result_Success(d_1_client_) + return res + return res + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/simple/types/boolean/internaldafny/types.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/simple/types/boolean/internaldafny/types.py new file mode 100644 index 0000000000..2df89a347a --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/simple/types/boolean/internaldafny/types.py @@ -0,0 +1,145 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny +import System_ + +import Wrappers_Compile + +assert "simple.types.boolean.internaldafny.types" == __name__ + +class DafnyCallEvent: + @classmethod + def default(cls, default_I, default_O): + return lambda: DafnyCallEvent_DafnyCallEvent(default_I(), default_O()) + def __ne__(self, __o: object) -> bool: + return not self.__eq__(__o) + @property + def is_DafnyCallEvent(self) -> bool: + return isinstance(self, simple.types.boolean.internaldafny.types.DafnyCallEvent_DafnyCallEvent) + +class DafnyCallEvent_DafnyCallEvent(DafnyCallEvent, NamedTuple('DafnyCallEvent', [('input', Any), ('output', Any)])): + def __dafnystr__(self) -> str: + return f'simple.types.boolean.internaldafny.types_Compile.DafnyCallEvent.DafnyCallEvent({_dafny.string_of(self.input)}, {_dafny.string_of(self.output)})' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, simple.types.boolean.internaldafny.types.DafnyCallEvent_DafnyCallEvent) and self.input == __o.input and self.output == __o.output + def __hash__(self) -> int: + return super().__hash__() + + +class GetBooleanInput: + @classmethod + def default(cls, ): + return lambda: GetBooleanInput_GetBooleanInput(Wrappers_Compile.Option_None.default()()) + def __ne__(self, __o: object) -> bool: + return not self.__eq__(__o) + @property + def is_GetBooleanInput(self) -> bool: + return isinstance(self, simple.types.boolean.internaldafny.types.GetBooleanInput_GetBooleanInput) + +class GetBooleanInput_GetBooleanInput(GetBooleanInput, NamedTuple('GetBooleanInput', [('value', Any)])): + def __dafnystr__(self) -> str: + return f'simple.types.boolean.internaldafny.types_Compile.GetBooleanInput.GetBooleanInput({_dafny.string_of(self.value)})' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, simple.types.boolean.internaldafny.types.GetBooleanInput_GetBooleanInput) and self.value == __o.value + def __hash__(self) -> int: + return super().__hash__() + + +class GetBooleanOutput: + @classmethod + def default(cls, ): + return lambda: GetBooleanOutput_GetBooleanOutput(Wrappers_Compile.Option_None.default()()) + def __ne__(self, __o: object) -> bool: + return not self.__eq__(__o) + @property + def is_GetBooleanOutput(self) -> bool: + return isinstance(self, simple.types.boolean.internaldafny.types.GetBooleanOutput_GetBooleanOutput) + +class GetBooleanOutput_GetBooleanOutput(GetBooleanOutput, NamedTuple('GetBooleanOutput', [('value', Any)])): + def __dafnystr__(self) -> str: + return f'simple.types.boolean.internaldafny.types_Compile.GetBooleanOutput.GetBooleanOutput({_dafny.string_of(self.value)})' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, simple.types.boolean.internaldafny.types.GetBooleanOutput_GetBooleanOutput) and self.value == __o.value + def __hash__(self) -> int: + return super().__hash__() + + +class ISimpleBooleanClientCallHistory: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "simple.types.boolean.internaldafny.types_Compile.ISimpleBooleanClientCallHistory" + +class ISimpleBooleanClient: + pass + def GetBoolean(self, input): + pass + + +class SimpleBooleanConfig: + @_dafny.classproperty + def AllSingletonConstructors(cls): + return [SimpleBooleanConfig_SimpleBooleanConfig()] + @classmethod + def default(cls, ): + return lambda: SimpleBooleanConfig_SimpleBooleanConfig() + def __ne__(self, __o: object) -> bool: + return not self.__eq__(__o) + @property + def is_SimpleBooleanConfig(self) -> bool: + return isinstance(self, simple.types.boolean.internaldafny.types.SimpleBooleanConfig_SimpleBooleanConfig) + +class SimpleBooleanConfig_SimpleBooleanConfig(SimpleBooleanConfig, NamedTuple('SimpleBooleanConfig', [])): + def __dafnystr__(self) -> str: + return f'simple.types.boolean.internaldafny.types_Compile.SimpleBooleanConfig.SimpleBooleanConfig' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, simple.types.boolean.internaldafny.types.SimpleBooleanConfig_SimpleBooleanConfig) + def __hash__(self) -> int: + return super().__hash__() + + +class Error: + @classmethod + def default(cls, ): + return lambda: Error_CollectionOfErrors(_dafny.Seq({}), _dafny.Seq({})) + def __ne__(self, __o: object) -> bool: + return not self.__eq__(__o) + @property + def is_CollectionOfErrors(self) -> bool: + return isinstance(self, simple.types.boolean.internaldafny.types.Error_CollectionOfErrors) + @property + def is_Opaque(self) -> bool: + return isinstance(self, simple.types.boolean.internaldafny.types.Error_Opaque) + +class Error_CollectionOfErrors(Error, NamedTuple('CollectionOfErrors', [('list', Any), ('message', Any)])): + def __dafnystr__(self) -> str: + return f'simple.types.boolean.internaldafny.types_Compile.Error.CollectionOfErrors({_dafny.string_of(self.list)}, {self.message.VerbatimString(True)})' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, simple.types.boolean.internaldafny.types.Error_CollectionOfErrors) and self.list == __o.list and self.message == __o.message + def __hash__(self) -> int: + return super().__hash__() + +class Error_Opaque(Error, NamedTuple('Opaque', [('obj', Any)])): + def __dafnystr__(self) -> str: + return f'simple.types.boolean.internaldafny.types_Compile.Error.Opaque({_dafny.string_of(self.obj)})' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, simple.types.boolean.internaldafny.types.Error_Opaque) and self.obj == __o.obj + def __hash__(self) -> int: + return super().__hash__() + + +class OpaqueError: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return simple.types.boolean.internaldafny.types.Error_CollectionOfErrors.default()() + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/simple/types/boolean/internaldafny/wrapped.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/simple/types/boolean/internaldafny/wrapped.py new file mode 100644 index 0000000000..a26fd2c2c6 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/simple/types/boolean/internaldafny/wrapped.py @@ -0,0 +1,24 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny +import System_ +import SimpleBooleanImplTest_Compile + +import simple.types.boolean.internaldafny.types + +assert "simple.types.boolean.internaldafny.wrapped" == __name__ + +class default__: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "simple.types.boolean.internaldafny.wrapped_Compile._default" + @staticmethod + def WrappedDefaultSimpleBooleanConfig(): + return simple.types.boolean.internaldafny.types.SimpleBooleanConfig_SimpleBooleanConfig() + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/README.md b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/README.md new file mode 100644 index 0000000000..4d95aa6598 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/README.md @@ -0,0 +1,3 @@ +## Simple_boolean Client + +simple_boolean client diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/pyproject.toml b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/pyproject.toml new file mode 100644 index 0000000000..cb3492f592 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/pyproject.toml @@ -0,0 +1,46 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +[build-system] +requires = ["setuptools", "setuptools-scm", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "simple_boolean" +version = "0.0.1" +description = "simple_boolean client" +readme = "README.md" +requires-python = ">=3.11" +keywords = ["smithy", "simple_boolean"] +license = {text = "Apache-2.0"} +classifiers = [ + "Development Status :: 2 - Pre-Alpha", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Natural Language :: English", + "License :: OSI Approved :: Apache Software License", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.11" +] + +dependencies = [ + "smithy_python==0.0.1" +] +[tool.setuptools.packages.find] +exclude=["tests*"] + +[tool.mypy] +strict = true +warn_unused_configs = true + +[[tool.mypy.overrides]] +module = ["awscrt", "pytest"] +ignore_missing_imports = true + +[tool.black] +target-version = ["py311"] + +[tool.pytest.ini_options] +python_classes = ["!Test"] +asyncio_mode = "auto" diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/__init__.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/__init__.py new file mode 100644 index 0000000000..247be3e3d4 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/__init__.py @@ -0,0 +1 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/__pycache__/__init__.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a6241e1a7098a8ad51e57ec1f478561e59aa54a4 GIT binary patch literal 258 zcmXv}v5EpQ5KR=A-3A=S_e&rGniyTl0~+(@(aXIIPSar0YPl6oIQ4@ zc=O&H<}vd-nT#3L>wM8))bEYxinruBBywY#6>P>ge=PP$KbztEDz*t?61GxKY4l6kHy6UJk(I|U-3tsTa25GAC%Mh!NJ!nk0etOIm>iD+TxMXY=_j_gq90|ln2S}K(_ w;ImW|@dGsZ&yf3eQA*=YmU15I_vqW9t}HC#fUa!*NK=AGpL70T9mGC)A3^F(N&o-= literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/__pycache__/client.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/__pycache__/client.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ab7eea82ef162f7f96c3726285b04f5d523e5556 GIT binary patch literal 12721 zcmds7TWlLwdOkyPcoQj(c+*`P-Rvl~sQ4~9wz6_;OTI)_)^cn!@iH_ylqvJJGb1~4 zsnpFHTRr$ei)I@a#R3AlPQA#c^+O+AV7IV?0_&FoLtzXN1Pll$7U;gwNP-%RKJ-6l zhI1jMB#Ye^MGuGnoH^$||M}15|Ic^M%-?&xZUo_rAOB^tc>zY^%5?Z^qMN{Az})INywCG9>1hTPkqx z#QBOX5f{YYVGV{Y75kg{Tq-?ZvCn1}=hHb56pjfTpN?nJx476mC&sSk^BFFVb3Erc z{zf{%o#6RA4`qE*oOn#hJ(VjgiWNprIJYQ53KZ(q(+E?n?ipD6^dzO2fk%@QIG@fI zGMrl9o0&A1!{XawNp5R>EtRHIIg#TNTtUq96~EyD+AMM(h%*&h(c7-nl2E!>p+5ED z%a5S%KS3OdQb`oGB&n!1=}%fYThemNfnZK?G-q$uN-C)-m}z(Ds3RFj+BxUeJV^)V zO4*Z6;By04Qv;Wa^Kea^ZQjCpxn{kFltqsx-N55hc^Ez2#DjHpa7@aRY`SBMw)`*E z<$=2V-$_3&^k4v5%5cq`FJ;qPp~sTVTo8K5!Zjx?Mh-F#4xFcyuJyiNGU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b{!Uu85aZFOxT?``ti xboy2ttB#VhO?I~3rpqp7rFFHfb9YWriIv0_RwXrGm_Sx{m9HL zu5LaA+CvY47UE;+!KI{sj08TIIR$#kO~F0o)Hkz|ZIwVrZ=Zhi-t7CH{iEIX5v;+J zAIV1!LVxScV%6s0{C5D)&>kX)SPZ3BXjvND%ub!qN!`#*Yhf+*LeIz@Ru3D*B{kMe z{m@TaVaq}`q89P~s-IX0J%^`SHoA{U;|U_o6C334ROv?;ygs%)=RDHTB=E~#4*D{bY11#%f_m)gBin*7*);PaY65~1PfK$%aS~M z@KQ(9wbkl*7` z2BcEKl4A+U1%sRi50kWDbe@{;2e7sa%yAkdnWQ|Xh0M9w4t7U0V2O}HK3LLh1&5;~ z9tD`wV3g+vB9J32%{GRzQesS!k|)^^R5YMJ(6}`2!4eKQeOyu@drPi4m3$lt331Zl zxN>e}!9r$YPlPD7*-9nz1Dc5dXC#R86gmPbr4IFVF}ITpXgk-`t>jUJwdtXvocO&l4t$TsW^~% z(Lc=jLBViL`$f*iY0isLe;11Ubq+-k{mP^s^#z`{zt77|CMk%Eu^fRx!Q(lMV&giB z!Nib)#-tF#P;5(0(~-h6M=cVb+qyH zv`_uKUBk!l?1Z@FL J4F_OS{ujE8!8rf` literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/__pycache__/deserialize.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/__pycache__/deserialize.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..824ed1002ab32142e098624843c9d1dd1f774dd1 GIT binary patch literal 817 zcmZ`%O^eh(5be$+J#piRAd0AmRTP{RCI`oh$O^jPL0k_zUgi>Fx@I;zoew%4CE`I) z@F(cegD9du#AAd#NI(?4xVM41?aAs)X5AgI(y4k~RjGPiosXT)3PD+$yyibCA;0xz zA*=zjbp&q+C!7ir(V;;JH+W05B6Dcg*c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g}A~*nE0$Q1( zmohHN5yoLg2!92moj_@PAqWvND96e9OYr4a0JbkzIcQZLF2S&P6W~dX zez&K;vF=;H+Oxmdvxiq7+ViLO{E0pP+tq6W<9>4hk1CN{=eBfNmmqHgJ|$rWpqL@V zkK-isvoMJvh(Z?`SDP2pWX!SV%W@Tycs83 zah2rlmg1YkS<0D!za@;<9Y5|nz0%H^kWT&gg*A4-<-M}xS}#nqoa6G=<1!E~b5)*3 zmH7?XmGCNvxB)OpV2;kEaPE4(FnDX}1`=&j3RmV?3-O{LTq_``_MS zO~>^idLH)Qdn896Po^5kZ04Q8N4txAi#Z-@H4M~v9tJyypB;Vjz4u7YJ)Rg`(y=Qy cx(NFlhg(Pe)43a`S8mEJUAg5&BbB;;01suQp8x;= literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/__pycache__/models.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/__pycache__/models.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4bbf57650f02ace3f28a05b4a4d79ece5415de7d GIT binary patch literal 5279 zcmeHK|7#q_6`$GN`=Yy(PLgfKk`-$e$Bs_4cR9OhsZk86Rfi^2F16DiM4I*Lb|hW2 zcYB`QvwMeJ6cG3fq6pfegE*ic5;wyAAJRXdg;P;MECd9lkp5E6C;_9N`rho_-WN&W zhMHpN>h|r-&f7OLpZDgykN(ix8zFFg^U-}{BTC5MvD3ViMq_^l8XLqQ1~o~J&eEJT zE9K-_nG%V-O$=$381f^DkjHR)*Q_E&6c`C~jRcI~4U!1`6BQG(E5DU5xyp1lq{65t}3$;7BxbLM~#3%<`pBnsyqVgkNx>(V_+)`-}b<_y+(xfKwkmP zDD?Xb3HBIs<8L$PN0wzWJ^zz@q3F1QJGxn9Gh390!BU1c%;6KUli}V!31WjR(`BMT z%exG6gKW_m-UHn&$yID-&I=PZex|AizfHYoGj6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ao6NUf)}*^KiLR-k1a9Kv~Pj%S<&Cd z)7$ZjJMoLpffn)a!A#v8MXVjgWw`&h9A&bTqfFK&E+ajeY>76GGWlQSCgL|vwo)`Nt;RwEaV`_+RNDUjB~ X;t9U{x;3y!59^5Ux)uFTM0EZer}xX` literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/__pycache__/serialize.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/__pycache__/serialize.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..920864099a2b0767b945c31907d20133b7e79cb7 GIT binary patch literal 795 zcmZ`%O^eh(5be%ndg8`$4$6XFcEO9eOk}(+dvF&-)V=I_nM;i6n%V4hKIn8@A|3<< z|AAgTh#%;W(0>p?K>~u{#k~#8ZBJHbGJ`u{r}OGns#5h*>37}k8o~AD=mq~y3Hhy^ z#bOPaZ6kR_IN?-~hz<=(xWQYZ6`4b`=B8*zY{-zefpG>V?|?C4+*+C;M zgiN>J+&q2h-p@d0uE>KZ;7RQ6LN-xJ>K-R@k_tZnH%&wlB{Ds94D?eUc;M7X%D{IgKzerGzT*bl0C<&uFZS&l@{7>I`zX? zfsB2@^`z!8segeyuR)JTwh<~8)gLSM$*MblAhM@<7va>}!f-BNTV6z0|By@~Ok0%F rsYPf+OCtW=zsQyH?EXQnmS^{rQF`NjZ%WX7Uaw7g_d#v{3$>=d2ix6L literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/client.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/client.py new file mode 100644 index 0000000000..8374b8429f --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/client.py @@ -0,0 +1,371 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +from asyncio import sleep +from copy import deepcopy +from typing import Awaitable, Callable, TypeVar, cast + + +from .config import Config, Plugin +from .serialize import _serialize_get_boolean +from .errors import ServiceError +from .models import GetBooleanInput, GetBooleanOutput +from simple.types.boolean.internaldafny.types import GetBooleanInput_GetBooleanInput as DafnyGetBooleanInput +from simple.types.boolean.internaldafny.types import GetBooleanOutput_GetBooleanOutput as DafnyGetBooleanOutput +from simple.types.boolean.internaldafny.impl import SimpleBooleanClient +from .deserialize import _deserialize_get_boolean +from smithy_python.interfaces.interceptor import Interceptor, InterceptorContext + +import Extern + +Input = TypeVar("Input") +Output = TypeVar("Output") + +class SimpleBoolean: + """Client for SimpleBoolean + + :param config: Optional configuration for the client. Here you can set things like the + endpoint for HTTP services or auth credentials. + + :param plugins: A list of callables that modify the configuration dynamically. These + can be used to set defaults, for example. + """ + def __init__(self, config: Config | None = None, plugins: list[Plugin] | None = None): + self._config = config or Config(interceptors=None, retry_strategy=None, impl=SimpleBooleanClient()) + + # TODO add plugin to get impl from plugin? + + client_plugins: list[Plugin] = [ + ] + if plugins: + client_plugins.extend(plugins) + + for plugin in client_plugins: + plugin(self._config) + + async def get_boolean(self, input: GetBooleanInput, plugins: list[Plugin] | None = None) -> GetBooleanOutput: + """Invokes the GetBoolean operation. + + :param input: The operation's input. + + :param plugins: A list of callables that modify the configuration dynamically. + Changes made by these plugins only apply for the duration of the operation + execution and will not affect any other operation invocations. + """ + operation_plugins = [ + + ] + if plugins: + operation_plugins.extend(plugins) + + return await self._execute_operation( + input=input, + plugins=operation_plugins, + serialize=_serialize_get_boolean, + deserialize=_deserialize_get_boolean, + config=self._config, + ) + + async def _execute_operation( + self, + input: Input, + plugins: list[Plugin], + serialize: Callable[[Input, Config], Awaitable[DafnyGetBooleanInput]], + deserialize: Callable[[DafnyGetBooleanOutput, Config], Awaitable[Output]], + config: Config, + ) -> Output: + try: + return await self._handle_execution( + input, plugins, serialize, deserialize, config + ) + except Exception as e: + # Make sure every exception that we throw is an instance of ServiceError so + # customers can reliably catch everything we throw. + if not isinstance(e, ServiceError): + raise ServiceError(e) from e + raise e + + async def _handle_execution( + self, + input: Input, + plugins: list[Plugin], + serialize: Callable[[Input, Config], Awaitable[DafnyGetBooleanInput]], + deserialize: Callable[[DafnyGetBooleanOutput, Config], Awaitable[Output]], + config: Config, + ) -> Output: + context: InterceptorContext[Input, None, None, None] = InterceptorContext( + request=input, + response=None, + transport_request=None, + transport_response=None, + ) + _client_interceptors = config.interceptors or [] + client_interceptors = cast( + list[Interceptor[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput]], _client_interceptors + ) + interceptors = client_interceptors + + try: + # Step 1a: Invoke read_before_execution on client-level interceptors + for interceptor in client_interceptors: + interceptor.read_before_execution(context) + + # Step 1b: Run operation-level plugins + config = deepcopy(config) + for plugin in plugins: + plugin(config) + + _client_interceptors = config.interceptors or [] + interceptors = cast( + list[Interceptor[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput]], + _client_interceptors, + ) + + # Step 1c: Invoke the read_before_execution hooks on newly added + # interceptors. + for interceptor in interceptors: + if interceptor not in client_interceptors: + interceptor.read_before_execution(context) + + # Step 2: Invoke the modify_before_serialization hooks + for interceptor in interceptors: + context._request = interceptor.modify_before_serialization(context) + + # Step 3: Invoke the read_before_serialization hooks + for interceptor in interceptors: + interceptor.read_before_serialization(context) + + # Step 4: Serialize the request + context_with_transport_request = cast( + InterceptorContext[Input, None, DafnyGetBooleanInput, None], context + ) + context_with_transport_request._transport_request = await serialize( + context_with_transport_request.request, config + ) + + # Step 5: Invoke read_after_serialization + for interceptor in interceptors: + interceptor.read_after_serialization(context_with_transport_request) + + # Step 6: Invoke modify_before_retry_loop + for interceptor in interceptors: + context_with_transport_request._transport_request = ( + interceptor.modify_before_retry_loop(context_with_transport_request) + ) + + # Step 7: Acquire the retry token. + retry_strategy = config.retry_strategy + if retry_strategy is None: + # raise ServiceError( + # "No retry_strategy found on the operation config." + # ) + pass + retry_token = None # retry_strategy.acquire_initial_retry_token() + + while True: + # Make an attempt, creating a copy of the context so we don't pass + # around old data. + context_with_response = await self._handle_attempt( + deserialize, + interceptors, + context_with_transport_request.copy(), + config, + ) + + # We perform this type-ignored re-assignment because `context` needs + # to point at the latest context so it can be generically handled + # later on. This is only an issue here because we've created a copy, + # so we're no longer simply pointing at the same object in memory + # with different names and type hints. It is possible to address this + # without having to fall back to the type ignore, but it would impose + # unnecessary runtime costs. + context = context_with_response # type: ignore + + if isinstance(context_with_response.response, Exception): + # Step 7u: Reacquire retry token if the attempt failed + raise context_with_response.response + + else: + # Step 8: Invoke record_success + # retry_strategy.record_success(token=retry_token) + break + except Exception as e: + if context.response is not None: + # config.logger.exception(f"Exception occurred while handling: {context.response}") + pass + context._response = e + + # At this point, the context's request will have been definitively set, and + # The response will be set either with the modeled output or an exception. The + # transport_request and transport_response may be set or None. + execution_context = cast( + InterceptorContext[Input, Output, DafnyGetBooleanInput | None, DafnyGetBooleanOutput | None], context + ) + return await self._finalize_execution(interceptors, execution_context) + + async def _handle_attempt( + self, + deserialize: Callable[[DafnyGetBooleanOutput, Config], Awaitable[Output]], + interceptors: list[Interceptor[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput]], + context: InterceptorContext[Input, None, DafnyGetBooleanInput, None], + config: Config, + ) -> InterceptorContext[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput | None]: + try: + # assert config.interceptors is not None + # Step 7a: Invoke read_before_attempt + for interceptor in interceptors: + interceptor.read_before_attempt(context) + + # Steps 7b-e haven't had their python designs finalized yet + # Step 7b: Invoke service_auth_scheme_resolver.resolve_auth_scheme + # Step 7c: Invoke auth_scheme.identity_resolver + # Step 7d: Invoke auth_scheme.signer + # Step 7e: Invoke identity_resolver.resolve_identity + + # Step 7g: Invoke modify_before_signing + for interceptor in interceptors: + context._transport_request = interceptor.modify_before_signing(context) + + # Step 7h: Invoke read_before_signing + for interceptor in interceptors: + interceptor.read_before_signing(context) + + # Step 7i: Invoke signer.sign_request + # This step hasn't had its python design finalized yet + + # Step 7j: Invoke read_after_signing + for interceptor in interceptors: + interceptor.read_after_signing(context) + + # Step 7k: Invoke modify_before_transmit + for interceptor in interceptors: + context._transport_request = interceptor.modify_before_transmit(context) + + # Step 7l: Invoke read_before_transmit + for interceptor in interceptors: + interceptor.read_before_transmit(context) + + ## HERE + # Step 7m: Invoke http_client.send + if config.impl is None: + raise Exception("No impl found on the operation config.") + + context_with_response = cast( + InterceptorContext[Input, None, DafnyGetBooleanInput, DafnyGetBooleanOutput], context + ) + + print(f"\ntransport_request is {context_with_response.transport_request}") + + context_with_response._transport_response = config.impl.GetBoolean( + input=context_with_response.transport_request + ) + + # Step 7n: Invoke read_after_transmit + for interceptor in interceptors: + interceptor.read_after_transmit(context_with_response) + + # Step 7o: Invoke modify_before_deserialization + for interceptor in interceptors: + context_with_response._transport_response = ( + interceptor.modify_before_deserialization(context_with_response) + ) + + # Step 7p: Invoke read_before_deserialization + for interceptor in interceptors: + interceptor.read_before_deserialization(context_with_response) + + # Step 7q: deserialize + context_with_output = cast( + InterceptorContext[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput], + context_with_response, + ) + context_with_output._response = await deserialize( + context_with_output._transport_response, config + ) + + # Step 7r: Invoke read_after_deserialization + for interceptor in interceptors: + interceptor.read_after_deserialization(context_with_output) + except Exception as e: + if context.response is not None: + # config.logger.exception(f"Exception occurred while handling: {context.response}") + pass + context._response = e + + # At this point, the context's request and transport_request have definitively been set, + # the response is either set or an exception, and the transport_resposne is either set or + # None. This will also be true after _finalize_attempt because there is no opportunity + # there to set the transport_response. + attempt_context = cast( + InterceptorContext[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput | None], context + ) + return await self._finalize_attempt(interceptors, attempt_context) + + async def _finalize_attempt( + self, + interceptors: list[Interceptor[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput]], + context: InterceptorContext[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput | None], + ) -> InterceptorContext[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput | None]: + # Step 7s: Invoke modify_before_attempt_completion + try: + for interceptor in interceptors: + context._response = interceptor.modify_before_attempt_completion( + context + ) + except Exception as e: + if context.response is not None: + # config.logger.exception(f"Exception occurred while handling: {context.response}") + pass + context._response = e + + # Step 7t: Invoke read_after_attempt + for interceptor in interceptors: + try: + interceptor.read_after_attempt(context) + except Exception as e: + if context.response is not None: + # config.logger.exception(f"Exception occurred while handling: {context.response}") + pass + context._response = e + + return context + + async def _finalize_execution( + self, + interceptors: list[Interceptor[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput]], + context: InterceptorContext[Input, Output, DafnyGetBooleanInput | None, DafnyGetBooleanOutput | None], + ) -> Output: + try: + # Step 9: Invoke modify_before_completion + for interceptor in interceptors: + context._response = interceptor.modify_before_completion(context) + + # Step 10: Invoke trace_probe.dispatch_events + try: + pass + except Exception as e: + # log and ignore exceptions + # config.logger.exception(f"Exception occurred while dispatching trace events: {e}") + pass + except Exception as e: + if context.response is not None: + # config.logger.exception(f"Exception occurred while handling: {context.response}") + pass + context._response = e + + # Step 11: Invoke read_after_execution + for interceptor in interceptors: + try: + interceptor.read_after_execution(context) + except Exception as e: + if context.response is not None: + # config.logger.exception(f"Exception occurred while handling: {context.response}") + pass + context._response = e + + # Step 12: Return / throw + if isinstance(context.response, Exception): + raise context.response + + # We may want to add some aspects of this context to the output types so we can + # return it to the end-users. + return context.response diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/config.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/config.py new file mode 100644 index 0000000000..4ecd715335 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/config.py @@ -0,0 +1,28 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +from dataclasses import dataclass +from typing import Any, Callable, TypeAlias, Union + +import simple.types.boolean.internaldafny.impl + +from .models import GetBooleanInput, GetBooleanOutput + + +@dataclass(kw_only=True) +class Config: + """Configuration for SimpleBoolean + + :param interceptors: The list of interceptors, which are hooks that are called + during the execution of a request. + + :param retry_strategy: The retry strategy for issuing retry tokens and computing + retry delays. + + :param impl: + """ + interceptors: list[None] + retry_strategy: None + impl: simple.types.boolean.internaldafny.impl.SimpleBooleanClient + +# A callable that allows customizing the config object on each request. +Plugin: TypeAlias = Callable[[Config], None] diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/deserialize.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/deserialize.py new file mode 100644 index 0000000000..f8cb771fa7 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/deserialize.py @@ -0,0 +1,11 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +#from Dafny.Path.To.Dafny.Code. import SimpleBooleanHardCoded as _SimpleBooleanHardCoded +from simple.types.boolean.internaldafny.types import GetBooleanOutput_GetBooleanOutput as DafnyGetBooleanOutput + +from .config import Config +from .models import GetBooleanOutput + + +async def _deserialize_get_boolean(input: DafnyGetBooleanOutput, config: Config) -> GetBooleanOutput: + return GetBooleanOutput(value=input.value.value) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/endpoints.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/endpoints.py new file mode 100644 index 0000000000..49b2f71554 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/endpoints.py @@ -0,0 +1,7 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +from smithy_python._private.http import StaticEndpointParams, StaticEndpointResolver + + +EndpointParams = StaticEndpointParams +EndpointResolver = StaticEndpointResolver diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/errors.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/errors.py new file mode 100644 index 0000000000..6f38ba4e80 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/errors.py @@ -0,0 +1,23 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +from typing import Generic, Literal, TypeVar + + +class ServiceError(Exception): + """Base error for all errors in the service. + """ + pass + +T = TypeVar('T') +class ApiError(ServiceError, Generic[T]): + """Base error for all api errors in the service. + """ + code: T + def __init__(self, message: str): + super().__init__(message) + self.message = message + +class UnknownApiError(ApiError[Literal['Unknown']]): + """Error representing any unknown api errors + """ + code: Literal['Unknown'] = 'Unknown' diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/models.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/models.py new file mode 100644 index 0000000000..43b48bab05 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/models.py @@ -0,0 +1,108 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +from typing import Any, Dict, Optional + + +class GetBooleanInput: + value: Optional[bool] + def __init__( + self, + *, + value: Optional[bool] = None, + ): + self.value = value + + def as_dict(self) -> Dict[str, Any]: + """Converts the GetBooleanInput to a dictionary. + + The dictionary uses the modeled shape names rather than the parameter names as + keys to be mostly compatible with boto3. + """ + d: Dict[str, Any] = {} + + if self.value is not None: + d["value"] = self.value + + return d + + @staticmethod + def from_dict(d: Dict[str, Any]) -> "GetBooleanInput": + """Creates a GetBooleanInput from a dictionary. + + The dictionary is expected to use the modeled shape names rather than the + parameter names as keys to be mostly compatible with boto3. + """ + kwargs: Dict[str, Any] = {} + + if "value" in d: + kwargs["value"] = d["value"] + + return GetBooleanInput(**kwargs) + + def __repr__(self) -> str: + result = "GetBooleanInput(" + if self.value is not None: + result += f"value={repr(self.value)}" + + return result + ")" + + def __eq__(self, other: Any) -> bool: + if not isinstance(other, GetBooleanInput): + return False + attributes: list[str] = ['value',] + return all( + getattr(self, a) == getattr(other, a) + for a in attributes + ) + +class GetBooleanOutput: + value: Optional[bool] + def __init__( + self, + *, + value: Optional[bool] = None, + ): + self.value = value + + def as_dict(self) -> Dict[str, Any]: + """Converts the GetBooleanOutput to a dictionary. + + The dictionary uses the modeled shape names rather than the parameter names as + keys to be mostly compatible with boto3. + """ + d: Dict[str, Any] = {} + + if self.value is not None: + d["value"] = self.value + + return d + + @staticmethod + def from_dict(d: Dict[str, Any]) -> "GetBooleanOutput": + """Creates a GetBooleanOutput from a dictionary. + + The dictionary is expected to use the modeled shape names rather than the + parameter names as keys to be mostly compatible with boto3. + """ + kwargs: Dict[str, Any] = {} + + if "value" in d: + kwargs["value"] = d["value"] + + return GetBooleanOutput(**kwargs) + + def __repr__(self) -> str: + result = "GetBooleanOutput(" + if self.value is not None: + result += f"value={repr(self.value)}" + + return result + ")" + + def __eq__(self, other: Any) -> bool: + if not isinstance(other, GetBooleanOutput): + return False + attributes: list[str] = ['value',] + return all( + getattr(self, a) == getattr(other, a) + for a in attributes + ) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/serialize.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/serialize.py new file mode 100644 index 0000000000..19b8a7f32a --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/serialize.py @@ -0,0 +1,11 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +#from Dafny.Path.To.Dafny.Code. import SimpleBooleanHardCoded as _SimpleBooleanHardCoded +from simple.types.boolean.internaldafny.types import GetBooleanInput_GetBooleanInput as DafnyGetBooleanInput + +from .config import Config +from .models import GetBooleanInput + + +async def _serialize_get_boolean(input: GetBooleanInput, config: Config) -> DafnyGetBooleanInput: + return DafnyGetBooleanInput(value=input.value) From 00869f7d75c65123e4a7f2a59112267fbbb7bf03 Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Wed, 14 Jun 2023 11:59:52 -0700 Subject: [PATCH 015/673] makefile --- TestModels/SharedMakefile.mk | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/TestModels/SharedMakefile.mk b/TestModels/SharedMakefile.mk index 3e2fc49c9d..b1a3ffcb13 100644 --- a/TestModels/SharedMakefile.mk +++ b/TestModels/SharedMakefile.mk @@ -321,16 +321,17 @@ _clean: # Python Targets -make_python: | build_implementation_python transpile_test_python +make_python: | clean_dafny_python transpile_dependencies_python build_implementation_python transpile_test_python mv_files_python build_python: | build_implementation_python build_test_python +clean_dafny_python: + rm -rf runtimes/python/src/dafny_generated + build_implementation_python: TARGET=py build_implementation_python: OUT=runtimes/python/src/dafny_generated build_implementation_python: build_implementation -build_implementation_python: - rm -rf runtimes/python/src/dafny_generated - mv runtimes/python/src/dafny_generated-py runtimes/python/src/dafny_generated +# Leave in -py for now; transpile_test will move over build_test_python: TARGET=py build_test_python: OUT=runtimes/python/test/dafny_generated @@ -347,22 +348,25 @@ transpile_implementation_python: rm -rf runtimes/python/src/dafny_generated mv runtimes/python/src/dafny_generated-py runtimes/python/src/dafny_generated +transpile_dependencies_python: LANG=python +transpile_dependencies_python: transpile_dependencies +transpile_dependencies_python: + cp -r $(STANDARD_LIBRARY_PATH)/runtimes/python/src/dafny_generated/. runtimes/python/src/dafny_generated-py + transpile_test_python: TARGET=py -transpile_test_python: OUT=runtimes/python/test/dafny_generated +transpile_test_python: OUT=runtimes/python/src/dafny_generated transpile_test_python: transpile_test # TODO: Ask Dafny team to not generate -py suffix # Python modules can't have a hyphen in them -transpile_test_python: - rm -rf runtimes/python/test/dafny_generated - mv runtimes/python/test/dafny_generated-py runtimes/python/test/dafny_generated - # Assumes that implementation was built, and uses the _dafny from that - cp runtimes/python/src/dafny_generated/_dafny.py runtimes/python/test/dafny_generated + +mv_files_python: + mv runtimes/python/src/dafny_generated-py runtimes/python/src/dafny_generated cleanup_filenames: cd runtimes/Pyt test_python: # python -m pip install -e runtimes/python - python runtimes/python/test/dafny_generated/dafny_generated.py + python runtimes/python/src/dafny_generated/dafny_generated.py clean: _clean From 335971edc3e418e58db3fd32cc91b618bd328c79 Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Wed, 14 Jun 2023 14:02:08 -0700 Subject: [PATCH 016/673] cleanup makefile --- TestModels/SharedMakefile.mk | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/TestModels/SharedMakefile.mk b/TestModels/SharedMakefile.mk index b1a3ffcb13..a2413f27ce 100644 --- a/TestModels/SharedMakefile.mk +++ b/TestModels/SharedMakefile.mk @@ -323,27 +323,16 @@ _clean: make_python: | clean_dafny_python transpile_dependencies_python build_implementation_python transpile_test_python mv_files_python -build_python: | build_implementation_python build_test_python - clean_dafny_python: rm -rf runtimes/python/src/dafny_generated build_implementation_python: TARGET=py build_implementation_python: OUT=runtimes/python/src/dafny_generated build_implementation_python: build_implementation -# Leave in -py for now; transpile_test will move over - -build_test_python: TARGET=py -build_test_python: OUT=runtimes/python/test/dafny_generated -build_test_python: build_test - -transpile_python: | transpile_implementation_python transpile_test_python transpile_implementation_python: TARGET=py transpile_implementation_python: OUT=runtimes/python/src/dafny_generated transpile_implementation_python: transpile_implementation -# TODO: Ask Dafny team to not generate -py suffix -# Python modules can't have a hyphen in them transpile_implementation_python: rm -rf runtimes/python/src/dafny_generated mv runtimes/python/src/dafny_generated-py runtimes/python/src/dafny_generated @@ -351,22 +340,16 @@ transpile_implementation_python: transpile_dependencies_python: LANG=python transpile_dependencies_python: transpile_dependencies transpile_dependencies_python: + mkdir -p runtimes/python/src/dafny_generated-py cp -r $(STANDARD_LIBRARY_PATH)/runtimes/python/src/dafny_generated/. runtimes/python/src/dafny_generated-py transpile_test_python: TARGET=py transpile_test_python: OUT=runtimes/python/src/dafny_generated transpile_test_python: transpile_test -# TODO: Ask Dafny team to not generate -py suffix -# Python modules can't have a hyphen in them - mv_files_python: mv runtimes/python/src/dafny_generated-py runtimes/python/src/dafny_generated -cleanup_filenames: - cd runtimes/Pyt - test_python: -# python -m pip install -e runtimes/python python runtimes/python/src/dafny_generated/dafny_generated.py clean: _clean From 036cfcb0d8fa103d6fb53569725a940e74f86139 Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Thu, 15 Jun 2023 10:03:29 -0700 Subject: [PATCH 017/673] ser/deser --- .../dafny/python/DafnyProtocolGenerator.java | 53 +++++++++++++++---- .../dafny/python/DafnyTestIntegration.java | 12 ++--- ...thon.codegen.integration.PythonIntegration | 6 +++ 3 files changed, 56 insertions(+), 15 deletions(-) create mode 100644 codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/resources/META-INF/services/software.amazon.smithy.python.codegen.integration.PythonIntegration diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyProtocolGenerator.java b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyProtocolGenerator.java index 4d17d66f43..76dc2d8d50 100644 --- a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyProtocolGenerator.java +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyProtocolGenerator.java @@ -91,17 +91,28 @@ public void generateRequestSerializers(GenerationContext context) { var topDownIndex = TopDownIndex.of(context.model()); var delegator = context.writerDelegator(); var configSymbol = CodegenUtils.getConfigSymbol(context.settings()); + // I beLIEVE transportRequest needs to be the output shape + // for requestSeralizers this is a dafnyType + // i.e. the operation output...? + // no... the operation output is... not... this... + // Oh, ok: input is GetBooleanInput, output is GetBooleanOutput... + // OH, duhDOY. I am looking at the Smithy model. Smithy model dgaf about the Dafny stuff. + // I need to hardcode the Dafny stuff! + // i.e. DafnyNameResolver... one day. For now, name = "Dafny"+input. + // Actually, for now: hardcoded DafnyGetBooleanInput. var transportRequest = context.applicationProtocol().requestType(); for (OperationShape operation : topDownIndex.getContainedOperations(context.settings().getService())) { var serFunction = getSerializationFunction(context, operation); var input = context.model().expectShape(operation.getInputShape()); var inputSymbol = context.symbolProvider().toSymbol(input); + var output = context.model().expectShape(operation.getOutputShape()); + var outputSymbol = context.symbolProvider().toSymbol(output); delegator.useFileWriter(serFunction.getDefinitionFile(), serFunction.getNamespace(), writer -> { writer.pushState(new RequestSerializerSection(operation)); writer.write(""" - async def $L(input: $T, config: $T) -> $T: + async def $L(input: $T, config: $T) -> DafnyGetBooleanInput: ${C|} - """, serFunction.getName(), inputSymbol, configSymbol, transportRequest, + """, serFunction.getName(), inputSymbol, configSymbol, writer.consumer(w -> generateRequestSerializer(context, operation, w))); writer.popState(); }); @@ -137,9 +148,10 @@ private void generateRequestSerializer( PythonWriter writer ) { writer.addDependency(SmithyPythonDependency.SMITHY_PYTHON); - // get this from... topdownindex? - // i have freedom to pass in anything i want to generateRequestSerializer - writer.addImport("Dafny.Simpletypes.Boolean.Types", "GetBooleanInput_GetBooleanInput", "DafnyGetBooleanInput"); + // TODO: pass topDownIndex into this function + // TODO: parse topDownIndex for the required imports + + writer.addImport("simple.types.boolean.internaldafny.types", "GetBooleanInput_GetBooleanInput", "DafnyGetBooleanInput"); writer.write(""" return DafnyGetBooleanInput(value=input.value) @@ -151,10 +163,30 @@ public void generateResponseDeserializers(GenerationContext context) { var topDownIndex = TopDownIndex.of(context.model()); var service = context.settings().getService(context.model()); var deserializingErrorShapes = new TreeSet(); + var delegator = context.writerDelegator(); + var configSymbol = CodegenUtils.getConfigSymbol(context.settings()); + var transportRequest = context.applicationProtocol().requestType(); + for (OperationShape operation : topDownIndex.getContainedOperations(context.settings().getService())) { - generateOperationResponseDeserializer(context, operation); deserializingErrorShapes.addAll(operation.getErrors(service)); + + var deserFunction = getDeserializationFunction(context, operation); + var output = context.model().expectShape(operation.getOutputShape()); + var outputSymbol = context.symbolProvider().toSymbol(output); + delegator.useFileWriter(deserFunction.getDefinitionFile(), deserFunction.getNamespace(), writer -> { + writer.pushState(new RequestSerializerSection(operation)); + + writer.write(""" + async def $L(input: DafnyGetBooleanOutput, config: $T) -> $T: + ${C|} + """, deserFunction.getName(), configSymbol, outputSymbol, + writer.consumer(w -> generateOperationResponseDeserializer(context, operation))); + writer.popState(); + }); + } + + for (ShapeId errorId : deserializingErrorShapes) { var error = context.model().expectShape(errorId, StructureShape.class); generateErrorResponseDeserializer(context, error); @@ -184,10 +216,13 @@ private void generateOperationResponseDeserializer( var deserFunction = getDeserializationFunction(context, operation); delegator.useFileWriter(deserFunction.getDefinitionFile(), deserFunction.getNamespace(), writer -> { writer.pushState(new ResponseDeserializerSection(operation)); + + // TODO: pass topDownIndex into this function + // TODO: parse topDownIndex for the required imports - writer.addImport("Dafny.Simpletypes.Boolean.Types", "GetBooleanOutput_GetBooleanOutput", "DafnyGetBooleanOutput"); - writer.addImport(".config", "Config", "Config"); - writer.addImport(".models", "GetBooleanOutput", "GetBooleanOutput"); + writer.addImport("simple.types.boolean.internaldafny.types", "GetBooleanOutput_GetBooleanOutput", "DafnyGetBooleanOutput"); +// writer.addImport(".config", "Config", "Config"); +// writer.addImport(".models", "GetBooleanOutput", "GetBooleanOutput"); writer.write(""" return GetBooleanOutput(value=input.value.value) diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyTestIntegration.java b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyTestIntegration.java index 07dda264d7..d28e373c75 100644 --- a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyTestIntegration.java +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyTestIntegration.java @@ -45,12 +45,12 @@ public final class DafnyTestIntegration implements .namespace("Dafny.Simpletypes.Boolean", ".") .build(), false, ""))) - // .pythonPlugin(SymbolReference.builder() - // .symbol(Symbol.builder() - // .name("set_config_impl") - // .namespace(".", ".") - // .build()) - // .build()) + .pythonPlugin(SymbolReference.builder() + .symbol(Symbol.builder() + .name("set_config_impl") + .namespace(".", ".") + .build()) + .build()) .build(); diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/resources/META-INF/services/software.amazon.smithy.python.codegen.integration.PythonIntegration b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/resources/META-INF/services/software.amazon.smithy.python.codegen.integration.PythonIntegration new file mode 100644 index 0000000000..00d2513a4e --- /dev/null +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/resources/META-INF/services/software.amazon.smithy.python.codegen.integration.PythonIntegration @@ -0,0 +1,6 @@ +# +# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 +# + +software.amazon.smithy.dafny.python.DafnyTestIntegration \ No newline at end of file From e8393d6a525e35ba5a6edc161364230cf4531bb2 Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Thu, 15 Jun 2023 12:30:17 -0700 Subject: [PATCH 018/673] closer --- .../dafny/python/DafnyProtocolGenerator.java | 2 + .../dafny/python/DafnyTestIntegration.java | 60 +++++++++++++++---- .../dafny/python/SendRequestInterceptor.java | 32 ++++++++++ 3 files changed, 81 insertions(+), 13 deletions(-) create mode 100644 codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/SendRequestInterceptor.java diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyProtocolGenerator.java b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyProtocolGenerator.java index 76dc2d8d50..e2a5443578 100644 --- a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyProtocolGenerator.java +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyProtocolGenerator.java @@ -20,6 +20,7 @@ import static software.amazon.smithy.model.knowledge.HttpBinding.Location.PREFIX_HEADERS; import static software.amazon.smithy.model.traits.TimestampFormatTrait.Format; +import java.util.List; import java.util.Set; import java.util.TreeSet; import software.amazon.smithy.codegen.core.CodegenException; @@ -53,6 +54,7 @@ import software.amazon.smithy.python.codegen.PythonWriter; import software.amazon.smithy.python.codegen.SmithyPythonDependency; import software.amazon.smithy.python.codegen.integration.ProtocolGenerator; +import software.amazon.smithy.utils.CodeInterceptor; import software.amazon.smithy.utils.CodeSection; import software.amazon.smithy.utils.SmithyUnstableApi; /* diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyTestIntegration.java b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyTestIntegration.java index d28e373c75..0d2ff35b4e 100644 --- a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyTestIntegration.java +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyTestIntegration.java @@ -30,9 +30,12 @@ import software.amazon.smithy.python.codegen.GenerationContext; import software.amazon.smithy.python.codegen.PythonDependency; import software.amazon.smithy.python.codegen.PythonSettings; +import software.amazon.smithy.python.codegen.PythonWriter; import software.amazon.smithy.python.codegen.SmithyPythonDependency; import software.amazon.smithy.python.codegen.integration.ProtocolGenerator; import software.amazon.smithy.python.codegen.integration.RuntimeClientPlugin; +import software.amazon.smithy.utils.CodeInterceptor; +import software.amazon.smithy.utils.CodeSection; public final class DafnyTestIntegration implements software.amazon.smithy.python.codegen.integration.PythonIntegration { @@ -41,24 +44,54 @@ public final class DafnyTestIntegration implements .configFields( Collections.singletonList(new ConfigField("impl", Symbol.builder() - .name("SimpleBooleanClient") - .namespace("Dafny.Simpletypes.Boolean", ".") + // TODO: ISimple..>? + .name("ISimpleBooleanClient") + .namespace("simple.types.boolean.internaldafny.types", ".") .build(), - false, ""))) - .pythonPlugin(SymbolReference.builder() - .symbol(Symbol.builder() + true, "")) + ).pythonPlugin( + // TODO: ?????? + // This goes into client_plugins.... I do not think I need to plug in tho? + // Since IG this is a runtime plugin but idk if we need anything at runtime + SymbolReference.builder() + .symbol( + Symbol.builder() .name("set_config_impl") - .namespace(".", ".") + .namespace(".plugin", ".") .build()) - .build()) + .build() + ) .build(); - + @Override + public List> + interceptors(GenerationContext codegenContext) { + return List.of(new SendRequestInterceptor()); + } @Override public void customize(GenerationContext codegenContext) { - codegenContext.writerDelegator().useFileWriter("Iamaredme", "", writer -> { + codegenContext.writerDelegator().useFileWriter("simple_boolean/plugin.py", "", writer -> { // The $ character is escaped using $$ - writer.write("yo"); + writer.write(""" +from .config import Config, Plugin +from smithy_python.interfaces.retries import RetryStrategy +from smithy_python.exceptions import SmithyRetryException + +def set_config_impl(config: Config): + from simple.types.boolean.internaldafny.impl import SimpleBooleanClient + config.impl = SimpleBooleanClient() + config.retry_strategy = NoRetriesStrategy() + +class NoRetriesToken: + retry_delay = 0 + +class NoRetriesStrategy(RetryStrategy): + def acquire_initial_retry_token(self): + return NoRetriesToken() + + def refresh_retry_token_for_retry(self, token_to_renew, error_info): + raise SmithyRetryException() + """); }); } @@ -71,17 +104,18 @@ public static ApplicationProtocol createDafnyApplicationProtocol() { return new ApplicationProtocol( "dafny", SymbolReference.builder() - .symbol(createDafnySymbol("DafnyGetBooleanInput")) + .symbol(createDafnySymbol("GetBooleanOutput_GetBooleanOutput")) .build(), SymbolReference.builder() - .symbol(createDafnySymbol("DafnyGetBooleanOutput")) + .symbol(createDafnySymbol("GetBooleanInput_GetBooleanInput")) .build() ); } private static Symbol createDafnySymbol(String symbolName) { + // TODO: ????? return Symbol.builder() - .namespace("Dafny.Simpletypes.Boolean.Types", ".") + .namespace("simple.types.boolean.internaldafny.types", ".") .name(symbolName) // .addDependency(dependency) .build(); diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/SendRequestInterceptor.java b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/SendRequestInterceptor.java new file mode 100644 index 0000000000..d0e86144a3 --- /dev/null +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/SendRequestInterceptor.java @@ -0,0 +1,32 @@ +package software.amazon.smithy.dafny.python; + +import software.amazon.smithy.python.codegen.PythonWriter; +import software.amazon.smithy.utils.CodeInterceptor; +import software.amazon.smithy.python.codegen.sections.SendRequestSection; +import software.amazon.smithy.utils.CodeInterceptor.Appender; + +final class SendRequestInterceptor implements + Appender { + @Override + public Class sectionType() { + return SendRequestSection.class; + } + + @Override + public void append(PythonWriter writer, SendRequestSection section) { + writer.write(""" + ## HERE + # Step 7m: Invoke http_client.send + if config.impl is None: + raise Exception("No impl found on the operation config.") + + context_with_response = cast( + InterceptorContext[Input, None, GetBooleanInput_GetBooleanInput, GetBooleanOutput_GetBooleanOutput], context + ) + + context_with_response._transport_response = config.impl.GetBoolean( + input=context_with_response.transport_request + ) + """); + } +} From 6f3a3221667216db592f390e53734091dea15246 Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Thu, 15 Jun 2023 15:53:33 -0700 Subject: [PATCH 019/673] like a glove --- .../amazon/smithy/dafny/python/DafnyProtocolGenerator.java | 6 +++--- .../amazon/smithy/dafny/python/SendRequestInterceptor.java | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyProtocolGenerator.java b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyProtocolGenerator.java index e2a5443578..4f0dfa671c 100644 --- a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyProtocolGenerator.java +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyProtocolGenerator.java @@ -179,8 +179,8 @@ public void generateResponseDeserializers(GenerationContext context) { writer.pushState(new RequestSerializerSection(operation)); writer.write(""" - async def $L(input: DafnyGetBooleanOutput, config: $T) -> $T: - ${C|} +async def $L(input: DafnyGetBooleanOutput, config: $T) -> $T: + ${C|} """, deserFunction.getName(), configSymbol, outputSymbol, writer.consumer(w -> generateOperationResponseDeserializer(context, operation))); writer.popState(); @@ -227,7 +227,7 @@ private void generateOperationResponseDeserializer( // writer.addImport(".models", "GetBooleanOutput", "GetBooleanOutput"); writer.write(""" - return GetBooleanOutput(value=input.value.value) +return GetBooleanOutput(value=input.value.value) """); writer.popState(); }); diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/SendRequestInterceptor.java b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/SendRequestInterceptor.java index d0e86144a3..a9aebbf326 100644 --- a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/SendRequestInterceptor.java +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/SendRequestInterceptor.java @@ -23,7 +23,9 @@ raise Exception("No impl found on the operation config.") context_with_response = cast( InterceptorContext[Input, None, GetBooleanInput_GetBooleanInput, GetBooleanOutput_GetBooleanOutput], context ) - + + print(f"transport_request is {context_with_response.transport_request}") + context_with_response._transport_response = config.impl.GetBoolean( input=context_with_response.transport_request ) From e897a617ca1ef72c5f13a31c0d00f62942d9b983 Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Thu, 15 Jun 2023 15:54:02 -0700 Subject: [PATCH 020/673] i forgot a lot --- TestModels/SharedMakefile.mk | 16 +- .../python/src-goal/dafny_generated/Shim.py | 4 +- .../src/simpleboolean.egg-info/PKG-INFO | 22 - .../src/simpleboolean.egg-info/SOURCES.txt | 19 - .../dependency_links.txt | 1 - .../simpleboolean.egg-info/entry_points.txt | 2 - .../src/simpleboolean.egg-info/top_level.txt | 1 - .../python/src/simpleboolean/__init__.py | 1 - .../__pycache__/__init__.cpython-311.pyc | Bin 289 -> 0 bytes .../SimpleBooleanImpl_Compile.py | 58 --- .../simpleboolean/dafny_generated/System_.py | 20 - .../simpleboolean/dafny_generated/__init__.py | 1 - .../__pycache__/__init__.cpython-311.pyc | Bin 296 -> 0 bytes .../simpleboolean/dafny_generated/_dafny.py | 476 ------------------ .../dafny_generated/dafny_generated.py | 9 - .../simpleboolean/dafny_generated/module_.py | 15 - .../dafny_generated/simple/__init__.py | 1 - .../__pycache__/__init__.cpython-311.pyc | Bin 302 -> 0 bytes .../dafny_generated/simple/types/__init__.py | 1 - .../__pycache__/__init__.cpython-311.pyc | Bin 310 -> 0 bytes .../simple/types/boolean/__init__.py | 1 - .../__pycache__/__init__.cpython-311.pyc | Bin 324 -> 0 bytes .../types/boolean/internaldafny/__init__.py | 1 - .../__pycache__/__init__.cpython-311.pyc | Bin 351 -> 0 bytes .../__pycache__/impl.cpython-311.pyc | Bin 4164 -> 0 bytes .../__pycache__/types.cpython-311.pyc | Bin 17653 -> 0 bytes .../types/boolean/internaldafny/impl.py | 55 -- .../types/boolean/internaldafny/types.py | 143 ------ 28 files changed, 17 insertions(+), 830 deletions(-) delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean.egg-info/PKG-INFO delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean.egg-info/SOURCES.txt delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean.egg-info/dependency_links.txt delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean.egg-info/entry_points.txt delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean.egg-info/top_level.txt delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/__init__.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/__pycache__/__init__.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/SimpleBooleanImpl_Compile.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/System_.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/__init__.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/__pycache__/__init__.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/_dafny.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/dafny_generated.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/module_.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/__init__.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/__pycache__/__init__.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/__init__.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/__pycache__/__init__.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/__init__.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/__pycache__/__init__.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/internaldafny/__init__.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/internaldafny/__pycache__/__init__.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/internaldafny/__pycache__/impl.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/internaldafny/__pycache__/types.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/internaldafny/impl.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/internaldafny/types.py diff --git a/TestModels/SharedMakefile.mk b/TestModels/SharedMakefile.mk index a2413f27ce..a161ca3606 100644 --- a/TestModels/SharedMakefile.mk +++ b/TestModels/SharedMakefile.mk @@ -345,7 +345,21 @@ transpile_dependencies_python: transpile_test_python: TARGET=py transpile_test_python: OUT=runtimes/python/src/dafny_generated -transpile_test_python: transpile_test +transpile_test_python: + dafny \ + -vcsCores:$(CORES) \ + -compileTarget:$(TARGET) \ + -spillTargetCode:3 \ + -runAllTests:1 \ + -quantifierSyntax:3 \ + -unicodeChar:0 \ + -functionSyntax:3 \ + -optimizeErasableDatatypeWrapper:0 \ + -useRuntimeLib \ + -out $(OUT) \ + -compile:0 \ + `find ./test -name '*.dfy'` + mv_files_python: mv runtimes/python/src/dafny_generated-py runtimes/python/src/dafny_generated diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/Shim.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/Shim.py index ae1efb4bb2..cba97104c9 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/Shim.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/Shim.py @@ -1,10 +1,10 @@ # TODO generate this import simple.types.boolean.internaldafny.types -import python_client_codegen.simple_boolean.client as SimpleBoolean +import smithy_generated.simple_boolean.client as SimpleBoolean import Wrappers_Compile import asyncio -from python_client_codegen.simple_boolean.models import GetBooleanInput +from smithy_generated.simple_boolean.models import GetBooleanInput class SimpleBooleanShim(simple.types.boolean.internaldafny.types.ISimpleBooleanClient): def __init__(self, _impl: SimpleBoolean) : diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean.egg-info/PKG-INFO b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean.egg-info/PKG-INFO deleted file mode 100644 index d578a1557c..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean.egg-info/PKG-INFO +++ /dev/null @@ -1,22 +0,0 @@ -Metadata-Version: 2.1 -Name: simpleboolean -Version: 0.0.0 -Summary: DynamoDB Encryption Client for Python -Author: Amazon Web Services -Author-email: aws-cryptools@amazon.com -Maintainer: Amazon Web Services -License: Apache License 2.0 -Classifier: Development Status :: 5 - Production/Stable -Classifier: Intended Audience :: Developers -Classifier: Natural Language :: English -Classifier: License :: OSI Approved :: Apache Software License -Classifier: Programming Language :: Python -Classifier: Programming Language :: Python :: 3 -Classifier: Programming Language :: Python :: 3.7 -Classifier: Programming Language :: Python :: 3.8 -Classifier: Programming Language :: Python :: 3.9 -Classifier: Programming Language :: Python :: 3.10 -Classifier: Programming Language :: Python :: 3.11 -Classifier: Programming Language :: Python :: Implementation :: CPython -Classifier: Topic :: Security -Classifier: Topic :: Security :: Cryptography diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean.egg-info/SOURCES.txt b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean.egg-info/SOURCES.txt deleted file mode 100644 index 06297c3703..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean.egg-info/SOURCES.txt +++ /dev/null @@ -1,19 +0,0 @@ -setup.py -src/simpleboolean/__init__.py -src/simpleboolean.egg-info/PKG-INFO -src/simpleboolean.egg-info/SOURCES.txt -src/simpleboolean.egg-info/dependency_links.txt -src/simpleboolean.egg-info/entry_points.txt -src/simpleboolean.egg-info/top_level.txt -src/simpleboolean/dafny_generated/SimpleBooleanImpl_Compile.py -src/simpleboolean/dafny_generated/System_.py -src/simpleboolean/dafny_generated/__init__.py -src/simpleboolean/dafny_generated/_dafny.py -src/simpleboolean/dafny_generated/dafny_generated.py -src/simpleboolean/dafny_generated/module_.py -src/simpleboolean/dafny_generated/simple/__init__.py -src/simpleboolean/dafny_generated/simple/types/__init__.py -src/simpleboolean/dafny_generated/simple/types/boolean/__init__.py -src/simpleboolean/dafny_generated/simple/types/boolean/internaldafny/__init__.py -src/simpleboolean/dafny_generated/simple/types/boolean/internaldafny/impl.py -src/simpleboolean/dafny_generated/simple/types/boolean/internaldafny/types.py \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean.egg-info/dependency_links.txt b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean.egg-info/dependency_links.txt deleted file mode 100644 index 8b13789179..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean.egg-info/dependency_links.txt +++ /dev/null @@ -1 +0,0 @@ - diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean.egg-info/entry_points.txt b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean.egg-info/entry_points.txt deleted file mode 100644 index a6fd3b442d..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean.egg-info/entry_points.txt +++ /dev/null @@ -1,2 +0,0 @@ -[run_tests] -tests = src.test.dafny_generated:main diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean.egg-info/top_level.txt b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean.egg-info/top_level.txt deleted file mode 100644 index 2f1ab7258d..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean.egg-info/top_level.txt +++ /dev/null @@ -1 +0,0 @@ -simpleboolean diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/__init__.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/__init__.py deleted file mode 100644 index de0caa9aeb..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from . import dafny_generated \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/__pycache__/__init__.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index b1523ee8a847d15637cbf65ee7f471ff390733d8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 289 zcmZusu}T9$5S_gP2|^I;^8wemKOh!jt4(5Kvz#}hIkLO6?Cv4kSo;Tlg7`O<} diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/SimpleBooleanImpl_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/SimpleBooleanImpl_Compile.py deleted file mode 100644 index d32863d1cc..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/SimpleBooleanImpl_Compile.py +++ /dev/null @@ -1,58 +0,0 @@ -import sys -from typing import NamedTuple - -import _dafny - -assert "SimpleBooleanImpl_Compile" == __name__ -SimpleBooleanImpl_Compile = sys.modules[__name__] - -class Config: - @_dafny.classproperty - def AllSingletonConstructors(cls): - return [Config_Config()] - @classmethod - def default(cls, ): - return lambda: Config_Config() - def __ne__(self, __o: object) -> bool: - return not self.__eq__(__o) - @property - def is_Config(self) -> bool: - return isinstance(self, SimpleBooleanImpl_Compile.Config_Config) - -class Config_Config(Config, NamedTuple('Config', [])): - def __dafnystr__(self) -> str: - return f'SimpleBooleanImpl_Compile.Config.Config' - def __eq__(self, __o: object) -> bool: - return isinstance(__o, SimpleBooleanImpl_Compile.Config_Config) - def __hash__(self) -> int: - return super().__hash__() - - -class default__: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "SimpleBooleanImpl_Compile._default" - @staticmethod - def GetBoolean(config, input): - output: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default( - TestModels.SimpleTypes.SimpleBoolean.runtimes.python.src.simple_boolean.dafny_generated.simple.types.boolean.internaldafny.types.GetBooleanOutput.default())() - if not(((input).value).is_Some): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(17,4): " + ( - _dafny.SeqWithoutIsStrInference(map(_dafny.CodePoint, "expectation violation"))).VerbatimString(False)) - if not(((((input).value).value) == (True)) or ((((input).value).value) == (False))): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(19,4): " + ( - _dafny.SeqWithoutIsStrInference(map(_dafny.CodePoint, "expectation violation"))).VerbatimString(False)) - d_0_res_: TestModels.SimpleTypes.SimpleBoolean.runtimes.python.src.simple_boolean.dafny_generated.simple.types.boolean.internaldafny.types.GetBooleanOutput - d_0_res_ = TestModels.SimpleTypes.SimpleBoolean.runtimes.python.src.simple_boolean.dafny_generated.simple.types.boolean.internaldafny.types.GetBooleanOutput_GetBooleanOutput((input).value) - if not(((((d_0_res_).value).value) == (True)) or ((((d_0_res_).value).value) == (False))): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(22,4): " + ( - _dafny.SeqWithoutIsStrInference(map(_dafny.CodePoint, "expectation violation"))).VerbatimString(False)) - if not((((input).value).value) == (((d_0_res_).value).value)): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(24,4): " + ( - _dafny.SeqWithoutIsStrInference(map(_dafny.CodePoint, "expectation violation"))).VerbatimString(False)) - output = Wrappers_Compile.Result_Success(d_0_res_) - return output - return output - diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/System_.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/System_.py deleted file mode 100644 index 32e6d896ff..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/System_.py +++ /dev/null @@ -1,20 +0,0 @@ -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count - -import module_ -import _dafny - -assert "System_" == __name__ -System_ = sys.modules[__name__] - -class nat: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "" - @staticmethod - def default(): - return int(0) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/__init__.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/__init__.py deleted file mode 100644 index 95b3391388..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from . import simple \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/__pycache__/__init__.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index b249c28dd7a0f9f1960f46abdbcf29a6fddddc04..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 296 zcmZury-EW?5Z=9m5QH?6HV<%(^8#Waw%R0VY?kwOVvg(|vwO(CL8`Pqg7`L;l1i|$ z6H*ANGN(!BFwA^2^UcinG8&x;wx5r+9&`Tei<1>cusdh)EVR(l2rKWU6uOv-s{E2X zsN{AKTN@1CRmE0N$-P&x>v#7Xm`9`trfY1Yy@MN!tK str: - if hasattr(value, '__dafnystr__'): - return value.__dafnystr__() - elif value is None: - return "null" - elif isinstance(value, bool): - return "true" if value else "false" - elif isinstance(value, str): - # This is only for Dafny char values. - # Dafny strings are represented as Seq's of individual char values, - # and Seq defines __dafnystr__. - return string_from_utf_16(value) - elif isinstance(value, tuple): - return '(' + ', '.join(map(string_of, value)) + ')' - elif isinstance(value, FunctionType): - return "Function" - else: - return str(value) - -@dataclass -class Break(Exception): - target: str - -@dataclass -class Continue(Exception): - target: str - -class TailCall(Exception): - pass - -@contextmanager -def label(name: str = None): - try: - yield - except Break as g: - if g.target != name: - raise g - except TailCall as g: - if name is not None: - raise g - -@contextmanager -def c_label(name: str = None): - try: - yield - except Continue as g: - if g.target != name: - raise g - -class CodePoint(str): - - escapes = { - '\n' : "\\n", - '\r' : "\\r", - '\t' : "\\t", - '\0' : "\\0", - '\'' : "\\'", - '\"' : "\\\"", - '\\' : "\\\\", - } - - def __escaped__(self): - return self.escapes.get(self, self) - - def __dafnystr__(self): - return f"'{self.__escaped__()}'" - - def __add__(self, other): - return CodePoint(plus_char(self, other)) - - def __sub__(self, other): - return CodePoint(minus_char(self, other)) - -class Seq(tuple): - def __init__(self, __iterable = None, isStr = False): - ''' - isStr defines whether this value should be tracked at runtime as a string (a.k.a. seq) - It accepts three different values: - - True: this value is definitely a string, mark it as such - - False: this value might be a string, apply heuristics to make a best guess - - None: don't apply heuristics, don't mark it as a string - - None is used when --unicode-char is true, to ensure consistent printing of strings - across backends without depending on any runtime tracking. - See docs/Compilation/StringsAndChars.md. - ''' - - if __iterable is None: - __iterable = [] - if isStr is None: - self.isStr = None - else: - self.isStr = isStr \ - or isinstance(__iterable, str) \ - or (isinstance(__iterable, Seq) and __iterable.isStr) \ - or (not isinstance(__iterable, GeneratorType) - and all(isinstance(e, str) and len(e) == 1 for e in __iterable) - and len(__iterable) > 0) - - @property - def Elements(self): - return self - - @property - def UniqueElements(self): - return frozenset(self) - - def VerbatimString(self, asliteral): - if asliteral: - return f"\"{''.join(map(lambda c: c.__escaped__(), self))}\"" - else: - return ''.join(self) - - def __dafnystr__(self) -> str: - if self.isStr: - # This should never be true when using --unicode-char, - # so it is safe to assume we are a sequence of UTF-16 code units. - return string_from_utf_16(self) - return '[' + ', '.join(map(string_of, self)) + ']' - - def __add__(self, other): - return Seq(super().__add__(other), isStr=self.isStr and other.isStr) - - def __getitem__(self, key): - if isinstance(key, slice): - indices = range(*key.indices(len(self))) - return Seq((self[i] for i in indices), isStr=self.isStr) - return super().__getitem__(key) - - def set(self, key, value): - l = list(self) - l[key] = value - return Seq(l, isStr=self.isStr) - - def __hash__(self) -> int: - return hash(tuple(self)) - - def __lt__(self, other): - return len(self) < len(other) and self == other[:len(self)] - - def __le__(self, other): - return len(self) <= len(other) and self == other[:len(self)] - -# Convenience for translation when --unicode-char is enabled -def SeqWithoutIsStrInference(__iterable = None): - return Seq(__iterable, isStr = None) - -class Array: - def __init__(self, initValue, *dims): - def create_structure(initValue, *dims): - return [initValue if len(dims) <= 1 else create_structure(initValue, *dims[1:]) for _ in range(dims[0])] - self.dims = list(dims) - self.arr = create_structure(initValue, *dims) - - def __dafnystr__(self) -> str: - return f'array{self.dims}' - - def __str__(self): - return self.__dafnystr__() - - def length(self, i): - return self.dims[i] if i < len(self.dims) else None - - def __len__(self): - return self.length(0) - - def __getitem__(self, key): - if not isinstance(key, Iterable): - return self.arr[key] - arr = self.arr - for i in key: - arr = arr[i] - return arr - - def __setitem__(self, key, value): - if not isinstance(key, Iterable): - self.arr[key] = value - return - arr = self.arr - for i in range(len(key)-1): - arr = arr[key[i]] - arr[key[-1]] = value - -class Set(frozenset): - @property - def Elements(self): - return self - - @property - def AllSubsets(self): - # https://docs.python.org/3/library/itertools.html#itertools-recipes - s = list(self) - return map(Set, chain.from_iterable(combinations(s, r) for r in range(len(s)+1))) - - def __dafnystr__(self) -> str: - return '{' + ', '.join(map(string_of, self)) + '}' - - def union(self, other): - return Set(super().union(self, other)) - - def intersection(self, other): - return Set(super().intersection(other)) - - def ispropersubset(self, other): - return self.issubset(other) and self != other - - def __or__(self, other): - return self.union(other) - - def __sub__(self, other): - return Set(super().__sub__(other)) - -class MultiSet(Counter): - def __dafnystr__(self) -> str: - return 'multiset{' + ', '.join(map(string_of, self.elements())) + '}' - - def __len__(self): - return reduce(lambda acc, key: acc + self[key], self, 0) - - def union(self, other): - return MultiSet(self + other) - - def __or__(self, other): - return self.union(other) - - def intersection(self, other): - return MultiSet(self & other) - - def __sub__(self, other): - return MultiSet(super().__sub__(other)) - - @property - def keys(self): - return Set(key for key in self if self[key] > 0) - - @property - def Elements(self): - return self.elements() - - @property - def UniqueElements(self): - return self.keys - - def isdisjoint(self, other): - return frozenset(self.keys).isdisjoint(frozenset(other.keys)) - - def issubset(self, other): - return all(self[key] <= other[key] for key in frozenset(self).union(frozenset(other))) - - def ispropersubset(self, other): - return self.issubset(other) and len(self) < len(other) - - def set(self, key, value): - set = Counter(self) - set[key] = value - return MultiSet(set) - - def __hash__(self): - return hash(frozenset(self.keys)) - - def __eq__(self, other): - return all(self[key] == other[key] for key in self.keys | other.keys) - - def __ne__(self, other): - return not (self == other) - - def __setattr__(self, key, value): - raise TypeError("'Map' object is immutable") - - def __contains__(self, item): - return self[item] > 0 - -class Map(dict): - def __dafnystr__(self) -> str: - return 'map[' + ', '.join(map(lambda i: f'{string_of(i[0])} := {string_of(i[1])}', self.items)) + ']' - - @property - def Elements(self): - return self - - @property - def keys(self): - return Set(super().keys()) - - @property - def values(self): - return Set(super().values()) - - @property - def items(self): - return Set(super().items()) - - def set(self, key, value): - map = dict(self) - map[key] = value - return Map(map) - - def __sub__(self, other): - map = dict(self) - for key in list(other): - map.pop(key, None) - return Map(map) - - def __or__(self, other): - map = dict(self) - for k, v in other.items: - map[k] = v - return Map(map) - - def __hash__(self): - return hash(frozenset(self)) - - def __setattr__(self, key, value): - raise TypeError("'Map' object is immutable") - -class BigOrdinal: - @staticmethod - def is_limit(ord): - return ord == 0 - - @staticmethod - def is_succ(ord): - return 0 < ord - - @staticmethod - def offset(ord): - return ord - - @staticmethod - def is_nat(ord): - # at run time, every ORDINAL is a natural number - return True - -class BigRational(Fraction): - def __dafnystr__(self): - if self.denominator == 1: - return f"{self.numerator}.0" - correction = self.divides_a_power_of_10(self.denominator) - if correction is None: - return f"({self.numerator}.0 / {self.denominator}.0)" - compensation, shift = correction - if self.numerator < 0: - sign, digits = "-", str(-self.numerator*compensation) - else: - sign, digits = "", str(self.numerator*compensation) - if shift < len(digits): - n = len(digits) - shift - return f"{sign}{digits[:n]}.{digits[n:]}" - return f"{sign}0.{'0' * (shift - len(digits))}{digits}" - - @staticmethod - def isolate_factor(f, x): - y = 0 - while x > 1 and x % f == 0: - y += 1 - x //= f - return x, y - - @staticmethod - def divides_a_power_of_10(x): - rem, expA = BigRational.isolate_factor(10, x) - if rem % 5 == 0 or rem % 2 == 0 or rem == 1: - major, minor = (5, 2) if rem % 5 == 0 else (2, 5) - rem, expB = BigRational.isolate_factor(major, rem) - return (minor**expB, expA+expB) if rem == 1 else None - return None - - def __add__(self, other): - return BigRational(super().__add__(other)) - - def __sub__(self, other): - return BigRational(super().__sub__(other)) - - def __mul__(self, other): - return BigRational(super().__mul__(other)) - - def __truediv__(self, other): - return BigRational(super().__truediv__(other)) - -def plus_char(a, b): - return chr(ord(a) + ord(b)) - -def minus_char(a, b): - return chr(ord(a) - ord(b)) - -def euclidian_division(a, b): - if 0 <= a: - if 0 <= b: - return a // b - else: - return -(a // (-b)) - else: - if 0 <= b: - return -((-a-1) // b) - 1 - else: - return (-a-1) // (-b) + 1 - -def euclidian_modulus(a, b): - bp = abs(b) - if 0 <= a: - return a % bp - c = (-a) % bp - return c if c == 0 else bp - c - -@dataclass -class HaltException(Exception): - message: str - -def quantifier(vals, frall, pred): - for u in vals: - if pred(u) != frall: - return not frall - return frall - -def AllBooleans(): - return [False, True] - -def AllChars(): - return (chr(i) for i in range(0x10000)) - -def AllUnicodeChars(): - return chain((CodePoint(chr(i)) for i in range(0xD800)), - (CodePoint(chr(i)) for i in range(0xE000, 0x11_0000))) - -def AllIntegers(): - return (i//2 if i % 2 == 0 else -i//2 for i in count(0)) - -def IntegerRange(lo, hi): - if lo is None: - return count(hi-1, -1) - if hi is None: - return count(lo) - return range(lo, hi) - -class Doubler: - def __init__(self, start): - self.start = start - - def __iter__(self): - i = self.start - while True: - yield i - i *= 2 - -class defaults: - bool = staticmethod(lambda: False) - char = staticmethod(lambda: 'D') - codepoint = staticmethod(lambda: CodePoint(defaults.char())) - int = staticmethod(lambda: 0) - real = staticmethod(BigRational) - pointer = staticmethod(lambda: None) - tuple = staticmethod(lambda *args: lambda: tuple(a() for a in args)) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/dafny_generated.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/dafny_generated.py deleted file mode 100644 index 992697c0c2..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/dafny_generated.py +++ /dev/null @@ -1,9 +0,0 @@ -# Dafny program the_program compiled into Python -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count - -import module_ -import _dafny - diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/module_.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/module_.py deleted file mode 100644 index c5114085e1..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/module_.py +++ /dev/null @@ -1,15 +0,0 @@ -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count - -import module_ -import _dafny -import System_ -import simple.types.boolean.internaldafny.types -import SimpleBooleanImpl_Compile -import simple.types.boolean.internaldafny.impl - -assert "module_" == __name__ -module_ = sys.modules[__name__] - diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/__init__.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/__init__.py deleted file mode 100644 index e7c7bace08..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from . import types \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/__pycache__/__init__.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index 9a235393c135e767a891ef4b979438dcc93becf4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 302 zcmZusJ5B>Z44v5(D2kLOsX4$l_yQ%QW!cYu&zAi1;Z^Zx(QwA>r1xhW9ypvL3u@Y7JEt#m~ z{w!rraak365lU{oi9vi;hesE7Ue^tQcRCvv{1(;}(~U#Y z5mv47n%4c&0WX}>R9gt0O|9X!&uPmGV`w1$sqY5`)*GAE16c}nA{eA=q e=*l?kG|j_^uk3$_7aV>{DdmTly`S=M&Wc}H*jVNO diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/__init__.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/__init__.py deleted file mode 100644 index 91e7678c2a..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from . import boolean \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/__pycache__/__init__.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index 58cf1a5149f8e634f573e8434673e3cc01f6d54b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 310 zcmZusJ5B>Z44v7PAVErll#&B%gD-$mAX;b=8k*6vW5_D=lV?_FZomyFH~``{lqemd zqC-lT3U9LMuq^x8&)>Jn0{# z_3^#;25Way6>C8yC*Q@UZ{EJbZA6M-y2duzJGjEQNBx*0%N-N z8cl?GYlFc>4tT(q`xQW)OReQ}$Z5#~BQ+3r)x!~>>j#(BBRZryp&nRByJ1STu1!jv hhrAtKSg$*SGaB)&{V(y1&2K5C{1nrV|CEln;tzLyTowQT diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/__init__.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/__init__.py deleted file mode 100644 index f002fa7ce8..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from . import internaldafny \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/__pycache__/__init__.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index 1e998e3efe8e9b2aa5a29dc3745569627ffe3c13..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 324 zcmZusy-EW?5Z=853Bn=R1|Q%W=LN(fq}3*|u{qY;iCMCL%v_l~>HVVL=5zK@TYx2ig2InKVGxE(1?p^6Ca-;p+iV!9g)pceM#XSS^N1EnM3f^7aWI=i oO{1)eO>^nfadu^#>@;4}EZ^LJ7A|u6Ejj0(Z2s|I(n(hQ0ft6l{r~^~ diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/internaldafny/__init__.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/internaldafny/__init__.py deleted file mode 100644 index 82e57136ff..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/internaldafny/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from . import impl, types \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/internaldafny/__pycache__/__init__.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/internaldafny/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index 0b1e604285b4ec085e047bc0077d49c23e837ca9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 351 zcmZ`!yH3ME5WKU4ct~jxsj1wsKY%C@Ei?&Dnv?M@#LB(2cNX#=@CSSXqU28~kvl|1 zhm}efLSs?^( zTI(sSV1Y5+dW|N+ypP63pFHww?+um?sBx*bybf(zabTnh;^2N59lCsUt$IR-R3_A; z3d1*HZ>n8Fa-|u}pj7SZq|`-dw?~)O>&D;}9rFeKsqviQFPBn&iP`7>j}FY~=b#}SCT#+J|wq&`HT}P>%x>Rb?LD8miV*#}S1Tq{IkrX>wB-zs3l|_1& zWM`KML{J3}IuM0{9-TuEI=MBB{DU5P?2!^S6)`{n7e#>PMppp>nR)X*M}N*_QUuyZ|LmGhl8}GlAZ+pwIs6A84~a=k!6rKPqAfV0E;e^C#z>UPtw+$oSqYiNZux< zxr^!x3R68DVN(${qE3f%j}nADfnU({Gkmuc?3R8c0tJ3U%8V(jk^JOWI9$m~ zOkFD3cImEdvBa-yTP(T0)v#`tC`+xB9Lrp9Hf$>|FnPnS*C`_9db8$zCBSMNdBE)g z^3qzx0nQusx^0ze%YYk8b*E9Wt#WW~07EejZ@~B=v4}31L>EnAhv*4Yw4@EuOzcRy zY)UYrm@>emrJBkPc?2t-M0@EIW)iNUvZ>g?OLoPod1aI?Y^W3b9qIrc67LAD8sWR4 zVBsp>$B&GU+Qf*oZIU(eSO8_xG^}HprFw0nat{=M9ZQLVApB3M8E$SBSX4xs5^;+>Q%f0W_8^urR^nSxGm91i+&*^$`xMR6Ms3TuXVolP@+@;mEplrXL#9g2 zvuLekbLJwhFEqB8Y8aJT#WRf7`7x?5gj5ag=3WHQAzv)4`U}53SlHZO*xXyF`U};) z1>0Y+yV8TnzB<{J4uOp@g<4*d)?&s(4RPZsfIujs>xwI_rQkLNE^lEdZy_dc0p$&S zurNl_$An@)1xBD}P=ZOr;CFRB3fG$(vk0y?;^50wSlA(bZM~^PwU8eYN80041bdbvCO zAlrrSq)eFJxJ(4J`~3pKLo*CpRf@1MVUlV@KSG7{8no{eWFXTMv^sC`klPl$Tu33L zIuYW#Je7x|uy2zpMk8-+A)W-c6Ya#d*cONS&rh=49a?HMAPhs7VcAv7g{U>wn&q

This will implement any handling of components outside the request * body and error handling. */ +// TODO: Naming of DafnyProtocolGenerator? @SmithyUnstableApi public abstract class DafnyProtocolGenerator implements ProtocolGenerator { @@ -85,7 +64,7 @@ public abstract class DafnyProtocolGenerator implements ProtocolGenerator { @Override public ApplicationProtocol getApplicationProtocol() { - return DafnyTestIntegration.createDafnyApplicationProtocol(); + return DafnyIntegration.createDafnyApplicationProtocol(); } @Override @@ -93,33 +72,23 @@ public void generateRequestSerializers(GenerationContext context) { var topDownIndex = TopDownIndex.of(context.model()); var delegator = context.writerDelegator(); var configSymbol = CodegenUtils.getConfigSymbol(context.settings()); - // I beLIEVE transportRequest needs to be the output shape - // for requestSeralizers this is a dafnyType - // i.e. the operation output...? - // no... the operation output is... not... this... - // Oh, ok: input is GetBooleanInput, output is GetBooleanOutput... - // OH, duhDOY. I am looking at the Smithy model. Smithy model dgaf about the Dafny stuff. - // I need to hardcode the Dafny stuff! - // i.e. DafnyNameResolver... one day. For now, name = "Dafny"+input. - // Actually, for now: hardcoded DafnyGetBooleanInput. - var transportRequest = context.applicationProtocol().requestType(); + for (OperationShape operation : topDownIndex.getContainedOperations(context.settings().getService())) { var serFunction = getSerializationFunction(context, operation); var input = context.model().expectShape(operation.getInputShape()); var inputSymbol = context.symbolProvider().toSymbol(input); - var output = context.model().expectShape(operation.getOutputShape()); - var outputSymbol = context.symbolProvider().toSymbol(output); + delegator.useFileWriter(serFunction.getDefinitionFile(), serFunction.getNamespace(), writer -> { writer.pushState(new RequestSerializerSection(operation)); + // TODO: nameresolver writer.write(""" - async def $L(input: $T, config: $T) -> DafnyGetBooleanInput: + async def $L(input: $T, config: $T) -> Dafny$T: ${C|} - """, serFunction.getName(), inputSymbol, configSymbol, + """, serFunction.getName(), inputSymbol, configSymbol, inputSymbol, writer.consumer(w -> generateRequestSerializer(context, operation, w))); writer.popState(); }); } -// generateDocumentBodyShapeSerializers(context, serializingDocumentShapes); } /** @@ -133,10 +102,14 @@ public record RequestSerializerSection(OperationShape operation) implements Code /** * Generates the content of the operation request serializer. * - *

Serialization of the http-level components will be inline - * since there isn't any use for them elsewhere. Serialization - * of document body components should be delegated, however, - * as they will need to be re-used in all likelihood. + * Smithy-Python uses the word 'serialize' in this part of the code. + * This name stems from its default HTTP-style application protocol + * as this code would, by default, transform POJOs of Smithy-modelled objects + * into serialized HTTP objects. + * + * The Dafny plugin will not 'serialize' here, but will instead + * transform POJOs of Smithy-modelled objects + * into POJOs of Dafny-compiled objects. * *

This function has the following in scope: *

NCWziPOs=s9TI6X;K1)VeUv4Mv;(0C?Qr1AyS0zvj;`AI!hIKmYFMtMB`( zAN#8t{;KD%w!S80O}Hg~gWbCLpP+k&-EEQ6Zi_H_?G6qABK`r#KM=dhm$|&3``JNm zaX+{CH|ek2f4BB>>wa#%EB8;$bd|n#rke?TFR~`cgE;p+G$h0WsX`yLp)KeSVR$?; zxssma`#hz-42xVeN{2kvrXI9=>N$S+NW@v%ROzGOL{{6+~q$6UP!k9!!~+< zR6`??D)RC+qV7uJ+|fR6k}#FY^dd0v1VvGe^i=@tay(xI?~^fe#~hr^z7@P(#;~?7 zja2e{t~{LXVmNikm)e;JZC|_SYp?s-8wZ-PuNiw<$=6CfwG`;>XsW+)i`xk=dbJbsobr^2 zuiF;d;J*AhkWY`bp@c6Qo^68sgw>5=9;L4!_z?i8BUnyYf?6(*d$FiI^RKaiHDY*KY1_Q0?*b; z?H)z%rs${?eUzdDGRY}R)!|>C z{Ji)7{`zF57ys*%bG`WA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F{SWes);qgqoKgF^$JeFOJvtrr#o28p2{m`gBc3z)I z=%0Dp=_je*!4p(_=2ZEi8Mn9*Mz{AQDW;^a5Y`WabI zr1Y^V{pfUMSK8Q>_Lkhb0@Hu@%C$Y$_AH*cx$(=u&8E*TRkj{9wjT7R1`R{|;ZL!- N&(Y@gi$go>{{y#jSyli5 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/internaldafny/impl.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/internaldafny/impl.py deleted file mode 100644 index 7de8a1ab27..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/internaldafny/impl.py +++ /dev/null @@ -1,55 +0,0 @@ -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count - -import module_ -import _dafny -import System_ -from . import types -from dafny_generated import SimpleBooleanImpl_Compile - -# assert "simple.types.boolean.internaldafny.impl" == __name__ - -class SimpleBooleanClient(simple.types.boolean.internaldafny.types.ISimpleBooleanClient): - def __init__(self): - self._config: SimpleBooleanImpl_Compile.Config = SimpleBooleanImpl_Compile.Config_Config.default()() - pass - - def __dafnystr__(self) -> str: - return "simple.types.boolean.internaldafny.impl_Compile.SimpleBooleanClient" - def ctor__(self, config): - (self)._config = config - - def GetBoolean(self, input): - output: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(simple.types.boolean.internaldafny.types.GetBooleanOutput.default())() - out0_: Wrappers_Compile.Result - out0_ = SimpleBooleanImpl_Compile.default__.GetBoolean((self).config, input) - output = out0_ - return output - - @property - def config(self): - return self._config - -class default__: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "simple.types.boolean.internaldafny.impl_Compile._default" - @staticmethod - def DefaultSimpleBooleanConfig(): - return simple.types.boolean.internaldafny.types.SimpleBooleanConfig_SimpleBooleanConfig() - - @staticmethod - def SimpleBoolean(config): - res: Wrappers_Compile.Result = None - d_1_client_: simple.types.boolean.internaldafny.impl.SimpleBooleanClient - nw0_ = simple.types.boolean.internaldafny.impl.SimpleBooleanClient() - nw0_.ctor__(SimpleBooleanImpl_Compile.Config_Config()) - d_1_client_ = nw0_ - res = Wrappers_Compile.Result_Success(d_1_client_) - return res - return res - diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/internaldafny/types.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/internaldafny/types.py deleted file mode 100644 index b93faea1dc..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/simpleboolean/dafny_generated/simple/types/boolean/internaldafny/types.py +++ /dev/null @@ -1,143 +0,0 @@ -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count - -import module_ -import _dafny -import System_ - -# assert "simple.types.boolean.internaldafny.types" == __name__ - -class DafnyCallEvent: - @classmethod - def default(cls, default_I, default_O): - return lambda: DafnyCallEvent_DafnyCallEvent(default_I(), default_O()) - def __ne__(self, __o: object) -> bool: - return not self.__eq__(__o) - @property - def is_DafnyCallEvent(self) -> bool: - return isinstance(self, simple.types.boolean.internaldafny.types.DafnyCallEvent_DafnyCallEvent) - -class DafnyCallEvent_DafnyCallEvent(DafnyCallEvent, NamedTuple('DafnyCallEvent', [('input', Any), ('output', Any)])): - def __dafnystr__(self) -> str: - return f'simple.types.boolean.internaldafny.types_Compile.DafnyCallEvent.DafnyCallEvent({_dafny.string_of(self.input)}, {_dafny.string_of(self.output)})' - def __eq__(self, __o: object) -> bool: - return isinstance(__o, simple.types.boolean.internaldafny.types.DafnyCallEvent_DafnyCallEvent) and self.input == __o.input and self.output == __o.output - def __hash__(self) -> int: - return super().__hash__() - - -class GetBooleanInput: - @classmethod - def default(cls, ): - return lambda: GetBooleanInput_GetBooleanInput(Wrappers_Compile.Option_None.default()()) - def __ne__(self, __o: object) -> bool: - return not self.__eq__(__o) - @property - def is_GetBooleanInput(self) -> bool: - return isinstance(self, simple.types.boolean.internaldafny.types.GetBooleanInput_GetBooleanInput) - -class GetBooleanInput_GetBooleanInput(GetBooleanInput, NamedTuple('GetBooleanInput', [('value', Any)])): - def __dafnystr__(self) -> str: - return f'simple.types.boolean.internaldafny.types_Compile.GetBooleanInput.GetBooleanInput({_dafny.string_of(self.value)})' - def __eq__(self, __o: object) -> bool: - return isinstance(__o, simple.types.boolean.internaldafny.types.GetBooleanInput_GetBooleanInput) and self.value == __o.value - def __hash__(self) -> int: - return super().__hash__() - - -class GetBooleanOutput: - @classmethod - def default(cls, ): - return lambda: GetBooleanOutput_GetBooleanOutput(Wrappers_Compile.Option_None.default()()) - def __ne__(self, __o: object) -> bool: - return not self.__eq__(__o) - @property - def is_GetBooleanOutput(self) -> bool: - return isinstance(self, simple.types.boolean.internaldafny.types.GetBooleanOutput_GetBooleanOutput) - -class GetBooleanOutput_GetBooleanOutput(GetBooleanOutput, NamedTuple('GetBooleanOutput', [('value', Any)])): - def __dafnystr__(self) -> str: - return f'simple.types.boolean.internaldafny.types_Compile.GetBooleanOutput.GetBooleanOutput({_dafny.string_of(self.value)})' - def __eq__(self, __o: object) -> bool: - return isinstance(__o, simple.types.boolean.internaldafny.types.GetBooleanOutput_GetBooleanOutput) and self.value == __o.value - def __hash__(self) -> int: - return super().__hash__() - - -class ISimpleBooleanClientCallHistory: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "simple.types.boolean.internaldafny.types_Compile.ISimpleBooleanClientCallHistory" - -class ISimpleBooleanClient: - pass - def GetBoolean(self, input): - pass - - -class SimpleBooleanConfig: - @_dafny.classproperty - def AllSingletonConstructors(cls): - return [SimpleBooleanConfig_SimpleBooleanConfig()] - @classmethod - def default(cls, ): - return lambda: SimpleBooleanConfig_SimpleBooleanConfig() - def __ne__(self, __o: object) -> bool: - return not self.__eq__(__o) - @property - def is_SimpleBooleanConfig(self) -> bool: - return isinstance(self, simple.types.boolean.internaldafny.types.SimpleBooleanConfig_SimpleBooleanConfig) - -class SimpleBooleanConfig_SimpleBooleanConfig(SimpleBooleanConfig, NamedTuple('SimpleBooleanConfig', [])): - def __dafnystr__(self) -> str: - return f'simple.types.boolean.internaldafny.types_Compile.SimpleBooleanConfig.SimpleBooleanConfig' - def __eq__(self, __o: object) -> bool: - return isinstance(__o, simple.types.boolean.internaldafny.types.SimpleBooleanConfig_SimpleBooleanConfig) - def __hash__(self) -> int: - return super().__hash__() - - -class Error: - @classmethod - def default(cls, ): - return lambda: Error_CollectionOfErrors(_dafny.Seq({}), _dafny.Seq({})) - def __ne__(self, __o: object) -> bool: - return not self.__eq__(__o) - @property - def is_CollectionOfErrors(self) -> bool: - return isinstance(self, simple.types.boolean.internaldafny.types.Error_CollectionOfErrors) - @property - def is_Opaque(self) -> bool: - return isinstance(self, simple.types.boolean.internaldafny.types.Error_Opaque) - -class Error_CollectionOfErrors(Error, NamedTuple('CollectionOfErrors', [('list', Any), ('message', Any)])): - def __dafnystr__(self) -> str: - return f'simple.types.boolean.internaldafny.types_Compile.Error.CollectionOfErrors({_dafny.string_of(self.list)}, {self.message.VerbatimString(True)})' - def __eq__(self, __o: object) -> bool: - return isinstance(__o, simple.types.boolean.internaldafny.types.Error_CollectionOfErrors) and self.list == __o.list and self.message == __o.message - def __hash__(self) -> int: - return super().__hash__() - -class Error_Opaque(Error, NamedTuple('Opaque', [('obj', Any)])): - def __dafnystr__(self) -> str: - return f'simple.types.boolean.internaldafny.types_Compile.Error.Opaque({_dafny.string_of(self.obj)})' - def __eq__(self, __o: object) -> bool: - return isinstance(__o, simple.types.boolean.internaldafny.types.Error_Opaque) and self.obj == __o.obj - def __hash__(self) -> int: - return super().__hash__() - - -class OpaqueError: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "" - @staticmethod - def default(): - return simple.types.boolean.internaldafny.types.Error_CollectionOfErrors.default()() - From 343c7af733e3cdae6f2c9ec884ff0ade4cd9697a Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Thu, 15 Jun 2023 16:24:27 -0700 Subject: [PATCH 021/673] add src-goal --- .../runtimes/python/src-goal/__init__.py | 0 .../SimpleBooleanImplTest_Compile.py | 84 ++-- .../SimpleBooleanImpl_Compile.py | 24 +- .../WrappedSimpleTypesBooleanTest_Compile.py | 47 +- .../__pycache__/Extern.cpython-311.pyc | Bin 1409 -> 0 bytes ...pleBooleanImplTest_Compile.cpython-311.pyc | Bin 7203 -> 7439 bytes .../SimpleBooleanImpl_Compile.cpython-311.pyc | Bin 6648 -> 6358 bytes .../StandardLibrary_Compile.cpython-311.pyc | Bin 0 -> 13423 bytes ...ndardLibrary_mUInt_Compile.cpython-311.pyc | Bin 0 -> 12449 bytes .../__pycache__/System_.cpython-311.pyc | Bin 1363 -> 1363 bytes .../__pycache__/UTF8.cpython-311.pyc | Bin 0 -> 9510 bytes ...leTypesBooleanTest_Compile.cpython-311.pyc | Bin 3625 -> 4081 bytes .../Wrappers_Compile.cpython-311.pyc | Bin 14812 -> 14812 bytes .../__pycache__/_dafny.cpython-311.pyc | Bin 35100 -> 35100 bytes .../__pycache__/module_.cpython-311.pyc | Bin 6321 -> 6648 bytes .../dafny_generated/dafny_generated.py | 1 + .../src-goal/dafny_generated/module_.py | 37 +- .../__pycache__/impl.cpython-311.pyc | Bin 4223 -> 4343 bytes .../__pycache__/types.cpython-311.pyc | Bin 17744 -> 17841 bytes .../__pycache__/wrapped.cpython-311.pyc | Bin 1831 -> 2096 bytes .../types/boolean/internaldafny/impl.py | 15 +- .../types/boolean/internaldafny/types.py | 6 +- .../types/boolean/internaldafny/wrapped.py | 9 +- .../{dafny_generated => extern}/Extern.py | 4 +- .../{dafny_generated => extern}/Shim.py | 0 .../extern/__pycache__/Extern.cpython-311.pyc | Bin 0 -> 1400 bytes .../__pycache__/Shim.cpython-311.pyc | Bin 2243 -> 2224 bytes .../__pycache__/__init__.cpython-311.pyc | Bin 258 -> 0 bytes .../__pycache__/client.cpython-311.pyc | Bin 12721 -> 0 bytes .../__pycache__/config.cpython-311.pyc | Bin 1577 -> 0 bytes .../__pycache__/deserialize.cpython-311.pyc | Bin 817 -> 0 bytes .../__pycache__/serialize.cpython-311.pyc | Bin 795 -> 0 bytes .../simple_boolean/deserialize.py | 11 - .../src-goal/smithy_generated/Iamaredme | 3 + .../README.md | 0 .../python/src-goal/smithy_generated/plugin | 3 + .../pyproject.toml | 0 .../simple_boolean/__init__.py | 0 .../__pycache__/__init__.cpython-311.pyc | Bin 0 -> 253 bytes .../__pycache__/client.cpython-311.pyc | Bin 0 -> 13533 bytes .../__pycache__/config.cpython-311.pyc | Bin 0 -> 1818 bytes .../__pycache__/deserialize.cpython-311.pyc | Bin 0 -> 823 bytes .../__pycache__/errors.cpython-311.pyc | Bin 1827 -> 1822 bytes .../__pycache__/models.cpython-311.pyc | Bin 5279 -> 5274 bytes .../__pycache__/plugin.cpython-311.pyc | Bin 0 -> 1824 bytes .../__pycache__/serialize.cpython-311.pyc | Bin 0 -> 801 bytes .../simple_boolean/client.py | 88 ++-- .../simple_boolean/config.py | 11 +- .../simple_boolean/deserialize.py | 13 + .../simple_boolean/endpoints.py | 0 .../simple_boolean/errors.py | 0 .../simple_boolean/models.py | 0 .../smithy_generated/simple_boolean/plugin.py | 20 + .../simple_boolean/serialize.py | 5 +- .../SimpleBooleanImplTest_Compile.py | 77 +++ .../SimpleBooleanImpl_Compile.py | 62 +++ .../StandardLibrary_Compile.py | 193 +++++++ .../StandardLibrary_mUInt_Compile.py | 208 ++++++++ .../python/src/dafny_generated/System_.py | 20 + .../python/src/dafny_generated/UTF8.py | 118 +++++ .../WrappedSimpleTypesBooleanTest_Compile.py | 51 ++ .../src/dafny_generated/Wrappers_Compile.py | 190 +++++++ ...pleBooleanImplTest_Compile.cpython-311.pyc | Bin 0 -> 7439 bytes .../SimpleBooleanImpl_Compile.cpython-311.pyc | Bin 0 -> 6358 bytes .../StandardLibrary_Compile.cpython-311.pyc | Bin 0 -> 13423 bytes ...ndardLibrary_mUInt_Compile.cpython-311.pyc | Bin 0 -> 12449 bytes .../__pycache__/System_.cpython-311.pyc | Bin 0 -> 1363 bytes .../__pycache__/UTF8.cpython-311.pyc | Bin 0 -> 9510 bytes ...leTypesBooleanTest_Compile.cpython-311.pyc | Bin 0 -> 4081 bytes .../Wrappers_Compile.cpython-311.pyc | Bin 0 -> 14812 bytes .../__pycache__/_dafny.cpython-311.pyc | Bin 0 -> 35100 bytes .../__pycache__/module_.cpython-311.pyc | Bin 0 -> 6648 bytes .../python/src/dafny_generated/_dafny.py | 476 ++++++++++++++++++ .../src/dafny_generated/dafny_generated.py | 16 + .../python/src/dafny_generated/module_.py | 87 ++++ .../__pycache__/impl.cpython-311.pyc | Bin 0 -> 4343 bytes .../__pycache__/types.cpython-311.pyc | Bin 0 -> 17841 bytes .../__pycache__/wrapped.cpython-311.pyc | Bin 0 -> 2096 bytes .../types/boolean/internaldafny/impl.py | 59 +++ .../types/boolean/internaldafny/types.py | 147 ++++++ .../types/boolean/internaldafny/wrapped.py | 29 ++ .../runtimes/python/src/extern/Extern.py | 22 + .../runtimes/python/src/extern/Shim.py | 28 ++ .../extern/__pycache__/Extern.cpython-311.pyc | Bin 0 -> 1400 bytes .../extern/__pycache__/Shim.cpython-311.pyc | Bin 0 -> 2224 bytes .../python/src/smithy_generated/Iamaredme | 3 + .../python/src/smithy_generated/README.md | 3 + .../python/src/smithy_generated/plugin | 3 + .../src/smithy_generated/pyproject.toml | 46 ++ .../simple_boolean/__init__.py | 1 + .../__pycache__/__init__.cpython-311.pyc | Bin 0 -> 253 bytes .../__pycache__/client.cpython-311.pyc | Bin 0 -> 13533 bytes .../__pycache__/config.cpython-311.pyc | Bin 0 -> 1818 bytes .../__pycache__/deserialize.cpython-311.pyc | Bin 0 -> 823 bytes .../__pycache__/errors.cpython-311.pyc | Bin 0 -> 1822 bytes .../__pycache__/models.cpython-311.pyc | Bin 0 -> 5274 bytes .../__pycache__/plugin.cpython-311.pyc | Bin 0 -> 1824 bytes .../__pycache__/serialize.cpython-311.pyc | Bin 0 -> 801 bytes .../smithy_generated/simple_boolean/client.py | 381 ++++++++++++++ .../smithy_generated/simple_boolean/config.py | 31 ++ .../simple_boolean/deserialize.py | 13 + .../simple_boolean/endpoints.py | 7 + .../smithy_generated/simple_boolean/errors.py | 23 + .../smithy_generated/simple_boolean/models.py | 108 ++++ .../smithy_generated/simple_boolean/plugin.py | 20 + .../simple_boolean/serialize.py | 12 + 106 files changed, 2661 insertions(+), 154 deletions(-) delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/__init__.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/__pycache__/Extern.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/__pycache__/StandardLibrary_Compile.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/__pycache__/StandardLibrary_mUInt_Compile.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/__pycache__/UTF8.cpython-311.pyc rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/{dafny_generated => extern}/Extern.py (84%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/{dafny_generated => extern}/Shim.py (100%) create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/extern/__pycache__/Extern.cpython-311.pyc rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/{dafny_generated => extern}/__pycache__/Shim.cpython-311.pyc (72%) delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/__pycache__/__init__.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/__pycache__/client.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/__pycache__/config.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/__pycache__/deserialize.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/__pycache__/serialize.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/deserialize.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/Iamaredme rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/{python_client_codegen => smithy_generated}/README.md (100%) create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/plugin rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/{python_client_codegen => smithy_generated}/pyproject.toml (100%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/{python_client_codegen => smithy_generated}/simple_boolean/__init__.py (100%) create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/__pycache__/__init__.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/__pycache__/client.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/__pycache__/config.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/__pycache__/deserialize.cpython-311.pyc rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/{python_client_codegen => smithy_generated}/simple_boolean/__pycache__/errors.cpython-311.pyc (78%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/{python_client_codegen => smithy_generated}/simple_boolean/__pycache__/models.cpython-311.pyc (95%) create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/__pycache__/plugin.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/__pycache__/serialize.cpython-311.pyc rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/{python_client_codegen => smithy_generated}/simple_boolean/client.py (78%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/{python_client_codegen => smithy_generated}/simple_boolean/config.py (60%) create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/deserialize.py rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/{python_client_codegen => smithy_generated}/simple_boolean/endpoints.py (100%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/{python_client_codegen => smithy_generated}/simple_boolean/errors.py (100%) rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/{python_client_codegen => smithy_generated}/simple_boolean/models.py (100%) create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/plugin.py rename TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/{python_client_codegen => smithy_generated}/simple_boolean/serialize.py (57%) create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/SimpleBooleanImplTest_Compile.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/SimpleBooleanImpl_Compile.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/StandardLibrary_Compile.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/StandardLibrary_mUInt_Compile.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/System_.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/UTF8.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/WrappedSimpleTypesBooleanTest_Compile.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/Wrappers_Compile.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/__pycache__/SimpleBooleanImplTest_Compile.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/__pycache__/SimpleBooleanImpl_Compile.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/__pycache__/StandardLibrary_Compile.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/__pycache__/StandardLibrary_mUInt_Compile.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/__pycache__/System_.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/__pycache__/UTF8.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/__pycache__/WrappedSimpleTypesBooleanTest_Compile.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/__pycache__/Wrappers_Compile.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/__pycache__/_dafny.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/__pycache__/module_.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/_dafny.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/dafny_generated.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/module_.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/simple/types/boolean/internaldafny/__pycache__/impl.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/simple/types/boolean/internaldafny/__pycache__/types.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/simple/types/boolean/internaldafny/__pycache__/wrapped.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/simple/types/boolean/internaldafny/impl.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/simple/types/boolean/internaldafny/types.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/simple/types/boolean/internaldafny/wrapped.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/extern/Extern.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/extern/Shim.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/extern/__pycache__/Extern.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/extern/__pycache__/Shim.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/Iamaredme create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/README.md create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/plugin create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/pyproject.toml create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__init__.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__pycache__/__init__.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__pycache__/client.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__pycache__/config.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__pycache__/deserialize.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__pycache__/errors.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__pycache__/models.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__pycache__/plugin.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__pycache__/serialize.cpython-311.pyc create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/client.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/config.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/deserialize.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/endpoints.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/errors.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/models.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/plugin.py create mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/serialize.py diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/__init__.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/SimpleBooleanImplTest_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/SimpleBooleanImplTest_Compile.py index c0dbd19d81..6122fa753c 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/SimpleBooleanImplTest_Compile.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/SimpleBooleanImplTest_Compile.py @@ -6,9 +6,13 @@ import module_ import _dafny import System_ - -import simple.types.boolean.internaldafny.impl import Wrappers_Compile +import StandardLibrary_mUInt_Compile +import StandardLibrary_Compile +import UTF8 +import simple.types.boolean.internaldafny.types +import SimpleBooleanImpl_Compile +import simple.types.boolean.internaldafny.impl assert "SimpleBooleanImplTest_Compile" == __name__ SimpleBooleanImplTest_Compile = sys.modules[__name__] @@ -21,53 +25,53 @@ def __dafnystr__(self) -> str: return "SimpleBooleanImplTest_Compile._default" @staticmethod def GetBooleanTrue(): - d_0_client_: simple.types.boolean.internaldafny.impl.SimpleBooleanClient - d_1_valueOrError0_: Wrappers_Compile.Result = None - out0_: Wrappers_Compile.Result - out0_ = simple.types.boolean.internaldafny.impl.default__.SimpleBoolean(simple.types.boolean.internaldafny.impl.default__.DefaultSimpleBooleanConfig()) - d_1_valueOrError0_ = out0_ - if not(not((d_1_valueOrError0_).IsFailure())): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(10,19): " + _dafny.string_of(d_1_valueOrError0_)) - d_0_client_ = (d_1_valueOrError0_).Extract() - SimpleBooleanImplTest_Compile.default__.TestGetBooleanTrue(d_0_client_) + d_73_client_: simple.types.boolean.internaldafny.impl.SimpleBooleanClient + d_74_valueOrError0_: Wrappers_Compile.Result = None + out1_: Wrappers_Compile.Result + out1_ = simple.types.boolean.internaldafny.impl.default__.SimpleBoolean(simple.types.boolean.internaldafny.impl.default__.DefaultSimpleBooleanConfig()) + d_74_valueOrError0_ = out1_ + if not(not((d_74_valueOrError0_).IsFailure())): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(10,19): " + _dafny.string_of(d_74_valueOrError0_)) + d_73_client_ = (d_74_valueOrError0_).Extract() + SimpleBooleanImplTest_Compile.default__.TestGetBooleanTrue(d_73_client_) @staticmethod def GetBooleanFalse(): - d_2_client_: simple.types.boolean.internaldafny.impl.SimpleBooleanClient - d_3_valueOrError0_: Wrappers_Compile.Result = None - out1_: Wrappers_Compile.Result - out1_ = simple.types.boolean.internaldafny.impl.default__.SimpleBoolean(simple.types.boolean.internaldafny.impl.default__.DefaultSimpleBooleanConfig()) - d_3_valueOrError0_ = out1_ - if not(not((d_3_valueOrError0_).IsFailure())): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(14,19): " + _dafny.string_of(d_3_valueOrError0_)) - d_2_client_ = (d_3_valueOrError0_).Extract() - SimpleBooleanImplTest_Compile.default__.TestGetBooleanFalse(d_2_client_) + d_75_client_: simple.types.boolean.internaldafny.impl.SimpleBooleanClient + d_76_valueOrError0_: Wrappers_Compile.Result = None + out2_: Wrappers_Compile.Result + out2_ = simple.types.boolean.internaldafny.impl.default__.SimpleBoolean(simple.types.boolean.internaldafny.impl.default__.DefaultSimpleBooleanConfig()) + d_76_valueOrError0_ = out2_ + if not(not((d_76_valueOrError0_).IsFailure())): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(14,19): " + _dafny.string_of(d_76_valueOrError0_)) + d_75_client_ = (d_76_valueOrError0_).Extract() + SimpleBooleanImplTest_Compile.default__.TestGetBooleanFalse(d_75_client_) @staticmethod def TestGetBooleanTrue(client): - d_4_ret_: simple.types.boolean.internaldafny.types.GetBooleanOutput - d_5_valueOrError0_: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(simple.types.boolean.internaldafny.types.GetBooleanOutput.default())() - out2_: Wrappers_Compile.Result - out2_ = (client).GetBoolean(simple.types.boolean.internaldafny.types.GetBooleanInput_GetBooleanInput(Wrappers_Compile.Option_Some(True))) - d_5_valueOrError0_ = out2_ - if not(not((d_5_valueOrError0_).IsFailure())): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(23,16): " + _dafny.string_of(d_5_valueOrError0_)) - d_4_ret_ = (d_5_valueOrError0_).Extract() - if not((((d_4_ret_).value).UnwrapOr(False)) == (True)): + d_77_ret_: simple.types.boolean.internaldafny.types.GetBooleanOutput + d_78_valueOrError0_: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(simple.types.boolean.internaldafny.types.GetBooleanOutput.default())() + out3_: Wrappers_Compile.Result + out3_ = (client).GetBoolean(simple.types.boolean.internaldafny.types.GetBooleanInput_GetBooleanInput(Wrappers_Compile.Option_Some(True))) + d_78_valueOrError0_ = out3_ + if not(not((d_78_valueOrError0_).IsFailure())): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(23,16): " + _dafny.string_of(d_78_valueOrError0_)) + d_77_ret_ = (d_78_valueOrError0_).Extract() + if not((((d_77_ret_).value).UnwrapOr(False)) == (True)): raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(24,8): " + _dafny.string_of(_dafny.Seq("expectation violation"))) - _dafny.print(_dafny.string_of(d_4_ret_)) + _dafny.print(_dafny.string_of(d_77_ret_)) @staticmethod def TestGetBooleanFalse(client): - d_6_ret_: simple.types.boolean.internaldafny.types.GetBooleanOutput - d_7_valueOrError0_: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(simple.types.boolean.internaldafny.types.GetBooleanOutput.default())() - out3_: Wrappers_Compile.Result - out3_ = (client).GetBoolean(simple.types.boolean.internaldafny.types.GetBooleanInput_GetBooleanInput(Wrappers_Compile.Option_Some(False))) - d_7_valueOrError0_ = out3_ - if not(not((d_7_valueOrError0_).IsFailure())): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(33,16): " + _dafny.string_of(d_7_valueOrError0_)) - d_6_ret_ = (d_7_valueOrError0_).Extract() - if not((((d_6_ret_).value).UnwrapOr(True)) == (False)): + d_79_ret_: simple.types.boolean.internaldafny.types.GetBooleanOutput + d_80_valueOrError0_: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(simple.types.boolean.internaldafny.types.GetBooleanOutput.default())() + out4_: Wrappers_Compile.Result + out4_ = (client).GetBoolean(simple.types.boolean.internaldafny.types.GetBooleanInput_GetBooleanInput(Wrappers_Compile.Option_Some(False))) + d_80_valueOrError0_ = out4_ + if not(not((d_80_valueOrError0_).IsFailure())): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(33,16): " + _dafny.string_of(d_80_valueOrError0_)) + d_79_ret_ = (d_80_valueOrError0_).Extract() + if not((((d_79_ret_).value).UnwrapOr(True)) == (False)): raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(34,8): " + _dafny.string_of(_dafny.Seq("expectation violation"))) - _dafny.print(_dafny.string_of(d_6_ret_)) + _dafny.print(_dafny.string_of(d_79_ret_)) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/SimpleBooleanImpl_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/SimpleBooleanImpl_Compile.py index 9c9dba24c5..6e45223897 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/SimpleBooleanImpl_Compile.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/SimpleBooleanImpl_Compile.py @@ -6,9 +6,11 @@ import module_ import _dafny import System_ -import simple.types.boolean.internaldafny.types - import Wrappers_Compile +import StandardLibrary_mUInt_Compile +import StandardLibrary_Compile +import UTF8 +import simple.types.boolean.internaldafny.types assert "SimpleBooleanImpl_Compile" == __name__ SimpleBooleanImpl_Compile = sys.modules[__name__] @@ -45,16 +47,16 @@ def __dafnystr__(self) -> str: def GetBoolean(config, input): output: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(simple.types.boolean.internaldafny.types.GetBooleanOutput.default())() if not(((input).value).is_Some): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(17,4): " + (_dafny.SeqWithoutIsStrInference(map(_dafny.CodePoint, "expectation violation"))).VerbatimString(False)) + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(17,4): " + _dafny.string_of(_dafny.Seq("expectation violation"))) if not(((((input).value).value) == (True)) or ((((input).value).value) == (False))): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(19,4): " + (_dafny.SeqWithoutIsStrInference(map(_dafny.CodePoint, "expectation violation"))).VerbatimString(False)) - d_0_res_: simple.types.boolean.internaldafny.types.GetBooleanOutput - d_0_res_ = simple.types.boolean.internaldafny.types.GetBooleanOutput_GetBooleanOutput((input).value) - if not(((((d_0_res_).value).value) == (True)) or ((((d_0_res_).value).value) == (False))): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(22,4): " + (_dafny.SeqWithoutIsStrInference(map(_dafny.CodePoint, "expectation violation"))).VerbatimString(False)) - if not((((input).value).value) == (((d_0_res_).value).value)): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(24,4): " + (_dafny.SeqWithoutIsStrInference(map(_dafny.CodePoint, "expectation violation"))).VerbatimString(False)) - output = Wrappers_Compile.Result_Success(d_0_res_) + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(19,4): " + _dafny.string_of(_dafny.Seq("expectation violation"))) + d_71_res_: simple.types.boolean.internaldafny.types.GetBooleanOutput + d_71_res_ = simple.types.boolean.internaldafny.types.GetBooleanOutput_GetBooleanOutput((input).value) + if not(((((d_71_res_).value).value) == (True)) or ((((d_71_res_).value).value) == (False))): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(22,4): " + _dafny.string_of(_dafny.Seq("expectation violation"))) + if not((((input).value).value) == (((d_71_res_).value).value)): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(24,4): " + _dafny.string_of(_dafny.Seq("expectation violation"))) + output = Wrappers_Compile.Result_Success(d_71_res_) return output return output diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/WrappedSimpleTypesBooleanTest_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/WrappedSimpleTypesBooleanTest_Compile.py index be21d9bfcf..bcf2b405bf 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/WrappedSimpleTypesBooleanTest_Compile.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/WrappedSimpleTypesBooleanTest_Compile.py @@ -1,14 +1,21 @@ import sys +from typing import Callable, Any, TypeVar, NamedTuple from math import floor from itertools import count +import module_ import _dafny import System_ +import Wrappers_Compile +import StandardLibrary_mUInt_Compile +import StandardLibrary_Compile +import UTF8 +import simple.types.boolean.internaldafny.types +import SimpleBooleanImpl_Compile +import simple.types.boolean.internaldafny.impl import SimpleBooleanImplTest_Compile import simple.types.boolean.internaldafny.wrapped -import Extern - assert "WrappedSimpleTypesBooleanTest_Compile" == __name__ WrappedSimpleTypesBooleanTest_Compile = sys.modules[__name__] @@ -20,25 +27,25 @@ def __dafnystr__(self) -> str: return "WrappedSimpleTypesBooleanTest_Compile._default" @staticmethod def GetBooleanTrue(): - d_8_client_: simple.types.boolean.internaldafny.types.ISimpleBooleanClient - d_9_valueOrError0_: Wrappers_Compile.Result = None - out4_: Wrappers_Compile.Result - out4_ = simple.types.boolean.internaldafny.wrapped.default__.WrappedSimpleBoolean(simple.types.boolean.internaldafny.wrapped.default__.WrappedDefaultSimpleBooleanConfig()) - d_9_valueOrError0_ = out4_ - if not(not((d_9_valueOrError0_).IsFailure())): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/WrappedSimpleBooleanTest.dfy(11,19): " + _dafny.string_of(d_9_valueOrError0_)) - d_8_client_ = (d_9_valueOrError0_).Extract() - SimpleBooleanImplTest_Compile.default__.TestGetBooleanTrue(d_8_client_) + d_81_client_: simple.types.boolean.internaldafny.types.ISimpleBooleanClient + d_82_valueOrError0_: Wrappers_Compile.Result = None + out5_: Wrappers_Compile.Result + out5_ = simple.types.boolean.internaldafny.wrapped.default__.WrappedSimpleBoolean(simple.types.boolean.internaldafny.wrapped.default__.WrappedDefaultSimpleBooleanConfig()) + d_82_valueOrError0_ = out5_ + if not(not((d_82_valueOrError0_).IsFailure())): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/WrappedSimpleBooleanTest.dfy(11,19): " + _dafny.string_of(d_82_valueOrError0_)) + d_81_client_ = (d_82_valueOrError0_).Extract() + SimpleBooleanImplTest_Compile.default__.TestGetBooleanTrue(d_81_client_) @staticmethod def GetBooleanFalse(): - d_10_client_: simple.types.boolean.internaldafny.types.ISimpleBooleanClient - d_11_valueOrError0_: Wrappers_Compile.Result = None - out5_: Wrappers_Compile.Result - out5_ = simple.types.boolean.internaldafny.wrapped.default__.WrappedSimpleBoolean(simple.types.boolean.internaldafny.wrapped.default__.WrappedDefaultSimpleBooleanConfig()) - d_11_valueOrError0_ = out5_ - if not(not((d_11_valueOrError0_).IsFailure())): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/WrappedSimpleBooleanTest.dfy(15,19): " + _dafny.string_of(d_11_valueOrError0_)) - d_10_client_ = (d_11_valueOrError0_).Extract() - SimpleBooleanImplTest_Compile.default__.TestGetBooleanFalse(d_10_client_) + d_83_client_: simple.types.boolean.internaldafny.types.ISimpleBooleanClient + d_84_valueOrError0_: Wrappers_Compile.Result = None + out6_: Wrappers_Compile.Result + out6_ = simple.types.boolean.internaldafny.wrapped.default__.WrappedSimpleBoolean(simple.types.boolean.internaldafny.wrapped.default__.WrappedDefaultSimpleBooleanConfig()) + d_84_valueOrError0_ = out6_ + if not(not((d_84_valueOrError0_).IsFailure())): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/WrappedSimpleBooleanTest.dfy(15,19): " + _dafny.string_of(d_84_valueOrError0_)) + d_83_client_ = (d_84_valueOrError0_).Extract() + SimpleBooleanImplTest_Compile.default__.TestGetBooleanFalse(d_83_client_) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/__pycache__/Extern.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/__pycache__/Extern.cpython-311.pyc deleted file mode 100644 index b724ea7d0f91cdea72d6a222fbc222ce11380751..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1409 zcmah{&2QX96d$j>>-|pC?52ejgeruRQmrKfmw+lk+e49>0~@I1i{;vr#OaJ}&CIG; zO3@y2;6ErwP6gCEe}^OO!5UF15*N4ya_fmV*SzQVe)E1B47v!`mw$X8 z{@Ot3ccoMdbiFQr1NIz+C^QIi6>kuOHrxg^U6Wd_MVoHZPVwF z(sjE!zUTHd@4J1?2kt=gp}PjWNv_a!cU{M{$W^-GZY<+R?g)=V`xL!^T3(iQ!Rc<| zO}ut|tuh>6UrBGRq_@gEZ`&ClaZ+WT3Gzww#u z?)eml`?Hkb9YZz`NRlum1j#HGAPlAv1>YA*La-l$VZCOU9z`@Ts(%7Em*3?v2+z?8 zdS-|>{3pf>&|a=A&l*BSEZ0fnKVDNbD<49~tD7fg{T_5`K$ENkmzjEZdF2uF(-brA z-A!m3LEFQxFrN|OO=m%XIR{8uK@uNChjRE--wnN`ZmEvnu#yPJf?JUGJy@^5bH3(~ z*deok24NCA_b`7VlGJ&cuqP?;1MH*;$!NmTBWE9T@h}N7;ZBL0!o8B0pgIhojwqPZ zOdLT%&H^X&58})_#4%>Rz@c;hTY*_TNi#VrTMKLNz&4<~HTd{PaLm#9cx%4*s(1Z| zch7p;i{AG9-mCEkKZ>*Q?Zx=E@@y@7w|>5J*4th5c5`d@5~9$~4QcX>%a+K}C_ZEg zZ>IWY>J?ZE4rx(e95Gvood`-2Fc_S*m2T4{oDuBFmZz(i_B7)HQ%}BAtMviEt8iI8 z%{JFFHi6$_K6zY@+9Zlq$3D@yN}p_%H|2*VQeL3n1|BZN0M(@QdR2zftEWO*YEt!V zu)Zp`&xJ3dfMP&A)ac2k{=c-B;c`%`K-$YOk)049_-d5AUl1EXGIkY?*X_^B{_n7D zP}PLi}yrd%w9-LjQ@b9ttD%gnDD4i4x`aW&*@ShjJ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/SimpleBoolean/runtimes/python/src-goal/dafny_generated/__pycache__/StandardLibrary_Compile.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..96af6711ee1eaa6ba5225d8b1eb88b6b08a45210 GIT binary patch literal 13423 zcmcILTWl0pmi6kFANbLJfZISD6A~Nn1KR}KJjQPbVB<$1bbzAMUAEiw!>($B-D%G- zQD$OiqFpmXG|n!g^=LC$vYC-G5+jjSMk1N46s=}f)mBBcNE6!7aQPQT)^Zq(THdL=77azA#u)c4cJ^Z5~uwIt^!iO&{asjMXn<9 zEp`=??-th zd+Bki!TKjm3^#D9wa@MMyI=7OD%%rWR4o&Wv%*=os1^*n1A=#Ae%3EE(5h+D9}0;W z@r34sVYPZZ><)U}qW6^V711p&@_nJetj{lau-Q~db^2(6#>EjR7wx57jF*0$a8z4%pHhtR1jrIoJwsIc%d{wRwd}_q;#M z^B!1aJz$)Le~-)nkS@om_vzvH0jQiL_$MVS;QZz5y0OOU>iH0MG@JN-EwP3i$~&8D7x^h6D2VQ`;BC%BJ595Ts+H$`K_AQ}Qm#*|DTPB)mn;CTQ*mq2 zGWQ6glxh}*@Vpp&;`EW^nc;{tU(bB9GjR*FD3$=w7Dz0^9*TILOhF2ZFtDo3fu-?w ztYifMgDYv3OIk(5cv3t7aSHc>Y|3%M58;dro6+M_)O!&BKu<3*Hp);^Z_&sD9TZK4 zadDC%n$?b%(FBKB9c7{*hSI_!0yR7gh#2@Y3JV&@#ztkAkJ4BJ|1B|wk?CWG_MyEW zFzG(B=EO$nB`(S?QBiJ*Hnfovs97BT8eLDdQWAHKSzymo*JzqL5A&s|xBjAm8=m+R z_AKJUyl+y?+GeTjxG<-hK(q;dmGuij)jHw!`BB<6m{dlRRP#*82PCQ5y?jRt&+~4N zXFf3RcZWkFuX4U%3xTb?WP*mB7&LO=UVwU$Eom~qbS0FL{tdu&>W@2i-IO=Y7t&6u?Z@1lU zd)F6pv?z|2)&97n4#2kUtG)5Nq~n!R$x-h@53*RQ|+Iz5D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EaPcgM{)r&xFwtWzs~{Gk1-xZ`m2%tCl+nY z3ZBMd)hHYZU8_94OJIr1zL3=(8Nl1U_&kkA9!BBt=9hWr%C&yn0fatFyDkf_fw9kK{8XVI(*<)R*bGi$;JYKcbV=B6ux+8oY6Kn$=!8 zJI&&~h?DBCopmG9ZM#S5UJbx2Xjs__5E=hSoZF_@c zX22?C;1k$zT~&?5b;Se&jZqkkU+ z_b(s#A{eh4-<96}yDiJ7YrW8n-K##1g%>sJ$s^=_WdZH=S!l8U!+dZp&#`WT{fJ_J jbpZMc7qImN^Xhy6<$tvfN*(FHw$dw! literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/__pycache__/System_.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/__pycache__/System_.cpython-311.pyc index a3893472f99448b972fe25c67707e3f710c5b267..a1fc71e803745a1db9201943b8e2a98e88d8b6e6 100644 GIT binary patch delta 20 acmcc2b(xEMIWI340}%Ml?cT`k!3qF59|aHq delta 20 acmcc2b(xEMIWI340}ygB1WjI|caw diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/__pycache__/UTF8.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/__pycache__/UTF8.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9adb6dd3ca1fd97584ff30ad400bcdf6c5c2f9b3 GIT binary patch literal 9510 zcmds7du$X*dhd7l_%--}&0^!VVPCUw43EXYLKY0m7~9|jX8d6G(H>9t7(>tWxO=?I zjK>dch_b67#kb;uPvY)4X>Vh)dlIK(r9J6R;V#kXq+F!7Wobtvp%6v+!%`k55NUOP z<@>7V)%KW>yF8@yjK8nytFNlQs`~0zJzx3HtE($0c>2EkC(1ACDC!?DlYh8e;_+`F zag$Ogh1RGbaz>-0OpuAPK{m<-xhNmxX_T{?5EX+WNpqSMbp>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?Oie% zM{IpL+_E1kFSX|9JB+|wj*19%K|>|Aoy--Hl9b>=pm4M zyCe8D#%E|%SZjze1A+2A%%FoL=z^HlbucIlN+?K;l~ZFx+wD}Q1o}-Hk)zBWrsF%m-9O%ZrK3LHQYY4|?=qI&f;jVau(6TTs9@hn9m#4v| z&wzg@wugay0(pOa`4wQ+#(S2pMqRf_04sY(ha1FX9 zX#l8>WB{4~pkvYu0IyA20ov$xyor8{xAhywY3&bLVZyeI{!{vw)IQuvhtxk0ik?qM1851)&-*J&1;<}5+N2AT^#JfuX`sRQ>qS9jDf%XHCq0L2C??I}BN54s zn~ODp5&AoEWt>NVUpB>(Y**Jn8}Nwi7}NSOA^EbfmDf!n^YO4Hr}XVWR#d3 z%GARsz4;N7H?OaSX?$^Ma&l^Mar`aD)LVin@fK$B8HqV1zCfYG^wfB;kU6H11*VYY zyb`#yIJz`UA4_P6o5d}S$-d&sS|ybQsl~V0iZgQyfF?=?gK4My z{G8OpJWrq)+%$ENau$&EWH)ic$@St!+;+e~VFco0d&bFo#7q6fFEBvS4F;79Fm!`K j?g9+mVBl^5!y63x7hvcHgTe(Ey1}4#0fr{)OEduhR1cjH delta 240 zcmexiywQ+vIWI340}yCG?ns%-JCRROf4CXk9^CNG92 z##DwZArKD)QUxczQe_n0EWlX9$S63um#K$QWU~~rH?OauQG9V}a&l^Mar`aD)LVin z@rK6n8HqV1zCfYG^wfB;kO`)cDW;IwV{1m; diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/dafny_generated.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/dafny_generated.py index 7fef7fc1c6..9d2ba016d5 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/dafny_generated.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/dafny_generated.py @@ -3,6 +3,7 @@ from typing import Callable, Any, TypeVar, NamedTuple from math import floor from itertools import count +from extern import Extern import module_ import _dafny diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/module_.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/module_.py index 2dcf4297b9..454fcd43a4 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/module_.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/module_.py @@ -6,6 +6,13 @@ import module_ import _dafny import System_ +import Wrappers_Compile +import StandardLibrary_mUInt_Compile +import StandardLibrary_Compile +import UTF8 +import simple.types.boolean.internaldafny.types +import SimpleBooleanImpl_Compile +import simple.types.boolean.internaldafny.impl import SimpleBooleanImplTest_Compile import simple.types.boolean.internaldafny.wrapped import WrappedSimpleTypesBooleanTest_Compile @@ -21,8 +28,8 @@ def __dafnystr__(self) -> str: return "_module._default" @staticmethod def Test____Main____(noArgsParameter__): - d_12_success_: bool - d_12_success_ = True + d_85_success_: bool + d_85_success_ = True _dafny.print(_dafny.string_of(_dafny.Seq("SimpleBooleanImplTest.GetBooleanTrue: "))) try: if True: @@ -30,12 +37,12 @@ def Test____Main____(noArgsParameter__): if True: _dafny.print(_dafny.string_of(_dafny.Seq("PASSED\n"))) except _dafny.HaltException as e: - d_13_haltMessage_ = e.message + d_86_haltMessage_ = e.message if True: _dafny.print(_dafny.string_of(_dafny.Seq("FAILED\n "))) - _dafny.print(_dafny.string_of(d_13_haltMessage_)) + _dafny.print(_dafny.string_of(d_86_haltMessage_)) _dafny.print(_dafny.string_of(_dafny.Seq("\n"))) - d_12_success_ = False + d_85_success_ = False _dafny.print(_dafny.string_of(_dafny.Seq("SimpleBooleanImplTest.GetBooleanFalse: "))) try: if True: @@ -43,12 +50,12 @@ def Test____Main____(noArgsParameter__): if True: _dafny.print(_dafny.string_of(_dafny.Seq("PASSED\n"))) except _dafny.HaltException as e: - d_14_haltMessage_ = e.message + d_87_haltMessage_ = e.message if True: _dafny.print(_dafny.string_of(_dafny.Seq("FAILED\n "))) - _dafny.print(_dafny.string_of(d_14_haltMessage_)) + _dafny.print(_dafny.string_of(d_87_haltMessage_)) _dafny.print(_dafny.string_of(_dafny.Seq("\n"))) - d_12_success_ = False + d_85_success_ = False _dafny.print(_dafny.string_of(_dafny.Seq("WrappedSimpleTypesBooleanTest.GetBooleanTrue: "))) try: if True: @@ -56,12 +63,12 @@ def Test____Main____(noArgsParameter__): if True: _dafny.print(_dafny.string_of(_dafny.Seq("PASSED\n"))) except _dafny.HaltException as e: - d_15_haltMessage_ = e.message + d_88_haltMessage_ = e.message if True: _dafny.print(_dafny.string_of(_dafny.Seq("FAILED\n "))) - _dafny.print(_dafny.string_of(d_15_haltMessage_)) + _dafny.print(_dafny.string_of(d_88_haltMessage_)) _dafny.print(_dafny.string_of(_dafny.Seq("\n"))) - d_12_success_ = False + d_85_success_ = False _dafny.print(_dafny.string_of(_dafny.Seq("WrappedSimpleTypesBooleanTest.GetBooleanFalse: "))) try: if True: @@ -69,12 +76,12 @@ def Test____Main____(noArgsParameter__): if True: _dafny.print(_dafny.string_of(_dafny.Seq("PASSED\n"))) except _dafny.HaltException as e: - d_16_haltMessage_ = e.message + d_89_haltMessage_ = e.message if True: _dafny.print(_dafny.string_of(_dafny.Seq("FAILED\n "))) - _dafny.print(_dafny.string_of(d_16_haltMessage_)) + _dafny.print(_dafny.string_of(d_89_haltMessage_)) _dafny.print(_dafny.string_of(_dafny.Seq("\n"))) - d_12_success_ = False - if not(d_12_success_): + d_85_success_ = False + if not(d_85_success_): raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(3,0): " + _dafny.string_of(_dafny.Seq("Test failures occurred: see above.\n"))) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/simple/types/boolean/internaldafny/__pycache__/impl.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/simple/types/boolean/internaldafny/__pycache__/impl.cpython-311.pyc index c17025cb70c9546ee4f52ec15a93f5b69d2fd285..3fb6a85ad636ba979396094f745f7c3480f5f41d 100644 GIT binary patch delta 469 zcmeyb@LiF2IWI340}%Ml?M}Hnkyn!O-$eD8dfpU<6viCBC_XUFAH@%*1)>DNv|yAF zm==x_PGLP|W1T(8S2Z;Lec3*20j&o+^|j3K9o_EHMZTWQoIB2w4f3*fM4Y zhSfl<1QCdm1RKWzG>&r_(2~_)i$HQwQk!`gbC?)~Cs#5*Vicbo!_vnnx%o8<4-=!z z5X* zXgJxD*F#8Lx`XE~pWGEb-4!_(`K+(-Sx=tK8^@?V`4ew1qx9qkzA)z^d7$ODWP?i* z^HLIvQhYL#iV}+|<8wnj^Gf2K^K%O_b5d`Kqf5giSVBYGEGA#$Go38J@5|){G>Q?3 xiw!5I^Ore`UtoZu8w@HJVCV*e+yxlA!NA=BhBp}WFTl_Z289bSH2FV&0{~+ecYgo? delta 314 zcmeya_+No{IWI340}xa{??~yI$ScYCY@&LMC|?Rg3S$m`6hD|2h!RL)O%|0%XCY)oVPeae85mXrF$6@3F)_F^q;Rw_q;M`{0?Gg}R7QNW3S$lv zqrl{e%#RpFCYP}EF^X+wX60dGl$8{AW$Y*th&ua1--Z(~; z$=rOsj1rS)@`W+o(wO{?S$T3ezW}5Bm1Ydr;XYWlxj`lwGGPb;O-tE!i%ePucT=1a zLB}Y_`?{jANyf6#&gabF+2C1_dVx% z?s?wxoKu*<%UNEl)+_WuPP1jdG4?FGm zsYbe_fx&CMRQego<t^wNEf zK18Kj-jPH|s(GBZfpx~;u0t?4aL1!vv~QJ4XWX~YNY`3JrM(=~MW~nZuX)xmY@n~y z18AYfs!z~%NB%^>Oc%Uc&@M|bUlPs6e&6pvx3RPOXrv4I_kzelz?Xf(`k3D0F(Qs4sN?aIGe~6vPWmLPs}8a%_fc&6@f3t1w}cIjqDGRwhF9|^@~*>+sl3x zV0@8_|M&m@_wuPrs;?K$IJ3UNrVYLMiX={6r`!H9N~w-m{!uB3A6$`9Lehx;GP6-#5`kYc-Sn6}i-6!Q|1UEL^^)GvORn!0g delta 1161 zcmZ9KZA@EL7{~AbK+9-op>LGFj`Ffni%5qI-GIS#vN_#!Lq}$-z%E@w)Ql2~_KNtCMP*&ESN zg#=|Bm=~C$yu=#K}oz!CI$O zTwJN5emLnnIGirYyqx(|K35G1&yYg1@Q13T;^#`Bz{f3>^<1e|-L#uU%^peWIH~94 zG>dq>k~DAj~kfgZIzf{=9iz!pbPueARKH0lm# z5@@37%0JLdf4A3~cJhdO%; zkf585%Qz(VrTpEc7?59LZCcNeqGWu&wdo`e(@LHx75(h1*x+Jp zG?yA%OdY)*8()l#=M}-%Vs2vUcSV`R4t84%``PN+z|}q$W4FXxoXI8ee^dUS&gZ55 zOtXsuea~#yH2v94CBSQRXN!|wX{$CqFUlE^H+a467AEBlp5RauVO$)ix1YU!Ft5NM zYAT3&&HY~h(-&4Z!#vLu!c6mtFT4g?jD?{Yu$d+yBvypNnfIs?o8Q= O;>!K^=r3$*F8T*n1UTdX diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/simple/types/boolean/internaldafny/__pycache__/wrapped.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/simple/types/boolean/internaldafny/__pycache__/wrapped.cpython-311.pyc index 8b27ca57276d572e92f526e431eba18d45479c20..ba20cabedcbfab0c11425073314e8de68c2af2a7 100644 GIT binary patch delta 364 zcmZ3^w?Tk!IWI340}%Ml?M|^`p2#P`cwnM>iYZ?TLkeRKe-uBM7Kjo6(}Gb#U|Kjz z7)*;m`Jz#xDXght6DO!Lif`O@h>=lrawXGtMv2Xa%#MtVQj?2W`WQtfGqIL1N=zKnO6dr7Dtzc>0=2E zakH5GhE-qomSk{dZb43}Q+|Fy2-$ F0szS}aOwa6 delta 128 zcmdlWu$+%?IWI340}w>M>_};5n#d=?IANlC3M+pKYpTG+1FDRI8=oCwWE7aZl4(1m z@a9BjM@B}`$%|R~82Kj~v6e6jO bool: class Error_CollectionOfErrors(Error, NamedTuple('CollectionOfErrors', [('list', Any), ('message', Any)])): def __dafnystr__(self) -> str: - return f'simple.types.boolean.internaldafny.types_Compile.Error.CollectionOfErrors({_dafny.string_of(self.list)}, {self.message.VerbatimString(True)})' + return f'simple.types.boolean.internaldafny.types_Compile.Error.CollectionOfErrors({_dafny.string_of(self.list)}, {_dafny.string_of(self.message)})' def __eq__(self, __o: object) -> bool: return isinstance(__o, simple.types.boolean.internaldafny.types.Error_CollectionOfErrors) and self.list == __o.list and self.message == __o.message def __hash__(self) -> int: diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/simple/types/boolean/internaldafny/wrapped.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/simple/types/boolean/internaldafny/wrapped.py index a26fd2c2c6..195cb04b03 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/simple/types/boolean/internaldafny/wrapped.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/simple/types/boolean/internaldafny/wrapped.py @@ -6,9 +6,14 @@ import module_ import _dafny import System_ -import SimpleBooleanImplTest_Compile - +import Wrappers_Compile +import StandardLibrary_mUInt_Compile +import StandardLibrary_Compile +import UTF8 import simple.types.boolean.internaldafny.types +import SimpleBooleanImpl_Compile +import simple.types.boolean.internaldafny.impl +import SimpleBooleanImplTest_Compile assert "simple.types.boolean.internaldafny.wrapped" == __name__ diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/Extern.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/extern/Extern.py similarity index 84% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/Extern.py rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/extern/Extern.py index 09d5af2e5e..90540eacbe 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/Extern.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/extern/Extern.py @@ -8,8 +8,8 @@ import System_ import SimpleBooleanImplTest_Compile import simple.types.boolean.internaldafny.types -from python_client_codegen.simple_boolean.client import SimpleBoolean -from Shim import SimpleBooleanShim +from smithy_generated.simple_boolean.client import SimpleBoolean +from .Shim import SimpleBooleanShim import Wrappers_Compile @staticmethod diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/Shim.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/extern/Shim.py similarity index 100% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/Shim.py rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/extern/Shim.py diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/extern/__pycache__/Extern.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/extern/__pycache__/Extern.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6fb27d85817f75fccaf258122694de33d4ec8dd1 GIT binary patch literal 1400 zcmah{&2QX96d$j>pI&d8W;ZRQAOuyFt*W(z;1W;;v>bY94r~C)7t6ILS*J6$H8ZPX zDV6q+8-GAKaNtxxz44bgXb;wiN|8AA7Raq9-psC-E*EB=-{-tH^L~CmJ5C3|`u)f6 zqu*)>{i%#)#__evaeRHHy|vQbUTHg(=5JS8WQ@_U{YshpLrb>q1%w2T2$tsONiLfQd4|6U znC$Ea6h{ZsjNqXm>xU#wnNq@Zng~#waZDlhMVb;EB(Dr82j0y!?|2f^P(`X`f}+05 zV_?tF33_UXH{vJ8bFf~lJWp#vonEe!+JB;^s8=zBj#np7%=L57t^u90HXLR)FnQ%$ z7GxP_+`pI7EQa2DUtvBa!XHn=5OWT=G{Q7FjE`jRi9Q?oOWRUyzu_e@P6W50?0c|Y zPu;IM6n4opq+ygM?tRQ3i!^her0j74Cfr@%rogZCC9*C9 zykiRPEEf|f$XV#(?*wLv`=u76ESLR7N6{MmtPii+fRBF&Y=+JUJG1?l_Vpj$J+pV` z_U`Qd%fYRm#M$7^d~ioacINi&U+$jSdvklQu=Xw?3k`2bljmGEM4rXT5mPWT)h<)u zvj#9}(LhXCQ>pD3UM65DIBO}pNz-UburC{a6dbAn8|PeL>dSZ5-ueJgRdB5S$S&9O zHG*p~A3a)(*(gp_;{nmN7BSgaoRqgXjm0GQk8pxnAaFEV1pF#F)c;D)fwa_Y>S`E(b%lBYYUB;qiY(YyidB7O>Z?PZzD6`dQ-Ma?okxj?}FGEuE}dSl_}qK8Ic%o?ZNIqJ{R`*U=Ajy{^B2Zbh$ F$v+GChq3?w literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/__pycache__/Shim.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/extern/__pycache__/Shim.cpython-311.pyc similarity index 72% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/dafny_generated/__pycache__/Shim.cpython-311.pyc rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/extern/__pycache__/Shim.cpython-311.pyc index 2dc8802a323c5191f14b6c481dd3b10a3fc3b5f8..3cc3a3e3cc8ebefbd027f61f94f0c9597d3ba885 100644 GIT binary patch delta 153 zcmX>sxIvJ2IWI340}$j+?M`Xj$a|TQv3T-B##FY{ijvf#yv?CZpI8LdigPndGAiTK xQ}a@b5=&B3CdabdVG-TP-soU=fdMlM KsAzILM<4*>ygf$% diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/__pycache__/__init__.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index a6241e1a7098a8ad51e57ec1f478561e59aa54a4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 258 zcmXv}v5EpQ5KR=A-3A=S_e&rGniyTl0~+(@(aXIIPSar0YPl6oIQ4@ zc=O&H<}vd-nT#3L>wM8))bEYxinruBBywY#6>P>ge=PP$KbztEDz*t?61GxKY4l6kHy6UJk(I|U-3tsTa25GAC%Mh!NJ!nk0etOIm>iD+TxMXY=_j_gq90|ln2S}K(_ w;ImW|@dGsZ&yf3eQA*=YmU15I_vqW9t}HC#fUa!*NK=AGpL70T9mGC)A3^F(N&o-= diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/__pycache__/client.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/__pycache__/client.cpython-311.pyc deleted file mode 100644 index ab7eea82ef162f7f96c3726285b04f5d523e5556..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 12721 zcmds7TWlLwdOkyPcoQj(c+*`P-Rvl~sQ4~9wz6_;OTI)_)^cn!@iH_ylqvJJGb1~4 zsnpFHTRr$ei)I@a#R3AlPQA#c^+O+AV7IV?0_&FoLtzXN1Pll$7U;gwNP-%RKJ-6l zhI1jMB#Ye^MGuGnoH^$||M}15|Ic^M%-?&xZUo_rAOB^tc>zY^%5?Z^qMN{Az})INywCG9>1hTPkqx z#QBOX5f{YYVGV{Y75kg{Tq-?ZvCn1}=hHb56pjfTpN?nJx476mC&sSk^BFFVb3Erc z{zf{%o#6RA4`qE*oOn#hJ(VjgiWNprIJYQ53KZ(q(+E?n?ipD6^dzO2fk%@QIG@fI zGMrl9o0&A1!{XawNp5R>EtRHIIg#TNTtUq96~EyD+AMM(h%*&h(c7-nl2E!>p+5ED z%a5S%KS3OdQb`oGB&n!1=}%fYThemNfnZK?G-q$uN-C)-m}z(Ds3RFj+B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?QiN_8ptEKpFQ$~W4&W2x9r zz{iMuPJczH_>(MFWG5!r$Nb)TMDcnP{0(@7wF(K>fWn4_qF|t?4hgjzud?|OvdZXy z^lcZGG$5h=#;c4*B=c29tYp5ntD%fClKCp5ykx%0Xi73)Wwb{!Uu85aZFOxT?``ti xboy2ttB#VhO?I~3rpqp7rFFHfb9YWriIv0_RwXrGm_Sx{m9HL zu5LaA+CvY47UE;+!KI{sj08TIIR$#kO~F0o)Hkz|ZIwVrZ=Zhi-t7CH{iEIX5v;+J zAIV1!LVxScV%6s0{C5D)&>kX)SPZ3BXjvND%ub!qN!`#*Yhf+*LeIz@Ru3D*B{kMe z{m@TaVaq}`q89P~s-IX0J%^`SHoA{U;|U_o6C334ROv?;ygs%)=RDHTB=E~#4*D{bY11#%f_m)gBin*7*);PaY65~1PfK$%aS~M z@KQ(9wbkl*7` z2BcEKl4A+U1%sRi50kWDbe@{;2e7sa%yAkdnWQ|Xh0M9w4t7U0V2O}HK3LLh1&5;~ z9tD`wV3g+vB9J32%{GRzQesS!k|)^^R5YMJ(6}`2!4eKQeOyu@drPi4m3$lt331Zl zxN>e}!9r$YPlPD7*-9nz1Dc5dXC#R86gmPbr4IFVF}ITpXgk-`t>jUJwdtXvocO&l4t$TsW^~% z(Lc=jLBViL`$f*iY0isLe;11Ubq+-k{mP^s^#z`{zt77|CMk%Eu^fRx!Q(lMV&giB z!Nib)#-tF#P;5(0(~-h6M=cVb+qyH zv`_uKUBk!l?1Z@FL J4F_OS{ujE8!8rf` diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/__pycache__/deserialize.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/__pycache__/deserialize.cpython-311.pyc deleted file mode 100644 index 824ed1002ab32142e098624843c9d1dd1f774dd1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 817 zcmZ`%O^eh(5be$+J#piRA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Models/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/deserialize.py deleted file mode 100644 index f8cb771fa7..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/deserialize.py +++ /dev/null @@ -1,11 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -#from Dafny.Path.To.Dafny.Code. import SimpleBooleanHardCoded as _SimpleBooleanHardCoded -from simple.types.boolean.internaldafny.types import GetBooleanOutput_GetBooleanOutput as DafnyGetBooleanOutput - -from .config import Config -from .models import GetBooleanOutput - - -async def _deserialize_get_boolean(input: DafnyGetBooleanOutput, config: Config) -> GetBooleanOutput: - return GetBooleanOutput(value=input.value.value) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/Iamaredme b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/Iamaredme new file mode 100644 index 0000000000..63b8568325 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/Iamaredme @@ -0,0 +1,3 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +yo diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/README.md b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/README.md similarity index 100% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/README.md rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/README.md diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/plugin b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/plugin new file mode 100644 index 0000000000..63b8568325 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/plugin @@ -0,0 +1,3 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +yo diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/pyproject.toml b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/pyproject.toml similarity index 100% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/pyproject.toml rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/pyproject.toml diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/__init__.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/__init__.py similarity index 100% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/__init__.py rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/__init__.py diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/__pycache__/__init__.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a1e226a22480ed7d8e79029b7b4bcc4e0e0261e5 GIT binary patch literal 253 zcmXv}u}%Xq3{9v&2&v*bSnvi*#ei60X_=$rVsTNEII?p>`34p?CT7HU@dK5*b;5^w zZ+L!w*0b#I+n+_|VRbEXzx| z-mFmwsL^VHY~!K`prY&4L6SB<`ojfwi#TYp-tC_uF@}f%3>YW^bpO#vf*Sj)=iVXb zK}ks#yDf^2N0)c*^W1aKIrlqf#((eix)5CZ-v9G-a1x>azz_AyQpRoHxo(`sMtYh;wX*=tjv!xx-&IPU98(KM8 z59?+vS52&!^=UKAnY4V`1#SGbHndi5XoG3Bv-F%N?Y?V?H~lZo<$<{Z--$jia4-lf zrCA^ApR;JI&~j-X8v+iQSYO(tZ$b9Kj_Z`(b?$3D=Uiz&P!djm=U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493c4kZr}0GPUJ{3)7$Kv_>w&%+&CEX+#kfz0N% z``=qzcsM8SyChz@DGuJ0+Lolqt*TvV;6Q=CwWAMT5l7F9vzNub%Tm*os#B?RVZOMP zya&13?;l;;C+;{cPUpmVp)@Us?SkZ7sCtzaXtSRq<~D2d^GI}a8mv%>If*IQC+?XQ zFD{5Ti=~T2v9BmKEm!Th-m&$}PF##Dv-N~fX_)ZRo25N(ir+5+hJDR+#PkB8 zKcSA8;Hm$J=_`Z+M@>~b?gK>7RVU7&EfPg}u-;4$^~?4ozm!j93gi_TcM5A0MtQOg zUTfkA08vq*tT@!CcfRW7f*tF(cQgO6c#W(%Vs<)c1gyU4p)Vt5vD#WtK^WAr=6LB%{yaChJl z4mHI8C8XfpP!#MY6%|pd{;n7wp{j!Rir;oWN4=u)uA0mg$ilZL4n!Rg(YXGuptIs; zcLkjiH@lys9&xj~f<{H-T|ta!yti6i1r3YF8@T19SM00ylA}d(wA`^);IVnNrR0oC Z&gdOm)snJOAmf{-FG%@UThx*b`)`AZz(D{2 literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/__pycache__/config.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/__pycache__/config.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bea34930e54a48b55f810973988ab02cfb85142c GIT binary patch literal 1818 zcmah}&2QX96d!xN-d$%u^0Cka(#oJ#%F+-^1&R_yNF|Y~2pTFjk&uP3T+i&T6@PWc zCYaM6I3OXR+?oqgPNAs$AsoF@4lAE3IQ6zwIQ7IEdpF7QA!eW7{^q?mGw*BW=UPoc zFz){J1O8A#=np=b40#OBe+Tdc?IVn^;2>Af1%YGH5#54ba3x)Gi+a(Obvct4oRVAC z%NdrOimT{KhKtUOTh*(8Wn6MpA``iaQWBD zsesTk`0^p5`v@!FAv|*`f*ihloWkF;$pq8@1{$ z_==X0R zGHEPR$jpVTn9CqFaw>26UdQg5OW<}6BZvdyS35pcr{Y%>6~;zjQqxuK%M`E;b+1QM z$7Z4GccwI}>S52eda6l@+VlMbriMK;%%&D(p5Sat98ufrf{Li*8)8M-@vxJrQt~(= zEL@v9n(}lTY@F}>@JyyoWSQ?aV-eprSB3ro@tA6QShai?vJa~4@LY|FW5#Uy9A5j4 z%w{*OUX3@cPrHyx+_Y6q%ZA~ZE-{Q$F$~wok;8G-Fdj#yGuD(01N)X?&^ah>D)FqP z3r3sJuWgH5X{@wi7^dg>VO9+W3+7<~<=2`na8?HP3pxjmUj3-;GeVi>M3!q|-_y1U zI|%(iJM`&6;FuQC0^f;Up9Vc`4>J0|hlrV$*O#~c1dm%*qmdWdE{KCT?7@bNS{ifh zuooL$;t}5KSYz4sFdpUiL$k70S_@)2%N^vb4j;q7`d5ACDBgCyer|mC9ipK=~;=jEELF<4+=mON7#uJf<};A#80N*;-b8 z&vdZa@#0*UL8=Sq#Sr+bfK(ET1dAEH;Z^4wmK&%dYR1gGVBqQPN1ike)8lpSN|Iu@_lT6bP zZ6?z+L>tL8Jx3oT|3=`*wdLbao;H&8o!{O|9=4N}_Sy2@+3WiWS{MpSf9dG`L|7aM zi)X^(NURC(j?h2ZOD_A9vzG-VE?tJ`$~dVfd&}|kmc(y Dc{>pu literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/__pycache__/deserialize.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/__pycache__/deserialize.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8119d1f0996c27c5bf665878ee4160310ec0b129 GIT binary patch literal 823 zcmZ`$y^9k;6rb5-C)qnAf+&6!5iE>F26JE`a)KUMh-Y!JNfXwcm& zW+7}2rt1ja5kUl%B%%X{65)uNtVQ)fy~1_rMr^l&9z>A2vxyAc$G*&<<0v~5wTcRH!{R0? zZTq&{`)~OJ4N7yF1yLZ9m~VjIF-gjwBx)y>egHg8WF93d9rHeDb1xAfHQx%OR6;*b zVS(op;wpuGeW}FYVAqM3e5L{QshYx2{%Gd$$L zQ)ZE3kvTI2v^f)qe8^hBFE4>LhOM zo9O4LCN)awggMlikfT(S(DMa3cX<6Imx}+Ft+7^IxoOL+eLr29qAx0Yq^kJ+1#Vm3 A5dZ)H literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/__pycache__/errors.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/__pycache__/errors.cpython-311.pyc similarity index 78% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/__pycache__/errors.cpython-311.pyc rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/__pycache__/errors.cpython-311.pyc index 8db3ffb1a5be8bd2eaa1f3b87a570cd549894b34..dfb11b43caa76dfa741817f56bd9ad372f04aaa3 100644 GIT binary patch delta 48 zcmZ3?H;<2dIWI340}z7a#Rc_*7Nf8~xs zsvre~!dro^&eGMbk^i87g$!sA2xRJ%O@T9I>U&30wxS^D@%Zua-n--Xy?e*MR#vJ6 z+NXd1&i>X2`4?Y`R?dy97>qN*2%|m;Xom(`N27#ktmKyhy`w8z_sfCNF~BZ!+SQnG zs&^JN@*QCdr-W6`Vf80)XRT9Fo<;Cfxqe;(AKbZbku4n%bNLyCcT-D^yHVKnj#A?X zzjx$?&oIiQ>B^5h5&eTiI0--MU(j^zAn=moz8e1a7njG07lomB^r4|&tdcl+*x}>>?!SJp%^7(E=n(ai~#*oTVVcx=<0zN#6JHzihS;b zcYTkCiCIo}r5bJ}{g}(v&zZO7g$Wm-<1?ol_FEVsmSCAwM>DS*WuZH*2~2}6 z^E{ZEScG^rNh0rN^W`7bJ;{Z%{GJ=QEDEh}xI9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], - deserialize: Callable[[DafnyGetBooleanOutput, Config], Awaitable[Output]], + serialize: Callable[[Input, Config], Awaitable[GetBooleanOutput_GetBooleanOutput]], + deserialize: Callable[[GetBooleanInput_GetBooleanInput, Config], Awaitable[Output]], config: Config, ) -> Output: context: InterceptorContext[Input, None, None, None] = InterceptorContext( @@ -100,7 +102,7 @@ async def _handle_execution( ) _client_interceptors = config.interceptors or [] client_interceptors = cast( - list[Interceptor[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput]], _client_interceptors + list[Interceptor[Input, Output, GetBooleanOutput_GetBooleanOutput, GetBooleanInput_GetBooleanInput]], _client_interceptors ) interceptors = client_interceptors @@ -116,7 +118,7 @@ async def _handle_execution( _client_interceptors = config.interceptors or [] interceptors = cast( - list[Interceptor[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput]], + list[Interceptor[Input, Output, GetBooleanOutput_GetBooleanOutput, GetBooleanInput_GetBooleanInput]], _client_interceptors, ) @@ -136,7 +138,7 @@ async def _handle_execution( # Step 4: Serialize the request context_with_transport_request = cast( - InterceptorContext[Input, None, DafnyGetBooleanInput, None], context + InterceptorContext[Input, None, GetBooleanOutput_GetBooleanOutput, None], context ) context_with_transport_request._transport_request = await serialize( context_with_transport_request.request, config @@ -155,11 +157,10 @@ async def _handle_execution( # Step 7: Acquire the retry token. retry_strategy = config.retry_strategy if retry_strategy is None: - # raise ServiceError( - # "No retry_strategy found on the operation config." - # ) - pass - retry_token = None # retry_strategy.acquire_initial_retry_token() + raise ServiceError( + "No retry_strategy found on the operation config." + ) + retry_token = retry_strategy.acquire_initial_retry_token() while True: # Make an attempt, creating a copy of the context so we don't pass @@ -182,11 +183,20 @@ async def _handle_execution( if isinstance(context_with_response.response, Exception): # Step 7u: Reacquire retry token if the attempt failed - raise context_with_response.response - + try: + retry_token = retry_strategy.refresh_retry_token_for_retry( + token_to_renew=retry_token, + error_info=RetryErrorInfo( + # TODO: Determine the error type. + error_type=RetryErrorType.CLIENT_ERROR, + ) + ) + except SmithyRetryException: + raise context_with_response.response + await sleep(retry_token.retry_delay) else: # Step 8: Invoke record_success - # retry_strategy.record_success(token=retry_token) + retry_strategy.record_success(token=retry_token) break except Exception as e: if context.response is not None: @@ -198,17 +208,17 @@ async def _handle_execution( # The response will be set either with the modeled output or an exception. The # transport_request and transport_response may be set or None. execution_context = cast( - InterceptorContext[Input, Output, DafnyGetBooleanInput | None, DafnyGetBooleanOutput | None], context + InterceptorContext[Input, Output, GetBooleanOutput_GetBooleanOutput | None, GetBooleanInput_GetBooleanInput | None], context ) return await self._finalize_execution(interceptors, execution_context) async def _handle_attempt( self, - deserialize: Callable[[DafnyGetBooleanOutput, Config], Awaitable[Output]], - interceptors: list[Interceptor[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput]], - context: InterceptorContext[Input, None, DafnyGetBooleanInput, None], + deserialize: Callable[[GetBooleanInput_GetBooleanInput, Config], Awaitable[Output]], + interceptors: list[Interceptor[Input, Output, GetBooleanOutput_GetBooleanOutput, GetBooleanInput_GetBooleanInput]], + context: InterceptorContext[Input, None, GetBooleanOutput_GetBooleanOutput, None], config: Config, - ) -> InterceptorContext[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput | None]: + ) -> InterceptorContext[Input, Output, GetBooleanOutput_GetBooleanOutput, GetBooleanInput_GetBooleanInput | None]: try: # assert config.interceptors is not None # Step 7a: Invoke read_before_attempt @@ -250,10 +260,10 @@ async def _handle_attempt( raise Exception("No impl found on the operation config.") context_with_response = cast( - InterceptorContext[Input, None, DafnyGetBooleanInput, DafnyGetBooleanOutput], context + InterceptorContext[Input, None, GetBooleanInput_GetBooleanInput, GetBooleanOutput_GetBooleanOutput], context ) - print(f"\ntransport_request is {context_with_response.transport_request}") + print(f"transport_request is {context_with_response.transport_request}") context_with_response._transport_response = config.impl.GetBoolean( input=context_with_response.transport_request @@ -275,7 +285,7 @@ async def _handle_attempt( # Step 7q: deserialize context_with_output = cast( - InterceptorContext[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput], + InterceptorContext[Input, Output, GetBooleanOutput_GetBooleanOutput, GetBooleanInput_GetBooleanInput], context_with_response, ) context_with_output._response = await deserialize( @@ -296,15 +306,15 @@ async def _handle_attempt( # None. This will also be true after _finalize_attempt because there is no opportunity # there to set the transport_response. attempt_context = cast( - InterceptorContext[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput | None], context + InterceptorContext[Input, Output, GetBooleanOutput_GetBooleanOutput, GetBooleanInput_GetBooleanInput | None], context ) return await self._finalize_attempt(interceptors, attempt_context) async def _finalize_attempt( self, - interceptors: list[Interceptor[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput]], - context: InterceptorContext[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput | None], - ) -> InterceptorContext[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput | None]: + interceptors: list[Interceptor[Input, Output, GetBooleanOutput_GetBooleanOutput, GetBooleanInput_GetBooleanInput]], + context: InterceptorContext[Input, Output, GetBooleanOutput_GetBooleanOutput, GetBooleanInput_GetBooleanInput | None], + ) -> InterceptorContext[Input, Output, GetBooleanOutput_GetBooleanOutput, GetBooleanInput_GetBooleanInput | None]: # Step 7s: Invoke modify_before_attempt_completion try: for interceptor in interceptors: @@ -331,8 +341,8 @@ async def _finalize_attempt( async def _finalize_execution( self, - interceptors: list[Interceptor[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput]], - context: InterceptorContext[Input, Output, DafnyGetBooleanInput | None, DafnyGetBooleanOutput | None], + interceptors: list[Interceptor[Input, Output, GetBooleanOutput_GetBooleanOutput, GetBooleanInput_GetBooleanInput]], + context: InterceptorContext[Input, Output, GetBooleanOutput_GetBooleanOutput | None, GetBooleanInput_GetBooleanInput | None], ) -> Output: try: # Step 9: Invoke modify_before_completion diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/config.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/config.py similarity index 60% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/config.py rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/config.py index 4ecd715335..b577e5b226 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/config.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/config.py @@ -3,11 +3,14 @@ from dataclasses import dataclass from typing import Any, Callable, TypeAlias, Union -import simple.types.boolean.internaldafny.impl +from simple.types.boolean.internaldafny.types import ISimpleBooleanClient +from smithy_python.interfaces.interceptor import Interceptor +from smithy_python.interfaces.retries import RetryStrategy from .models import GetBooleanInput, GetBooleanOutput +_ServiceInterceptor = Union[Interceptor[GetBooleanInput, GetBooleanOutput, Any, Any]] @dataclass(kw_only=True) class Config: """Configuration for SimpleBoolean @@ -20,9 +23,9 @@ class Config: :param impl: """ - interceptors: list[None] - retry_strategy: None - impl: simple.types.boolean.internaldafny.impl.SimpleBooleanClient + interceptors: list[_ServiceInterceptor] | None = None + retry_strategy: RetryStrategy | None = None + impl: ISimpleBooleanClient | None = None # A callable that allows customizing the config object on each request. Plugin: TypeAlias = Callable[[Config], None] diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/deserialize.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/deserialize.py new file mode 100644 index 0000000000..e7605bc689 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/deserialize.py @@ -0,0 +1,13 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +from simple.types.boolean.internaldafny.types import ( + GetBooleanOutput_GetBooleanOutput as DafnyGetBooleanOutput, +) + +from .config import Config +from .models import GetBooleanOutput + + +async def _deserialize_get_boolean(input: DafnyGetBooleanOutput, config: Config) -> GetBooleanOutput: + + return GetBooleanOutput(value=input.value.value) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/endpoints.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/endpoints.py similarity index 100% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/endpoints.py rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/endpoints.py diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/errors.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/errors.py similarity index 100% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/errors.py rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/errors.py diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/models.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/models.py similarity index 100% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/models.py rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/models.py diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/plugin.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/plugin.py new file mode 100644 index 0000000000..13aeed05f5 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/plugin.py @@ -0,0 +1,20 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +from .config import Config, Plugin +from smithy_python.interfaces.retries import RetryStrategy +from smithy_python.exceptions import SmithyRetryException + +def set_config_impl(config: Config): + from simple.types.boolean.internaldafny.impl import SimpleBooleanClient + config.impl = SimpleBooleanClient() + config.retry_strategy = NoRetriesStrategy() + +class NoRetriesToken: + retry_delay = 0 + +class NoRetriesStrategy(RetryStrategy): + def acquire_initial_retry_token(self): + return NoRetriesToken() + + def refresh_retry_token_for_retry(self, token_to_renew, error_info): + raise SmithyRetryException() diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/serialize.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/serialize.py similarity index 57% rename from TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/serialize.py rename to TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/serialize.py index 19b8a7f32a..8042bf43ac 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/python_client_codegen/simple_boolean/serialize.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/serialize.py @@ -1,7 +1,8 @@ # Code generated by smithy-python-codegen DO NOT EDIT. -#from Dafny.Path.To.Dafny.Code. import SimpleBooleanHardCoded as _SimpleBooleanHardCoded -from simple.types.boolean.internaldafny.types import GetBooleanInput_GetBooleanInput as DafnyGetBooleanInput +from simple.types.boolean.internaldafny.types import ( + GetBooleanInput_GetBooleanInput as DafnyGetBooleanInput, +) from .config import Config from .models import GetBooleanInput diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/SimpleBooleanImplTest_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/SimpleBooleanImplTest_Compile.py new file mode 100644 index 0000000000..6122fa753c --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/SimpleBooleanImplTest_Compile.py @@ -0,0 +1,77 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny +import System_ +import Wrappers_Compile +import StandardLibrary_mUInt_Compile +import StandardLibrary_Compile +import UTF8 +import simple.types.boolean.internaldafny.types +import SimpleBooleanImpl_Compile +import simple.types.boolean.internaldafny.impl + +assert "SimpleBooleanImplTest_Compile" == __name__ +SimpleBooleanImplTest_Compile = sys.modules[__name__] + +class default__: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "SimpleBooleanImplTest_Compile._default" + @staticmethod + def GetBooleanTrue(): + d_73_client_: simple.types.boolean.internaldafny.impl.SimpleBooleanClient + d_74_valueOrError0_: Wrappers_Compile.Result = None + out1_: Wrappers_Compile.Result + out1_ = simple.types.boolean.internaldafny.impl.default__.SimpleBoolean(simple.types.boolean.internaldafny.impl.default__.DefaultSimpleBooleanConfig()) + d_74_valueOrError0_ = out1_ + if not(not((d_74_valueOrError0_).IsFailure())): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(10,19): " + _dafny.string_of(d_74_valueOrError0_)) + d_73_client_ = (d_74_valueOrError0_).Extract() + SimpleBooleanImplTest_Compile.default__.TestGetBooleanTrue(d_73_client_) + + @staticmethod + def GetBooleanFalse(): + d_75_client_: simple.types.boolean.internaldafny.impl.SimpleBooleanClient + d_76_valueOrError0_: Wrappers_Compile.Result = None + out2_: Wrappers_Compile.Result + out2_ = simple.types.boolean.internaldafny.impl.default__.SimpleBoolean(simple.types.boolean.internaldafny.impl.default__.DefaultSimpleBooleanConfig()) + d_76_valueOrError0_ = out2_ + if not(not((d_76_valueOrError0_).IsFailure())): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(14,19): " + _dafny.string_of(d_76_valueOrError0_)) + d_75_client_ = (d_76_valueOrError0_).Extract() + SimpleBooleanImplTest_Compile.default__.TestGetBooleanFalse(d_75_client_) + + @staticmethod + def TestGetBooleanTrue(client): + d_77_ret_: simple.types.boolean.internaldafny.types.GetBooleanOutput + d_78_valueOrError0_: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(simple.types.boolean.internaldafny.types.GetBooleanOutput.default())() + out3_: Wrappers_Compile.Result + out3_ = (client).GetBoolean(simple.types.boolean.internaldafny.types.GetBooleanInput_GetBooleanInput(Wrappers_Compile.Option_Some(True))) + d_78_valueOrError0_ = out3_ + if not(not((d_78_valueOrError0_).IsFailure())): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(23,16): " + _dafny.string_of(d_78_valueOrError0_)) + d_77_ret_ = (d_78_valueOrError0_).Extract() + if not((((d_77_ret_).value).UnwrapOr(False)) == (True)): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(24,8): " + _dafny.string_of(_dafny.Seq("expectation violation"))) + _dafny.print(_dafny.string_of(d_77_ret_)) + + @staticmethod + def TestGetBooleanFalse(client): + d_79_ret_: simple.types.boolean.internaldafny.types.GetBooleanOutput + d_80_valueOrError0_: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(simple.types.boolean.internaldafny.types.GetBooleanOutput.default())() + out4_: Wrappers_Compile.Result + out4_ = (client).GetBoolean(simple.types.boolean.internaldafny.types.GetBooleanInput_GetBooleanInput(Wrappers_Compile.Option_Some(False))) + d_80_valueOrError0_ = out4_ + if not(not((d_80_valueOrError0_).IsFailure())): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(33,16): " + _dafny.string_of(d_80_valueOrError0_)) + d_79_ret_ = (d_80_valueOrError0_).Extract() + if not((((d_79_ret_).value).UnwrapOr(True)) == (False)): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(34,8): " + _dafny.string_of(_dafny.Seq("expectation violation"))) + _dafny.print(_dafny.string_of(d_79_ret_)) + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/SimpleBooleanImpl_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/SimpleBooleanImpl_Compile.py new file mode 100644 index 0000000000..6e45223897 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/SimpleBooleanImpl_Compile.py @@ -0,0 +1,62 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny +import System_ +import Wrappers_Compile +import StandardLibrary_mUInt_Compile +import StandardLibrary_Compile +import UTF8 +import simple.types.boolean.internaldafny.types + +assert "SimpleBooleanImpl_Compile" == __name__ +SimpleBooleanImpl_Compile = sys.modules[__name__] + +class Config: + @_dafny.classproperty + def AllSingletonConstructors(cls): + return [Config_Config()] + @classmethod + def default(cls, ): + return lambda: Config_Config() + def __ne__(self, __o: object) -> bool: + return not self.__eq__(__o) + @property + def is_Config(self) -> bool: + return isinstance(self, SimpleBooleanImpl_Compile.Config_Config) + +class Config_Config(Config, NamedTuple('Config', [])): + def __dafnystr__(self) -> str: + return f'SimpleBooleanImpl_Compile.Config.Config' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, SimpleBooleanImpl_Compile.Config_Config) + def __hash__(self) -> int: + return super().__hash__() + + +class default__: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "SimpleBooleanImpl_Compile._default" + @staticmethod + def GetBoolean(config, input): + output: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(simple.types.boolean.internaldafny.types.GetBooleanOutput.default())() + if not(((input).value).is_Some): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(17,4): " + _dafny.string_of(_dafny.Seq("expectation violation"))) + if not(((((input).value).value) == (True)) or ((((input).value).value) == (False))): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(19,4): " + _dafny.string_of(_dafny.Seq("expectation violation"))) + d_71_res_: simple.types.boolean.internaldafny.types.GetBooleanOutput + d_71_res_ = simple.types.boolean.internaldafny.types.GetBooleanOutput_GetBooleanOutput((input).value) + if not(((((d_71_res_).value).value) == (True)) or ((((d_71_res_).value).value) == (False))): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(22,4): " + _dafny.string_of(_dafny.Seq("expectation violation"))) + if not((((input).value).value) == (((d_71_res_).value).value)): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(24,4): " + _dafny.string_of(_dafny.Seq("expectation violation"))) + output = Wrappers_Compile.Result_Success(d_71_res_) + return output + return output + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/StandardLibrary_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/StandardLibrary_Compile.py new file mode 100644 index 0000000000..86ad05007f --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/StandardLibrary_Compile.py @@ -0,0 +1,193 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny +import System_ +import Wrappers_Compile +import StandardLibrary_mUInt_Compile + +assert "StandardLibrary_Compile" == __name__ +StandardLibrary_Compile = sys.modules[__name__] + +class default__: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "StandardLibrary_Compile._default" + @staticmethod + def Join(ss, joiner): + d_50___accumulator_ = _dafny.Seq([]) + while True: + with _dafny.label(): + if (len(ss)) == (1): + return (d_50___accumulator_) + ((ss)[0]) + elif True: + d_50___accumulator_ = (d_50___accumulator_) + (((ss)[0]) + (joiner)) + in0_ = _dafny.Seq((ss)[1::]) + in1_ = joiner + ss = in0_ + joiner = in1_ + raise _dafny.TailCall() + break + + @staticmethod + def Split(s, delim): + d_51___accumulator_ = _dafny.Seq([]) + while True: + with _dafny.label(): + d_52_i_ = StandardLibrary_Compile.default__.FindIndexMatching(s, delim, 0) + if (d_52_i_).is_Some: + d_51___accumulator_ = (d_51___accumulator_) + (_dafny.Seq([_dafny.Seq((s)[:(d_52_i_).value:])])) + in2_ = _dafny.Seq((s)[((d_52_i_).value) + (1)::]) + in3_ = delim + s = in2_ + delim = in3_ + raise _dafny.TailCall() + elif True: + return (d_51___accumulator_) + (_dafny.Seq([s])) + break + + @staticmethod + def SplitOnce(s, delim): + d_53_i_ = StandardLibrary_Compile.default__.FindIndexMatching(s, delim, 0) + return (_dafny.Seq((s)[:(d_53_i_).value:]), _dafny.Seq((s)[((d_53_i_).value) + (1)::])) + + @staticmethod + def SplitOnce_q(s, delim): + d_54_valueOrError0_ = StandardLibrary_Compile.default__.FindIndexMatching(s, delim, 0) + if (d_54_valueOrError0_).IsFailure(): + return (d_54_valueOrError0_).PropagateFailure() + elif True: + d_55_i_ = (d_54_valueOrError0_).Extract() + return Wrappers_Compile.Option_Some((_dafny.Seq((s)[:d_55_i_:]), _dafny.Seq((s)[(d_55_i_) + (1)::]))) + + @staticmethod + def FindIndexMatching(s, c, i): + def lambda0_(d_56_c_): + def lambda1_(d_57_x_): + return (d_57_x_) == (d_56_c_) + + return lambda1_ + + return StandardLibrary_Compile.default__.FindIndex(s, lambda0_(c), i) + + @staticmethod + def FindIndex(s, f, i): + while True: + with _dafny.label(): + if (i) == (len(s)): + return Wrappers_Compile.Option_None() + elif f((s)[i]): + return Wrappers_Compile.Option_Some(i) + elif True: + in4_ = s + in5_ = f + in6_ = (i) + (1) + s = in4_ + f = in5_ + i = in6_ + raise _dafny.TailCall() + break + + @staticmethod + def Filter(s, f): + d_58___accumulator_ = _dafny.Seq([]) + while True: + with _dafny.label(): + if (len(s)) == (0): + return (d_58___accumulator_) + (_dafny.Seq([])) + elif f((s)[0]): + d_58___accumulator_ = (d_58___accumulator_) + (_dafny.Seq([(s)[0]])) + in7_ = _dafny.Seq((s)[1::]) + in8_ = f + s = in7_ + f = in8_ + raise _dafny.TailCall() + elif True: + in9_ = _dafny.Seq((s)[1::]) + in10_ = f + s = in9_ + f = in10_ + raise _dafny.TailCall() + break + + @staticmethod + def Min(a, b): + if (a) < (b): + return a + elif True: + return b + + @staticmethod + def Fill(value, n): + return _dafny.Seq([value for d_59___v0_ in range(n)]) + + @staticmethod + def SeqToArray(s): + a: _dafny.Array = _dafny.Array(None, 0) + def lambda2_(d_60_s_): + def lambda3_(d_61_i_): + return (d_60_s_)[d_61_i_] + + return lambda3_ + + init0_ = lambda2_(s) + nw0_ = _dafny.Array(None, len(s)) + for i0_0_ in range(nw0_.length(0)): + nw0_[i0_0_] = init0_(i0_0_) + a = nw0_ + return a + + @staticmethod + def LexicographicLessOrEqual(a, b, less): + def lambda4_(exists_var_0_): + d_62_k_: int = exists_var_0_ + return (((0) <= (d_62_k_)) and ((d_62_k_) <= (len(a)))) and (StandardLibrary_Compile.default__.LexicographicLessOrEqualAux(a, b, less, d_62_k_)) + + return _dafny.quantifier(_dafny.IntegerRange(0, (len(a)) + (1)), False, lambda4_) + + @staticmethod + def LexicographicLessOrEqualAux(a, b, less, lengthOfCommonPrefix): + def lambda5_(forall_var_0_): + d_63_i_: int = forall_var_0_ + return not (((0) <= (d_63_i_)) and ((d_63_i_) < (lengthOfCommonPrefix))) or (((a)[d_63_i_]) == ((b)[d_63_i_])) + + return (((lengthOfCommonPrefix) <= (len(b))) and (_dafny.quantifier(_dafny.IntegerRange(0, lengthOfCommonPrefix), True, lambda5_))) and (((lengthOfCommonPrefix) == (len(a))) or (((lengthOfCommonPrefix) < (len(b))) and (less((a)[lengthOfCommonPrefix], (b)[lengthOfCommonPrefix])))) + + @staticmethod + def SetToOrderedSequence(s, less): + d_64___accumulator_ = _dafny.Seq([]) + while True: + with _dafny.label(): + pat_let_tv0_ = s + pat_let_tv1_ = less + if (s) == (_dafny.Set({})): + return (d_64___accumulator_) + (_dafny.Seq([])) + elif True: + def iife0_(_let_dummy_0): + d_65_a_: _dafny.Seq = None + with _dafny.label("_ASSIGN_SUCH_THAT_d_0"): + assign_such_that_0_: _dafny.Seq + for assign_such_that_0_ in (s).Elements: + d_65_a_ = assign_such_that_0_ + if ((d_65_a_) in (s)) and (StandardLibrary_Compile.default__.IsMinimum(d_65_a_, s, less)): + raise _dafny.Break("_ASSIGN_SUCH_THAT_d_0") + raise Exception("assign-such-that search produced no value (line 369)") + pass + return (_dafny.Seq([d_65_a_])) + (StandardLibrary_Compile.default__.SetToOrderedSequence((pat_let_tv0_) - (_dafny.Set({d_65_a_})), pat_let_tv1_)) + return iife0_(0) + + break + + @staticmethod + def IsMinimum(a, s, less): + def lambda6_(forall_var_1_): + d_66_z_: _dafny.Seq = forall_var_1_ + return not ((d_66_z_) in (s)) or (StandardLibrary_Compile.default__.LexicographicLessOrEqual(a, d_66_z_, less)) + + return ((a) in (s)) and (_dafny.quantifier((s).Elements, True, lambda6_)) + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/StandardLibrary_mUInt_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/StandardLibrary_mUInt_Compile.py new file mode 100644 index 0000000000..cd6f10f64a --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/StandardLibrary_mUInt_Compile.py @@ -0,0 +1,208 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny +import System_ +import Wrappers_Compile + +assert "StandardLibrary_mUInt_Compile" == __name__ +StandardLibrary_mUInt_Compile = sys.modules[__name__] + +class uint8: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return int(0) + +class uint16: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return int(0) + +class uint32: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return int(0) + +class uint64: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return int(0) + +class int32: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return int(0) + +class int64: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return int(0) + +class posInt64: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return 1 + +class seq16: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return _dafny.Seq({}) + +class seq32: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return _dafny.Seq({}) + +class seq64: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return _dafny.Seq({}) + +class default__: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "StandardLibrary.StandardLibrary_mUInt_Compile._default" + @staticmethod + def UInt8Less(a, b): + return (a) < (b) + + @staticmethod + def HasUint16Len(s): + return (len(s)) < ((StandardLibrary_mUInt_Compile.default__).UINT16__LIMIT) + + @staticmethod + def HasUint32Len(s): + return (len(s)) < ((StandardLibrary_mUInt_Compile.default__).UINT32__LIMIT) + + @staticmethod + def HasUint64Len(s): + return (len(s)) < ((StandardLibrary_mUInt_Compile.default__).UINT64__LIMIT) + + @staticmethod + def UInt16ToSeq(x): + d_16_b0_ = _dafny.euclidian_division(x, 256) + d_17_b1_ = _dafny.euclidian_modulus(x, 256) + return _dafny.Seq([d_16_b0_, d_17_b1_]) + + @staticmethod + def SeqToUInt16(s): + d_18_x0_ = ((s)[0]) * (256) + return (d_18_x0_) + ((s)[1]) + + @staticmethod + def UInt32ToSeq(x): + d_19_b0_ = _dafny.euclidian_division(x, 16777216) + d_20_x0_ = (x) - ((d_19_b0_) * (16777216)) + d_21_b1_ = _dafny.euclidian_division(d_20_x0_, 65536) + d_22_x1_ = (d_20_x0_) - ((d_21_b1_) * (65536)) + d_23_b2_ = _dafny.euclidian_division(d_22_x1_, 256) + d_24_b3_ = _dafny.euclidian_modulus(d_22_x1_, 256) + return _dafny.Seq([d_19_b0_, d_21_b1_, d_23_b2_, d_24_b3_]) + + @staticmethod + def SeqToUInt32(s): + d_25_x0_ = ((s)[0]) * (16777216) + d_26_x1_ = (d_25_x0_) + (((s)[1]) * (65536)) + d_27_x2_ = (d_26_x1_) + (((s)[2]) * (256)) + return (d_27_x2_) + ((s)[3]) + + @staticmethod + def UInt64ToSeq(x): + d_28_b0_ = _dafny.euclidian_division(x, 72057594037927936) + d_29_x0_ = (x) - ((d_28_b0_) * (72057594037927936)) + d_30_b1_ = _dafny.euclidian_division(d_29_x0_, 281474976710656) + d_31_x1_ = (d_29_x0_) - ((d_30_b1_) * (281474976710656)) + d_32_b2_ = _dafny.euclidian_division(d_31_x1_, 1099511627776) + d_33_x2_ = (d_31_x1_) - ((d_32_b2_) * (1099511627776)) + d_34_b3_ = _dafny.euclidian_division(d_33_x2_, 4294967296) + d_35_x3_ = (d_33_x2_) - ((d_34_b3_) * (4294967296)) + d_36_b4_ = _dafny.euclidian_division(d_35_x3_, 16777216) + d_37_x4_ = (d_35_x3_) - ((d_36_b4_) * (16777216)) + d_38_b5_ = _dafny.euclidian_division(d_37_x4_, 65536) + d_39_x5_ = (d_37_x4_) - ((d_38_b5_) * (65536)) + d_40_b6_ = _dafny.euclidian_division(d_39_x5_, 256) + d_41_b7_ = _dafny.euclidian_modulus(d_39_x5_, 256) + return _dafny.Seq([d_28_b0_, d_30_b1_, d_32_b2_, d_34_b3_, d_36_b4_, d_38_b5_, d_40_b6_, d_41_b7_]) + + @staticmethod + def SeqToUInt64(s): + d_42_x0_ = ((s)[0]) * (72057594037927936) + d_43_x1_ = (d_42_x0_) + (((s)[1]) * (281474976710656)) + d_44_x2_ = (d_43_x1_) + (((s)[2]) * (1099511627776)) + d_45_x3_ = (d_44_x2_) + (((s)[3]) * (4294967296)) + d_46_x4_ = (d_45_x3_) + (((s)[4]) * (16777216)) + d_47_x5_ = (d_46_x4_) + (((s)[5]) * (65536)) + d_48_x6_ = (d_47_x5_) + (((s)[6]) * (256)) + d_49_x_ = (d_48_x6_) + ((s)[7]) + return d_49_x_ + + @_dafny.classproperty + def UINT16__LIMIT(instance): + return 65536 + @_dafny.classproperty + def UINT32__LIMIT(instance): + return 4294967296 + @_dafny.classproperty + def UINT64__LIMIT(instance): + return 18446744073709551616 + @_dafny.classproperty + def INT32__MAX__LIMIT(instance): + return 2147483648 + @_dafny.classproperty + def INT64__MAX__LIMIT(instance): + return 9223372036854775808 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/System_.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/System_.py new file mode 100644 index 0000000000..32e6d896ff --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/System_.py @@ -0,0 +1,20 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny + +assert "System_" == __name__ +System_ = sys.modules[__name__] + +class nat: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return int(0) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/UTF8.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/UTF8.py new file mode 100644 index 0000000000..45e3b8b7a5 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/UTF8.py @@ -0,0 +1,118 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny +import System_ +import Wrappers_Compile +import StandardLibrary_mUInt_Compile +import StandardLibrary_Compile + +assert "UTF8" == __name__ +UTF8 = sys.modules[__name__] + +class ValidUTF8Bytes: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return _dafny.Seq([]) + +class default__: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "UTF8_Compile._default" + @staticmethod + def IsASCIIString(s): + def lambda7_(forall_var_2_): + d_67_i_: int = forall_var_2_ + return not (((0) <= (d_67_i_)) and ((d_67_i_) < (len(s)))) or ((ord((s)[d_67_i_])) < (128)) + + return _dafny.quantifier(_dafny.IntegerRange(0, len(s)), True, lambda7_) + + @staticmethod + def EncodeAscii(s): + d_68___accumulator_ = _dafny.Seq([]) + while True: + with _dafny.label(): + if (len(s)) == (0): + return (d_68___accumulator_) + (_dafny.Seq([])) + elif True: + d_69_x_ = _dafny.Seq([ord((s)[0])]) + d_68___accumulator_ = (d_68___accumulator_) + (d_69_x_) + in11_ = _dafny.Seq((s)[1::]) + s = in11_ + raise _dafny.TailCall() + break + + @staticmethod + def Uses1Byte(s): + return ((0) <= ((s)[0])) and (((s)[0]) <= (127)) + + @staticmethod + def Uses2Bytes(s): + return (((194) <= ((s)[0])) and (((s)[0]) <= (223))) and (((128) <= ((s)[1])) and (((s)[1]) <= (191))) + + @staticmethod + def Uses3Bytes(s): + return (((((((s)[0]) == (224)) and (((160) <= ((s)[1])) and (((s)[1]) <= (191)))) and (((128) <= ((s)[2])) and (((s)[2]) <= (191)))) or (((((225) <= ((s)[0])) and (((s)[0]) <= (236))) and (((128) <= ((s)[1])) and (((s)[1]) <= (191)))) and (((128) <= ((s)[2])) and (((s)[2]) <= (191))))) or (((((s)[0]) == (237)) and (((128) <= ((s)[1])) and (((s)[1]) <= (159)))) and (((128) <= ((s)[2])) and (((s)[2]) <= (191))))) or (((((238) <= ((s)[0])) and (((s)[0]) <= (239))) and (((128) <= ((s)[1])) and (((s)[1]) <= (191)))) and (((128) <= ((s)[2])) and (((s)[2]) <= (191)))) + + @staticmethod + def Uses4Bytes(s): + return (((((((s)[0]) == (240)) and (((144) <= ((s)[1])) and (((s)[1]) <= (191)))) and (((128) <= ((s)[2])) and (((s)[2]) <= (191)))) and (((128) <= ((s)[3])) and (((s)[3]) <= (191)))) or ((((((241) <= ((s)[0])) and (((s)[0]) <= (243))) and (((128) <= ((s)[1])) and (((s)[1]) <= (191)))) and (((128) <= ((s)[2])) and (((s)[2]) <= (191)))) and (((128) <= ((s)[3])) and (((s)[3]) <= (191))))) or ((((((s)[0]) == (244)) and (((128) <= ((s)[1])) and (((s)[1]) <= (143)))) and (((128) <= ((s)[2])) and (((s)[2]) <= (191)))) and (((128) <= ((s)[3])) and (((s)[3]) <= (191)))) + + @staticmethod + def ValidUTF8Range(a, lo, hi): + while True: + with _dafny.label(): + if (lo) == (hi): + return True + elif True: + d_70_r_ = _dafny.Seq((a)[lo:hi:]) + if UTF8.default__.Uses1Byte(d_70_r_): + in12_ = a + in13_ = (lo) + (1) + in14_ = hi + a = in12_ + lo = in13_ + hi = in14_ + raise _dafny.TailCall() + elif ((2) <= (len(d_70_r_))) and (UTF8.default__.Uses2Bytes(d_70_r_)): + in15_ = a + in16_ = (lo) + (2) + in17_ = hi + a = in15_ + lo = in16_ + hi = in17_ + raise _dafny.TailCall() + elif ((3) <= (len(d_70_r_))) and (UTF8.default__.Uses3Bytes(d_70_r_)): + in18_ = a + in19_ = (lo) + (3) + in20_ = hi + a = in18_ + lo = in19_ + hi = in20_ + raise _dafny.TailCall() + elif ((4) <= (len(d_70_r_))) and (UTF8.default__.Uses4Bytes(d_70_r_)): + in21_ = a + in22_ = (lo) + (4) + in23_ = hi + a = in21_ + lo = in22_ + hi = in23_ + raise _dafny.TailCall() + elif True: + return False + break + + @staticmethod + def ValidUTF8Seq(s): + return UTF8.default__.ValidUTF8Range(s, 0, len(s)) + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/WrappedSimpleTypesBooleanTest_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/WrappedSimpleTypesBooleanTest_Compile.py new file mode 100644 index 0000000000..bcf2b405bf --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/WrappedSimpleTypesBooleanTest_Compile.py @@ -0,0 +1,51 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny +import System_ +import Wrappers_Compile +import StandardLibrary_mUInt_Compile +import StandardLibrary_Compile +import UTF8 +import simple.types.boolean.internaldafny.types +import SimpleBooleanImpl_Compile +import simple.types.boolean.internaldafny.impl +import SimpleBooleanImplTest_Compile +import simple.types.boolean.internaldafny.wrapped + +assert "WrappedSimpleTypesBooleanTest_Compile" == __name__ +WrappedSimpleTypesBooleanTest_Compile = sys.modules[__name__] + +class default__: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "WrappedSimpleTypesBooleanTest_Compile._default" + @staticmethod + def GetBooleanTrue(): + d_81_client_: simple.types.boolean.internaldafny.types.ISimpleBooleanClient + d_82_valueOrError0_: Wrappers_Compile.Result = None + out5_: Wrappers_Compile.Result + out5_ = simple.types.boolean.internaldafny.wrapped.default__.WrappedSimpleBoolean(simple.types.boolean.internaldafny.wrapped.default__.WrappedDefaultSimpleBooleanConfig()) + d_82_valueOrError0_ = out5_ + if not(not((d_82_valueOrError0_).IsFailure())): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/WrappedSimpleBooleanTest.dfy(11,19): " + _dafny.string_of(d_82_valueOrError0_)) + d_81_client_ = (d_82_valueOrError0_).Extract() + SimpleBooleanImplTest_Compile.default__.TestGetBooleanTrue(d_81_client_) + + @staticmethod + def GetBooleanFalse(): + d_83_client_: simple.types.boolean.internaldafny.types.ISimpleBooleanClient + d_84_valueOrError0_: Wrappers_Compile.Result = None + out6_: Wrappers_Compile.Result + out6_ = simple.types.boolean.internaldafny.wrapped.default__.WrappedSimpleBoolean(simple.types.boolean.internaldafny.wrapped.default__.WrappedDefaultSimpleBooleanConfig()) + d_84_valueOrError0_ = out6_ + if not(not((d_84_valueOrError0_).IsFailure())): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/WrappedSimpleBooleanTest.dfy(15,19): " + _dafny.string_of(d_84_valueOrError0_)) + d_83_client_ = (d_84_valueOrError0_).Extract() + SimpleBooleanImplTest_Compile.default__.TestGetBooleanFalse(d_83_client_) + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/Wrappers_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/Wrappers_Compile.py new file mode 100644 index 0000000000..ddde85ac6b --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/Wrappers_Compile.py @@ -0,0 +1,190 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny +import System_ + +assert "Wrappers_Compile" == __name__ +Wrappers_Compile = sys.modules[__name__] + +class Option: + @classmethod + def default(cls, ): + return lambda: Option_None() + def __ne__(self, __o: object) -> bool: + return not self.__eq__(__o) + @property + def is_None(self) -> bool: + return isinstance(self, Wrappers_Compile.Option_None) + @property + def is_Some(self) -> bool: + return isinstance(self, Wrappers_Compile.Option_Some) + def ToResult(self): + source0_ = self + if source0_.is_None: + return Wrappers_Compile.Result_Failure(_dafny.Seq("Option is None")) + elif True: + d_0___mcc_h0_ = source0_.value + d_1_v_ = d_0___mcc_h0_ + return Wrappers_Compile.Result_Success(d_1_v_) + + def UnwrapOr(self, default): + source1_ = self + if source1_.is_None: + return default + elif True: + d_2___mcc_h0_ = source1_.value + d_3_v_ = d_2___mcc_h0_ + return d_3_v_ + + def IsFailure(self): + return (self).is_None + + def PropagateFailure(self): + return Wrappers_Compile.Option_None() + + def Extract(self): + return (self).value + + +class Option_None(Option, NamedTuple('None_', [])): + def __dafnystr__(self) -> str: + return f'Wrappers_Compile.Option.None' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, Wrappers_Compile.Option_None) + def __hash__(self) -> int: + return super().__hash__() + +class Option_Some(Option, NamedTuple('Some', [('value', Any)])): + def __dafnystr__(self) -> str: + return f'Wrappers_Compile.Option.Some({_dafny.string_of(self.value)})' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, Wrappers_Compile.Option_Some) and self.value == __o.value + def __hash__(self) -> int: + return super().__hash__() + + +class Result: + @classmethod + def default(cls, default_T): + return lambda: Result_Success(default_T()) + def __ne__(self, __o: object) -> bool: + return not self.__eq__(__o) + @property + def is_Success(self) -> bool: + return isinstance(self, Wrappers_Compile.Result_Success) + @property + def is_Failure(self) -> bool: + return isinstance(self, Wrappers_Compile.Result_Failure) + def ToOption(self): + source2_ = self + if source2_.is_Success: + d_4___mcc_h0_ = source2_.value + d_5_s_ = d_4___mcc_h0_ + return Wrappers_Compile.Option_Some(d_5_s_) + elif True: + d_6___mcc_h1_ = source2_.error + d_7_e_ = d_6___mcc_h1_ + return Wrappers_Compile.Option_None() + + def UnwrapOr(self, default): + source3_ = self + if source3_.is_Success: + d_8___mcc_h0_ = source3_.value + d_9_s_ = d_8___mcc_h0_ + return d_9_s_ + elif True: + d_10___mcc_h1_ = source3_.error + d_11_e_ = d_10___mcc_h1_ + return default + + def IsFailure(self): + return (self).is_Failure + + def PropagateFailure(self): + return Wrappers_Compile.Result_Failure((self).error) + + def MapFailure(self, reWrap): + source4_ = self + if source4_.is_Success: + d_12___mcc_h0_ = source4_.value + d_13_s_ = d_12___mcc_h0_ + return Wrappers_Compile.Result_Success(d_13_s_) + elif True: + d_14___mcc_h1_ = source4_.error + d_15_e_ = d_14___mcc_h1_ + return Wrappers_Compile.Result_Failure(reWrap(d_15_e_)) + + def Extract(self): + return (self).value + + +class Result_Success(Result, NamedTuple('Success', [('value', Any)])): + def __dafnystr__(self) -> str: + return f'Wrappers_Compile.Result.Success({_dafny.string_of(self.value)})' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, Wrappers_Compile.Result_Success) and self.value == __o.value + def __hash__(self) -> int: + return super().__hash__() + +class Result_Failure(Result, NamedTuple('Failure', [('error', Any)])): + def __dafnystr__(self) -> str: + return f'Wrappers_Compile.Result.Failure({_dafny.string_of(self.error)})' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, Wrappers_Compile.Result_Failure) and self.error == __o.error + def __hash__(self) -> int: + return super().__hash__() + + +class Outcome: + @classmethod + def default(cls, ): + return lambda: Outcome_Pass() + def __ne__(self, __o: object) -> bool: + return not self.__eq__(__o) + @property + def is_Pass(self) -> bool: + return isinstance(self, Wrappers_Compile.Outcome_Pass) + @property + def is_Fail(self) -> bool: + return isinstance(self, Wrappers_Compile.Outcome_Fail) + def IsFailure(self): + return (self).is_Fail + + def PropagateFailure(self): + return Wrappers_Compile.Result_Failure((self).error) + + +class Outcome_Pass(Outcome, NamedTuple('Pass', [])): + def __dafnystr__(self) -> str: + return f'Wrappers_Compile.Outcome.Pass' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, Wrappers_Compile.Outcome_Pass) + def __hash__(self) -> int: + return super().__hash__() + +class Outcome_Fail(Outcome, NamedTuple('Fail', [('error', Any)])): + def __dafnystr__(self) -> str: + return f'Wrappers_Compile.Outcome.Fail({_dafny.string_of(self.error)})' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, Wrappers_Compile.Outcome_Fail) and self.error == __o.error + def __hash__(self) -> int: + return super().__hash__() + + +class default__: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "Wrappers_Compile._default" + @staticmethod + def Need(condition, error): + if condition: + return Wrappers_Compile.Outcome_Pass() + elif True: + return Wrappers_Compile.Outcome_Fail(error) + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/__pycache__/SimpleBooleanImplTest_Compile.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/__pycache__/SimpleBooleanImplTest_Compile.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1a9d9b7da8e614110292feb1648d35bf3a46869f GIT binary patch literal 7439 zcmeHM%WoUU8K2$dV=0LeB}$ebv7^SaEuyZdS1hG9jKs1Pzp95NJIx}^dd*$gq?eD( zE^SMdP$BTaKznT9UJB@tx;6~-)I*N>3kr%@L&N|E3=}=|Cf5lH7(Mj+X1OF+qLZR6 z45RSu@SBMC@s8vtJ2EDHl>Y+Q6%u%q$bZAcbRxjyNzF91tER!E4{}Q^ys%U-E^CyvOlw&~Unmw#BO$QhqM6TA zjHL3#oXz&nr?VhAna`VsmOBga1;et{$$YkuHjNZk?m4gN=eL1#j~GM|bfSp5aEB<8 zE*gPFQJ3xnl%NsP19!-M$o0r8OO!BhgFCn~aA9!U@JEWH3K>8SfyIOwi-4V~so9e_1C^^A6|V zpZB4sk7~VL6;^~*vO?Bz^gEotBu&`ydX@}VTbR}bAHUVhvqJoBErY<%`CNdO+r0dZ zp}*x-(cW8^Hq0Te_71lq`ddK-=kde%zPnU?Gd^ zDi*Zy6teJDS81_mI%gX+rk5)zB+ z>iC#?Q!|Uk3_VS0o(`!jm@nGHDr*DTsG2g(|hc0+Y|YaBPTcIlV$nj*T*;HSx25NdH#)RfmH`Z0Kd9{eWO}-TITOlEn}W) zp}jDd6m1wq>_zcx(S1lzjnKD{>_>6{$=gW!ko*A2J4m=9i2D`6lxA9fEnyCUVIt*R-zt;tmWqI=J3mfvBBhQsQ@9Kh@F@||SGt6PeKLJME zBX)zV4l&ki5Cd}8oE@q~Ni)EasmU9pHNeokPX8(On^nIIfW%8c#DCJSb=;9VoNqQ7 z;K#Op!JO3rj$gJau80VE)@vZ8u@V1>Kqu9&G9-iOk~>}W@oNxdMew)P6z&M?9bP?+ zp}*x-X+_E)d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k;b zlZUW6VF;ZnaGj$~6?o3BO%+Y%RFQ<~Tbt68;0@YDo=h5kku<#_2@{Ft14-}(-ST0@ z29_Tbg(P@`Ami4>Gs6caGl;D6!|3f-8~ErEtC7VYH?*7LF{u z!lm7O(7~po3!70cTYwjM3R9A8!$u^?Uhc9l*KIr4zW``ngtRZsKCxKTI~7arV-?sq zZM8*k2kn+;ZYTc=;F@vq(!ErEQh7NvEaPcgM{)r&xFwtWzs~{Gk1-xZ`m2%tCl+nY z3ZBMd)hHYZU8_94OJIr1zL3=(8Nl1U_&kkA9!BBt=9hWr%C&yn0fatFyDkf_fw9kK{8XVI(*<)R*bGi$;JYKcbV=B6ux+8oY6Kn$=!8 zJI&&~h?DBCopmG9ZM#S5UJbx2Xjs__5E=hSoZF_@c zX22?C;1k$zT~&?5b;Se&jZqkkU+ z_b(s#A{eh4-<96}yDiJ7YrW8n-K##1g%>sJ$s^=_WdZH=S!l8U!+dZp&#`WT{fJ_J jbpZMc7qImN^Xhy6<$tvfN*(FHw$dw! literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/__pycache__/System_.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/__pycache__/System_.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a1fc71e803745a1db9201943b8e2a98e88d8b6e6 GIT binary patch literal 1363 zcmah{&5ImG6o1vq^)^z<*;A4?~|8f(LIK)>BTt*E2oIM$xM3*YEx6)%*UX*XsbT;jz}S!P96W=D4BL{8>LE+gEQUgk%B!#gs_)}pnBXR;G@ zn)mC`I(J3)z#`k)`U0LX0pInOoCH>YzC3dE#ZtTZqJ;^6&`nHaDrN=?OTX^?qXnGZRd$ev7W0%yp7+b zhlFa0YHau%p0nD~LXN2TaQ)Ty;a6HH9m+|XrM$?)J3=3rq6{Au>Y$WKD#EgmRaU5S zKim`Ad|7ZIb+|juFh@$e&P5~d86i>ouG8OLYhDn^%qCL9_MBe z5}8~C<8v`eCel1!r#O}ZU2BSc3V&?&k3Rb0;nRnQy(W<1AfS5XIAd{Kcj7oJ_(T$q zX+4-Ea&e=!@pWxuifV_rt~QAorDfFd|+2^gSfg)xNNp+q-}j@tE8H zIVGU~7CCpfNqL9hotHLv{n0gmt*o?6` zbf(Ro!^da;cjmBjcJ<8R-LtFb95$xSo~nwX==0zF_s-fg@ARI2c(ng}=l!XF T;RFne_fPVYu)qH0qABO!g{?*| literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/__pycache__/UTF8.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/__pycache__/UTF8.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9adb6dd3ca1fd97584ff30ad400bcdf6c5c2f9b3 GIT binary patch literal 9510 zcmds7du$X*dhd7l_%--}&0^!VVPCUw43EXYLKY0m7~9|jX8d6G(H>9t7(>tWxO=?I zjK>dch_b67#kb;uPvY)4X>Vh)dlIK(r9J6R;V#kXq+F!7Wobtvp%6v+!%`k55NUOP z<@>7V)%KW>yF8@yjK8nytFNlQs`~0zJzx3HtE($0c>2EkC(1ACDC!?DlYh8e;_+`F zag$Ogh1RGbaz>-0OpuAPK{m<-xhNmxX_T{?5EX+WNpqSMbp>4{O=}gw3R1r^SV?$Q zu!`{NU^U@2!5YHdLAS!Io31d}x5@NSAJ8gwxi)7BrEYpIpQM6y4An&`!Zk_}KL!2I zNF6K=){_zmN?dD78Wh@3c`8;=tgu0P;A6vj64PrmQR9U!?$sZ@|ws34=z*Qg+?Fe(>e6!sby z1)YAEJ4V8mll5XX~=OVFTcguO~A5=+XXYD_gk303i;$-Cpp ztR%~0v9W|Kr<$BY*_|)IrF<*`nWZvP)rZ_;NK#qBP!khI?5P9Bg=6}%lu-jU3^x#a z$Obl@(FG?S@*6%se8M9DH-E~H1PPa*wT zA@8S*YEbtuS;4j>%lg%E+gR+uH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|<8R@Cav(Uem)RsV z!Qj!I0J@lvB*`azbK>*Kp6)+opNw?l*(Y1O@qCXA%!$t@`8o0VE0R)|gxM!gccbi+ zZQUsQq<>C)KB;!2?32-Mlzmd^Mmavnc$b9vUZ!$uY$3D18)biN*EjvQj`hY~>XIFc U$;Tvon-8b=h5XmQ(27_52Z{XZVgLXD literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/__pycache__/Wrappers_Compile.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/__pycache__/Wrappers_Compile.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..08ee3c8a42dbcd0fcfa71c6cf92c52a95ed396ba GIT binary patch literal 14812 zcmd5jTW}OtcHQ$Hy;^8^NeD9_!CGK6Vt6hBNr2Wavt}eCjA0<#8D?4_n1_6OWGqD@ z+ASs4?z)oomR+clbxNCTSco?%Hn9^v^1%nG%11tWl-aVXtG0@&Bp>+`B|cLA$~pJm z?&-$}8J+3A_uPBWJ@=e*&pEgC%li5n0j|U+KhFH;20{2Qd@wFr0}soucm(05 zkP$LsR!HKnCoASWNl(t3^yYj?U(TQOi&*Z>26DkUpzn zv1L^>Y^3d?&~B@PhUSboBy?>1Uu1Wp!>5N%q_Wx6rL3ZRkLAbp;FZ%^q={%ZNKIEJilm?EY!@oLY*s zl_PDM)TV{nDE&5JLeZzR9)O#hf>ll?g`#CvSIv97f*Le?^_mfNB(D}z`Lsg9&>N8e z+!0AD{MZ;iqEaa{8P1=nxUL7}Y2kmQ=DGIYM7zq-BPHo*SvsnPjy^xyJG^8o(u+i! zdN5STDP&s}(y_uyIzA)Sq#XgSfQ`X^D4-1f3~o>uro>6{D%`V+ykceYyvbyv9)F9$ z%F|U`FnVPi;$s)4At5ZlI5;}JraY6LDX(p;fKg}to%A~U0n1`cH#(w5(LQtpNgFg` z3~M;8sGx}QtErLf7*RlUsY2`CA>|$2|86QfrsxLF&{#U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2CI{>mnbr=ap0Zwu}FlkZ!7GHy_{t5X$>A7W(N}@ z9lbCZuLD+O52bU)>5cL-nG4vfe{mEqreq$0N&X}-aN+6=a?uktauWek{P{Y2KU_JF zZo%QNIz33i4-q&_;4uP>L$aP4r`xv)yi4FY0)Ir{uL=06W_2ZVCA0D| z>lL%@Fl!34TrdrrDIrXhWilS0_ZgyD|;E|y9ZJyeVpBv}Fv6{7_q|EdL>Tf`~`KnhjQyP1pXQgwb6 zk5S9wIw>wd3i}}QZsyYCl5gb_5wBJ(1}XbZ^8K_Bw53lJ>CE-T|B~x&^3YGskp_TG zdb^_uxYmd;1{Q;xgm+Ob2#(@w=8`Rq;d{j?BtMr;wW z)3O*O*WM)GPYXehiB*KiVsMlEJ}m^S-6Uf1rx>J~Z<6n)g`g)f`tW*i9k_HC^K+Gp zczR6-^-huXpav>6LW4O~6s;h|$g`U0rrJQB)i~0h;_3hcf}UQ>15|)s#+e5$n@DyE t1H^d3$kTz#Nhx(u=@y|%6oZ@O_h})ZwoKfId`rWd%>UCxLfK^U{{eAxySo4Y literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/__pycache__/module_.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/__pycache__/module_.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..dc38d98392f6aea652f67ebbd6600464112b3b98 GIT binary patch literal 6648 zcmd@YOKcm*b#|AZB_)b0S+wL2TPm^`%T37Ih7&a{EK`ZTwPhKSU3e{HyW$Qd%F9n? zmr*EKjS#3nfaKsqiu4kohr~td_SOP9}Ue%Xc4zbN1)U$b%h-_ZB~DM(>dB+{By znF1@a1y1A&KG9e3i++aUIWy05tdg!@}f zB!*cuiIl(=Qi9iE{0(Og9VzZtn0YkJe?@`WVV}*vDyyozq+*-P6svY{p<2clWMYSB zEzvEv;6vg{)F4reDL_6}?nWua(G^vMOhBx?EDLg%T;Rq!+NJ z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3|C2`VNpcd#(#N(o3MJ?> z!_-iC)A?%Xgz>0cLwgNxuAu{lH{V2Eo6c85kxl2T?PB^2)XX(>$Z&HFea~=n4Rvff zUk#-VH`h?YaB~f%3^#ihIclJ0uAvtUH{T2j*QU0E2MssZ!jboWaBam3e}6Mr_l+`C RaUWjZa`1QlORuBP{{cqNpjQ9@ literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/_dafny.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/_dafny.py new file mode 100644 index 0000000000..2bcd742785 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/_dafny.py @@ -0,0 +1,476 @@ +"""Runtime enabling Dafny language features.""" +import builtins +from dataclasses import dataclass +from contextlib import contextmanager +from fractions import Fraction +from collections import Counter +from collections.abc import Iterable +from functools import reduce +from types import GeneratorType, FunctionType +from itertools import chain, combinations, count + +class classproperty(property): + def __get__(self, instance, owner): + return classmethod(self.fget).__get__(None, owner)() + +def print(value): + builtins.print(value, end="") + +# Dafny strings are currently sequences of UTF-16 code units. +# To make a best effort attempt at printing the right characters we attempt to decode, +# but have to allow for invalid sequences. +def string_from_utf_16(utf_16_code_units): + return b''.join(ord(c).to_bytes(2, 'little') for c in utf_16_code_units).decode("utf-16-le", errors = 'replace') + +def string_of(value) -> str: + if hasattr(value, '__dafnystr__'): + return value.__dafnystr__() + elif value is None: + return "null" + elif isinstance(value, bool): + return "true" if value else "false" + elif isinstance(value, str): + # This is only for Dafny char values. + # Dafny strings are represented as Seq's of individual char values, + # and Seq defines __dafnystr__. + return string_from_utf_16(value) + elif isinstance(value, tuple): + return '(' + ', '.join(map(string_of, value)) + ')' + elif isinstance(value, FunctionType): + return "Function" + else: + return str(value) + +@dataclass +class Break(Exception): + target: str + +@dataclass +class Continue(Exception): + target: str + +class TailCall(Exception): + pass + +@contextmanager +def label(name: str = None): + try: + yield + except Break as g: + if g.target != name: + raise g + except TailCall as g: + if name is not None: + raise g + +@contextmanager +def c_label(name: str = None): + try: + yield + except Continue as g: + if g.target != name: + raise g + +class CodePoint(str): + + escapes = { + '\n' : "\\n", + '\r' : "\\r", + '\t' : "\\t", + '\0' : "\\0", + '\'' : "\\'", + '\"' : "\\\"", + '\\' : "\\\\", + } + + def __escaped__(self): + return self.escapes.get(self, self) + + def __dafnystr__(self): + return f"'{self.__escaped__()}'" + + def __add__(self, other): + return CodePoint(plus_char(self, other)) + + def __sub__(self, other): + return CodePoint(minus_char(self, other)) + +class Seq(tuple): + def __init__(self, __iterable = None, isStr = False): + ''' + isStr defines whether this value should be tracked at runtime as a string (a.k.a. seq) + It accepts three different values: + - True: this value is definitely a string, mark it as such + - False: this value might be a string, apply heuristics to make a best guess + - None: don't apply heuristics, don't mark it as a string + + None is used when --unicode-char is true, to ensure consistent printing of strings + across backends without depending on any runtime tracking. + See docs/Compilation/StringsAndChars.md. + ''' + + if __iterable is None: + __iterable = [] + if isStr is None: + self.isStr = None + else: + self.isStr = isStr \ + or isinstance(__iterable, str) \ + or (isinstance(__iterable, Seq) and __iterable.isStr) \ + or (not isinstance(__iterable, GeneratorType) + and all(isinstance(e, str) and len(e) == 1 for e in __iterable) + and len(__iterable) > 0) + + @property + def Elements(self): + return self + + @property + def UniqueElements(self): + return frozenset(self) + + def VerbatimString(self, asliteral): + if asliteral: + return f"\"{''.join(map(lambda c: c.__escaped__(), self))}\"" + else: + return ''.join(self) + + def __dafnystr__(self) -> str: + if self.isStr: + # This should never be true when using --unicode-char, + # so it is safe to assume we are a sequence of UTF-16 code units. + return string_from_utf_16(self) + return '[' + ', '.join(map(string_of, self)) + ']' + + def __add__(self, other): + return Seq(super().__add__(other), isStr=self.isStr and other.isStr) + + def __getitem__(self, key): + if isinstance(key, slice): + indices = range(*key.indices(len(self))) + return Seq((self[i] for i in indices), isStr=self.isStr) + return super().__getitem__(key) + + def set(self, key, value): + l = list(self) + l[key] = value + return Seq(l, isStr=self.isStr) + + def __hash__(self) -> int: + return hash(tuple(self)) + + def __lt__(self, other): + return len(self) < len(other) and self == other[:len(self)] + + def __le__(self, other): + return len(self) <= len(other) and self == other[:len(self)] + +# Convenience for translation when --unicode-char is enabled +def SeqWithoutIsStrInference(__iterable = None): + return Seq(__iterable, isStr = None) + +class Array: + def __init__(self, initValue, *dims): + def create_structure(initValue, *dims): + return [initValue if len(dims) <= 1 else create_structure(initValue, *dims[1:]) for _ in range(dims[0])] + self.dims = list(dims) + self.arr = create_structure(initValue, *dims) + + def __dafnystr__(self) -> str: + return f'array{self.dims}' + + def __str__(self): + return self.__dafnystr__() + + def length(self, i): + return self.dims[i] if i < len(self.dims) else None + + def __len__(self): + return self.length(0) + + def __getitem__(self, key): + if not isinstance(key, Iterable): + return self.arr[key] + arr = self.arr + for i in key: + arr = arr[i] + return arr + + def __setitem__(self, key, value): + if not isinstance(key, Iterable): + self.arr[key] = value + return + arr = self.arr + for i in range(len(key)-1): + arr = arr[key[i]] + arr[key[-1]] = value + +class Set(frozenset): + @property + def Elements(self): + return self + + @property + def AllSubsets(self): + # https://docs.python.org/3/library/itertools.html#itertools-recipes + s = list(self) + return map(Set, chain.from_iterable(combinations(s, r) for r in range(len(s)+1))) + + def __dafnystr__(self) -> str: + return '{' + ', '.join(map(string_of, self)) + '}' + + def union(self, other): + return Set(super().union(self, other)) + + def intersection(self, other): + return Set(super().intersection(other)) + + def ispropersubset(self, other): + return self.issubset(other) and self != other + + def __or__(self, other): + return self.union(other) + + def __sub__(self, other): + return Set(super().__sub__(other)) + +class MultiSet(Counter): + def __dafnystr__(self) -> str: + return 'multiset{' + ', '.join(map(string_of, self.elements())) + '}' + + def __len__(self): + return reduce(lambda acc, key: acc + self[key], self, 0) + + def union(self, other): + return MultiSet(self + other) + + def __or__(self, other): + return self.union(other) + + def intersection(self, other): + return MultiSet(self & other) + + def __sub__(self, other): + return MultiSet(super().__sub__(other)) + + @property + def keys(self): + return Set(key for key in self if self[key] > 0) + + @property + def Elements(self): + return self.elements() + + @property + def UniqueElements(self): + return self.keys + + def isdisjoint(self, other): + return frozenset(self.keys).isdisjoint(frozenset(other.keys)) + + def issubset(self, other): + return all(self[key] <= other[key] for key in frozenset(self).union(frozenset(other))) + + def ispropersubset(self, other): + return self.issubset(other) and len(self) < len(other) + + def set(self, key, value): + set = Counter(self) + set[key] = value + return MultiSet(set) + + def __hash__(self): + return hash(frozenset(self.keys)) + + def __eq__(self, other): + return all(self[key] == other[key] for key in self.keys | other.keys) + + def __ne__(self, other): + return not (self == other) + + def __setattr__(self, key, value): + raise TypeError("'Map' object is immutable") + + def __contains__(self, item): + return self[item] > 0 + +class Map(dict): + def __dafnystr__(self) -> str: + return 'map[' + ', '.join(map(lambda i: f'{string_of(i[0])} := {string_of(i[1])}', self.items)) + ']' + + @property + def Elements(self): + return self + + @property + def keys(self): + return Set(super().keys()) + + @property + def values(self): + return Set(super().values()) + + @property + def items(self): + return Set(super().items()) + + def set(self, key, value): + map = dict(self) + map[key] = value + return Map(map) + + def __sub__(self, other): + map = dict(self) + for key in list(other): + map.pop(key, None) + return Map(map) + + def __or__(self, other): + map = dict(self) + for k, v in other.items: + map[k] = v + return Map(map) + + def __hash__(self): + return hash(frozenset(self)) + + def __setattr__(self, key, value): + raise TypeError("'Map' object is immutable") + +class BigOrdinal: + @staticmethod + def is_limit(ord): + return ord == 0 + + @staticmethod + def is_succ(ord): + return 0 < ord + + @staticmethod + def offset(ord): + return ord + + @staticmethod + def is_nat(ord): + # at run time, every ORDINAL is a natural number + return True + +class BigRational(Fraction): + def __dafnystr__(self): + if self.denominator == 1: + return f"{self.numerator}.0" + correction = self.divides_a_power_of_10(self.denominator) + if correction is None: + return f"({self.numerator}.0 / {self.denominator}.0)" + compensation, shift = correction + if self.numerator < 0: + sign, digits = "-", str(-self.numerator*compensation) + else: + sign, digits = "", str(self.numerator*compensation) + if shift < len(digits): + n = len(digits) - shift + return f"{sign}{digits[:n]}.{digits[n:]}" + return f"{sign}0.{'0' * (shift - len(digits))}{digits}" + + @staticmethod + def isolate_factor(f, x): + y = 0 + while x > 1 and x % f == 0: + y += 1 + x //= f + return x, y + + @staticmethod + def divides_a_power_of_10(x): + rem, expA = BigRational.isolate_factor(10, x) + if rem % 5 == 0 or rem % 2 == 0 or rem == 1: + major, minor = (5, 2) if rem % 5 == 0 else (2, 5) + rem, expB = BigRational.isolate_factor(major, rem) + return (minor**expB, expA+expB) if rem == 1 else None + return None + + def __add__(self, other): + return BigRational(super().__add__(other)) + + def __sub__(self, other): + return BigRational(super().__sub__(other)) + + def __mul__(self, other): + return BigRational(super().__mul__(other)) + + def __truediv__(self, other): + return BigRational(super().__truediv__(other)) + +def plus_char(a, b): + return chr(ord(a) + ord(b)) + +def minus_char(a, b): + return chr(ord(a) - ord(b)) + +def euclidian_division(a, b): + if 0 <= a: + if 0 <= b: + return a // b + else: + return -(a // (-b)) + else: + if 0 <= b: + return -((-a-1) // b) - 1 + else: + return (-a-1) // (-b) + 1 + +def euclidian_modulus(a, b): + bp = abs(b) + if 0 <= a: + return a % bp + c = (-a) % bp + return c if c == 0 else bp - c + +@dataclass +class HaltException(Exception): + message: str + +def quantifier(vals, frall, pred): + for u in vals: + if pred(u) != frall: + return not frall + return frall + +def AllBooleans(): + return [False, True] + +def AllChars(): + return (chr(i) for i in range(0x10000)) + +def AllUnicodeChars(): + return chain((CodePoint(chr(i)) for i in range(0xD800)), + (CodePoint(chr(i)) for i in range(0xE000, 0x11_0000))) + +def AllIntegers(): + return (i//2 if i % 2 == 0 else -i//2 for i in count(0)) + +def IntegerRange(lo, hi): + if lo is None: + return count(hi-1, -1) + if hi is None: + return count(lo) + return range(lo, hi) + +class Doubler: + def __init__(self, start): + self.start = start + + def __iter__(self): + i = self.start + while True: + yield i + i *= 2 + +class defaults: + bool = staticmethod(lambda: False) + char = staticmethod(lambda: 'D') + codepoint = staticmethod(lambda: CodePoint(defaults.char())) + int = staticmethod(lambda: 0) + real = staticmethod(BigRational) + pointer = staticmethod(lambda: None) + tuple = staticmethod(lambda *args: lambda: tuple(a() for a in args)) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/dafny_generated.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/dafny_generated.py new file mode 100644 index 0000000000..9d2ba016d5 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/dafny_generated.py @@ -0,0 +1,16 @@ +# Dafny program the_program compiled into Python +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count +from extern import Extern + +import module_ +import _dafny + +try: + dafnyArgs = [_dafny.Seq(a) for a in sys.argv] + module_.default__.Test____Main____(dafnyArgs) +except _dafny.HaltException as e: + _dafny.print("[Program halted] " + e.message + "\n") + sys.exit(1) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/module_.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/module_.py new file mode 100644 index 0000000000..454fcd43a4 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/module_.py @@ -0,0 +1,87 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny +import System_ +import Wrappers_Compile +import StandardLibrary_mUInt_Compile +import StandardLibrary_Compile +import UTF8 +import simple.types.boolean.internaldafny.types +import SimpleBooleanImpl_Compile +import simple.types.boolean.internaldafny.impl +import SimpleBooleanImplTest_Compile +import simple.types.boolean.internaldafny.wrapped +import WrappedSimpleTypesBooleanTest_Compile + +assert "module_" == __name__ +module_ = sys.modules[__name__] + +class default__: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "_module._default" + @staticmethod + def Test____Main____(noArgsParameter__): + d_85_success_: bool + d_85_success_ = True + _dafny.print(_dafny.string_of(_dafny.Seq("SimpleBooleanImplTest.GetBooleanTrue: "))) + try: + if True: + SimpleBooleanImplTest_Compile.default__.GetBooleanTrue() + if True: + _dafny.print(_dafny.string_of(_dafny.Seq("PASSED\n"))) + except _dafny.HaltException as e: + d_86_haltMessage_ = e.message + if True: + _dafny.print(_dafny.string_of(_dafny.Seq("FAILED\n "))) + _dafny.print(_dafny.string_of(d_86_haltMessage_)) + _dafny.print(_dafny.string_of(_dafny.Seq("\n"))) + d_85_success_ = False + _dafny.print(_dafny.string_of(_dafny.Seq("SimpleBooleanImplTest.GetBooleanFalse: "))) + try: + if True: + SimpleBooleanImplTest_Compile.default__.GetBooleanFalse() + if True: + _dafny.print(_dafny.string_of(_dafny.Seq("PASSED\n"))) + except _dafny.HaltException as e: + d_87_haltMessage_ = e.message + if True: + _dafny.print(_dafny.string_of(_dafny.Seq("FAILED\n "))) + _dafny.print(_dafny.string_of(d_87_haltMessage_)) + _dafny.print(_dafny.string_of(_dafny.Seq("\n"))) + d_85_success_ = False + _dafny.print(_dafny.string_of(_dafny.Seq("WrappedSimpleTypesBooleanTest.GetBooleanTrue: "))) + try: + if True: + WrappedSimpleTypesBooleanTest_Compile.default__.GetBooleanTrue() + if True: + _dafny.print(_dafny.string_of(_dafny.Seq("PASSED\n"))) + except _dafny.HaltException as e: + d_88_haltMessage_ = e.message + if True: + _dafny.print(_dafny.string_of(_dafny.Seq("FAILED\n "))) + _dafny.print(_dafny.string_of(d_88_haltMessage_)) + _dafny.print(_dafny.string_of(_dafny.Seq("\n"))) + d_85_success_ = False + _dafny.print(_dafny.string_of(_dafny.Seq("WrappedSimpleTypesBooleanTest.GetBooleanFalse: "))) + try: + if True: + WrappedSimpleTypesBooleanTest_Compile.default__.GetBooleanFalse() + if True: + _dafny.print(_dafny.string_of(_dafny.Seq("PASSED\n"))) + except _dafny.HaltException as e: + d_89_haltMessage_ = e.message + if True: + _dafny.print(_dafny.string_of(_dafny.Seq("FAILED\n "))) + _dafny.print(_dafny.string_of(d_89_haltMessage_)) + _dafny.print(_dafny.string_of(_dafny.Seq("\n"))) + d_85_success_ = False + if not(d_85_success_): + raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(3,0): " + _dafny.string_of(_dafny.Seq("Test failures occurred: see above.\n"))) + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/simple/types/boolean/internaldafny/__pycache__/impl.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/simple/types/boolean/internaldafny/__pycache__/impl.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3fb6a85ad636ba979396094f745f7c3480f5f41d GIT binary patch literal 4343 zcmb6cO>Y~=b#}SCq&~={C0VK^$5Cs;4&_*kTQrGkM?kHhsRUI;B-xG^LANXJ$|Ak| z=Acvyw&3;fzD^Buu z`R2`=*_k)*bNJ_UdXNCD{PB0@vm_z^!cGWsKpg)Mh)2XEreG5dThSKEq9&FTTB0mz zQd!ny0r?4ADJQigrzJa89?%9jE!czFApd?y8{+M-Hq6_!mga3n%kWm!RNiK_EN{3sDc=Xjv`JG~Be}tUV`n8NvDAWL+s1}%vBZxn4VGMQ)T}!OWrHh5*)rGb zHQUMwOy0DsRfp<1pLLAU9JYGt!{ANts^q-kv$b=zf0y}&t71SUC_z3HG((_j86f7`LBleg=I za>1-t^6y*D1Giese^R9nYPM0Z^0lhnC|7B1E5B|z?$4^GWjlFa05oAp2dc?auv)PU z>{`R!f(0E~$a6F4_pORW4c9XBzD@Joruo38`It@fsP5TXgQax6SSh-?-aH>Wv~Pmh zaC8(-<6H!^L!Qm8dUL-#oZC8>+uENid2^-xIoq4F+tS0~ZfdwK9i#S{LM^vWD={OY zPPh>jARutjfyI^Pf-mpa`e0~;*;6EaLg*P-)K@!2aoMo0bHz9=h2u@1@(~=bHv^;6 zNdej+U3I;qu2YQ8!bz7xn#(^1#3RxYzLiuCoV7ikA1mc`~y*>6Y(}w3|nJ^i0nFwh2+XaS;W(c4pMO2txNhumX zF$&4phi?>YAk$N{I)`}ZZ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Z_Y=NL*3RA7`Gx03 g!>5;vdyi^+k2+I>hD}p(yHOPPG!?g7D7DG|2NtH2OaK4? literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/simple/types/boolean/internaldafny/__pycache__/wrapped.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/simple/types/boolean/internaldafny/__pycache__/wrapped.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ba20cabedcbfab0c11425073314e8de68c2af2a7 GIT binary patch literal 2096 zcma(RO>Y}TbauTTj$>z&v`Gr3Py|vjNM2Ql4*>!}Do|14ixZGWl~!xdIN4;sm|d$l z;$Wd1kl-FJNQgsG)eAp?pRiPsSj{OC;=nCcIQ7JvS+5hfq3z7mdvD&GkM}vhHX1bq zqy5wOAVzz!xOFI9@N|C8E>iT~*ka zsGp;66%~Dkh_R1|c?YETq(*4*3Q;l5hqR#+1CU5j2i;ZLcL8xNp?*IR8?HY5#okOPOKgA83wk69?He@NO{3Vp z9kJcmcYD;1BYzk~EZ(*^Xp*i+g!+lykuHn)l>8@!-!_AgcmasxVY&?$Cah=67&u!r zq|8kzv5SD&GGO*NVD?nN>~X+a@sL*?#|u4haBp$qYpawkfg6blXoT`={X6XhSi}uR z(*X;g7!i?rwY~TLvuDp)je^*NOgm#cSOXqobAXC)vU%}%-EpMDNy@gste=a+Ah> z4;Lpd0UDvdt)(BnIka9mw5}go@BC>w_bulS%RRK*tm?|ZwwqN^Mo0q`WVZseam=|s_Q2|V( zoaq9I*5_K_rrS((2%qubOG=?n6DBH;o8usGqbOKzc7{nx1BcHS(Pv3n^889CbwlDZ zvgUP}%Z5&{c{5BW>Xk>;<5uC?=EkS*^4E&Wdg2!;i;k@b!=9U}jhpbhP9D1U3^$3t z2@IBB)VNB;9pd{c?_pQqog#U%hbL9~u=+s}l@Hl<*dqEYxeWNYq9{s^Y9l#w^j7vX z$kB2(4LQ1;O~VnI8_AiY#z@ZmRI-wxG34mgtb`oBn3a&D*^!(%va=F$bTum>N3E=c hvzHv1Z~pf6ee str: + return "simple.types.boolean.internaldafny.impl_Compile.SimpleBooleanClient" + def ctor__(self, config): + (self)._config = config + + def GetBoolean(self, input): + output: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(simple.types.boolean.internaldafny.types.GetBooleanOutput.default())() + out0_: Wrappers_Compile.Result + out0_ = SimpleBooleanImpl_Compile.default__.GetBoolean((self).config, input) + output = out0_ + return output + + @property + def config(self): + return self._config + +class default__: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "simple.types.boolean.internaldafny.impl_Compile._default" + @staticmethod + def DefaultSimpleBooleanConfig(): + return simple.types.boolean.internaldafny.types.SimpleBooleanConfig_SimpleBooleanConfig() + + @staticmethod + def SimpleBoolean(config): + res: Wrappers_Compile.Result = None + d_72_client_: simple.types.boolean.internaldafny.impl.SimpleBooleanClient + nw1_ = simple.types.boolean.internaldafny.impl.SimpleBooleanClient() + nw1_.ctor__(SimpleBooleanImpl_Compile.Config_Config()) + d_72_client_ = nw1_ + res = Wrappers_Compile.Result_Success(d_72_client_) + return res + return res + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/simple/types/boolean/internaldafny/types.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/simple/types/boolean/internaldafny/types.py new file mode 100644 index 0000000000..ef76159cf4 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/simple/types/boolean/internaldafny/types.py @@ -0,0 +1,147 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny +import System_ +import Wrappers_Compile +import StandardLibrary_mUInt_Compile +import StandardLibrary_Compile +import UTF8 + +assert "simple.types.boolean.internaldafny.types" == __name__ + +class DafnyCallEvent: + @classmethod + def default(cls, default_I, default_O): + return lambda: DafnyCallEvent_DafnyCallEvent(default_I(), default_O()) + def __ne__(self, __o: object) -> bool: + return not self.__eq__(__o) + @property + def is_DafnyCallEvent(self) -> bool: + return isinstance(self, simple.types.boolean.internaldafny.types.DafnyCallEvent_DafnyCallEvent) + +class DafnyCallEvent_DafnyCallEvent(DafnyCallEvent, NamedTuple('DafnyCallEvent', [('input', Any), ('output', Any)])): + def __dafnystr__(self) -> str: + return f'simple.types.boolean.internaldafny.types_Compile.DafnyCallEvent.DafnyCallEvent({_dafny.string_of(self.input)}, {_dafny.string_of(self.output)})' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, simple.types.boolean.internaldafny.types.DafnyCallEvent_DafnyCallEvent) and self.input == __o.input and self.output == __o.output + def __hash__(self) -> int: + return super().__hash__() + + +class GetBooleanInput: + @classmethod + def default(cls, ): + return lambda: GetBooleanInput_GetBooleanInput(Wrappers_Compile.Option_None.default()()) + def __ne__(self, __o: object) -> bool: + return not self.__eq__(__o) + @property + def is_GetBooleanInput(self) -> bool: + return isinstance(self, simple.types.boolean.internaldafny.types.GetBooleanInput_GetBooleanInput) + +class GetBooleanInput_GetBooleanInput(GetBooleanInput, NamedTuple('GetBooleanInput', [('value', Any)])): + def __dafnystr__(self) -> str: + return f'simple.types.boolean.internaldafny.types_Compile.GetBooleanInput.GetBooleanInput({_dafny.string_of(self.value)})' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, simple.types.boolean.internaldafny.types.GetBooleanInput_GetBooleanInput) and self.value == __o.value + def __hash__(self) -> int: + return super().__hash__() + + +class GetBooleanOutput: + @classmethod + def default(cls, ): + return lambda: GetBooleanOutput_GetBooleanOutput(Wrappers_Compile.Option_None.default()()) + def __ne__(self, __o: object) -> bool: + return not self.__eq__(__o) + @property + def is_GetBooleanOutput(self) -> bool: + return isinstance(self, simple.types.boolean.internaldafny.types.GetBooleanOutput_GetBooleanOutput) + +class GetBooleanOutput_GetBooleanOutput(GetBooleanOutput, NamedTuple('GetBooleanOutput', [('value', Any)])): + def __dafnystr__(self) -> str: + return f'simple.types.boolean.internaldafny.types_Compile.GetBooleanOutput.GetBooleanOutput({_dafny.string_of(self.value)})' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, simple.types.boolean.internaldafny.types.GetBooleanOutput_GetBooleanOutput) and self.value == __o.value + def __hash__(self) -> int: + return super().__hash__() + + +class ISimpleBooleanClientCallHistory: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "simple.types.boolean.internaldafny.types_Compile.ISimpleBooleanClientCallHistory" + +class ISimpleBooleanClient: + pass + def GetBoolean(self, input): + pass + + +class SimpleBooleanConfig: + @_dafny.classproperty + def AllSingletonConstructors(cls): + return [SimpleBooleanConfig_SimpleBooleanConfig()] + @classmethod + def default(cls, ): + return lambda: SimpleBooleanConfig_SimpleBooleanConfig() + def __ne__(self, __o: object) -> bool: + return not self.__eq__(__o) + @property + def is_SimpleBooleanConfig(self) -> bool: + return isinstance(self, simple.types.boolean.internaldafny.types.SimpleBooleanConfig_SimpleBooleanConfig) + +class SimpleBooleanConfig_SimpleBooleanConfig(SimpleBooleanConfig, NamedTuple('SimpleBooleanConfig', [])): + def __dafnystr__(self) -> str: + return f'simple.types.boolean.internaldafny.types_Compile.SimpleBooleanConfig.SimpleBooleanConfig' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, simple.types.boolean.internaldafny.types.SimpleBooleanConfig_SimpleBooleanConfig) + def __hash__(self) -> int: + return super().__hash__() + + +class Error: + @classmethod + def default(cls, ): + return lambda: Error_CollectionOfErrors(_dafny.Seq({}), _dafny.Seq({})) + def __ne__(self, __o: object) -> bool: + return not self.__eq__(__o) + @property + def is_CollectionOfErrors(self) -> bool: + return isinstance(self, simple.types.boolean.internaldafny.types.Error_CollectionOfErrors) + @property + def is_Opaque(self) -> bool: + return isinstance(self, simple.types.boolean.internaldafny.types.Error_Opaque) + +class Error_CollectionOfErrors(Error, NamedTuple('CollectionOfErrors', [('list', Any), ('message', Any)])): + def __dafnystr__(self) -> str: + return f'simple.types.boolean.internaldafny.types_Compile.Error.CollectionOfErrors({_dafny.string_of(self.list)}, {_dafny.string_of(self.message)})' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, simple.types.boolean.internaldafny.types.Error_CollectionOfErrors) and self.list == __o.list and self.message == __o.message + def __hash__(self) -> int: + return super().__hash__() + +class Error_Opaque(Error, NamedTuple('Opaque', [('obj', Any)])): + def __dafnystr__(self) -> str: + return f'simple.types.boolean.internaldafny.types_Compile.Error.Opaque({_dafny.string_of(self.obj)})' + def __eq__(self, __o: object) -> bool: + return isinstance(__o, simple.types.boolean.internaldafny.types.Error_Opaque) and self.obj == __o.obj + def __hash__(self) -> int: + return super().__hash__() + + +class OpaqueError: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "" + @staticmethod + def default(): + return simple.types.boolean.internaldafny.types.Error_CollectionOfErrors.default()() + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/simple/types/boolean/internaldafny/wrapped.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/simple/types/boolean/internaldafny/wrapped.py new file mode 100644 index 0000000000..195cb04b03 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/simple/types/boolean/internaldafny/wrapped.py @@ -0,0 +1,29 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny +import System_ +import Wrappers_Compile +import StandardLibrary_mUInt_Compile +import StandardLibrary_Compile +import UTF8 +import simple.types.boolean.internaldafny.types +import SimpleBooleanImpl_Compile +import simple.types.boolean.internaldafny.impl +import SimpleBooleanImplTest_Compile + +assert "simple.types.boolean.internaldafny.wrapped" == __name__ + +class default__: + def __init__(self): + pass + + def __dafnystr__(self) -> str: + return "simple.types.boolean.internaldafny.wrapped_Compile._default" + @staticmethod + def WrappedDefaultSimpleBooleanConfig(): + return simple.types.boolean.internaldafny.types.SimpleBooleanConfig_SimpleBooleanConfig() + diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/extern/Extern.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/extern/Extern.py new file mode 100644 index 0000000000..90540eacbe --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/extern/Extern.py @@ -0,0 +1,22 @@ +import sys +from typing import Callable, Any, TypeVar, NamedTuple +from math import floor +from itertools import count + +import module_ +import _dafny +import System_ +import SimpleBooleanImplTest_Compile +import simple.types.boolean.internaldafny.types +from smithy_generated.simple_boolean.client import SimpleBoolean +from .Shim import SimpleBooleanShim +import Wrappers_Compile + +@staticmethod +def WrappedSimpleBoolean(config): + wrapped_config = config + impl = SimpleBoolean(wrapped_config) + wrapped_client = SimpleBooleanShim(impl) + return Wrappers_Compile.Result_Success(wrapped_client) + +simple.types.boolean.internaldafny.wrapped.default__.WrappedSimpleBoolean = WrappedSimpleBoolean \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/extern/Shim.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/extern/Shim.py new file mode 100644 index 0000000000..cba97104c9 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/extern/Shim.py @@ -0,0 +1,28 @@ +# TODO generate this + +import simple.types.boolean.internaldafny.types +import smithy_generated.simple_boolean.client as SimpleBoolean +import Wrappers_Compile +import asyncio +from smithy_generated.simple_boolean.models import GetBooleanInput + +class SimpleBooleanShim(simple.types.boolean.internaldafny.types.ISimpleBooleanClient): + def __init__(self, _impl: SimpleBoolean) : + self._impl = _impl + + def GetBoolean(self, input: simple.types.boolean.internaldafny.types.GetBooleanInput_GetBooleanInput) -> simple.types.boolean.internaldafny.types.GetBooleanOutput_GetBooleanOutput: + ''' + unwrapped_request = TypeConversion.ToNative(input) + try: + wrapped_response = self._impl.get_boolean(unwrapped_request) + return Wrappers_Compile.Result_Success(wrapped_response) + catch ex: + return Wrappers_Compile.Result_Failure(ex) + ''' + + unwrapped_request: GetBooleanInput = GetBooleanInput(value=input.value) + wrapped_response = asyncio.run(self._impl.get_boolean(unwrapped_request)) + return Wrappers_Compile.Result_Success(wrapped_response) + + + \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/extern/__pycache__/Extern.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/extern/__pycache__/Extern.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6fb27d85817f75fccaf258122694de33d4ec8dd1 GIT binary patch literal 1400 zcmah{&2QX96d$j>pI&d8W;ZRQAOuyFt*W(z;1W;;v>bY94r~C)7t6ILS*J6$H8ZPX zDV6q+8-GAKaNtxxz44bgXb;wiN|8AA7Raq9-psC-E*EB=-{-tH^L~CmJ5C3|`u)f6 zqu*)>{i%#)#__evaeRHHy|vQbUTHg(=5JS8WQ@_U{YshpLrb>q1%w2T2$tsONiLfQd4|6U znC$Ea6h{ZsjNqXm>xU#wnNq@Zng~#waZDlhMVb;EB(Dr82j0y!?|2f^P(`X`f}+05 zV_?tF33_UXH{vJ8bFf~lJWp#vonEe!+JB;^s8=zBj#np7%=L57t^u90HXLR)FnQ%$ z7GxP_+`pI7EQa2DUtvBa!XHn=5OWT=G{Q7FjE`jRi9Q?oOWRUyzu_e@P6W50?0c|Y zPu;IM6n4opq+ygM?tRQ3i!^her0j74Cfr@%rogZCC9*C9 zykiRPEEf|f$XV#(?*wLv`=u76ESLR7N6{MmtPii+fRBF&Y=+JUJG1?l_Vpj$J+pV` z_U`Qd%fYRm#M$7^d~ioacINi&U+$jSdvklQu=Xw?3k`2bljmGEM4rXT5mPWT)h<)u zvj#9}(LhXCQ>pD3UM65DIBO}pNz-UburC{a6dbAn8|PeL>dSZ5-ueJgRdB5S$S&9O zHG*p~A3a)(*(gp_;{nmN7BSgaoRqgXjm0GQk8pxnAaFEV1pF#F)c;D)fwa_Y>S`E(b%lBYYUB;qiY(YyidB7O>Z?PZzD6`dQ-Ma?okxj?}FGEuE}dSl_}qK8Ic%o?ZNIqJ{R`*U=Ajy{^B2Zbh$ F$v+GChq3?w literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/extern/__pycache__/Shim.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/extern/__pycache__/Shim.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..3cc3a3e3cc8ebefbd027f61f94f0c9597d3ba885 GIT binary patch literal 2224 zcma(SO>Y}TbY^X@oy3V#5!BEWVtOF9M0PpAr6nOv5T!^YDNaH1Wwq>1>UH<4GqY(N zxl)iSQ32wH(nAkHs)|tiBRKE_9JCVANIh}lW|VU2iJ4h@9VZkzJAPmD=FNL=-W&fk zK0XTg@P7E#{wfQ=AA;$RT#q>Vh7)_h1~zm-9ZIZt8B2k{%hq!+SyAh%T*=q-94l_Y z8>x>#pnxmD&fEod7Qv=GOIU4=^=yM?F{K8p<9*qq3;>V$FB$a-8`eNI_orZ2tB{qh zAi5j`E;9YAei%`!rzjB*M~s+qPvmhS$5#-A0l#-2BCgCz&AtJw2&SK zZp#aB*w8l+p`Qjea*3Wex6ukwpYA!T58EgfxBgneBEp@l70Fbv0c zsA24!I~AnXUlVyD;+}WG;j8EFWxpG}$G;;k04(Q-%Va7>G{XK+LPSle~jbPQJ&K9c3bX3!=6t^y> zj4(H_M8d!)h?^3XpvijDZXjxWnKVh|)Tslj!cda%@)y!GOpKMl3mq3}pCJ;t)Tl+4 zg$SvfJa1scGO5)lqwQh;{>SV`rsGB!RnYdp5O40>mgz>QTEODAaESw!H%ZI4oPcF` z8OlOuW5>c{lP5iA6T_}ovskn?7LN`)b1EBb@?>a4l!r`>Xn!_3cyM;kpDymfs;CO` z2?x92?W` z#WUABh3TiI*|?;2^bZb7OL1wbQ&_^{&0MV(MSuCGhYW*_8ip6xkt^t;Vcd#Lx3@Ar zM@N(fY0*t zeg@KGEE0!BZ%H6H@-+v$>DN_YZsxw%1st6OYB6^i?yC=rarxc2yd0N5j?0ZM5YmoE zVz2cK03R+Z60Ilb^8{@xiQa$1#7E&?wZtk(hBTQVt(PBdC_TvF>w}|J^M$5Q? ze1uJkY%ST}Z#T_y9pqCsF)U_kBF8h_2!2I?$(J(6@0vf(Nk6 t?8@&DEO&-yH#-S0!!G!Dcwc=`jHlm@r!U6SOY!vezog!?7ih~6{sC%DLfZfU literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/Iamaredme b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/Iamaredme new file mode 100644 index 0000000000..63b8568325 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/Iamaredme @@ -0,0 +1,3 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +yo diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/README.md b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/README.md new file mode 100644 index 0000000000..4d95aa6598 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/README.md @@ -0,0 +1,3 @@ +## Simple_boolean Client + +simple_boolean client diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/plugin b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/plugin new file mode 100644 index 0000000000..63b8568325 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/plugin @@ -0,0 +1,3 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +yo diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/pyproject.toml b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/pyproject.toml new file mode 100644 index 0000000000..cb3492f592 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/pyproject.toml @@ -0,0 +1,46 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +[build-system] +requires = ["setuptools", "setuptools-scm", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "simple_boolean" +version = "0.0.1" +description = "simple_boolean client" +readme = "README.md" +requires-python = ">=3.11" +keywords = ["smithy", "simple_boolean"] +license = {text = "Apache-2.0"} +classifiers = [ + "Development Status :: 2 - Pre-Alpha", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "Natural Language :: English", + "License :: OSI Approved :: Apache Software License", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.11" +] + +dependencies = [ + "smithy_python==0.0.1" +] +[tool.setuptools.packages.find] +exclude=["tests*"] + +[tool.mypy] +strict = true +warn_unused_configs = true + +[[tool.mypy.overrides]] +module = ["awscrt", "pytest"] +ignore_missing_imports = true + +[tool.black] +target-version = ["py311"] + +[tool.pytest.ini_options] +python_classes = ["!Test"] +asyncio_mode = "auto" diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__init__.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__init__.py new file mode 100644 index 0000000000..247be3e3d4 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__init__.py @@ -0,0 +1 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__pycache__/__init__.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a1e226a22480ed7d8e79029b7b4bcc4e0e0261e5 GIT binary patch literal 253 zcmXv}u}%Xq3{9v&2&v*bSnvi*#ei60X_=$rVsTNEII?p>`34p?CT7HU@dK5*b;5^w zZ+L!w*0b#I+n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&5Y5&)+c z;4_GX>`5ekxRA`&YV3(bx{yjF$cJp)Yd`{r-6{^hVdSv0$6@b|+l3SIegg*?IBc4= zmmCV-#-BlOI0~)248g8EhhZ*<4L66S>O-V_b~1nq+Up697Vr$5hj-L}Rg>N70J8}R z?Xq@P5hV9-Jhc4vGRZzlf41)z*(bB5iF4$+F=+`~;qw1Yuvf(P zD^f6Cb>dnVgsa7_iO+0e=hTx{apsD2A})5urSO|oH?H@frsk>_=X}UTSN%ALjLATe zvYw&H>?Eg~UwPh|0;T?&Xi!=xR493c4kZr}0GPUJ{3)7$Kv_>w&%+&CEX+#kfz0N% z``=qzcsM8SyChz@DGuJ0+Lolqt*TvV;6Q=CwWAMT5l7F9vzNub%Tm*os#B?RVZOMP zya&13?;l;;C+;{cPUpmVp)@Us?SkZ7sCtzaXtSRq<~D2d^GI}a8mv%>If*IQC+?XQ zFD{5Ti=~T2v9BmKEm!Th-m&$}PF##Dv-N~fX_)ZRo25N(ir+5+hJDR+#PkB8 zKcSA8;Hm$J=_`Z+M@>~b?gK>7RVU7&EfPg}u-;4$^~?4ozm!j93gi_TcM5A0MtQOg zUTfkA08vq*tT@!CcfRW7f*tF(cQgO6c#W(%Vs<)c1gyU4p)Vt5vD#WtK^WAr=6LB%{yaChJl z4mHI8C8XfpP!#MY6%|pd{;n7wp{j!Rir;oWN4=u)uA0mg$ilZL4n!Rg(YXGuptIs; zcLkjiH@lys9&xj~f<{H-T|ta!yti6i1r3YF8@T19SM00ylA}d(wA`^);IVnNrR0oC Z&gdOm)snJOAmf{-FG%@UThx*b`)`AZz(D{2 literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__pycache__/config.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__pycache__/config.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bea34930e54a48b55f810973988ab02cfb85142c GIT binary patch literal 1818 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deserialize.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__pycache__/deserialize.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..8119d1f0996c27c5bf665878ee4160310ec0b129 GIT binary patch literal 823 zcmZ`$y^9k;6rb5-C)qnAf+&6!5iE>F26JE`a)KUMh-Y!JNfXwcm& zW+7}2rt1ja5kUl%B%%X{65)uNtVQ)fy~1_rMr^l&9z>A2vxyAc$G*&<<0v~5wTcRH!{R0? zZTq&{`)~OJ4N7yF1yLZ9m~VjIF-gjwBx)y>egHg8WF93d9rHeDb1xAfHQx%OR6;*b zVS(op;wpuGeW}FYVAqM3e5L{QshYx2{%Gd$$L zQ)ZE3kvTI2v^f)qe8^hBFE4>LhOM zo9O4LCN)awggMlikfT(S(DMa3cX<6Imx}+Ft+7^IxoOL+eLr29qAx0Yq^kJ+1#Vm3 A5dZ)H literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__pycache__/errors.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__pycache__/errors.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..dfb11b43caa76dfa741817f56bd9ad372f04aaa3 GIT binary patch literal 1822 zcmb7E&1>976rYi_EA4u>PTG>V(8ltmjUe46p%eyilIeNDD>3ZhRvbm)HkD**KyK7M|wZa$D8-wy!X@m z*lgAjw6}lwhAwFc{UrxwGbf$#&(PUN6j2KJLLgQ&KPsLqTd9ijUm zMRO|}VmdXBFwBBXW~*vP1$I*vB6CCtlR2jBflQ4EGU3E~d!UD0X$KfjvEM ztT6s%;IrGD$9%hW%M;9IvTv`0cwtzKgdIe7+GVyV)LV5M+OlKh79o+>V}#^&LV7Xn zhqB)w)X@RH47j9&f+}=`tU-4Aj5J)aMhM_f!^#$Uv((M;>Jzyx`7wSAG`>2M z?KNPR3oK$4s@;S&U{rNo8=`egjopT84$&R#T2PHjZoQubMI~-LqY_>cJg*wL;X|5o z6Vf2O4dw&sPn!%*%J@@&@9;iKOKQOQ2;@FU(GJh7lyeB};3w&hVP*%BQy&z;0q`;~ zsv`Oc#1qG-eRqJiBn^z13=)Gwc#69ZgcDa(%e%rwh2E-yST1K~1P z#c5QTUz0-#FN28d0Mi6!=u8UduV#zGH};&9`m4vrRd^pLgic{i8M*@dmz`Q(O$P}C z&t-lJ-xcWPwcB@mmdHvMzqw?9DxiwsTxgH2o5dCOE?)pWS$FXZz(~g!kE#g2d5o_8 z*E_1}xHdvh!`?d&u_)~fBodr4e8R6F3&5e)cp&oWTNu` literal 0 HcmV?d00001 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__pycache__/models.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__pycache__/models.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..15f30e423182e684d7539b5c11be9555a9bb0995 GIT binary patch literal 5274 zcmeHK|7#q_6`$GN`=Yy(PLgfKk`-$e$Bs_4cR9OBsZk86RfncjF13>%jx^`h?MQdg z-tBpI&(0lkQ9+P16+u6==%6;}hs2F={)hArXyH^;5DNi82_(OSGfKher@l9PxA(;o zxS^&Py1IQkv-9Td%;&v%@1sBW_lF2vuiyW@z7ZzmpV(<#O0%&)2aOG)6P+3)Pg686 zrKG%^k|~kMTSS*ui7r2o2zdy%d!-aHqQHo+XT+!buaQ{b8&r(Rj{Ih!>?pIjjO_%k z7VVr_(2Pveig@^%o&C?Du|XI~QJtiucLr%SqgkLt90bV1UURe#E_ z`&fVlS>J-xo(W_ARV5W-VLkBVsP5Crf}#gkl?Pz`q4&L11Z)LiZXe9;*F&ri`U+@< zp+BHYu*ZlKeT&&YHBEzQg`XFSCEM}c(u@+D+oC)OmNK+y4xfmf4EO$V5F2EfE|WC0 z+)F3d$QGUBebC*K9K~YBf-qs>G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ny-lsHBO};08bN{M~O;Dd>^#An+TAa?}bq+ zVLwk{!K*28mBl8E@O7G-5f;=c;5rJ;C?6a^49YhkxGuL39?U1pQ9|g;@G*4Lyx15l zL)>8&N$LzLw#U%t5dPrxjQnbDzJvGUNwfF8+56G#P2AoL7s+nND=y7@bdA;6tvYqX z*no GetBooleanOutput: + """Invokes the GetBoolean operation. + + :param input: The operation's input. + + :param plugins: A list of callables that modify the configuration dynamically. + Changes made by these plugins only apply for the duration of the operation + execution and will not affect any other operation invocations. + """ + operation_plugins = [ + + ] + if plugins: + operation_plugins.extend(plugins) + + return await self._execute_operation( + input=input, + plugins=operation_plugins, + serialize=_serialize_get_boolean, + deserialize=_deserialize_get_boolean, + config=self._config, + ) + + async def _execute_operation( + self, + input: Input, + plugins: list[Plugin], + serialize: Callable[[Input, Config], Awaitable[GetBooleanOutput_GetBooleanOutput]], + deserialize: Callable[[GetBooleanInput_GetBooleanInput, Config], Awaitable[Output]], + config: Config, + ) -> Output: + try: + return await self._handle_execution( + input, plugins, serialize, deserialize, config + ) + except Exception as e: + # Make sure every exception that we throw is an instance of ServiceError so + # customers can reliably catch everything we throw. + if not isinstance(e, ServiceError): + raise ServiceError(e) from e + raise e + + async def _handle_execution( + self, + input: Input, + plugins: list[Plugin], + serialize: Callable[[Input, Config], Awaitable[GetBooleanOutput_GetBooleanOutput]], + deserialize: Callable[[GetBooleanInput_GetBooleanInput, Config], Awaitable[Output]], + config: Config, + ) -> Output: + context: InterceptorContext[Input, None, None, None] = InterceptorContext( + request=input, + response=None, + transport_request=None, + transport_response=None, + ) + _client_interceptors = config.interceptors or [] + client_interceptors = cast( + list[Interceptor[Input, Output, GetBooleanOutput_GetBooleanOutput, GetBooleanInput_GetBooleanInput]], _client_interceptors + ) + interceptors = client_interceptors + + try: + # Step 1a: Invoke read_before_execution on client-level interceptors + for interceptor in client_interceptors: + interceptor.read_before_execution(context) + + # Step 1b: Run operation-level plugins + config = deepcopy(config) + for plugin in plugins: + plugin(config) + + _client_interceptors = config.interceptors or [] + interceptors = cast( + list[Interceptor[Input, Output, GetBooleanOutput_GetBooleanOutput, GetBooleanInput_GetBooleanInput]], + _client_interceptors, + ) + + # Step 1c: Invoke the read_before_execution hooks on newly added + # interceptors. + for interceptor in interceptors: + if interceptor not in client_interceptors: + interceptor.read_before_execution(context) + + # Step 2: Invoke the modify_before_serialization hooks + for interceptor in interceptors: + context._request = interceptor.modify_before_serialization(context) + + # Step 3: Invoke the read_before_serialization hooks + for interceptor in interceptors: + interceptor.read_before_serialization(context) + + # Step 4: Serialize the request + context_with_transport_request = cast( + InterceptorContext[Input, None, GetBooleanOutput_GetBooleanOutput, None], context + ) + context_with_transport_request._transport_request = await serialize( + context_with_transport_request.request, config + ) + + # Step 5: Invoke read_after_serialization + for interceptor in interceptors: + interceptor.read_after_serialization(context_with_transport_request) + + # Step 6: Invoke modify_before_retry_loop + for interceptor in interceptors: + context_with_transport_request._transport_request = ( + interceptor.modify_before_retry_loop(context_with_transport_request) + ) + + # Step 7: Acquire the retry token. + retry_strategy = config.retry_strategy + if retry_strategy is None: + raise ServiceError( + "No retry_strategy found on the operation config." + ) + retry_token = retry_strategy.acquire_initial_retry_token() + + while True: + # Make an attempt, creating a copy of the context so we don't pass + # around old data. + context_with_response = await self._handle_attempt( + deserialize, + interceptors, + context_with_transport_request.copy(), + config, + ) + + # We perform this type-ignored re-assignment because `context` needs + # to point at the latest context so it can be generically handled + # later on. This is only an issue here because we've created a copy, + # so we're no longer simply pointing at the same object in memory + # with different names and type hints. It is possible to address this + # without having to fall back to the type ignore, but it would impose + # unnecessary runtime costs. + context = context_with_response # type: ignore + + if isinstance(context_with_response.response, Exception): + # Step 7u: Reacquire retry token if the attempt failed + try: + retry_token = retry_strategy.refresh_retry_token_for_retry( + token_to_renew=retry_token, + error_info=RetryErrorInfo( + # TODO: Determine the error type. + error_type=RetryErrorType.CLIENT_ERROR, + ) + ) + except SmithyRetryException: + raise context_with_response.response + await sleep(retry_token.retry_delay) + else: + # Step 8: Invoke record_success + retry_strategy.record_success(token=retry_token) + break + except Exception as e: + if context.response is not None: + # config.logger.exception(f"Exception occurred while handling: {context.response}") + pass + context._response = e + + # At this point, the context's request will have been definitively set, and + # The response will be set either with the modeled output or an exception. The + # transport_request and transport_response may be set or None. + execution_context = cast( + InterceptorContext[Input, Output, GetBooleanOutput_GetBooleanOutput | None, GetBooleanInput_GetBooleanInput | None], context + ) + return await self._finalize_execution(interceptors, execution_context) + + async def _handle_attempt( + self, + deserialize: Callable[[GetBooleanInput_GetBooleanInput, Config], Awaitable[Output]], + interceptors: list[Interceptor[Input, Output, GetBooleanOutput_GetBooleanOutput, GetBooleanInput_GetBooleanInput]], + context: InterceptorContext[Input, None, GetBooleanOutput_GetBooleanOutput, None], + config: Config, + ) -> InterceptorContext[Input, Output, GetBooleanOutput_GetBooleanOutput, GetBooleanInput_GetBooleanInput | None]: + try: + # assert config.interceptors is not None + # Step 7a: Invoke read_before_attempt + for interceptor in interceptors: + interceptor.read_before_attempt(context) + + # Steps 7b-e haven't had their python designs finalized yet + # Step 7b: Invoke service_auth_scheme_resolver.resolve_auth_scheme + # Step 7c: Invoke auth_scheme.identity_resolver + # Step 7d: Invoke auth_scheme.signer + # Step 7e: Invoke identity_resolver.resolve_identity + + # Step 7g: Invoke modify_before_signing + for interceptor in interceptors: + context._transport_request = interceptor.modify_before_signing(context) + + # Step 7h: Invoke read_before_signing + for interceptor in interceptors: + interceptor.read_before_signing(context) + + # Step 7i: Invoke signer.sign_request + # This step hasn't had its python design finalized yet + + # Step 7j: Invoke read_after_signing + for interceptor in interceptors: + interceptor.read_after_signing(context) + + # Step 7k: Invoke modify_before_transmit + for interceptor in interceptors: + context._transport_request = interceptor.modify_before_transmit(context) + + # Step 7l: Invoke read_before_transmit + for interceptor in interceptors: + interceptor.read_before_transmit(context) + + ## HERE + # Step 7m: Invoke http_client.send + if config.impl is None: + raise Exception("No impl found on the operation config.") + + context_with_response = cast( + InterceptorContext[Input, None, GetBooleanInput_GetBooleanInput, GetBooleanOutput_GetBooleanOutput], context + ) + + print(f"transport_request is {context_with_response.transport_request}") + + context_with_response._transport_response = config.impl.GetBoolean( + input=context_with_response.transport_request + ) + + # Step 7n: Invoke read_after_transmit + for interceptor in interceptors: + interceptor.read_after_transmit(context_with_response) + + # Step 7o: Invoke modify_before_deserialization + for interceptor in interceptors: + context_with_response._transport_response = ( + interceptor.modify_before_deserialization(context_with_response) + ) + + # Step 7p: Invoke read_before_deserialization + for interceptor in interceptors: + interceptor.read_before_deserialization(context_with_response) + + # Step 7q: deserialize + context_with_output = cast( + InterceptorContext[Input, Output, GetBooleanOutput_GetBooleanOutput, GetBooleanInput_GetBooleanInput], + context_with_response, + ) + context_with_output._response = await deserialize( + context_with_output._transport_response, config + ) + + # Step 7r: Invoke read_after_deserialization + for interceptor in interceptors: + interceptor.read_after_deserialization(context_with_output) + except Exception as e: + if context.response is not None: + # config.logger.exception(f"Exception occurred while handling: {context.response}") + pass + context._response = e + + # At this point, the context's request and transport_request have definitively been set, + # the response is either set or an exception, and the transport_resposne is either set or + # None. This will also be true after _finalize_attempt because there is no opportunity + # there to set the transport_response. + attempt_context = cast( + InterceptorContext[Input, Output, GetBooleanOutput_GetBooleanOutput, GetBooleanInput_GetBooleanInput | None], context + ) + return await self._finalize_attempt(interceptors, attempt_context) + + async def _finalize_attempt( + self, + interceptors: list[Interceptor[Input, Output, GetBooleanOutput_GetBooleanOutput, GetBooleanInput_GetBooleanInput]], + context: InterceptorContext[Input, Output, GetBooleanOutput_GetBooleanOutput, GetBooleanInput_GetBooleanInput | None], + ) -> InterceptorContext[Input, Output, GetBooleanOutput_GetBooleanOutput, GetBooleanInput_GetBooleanInput | None]: + # Step 7s: Invoke modify_before_attempt_completion + try: + for interceptor in interceptors: + context._response = interceptor.modify_before_attempt_completion( + context + ) + except Exception as e: + if context.response is not None: + # config.logger.exception(f"Exception occurred while handling: {context.response}") + pass + context._response = e + + # Step 7t: Invoke read_after_attempt + for interceptor in interceptors: + try: + interceptor.read_after_attempt(context) + except Exception as e: + if context.response is not None: + # config.logger.exception(f"Exception occurred while handling: {context.response}") + pass + context._response = e + + return context + + async def _finalize_execution( + self, + interceptors: list[Interceptor[Input, Output, GetBooleanOutput_GetBooleanOutput, GetBooleanInput_GetBooleanInput]], + context: InterceptorContext[Input, Output, GetBooleanOutput_GetBooleanOutput | None, GetBooleanInput_GetBooleanInput | None], + ) -> Output: + try: + # Step 9: Invoke modify_before_completion + for interceptor in interceptors: + context._response = interceptor.modify_before_completion(context) + + # Step 10: Invoke trace_probe.dispatch_events + try: + pass + except Exception as e: + # log and ignore exceptions + # config.logger.exception(f"Exception occurred while dispatching trace events: {e}") + pass + except Exception as e: + if context.response is not None: + # config.logger.exception(f"Exception occurred while handling: {context.response}") + pass + context._response = e + + # Step 11: Invoke read_after_execution + for interceptor in interceptors: + try: + interceptor.read_after_execution(context) + except Exception as e: + if context.response is not None: + # config.logger.exception(f"Exception occurred while handling: {context.response}") + pass + context._response = e + + # Step 12: Return / throw + if isinstance(context.response, Exception): + raise context.response + + # We may want to add some aspects of this context to the output types so we can + # return it to the end-users. + return context.response diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/config.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/config.py new file mode 100644 index 0000000000..b577e5b226 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/config.py @@ -0,0 +1,31 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +from dataclasses import dataclass +from typing import Any, Callable, TypeAlias, Union + +from simple.types.boolean.internaldafny.types import ISimpleBooleanClient +from smithy_python.interfaces.interceptor import Interceptor +from smithy_python.interfaces.retries import RetryStrategy + +from .models import GetBooleanInput, GetBooleanOutput + + +_ServiceInterceptor = Union[Interceptor[GetBooleanInput, GetBooleanOutput, Any, Any]] +@dataclass(kw_only=True) +class Config: + """Configuration for SimpleBoolean + + :param interceptors: The list of interceptors, which are hooks that are called + during the execution of a request. + + :param retry_strategy: The retry strategy for issuing retry tokens and computing + retry delays. + + :param impl: + """ + interceptors: list[_ServiceInterceptor] | None = None + retry_strategy: RetryStrategy | None = None + impl: ISimpleBooleanClient | None = None + +# A callable that allows customizing the config object on each request. +Plugin: TypeAlias = Callable[[Config], None] diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/deserialize.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/deserialize.py new file mode 100644 index 0000000000..e7605bc689 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/deserialize.py @@ -0,0 +1,13 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +from simple.types.boolean.internaldafny.types import ( + GetBooleanOutput_GetBooleanOutput as DafnyGetBooleanOutput, +) + +from .config import Config +from .models import GetBooleanOutput + + +async def _deserialize_get_boolean(input: DafnyGetBooleanOutput, config: Config) -> GetBooleanOutput: + + return GetBooleanOutput(value=input.value.value) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/endpoints.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/endpoints.py new file mode 100644 index 0000000000..49b2f71554 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/endpoints.py @@ -0,0 +1,7 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +from smithy_python._private.http import StaticEndpointParams, StaticEndpointResolver + + +EndpointParams = StaticEndpointParams +EndpointResolver = StaticEndpointResolver diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/errors.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/errors.py new file mode 100644 index 0000000000..6f38ba4e80 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/errors.py @@ -0,0 +1,23 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +from typing import Generic, Literal, TypeVar + + +class ServiceError(Exception): + """Base error for all errors in the service. + """ + pass + +T = TypeVar('T') +class ApiError(ServiceError, Generic[T]): + """Base error for all api errors in the service. + """ + code: T + def __init__(self, message: str): + super().__init__(message) + self.message = message + +class UnknownApiError(ApiError[Literal['Unknown']]): + """Error representing any unknown api errors + """ + code: Literal['Unknown'] = 'Unknown' diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/models.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/models.py new file mode 100644 index 0000000000..43b48bab05 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/models.py @@ -0,0 +1,108 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +from typing import Any, Dict, Optional + + +class GetBooleanInput: + value: Optional[bool] + def __init__( + self, + *, + value: Optional[bool] = None, + ): + self.value = value + + def as_dict(self) -> Dict[str, Any]: + """Converts the GetBooleanInput to a dictionary. + + The dictionary uses the modeled shape names rather than the parameter names as + keys to be mostly compatible with boto3. + """ + d: Dict[str, Any] = {} + + if self.value is not None: + d["value"] = self.value + + return d + + @staticmethod + def from_dict(d: Dict[str, Any]) -> "GetBooleanInput": + """Creates a GetBooleanInput from a dictionary. + + The dictionary is expected to use the modeled shape names rather than the + parameter names as keys to be mostly compatible with boto3. + """ + kwargs: Dict[str, Any] = {} + + if "value" in d: + kwargs["value"] = d["value"] + + return GetBooleanInput(**kwargs) + + def __repr__(self) -> str: + result = "GetBooleanInput(" + if self.value is not None: + result += f"value={repr(self.value)}" + + return result + ")" + + def __eq__(self, other: Any) -> bool: + if not isinstance(other, GetBooleanInput): + return False + attributes: list[str] = ['value',] + return all( + getattr(self, a) == getattr(other, a) + for a in attributes + ) + +class GetBooleanOutput: + value: Optional[bool] + def __init__( + self, + *, + value: Optional[bool] = None, + ): + self.value = value + + def as_dict(self) -> Dict[str, Any]: + """Converts the GetBooleanOutput to a dictionary. + + The dictionary uses the modeled shape names rather than the parameter names as + keys to be mostly compatible with boto3. + """ + d: Dict[str, Any] = {} + + if self.value is not None: + d["value"] = self.value + + return d + + @staticmethod + def from_dict(d: Dict[str, Any]) -> "GetBooleanOutput": + """Creates a GetBooleanOutput from a dictionary. + + The dictionary is expected to use the modeled shape names rather than the + parameter names as keys to be mostly compatible with boto3. + """ + kwargs: Dict[str, Any] = {} + + if "value" in d: + kwargs["value"] = d["value"] + + return GetBooleanOutput(**kwargs) + + def __repr__(self) -> str: + result = "GetBooleanOutput(" + if self.value is not None: + result += f"value={repr(self.value)}" + + return result + ")" + + def __eq__(self, other: Any) -> bool: + if not isinstance(other, GetBooleanOutput): + return False + attributes: list[str] = ['value',] + return all( + getattr(self, a) == getattr(other, a) + for a in attributes + ) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/plugin.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/plugin.py new file mode 100644 index 0000000000..13aeed05f5 --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/plugin.py @@ -0,0 +1,20 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +from .config import Config, Plugin +from smithy_python.interfaces.retries import RetryStrategy +from smithy_python.exceptions import SmithyRetryException + +def set_config_impl(config: Config): + from simple.types.boolean.internaldafny.impl import SimpleBooleanClient + config.impl = SimpleBooleanClient() + config.retry_strategy = NoRetriesStrategy() + +class NoRetriesToken: + retry_delay = 0 + +class NoRetriesStrategy(RetryStrategy): + def acquire_initial_retry_token(self): + return NoRetriesToken() + + def refresh_retry_token_for_retry(self, token_to_renew, error_info): + raise SmithyRetryException() diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/serialize.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/serialize.py new file mode 100644 index 0000000000..8042bf43ac --- /dev/null +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/serialize.py @@ -0,0 +1,12 @@ +# Code generated by smithy-python-codegen DO NOT EDIT. + +from simple.types.boolean.internaldafny.types import ( + GetBooleanInput_GetBooleanInput as DafnyGetBooleanInput, +) + +from .config import Config +from .models import GetBooleanInput + + +async def _serialize_get_boolean(input: GetBooleanInput, config: Config) -> DafnyGetBooleanInput: + return DafnyGetBooleanInput(value=input.value) From b4ebded0c81ce189f548f54f57c7edc2a9c43dbe Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Thu, 15 Jun 2023 16:25:08 -0700 Subject: [PATCH 022/673] cleanup --- .../python/TestsFromDafny-py-goal/Extern.py | 22 - .../python/TestsFromDafny-py-goal/Shim.py | 28 -- .../SimpleBooleanImplTest_Compile.py | 74 --- .../SimpleBooleanImpl_Compile.py | 58 --- .../python/TestsFromDafny-py-goal/System_.py | 20 - .../TestsFromDafny-py-goal/TestsFromDafny.py | 15 - .../WrappedSimpleTypesBooleanTest_Compile.py | 44 -- .../Wrappers_Compile.py | 190 ------- .../__pycache__/Extern.cpython-311.pyc | Bin 1275 -> 0 bytes .../__pycache__/Shim.cpython-311.pyc | Bin 2241 -> 0 bytes ...pleBooleanImplTest_Compile.cpython-311.pyc | Bin 7201 -> 0 bytes .../SimpleBooleanImpl_Compile.cpython-311.pyc | Bin 6236 -> 0 bytes .../__pycache__/System_.cpython-311.pyc | Bin 1361 -> 0 bytes ...leTypesBooleanTest_Compile.cpython-311.pyc | Bin 3770 -> 0 bytes .../Wrappers_Compile.cpython-311.pyc | Bin 14810 -> 0 bytes .../__pycache__/_dafny.cpython-311.pyc | Bin 34539 -> 0 bytes .../__pycache__/module_.cpython-311.pyc | Bin 6349 -> 0 bytes .../python/TestsFromDafny-py-goal/_dafny.py | 467 ----------------- .../python/TestsFromDafny-py-goal/module_.py | 82 --- .../python_client_codegen/README.md | 3 - .../python_client_codegen/pyproject.toml | 46 -- .../simple_boolean/__init__.py | 1 - .../__pycache__/__init__.cpython-311.pyc | Bin 272 -> 0 bytes .../__pycache__/client.cpython-311.pyc | Bin 12740 -> 0 bytes .../__pycache__/config.cpython-311.pyc | Bin 1591 -> 0 bytes .../__pycache__/deserialize.cpython-311.pyc | Bin 831 -> 0 bytes .../__pycache__/endpoints.cpython-311.pyc | Bin 456 -> 0 bytes .../__pycache__/errors.cpython-311.pyc | Bin 1841 -> 0 bytes .../__pycache__/models.cpython-311.pyc | Bin 5293 -> 0 bytes .../__pycache__/serialize.cpython-311.pyc | Bin 809 -> 0 bytes .../simple_boolean/client.py | 371 -------------- .../simple_boolean/config.py | 28 -- .../simple_boolean/deserialize.py | 11 - .../simple_boolean/endpoints.py | 7 - .../simple_boolean/errors.py | 23 - .../simple_boolean/models.py | 108 ---- .../simple_boolean/serialize.py | 11 - .../__pycache__/impl.cpython-311.pyc | Bin 4221 -> 0 bytes .../__pycache__/types.cpython-311.pyc | Bin 17720 -> 0 bytes .../__pycache__/wrapped.cpython-311.pyc | Bin 1893 -> 0 bytes .../types/boolean/internaldafny/impl.py | 57 --- .../types/boolean/internaldafny/types.py | 144 ------ .../types/boolean/internaldafny/wrapped.py | 24 - .../SimpleBooleanImplTest_Compile.py | 77 --- .../SimpleBooleanImpl_Compile.py | 62 --- .../StandardLibrary_Compile.py | 193 ------- .../StandardLibrary_mUInt_Compile.py | 208 -------- .../python/src/dafny_generated/System_.py | 20 - .../python/src/dafny_generated/UTF8.py | 118 ----- .../WrappedSimpleTypesBooleanTest_Compile.py | 51 -- .../src/dafny_generated/Wrappers_Compile.py | 190 ------- ...pleBooleanImplTest_Compile.cpython-311.pyc | Bin 7439 -> 0 bytes .../SimpleBooleanImpl_Compile.cpython-311.pyc | Bin 6358 -> 0 bytes .../StandardLibrary_Compile.cpython-311.pyc | Bin 13423 -> 0 bytes ...ndardLibrary_mUInt_Compile.cpython-311.pyc | Bin 12449 -> 0 bytes .../__pycache__/System_.cpython-311.pyc | Bin 1363 -> 0 bytes .../__pycache__/UTF8.cpython-311.pyc | Bin 9510 -> 0 bytes ...leTypesBooleanTest_Compile.cpython-311.pyc | Bin 4081 -> 0 bytes .../Wrappers_Compile.cpython-311.pyc | Bin 14812 -> 0 bytes .../__pycache__/_dafny.cpython-311.pyc | Bin 35100 -> 0 bytes .../__pycache__/module_.cpython-311.pyc | Bin 6648 -> 0 bytes .../python/src/dafny_generated/_dafny.py | 476 ------------------ .../src/dafny_generated/dafny_generated.py | 16 - .../python/src/dafny_generated/module_.py | 87 ---- .../__pycache__/impl.cpython-311.pyc | Bin 4343 -> 0 bytes .../__pycache__/types.cpython-311.pyc | Bin 17841 -> 0 bytes .../__pycache__/wrapped.cpython-311.pyc | Bin 2096 -> 0 bytes .../types/boolean/internaldafny/impl.py | 59 --- .../types/boolean/internaldafny/types.py | 147 ------ .../types/boolean/internaldafny/wrapped.py | 29 -- .../runtimes/python/src/extern/Extern.py | 22 - .../runtimes/python/src/extern/Shim.py | 28 -- .../extern/__pycache__/Extern.cpython-311.pyc | Bin 1400 -> 0 bytes .../extern/__pycache__/Shim.cpython-311.pyc | Bin 2224 -> 0 bytes .../python/src/smithy_generated/Iamaredme | 3 - .../python/src/smithy_generated/README.md | 3 - .../python/src/smithy_generated/plugin | 3 - .../src/smithy_generated/pyproject.toml | 46 -- .../simple_boolean/__init__.py | 1 - .../__pycache__/__init__.cpython-311.pyc | Bin 253 -> 0 bytes .../__pycache__/client.cpython-311.pyc | Bin 13533 -> 0 bytes .../__pycache__/config.cpython-311.pyc | Bin 1818 -> 0 bytes .../__pycache__/deserialize.cpython-311.pyc | Bin 823 -> 0 bytes .../__pycache__/errors.cpython-311.pyc | Bin 1822 -> 0 bytes .../__pycache__/models.cpython-311.pyc | Bin 5274 -> 0 bytes .../__pycache__/plugin.cpython-311.pyc | Bin 1824 -> 0 bytes .../__pycache__/serialize.cpython-311.pyc | Bin 801 -> 0 bytes .../smithy_generated/simple_boolean/client.py | 381 -------------- .../smithy_generated/simple_boolean/config.py | 31 -- .../simple_boolean/deserialize.py | 13 - .../simple_boolean/endpoints.py | 7 - .../smithy_generated/simple_boolean/errors.py | 23 - .../smithy_generated/simple_boolean/models.py | 108 ---- .../smithy_generated/simple_boolean/plugin.py | 20 - .../simple_boolean/serialize.py | 12 - .../SimpleBooleanImplTest_Compile.py | 74 --- .../python/test/dafny_generated/System_.py | 20 - .../WrappedSimpleTypesBooleanTest_Compile.py | 44 -- ...pleBooleanImplTest_Compile.cpython-311.pyc | Bin 7399 -> 0 bytes .../__pycache__/System_.cpython-311.pyc | Bin 1364 -> 0 bytes ...leTypesBooleanTest_Compile.cpython-311.pyc | Bin 3753 -> 0 bytes .../__pycache__/_dafny.cpython-311.pyc | Bin 35101 -> 0 bytes .../dafny_generated.cpython-311.pyc | Bin 1227 -> 0 bytes .../__pycache__/module_.cpython-311.pyc | Bin 6322 -> 0 bytes .../python/test/dafny_generated/_dafny.py | 476 ------------------ .../test/dafny_generated/dafny_generated.py | 15 - .../python/test/dafny_generated/module_.py | 80 --- .../__pycache__/wrapped.cpython-311.pyc | Bin 1765 -> 0 bytes .../types/boolean/internaldafny/wrapped.py | 22 - 109 files changed, 4999 deletions(-) delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/Extern.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/Shim.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/SimpleBooleanImplTest_Compile.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/SimpleBooleanImpl_Compile.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/System_.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/TestsFromDafny.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/WrappedSimpleTypesBooleanTest_Compile.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/Wrappers_Compile.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/Extern.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/Shim.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/SimpleBooleanImplTest_Compile.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/SimpleBooleanImpl_Compile.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/System_.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/WrappedSimpleTypesBooleanTest_Compile.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/Wrappers_Compile.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/_dafny.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/module_.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/_dafny.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/module_.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/README.md delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/pyproject.toml delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/__init__.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/__pycache__/__init__.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/__pycache__/client.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/__pycache__/config.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/__pycache__/deserialize.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/__pycache__/endpoints.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/__pycache__/errors.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/__pycache__/models.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/__pycache__/serialize.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/client.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/config.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/deserialize.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/endpoints.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/errors.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/models.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/serialize.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/__pycache__/impl.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/__pycache__/types.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/__pycache__/wrapped.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/impl.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/types.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/wrapped.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/SimpleBooleanImplTest_Compile.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/SimpleBooleanImpl_Compile.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/StandardLibrary_Compile.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/StandardLibrary_mUInt_Compile.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/System_.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/UTF8.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/WrappedSimpleTypesBooleanTest_Compile.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/Wrappers_Compile.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/__pycache__/SimpleBooleanImplTest_Compile.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/__pycache__/SimpleBooleanImpl_Compile.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/__pycache__/StandardLibrary_Compile.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/__pycache__/StandardLibrary_mUInt_Compile.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/__pycache__/System_.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/__pycache__/UTF8.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/__pycache__/WrappedSimpleTypesBooleanTest_Compile.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/__pycache__/Wrappers_Compile.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/__pycache__/_dafny.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/__pycache__/module_.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/_dafny.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/dafny_generated.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/module_.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/simple/types/boolean/internaldafny/__pycache__/impl.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/simple/types/boolean/internaldafny/__pycache__/types.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/simple/types/boolean/internaldafny/__pycache__/wrapped.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/simple/types/boolean/internaldafny/impl.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/simple/types/boolean/internaldafny/types.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/simple/types/boolean/internaldafny/wrapped.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/extern/Extern.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/extern/Shim.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/extern/__pycache__/Extern.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/extern/__pycache__/Shim.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/Iamaredme delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/README.md delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/plugin delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/pyproject.toml delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__init__.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__pycache__/__init__.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__pycache__/client.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__pycache__/config.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__pycache__/deserialize.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__pycache__/errors.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__pycache__/models.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__pycache__/plugin.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__pycache__/serialize.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/client.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/config.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/deserialize.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/endpoints.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/errors.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/models.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/plugin.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/serialize.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/SimpleBooleanImplTest_Compile.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/System_.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/WrappedSimpleTypesBooleanTest_Compile.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/__pycache__/SimpleBooleanImplTest_Compile.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/__pycache__/System_.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/__pycache__/WrappedSimpleTypesBooleanTest_Compile.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/__pycache__/_dafny.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/__pycache__/dafny_generated.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/__pycache__/module_.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/_dafny.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/dafny_generated.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/module_.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/simple/types/boolean/internaldafny/__pycache__/wrapped.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/simple/types/boolean/internaldafny/wrapped.py diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/Extern.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/Extern.py deleted file mode 100644 index cd0a8e6f37..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/Extern.py +++ /dev/null @@ -1,22 +0,0 @@ -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count - -import module_ -import _dafny -import System_ -import SimpleBooleanImplTest_Compile -import simple.types.boolean.internaldafny.types -from python_client_codegen.simple_boolean.client import SimpleBoolean -from Shim import SimpleBooleanShim -import Wrappers_Compile - -@staticmethod -def WrappedSimpleBoolean(config): - wrapped_config = config - impl = SimpleBoolean(wrapped_config) - wrapped_client = SimpleBooleanShim(impl) - return Wrappers_Compile.Result_Success(wrapped_client) - -# simple.types.boolean.internaldafny.wrapped.default__.WrappedSimpleBoolean = WrappedSimpleBoolean \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/Shim.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/Shim.py deleted file mode 100644 index ae1efb4bb2..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/Shim.py +++ /dev/null @@ -1,28 +0,0 @@ -# TODO generate this - -import simple.types.boolean.internaldafny.types -import python_client_codegen.simple_boolean.client as SimpleBoolean -import Wrappers_Compile -import asyncio -from python_client_codegen.simple_boolean.models import GetBooleanInput - -class SimpleBooleanShim(simple.types.boolean.internaldafny.types.ISimpleBooleanClient): - def __init__(self, _impl: SimpleBoolean) : - self._impl = _impl - - def GetBoolean(self, input: simple.types.boolean.internaldafny.types.GetBooleanInput_GetBooleanInput) -> simple.types.boolean.internaldafny.types.GetBooleanOutput_GetBooleanOutput: - ''' - unwrapped_request = TypeConversion.ToNative(input) - try: - wrapped_response = self._impl.get_boolean(unwrapped_request) - return Wrappers_Compile.Result_Success(wrapped_response) - catch ex: - return Wrappers_Compile.Result_Failure(ex) - ''' - - unwrapped_request: GetBooleanInput = GetBooleanInput(value=input.value) - wrapped_response = asyncio.run(self._impl.get_boolean(unwrapped_request)) - return Wrappers_Compile.Result_Success(wrapped_response) - - - \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/SimpleBooleanImplTest_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/SimpleBooleanImplTest_Compile.py deleted file mode 100644 index a4433aedbc..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/SimpleBooleanImplTest_Compile.py +++ /dev/null @@ -1,74 +0,0 @@ -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count - -import simple.types.boolean.internaldafny.impl - -import Wrappers_Compile - -import module_ -import _dafny -import System_ - -assert "SimpleBooleanImplTest_Compile" == __name__ -SimpleBooleanImplTest_Compile = sys.modules[__name__] - -class default__: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "SimpleBooleanImplTest_Compile._default" - @staticmethod - def GetBooleanTrue(): - d_0_client_: simple.types.boolean.internaldafny.impl.SimpleBooleanClient - d_1_valueOrError0_: Wrappers_Compile.Result = None - out0_: Wrappers_Compile.Result - out0_ = simple.types.boolean.internaldafny.impl.default__.SimpleBoolean(simple.types.boolean.internaldafny.impl.default__.DefaultSimpleBooleanConfig()) - d_1_valueOrError0_ = out0_ - if not(not((d_1_valueOrError0_).IsFailure())): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(10,19): " + _dafny.string_of(d_1_valueOrError0_)) - d_0_client_ = (d_1_valueOrError0_).Extract() - SimpleBooleanImplTest_Compile.default__.TestGetBooleanTrue(d_0_client_) - - @staticmethod - def GetBooleanFalse(): - d_2_client_: simple.types.boolean.internaldafny.impl.SimpleBooleanClient - d_3_valueOrError0_: Wrappers_Compile.Result = None - out1_: Wrappers_Compile.Result - out1_ = simple.types.boolean.internaldafny.impl.default__.SimpleBoolean(simple.types.boolean.internaldafny.impl.default__.DefaultSimpleBooleanConfig()) - d_3_valueOrError0_ = out1_ - if not(not((d_3_valueOrError0_).IsFailure())): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(14,19): " + _dafny.string_of(d_3_valueOrError0_)) - d_2_client_ = (d_3_valueOrError0_).Extract() - SimpleBooleanImplTest_Compile.default__.TestGetBooleanFalse(d_2_client_) - - @staticmethod - def TestGetBooleanTrue(client): - d_4_ret_: simple.types.boolean.internaldafny.types.GetBooleanOutput - d_5_valueOrError0_: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(simple.types.boolean.internaldafny.types.GetBooleanOutput.default())() - out2_: Wrappers_Compile.Result - out2_ = (client).GetBoolean(simple.types.boolean.internaldafny.types.GetBooleanInput_GetBooleanInput(Wrappers_Compile.Option_Some(True))) - d_5_valueOrError0_ = out2_ - if not(not((d_5_valueOrError0_).IsFailure())): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(23,16): " + _dafny.string_of(d_5_valueOrError0_)) - d_4_ret_ = (d_5_valueOrError0_).Extract() - if not((((d_4_ret_).value).UnwrapOr(False)) == (True)): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(24,8): " + _dafny.string_of(_dafny.Seq("expectation violation"))) - _dafny.print(_dafny.string_of(d_4_ret_)) - - @staticmethod - def TestGetBooleanFalse(client): - d_6_ret_: simple.types.boolean.internaldafny.types.GetBooleanOutput - d_7_valueOrError0_: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(simple.types.boolean.internaldafny.types.GetBooleanOutput.default())() - out3_: Wrappers_Compile.Result - out3_ = (client).GetBoolean(simple.types.boolean.internaldafny.types.GetBooleanInput_GetBooleanInput(Wrappers_Compile.Option_Some(False))) - d_7_valueOrError0_ = out3_ - if not(not((d_7_valueOrError0_).IsFailure())): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(33,16): " + _dafny.string_of(d_7_valueOrError0_)) - d_6_ret_ = (d_7_valueOrError0_).Extract() - if not((((d_6_ret_).value).UnwrapOr(True)) == (False)): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(34,8): " + _dafny.string_of(_dafny.Seq("expectation violation"))) - _dafny.print(_dafny.string_of(d_6_ret_)) - diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/SimpleBooleanImpl_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/SimpleBooleanImpl_Compile.py deleted file mode 100644 index ab895450be..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/SimpleBooleanImpl_Compile.py +++ /dev/null @@ -1,58 +0,0 @@ -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count - -import module_ -import _dafny -import System_ -import simple.types.boolean.internaldafny.types -import Wrappers_Compile -assert "SimpleBooleanImpl_Compile" == __name__ -SimpleBooleanImpl_Compile = sys.modules[__name__] - -class Config: - @_dafny.classproperty - def AllSingletonConstructors(cls): - return [Config_Config()] - @classmethod - def default(cls, ): - return lambda: Config_Config() - def __ne__(self, __o: object) -> bool: - return not self.__eq__(__o) - @property - def is_Config(self) -> bool: - return isinstance(self, SimpleBooleanImpl_Compile.Config_Config) - -class Config_Config(Config, NamedTuple('Config', [])): - def __dafnystr__(self) -> str: - return f'SimpleBooleanImpl_Compile.Config.Config' - def __eq__(self, __o: object) -> bool: - return isinstance(__o, SimpleBooleanImpl_Compile.Config_Config) - def __hash__(self) -> int: - return super().__hash__() - - -class default__: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "SimpleBooleanImpl_Compile._default" - @staticmethod - def GetBoolean(config, input): - output: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(simple.types.boolean.internaldafny.types.GetBooleanOutput.default())() - if not(((input).value).is_Some): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(17,4): " + _dafny.string_of(_dafny.Seq("expectation violation"))) - if not(((((input).value).value) == (True)) or ((((input).value).value) == (False))): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(19,4): " + _dafny.string_of(_dafny.Seq("expectation violation"))) - d_0_res_: simple.types.boolean.internaldafny.types.GetBooleanOutput - d_0_res_ = simple.types.boolean.internaldafny.types.GetBooleanOutput_GetBooleanOutput((input).value) - if not(((((d_0_res_).value).value) == (True)) or ((((d_0_res_).value).value) == (False))): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(22,4): " + _dafny.string_of(_dafny.Seq("expectation violation"))) - if not((((input).value).value) == (((d_0_res_).value).value)): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(24,4): " + _dafny.string_of(_dafny.Seq("expectation violation"))) - output = Wrappers_Compile.Result_Success(d_0_res_) - return output - return output - diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/System_.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/System_.py deleted file mode 100644 index 32e6d896ff..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/System_.py +++ /dev/null @@ -1,20 +0,0 @@ -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count - -import module_ -import _dafny - -assert "System_" == __name__ -System_ = sys.modules[__name__] - -class nat: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "" - @staticmethod - def default(): - return int(0) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/TestsFromDafny.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/TestsFromDafny.py deleted file mode 100644 index 7fef7fc1c6..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/TestsFromDafny.py +++ /dev/null @@ -1,15 +0,0 @@ -# Dafny program the_program compiled into Python -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count - -import module_ -import _dafny - -try: - dafnyArgs = [_dafny.Seq(a) for a in sys.argv] - module_.default__.Test____Main____(dafnyArgs) -except _dafny.HaltException as e: - _dafny.print("[Program halted] " + e.message + "\n") - sys.exit(1) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/WrappedSimpleTypesBooleanTest_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/WrappedSimpleTypesBooleanTest_Compile.py deleted file mode 100644 index 45e89fab91..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/WrappedSimpleTypesBooleanTest_Compile.py +++ /dev/null @@ -1,44 +0,0 @@ -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count - -import module_ -import _dafny -import System_ -import SimpleBooleanImplTest_Compile -import simple.types.boolean.internaldafny.wrapped -import simple.types.boolean.internaldafny.wrapped -assert "WrappedSimpleTypesBooleanTest_Compile" == __name__ -WrappedSimpleTypesBooleanTest_Compile = sys.modules[__name__] - -class default__: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "WrappedSimpleTypesBooleanTest_Compile._default" - @staticmethod - def GetBooleanTrue(): - d_8_client_: simple.types.boolean.internaldafny.types.ISimpleBooleanClient - d_9_valueOrError0_: Wrappers_Compile.Result = None - out4_: Wrappers_Compile.Result - out4_ = simple.types.boolean.internaldafny.wrapped.default__.WrappedSimpleBoolean(simple.types.boolean.internaldafny.wrapped.default__.WrappedDefaultSimpleBooleanConfig()) - d_9_valueOrError0_ = out4_ - if not(not((d_9_valueOrError0_).IsFailure())): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/WrappedSimpleBooleanTest.dfy(11,19): " + _dafny.string_of(d_9_valueOrError0_)) - d_8_client_ = (d_9_valueOrError0_).Extract() - SimpleBooleanImplTest_Compile.default__.TestGetBooleanTrue(d_8_client_) - - @staticmethod - def GetBooleanFalse(): - d_10_client_: simple.types.boolean.internaldafny.types.ISimpleBooleanClient - d_11_valueOrError0_: Wrappers_Compile.Result = None - out5_: Wrappers_Compile.Result - out5_ = simple.types.boolean.internaldafny.wrapped.default__.WrappedSimpleBoolean(simple.types.boolean.internaldafny.wrapped.default__.WrappedDefaultSimpleBooleanConfig()) - d_11_valueOrError0_ = out5_ - if not(not((d_11_valueOrError0_).IsFailure())): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/WrappedSimpleBooleanTest.dfy(15,19): " + _dafny.string_of(d_11_valueOrError0_)) - d_10_client_ = (d_11_valueOrError0_).Extract() - SimpleBooleanImplTest_Compile.default__.TestGetBooleanFalse(d_10_client_) - diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/Wrappers_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/Wrappers_Compile.py deleted file mode 100644 index ddde85ac6b..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/Wrappers_Compile.py +++ /dev/null @@ -1,190 +0,0 @@ -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count - -import module_ -import _dafny -import System_ - -assert "Wrappers_Compile" == __name__ -Wrappers_Compile = sys.modules[__name__] - -class Option: - @classmethod - def default(cls, ): - return lambda: Option_None() - def __ne__(self, __o: object) -> bool: - return not self.__eq__(__o) - @property - def is_None(self) -> bool: - return isinstance(self, Wrappers_Compile.Option_None) - @property - def is_Some(self) -> bool: - return isinstance(self, Wrappers_Compile.Option_Some) - def ToResult(self): - source0_ = self - if source0_.is_None: - return Wrappers_Compile.Result_Failure(_dafny.Seq("Option is None")) - elif True: - d_0___mcc_h0_ = source0_.value - d_1_v_ = d_0___mcc_h0_ - return Wrappers_Compile.Result_Success(d_1_v_) - - def UnwrapOr(self, default): - source1_ = self - if source1_.is_None: - return default - elif True: - d_2___mcc_h0_ = source1_.value - d_3_v_ = d_2___mcc_h0_ - return d_3_v_ - - def IsFailure(self): - return (self).is_None - - def PropagateFailure(self): - return Wrappers_Compile.Option_None() - - def Extract(self): - return (self).value - - -class Option_None(Option, NamedTuple('None_', [])): - def __dafnystr__(self) -> str: - return f'Wrappers_Compile.Option.None' - def __eq__(self, __o: object) -> bool: - return isinstance(__o, Wrappers_Compile.Option_None) - def __hash__(self) -> int: - return super().__hash__() - -class Option_Some(Option, NamedTuple('Some', [('value', Any)])): - def __dafnystr__(self) -> str: - return f'Wrappers_Compile.Option.Some({_dafny.string_of(self.value)})' - def __eq__(self, __o: object) -> bool: - return isinstance(__o, Wrappers_Compile.Option_Some) and self.value == __o.value - def __hash__(self) -> int: - return super().__hash__() - - -class Result: - @classmethod - def default(cls, default_T): - return lambda: Result_Success(default_T()) - def __ne__(self, __o: object) -> bool: - return not self.__eq__(__o) - @property - def is_Success(self) -> bool: - return isinstance(self, Wrappers_Compile.Result_Success) - @property - def is_Failure(self) -> bool: - return isinstance(self, Wrappers_Compile.Result_Failure) - def ToOption(self): - source2_ = self - if source2_.is_Success: - d_4___mcc_h0_ = source2_.value - d_5_s_ = d_4___mcc_h0_ - return Wrappers_Compile.Option_Some(d_5_s_) - elif True: - d_6___mcc_h1_ = source2_.error - d_7_e_ = d_6___mcc_h1_ - return Wrappers_Compile.Option_None() - - def UnwrapOr(self, default): - source3_ = self - if source3_.is_Success: - d_8___mcc_h0_ = source3_.value - d_9_s_ = d_8___mcc_h0_ - return d_9_s_ - elif True: - d_10___mcc_h1_ = source3_.error - d_11_e_ = d_10___mcc_h1_ - return default - - def IsFailure(self): - return (self).is_Failure - - def PropagateFailure(self): - return Wrappers_Compile.Result_Failure((self).error) - - def MapFailure(self, reWrap): - source4_ = self - if source4_.is_Success: - d_12___mcc_h0_ = source4_.value - d_13_s_ = d_12___mcc_h0_ - return Wrappers_Compile.Result_Success(d_13_s_) - elif True: - d_14___mcc_h1_ = source4_.error - d_15_e_ = d_14___mcc_h1_ - return Wrappers_Compile.Result_Failure(reWrap(d_15_e_)) - - def Extract(self): - return (self).value - - -class Result_Success(Result, NamedTuple('Success', [('value', Any)])): - def __dafnystr__(self) -> str: - return f'Wrappers_Compile.Result.Success({_dafny.string_of(self.value)})' - def __eq__(self, __o: object) -> bool: - return isinstance(__o, Wrappers_Compile.Result_Success) and self.value == __o.value - def __hash__(self) -> int: - return super().__hash__() - -class Result_Failure(Result, NamedTuple('Failure', [('error', Any)])): - def __dafnystr__(self) -> str: - return f'Wrappers_Compile.Result.Failure({_dafny.string_of(self.error)})' - def __eq__(self, __o: object) -> bool: - return isinstance(__o, Wrappers_Compile.Result_Failure) and self.error == __o.error - def __hash__(self) -> int: - return super().__hash__() - - -class Outcome: - @classmethod - def default(cls, ): - return lambda: Outcome_Pass() - def __ne__(self, __o: object) -> bool: - return not self.__eq__(__o) - @property - def is_Pass(self) -> bool: - return isinstance(self, Wrappers_Compile.Outcome_Pass) - @property - def is_Fail(self) -> bool: - return isinstance(self, Wrappers_Compile.Outcome_Fail) - def IsFailure(self): - return (self).is_Fail - - def PropagateFailure(self): - return Wrappers_Compile.Result_Failure((self).error) - - -class Outcome_Pass(Outcome, NamedTuple('Pass', [])): - def __dafnystr__(self) -> str: - return f'Wrappers_Compile.Outcome.Pass' - def __eq__(self, __o: object) -> bool: - return isinstance(__o, Wrappers_Compile.Outcome_Pass) - def __hash__(self) -> int: - return super().__hash__() - -class Outcome_Fail(Outcome, NamedTuple('Fail', [('error', Any)])): - def __dafnystr__(self) -> str: - return f'Wrappers_Compile.Outcome.Fail({_dafny.string_of(self.error)})' - def __eq__(self, __o: object) -> bool: - return isinstance(__o, Wrappers_Compile.Outcome_Fail) and self.error == __o.error - def __hash__(self) -> int: - return super().__hash__() - - -class default__: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "Wrappers_Compile._default" - @staticmethod - def Need(condition, error): - if condition: - return Wrappers_Compile.Outcome_Pass() - elif True: - return Wrappers_Compile.Outcome_Fail(error) - diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/Extern.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/Extern.cpython-311.pyc deleted file mode 100644 index ea1e6f083db31be33aa0193d015aa0240aa312c3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1275 zcmahHOKa3Xc(Tbpy4zj*S{14yD$@GcfZ(Nyplt;Y_TW~999&{DZPU&qVP=*ZXki7x zpP&a1o~qJ6;Lk{*hcGAg7Mub#9g|v)MT<_+PGzg?8Xz!yF_%_UC+auLrY3t6s`oTvazXs z{Z3!DRK+K>B*3BI7Cd_q&hOXuQw|T?r0Y@7k3xF^^9>Qj_GZL3V&Zz(jw6!Lh{bF6 zGUnoOn?b7s3hFo!Yw(~7;tyFw7u=OFxfv%nS0k6$i?0M`VJlAL zR9>AwGzvBe8J>cV-vZP_2hHi;()Zfg_ZRkRGyAof-op3h)sJGYd1JqMLs_QxYu7&C z+pEp(*XB}d?g*mL>=|kDgv*jh;vigQs^v_T&eR}S36Qj?E7n+9u_FPbBw#lmQ}9@8&%1Ua^Z@=qZpd*>+XF)Yzi!F0?_Zu z-MpB4>@tXIWBE5gho)f|8LIa5&Cu=ie~_Wm=`dtyIvs`s)adD(p?Xi>?62lZiu#Zt rI~_oV7SmzK(4}-3GIS;#z=2UeELg^!Lj>rTi3*K3=l&|RR#*QA1*dCv diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/Shim.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/Shim.cpython-311.pyc deleted file mode 100644 index 1b3f25d2da02ee7027b7a47a30f9ec3cccaca1f1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2241 zcma)7PjB2r6rb^~y_;l{O+`>cQ;6v$yMovp;L?(kCRIa`NK!ThX)l(sCylrM*Rh>u zqpcK)O058KO%FW;sVYM4hv2{maFC@&gL>k`ZBfdlCuYWLZ#JROS?A50H*bFP-kbMc zei|Je26X)X%{}wGA^?A|MK;79bNDS~c7X{@XoDu?v)~jA0RpGk6k)m}H6^}NYL@6M z*kxy^IRt?KmVjBf3(O*dEq)h6ZH@G>L93E;{oT<__P7AR6Z)5q=9mc^pf3K&mdkZW zs!J$b@H`vo?p4>1LZhe1C+ZF#hdcdaimI1vf*_S8sdxrf=&8 zQhm>EJ0A8o)HM`@pL-^<12r{nt?i?X?-{D%$PF!riv4!DK>^vJ;0pGf%lf+8p7q-* z^F{I7q^xO{YlWJ&eddI(O18(s6R_vr0S9lMxnKN#_&)s|QUM^M#om-i7=;mb2jap~ zlgH&LWp+Ub*@1L)U@Koeg^wx!BwybV!Yrw&aw|`)4rpcB0``t*WS9VSgh8ai)ty3^ zr!2+I^Qco8)T8eu=rwB2u-qGwdmHP%k4z1tTM><=JSVfTFM94KeK^Z=l{If!53Nm9 z5`pD!3(A1UxXH$W7MC4|D$O1XhT?d!BwYA0^(qcWg0;PO}8G8|}&p5t3K zQocYzWQSTKG7J<1wd42oK@2@KHe|FlXy5<9UePT(!l;I}`arbC#ZBFgP`!-VYvC#- zq@)LJ*RVWNpxMatos1lDkBlF;oQw^cUN2%+;h6Ova_U4h$oO&B0+t>;G^`7d;eOxQ zK6^5``@1YFg3l<~0e?>bW$u@ce!URSuI$gQB(p1V`K{+u=N?|z3mTL(QNq^agU36eO!TCEX=sgJL43ay&(m@EeSbzdj~?b=s}d%6OZdeTR{0 z1~758ar7U|BDXD#|2d|_vWUOQ%ksx*@?6AqDr3De_>q!s0Ycc70Q?{ZYWf|3#rPH9 z0XQ9J-vJog;lBg06c2vg;yAnnyWrpH1L diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/SimpleBooleanImplTest_Compile.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/SimpleBooleanImplTest_Compile.cpython-311.pyc deleted file mode 100644 index 880805e0fd50eaa4d47ba0d951a6b21a2dd69c35..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7201 zcmeHM-ES1v6~8mHAG5aCUVFh15*jBM!Yah;wF!1hsEPrDN$QW-kaQH7EIZ?{%k0kP z&MaWpRxN}S9{Sc+^wAF~g(6jb=tCd#7gX!jAaAdPWU1;y-%LqV3H71p+}YXP!Al~w zm4zzb9iMyeIrsbHoZmhEZ8X|OAdKDmLL2KQDlqd=JV$ziW-<|A@~O08 zq^}q{lTH>ESa@!ss9#J|);5{W>)KqYXy^%n1?LUZq?pK6Sf<_ck6K)el(nLKlFKW{5fD+V0THrRh2c;f* zb%_!NZg2}%1};qQxv~-9hPQCrG#MrwVG&KAPnQf^RWm}peL^rT!Qaym5Zpm1EKEKi z4+IvlbYtGa0)5YZk-T8()JhtqOg^KTh2&}7x@Mcj?BH;^g9?Z{6bowbmt#Lc6pR zh`UrYhW&J?s)qBhYzo8cZ602OzZ)ybKwyYnBjv6Uii7r@9^4haJ%5CK!0lNkHn6;q zt8Zn_J7*+^<$1_?*O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es/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/System_.cpython-311.pyc deleted file mode 100644 index 0d7b03d14f5e8f9524e77eb89ad73f0d598637e8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1361 zcmah{ON%5$5RR<(^mNao4+B2HJqeAtg$F$?3+kdG*dQ}16hcvUW;^XmQLh1rD4^Na*iKmOF`)yNR27iI@9{&j@#AkcUaw@ScqFjbx+Ynd~H; z#(p!|bQ2)HKq3dLuvwavuf08g9 zcs6=BlQR243hTaI)HXb*EAeTjY-gC|f*(vPDF)2?V_BApm{B<`j1Bi|ZA6}q$W6Q2 zN3P#OpZHiyLJj_}3~cjsQ>i-3D`I76-T))tbG`xsbY-6At1tmk?W@8WkI zAfZ~K8XG=>N6dO!$T1ZkZaw)n{zMCun=BVHEqJ)w_GS;gO!>Zp?0NW@hs>%3Ie zVSFI8`KaVV>Ue*WV~&(|%fC~WQe;J}Fw;qna8;W_bVx?}JyquSvT;$rUe)oc3b(7; zMrk@JCMHcEbTNV3twin7A(9y^qVBPGjV#ze2{Tp2f2K)oa)uTZxlmh3mWiqz^3Y9F zPEly1@X4L!lTQ)SX`kKRJyxoZz>Q{6MVqSLLgp0AGZp9T45jlm(gdQYyEp*uq%g~n z$mKGakc)9PmFB@F#jz6TT2t&Z_+z_&^2QJMAKpLiHGvEV5!I`}2}@JkNz=UKQ%O9g z_4PE9%NwXwr0&4m05V@ SMGTAgPx6?szy9T-Dd*qqAw?zt diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/WrappedSimpleTypesBooleanTest_Compile.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/WrappedSimpleTypesBooleanTest_Compile.cpython-311.pyc deleted file mode 100644 index 12d1c0f31aa94b5e73a55e8d332d7e16270c19e6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3770 zcm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A|b+e})O5N+74;`+$ ix!$|y+tz!hYrSt&$*x8J76A`tefo&=AODS%AK{+@1APPl diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/Wrappers_Compile.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/Wrappers_Compile.cpython-311.pyc deleted file mode 100644 index c6d8e543ce0ebf1be136b5f7097511bcd271d832..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14810 zcmd5jTW}QFb=~tGy;^8^Nr+`Y0F~ zw=P+i@hkOLp=Uu*J;#Obh>CEf!5CVpZ#Hg)q~sA^6EcAtLMC_%@IR()usYdDYeG;H zR^VRoXKF49cAQ&2XaRrhO0J?UYN16PZ&9CVP`tyQOX3sTHPLnwv}?5EB_p(E71T5- za1S&@R@CEa+HN(pTf^I}&8%AiC2MHA_0X=_LCIQL(*iXc6u1XUTA#v=b+pAsXz>zn zv1vs#tf%dw&~CGXhUSboBy?=~Uu1Wp!>5OirLx)7#jK)xkL1Vo;HmLZ<#dYZHHlPC z$($M+%_<$D?jOz;3IuP`g|U25Z#+X%qoWE@57L- zf#ik()@Nz}He^7Sl2WD)W?iob21bh`g?w5x2@nLl_rl*&2moji&@ zi6Rv(9oUH+67GlzU{oy|Nlp~<${k?|S_z+jH};kaJd0(=(z$e|kdO5%>eXUlGR^_jQgX7LRLxTV+0msBnQQ#b96lBT&T{`@y|ntvZ>s~OsZ!h%BbwjD8s3-Y_aoDwvbL`)gHKE z7>z);igspN_~$4EYH8W3oJOGB5Z6K-w_lfoSQy01y`7Lf6=xh{3Ehy+Ik zA_KClye-Qe9^I!Z*|UtaC1|zO39>9w9M*?d2d%wgJ!Q@Gop^<)nY22R!A6nBNBi+ zB58#m8^cFbDq|+Y`7;&PwSYV={EyT;+y47#S2=p9BpohGhqch*=SO>omuyCQk!Vv3 zh6*`_Y^g#zR#-{LXQZ06Bfu4~G1w0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skKiIAf4wVPb%^y9dh0akH*tX*rsHJ=wOiTX(=J2#=fbt2! z9h`NQhyLh-bH6_!WJ0T;OT|k*abu&J;A+L0+Y)_S?;z*jmJ^HU$P9r*WNZIK>vYR0INBC3mEtF~V zgRh0vzLjSH0mTFN8}N9t&SH`>NkJy0AU zg}0yxE+z3H@FPGkO!wtd#mfW*QV)+5;muZf)m0@Z7J87sD9c`@3J#5{MI|RwMi_M} z3%oEIWp7}jrKFi|c68r?kJNcKmyq(n!5sJx7B*H7`8Q~R>Zbk*1ZB}HisFJ$Gfh7W z!d~rZ-vwchDf+}h`C-c&1se!0OTEPGs~f@<9V1D@qwPXGV_ diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/_dafny.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/_dafny.cpython-311.pyc deleted file mode 100644 index d62888bf59a9143dd9103f90bf95b8a627a43dfa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 34539 zcmd6Q3v?UTdFBjW1PG8r5~N7#MNp(H(UM3>d`OmL$&^UyO+O^NHvOO>0+c9$1T_Qd zflvvPDhcQ^HRP4oup`xUYNu2zZ<(&$D5=xqlkM3yr%e}7u@x6vo%Lx?&Z*DYJxj0L zJzjP9bie=JnZe9}l#6A)K_K0oR-e(ud&k=D9JNul>?TomFi~5R~+ZAySd-^=g zT@)!E_V#(1+a2)@m-Lk|w@E7lpo>P$^(-ND40*0X$ukg$3oU3q$ylvNwq$7KYC|FXdPg4Xgy#{XanFz74OYR)ndh_ z1$&!98k1)CSlQY6slH>d=AQwpePnm4$3Y$OD#;2ST>Jv7zB`AUqO078x2j9_R`Vj+_rff+NSrg2%&w!Ei7(CWn>gj|jiLO=8Xy3dVv1 zk)WdBrgR`W5(}S;4F^XMTZWIjM-C3ehN2^I7ww56d+xm-|0p7SP0YFEaA<5G++@p@ z>lc;6TzX8oNpjHd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%U-n`IYEDw>Pjemp06w{GHzJL6gb3` zY*N#3G7DPHftPGXaz&%`#3VFLYBaCQQgV^HET5yq1b&8}LJK*0J~-#C#zI9&swCsR zFYCQ;0&9lk;Z1on-o~uA5gx@$66=%aljk$V_1WV3i9KozJ-l>jB9g)qN2YXbwsh?T zxOPqAP`Y+6z8T-XtZ&~$H+?uKWp$x()3lAu&3Ka%jI*n7kHuf@4eU5}pGc9GbJ3=A zvB=OdnaG{qF~i@&uE=Eb$J@rEkqBS!RoEkAImzJD96UC_j?hCodKoNU^{U7oO6QEx zyTWBiCjxt|YtBQ*Q}GB)^rab-OBdJ4#dds^k*k3K>8pJ4xf`yWN4I3~cUc~$;D-qu zCGZ3Rrp>UvIYGB?5;#NPCj{8zAZ!aI3=VuJ313P%NVjCMV}>qfz+vVMW>8?tJ5w>4 z6wYKhCgkvmk73%({O}4H{s!`$auS*1D=5DQ%;M-)QJfQ6(n8CeAWg8(oKT-Of9HhN zY4dkZSeZ6|=Y+bn`8y{xrp@0uVR_p8of9^s7y8Z#8`Fz_=LGKr`^-CR;)AfI6oBMD zobM+-i1YolAh#&ed4(GAiQ*Wk9C_#}7ni2&^8)^?;6B0Th1ejLQ35MS?Ejd2p~Q$~ zu(8{`7i)Q3*F966Uo4dR#e z!N=tHNj~5aahZq%cM3tG>0|Q!Bpl3PIxR$K?A-K1dduL~J)K1c}Cv$@i0d z&=X=AA*~P)E-DEZYG~tn5i1~tAi4Hq^8F+q^bCd^-uJ8nm+oSIu3{0-Z0VrJDYD*D zL8(eqFe8eh6(kucmJ^MX8%VJn=ju~j9f0`hnJo>V0`vw<4Y+I~Y2yZnv4c^j1DBIh j>Y&suLVzv=ACuoF`G887xF7j03_oW6pDYr}W|036-zOv7 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/module_.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/__pycache__/module_.cpython-311.pyc deleted file mode 100644 index a9912ad71d8d73ce93bb1fc252e77c9a5a002240..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6349 zcmd@YOKcm*b#|AZB_)b0MO2i;M5)MPEjK1ByH1U?utdfB)|O>Rb>X!PcEue^l$Ts) zb{Uz1)e44yfs=FQ{Gy!V?>D2O2GZ@ndd6hi2q6lo++z4G9XP+#h3Ssey8qH_w31Ov1>N@N zRk@_#bcRmTNDU?rUIof~2qTe^k;ux-HWE3R#hxrHbK4%#i+!?Z8{L6kcN=4o=$E}9 zn9mN#I4hMDJ)O=l%~phHorB*49{{R(=*-N0h(2U&kA{`3MmxkF-Aevg!$eCerA$5} ztA*q_tXa%laxzNC#&f_GRy#wR! zHpjNZ7!-g{r*hQOnzvE=H8qAOlH0K8c$XASt}g095_9cjbhk06@W~+3_sF$IH{3}_ z5&7*Vdy`#ju4j{bD)M>UGPJ{(uceQhZCC#F=5lGgWewhT(z@H=?DTCiSK$A@$^MKj z@U?QCSw}axD`@>`*rwmju^radHUo`4-&_8l*{0_ix6QUze+X@pZ)c6}wz_Thwyf`v zotxfg+&0^uYKPD^18)0khqblM!*Fi;o^jjswcj1rJ^jDEm)cstoBKg``b|drflH$1 zYf28f=m)*wI^2BS*ajSwZptliU*OH%Ik&hGulWacpI`=j1?mPQrm$WoEs_#`EwXq*f!@>rszG7J^r<4fRVrnK+A_U8?#Waj#(z5y{P6UTLY+uc3 zvAso-12;1O-b=2ql2)@ew}9WUqxUo_ompPX-Uy1Ze(y#1Q zT(PD}E7%UV`Z>z6huZ40!DQHPcNf$YS<&Vt0xq(S!N0OYa(d)sS}SETFnii&u-y%m zQ|VRUeWAuM?U26rBF5mS|=Pxc>k)aQ=@2?pnSIoF*#YHo6)rwp-`6Y{AGWew`+YyLYSuXS= zW>+|23E%%*nA{O2O<~#+rVU}b$}-*1)cfMQ=RfGP21fo6|NZfgMf2peb#mGqn6U~yJj9J2% zA&gaGL$^b%?<+{v5C{e3mt80jc4cb{Te&LL(gmSI;YMhn1>IqYo}!pACj*k8q!z9FNUD&;8|jFCc&I zPxYT4L4O+wUp&tJ9gW8>4srh&@&aPSQ~j4lkvSS(Jj3mDjmH*Gan>m>Aalb!4fqw{ zDu8<+n65|XpbinZH%gLHYa!kAZsOoRBN1Bb)O1PDW#Il;Rb?^^q*@q{#^0PX-nq;i zKuOvXfUV{S#^MdZS{uN}cwhcyh7w+W4BYc}SJ^XOsu>FJbI8}T4M%&6RBLboe-69h z2#8tMY@c2(!re<~n1;aZfd~z|5gKu`J$XrACG;6)2Xb%&>JTf{2n}fw`g$ky%CY?m z5PZb>G&w@C zeQGuBIDyZm#vbuMthJscXP_^Awrc+Z0G7cp6%^cZz6v^R9F!}l&v54oddYC-d#G#6 z`6?*1<$RSE<*0$`xq?QFMy{Y&j7GlK7 str: - if hasattr(value, '__dafnystr__'): - return value.__dafnystr__() - elif value is None: - return "null" - elif isinstance(value, bool): - return "true" if value else "false" - elif isinstance(value, str): - # This is only for Dafny char values. - # Dafny strings are represented as Seq's of individual char values, - # and Seq defines __dafnystr__. - return string_from_utf_16(value) - elif isinstance(value, tuple): - return '(' + ', '.join(map(string_of, value)) + ')' - elif isinstance(value, FunctionType): - return "Function" - else: - return str(value) - -@dataclass -class Break(Exception): - target: str - -@dataclass -class Continue(Exception): - target: str - -class TailCall(Exception): - pass - -@contextmanager -def label(name: str = None): - try: - yield - except Break as g: - if g.target != name: - raise g - except TailCall as g: - if name is not None: - raise g - -@contextmanager -def c_label(name: str = None): - try: - yield - except Continue as g: - if g.target != name: - raise g - -class CodePoint(str): - - escapes = { - '\n' : "\\n", - '\r' : "\\r", - '\t' : "\\t", - '\0' : "\\0", - '\'' : "\\'", - '\"' : "\\\"", - '\\' : "\\\\", - } - - def __escaped__(self): - return self.escapes.get(self, self) - - def __dafnystr__(self): - return f"'{self.__escaped__()}'" - -class Seq(tuple): - def __init__(self, __iterable = None, isStr = False): - ''' - isStr defines whether this value should be tracked at runtime as a string (a.k.a. seq) - It accepts three different values: - - True: this value is definitely a string, mark it as such - - False: this value might be a string, apply heuristics to make a best guess - - None: don't apply heuristics, don't mark it as a string - - None is used when --unicode-char is true, to ensure consistent printing of strings - across backends without depending on any runtime tracking. - See docs/Compilation/StringsAndChars.md. - ''' - - if __iterable is None: - __iterable = [] - if isStr is None: - self.isStr = False - else: - self.isStr = isStr \ - or isinstance(__iterable, str) \ - or (isinstance(__iterable, Seq) and __iterable.isStr) \ - or (not isinstance(__iterable, GeneratorType) - and all(isinstance(e, str) and len(e) == 1 for e in __iterable) - and len(__iterable) > 0) - - @property - def Elements(self): - return self - - @property - def UniqueElements(self): - return frozenset(self) - - def VerbatimString(self, asliteral): - if asliteral: - return f"\"{''.join(map(lambda c: c.__escaped__(), self))}\"" - else: - return ''.join(self) - - def __dafnystr__(self) -> str: - if self.isStr: - # This should never be true when using --unicode-char, - # so it is safe to assume we are a sequence of UTF-16 code units. - return string_from_utf_16(self) - return '[' + ', '.join(map(string_of, self)) + ']' - - def __add__(self, other): - return Seq(super().__add__(other), isStr=self.isStr and other.isStr) - - def __getitem__(self, key): - if isinstance(key, slice): - indices = range(*key.indices(len(self))) - return Seq((self[i] for i in indices), isStr=self.isStr) - return super().__getitem__(key) - - def set(self, key, value): - l = list(self) - l[key] = value - return Seq(l, isStr=self.isStr) - - def __hash__(self) -> int: - return hash(tuple(self)) - - def __lt__(self, other): - return len(self) < len(other) and self == other[:len(self)] - - def __le__(self, other): - return len(self) <= len(other) and self == other[:len(self)] - -class Array: - class Box(list): - def __dafnystr__(self) -> str: - return '[' + ', '.join(map(string_of, self)) + ']' - - def __init__(self, initValue, *dims): - self.arr = initValue - self.dims = list(dims) - for i in reversed(self.dims): - self.arr = Array.Box([copy.copy(self.arr) for _ in range(i)]) - - def __dafnystr__(self) -> str: - return '[' + ', '.join(map(string_of, self.arr)) + ']' - - def __str__(self): - return self.__dafnystr__() - - def length(self, i): - return self.dims[i] if i < len(self.dims) else None - - def __len__(self): - return self.length(0) - - def __getitem__(self, key): - if not isinstance(key, Iterable): - return self.arr[key] - arr = self.arr - for i in key: - arr = arr[i] - return arr - - def __setitem__(self, key, value): - if not isinstance(key, Iterable): - self.arr[key] = value - return - arr = self.arr - for i in range(len(key)-1): - arr = arr[key[i]] - arr[key[-1]] = value - -class Set(frozenset): - @property - def Elements(self): - return self - - @property - def AllSubsets(self): - # https://docs.python.org/3/library/itertools.html#itertools-recipes - s = list(self) - return map(Set, chain.from_iterable(combinations(s, r) for r in range(len(s)+1))) - - def __dafnystr__(self) -> str: - return '{' + ', '.join(map(string_of, self)) + '}' - - def union(self, other): - return Set(super().union(self, other)) - - def intersection(self, other): - return Set(super().intersection(other)) - - def ispropersubset(self, other): - return self.issubset(other) and self != other - - def __or__(self, other): - return self.union(other) - - def __sub__(self, other): - return Set(super().__sub__(other)) - -class MultiSet(Counter): - def __dafnystr__(self) -> str: - return 'multiset{' + ', '.join(map(string_of, self.elements())) + '}' - - def __len__(self): - return reduce(lambda acc, key: acc + self[key], self, 0) - - def union(self, other): - return MultiSet(self + other) - - def __or__(self, other): - return self.union(other) - - def intersection(self, other): - return MultiSet(self & other) - - def __sub__(self, other): - return MultiSet(super().__sub__(other)) - - @property - def keys(self): - return Set(key for key in self if self[key] > 0) - - @property - def Elements(self): - return self.elements() - - @property - def UniqueElements(self): - return self.keys - - def isdisjoint(self, other): - return frozenset(self.keys).isdisjoint(frozenset(other.keys)) - - def issubset(self, other): - return all(self[key] <= other[key] for key in frozenset(self).union(frozenset(other))) - - def ispropersubset(self, other): - return self.issubset(other) and len(self) < len(other) - - def set(self, key, value): - set = Counter(self) - set[key] = value - return MultiSet(set) - - def __hash__(self): - return hash(frozenset(self.keys)) - - def __eq__(self, other): - return all(self[key] == other[key] for key in self.keys | other.keys) - - def __setattr__(self, key, value): - raise TypeError("'Map' object is immutable") - - def __contains__(self, item): - return self[item] > 0 - -class Map(dict): - def __dafnystr__(self) -> str: - return 'map[' + ', '.join(map(lambda i: f'{string_of(i[0])} := {string_of(i[1])}', self.items)) + ']' - - @property - def Elements(self): - return self - - @property - def keys(self): - return Set(super().keys()) - - @property - def values(self): - return Set(super().values()) - - @property - def items(self): - return Set(super().items()) - - def set(self, key, value): - map = dict(self) - map[key] = value - return Map(map) - - def __sub__(self, other): - map = dict(self) - for key in list(other): - map.pop(key, None) - return Map(map) - - def __or__(self, other): - map = dict(self) - for k, v in other.items: - map[k] = v - return Map(map) - - def __hash__(self): - return hash(frozenset(self)) - - def __setattr__(self, key, value): - raise TypeError("'Map' object is immutable") - -class BigOrdinal: - @staticmethod - def is_limit(ord): - return ord == 0 - - @staticmethod - def is_succ(ord): - return 0 < ord - - @staticmethod - def offset(ord): - return ord - - @staticmethod - def is_nat(ord): - # at run time, every ORDINAL is a natural number - return True - -class BigRational(Fraction): - def __dafnystr__(self): - if self.denominator == 1: - return f"{self.numerator}.0" - correction = self.divides_a_power_of_10(self.denominator) - if correction is None: - return f"({self.numerator}.0 / {self.denominator}.0)" - compensation, shift = correction - if self.numerator < 0: - sign, digits = "-", str(-self.numerator*compensation) - else: - sign, digits = "", str(self.numerator*compensation) - if shift < len(digits): - n = len(digits) - shift - return f"{sign}{digits[:n]}.{digits[n:]}" - return f"{sign}0.{'0' * (shift - len(digits))}{digits}" - - @staticmethod - def isolate_factor(f, x): - y = 0 - while x > 1 and x % f == 0: - y += 1 - x //= f - return x, y - - @staticmethod - def divides_a_power_of_10(x): - rem, expA = BigRational.isolate_factor(10, x) - if rem % 5 == 0 or rem % 2 == 0 or rem == 1: - major, minor = (5, 2) if rem % 5 == 0 else (2, 5) - rem, expB = BigRational.isolate_factor(major, rem) - return (minor**expB, expA+expB) if rem == 1 else None - return None - - def __add__(self, other): - return BigRational(super().__add__(other)) - - def __sub__(self, other): - return BigRational(super().__sub__(other)) - - def __mul__(self, other): - return BigRational(super().__mul__(other)) - - def __truediv__(self, other): - return BigRational(super().__truediv__(other)) - -def plus_char(a, b): - return chr(ord(a) + ord(b)) - -def minus_char(a, b): - return chr(ord(a) - ord(b)) - -def euclidian_division(a, b): - if 0 <= a: - if 0 <= b: - return a // b - else: - return -(a // (-b)) - else: - if 0 <= b: - return -((-a-1) // b) - 1 - else: - return (-a-1) // (-b) + 1 - -def euclidian_modulus(a, b): - bp = abs(b) - if 0 <= a: - return a % bp - c = (-a) % bp - return c if c == 0 else bp - c - -@dataclass -class HaltException(Exception): - message: str - -def quantifier(vals, frall, pred): - for u in vals: - if pred(u) != frall: - return not frall - return frall - -def AllBooleans(): - return [False, True] - -def AllChars(): - return (chr(i) for i in range(0x10000)) - -def AllUnicodeChars(): - return chain((CodePoint(chr(i)) for i in range(0xD800)), - (CodePoint(chr(i)) for i in range(0xE000, 0x11_0000))) - -def AllIntegers(): - return (i//2 if i % 2 == 0 else -i//2 for i in count(0)) - -def IntegerRange(lo, hi): - if lo is None: - return count(hi-1, -1) - if hi is None: - return count(lo) - return range(lo, hi) - -class Doubler: - def __init__(self, start): - self.start = start - - def __iter__(self): - i = self.start - while True: - yield i - i *= 2 - -class defaults: - bool = staticmethod(lambda: False) - char = staticmethod(lambda: 'D') - int = staticmethod(lambda: 0) - real = staticmethod(BigRational) - pointer = staticmethod(lambda: None) - tuple = staticmethod(lambda *args: lambda: tuple(a() for a in args)) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/module_.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/module_.py deleted file mode 100644 index 96d10ce75e..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/module_.py +++ /dev/null @@ -1,82 +0,0 @@ -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count - -import module_ -import _dafny -import System_ -import SimpleBooleanImplTest_Compile -import simple.types.boolean.internaldafny.wrapped -import WrappedSimpleTypesBooleanTest_Compile - -import Extern - -assert "module_" == __name__ -module_ = sys.modules[__name__] - -class default__: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "_module._default" - @staticmethod - def Test____Main____(noArgsParameter__): - d_12_success_: bool - d_12_success_ = True - _dafny.print(_dafny.string_of(_dafny.Seq("SimpleBooleanImplTest.GetBooleanTrue: "))) - try: - if True: - SimpleBooleanImplTest_Compile.default__.GetBooleanTrue() - if True: - _dafny.print(_dafny.string_of(_dafny.Seq("PASSED\n"))) - except _dafny.HaltException as e: - d_13_haltMessage_ = e.message - if True: - _dafny.print(_dafny.string_of(_dafny.Seq("FAILED\n "))) - _dafny.print(_dafny.string_of(d_13_haltMessage_)) - _dafny.print(_dafny.string_of(_dafny.Seq("\n"))) - d_12_success_ = False - _dafny.print(_dafny.string_of(_dafny.Seq("SimpleBooleanImplTest.GetBooleanFalse: "))) - try: - if True: - SimpleBooleanImplTest_Compile.default__.GetBooleanFalse() - if True: - _dafny.print(_dafny.string_of(_dafny.Seq("PASSED\n"))) - except _dafny.HaltException as e: - d_14_haltMessage_ = e.message - if True: - _dafny.print(_dafny.string_of(_dafny.Seq("FAILED\n "))) - _dafny.print(_dafny.string_of(d_14_haltMessage_)) - _dafny.print(_dafny.string_of(_dafny.Seq("\n"))) - d_12_success_ = False - _dafny.print(_dafny.string_of(_dafny.Seq("WrappedSimpleTypesBooleanTest.GetBooleanTrue: "))) - try: - if True: - WrappedSimpleTypesBooleanTest_Compile.default__.GetBooleanTrue() - if True: - _dafny.print(_dafny.string_of(_dafny.Seq("PASSED\n"))) - except _dafny.HaltException as e: - d_15_haltMessage_ = e.message - if True: - _dafny.print(_dafny.string_of(_dafny.Seq("FAILED\n "))) - _dafny.print(_dafny.string_of(d_15_haltMessage_)) - _dafny.print(_dafny.string_of(_dafny.Seq("\n"))) - d_12_success_ = False - _dafny.print(_dafny.string_of(_dafny.Seq("WrappedSimpleTypesBooleanTest.GetBooleanFalse: "))) - try: - if True: - WrappedSimpleTypesBooleanTest_Compile.default__.GetBooleanFalse() - if True: - _dafny.print(_dafny.string_of(_dafny.Seq("PASSED\n"))) - except _dafny.HaltException as e: - d_16_haltMessage_ = e.message - if True: - _dafny.print(_dafny.string_of(_dafny.Seq("FAILED\n "))) - _dafny.print(_dafny.string_of(d_16_haltMessage_)) - _dafny.print(_dafny.string_of(_dafny.Seq("\n"))) - d_12_success_ = False - if not(d_12_success_): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(3,0): " + _dafny.string_of(_dafny.Seq("Test failures occurred: see above.\n"))) - diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/README.md b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/README.md deleted file mode 100644 index 4d95aa6598..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/README.md +++ /dev/null @@ -1,3 +0,0 @@ -## Simple_boolean Client - -simple_boolean client diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/pyproject.toml b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/pyproject.toml deleted file mode 100644 index cb3492f592..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/pyproject.toml +++ /dev/null @@ -1,46 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -[build-system] -requires = ["setuptools", "setuptools-scm", "wheel"] -build-backend = "setuptools.build_meta" - -[project] -name = "simple_boolean" -version = "0.0.1" -description = "simple_boolean client" -readme = "README.md" -requires-python = ">=3.11" -keywords = ["smithy", "simple_boolean"] -license = {text = "Apache-2.0"} -classifiers = [ - "Development Status :: 2 - Pre-Alpha", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Natural Language :: English", - "License :: OSI Approved :: Apache Software License", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.11" -] - -dependencies = [ - "smithy_python==0.0.1" -] -[tool.setuptools.packages.find] -exclude=["tests*"] - -[tool.mypy] -strict = true -warn_unused_configs = true - -[[tool.mypy.overrides]] -module = ["awscrt", "pytest"] -ignore_missing_imports = true - -[tool.black] -target-version = ["py311"] - -[tool.pytest.ini_options] -python_classes = ["!Test"] -asyncio_mode = "auto" diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/__init__.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/__init__.py deleted file mode 100644 index 247be3e3d4..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/__pycache__/__init__.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index dffc3d0bfd6c011ced526f641660809e36ba6ec7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 272 zcmXv}F-}7<3{9v&2&v*64B(LkF`$YKmX);;_SbxVrlfw~-rcqIpFvEeN3uT=@}Znsstf)2t@4rR{V+Uy!c)OqAoMm` zM+p{Kwv`xODQ`J+7J(_WNSQaV!crf|VJNWlkpr$8jU2AW4U?ws+xVwLz;0m&1=cSGhQb&k2pAAhEYN+UkpwjsedvGA z4Cg{hNfx^;iXIOCIdjf`{_~&9|DW%inZNgX-3Y=LKl!U<^8`Zwjvs2lrbfQ}FNl1C zk|;@KP?m~P6pmXmmaH{uC2?!UmZhU~)*iKI9Z^Tt8FfOsElFow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uh(krhB z+9R2-GMbgPx;BybHu-HjeJhStN6FbHJKJv4Wf!y3y4qH9b;z!c+xDvMJ(_}Px;1@4 M(!bg!myE=J117!#g8%>k diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/__pycache__/config.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/__pycache__/config.cpython-311.pyc deleted file mode 100644 index 75bbf3287d6113d205c2a07b7f660ada797991dc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1591 zcmahJO>5jnbo8;>FK=v!+t}cwYAKWr&My7Bm{3TaCiKv>5F3gP5fjbqu53x8%#3h# z^C8e4ddQ&=AKM;WO8R4V!3Q&^Ku@`Ca8Eh)&1l#5mO!7Lp5DAS^S(!abUG~rFnIbS z`P4z^Z@rj9ZN{Aa4$O13iwGiCf>JB6EX~`AojQS&x`CV4f?DbYo{>9AJ!lY@)RJb} z3R-D9Xj{le)FR$r^%uU|+z zv_`Lx)@_gw=OOC0Uuj*}QcZ#-juI?H*HzA)tW=F{oFw>hLRE98%;}vZ#zNJ0vzTQM zUg>DMwpzYV<(G^l6lY&&c_G!xh2Yylf@BA5*Y^)XmL+ARea!(XXW%S{&vQgkU=bA9 zP%$fTs7o$IO>4w45!=AInxo!cy*iH2UgMl=o^z%{dbQV{%iwISvI2Q~%G+kyARgj% zNTp&6jwK}L4;c3!#%Z3=S!%7853rSEj#EF*B;^s!CF5et-x*OqiG}ppU_rC#AB^H? z*FVoZ{P$Jr26)Tckts4(uq681TLQcxj#3$8hpybOheIO(vg zoEw=xmzmgOAqs7_Qc1Q?GvVWm_z_E?BcL+QD>b1BF2$lBo%@#A^FS?K&R1Po3_-bi zYj;UC!Z5=r4MWum!<3OC(fm>vJ}GcA)6~O|un5GiE|^*lL!4zynwkp`d&1OQ)g(-t zQ1!>vT&a$UAj1j4gRJB$&`))Bp+DP6Of&f>I@7Iw^ILycP%ipO5v37fS^q8-`;z7T z1IG9B1V^-=v!qNJ&qw_oDDpQ9iXi%xNj>Uwe%AgzFESaYAkIrU0)zUHxW`#~S4VU! zFK3D{GJ%8<7#z~9UnLaI66r@~;Cgw4i%x_a%I{N?7@ z-2j}p8>g#lV^`zET{~^9{JeS6x^dD1`teEYtFfzbVkj{D`rM83zDtT>oOPE~`~03$ z!Sx+f9@HCVg1dUR{(o^#6MetbM^y?v(~{mSk={Z>db(@;n%?a}=b@5ZUqh~MV3p{5 zntNB14NXi`H-LN7xLu9P7yLt5>R*bO0GT?LWlcR~eK1Dv{|8UeC*%Lam#8p2n^K diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/__pycache__/deserialize.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/__pycache__/deserialize.cpython-311.pyc deleted file mode 100644 index 707d658d068ee84f3bc4c08a852941ff044a2094..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 831 zcmZ`%L5tHs6rM@bY28{8WJT1&DhhTNo5R+N$O^jXL0k`8FTI4AnRa6*Ght?;L_7!z z{sgZcWJUCcc#Nw1U?0SziQ`+Nc7>85}ZyZSu9nud)rZ*aMsTf zHpkV3Je3L)#o$gdvjYX~NBW+U@n$d-+4Ur=0)EINCX63K!4VUlE-U&^W`p)9171ZJU%bz9imGlCNL+ES+%MWB^X*^F4e&{pHtYa|1d1ete=I?*5z?wRu%C-FL||qKIOKIF2y) zA`c_Lkq=(fpk5CJ{@46*;FUW)o7g-(6I97u*sDY*+?2b&yVqbO8-czIR?0oYbDI^h zDr_c2CssNiB^ElFwMzRAsv9nptv|$eUDvEPG@VPBy^y{EZ3r8tJf%{QE|`Ipirh;* zP%KG-D9H*gwaQ2c#$HGY%#dEr6@#!)Q0J#oGDrl`Lt%67+DnOxC3CJN?uyN{ucOZya5aXK)1J#$9jw)tr$6V4OgA={!L}Pc%kqZ+aV?0?!xR1vu{O@kG Sb@0%7-wwv8y>z|q_I?0`f|M}; diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/__pycache__/errors.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/__pycache__/errors.cpython-311.pyc deleted file mode 100644 index a60d2c19a4226e5cf0782026d0fe1264a44af8a1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1841 zcmb7EL2ukd6rQoYws*5jT0m`(pm8oxOLSMQxFA&sO3GeBB$NcGFC$}55-VQY%y>yR z%3&i#>LT@!3rY?g!X*g$S2(07637w~5+`n3Z7ZRkc+XyE)3hLU?DzT2yyy4cy!U2) zY&2>F#*>|U{(?ftUpOg;F=j?T1G7(j;?t0Hs6#u7qjXe9r9>fZ;w!tvSGjhi67m43 z7*0hYT=lgh3adclRXzWs0)Obd!YS9^C`IH*15Kc@rjctJplNc0D}HsNIpNOvH2vBV zv8Vn<6SkTeZ60wEc$u*fq+GaRW-Rv-{<$l>v6uW)MmKsDru&2whx)`(eCnva0`}Cb zzQn~hfyZwP5sR(nEmv}jBX6w&xnWq$q!mO~y3Q?Gs5fgCj73|^OvWO&!x_tJjCEqa z8zNt4?CY)@jwJ?Te(W*!6B%JxPk(5wfF0QiyI#lhRn5E zV*&HRfJZ6wz~CB>S~9oDz8ag!cP^VrPhf}SpaUbZEdA4GsL+ZzBmjSEW`ABZO5Kbu zKa>8lWk&CT#=SEISb>Ifps{$xS8jp~noM6+24t1`+HT!32IMYvOejz#Ge1g#qBu8R zP#iZ2{;xoph8xWc$c%K?xCiIpbYO5uqb~uzqx&Q+y9MS)Ko5Y5ad<{jt`V|LpFIH- zR<;Q{_2CoP09}M8tH^G`1-42M1u0|VHLwEfn&jbXKFO*KO5;k&n8ctgt1n)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Vvt>%OxBq9#*HYhglP jtC9=H{c7Qh6iDk~@dV#}-5gk?hjqkvor=LHB0B#K>X*@3 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/__pycache__/serialize.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/__pycache__/serialize.cpython-311.pyc deleted file mode 100644 index 7c6895fd934c4f454f312e991daf3bf55bb173cb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 809 zcmZ`%Pm9w)6rV}cY1~?SP!{yE3tsHOM!HwogD#4wd)f8UON^P8T733!j3a0;_SgMJtWKp$sW$szk`2$g1gFC2Boa-3Q1Z=DG z=$hk66{=~2QaW`Ajc7r{zv~ydRGeNv$mQbnnleha-gl=2&FA&X6!#uh_P?s)^cNe| B;>iF2 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/client.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/client.py deleted file mode 100644 index 8374b8429f..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/client.py +++ /dev/null @@ -1,371 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -from asyncio import sleep -from copy import deepcopy -from typing import Awaitable, Callable, TypeVar, cast - - -from .config import Config, Plugin -from .serialize import _serialize_get_boolean -from .errors import ServiceError -from .models import GetBooleanInput, GetBooleanOutput -from simple.types.boolean.internaldafny.types import GetBooleanInput_GetBooleanInput as DafnyGetBooleanInput -from simple.types.boolean.internaldafny.types import GetBooleanOutput_GetBooleanOutput as DafnyGetBooleanOutput -from simple.types.boolean.internaldafny.impl import SimpleBooleanClient -from .deserialize import _deserialize_get_boolean -from smithy_python.interfaces.interceptor import Interceptor, InterceptorContext - -import Extern - -Input = TypeVar("Input") -Output = TypeVar("Output") - -class SimpleBoolean: - """Client for SimpleBoolean - - :param config: Optional configuration for the client. Here you can set things like the - endpoint for HTTP services or auth credentials. - - :param plugins: A list of callables that modify the configuration dynamically. These - can be used to set defaults, for example. - """ - def __init__(self, config: Config | None = None, plugins: list[Plugin] | None = None): - self._config = config or Config(interceptors=None, retry_strategy=None, impl=SimpleBooleanClient()) - - # TODO add plugin to get impl from plugin? - - client_plugins: list[Plugin] = [ - ] - if plugins: - client_plugins.extend(plugins) - - for plugin in client_plugins: - plugin(self._config) - - async def get_boolean(self, input: GetBooleanInput, plugins: list[Plugin] | None = None) -> GetBooleanOutput: - """Invokes the GetBoolean operation. - - :param input: The operation's input. - - :param plugins: A list of callables that modify the configuration dynamically. - Changes made by these plugins only apply for the duration of the operation - execution and will not affect any other operation invocations. - """ - operation_plugins = [ - - ] - if plugins: - operation_plugins.extend(plugins) - - return await self._execute_operation( - input=input, - plugins=operation_plugins, - serialize=_serialize_get_boolean, - deserialize=_deserialize_get_boolean, - config=self._config, - ) - - async def _execute_operation( - self, - input: Input, - plugins: list[Plugin], - serialize: Callable[[Input, Config], Awaitable[DafnyGetBooleanInput]], - deserialize: Callable[[DafnyGetBooleanOutput, Config], Awaitable[Output]], - config: Config, - ) -> Output: - try: - return await self._handle_execution( - input, plugins, serialize, deserialize, config - ) - except Exception as e: - # Make sure every exception that we throw is an instance of ServiceError so - # customers can reliably catch everything we throw. - if not isinstance(e, ServiceError): - raise ServiceError(e) from e - raise e - - async def _handle_execution( - self, - input: Input, - plugins: list[Plugin], - serialize: Callable[[Input, Config], Awaitable[DafnyGetBooleanInput]], - deserialize: Callable[[DafnyGetBooleanOutput, Config], Awaitable[Output]], - config: Config, - ) -> Output: - context: InterceptorContext[Input, None, None, None] = InterceptorContext( - request=input, - response=None, - transport_request=None, - transport_response=None, - ) - _client_interceptors = config.interceptors or [] - client_interceptors = cast( - list[Interceptor[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput]], _client_interceptors - ) - interceptors = client_interceptors - - try: - # Step 1a: Invoke read_before_execution on client-level interceptors - for interceptor in client_interceptors: - interceptor.read_before_execution(context) - - # Step 1b: Run operation-level plugins - config = deepcopy(config) - for plugin in plugins: - plugin(config) - - _client_interceptors = config.interceptors or [] - interceptors = cast( - list[Interceptor[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput]], - _client_interceptors, - ) - - # Step 1c: Invoke the read_before_execution hooks on newly added - # interceptors. - for interceptor in interceptors: - if interceptor not in client_interceptors: - interceptor.read_before_execution(context) - - # Step 2: Invoke the modify_before_serialization hooks - for interceptor in interceptors: - context._request = interceptor.modify_before_serialization(context) - - # Step 3: Invoke the read_before_serialization hooks - for interceptor in interceptors: - interceptor.read_before_serialization(context) - - # Step 4: Serialize the request - context_with_transport_request = cast( - InterceptorContext[Input, None, DafnyGetBooleanInput, None], context - ) - context_with_transport_request._transport_request = await serialize( - context_with_transport_request.request, config - ) - - # Step 5: Invoke read_after_serialization - for interceptor in interceptors: - interceptor.read_after_serialization(context_with_transport_request) - - # Step 6: Invoke modify_before_retry_loop - for interceptor in interceptors: - context_with_transport_request._transport_request = ( - interceptor.modify_before_retry_loop(context_with_transport_request) - ) - - # Step 7: Acquire the retry token. - retry_strategy = config.retry_strategy - if retry_strategy is None: - # raise ServiceError( - # "No retry_strategy found on the operation config." - # ) - pass - retry_token = None # retry_strategy.acquire_initial_retry_token() - - while True: - # Make an attempt, creating a copy of the context so we don't pass - # around old data. - context_with_response = await self._handle_attempt( - deserialize, - interceptors, - context_with_transport_request.copy(), - config, - ) - - # We perform this type-ignored re-assignment because `context` needs - # to point at the latest context so it can be generically handled - # later on. This is only an issue here because we've created a copy, - # so we're no longer simply pointing at the same object in memory - # with different names and type hints. It is possible to address this - # without having to fall back to the type ignore, but it would impose - # unnecessary runtime costs. - context = context_with_response # type: ignore - - if isinstance(context_with_response.response, Exception): - # Step 7u: Reacquire retry token if the attempt failed - raise context_with_response.response - - else: - # Step 8: Invoke record_success - # retry_strategy.record_success(token=retry_token) - break - except Exception as e: - if context.response is not None: - # config.logger.exception(f"Exception occurred while handling: {context.response}") - pass - context._response = e - - # At this point, the context's request will have been definitively set, and - # The response will be set either with the modeled output or an exception. The - # transport_request and transport_response may be set or None. - execution_context = cast( - InterceptorContext[Input, Output, DafnyGetBooleanInput | None, DafnyGetBooleanOutput | None], context - ) - return await self._finalize_execution(interceptors, execution_context) - - async def _handle_attempt( - self, - deserialize: Callable[[DafnyGetBooleanOutput, Config], Awaitable[Output]], - interceptors: list[Interceptor[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput]], - context: InterceptorContext[Input, None, DafnyGetBooleanInput, None], - config: Config, - ) -> InterceptorContext[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput | None]: - try: - # assert config.interceptors is not None - # Step 7a: Invoke read_before_attempt - for interceptor in interceptors: - interceptor.read_before_attempt(context) - - # Steps 7b-e haven't had their python designs finalized yet - # Step 7b: Invoke service_auth_scheme_resolver.resolve_auth_scheme - # Step 7c: Invoke auth_scheme.identity_resolver - # Step 7d: Invoke auth_scheme.signer - # Step 7e: Invoke identity_resolver.resolve_identity - - # Step 7g: Invoke modify_before_signing - for interceptor in interceptors: - context._transport_request = interceptor.modify_before_signing(context) - - # Step 7h: Invoke read_before_signing - for interceptor in interceptors: - interceptor.read_before_signing(context) - - # Step 7i: Invoke signer.sign_request - # This step hasn't had its python design finalized yet - - # Step 7j: Invoke read_after_signing - for interceptor in interceptors: - interceptor.read_after_signing(context) - - # Step 7k: Invoke modify_before_transmit - for interceptor in interceptors: - context._transport_request = interceptor.modify_before_transmit(context) - - # Step 7l: Invoke read_before_transmit - for interceptor in interceptors: - interceptor.read_before_transmit(context) - - ## HERE - # Step 7m: Invoke http_client.send - if config.impl is None: - raise Exception("No impl found on the operation config.") - - context_with_response = cast( - InterceptorContext[Input, None, DafnyGetBooleanInput, DafnyGetBooleanOutput], context - ) - - print(f"\ntransport_request is {context_with_response.transport_request}") - - context_with_response._transport_response = config.impl.GetBoolean( - input=context_with_response.transport_request - ) - - # Step 7n: Invoke read_after_transmit - for interceptor in interceptors: - interceptor.read_after_transmit(context_with_response) - - # Step 7o: Invoke modify_before_deserialization - for interceptor in interceptors: - context_with_response._transport_response = ( - interceptor.modify_before_deserialization(context_with_response) - ) - - # Step 7p: Invoke read_before_deserialization - for interceptor in interceptors: - interceptor.read_before_deserialization(context_with_response) - - # Step 7q: deserialize - context_with_output = cast( - InterceptorContext[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput], - context_with_response, - ) - context_with_output._response = await deserialize( - context_with_output._transport_response, config - ) - - # Step 7r: Invoke read_after_deserialization - for interceptor in interceptors: - interceptor.read_after_deserialization(context_with_output) - except Exception as e: - if context.response is not None: - # config.logger.exception(f"Exception occurred while handling: {context.response}") - pass - context._response = e - - # At this point, the context's request and transport_request have definitively been set, - # the response is either set or an exception, and the transport_resposne is either set or - # None. This will also be true after _finalize_attempt because there is no opportunity - # there to set the transport_response. - attempt_context = cast( - InterceptorContext[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput | None], context - ) - return await self._finalize_attempt(interceptors, attempt_context) - - async def _finalize_attempt( - self, - interceptors: list[Interceptor[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput]], - context: InterceptorContext[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput | None], - ) -> InterceptorContext[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput | None]: - # Step 7s: Invoke modify_before_attempt_completion - try: - for interceptor in interceptors: - context._response = interceptor.modify_before_attempt_completion( - context - ) - except Exception as e: - if context.response is not None: - # config.logger.exception(f"Exception occurred while handling: {context.response}") - pass - context._response = e - - # Step 7t: Invoke read_after_attempt - for interceptor in interceptors: - try: - interceptor.read_after_attempt(context) - except Exception as e: - if context.response is not None: - # config.logger.exception(f"Exception occurred while handling: {context.response}") - pass - context._response = e - - return context - - async def _finalize_execution( - self, - interceptors: list[Interceptor[Input, Output, DafnyGetBooleanInput, DafnyGetBooleanOutput]], - context: InterceptorContext[Input, Output, DafnyGetBooleanInput | None, DafnyGetBooleanOutput | None], - ) -> Output: - try: - # Step 9: Invoke modify_before_completion - for interceptor in interceptors: - context._response = interceptor.modify_before_completion(context) - - # Step 10: Invoke trace_probe.dispatch_events - try: - pass - except Exception as e: - # log and ignore exceptions - # config.logger.exception(f"Exception occurred while dispatching trace events: {e}") - pass - except Exception as e: - if context.response is not None: - # config.logger.exception(f"Exception occurred while handling: {context.response}") - pass - context._response = e - - # Step 11: Invoke read_after_execution - for interceptor in interceptors: - try: - interceptor.read_after_execution(context) - except Exception as e: - if context.response is not None: - # config.logger.exception(f"Exception occurred while handling: {context.response}") - pass - context._response = e - - # Step 12: Return / throw - if isinstance(context.response, Exception): - raise context.response - - # We may want to add some aspects of this context to the output types so we can - # return it to the end-users. - return context.response diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/config.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/config.py deleted file mode 100644 index 4ecd715335..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/config.py +++ /dev/null @@ -1,28 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -from dataclasses import dataclass -from typing import Any, Callable, TypeAlias, Union - -import simple.types.boolean.internaldafny.impl - -from .models import GetBooleanInput, GetBooleanOutput - - -@dataclass(kw_only=True) -class Config: - """Configuration for SimpleBoolean - - :param interceptors: The list of interceptors, which are hooks that are called - during the execution of a request. - - :param retry_strategy: The retry strategy for issuing retry tokens and computing - retry delays. - - :param impl: - """ - interceptors: list[None] - retry_strategy: None - impl: simple.types.boolean.internaldafny.impl.SimpleBooleanClient - -# A callable that allows customizing the config object on each request. -Plugin: TypeAlias = Callable[[Config], None] diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/deserialize.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/deserialize.py deleted file mode 100644 index f8cb771fa7..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/deserialize.py +++ /dev/null @@ -1,11 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -#from Dafny.Path.To.Dafny.Code. import SimpleBooleanHardCoded as _SimpleBooleanHardCoded -from simple.types.boolean.internaldafny.types import GetBooleanOutput_GetBooleanOutput as DafnyGetBooleanOutput - -from .config import Config -from .models import GetBooleanOutput - - -async def _deserialize_get_boolean(input: DafnyGetBooleanOutput, config: Config) -> GetBooleanOutput: - return GetBooleanOutput(value=input.value.value) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/endpoints.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/endpoints.py deleted file mode 100644 index 49b2f71554..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/endpoints.py +++ /dev/null @@ -1,7 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -from smithy_python._private.http import StaticEndpointParams, StaticEndpointResolver - - -EndpointParams = StaticEndpointParams -EndpointResolver = StaticEndpointResolver diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/errors.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/errors.py deleted file mode 100644 index 6f38ba4e80..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/errors.py +++ /dev/null @@ -1,23 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -from typing import Generic, Literal, TypeVar - - -class ServiceError(Exception): - """Base error for all errors in the service. - """ - pass - -T = TypeVar('T') -class ApiError(ServiceError, Generic[T]): - """Base error for all api errors in the service. - """ - code: T - def __init__(self, message: str): - super().__init__(message) - self.message = message - -class UnknownApiError(ApiError[Literal['Unknown']]): - """Error representing any unknown api errors - """ - code: Literal['Unknown'] = 'Unknown' diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/models.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/models.py deleted file mode 100644 index 43b48bab05..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/models.py +++ /dev/null @@ -1,108 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -from typing import Any, Dict, Optional - - -class GetBooleanInput: - value: Optional[bool] - def __init__( - self, - *, - value: Optional[bool] = None, - ): - self.value = value - - def as_dict(self) -> Dict[str, Any]: - """Converts the GetBooleanInput to a dictionary. - - The dictionary uses the modeled shape names rather than the parameter names as - keys to be mostly compatible with boto3. - """ - d: Dict[str, Any] = {} - - if self.value is not None: - d["value"] = self.value - - return d - - @staticmethod - def from_dict(d: Dict[str, Any]) -> "GetBooleanInput": - """Creates a GetBooleanInput from a dictionary. - - The dictionary is expected to use the modeled shape names rather than the - parameter names as keys to be mostly compatible with boto3. - """ - kwargs: Dict[str, Any] = {} - - if "value" in d: - kwargs["value"] = d["value"] - - return GetBooleanInput(**kwargs) - - def __repr__(self) -> str: - result = "GetBooleanInput(" - if self.value is not None: - result += f"value={repr(self.value)}" - - return result + ")" - - def __eq__(self, other: Any) -> bool: - if not isinstance(other, GetBooleanInput): - return False - attributes: list[str] = ['value',] - return all( - getattr(self, a) == getattr(other, a) - for a in attributes - ) - -class GetBooleanOutput: - value: Optional[bool] - def __init__( - self, - *, - value: Optional[bool] = None, - ): - self.value = value - - def as_dict(self) -> Dict[str, Any]: - """Converts the GetBooleanOutput to a dictionary. - - The dictionary uses the modeled shape names rather than the parameter names as - keys to be mostly compatible with boto3. - """ - d: Dict[str, Any] = {} - - if self.value is not None: - d["value"] = self.value - - return d - - @staticmethod - def from_dict(d: Dict[str, Any]) -> "GetBooleanOutput": - """Creates a GetBooleanOutput from a dictionary. - - The dictionary is expected to use the modeled shape names rather than the - parameter names as keys to be mostly compatible with boto3. - """ - kwargs: Dict[str, Any] = {} - - if "value" in d: - kwargs["value"] = d["value"] - - return GetBooleanOutput(**kwargs) - - def __repr__(self) -> str: - result = "GetBooleanOutput(" - if self.value is not None: - result += f"value={repr(self.value)}" - - return result + ")" - - def __eq__(self, other: Any) -> bool: - if not isinstance(other, GetBooleanOutput): - return False - attributes: list[str] = ['value',] - return all( - getattr(self, a) == getattr(other, a) - for a in attributes - ) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/serialize.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/serialize.py deleted file mode 100644 index 19b8a7f32a..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/python_client_codegen/simple_boolean/serialize.py +++ /dev/null @@ -1,11 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -#from Dafny.Path.To.Dafny.Code. import SimpleBooleanHardCoded as _SimpleBooleanHardCoded -from simple.types.boolean.internaldafny.types import GetBooleanInput_GetBooleanInput as DafnyGetBooleanInput - -from .config import Config -from .models import GetBooleanInput - - -async def _serialize_get_boolean(input: GetBooleanInput, config: Config) -> DafnyGetBooleanInput: - return DafnyGetBooleanInput(value=input.value) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/__pycache__/impl.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/__pycache__/impl.cpython-311.pyc deleted file mode 100644 index feab82e683cb85735cc4190e2291a9350e560585..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4221 zcmb6cO>Y~=b#}SCq$rU~Te2L>ZlcDiUCJ@(plDjTj(}Q59SM$tNQxaVf^KQ=B zQFU4u?NS9eIR|FjxqG#mWfrQrQq?hOwO|>AjcPN8Gm5xP&;lWjt^?&EF^MJ^L=z2R zhiEZFG^GvEi0w$4Y)C*+3>jeDOrTO8!HOrrcZfD-#NiMLHo3;dxbE%0XqC*WQxw8^ zgrG+7cccM$NStH5a)|E+f*o5(hPI3f&?b7QYlEzj#{#PIOhlR`IKIAEtJF)N+tgyM zx>5QF#@MmAVQv%}mc!zDky9QEOtMXD!$zTIzxhl4ecPmV-f9#pMWa^D-!Sd_POYB* zxJK{StwPbv*K1a@Qls_F{JLp7@6-&_vh$t*Xu<&ZRgn>CPa;J6Doi}c%u7?E3HLO z-WPgcV1nETNgor+W#mey7-?)m*SYuF4u#{*j#vc88_dA?vl9TeNl#txs_PUf#p4cz zIF}#e_aSKu;5>kN4V{Nh0RC8@8R)Vi#o%U&=N2|Do}KkXQ;JRvg_;>9l*c;_)9n-h z5a-M*ov8=u4m{7wgei~9MBwP(FDx81gWt+hhy_WMltcb8E~H$qeWy?ZnVz6Yc#8(! zmgu0G{8k*Z07F!<;U%&~t50K#wXsynxIF!$d6+h?^)(@D!Y%QC*sY8I^}46n-4;3Twg{t3cW?j@@w*(qD|VExGFdnC zlY`8{erDk_=^tDFH1{&=Zf3nB_fAZAl%9I3lk&VTv?s`eIQKp@B}4=%L+>@;8uTm- zhhvi~>07*?C($3mA{!lHn;fc>58B#3Iz?-uIrVW(XbGQX#Z`aV0j#h z0m@^hHrl^+^a4g8aVl zX|YeR9|0vno<*_`6j`3`lMtkdlJ1Lwd=96adm4k`&Ibbmr+R{+I7Rq{Eyzemw}AA# z+G{FUeWOtaRhU=fAu3d6$i;Db0Y3TMlpQ2FPjf>lm#e*XGK`C`eBfto%p8!+utaz# zn|{$|etr147pC96KIpy#qlH9|XiXm%a!>@aC}>awmb&T^m-HF+bC>@R=0d^+7_`AX zq#PKDlyNR^1MaRA(2n;}lLX03rWgzKRRre|yas?>jOGjPMlymnk{m4zXD*Je5Iax(00}HuKI?n{_H^2_f>sQEx2l-n<#jCJDw`=%v^6@0D^b( zE#Z6UF4Wj=Sf1cBVT{zG&YC0QvOdrA{njyEhNi<$ZN|Prc=;w>lC;=%2>_F#h?} zWq0ZqdsA<@Q*Z4h7Tm-_H?h#0p6QH#nSR+#U;f+uz4TQ#eYF$osV6&0Zt#`t7=0af zp_dWl5MU;zxINFrY{GU5PN`Ti;p%G8H<5k~!B8T;fHVX@f}h<2upK^_B_R=qKoR6+ zKM^nUL>z^O@(EmVkF)Lxm}*b%eCU%D81%)2JlQ7zLS8`NR4-YfFxi)&rZjD)zKYN;(oDWig)c~@wKMym=&G<*yewJ zo}1zL9mR7h?ls(DxUz?G!_-p5^xjS0^Es~8sH(q7T=T?Qpf^ECj95DZupbiyp+}P2 z{OOUOc3<@N$aFXQ_Q=_8^gSf$ZT|E~YMVd30VUrh{@Ww7-QYbWr@O&>7{BuOxA)`M zy20C*CIu*=&w@`c{P}fvCg;vvb7!u*Gk2cioUaEH=OzWP`Lh7$P2#*^F86}}1C<}R AGXMYp diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/__pycache__/types.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/__pycache__/types.cpython-311.pyc deleted file mode 100644 index de718b7bc203ac79a1a4a5c6a8b3353b0edc7b5e..0000000000000000000000000000000000000000 GIT binary patch literal 0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A&`H2#4-wI#^!y2n+LmEoJmZXVNqIiih)wTX!K zt0^ryr=_ym^t^V06!)q6KJ`A9dr&Ui6youcyf?+RlRUOv%ClzMnVb2WdF|ksHhx~4 zifX50+9|o%8`pc|9!=t{u@LV?u}OtCSxQ~2Nv-qeU+(>KuQoWYotxHTGg^37JDVu( zPwM-V6>SE1JjC~=_i6kCduoG^hsyw!qMnVt83@4fk{R;wUr zw~oHWzvu}4As0n6XUxeFFoy^utWo64S*Kd0`+8*fMr8VCWcijRd+)%l4&Qs zI6HWqcO%d=GT6-<+et!67&p3cMpztD9CqS<<1P!+l;F0!sc3~ACmSF+LjpNY-QVe}W=&L2n+s z`~SlktS3?0h0q5xJ6H`aV@p7CMA>C|c{K=B7VwOL&DZ{E^QnAA9x4F=yWQI(_coJ~ zGYO-jcn36xC<9uwy?M0vinKy|a<6Kq+8>INEL3Vvvd zdhEVDcHbPkH-C47M{e+|8;;#@R0ygx1vmcXGLvtmA}U8PtOoNw)itX&MRQ_n z)~0sUmXb~FEIqcC<%w;j+SVQ$$X*%V$wkMjH^!^)jLhfqp*&XC)}H}q`dru$(QdrM zWQs6T5=#>KJP0!ivt1@jNR+$aS_ZYunM_UL%uo_`p3%Z-^?633KwMvN`%`!jWvLeh zB3|PczmY1**t61(>yo@Ai2_Vj)jV&Wmfp+Fc%QAo7Mc0{Hy~3()3gby3{;<>w?`L^ z3A#2~922xUS{%n{X`uQ9)ds3hP9?95&}>YQH!8-&dF$tUkDL!i#h4$Rnq}?g6rClH MrR>Q$3KhD)0R=w+_5c6? diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/impl.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/impl.py deleted file mode 100644 index 243917d03e..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/impl.py +++ /dev/null @@ -1,57 +0,0 @@ -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count - -import module_ -import _dafny -import System_ -import simple.types.boolean.internaldafny.types -import SimpleBooleanImpl_Compile - -import Wrappers_Compile - -assert "simple.types.boolean.internaldafny.impl" == __name__ - -class SimpleBooleanClient(simple.types.boolean.internaldafny.types.ISimpleBooleanClient): - def __init__(self): - self._config: SimpleBooleanImpl_Compile.Config = SimpleBooleanImpl_Compile.Config_Config.default()() - pass - - def __dafnystr__(self) -> str: - return "simple.types.boolean.internaldafny.impl_Compile.SimpleBooleanClient" - def ctor__(self, config): - (self)._config = config - - def GetBoolean(self, input): - output: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(simple.types.boolean.internaldafny.types.GetBooleanOutput.default())() - out0_: Wrappers_Compile.Result - out0_ = SimpleBooleanImpl_Compile.default__.GetBoolean((self).config, input) - output = out0_ - return output - - @property - def config(self): - return self._config - -class default__: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "simple.types.boolean.internaldafny.impl_Compile._default" - @staticmethod - def DefaultSimpleBooleanConfig(): - return simple.types.boolean.internaldafny.types.SimpleBooleanConfig_SimpleBooleanConfig() - - @staticmethod - def SimpleBoolean(config): - res: Wrappers_Compile.Result = None - d_1_client_: simple.types.boolean.internaldafny.impl.SimpleBooleanClient - nw0_ = simple.types.boolean.internaldafny.impl.SimpleBooleanClient() - nw0_.ctor__(SimpleBooleanImpl_Compile.Config_Config()) - d_1_client_ = nw0_ - res = Wrappers_Compile.Result_Success(d_1_client_) - return res - return res - diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/types.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/types.py deleted file mode 100644 index 6c0fbaf673..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/types.py +++ /dev/null @@ -1,144 +0,0 @@ -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count - -import module_ -import _dafny -import System_ -import Wrappers_Compile - -assert "simple.types.boolean.internaldafny.types" == __name__ - -class DafnyCallEvent: - @classmethod - def default(cls, default_I, default_O): - return lambda: DafnyCallEvent_DafnyCallEvent(default_I(), default_O()) - def __ne__(self, __o: object) -> bool: - return not self.__eq__(__o) - @property - def is_DafnyCallEvent(self) -> bool: - return isinstance(self, simple.types.boolean.internaldafny.types.DafnyCallEvent_DafnyCallEvent) - -class DafnyCallEvent_DafnyCallEvent(DafnyCallEvent, NamedTuple('DafnyCallEvent', [('input', Any), ('output', Any)])): - def __dafnystr__(self) -> str: - return f'simple.types.boolean.internaldafny.types_Compile.DafnyCallEvent.DafnyCallEvent({_dafny.string_of(self.input)}, {_dafny.string_of(self.output)})' - def __eq__(self, __o: object) -> bool: - return isinstance(__o, simple.types.boolean.internaldafny.types.DafnyCallEvent_DafnyCallEvent) and self.input == __o.input and self.output == __o.output - def __hash__(self) -> int: - return super().__hash__() - - -class GetBooleanInput: - @classmethod - def default(cls, ): - return lambda: GetBooleanInput_GetBooleanInput(Wrappers_Compile.Option_None.default()()) - def __ne__(self, __o: object) -> bool: - return not self.__eq__(__o) - @property - def is_GetBooleanInput(self) -> bool: - return isinstance(self, simple.types.boolean.internaldafny.types.GetBooleanInput_GetBooleanInput) - -class GetBooleanInput_GetBooleanInput(GetBooleanInput, NamedTuple('GetBooleanInput', [('value', Any)])): - def __dafnystr__(self) -> str: - return f'simple.types.boolean.internaldafny.types_Compile.GetBooleanInput.GetBooleanInput({_dafny.string_of(self.value)})' - def __eq__(self, __o: object) -> bool: - return isinstance(__o, simple.types.boolean.internaldafny.types.GetBooleanInput_GetBooleanInput) and self.value == __o.value - def __hash__(self) -> int: - return super().__hash__() - - -class GetBooleanOutput: - @classmethod - def default(cls, ): - return lambda: GetBooleanOutput_GetBooleanOutput(Wrappers_Compile.Option_None.default()()) - def __ne__(self, __o: object) -> bool: - return not self.__eq__(__o) - @property - def is_GetBooleanOutput(self) -> bool: - return isinstance(self, simple.types.boolean.internaldafny.types.GetBooleanOutput_GetBooleanOutput) - -class GetBooleanOutput_GetBooleanOutput(GetBooleanOutput, NamedTuple('GetBooleanOutput', [('value', Any)])): - def __dafnystr__(self) -> str: - return f'simple.types.boolean.internaldafny.types_Compile.GetBooleanOutput.GetBooleanOutput({_dafny.string_of(self.value)})' - def __eq__(self, __o: object) -> bool: - return isinstance(__o, simple.types.boolean.internaldafny.types.GetBooleanOutput_GetBooleanOutput) and self.value == __o.value - def __hash__(self) -> int: - return super().__hash__() - - -class ISimpleBooleanClientCallHistory: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "simple.types.boolean.internaldafny.types_Compile.ISimpleBooleanClientCallHistory" - -class ISimpleBooleanClient: - pass - def GetBoolean(self, input): - pass - - -class SimpleBooleanConfig: - @_dafny.classproperty - def AllSingletonConstructors(cls): - return [SimpleBooleanConfig_SimpleBooleanConfig()] - @classmethod - def default(cls, ): - return lambda: SimpleBooleanConfig_SimpleBooleanConfig() - def __ne__(self, __o: object) -> bool: - return not self.__eq__(__o) - @property - def is_SimpleBooleanConfig(self) -> bool: - return isinstance(self, simple.types.boolean.internaldafny.types.SimpleBooleanConfig_SimpleBooleanConfig) - -class SimpleBooleanConfig_SimpleBooleanConfig(SimpleBooleanConfig, NamedTuple('SimpleBooleanConfig', [])): - def __dafnystr__(self) -> str: - return f'simple.types.boolean.internaldafny.types_Compile.SimpleBooleanConfig.SimpleBooleanConfig' - def __eq__(self, __o: object) -> bool: - return isinstance(__o, simple.types.boolean.internaldafny.types.SimpleBooleanConfig_SimpleBooleanConfig) - def __hash__(self) -> int: - return super().__hash__() - - -class Error: - @classmethod - def default(cls, ): - return lambda: Error_CollectionOfErrors(_dafny.Seq({}), _dafny.Seq({})) - def __ne__(self, __o: object) -> bool: - return not self.__eq__(__o) - @property - def is_CollectionOfErrors(self) -> bool: - return isinstance(self, simple.types.boolean.internaldafny.types.Error_CollectionOfErrors) - @property - def is_Opaque(self) -> bool: - return isinstance(self, simple.types.boolean.internaldafny.types.Error_Opaque) - -class Error_CollectionOfErrors(Error, NamedTuple('CollectionOfErrors', [('list', Any), ('message', Any)])): - def __dafnystr__(self) -> str: - return f'simple.types.boolean.internaldafny.types_Compile.Error.CollectionOfErrors({_dafny.string_of(self.list)}, {_dafny.string_of(self.message)})' - def __eq__(self, __o: object) -> bool: - return isinstance(__o, simple.types.boolean.internaldafny.types.Error_CollectionOfErrors) and self.list == __o.list and self.message == __o.message - def __hash__(self) -> int: - return super().__hash__() - -class Error_Opaque(Error, NamedTuple('Opaque', [('obj', Any)])): - def __dafnystr__(self) -> str: - return f'simple.types.boolean.internaldafny.types_Compile.Error.Opaque({_dafny.string_of(self.obj)})' - def __eq__(self, __o: object) -> bool: - return isinstance(__o, simple.types.boolean.internaldafny.types.Error_Opaque) and self.obj == __o.obj - def __hash__(self) -> int: - return super().__hash__() - - -class OpaqueError: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "" - @staticmethod - def default(): - return simple.types.boolean.internaldafny.types.Error_CollectionOfErrors.default()() - diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/wrapped.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/wrapped.py deleted file mode 100644 index 0240b759f9..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/TestsFromDafny-py-goal/simple/types/boolean/internaldafny/wrapped.py +++ /dev/null @@ -1,24 +0,0 @@ -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count - -import module_ -import _dafny -import System_ -import SimpleBooleanImplTest_Compile -import simple.types.boolean.internaldafny.types -assert "simple.types.boolean.internaldafny.wrapped" == __name__ -import Extern - -class default__: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "simple.types.boolean.internaldafny.wrapped_Compile._default" - @staticmethod - def WrappedDefaultSimpleBooleanConfig(): - return simple.types.boolean.internaldafny.types.SimpleBooleanConfig_SimpleBooleanConfig() - WrappedSimpleBoolean = Extern.WrappedSimpleBoolean - diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/SimpleBooleanImplTest_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/SimpleBooleanImplTest_Compile.py deleted file mode 100644 index 6122fa753c..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/SimpleBooleanImplTest_Compile.py +++ /dev/null @@ -1,77 +0,0 @@ -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count - -import module_ -import _dafny -import System_ -import Wrappers_Compile -import StandardLibrary_mUInt_Compile -import StandardLibrary_Compile -import UTF8 -import simple.types.boolean.internaldafny.types -import SimpleBooleanImpl_Compile -import simple.types.boolean.internaldafny.impl - -assert "SimpleBooleanImplTest_Compile" == __name__ -SimpleBooleanImplTest_Compile = sys.modules[__name__] - -class default__: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "SimpleBooleanImplTest_Compile._default" - @staticmethod - def GetBooleanTrue(): - d_73_client_: simple.types.boolean.internaldafny.impl.SimpleBooleanClient - d_74_valueOrError0_: Wrappers_Compile.Result = None - out1_: Wrappers_Compile.Result - out1_ = simple.types.boolean.internaldafny.impl.default__.SimpleBoolean(simple.types.boolean.internaldafny.impl.default__.DefaultSimpleBooleanConfig()) - d_74_valueOrError0_ = out1_ - if not(not((d_74_valueOrError0_).IsFailure())): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(10,19): " + _dafny.string_of(d_74_valueOrError0_)) - d_73_client_ = (d_74_valueOrError0_).Extract() - SimpleBooleanImplTest_Compile.default__.TestGetBooleanTrue(d_73_client_) - - @staticmethod - def GetBooleanFalse(): - d_75_client_: simple.types.boolean.internaldafny.impl.SimpleBooleanClient - d_76_valueOrError0_: Wrappers_Compile.Result = None - out2_: Wrappers_Compile.Result - out2_ = simple.types.boolean.internaldafny.impl.default__.SimpleBoolean(simple.types.boolean.internaldafny.impl.default__.DefaultSimpleBooleanConfig()) - d_76_valueOrError0_ = out2_ - if not(not((d_76_valueOrError0_).IsFailure())): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(14,19): " + _dafny.string_of(d_76_valueOrError0_)) - d_75_client_ = (d_76_valueOrError0_).Extract() - SimpleBooleanImplTest_Compile.default__.TestGetBooleanFalse(d_75_client_) - - @staticmethod - def TestGetBooleanTrue(client): - d_77_ret_: simple.types.boolean.internaldafny.types.GetBooleanOutput - d_78_valueOrError0_: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(simple.types.boolean.internaldafny.types.GetBooleanOutput.default())() - out3_: Wrappers_Compile.Result - out3_ = (client).GetBoolean(simple.types.boolean.internaldafny.types.GetBooleanInput_GetBooleanInput(Wrappers_Compile.Option_Some(True))) - d_78_valueOrError0_ = out3_ - if not(not((d_78_valueOrError0_).IsFailure())): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(23,16): " + _dafny.string_of(d_78_valueOrError0_)) - d_77_ret_ = (d_78_valueOrError0_).Extract() - if not((((d_77_ret_).value).UnwrapOr(False)) == (True)): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(24,8): " + _dafny.string_of(_dafny.Seq("expectation violation"))) - _dafny.print(_dafny.string_of(d_77_ret_)) - - @staticmethod - def TestGetBooleanFalse(client): - d_79_ret_: simple.types.boolean.internaldafny.types.GetBooleanOutput - d_80_valueOrError0_: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(simple.types.boolean.internaldafny.types.GetBooleanOutput.default())() - out4_: Wrappers_Compile.Result - out4_ = (client).GetBoolean(simple.types.boolean.internaldafny.types.GetBooleanInput_GetBooleanInput(Wrappers_Compile.Option_Some(False))) - d_80_valueOrError0_ = out4_ - if not(not((d_80_valueOrError0_).IsFailure())): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(33,16): " + _dafny.string_of(d_80_valueOrError0_)) - d_79_ret_ = (d_80_valueOrError0_).Extract() - if not((((d_79_ret_).value).UnwrapOr(True)) == (False)): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(34,8): " + _dafny.string_of(_dafny.Seq("expectation violation"))) - _dafny.print(_dafny.string_of(d_79_ret_)) - diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/SimpleBooleanImpl_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/SimpleBooleanImpl_Compile.py deleted file mode 100644 index 6e45223897..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/SimpleBooleanImpl_Compile.py +++ /dev/null @@ -1,62 +0,0 @@ -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count - -import module_ -import _dafny -import System_ -import Wrappers_Compile -import StandardLibrary_mUInt_Compile -import StandardLibrary_Compile -import UTF8 -import simple.types.boolean.internaldafny.types - -assert "SimpleBooleanImpl_Compile" == __name__ -SimpleBooleanImpl_Compile = sys.modules[__name__] - -class Config: - @_dafny.classproperty - def AllSingletonConstructors(cls): - return [Config_Config()] - @classmethod - def default(cls, ): - return lambda: Config_Config() - def __ne__(self, __o: object) -> bool: - return not self.__eq__(__o) - @property - def is_Config(self) -> bool: - return isinstance(self, SimpleBooleanImpl_Compile.Config_Config) - -class Config_Config(Config, NamedTuple('Config', [])): - def __dafnystr__(self) -> str: - return f'SimpleBooleanImpl_Compile.Config.Config' - def __eq__(self, __o: object) -> bool: - return isinstance(__o, SimpleBooleanImpl_Compile.Config_Config) - def __hash__(self) -> int: - return super().__hash__() - - -class default__: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "SimpleBooleanImpl_Compile._default" - @staticmethod - def GetBoolean(config, input): - output: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(simple.types.boolean.internaldafny.types.GetBooleanOutput.default())() - if not(((input).value).is_Some): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(17,4): " + _dafny.string_of(_dafny.Seq("expectation violation"))) - if not(((((input).value).value) == (True)) or ((((input).value).value) == (False))): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(19,4): " + _dafny.string_of(_dafny.Seq("expectation violation"))) - d_71_res_: simple.types.boolean.internaldafny.types.GetBooleanOutput - d_71_res_ = simple.types.boolean.internaldafny.types.GetBooleanOutput_GetBooleanOutput((input).value) - if not(((((d_71_res_).value).value) == (True)) or ((((d_71_res_).value).value) == (False))): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(22,4): " + _dafny.string_of(_dafny.Seq("expectation violation"))) - if not((((input).value).value) == (((d_71_res_).value).value)): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/src/SimpleBooleanImpl.dfy(24,4): " + _dafny.string_of(_dafny.Seq("expectation violation"))) - output = Wrappers_Compile.Result_Success(d_71_res_) - return output - return output - diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/StandardLibrary_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/StandardLibrary_Compile.py deleted file mode 100644 index 86ad05007f..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/StandardLibrary_Compile.py +++ /dev/null @@ -1,193 +0,0 @@ -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count - -import module_ -import _dafny -import System_ -import Wrappers_Compile -import StandardLibrary_mUInt_Compile - -assert "StandardLibrary_Compile" == __name__ -StandardLibrary_Compile = sys.modules[__name__] - -class default__: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "StandardLibrary_Compile._default" - @staticmethod - def Join(ss, joiner): - d_50___accumulator_ = _dafny.Seq([]) - while True: - with _dafny.label(): - if (len(ss)) == (1): - return (d_50___accumulator_) + ((ss)[0]) - elif True: - d_50___accumulator_ = (d_50___accumulator_) + (((ss)[0]) + (joiner)) - in0_ = _dafny.Seq((ss)[1::]) - in1_ = joiner - ss = in0_ - joiner = in1_ - raise _dafny.TailCall() - break - - @staticmethod - def Split(s, delim): - d_51___accumulator_ = _dafny.Seq([]) - while True: - with _dafny.label(): - d_52_i_ = StandardLibrary_Compile.default__.FindIndexMatching(s, delim, 0) - if (d_52_i_).is_Some: - d_51___accumulator_ = (d_51___accumulator_) + (_dafny.Seq([_dafny.Seq((s)[:(d_52_i_).value:])])) - in2_ = _dafny.Seq((s)[((d_52_i_).value) + (1)::]) - in3_ = delim - s = in2_ - delim = in3_ - raise _dafny.TailCall() - elif True: - return (d_51___accumulator_) + (_dafny.Seq([s])) - break - - @staticmethod - def SplitOnce(s, delim): - d_53_i_ = StandardLibrary_Compile.default__.FindIndexMatching(s, delim, 0) - return (_dafny.Seq((s)[:(d_53_i_).value:]), _dafny.Seq((s)[((d_53_i_).value) + (1)::])) - - @staticmethod - def SplitOnce_q(s, delim): - d_54_valueOrError0_ = StandardLibrary_Compile.default__.FindIndexMatching(s, delim, 0) - if (d_54_valueOrError0_).IsFailure(): - return (d_54_valueOrError0_).PropagateFailure() - elif True: - d_55_i_ = (d_54_valueOrError0_).Extract() - return Wrappers_Compile.Option_Some((_dafny.Seq((s)[:d_55_i_:]), _dafny.Seq((s)[(d_55_i_) + (1)::]))) - - @staticmethod - def FindIndexMatching(s, c, i): - def lambda0_(d_56_c_): - def lambda1_(d_57_x_): - return (d_57_x_) == (d_56_c_) - - return lambda1_ - - return StandardLibrary_Compile.default__.FindIndex(s, lambda0_(c), i) - - @staticmethod - def FindIndex(s, f, i): - while True: - with _dafny.label(): - if (i) == (len(s)): - return Wrappers_Compile.Option_None() - elif f((s)[i]): - return Wrappers_Compile.Option_Some(i) - elif True: - in4_ = s - in5_ = f - in6_ = (i) + (1) - s = in4_ - f = in5_ - i = in6_ - raise _dafny.TailCall() - break - - @staticmethod - def Filter(s, f): - d_58___accumulator_ = _dafny.Seq([]) - while True: - with _dafny.label(): - if (len(s)) == (0): - return (d_58___accumulator_) + (_dafny.Seq([])) - elif f((s)[0]): - d_58___accumulator_ = (d_58___accumulator_) + (_dafny.Seq([(s)[0]])) - in7_ = _dafny.Seq((s)[1::]) - in8_ = f - s = in7_ - f = in8_ - raise _dafny.TailCall() - elif True: - in9_ = _dafny.Seq((s)[1::]) - in10_ = f - s = in9_ - f = in10_ - raise _dafny.TailCall() - break - - @staticmethod - def Min(a, b): - if (a) < (b): - return a - elif True: - return b - - @staticmethod - def Fill(value, n): - return _dafny.Seq([value for d_59___v0_ in range(n)]) - - @staticmethod - def SeqToArray(s): - a: _dafny.Array = _dafny.Array(None, 0) - def lambda2_(d_60_s_): - def lambda3_(d_61_i_): - return (d_60_s_)[d_61_i_] - - return lambda3_ - - init0_ = lambda2_(s) - nw0_ = _dafny.Array(None, len(s)) - for i0_0_ in range(nw0_.length(0)): - nw0_[i0_0_] = init0_(i0_0_) - a = nw0_ - return a - - @staticmethod - def LexicographicLessOrEqual(a, b, less): - def lambda4_(exists_var_0_): - d_62_k_: int = exists_var_0_ - return (((0) <= (d_62_k_)) and ((d_62_k_) <= (len(a)))) and (StandardLibrary_Compile.default__.LexicographicLessOrEqualAux(a, b, less, d_62_k_)) - - return _dafny.quantifier(_dafny.IntegerRange(0, (len(a)) + (1)), False, lambda4_) - - @staticmethod - def LexicographicLessOrEqualAux(a, b, less, lengthOfCommonPrefix): - def lambda5_(forall_var_0_): - d_63_i_: int = forall_var_0_ - return not (((0) <= (d_63_i_)) and ((d_63_i_) < (lengthOfCommonPrefix))) or (((a)[d_63_i_]) == ((b)[d_63_i_])) - - return (((lengthOfCommonPrefix) <= (len(b))) and (_dafny.quantifier(_dafny.IntegerRange(0, lengthOfCommonPrefix), True, lambda5_))) and (((lengthOfCommonPrefix) == (len(a))) or (((lengthOfCommonPrefix) < (len(b))) and (less((a)[lengthOfCommonPrefix], (b)[lengthOfCommonPrefix])))) - - @staticmethod - def SetToOrderedSequence(s, less): - d_64___accumulator_ = _dafny.Seq([]) - while True: - with _dafny.label(): - pat_let_tv0_ = s - pat_let_tv1_ = less - if (s) == (_dafny.Set({})): - return (d_64___accumulator_) + (_dafny.Seq([])) - elif True: - def iife0_(_let_dummy_0): - d_65_a_: _dafny.Seq = None - with _dafny.label("_ASSIGN_SUCH_THAT_d_0"): - assign_such_that_0_: _dafny.Seq - for assign_such_that_0_ in (s).Elements: - d_65_a_ = assign_such_that_0_ - if ((d_65_a_) in (s)) and (StandardLibrary_Compile.default__.IsMinimum(d_65_a_, s, less)): - raise _dafny.Break("_ASSIGN_SUCH_THAT_d_0") - raise Exception("assign-such-that search produced no value (line 369)") - pass - return (_dafny.Seq([d_65_a_])) + (StandardLibrary_Compile.default__.SetToOrderedSequence((pat_let_tv0_) - (_dafny.Set({d_65_a_})), pat_let_tv1_)) - return iife0_(0) - - break - - @staticmethod - def IsMinimum(a, s, less): - def lambda6_(forall_var_1_): - d_66_z_: _dafny.Seq = forall_var_1_ - return not ((d_66_z_) in (s)) or (StandardLibrary_Compile.default__.LexicographicLessOrEqual(a, d_66_z_, less)) - - return ((a) in (s)) and (_dafny.quantifier((s).Elements, True, lambda6_)) - diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/StandardLibrary_mUInt_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/StandardLibrary_mUInt_Compile.py deleted file mode 100644 index cd6f10f64a..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/StandardLibrary_mUInt_Compile.py +++ /dev/null @@ -1,208 +0,0 @@ -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count - -import module_ -import _dafny -import System_ -import Wrappers_Compile - -assert "StandardLibrary_mUInt_Compile" == __name__ -StandardLibrary_mUInt_Compile = sys.modules[__name__] - -class uint8: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "" - @staticmethod - def default(): - return int(0) - -class uint16: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "" - @staticmethod - def default(): - return int(0) - -class uint32: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "" - @staticmethod - def default(): - return int(0) - -class uint64: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "" - @staticmethod - def default(): - return int(0) - -class int32: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "" - @staticmethod - def default(): - return int(0) - -class int64: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "" - @staticmethod - def default(): - return int(0) - -class posInt64: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "" - @staticmethod - def default(): - return 1 - -class seq16: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "" - @staticmethod - def default(): - return _dafny.Seq({}) - -class seq32: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "" - @staticmethod - def default(): - return _dafny.Seq({}) - -class seq64: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "" - @staticmethod - def default(): - return _dafny.Seq({}) - -class default__: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "StandardLibrary.StandardLibrary_mUInt_Compile._default" - @staticmethod - def UInt8Less(a, b): - return (a) < (b) - - @staticmethod - def HasUint16Len(s): - return (len(s)) < ((StandardLibrary_mUInt_Compile.default__).UINT16__LIMIT) - - @staticmethod - def HasUint32Len(s): - return (len(s)) < ((StandardLibrary_mUInt_Compile.default__).UINT32__LIMIT) - - @staticmethod - def HasUint64Len(s): - return (len(s)) < ((StandardLibrary_mUInt_Compile.default__).UINT64__LIMIT) - - @staticmethod - def UInt16ToSeq(x): - d_16_b0_ = _dafny.euclidian_division(x, 256) - d_17_b1_ = _dafny.euclidian_modulus(x, 256) - return _dafny.Seq([d_16_b0_, d_17_b1_]) - - @staticmethod - def SeqToUInt16(s): - d_18_x0_ = ((s)[0]) * (256) - return (d_18_x0_) + ((s)[1]) - - @staticmethod - def UInt32ToSeq(x): - d_19_b0_ = _dafny.euclidian_division(x, 16777216) - d_20_x0_ = (x) - ((d_19_b0_) * (16777216)) - d_21_b1_ = _dafny.euclidian_division(d_20_x0_, 65536) - d_22_x1_ = (d_20_x0_) - ((d_21_b1_) * (65536)) - d_23_b2_ = _dafny.euclidian_division(d_22_x1_, 256) - d_24_b3_ = _dafny.euclidian_modulus(d_22_x1_, 256) - return _dafny.Seq([d_19_b0_, d_21_b1_, d_23_b2_, d_24_b3_]) - - @staticmethod - def SeqToUInt32(s): - d_25_x0_ = ((s)[0]) * (16777216) - d_26_x1_ = (d_25_x0_) + (((s)[1]) * (65536)) - d_27_x2_ = (d_26_x1_) + (((s)[2]) * (256)) - return (d_27_x2_) + ((s)[3]) - - @staticmethod - def UInt64ToSeq(x): - d_28_b0_ = _dafny.euclidian_division(x, 72057594037927936) - d_29_x0_ = (x) - ((d_28_b0_) * (72057594037927936)) - d_30_b1_ = _dafny.euclidian_division(d_29_x0_, 281474976710656) - d_31_x1_ = (d_29_x0_) - ((d_30_b1_) * (281474976710656)) - d_32_b2_ = _dafny.euclidian_division(d_31_x1_, 1099511627776) - d_33_x2_ = (d_31_x1_) - ((d_32_b2_) * (1099511627776)) - d_34_b3_ = _dafny.euclidian_division(d_33_x2_, 4294967296) - d_35_x3_ = (d_33_x2_) - ((d_34_b3_) * (4294967296)) - d_36_b4_ = _dafny.euclidian_division(d_35_x3_, 16777216) - d_37_x4_ = (d_35_x3_) - ((d_36_b4_) * (16777216)) - d_38_b5_ = _dafny.euclidian_division(d_37_x4_, 65536) - d_39_x5_ = (d_37_x4_) - ((d_38_b5_) * (65536)) - d_40_b6_ = _dafny.euclidian_division(d_39_x5_, 256) - d_41_b7_ = _dafny.euclidian_modulus(d_39_x5_, 256) - return _dafny.Seq([d_28_b0_, d_30_b1_, d_32_b2_, d_34_b3_, d_36_b4_, d_38_b5_, d_40_b6_, d_41_b7_]) - - @staticmethod - def SeqToUInt64(s): - d_42_x0_ = ((s)[0]) * (72057594037927936) - d_43_x1_ = (d_42_x0_) + (((s)[1]) * (281474976710656)) - d_44_x2_ = (d_43_x1_) + (((s)[2]) * (1099511627776)) - d_45_x3_ = (d_44_x2_) + (((s)[3]) * (4294967296)) - d_46_x4_ = (d_45_x3_) + (((s)[4]) * (16777216)) - d_47_x5_ = (d_46_x4_) + (((s)[5]) * (65536)) - d_48_x6_ = (d_47_x5_) + (((s)[6]) * (256)) - d_49_x_ = (d_48_x6_) + ((s)[7]) - return d_49_x_ - - @_dafny.classproperty - def UINT16__LIMIT(instance): - return 65536 - @_dafny.classproperty - def UINT32__LIMIT(instance): - return 4294967296 - @_dafny.classproperty - def UINT64__LIMIT(instance): - return 18446744073709551616 - @_dafny.classproperty - def INT32__MAX__LIMIT(instance): - return 2147483648 - @_dafny.classproperty - def INT64__MAX__LIMIT(instance): - return 9223372036854775808 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/System_.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/System_.py deleted file mode 100644 index 32e6d896ff..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/System_.py +++ /dev/null @@ -1,20 +0,0 @@ -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count - -import module_ -import _dafny - -assert "System_" == __name__ -System_ = sys.modules[__name__] - -class nat: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "" - @staticmethod - def default(): - return int(0) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/UTF8.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/UTF8.py deleted file mode 100644 index 45e3b8b7a5..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/UTF8.py +++ /dev/null @@ -1,118 +0,0 @@ -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count - -import module_ -import _dafny -import System_ -import Wrappers_Compile -import StandardLibrary_mUInt_Compile -import StandardLibrary_Compile - -assert "UTF8" == __name__ -UTF8 = sys.modules[__name__] - -class ValidUTF8Bytes: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "" - @staticmethod - def default(): - return _dafny.Seq([]) - -class default__: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "UTF8_Compile._default" - @staticmethod - def IsASCIIString(s): - def lambda7_(forall_var_2_): - d_67_i_: int = forall_var_2_ - return not (((0) <= (d_67_i_)) and ((d_67_i_) < (len(s)))) or ((ord((s)[d_67_i_])) < (128)) - - return _dafny.quantifier(_dafny.IntegerRange(0, len(s)), True, lambda7_) - - @staticmethod - def EncodeAscii(s): - d_68___accumulator_ = _dafny.Seq([]) - while True: - with _dafny.label(): - if (len(s)) == (0): - return (d_68___accumulator_) + (_dafny.Seq([])) - elif True: - d_69_x_ = _dafny.Seq([ord((s)[0])]) - d_68___accumulator_ = (d_68___accumulator_) + (d_69_x_) - in11_ = _dafny.Seq((s)[1::]) - s = in11_ - raise _dafny.TailCall() - break - - @staticmethod - def Uses1Byte(s): - return ((0) <= ((s)[0])) and (((s)[0]) <= (127)) - - @staticmethod - def Uses2Bytes(s): - return (((194) <= ((s)[0])) and (((s)[0]) <= (223))) and (((128) <= ((s)[1])) and (((s)[1]) <= (191))) - - @staticmethod - def Uses3Bytes(s): - return (((((((s)[0]) == (224)) and (((160) <= ((s)[1])) and (((s)[1]) <= (191)))) and (((128) <= ((s)[2])) and (((s)[2]) <= (191)))) or (((((225) <= ((s)[0])) and (((s)[0]) <= (236))) and (((128) <= ((s)[1])) and (((s)[1]) <= (191)))) and (((128) <= ((s)[2])) and (((s)[2]) <= (191))))) or (((((s)[0]) == (237)) and (((128) <= ((s)[1])) and (((s)[1]) <= (159)))) and (((128) <= ((s)[2])) and (((s)[2]) <= (191))))) or (((((238) <= ((s)[0])) and (((s)[0]) <= (239))) and (((128) <= ((s)[1])) and (((s)[1]) <= (191)))) and (((128) <= ((s)[2])) and (((s)[2]) <= (191)))) - - @staticmethod - def Uses4Bytes(s): - return (((((((s)[0]) == (240)) and (((144) <= ((s)[1])) and (((s)[1]) <= (191)))) and (((128) <= ((s)[2])) and (((s)[2]) <= (191)))) and (((128) <= ((s)[3])) and (((s)[3]) <= (191)))) or ((((((241) <= ((s)[0])) and (((s)[0]) <= (243))) and (((128) <= ((s)[1])) and (((s)[1]) <= (191)))) and (((128) <= ((s)[2])) and (((s)[2]) <= (191)))) and (((128) <= ((s)[3])) and (((s)[3]) <= (191))))) or ((((((s)[0]) == (244)) and (((128) <= ((s)[1])) and (((s)[1]) <= (143)))) and (((128) <= ((s)[2])) and (((s)[2]) <= (191)))) and (((128) <= ((s)[3])) and (((s)[3]) <= (191)))) - - @staticmethod - def ValidUTF8Range(a, lo, hi): - while True: - with _dafny.label(): - if (lo) == (hi): - return True - elif True: - d_70_r_ = _dafny.Seq((a)[lo:hi:]) - if UTF8.default__.Uses1Byte(d_70_r_): - in12_ = a - in13_ = (lo) + (1) - in14_ = hi - a = in12_ - lo = in13_ - hi = in14_ - raise _dafny.TailCall() - elif ((2) <= (len(d_70_r_))) and (UTF8.default__.Uses2Bytes(d_70_r_)): - in15_ = a - in16_ = (lo) + (2) - in17_ = hi - a = in15_ - lo = in16_ - hi = in17_ - raise _dafny.TailCall() - elif ((3) <= (len(d_70_r_))) and (UTF8.default__.Uses3Bytes(d_70_r_)): - in18_ = a - in19_ = (lo) + (3) - in20_ = hi - a = in18_ - lo = in19_ - hi = in20_ - raise _dafny.TailCall() - elif ((4) <= (len(d_70_r_))) and (UTF8.default__.Uses4Bytes(d_70_r_)): - in21_ = a - in22_ = (lo) + (4) - in23_ = hi - a = in21_ - lo = in22_ - hi = in23_ - raise _dafny.TailCall() - elif True: - return False - break - - @staticmethod - def ValidUTF8Seq(s): - return UTF8.default__.ValidUTF8Range(s, 0, len(s)) - diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/WrappedSimpleTypesBooleanTest_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/WrappedSimpleTypesBooleanTest_Compile.py deleted file mode 100644 index bcf2b405bf..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/WrappedSimpleTypesBooleanTest_Compile.py +++ /dev/null @@ -1,51 +0,0 @@ -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count - -import module_ -import _dafny -import System_ -import Wrappers_Compile -import StandardLibrary_mUInt_Compile -import StandardLibrary_Compile -import UTF8 -import simple.types.boolean.internaldafny.types -import SimpleBooleanImpl_Compile -import simple.types.boolean.internaldafny.impl -import SimpleBooleanImplTest_Compile -import simple.types.boolean.internaldafny.wrapped - -assert "WrappedSimpleTypesBooleanTest_Compile" == __name__ -WrappedSimpleTypesBooleanTest_Compile = sys.modules[__name__] - -class default__: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "WrappedSimpleTypesBooleanTest_Compile._default" - @staticmethod - def GetBooleanTrue(): - d_81_client_: simple.types.boolean.internaldafny.types.ISimpleBooleanClient - d_82_valueOrError0_: Wrappers_Compile.Result = None - out5_: Wrappers_Compile.Result - out5_ = simple.types.boolean.internaldafny.wrapped.default__.WrappedSimpleBoolean(simple.types.boolean.internaldafny.wrapped.default__.WrappedDefaultSimpleBooleanConfig()) - d_82_valueOrError0_ = out5_ - if not(not((d_82_valueOrError0_).IsFailure())): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/WrappedSimpleBooleanTest.dfy(11,19): " + _dafny.string_of(d_82_valueOrError0_)) - d_81_client_ = (d_82_valueOrError0_).Extract() - SimpleBooleanImplTest_Compile.default__.TestGetBooleanTrue(d_81_client_) - - @staticmethod - def GetBooleanFalse(): - d_83_client_: simple.types.boolean.internaldafny.types.ISimpleBooleanClient - d_84_valueOrError0_: Wrappers_Compile.Result = None - out6_: Wrappers_Compile.Result - out6_ = simple.types.boolean.internaldafny.wrapped.default__.WrappedSimpleBoolean(simple.types.boolean.internaldafny.wrapped.default__.WrappedDefaultSimpleBooleanConfig()) - d_84_valueOrError0_ = out6_ - if not(not((d_84_valueOrError0_).IsFailure())): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/WrappedSimpleBooleanTest.dfy(15,19): " + _dafny.string_of(d_84_valueOrError0_)) - d_83_client_ = (d_84_valueOrError0_).Extract() - SimpleBooleanImplTest_Compile.default__.TestGetBooleanFalse(d_83_client_) - diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/Wrappers_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/Wrappers_Compile.py deleted file mode 100644 index ddde85ac6b..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/Wrappers_Compile.py +++ /dev/null @@ -1,190 +0,0 @@ -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count - -import module_ -import _dafny -import System_ - -assert "Wrappers_Compile" == __name__ -Wrappers_Compile = sys.modules[__name__] - -class Option: - @classmethod - def default(cls, ): - return lambda: Option_None() - def __ne__(self, __o: object) -> bool: - return not self.__eq__(__o) - @property - def is_None(self) -> bool: - return isinstance(self, Wrappers_Compile.Option_None) - @property - def is_Some(self) -> bool: - return isinstance(self, Wrappers_Compile.Option_Some) - def ToResult(self): - source0_ = self - if source0_.is_None: - return Wrappers_Compile.Result_Failure(_dafny.Seq("Option is None")) - elif True: - d_0___mcc_h0_ = source0_.value - d_1_v_ = d_0___mcc_h0_ - return Wrappers_Compile.Result_Success(d_1_v_) - - def UnwrapOr(self, default): - source1_ = self - if source1_.is_None: - return default - elif True: - d_2___mcc_h0_ = source1_.value - d_3_v_ = d_2___mcc_h0_ - return d_3_v_ - - def IsFailure(self): - return (self).is_None - - def PropagateFailure(self): - return Wrappers_Compile.Option_None() - - def Extract(self): - return (self).value - - -class Option_None(Option, NamedTuple('None_', [])): - def __dafnystr__(self) -> str: - return f'Wrappers_Compile.Option.None' - def __eq__(self, __o: object) -> bool: - return isinstance(__o, Wrappers_Compile.Option_None) - def __hash__(self) -> int: - return super().__hash__() - -class Option_Some(Option, NamedTuple('Some', [('value', Any)])): - def __dafnystr__(self) -> str: - return f'Wrappers_Compile.Option.Some({_dafny.string_of(self.value)})' - def __eq__(self, __o: object) -> bool: - return isinstance(__o, Wrappers_Compile.Option_Some) and self.value == __o.value - def __hash__(self) -> int: - return super().__hash__() - - -class Result: - @classmethod - def default(cls, default_T): - return lambda: Result_Success(default_T()) - def __ne__(self, __o: object) -> bool: - return not self.__eq__(__o) - @property - def is_Success(self) -> bool: - return isinstance(self, Wrappers_Compile.Result_Success) - @property - def is_Failure(self) -> bool: - return isinstance(self, Wrappers_Compile.Result_Failure) - def ToOption(self): - source2_ = self - if source2_.is_Success: - d_4___mcc_h0_ = source2_.value - d_5_s_ = d_4___mcc_h0_ - return Wrappers_Compile.Option_Some(d_5_s_) - elif True: - d_6___mcc_h1_ = source2_.error - d_7_e_ = d_6___mcc_h1_ - return Wrappers_Compile.Option_None() - - def UnwrapOr(self, default): - source3_ = self - if source3_.is_Success: - d_8___mcc_h0_ = source3_.value - d_9_s_ = d_8___mcc_h0_ - return d_9_s_ - elif True: - d_10___mcc_h1_ = source3_.error - d_11_e_ = d_10___mcc_h1_ - return default - - def IsFailure(self): - return (self).is_Failure - - def PropagateFailure(self): - return Wrappers_Compile.Result_Failure((self).error) - - def MapFailure(self, reWrap): - source4_ = self - if source4_.is_Success: - d_12___mcc_h0_ = source4_.value - d_13_s_ = d_12___mcc_h0_ - return Wrappers_Compile.Result_Success(d_13_s_) - elif True: - d_14___mcc_h1_ = source4_.error - d_15_e_ = d_14___mcc_h1_ - return Wrappers_Compile.Result_Failure(reWrap(d_15_e_)) - - def Extract(self): - return (self).value - - -class Result_Success(Result, NamedTuple('Success', [('value', Any)])): - def __dafnystr__(self) -> str: - return f'Wrappers_Compile.Result.Success({_dafny.string_of(self.value)})' - def __eq__(self, __o: object) -> bool: - return isinstance(__o, Wrappers_Compile.Result_Success) and self.value == __o.value - def __hash__(self) -> int: - return super().__hash__() - -class Result_Failure(Result, NamedTuple('Failure', [('error', Any)])): - def __dafnystr__(self) -> str: - return f'Wrappers_Compile.Result.Failure({_dafny.string_of(self.error)})' - def __eq__(self, __o: object) -> bool: - return isinstance(__o, Wrappers_Compile.Result_Failure) and self.error == __o.error - def __hash__(self) -> int: - return super().__hash__() - - -class Outcome: - @classmethod - def default(cls, ): - return lambda: Outcome_Pass() - def __ne__(self, __o: object) -> bool: - return not self.__eq__(__o) - @property - def is_Pass(self) -> bool: - return isinstance(self, Wrappers_Compile.Outcome_Pass) - @property - def is_Fail(self) -> bool: - return isinstance(self, Wrappers_Compile.Outcome_Fail) - def IsFailure(self): - return (self).is_Fail - - def PropagateFailure(self): - return Wrappers_Compile.Result_Failure((self).error) - - -class Outcome_Pass(Outcome, NamedTuple('Pass', [])): - def __dafnystr__(self) -> str: - return f'Wrappers_Compile.Outcome.Pass' - def __eq__(self, __o: object) -> bool: - return isinstance(__o, Wrappers_Compile.Outcome_Pass) - def __hash__(self) -> int: - return super().__hash__() - -class Outcome_Fail(Outcome, NamedTuple('Fail', [('error', Any)])): - def __dafnystr__(self) -> str: - return f'Wrappers_Compile.Outcome.Fail({_dafny.string_of(self.error)})' - def __eq__(self, __o: object) -> bool: - return isinstance(__o, Wrappers_Compile.Outcome_Fail) and self.error == __o.error - def __hash__(self) -> int: - return super().__hash__() - - -class default__: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "Wrappers_Compile._default" - @staticmethod - def Need(condition, error): - if condition: - return Wrappers_Compile.Outcome_Pass() - elif True: - return Wrappers_Compile.Outcome_Fail(error) - diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/__pycache__/SimpleBooleanImplTest_Compile.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/__pycache__/SimpleBooleanImplTest_Compile.cpython-311.pyc deleted file mode 100644 index 1a9d9b7da8e614110292feb1648d35bf3a46869f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7439 zcmeHM%WoUU8K2$dV=0LeB}$ebv7^SaEuyZdS1hG9jKs1Pzp95NJIx}^dd*$gq?eD( zE^SMdP$BTaKznT9UJB@tx;6~-)I*N>3kr%@L&N|E3=}=|Cf5lH7(Mj+X1OF+qLZR6 z45RSu@SBMC@s8vtJ2EDHl>Y+Q6%u%q$bZAcbRxjyNzF91tER!E4{}Q^ys%U-E^CyvOlw&~Unmw#BO$QhqM6TA zjHL3#oXz&nr?VhAna`VsmOBga1;et{$$YkuHjNZk?m4gN=eL1#j~GM|bfSp5aEB<8 zE*gPFQJ3xnl%NsP19!-M$o0r8OO!BhgFCn~aA9!U@JEWH3K>8SfyIOwi-4V~so9e_1C^^A6|V zpZB4sk7~VL6;^~*vO?Bz^gEotBu&`ydX@}VTbR}bAHUVhvqJoBErY<%`CNdO+r0dZ zp}*x-(cW8^Hq0Te_71lq`ddK-=kde%zPnU?Gd^ zDi*Zy6teJDS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%$H_GJ~QcK2=xIpe_NP}m|-eDYKE!9hWRIkjWCrMF&qI_ zRC<_7B+w-=h$U#iqA75lgvNt8IH{$;b@UX-IH>VJhL%c#j1=W1At)XaWPFDKUCj2_ z!e1)cF#PH4yHHk+f<0K_uR45O;ZM}~6MFos9yqM@9D#sli*N5J{HYp$$_Rk(D1F~k z_!n&%78L&F8vnA9VL|CTrtsgjWhh%RFoc$sK9>k^`WI_hrxs)9l)h02%eES}EC~O3 z^z#eVH-u^?TkW~5M6T2#SE}5V4Z^VsgSOq_Smex5?Sm))FJoDuT5L8kKUh7yj%CAI zO)LO00A9$lVPO*sg0H|USr&%je}SuTuyShCrvO~)Xj8y%F!c*0H<93CkGv1$A$k;b zlZUW6VF;ZnaGj$~6?o3BO%+Y%RFQ<~Tbt68;0@YDo=h5kku<#_2@{Ft14-}(-ST0@ z29_Tbg(P@`Ami4>Gs6caGl;D6!|3f-8~ErEtC7VYH?*7LF{u z!lm7O(7~po3!70cTYwjM3R9A8!$u^?Uhc9l*KIr4zW``ngtRZsKCxKTI~7arV-?sq zZM8*k2kn+;ZYTc=;F@vq(!ErEQh7NvEaPcgM{)r&xFwtWzs~{Gk1-xZ`m2%tCl+nY z3ZBMd)hHYZU8_94OJIr1zL3=(8Nl1U_&kkA9!BBt=9hWr%C&yn0fatFyDkf_fw9kK{8XVI(*<)R*bGi$;JYKcbV=B6ux+8oY6Kn$=!8 zJI&&~h?DBCopmG9ZM#S5UJbx2Xjs__5E=hSoZF_@c zX22?C;1k$zT~&?5b;Se&jZqkkU+ z_b(s#A{eh4-<96}yDiJ7YrW8n-K##1g%>sJ$s^=_WdZH=S!l8U!+dZp&#`WT{fJ_J jbpZMc7qImN^Xhy6<$tvfN*(FHw$dw! diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/__pycache__/System_.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/__pycache__/System_.cpython-311.pyc deleted file mode 100644 index a1fc71e803745a1db9201943b8e2a98e88d8b6e6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1363 zcmah{&5ImG6o1vq^)^z<*;A4?~|8f(LIK)>BTt*E2oIM$xM3*YEx6)%*UX*XsbT;jz}S!P96W=D4BL{8>LE+gEQUgk%B!#gs_)}pnBXR;G@ zn)mC`I(J3)z#`k)`U0LX0pInOoCH>YzC3dE#ZtTZqJ;^6&`nHaDrN=?OTX^?qXnGZRd$ev7W0%yp7+b zhlFa0YHau%p0nD~LXN2TaQ)Ty;a6HH9m+|XrM$?)J3=3rq6{Au>Y$WKD#EgmRaU5S zKim`Ad|7ZIb+|juFh@$e&P5~d86i>ouG8OLYhDn^%qCL9_MBe z5}8~C<8v`eCel1!r#O}ZU2BSc3V&?&k3Rb0;nRnQy(W<1AfS5XIAd{Kcj7oJ_(T$q zX+4-Ea&e=!@pWxuifV_rt~QAorDfFd|+2^gSfg)xNNp+q-}j@tE8H zIVGU~7CCpfNqL9hotHLv{n0gmt*o?6` zbf(Ro!^da;cjmBjcJ<8R-LtFb95$xSo~nwX==0zF_s-fg@ARI2c(ng}=l!XF T;RFne_fPVYu)qH0qABO!g{?*| diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/__pycache__/UTF8.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/__pycache__/UTF8.cpython-311.pyc deleted file mode 100644 index 9adb6dd3ca1fd97584ff30ad400bcdf6c5c2f9b3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9510 zcmds7du$X*dhd7l_%--}&0^!VVPCUw43EXYLKY0m7~9|jX8d6G(H>9t7(>tWxO=?I zjK>dch_b67#kb;uPvY)4X>Vh)dlIK(r9J6R;V#kXq+F!7Wobtvp%6v+!%`k55NUOP z<@>7V)%KW>yF8@yjK8nytFNlQs`~0zJzx3HtE($0c>2EkC(1ACDC!?DlYh8e;_+`F zag$Ogh1R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1=T0j=^h7^Y0Fp8#qL30{BbNI5y^t#6%j}3JkFmyF+@?qqTQZL#iYtwRq7Y%LSZtVlzY|}T` zVa6Qxyv9>b+uNh@9O%Ziy4j?*r@3enqobpNZ4Sf-n%T5sopH@$(98V|$Q)TrlYIxe z%GRF>BcJDbg{OOk-Mzy8Ug6N)!aECvcfM2K@2QQRYWLLHUkQ0vIxLIg4f%KEF3Gdu56}U>6}S5ci~vIZP`l61KSEaS|UTSDj&ZbU*3hDg>Ne|Dz7m7xJ!Rl$DJ-u2RiLl#gN$goH ztGpGq({Xtk{3!S@hE9cHh{Z6vVrd{eY3be+!+3~io8VnN@Ugj(2&Yo$DA0Ba6T!pIt}mD8i_&IuDn@U(e9|<8R@Cav(Uem)RsV z!Qj!I0J@lvB*`azbK>*Kp6)+opNw?l*(Y1O@qCXA%!$t@`8o0VE0R)|gxM!gccbi+ zZQUsQq<>C)KB;!2?32-Mlzmd^Mmavnc$b9vUZ!$uY$3D18)biN*EjvQj`hY~>XIFc U$;Tvon-8b=h5XmQ(27_52Z{XZVgLXD diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/__pycache__/Wrappers_Compile.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/__pycache__/Wrappers_Compile.cpython-311.pyc deleted file mode 100644 index 08ee3c8a42dbcd0fcfa71c6cf92c52a95ed396ba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 14812 zcmd5jTW}OtcHQ$Hy;^8^NeD9_!CGK6Vt6hBNr2Wavt}eCjA0<#8D?4_n1_6OWGqD@ z+ASs4?z)oomR+clbxNCTSco?%Hn9^v^1%nG%11tWl-aVXtG0@&Bp>+`B|cLA$~pJm z?&-$}8J+3A_uPBWJ@=e*&pEgC%li5n0j|U+KhFH;20{2Qd@wFr0}soucm(05 zkP$LsR!HKnCoASWNl(t3^yYj?U(TQOi&*Z>26DkUpzn zv1L^>Y^3d?&~B@PhU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O*qL(37>7CSlT}py2$7AIVsARYkqg+cYpfab`L|TF79`-rKJTld<8l{l zbfyu##f(0>6?MT0Z&vF89J#a{sSNMhqn67FD&Nek1+h42{xCnmcspfpM%bQ2uJM+DB zZ=bvT+`G?Z*6qr!+f}M1CGb_)GygdY{fh#+(x*O8A*6C*oPVL7|I0!lvz?_1Ax1+h zylig-Ejs6)s|QKqgj5~ja8UR8DQY)>)nrYhY#M6Zox5q#XLs*HmU%Y!ROLAlnxJUT zN}J#%odq*AgZ(lkgOqP0r{hXSchN{F-b-xo$v>g@SCpAS|LEMScJ96U@D+UCKlH&N z+*rPhDPelwjaFP1a}KqDdIaCW~%PXR^2zXZ@zpTIUGFoWW_V_$mmg-#sa;@2CI{>mnbr=ap0Zwu}FlkZ!7GHy_{t5X$>A7W(N}@ z9lbCZuLD+O52bU)>5cL-nG4vfe{mEqreq$0N&X}-aN+6=a?uktauWek{P{Y2KU_JF zZo%QNIz33i4-q&_;4uP>L$aP4r`xv)yi4FY0)Ir{uL=06W_2ZVCA0D| z>lL%@Fl!34TrdrrDIrXhWilS0_ZgyD|;E|y9ZJyeVpBv}Fv6{7_q|EdL>Tf`~`KnhjQyP1pXQgwb6 zk5S9wIw>wd3i}}QZsyYCl5gb_5wBJ(1}XbZ^8K_Bw53lJ>CE-T|B~x&^3YGskp_TG zdb^_uxYmd;1{Q;xgm+Ob2#(@w=8`Rq;d{j?BtMr;wW z)3O*O*WM)GPYXehiB*KiVsMlEJ}m^S-6Uf1rx>J~Z<6n)g`g)f`tW*i9k_HC^K+Gp zczR6-^-huXpav>6LW4O~6s;h|$g`U0rrJQB)i~0h;_3hcf}UQ>15|)s#+e5$n@DyE t1H^d3$kTz#Nhx(u=@y|%6oZ@O_h})ZwoKfId`rWd%>UCxLfK^U{{eAxySo4Y diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/__pycache__/module_.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/__pycache__/module_.cpython-311.pyc deleted file mode 100644 index dc38d98392f6aea652f67ebbd6600464112b3b98..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6648 zcmd@YOKcm*b#|AZB_)b0S+wL2TPm^`%T37Ih7&a{EK`ZTwPhKSU3e{HyW$Qd%F9n? zmr*EKjS#3nfaKsqiu4kohr~td_SOP9}Ue%Xc4zbN1)U$b%h-_ZB~DM(>dB+{By znF1@a1y1A&KG9e3i++aUIWy05tdg!@}f zB!*cuiIl(=Qi9iE{0(Og9VzZtn0YkJe?@`WVV}*vDyyozq+*-P6svY{p<2clWMYSB zEzvEv;6vg{)F4reDL_6}?nWua(G^vMOhBx?EDLg%T;Rq!+NJ zpD8I=)zb6%0_>D--ffSSN-CC%X#)Gr7XV$Z>MO9IMzU!|&K0ZDGA?2w>sU!QrI9LE zZC;Y{#XNAo-qYGh%Ek2qk6I9lO;qDM-|^jsCb9zr>lIRLyIp!{?CiQAHAtnT=Hes* zD-cj?)DQp>=!%_^?D5Q9SS>6DLVTJ^iF-%w3>AbGWl&i8Q9qUymu zies)FkKR586+at9`aOKD(gSzWAw+(+!CqxoTl?AIo(O+FFAwb?=3B|*YTKQEyR|$L z-_-_xJ8r#waM1=fn2Ye|-(Y{i7WqcK#;l$soYQ3hEum}IBH(ZC8t`}N|i_(jE8+;ddb9c@ztS1}J zLDM0a21kK94yj43H&F|uf?r9j2j?>L^W(3D*ZGOe^l4~>?lR$t_2(ZoeL_|>IzRO@ zBA3fpxyKiA2|Scu`f^DHYXGC zk97?Gl^s!}krR?u$!1}7$!4(K4Vagt6`*~lK~Qo~FF%MHc@Xs@56W>D6OGhx?gT1L z3DOxkU!?W={#^&}{=PU!Mf(cE9Gj>fK>OnFM0WVD_d0)d!HNxiocn0iIC{}cidIrI zW0$PhC6iyY_(g+Xtg{`VWS!+AKV^1=7cJrCFNKM1VZs!qEMdwJrs^!y4PCwa-#`8F zUTfg!pOSw(@~LPZo3f5gnFG_-z_i&rWA)A$PX1;m8ndE{B2da~nFlh*ryMv6>s2M+H#ZQ?+#u74y zklF2X7U(roC#}>;Gd^m?M@`|BC7d#ZQ?=;4RYEtTzQ{m`p07E^H_Aei~Ic0SYkZH{W;_Z;4k4! z|KuS0VlX;$ko)4;SYoD+`)i*cfWP%;`cEH4e?J;MdxZN38cUoV;{G}02f#>X`p=Cb zb2Pdz!fkhrB^Hiz)^R@ov%@?M_!YqvfE@@+&FCDoAp-Y$MOGU{JOKxvCmY_>j77Jmfx>J|aU|J<*$6!F}B#Z7;A zogML0$J5)TV$ztfiJ3LE03&7ceQxsuSI8^x1*NNPFJ{?}iqw z=O1G+N{$?)dphzMqt_ZwI5I#bam0~CBVwyH&eRFlw$Ax3|C2`VNpcd#(#N(o3MJ?> z!_-iC)A?%Xgz>0cLwgNxuAu{lH{V2Eo6c85kxl2T?PB^2)XX(>$Z&HFea~=n4Rvff zUk#-VH`h?YaB~f%3^#ihIclJ0uAvtUH{T2j*QU0E2MssZ!jboWaBam3e}6Mr_l+`C RaUWjZa`1QlORuBP{{cqNpjQ9@ diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/_dafny.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/_dafny.py deleted file mode 100644 index 2bcd742785..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/_dafny.py +++ /dev/null @@ -1,476 +0,0 @@ -"""Runtime enabling Dafny language features.""" -import builtins -from dataclasses import dataclass -from contextlib import contextmanager -from fractions import Fraction -from collections import Counter -from collections.abc import Iterable -from functools import reduce -from types import GeneratorType, FunctionType -from itertools import chain, combinations, count - -class classproperty(property): - def __get__(self, instance, owner): - return classmethod(self.fget).__get__(None, owner)() - -def print(value): - builtins.print(value, end="") - -# Dafny strings are currently sequences of UTF-16 code units. -# To make a best effort attempt at printing the right characters we attempt to decode, -# but have to allow for invalid sequences. -def string_from_utf_16(utf_16_code_units): - return b''.join(ord(c).to_bytes(2, 'little') for c in utf_16_code_units).decode("utf-16-le", errors = 'replace') - -def string_of(value) -> str: - if hasattr(value, '__dafnystr__'): - return value.__dafnystr__() - elif value is None: - return "null" - elif isinstance(value, bool): - return "true" if value else "false" - elif isinstance(value, str): - # This is only for Dafny char values. - # Dafny strings are represented as Seq's of individual char values, - # and Seq defines __dafnystr__. - return string_from_utf_16(value) - elif isinstance(value, tuple): - return '(' + ', '.join(map(string_of, value)) + ')' - elif isinstance(value, FunctionType): - return "Function" - else: - return str(value) - -@dataclass -class Break(Exception): - target: str - -@dataclass -class Continue(Exception): - target: str - -class TailCall(Exception): - pass - -@contextmanager -def label(name: str = None): - try: - yield - except Break as g: - if g.target != name: - raise g - except TailCall as g: - if name is not None: - raise g - -@contextmanager -def c_label(name: str = None): - try: - yield - except Continue as g: - if g.target != name: - raise g - -class CodePoint(str): - - escapes = { - '\n' : "\\n", - '\r' : "\\r", - '\t' : "\\t", - '\0' : "\\0", - '\'' : "\\'", - '\"' : "\\\"", - '\\' : "\\\\", - } - - def __escaped__(self): - return self.escapes.get(self, self) - - def __dafnystr__(self): - return f"'{self.__escaped__()}'" - - def __add__(self, other): - return CodePoint(plus_char(self, other)) - - def __sub__(self, other): - return CodePoint(minus_char(self, other)) - -class Seq(tuple): - def __init__(self, __iterable = None, isStr = False): - ''' - isStr defines whether this value should be tracked at runtime as a string (a.k.a. seq) - It accepts three different values: - - True: this value is definitely a string, mark it as such - - False: this value might be a string, apply heuristics to make a best guess - - None: don't apply heuristics, don't mark it as a string - - None is used when --unicode-char is true, to ensure consistent printing of strings - across backends without depending on any runtime tracking. - See docs/Compilation/StringsAndChars.md. - ''' - - if __iterable is None: - __iterable = [] - if isStr is None: - self.isStr = None - else: - self.isStr = isStr \ - or isinstance(__iterable, str) \ - or (isinstance(__iterable, Seq) and __iterable.isStr) \ - or (not isinstance(__iterable, GeneratorType) - and all(isinstance(e, str) and len(e) == 1 for e in __iterable) - and len(__iterable) > 0) - - @property - def Elements(self): - return self - - @property - def UniqueElements(self): - return frozenset(self) - - def VerbatimString(self, asliteral): - if asliteral: - return f"\"{''.join(map(lambda c: c.__escaped__(), self))}\"" - else: - return ''.join(self) - - def __dafnystr__(self) -> str: - if self.isStr: - # This should never be true when using --unicode-char, - # so it is safe to assume we are a sequence of UTF-16 code units. - return string_from_utf_16(self) - return '[' + ', '.join(map(string_of, self)) + ']' - - def __add__(self, other): - return Seq(super().__add__(other), isStr=self.isStr and other.isStr) - - def __getitem__(self, key): - if isinstance(key, slice): - indices = range(*key.indices(len(self))) - return Seq((self[i] for i in indices), isStr=self.isStr) - return super().__getitem__(key) - - def set(self, key, value): - l = list(self) - l[key] = value - return Seq(l, isStr=self.isStr) - - def __hash__(self) -> int: - return hash(tuple(self)) - - def __lt__(self, other): - return len(self) < len(other) and self == other[:len(self)] - - def __le__(self, other): - return len(self) <= len(other) and self == other[:len(self)] - -# Convenience for translation when --unicode-char is enabled -def SeqWithoutIsStrInference(__iterable = None): - return Seq(__iterable, isStr = None) - -class Array: - def __init__(self, initValue, *dims): - def create_structure(initValue, *dims): - return [initValue if len(dims) <= 1 else create_structure(initValue, *dims[1:]) for _ in range(dims[0])] - self.dims = list(dims) - self.arr = create_structure(initValue, *dims) - - def __dafnystr__(self) -> str: - return f'array{self.dims}' - - def __str__(self): - return self.__dafnystr__() - - def length(self, i): - return self.dims[i] if i < len(self.dims) else None - - def __len__(self): - return self.length(0) - - def __getitem__(self, key): - if not isinstance(key, Iterable): - return self.arr[key] - arr = self.arr - for i in key: - arr = arr[i] - return arr - - def __setitem__(self, key, value): - if not isinstance(key, Iterable): - self.arr[key] = value - return - arr = self.arr - for i in range(len(key)-1): - arr = arr[key[i]] - arr[key[-1]] = value - -class Set(frozenset): - @property - def Elements(self): - return self - - @property - def AllSubsets(self): - # https://docs.python.org/3/library/itertools.html#itertools-recipes - s = list(self) - return map(Set, chain.from_iterable(combinations(s, r) for r in range(len(s)+1))) - - def __dafnystr__(self) -> str: - return '{' + ', '.join(map(string_of, self)) + '}' - - def union(self, other): - return Set(super().union(self, other)) - - def intersection(self, other): - return Set(super().intersection(other)) - - def ispropersubset(self, other): - return self.issubset(other) and self != other - - def __or__(self, other): - return self.union(other) - - def __sub__(self, other): - return Set(super().__sub__(other)) - -class MultiSet(Counter): - def __dafnystr__(self) -> str: - return 'multiset{' + ', '.join(map(string_of, self.elements())) + '}' - - def __len__(self): - return reduce(lambda acc, key: acc + self[key], self, 0) - - def union(self, other): - return MultiSet(self + other) - - def __or__(self, other): - return self.union(other) - - def intersection(self, other): - return MultiSet(self & other) - - def __sub__(self, other): - return MultiSet(super().__sub__(other)) - - @property - def keys(self): - return Set(key for key in self if self[key] > 0) - - @property - def Elements(self): - return self.elements() - - @property - def UniqueElements(self): - return self.keys - - def isdisjoint(self, other): - return frozenset(self.keys).isdisjoint(frozenset(other.keys)) - - def issubset(self, other): - return all(self[key] <= other[key] for key in frozenset(self).union(frozenset(other))) - - def ispropersubset(self, other): - return self.issubset(other) and len(self) < len(other) - - def set(self, key, value): - set = Counter(self) - set[key] = value - return MultiSet(set) - - def __hash__(self): - return hash(frozenset(self.keys)) - - def __eq__(self, other): - return all(self[key] == other[key] for key in self.keys | other.keys) - - def __ne__(self, other): - return not (self == other) - - def __setattr__(self, key, value): - raise TypeError("'Map' object is immutable") - - def __contains__(self, item): - return self[item] > 0 - -class Map(dict): - def __dafnystr__(self) -> str: - return 'map[' + ', '.join(map(lambda i: f'{string_of(i[0])} := {string_of(i[1])}', self.items)) + ']' - - @property - def Elements(self): - return self - - @property - def keys(self): - return Set(super().keys()) - - @property - def values(self): - return Set(super().values()) - - @property - def items(self): - return Set(super().items()) - - def set(self, key, value): - map = dict(self) - map[key] = value - return Map(map) - - def __sub__(self, other): - map = dict(self) - for key in list(other): - map.pop(key, None) - return Map(map) - - def __or__(self, other): - map = dict(self) - for k, v in other.items: - map[k] = v - return Map(map) - - def __hash__(self): - return hash(frozenset(self)) - - def __setattr__(self, key, value): - raise TypeError("'Map' object is immutable") - -class BigOrdinal: - @staticmethod - def is_limit(ord): - return ord == 0 - - @staticmethod - def is_succ(ord): - return 0 < ord - - @staticmethod - def offset(ord): - return ord - - @staticmethod - def is_nat(ord): - # at run time, every ORDINAL is a natural number - return True - -class BigRational(Fraction): - def __dafnystr__(self): - if self.denominator == 1: - return f"{self.numerator}.0" - correction = self.divides_a_power_of_10(self.denominator) - if correction is None: - return f"({self.numerator}.0 / {self.denominator}.0)" - compensation, shift = correction - if self.numerator < 0: - sign, digits = "-", str(-self.numerator*compensation) - else: - sign, digits = "", str(self.numerator*compensation) - if shift < len(digits): - n = len(digits) - shift - return f"{sign}{digits[:n]}.{digits[n:]}" - return f"{sign}0.{'0' * (shift - len(digits))}{digits}" - - @staticmethod - def isolate_factor(f, x): - y = 0 - while x > 1 and x % f == 0: - y += 1 - x //= f - return x, y - - @staticmethod - def divides_a_power_of_10(x): - rem, expA = BigRational.isolate_factor(10, x) - if rem % 5 == 0 or rem % 2 == 0 or rem == 1: - major, minor = (5, 2) if rem % 5 == 0 else (2, 5) - rem, expB = BigRational.isolate_factor(major, rem) - return (minor**expB, expA+expB) if rem == 1 else None - return None - - def __add__(self, other): - return BigRational(super().__add__(other)) - - def __sub__(self, other): - return BigRational(super().__sub__(other)) - - def __mul__(self, other): - return BigRational(super().__mul__(other)) - - def __truediv__(self, other): - return BigRational(super().__truediv__(other)) - -def plus_char(a, b): - return chr(ord(a) + ord(b)) - -def minus_char(a, b): - return chr(ord(a) - ord(b)) - -def euclidian_division(a, b): - if 0 <= a: - if 0 <= b: - return a // b - else: - return -(a // (-b)) - else: - if 0 <= b: - return -((-a-1) // b) - 1 - else: - return (-a-1) // (-b) + 1 - -def euclidian_modulus(a, b): - bp = abs(b) - if 0 <= a: - return a % bp - c = (-a) % bp - return c if c == 0 else bp - c - -@dataclass -class HaltException(Exception): - message: str - -def quantifier(vals, frall, pred): - for u in vals: - if pred(u) != frall: - return not frall - return frall - -def AllBooleans(): - return [False, True] - -def AllChars(): - return (chr(i) for i in range(0x10000)) - -def AllUnicodeChars(): - return chain((CodePoint(chr(i)) for i in range(0xD800)), - (CodePoint(chr(i)) for i in range(0xE000, 0x11_0000))) - -def AllIntegers(): - return (i//2 if i % 2 == 0 else -i//2 for i in count(0)) - -def IntegerRange(lo, hi): - if lo is None: - return count(hi-1, -1) - if hi is None: - return count(lo) - return range(lo, hi) - -class Doubler: - def __init__(self, start): - self.start = start - - def __iter__(self): - i = self.start - while True: - yield i - i *= 2 - -class defaults: - bool = staticmethod(lambda: False) - char = staticmethod(lambda: 'D') - codepoint = staticmethod(lambda: CodePoint(defaults.char())) - int = staticmethod(lambda: 0) - real = staticmethod(BigRational) - pointer = staticmethod(lambda: None) - tuple = staticmethod(lambda *args: lambda: tuple(a() for a in args)) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/dafny_generated.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/dafny_generated.py deleted file mode 100644 index 9d2ba016d5..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/dafny_generated.py +++ /dev/null @@ -1,16 +0,0 @@ -# Dafny program the_program compiled into Python -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count -from extern import Extern - -import module_ -import _dafny - -try: - dafnyArgs = [_dafny.Seq(a) for a in sys.argv] - module_.default__.Test____Main____(dafnyArgs) -except _dafny.HaltException as e: - _dafny.print("[Program halted] " + e.message + "\n") - sys.exit(1) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/module_.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/module_.py deleted file mode 100644 index 454fcd43a4..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/module_.py +++ /dev/null @@ -1,87 +0,0 @@ -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count - -import module_ -import _dafny -import System_ -import Wrappers_Compile -import StandardLibrary_mUInt_Compile -import StandardLibrary_Compile -import UTF8 -import simple.types.boolean.internaldafny.types -import SimpleBooleanImpl_Compile -import simple.types.boolean.internaldafny.impl -import SimpleBooleanImplTest_Compile -import simple.types.boolean.internaldafny.wrapped -import WrappedSimpleTypesBooleanTest_Compile - -assert "module_" == __name__ -module_ = sys.modules[__name__] - -class default__: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "_module._default" - @staticmethod - def Test____Main____(noArgsParameter__): - d_85_success_: bool - d_85_success_ = True - _dafny.print(_dafny.string_of(_dafny.Seq("SimpleBooleanImplTest.GetBooleanTrue: "))) - try: - if True: - SimpleBooleanImplTest_Compile.default__.GetBooleanTrue() - if True: - _dafny.print(_dafny.string_of(_dafny.Seq("PASSED\n"))) - except _dafny.HaltException as e: - d_86_haltMessage_ = e.message - if True: - _dafny.print(_dafny.string_of(_dafny.Seq("FAILED\n "))) - _dafny.print(_dafny.string_of(d_86_haltMessage_)) - _dafny.print(_dafny.string_of(_dafny.Seq("\n"))) - d_85_success_ = False - _dafny.print(_dafny.string_of(_dafny.Seq("SimpleBooleanImplTest.GetBooleanFalse: "))) - try: - if True: - SimpleBooleanImplTest_Compile.default__.GetBooleanFalse() - if True: - _dafny.print(_dafny.string_of(_dafny.Seq("PASSED\n"))) - except _dafny.HaltException as e: - d_87_haltMessage_ = e.message - if True: - _dafny.print(_dafny.string_of(_dafny.Seq("FAILED\n "))) - _dafny.print(_dafny.string_of(d_87_haltMessage_)) - _dafny.print(_dafny.string_of(_dafny.Seq("\n"))) - d_85_success_ = False - _dafny.print(_dafny.string_of(_dafny.Seq("WrappedSimpleTypesBooleanTest.GetBooleanTrue: "))) - try: - if True: - WrappedSimpleTypesBooleanTest_Compile.default__.GetBooleanTrue() - if True: - _dafny.print(_dafny.string_of(_dafny.Seq("PASSED\n"))) - except _dafny.HaltException as e: - d_88_haltMessage_ = e.message - if True: - _dafny.print(_dafny.string_of(_dafny.Seq("FAILED\n "))) - _dafny.print(_dafny.string_of(d_88_haltMessage_)) - _dafny.print(_dafny.string_of(_dafny.Seq("\n"))) - d_85_success_ = False - _dafny.print(_dafny.string_of(_dafny.Seq("WrappedSimpleTypesBooleanTest.GetBooleanFalse: "))) - try: - if True: - WrappedSimpleTypesBooleanTest_Compile.default__.GetBooleanFalse() - if True: - _dafny.print(_dafny.string_of(_dafny.Seq("PASSED\n"))) - except _dafny.HaltException as e: - d_89_haltMessage_ = e.message - if True: - _dafny.print(_dafny.string_of(_dafny.Seq("FAILED\n "))) - _dafny.print(_dafny.string_of(d_89_haltMessage_)) - _dafny.print(_dafny.string_of(_dafny.Seq("\n"))) - d_85_success_ = False - if not(d_85_success_): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(3,0): " + _dafny.string_of(_dafny.Seq("Test failures occurred: see above.\n"))) - diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/simple/types/boolean/internaldafny/__pycache__/impl.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/simple/types/boolean/internaldafny/__pycache__/impl.cpython-311.pyc deleted file mode 100644 index 3fb6a85ad636ba979396094f745f7c3480f5f41d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4343 zcmb6cO>Y~=b#}SCq&~={C0VK^$5Cs;4&_*kTQrGkM?kHhsRUI;B-xG^LANXJ$|Ak| z=Acvyw&3;fzD^Buu z`R2`=*_k)*bNJ_UdXNCD{PB0@vm_z^!cGWsKpg)Mh)2XEreG5dThSKEq9&FTTB0mz zQd!ny0r?4ADJQigrzJa89?%9jE!czFApd?y8{+M-Hq6_!mga3n%kWm!RNiK_EN{3sDc=Xjv`JG~Be}tUV`n8NvDAWL+s1}%vBZxn4VGMQ)T}!OWrHh5*)rGb zHQUMwOy0DsRfp<1pLLAU9JYGt!{ANts^q-kv$b=zf0y}&t71SUC_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?!K8 zl>>*pTbDoADxb%C#GO`K8# zQ^t%Y;9Q8d?^@~&@ZDoB9P1IvWB!4~^#tM5mt{rw!0BFG@N`HL$ebe*2s(!d{?@sd)y?j8ZkKAm*SUSF{l3jL73goBYb?;; zdfBI4<&1ls>r%~ooqI|(?{%)eK!3MuUbu1YX3bAj^Sz47LaH`SkxsS_b}Dy+UUqed3gR92l`R8NuOVMRNv+{JYF%86S7Jf6XKr&xA^ z$FfUts+OI(k-w2wU!PDXFQ_vS^=woVMA~+T`KktU)EYi+=aY0S)y$ z?%%l6yVU=lHFR&K)TkuY-k~p#e0fA2ji~Zmad=)Ep08*^J&#Kd?i7of1h!d1s}*&1 zX)UpqP+u7NdY5|Y^w*8*IZ2Jg)X6#Z_Y=NL*3RA7`Gx03 g!>5;vdyi^+k2+I>hD}p(yHOPPG!?g7D7DG|2NtH2OaK4? diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/simple/types/boolean/internaldafny/__pycache__/wrapped.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/simple/types/boolean/internaldafny/__pycache__/wrapped.cpython-311.pyc deleted file mode 100644 index ba20cabedcbfab0c11425073314e8de68c2af2a7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2096 zcma(RO>Y}TbauTTj$>z&v`Gr3Py|vjNM2Ql4*>!}Do|14ixZGWl~!xdIN4;sm|d$l z;$Wd1kl-FJNQgsG)eAp?pRiPsSj{OC;=nCcIQ7JvS+5hfq3z7mdvD&GkM}vhHX1bq zqy5wOAVzz!xOFI9@N|C8E>iT~*ka zsGp;66%~Dkh_R1|c?YETq(*4*3Q;l5hqR#+1CU5j2i;ZLcL8xNp?*IR8?HY5#okOPOKgA83wk69?He@NO{3Vp z9kJcmcYD;1BYzk~EZ(*^Xp*i+g!+lykuHn)l>8@!-!_AgcmasxVY&?$Cah=67&u!r zq|8kzv5SD&GGO*NVD?nN>~X+a@sL*?#|u4haBp$qYpawkfg6blXoT`={X6XhSi}uR z(*X;g7!i?rwY~TLvuDp)je^*NOgm#cSOXqobAXC)vU%}%-EpMDNy@gste=a+Ah> z4;Lpd0UDvdt)(BnIka9mw5}go@BC>w_bulS%RRK*tm?|ZwwqN^Mo0q`WVZseam=|s_Q2|V( zoaq9I*5_K_rrS((2%qubOG=?n6DBH;o8usGqbOKzc7{nx1BcHS(Pv3n^889CbwlDZ zvgUP}%Z5&{c{5BW>Xk>;<5uC?=EkS*^4E&Wdg2!;i;k@b!=9U}jhpbhP9D1U3^$3t z2@IBB)VNB;9pd{c?_pQqog#U%hbL9~u=+s}l@Hl<*dqEYxeWNYq9{s^Y9l#w^j7vX z$kB2(4LQ1;O~VnI8_AiY#z@ZmRI-wxG34mgtb`oBn3a&D*^!(%va=F$bTum>N3E=c hvzHv1Z~pf6ee str: - return "simple.types.boolean.internaldafny.impl_Compile.SimpleBooleanClient" - def ctor__(self, config): - (self)._config = config - - def GetBoolean(self, input): - output: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(simple.types.boolean.internaldafny.types.GetBooleanOutput.default())() - out0_: Wrappers_Compile.Result - out0_ = SimpleBooleanImpl_Compile.default__.GetBoolean((self).config, input) - output = out0_ - return output - - @property - def config(self): - return self._config - -class default__: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "simple.types.boolean.internaldafny.impl_Compile._default" - @staticmethod - def DefaultSimpleBooleanConfig(): - return simple.types.boolean.internaldafny.types.SimpleBooleanConfig_SimpleBooleanConfig() - - @staticmethod - def SimpleBoolean(config): - res: Wrappers_Compile.Result = None - d_72_client_: simple.types.boolean.internaldafny.impl.SimpleBooleanClient - nw1_ = simple.types.boolean.internaldafny.impl.SimpleBooleanClient() - nw1_.ctor__(SimpleBooleanImpl_Compile.Config_Config()) - d_72_client_ = nw1_ - res = Wrappers_Compile.Result_Success(d_72_client_) - return res - return res - diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/simple/types/boolean/internaldafny/types.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/simple/types/boolean/internaldafny/types.py deleted file mode 100644 index ef76159cf4..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/simple/types/boolean/internaldafny/types.py +++ /dev/null @@ -1,147 +0,0 @@ -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count - -import module_ -import _dafny -import System_ -import Wrappers_Compile -import StandardLibrary_mUInt_Compile -import StandardLibrary_Compile -import UTF8 - -assert "simple.types.boolean.internaldafny.types" == __name__ - -class DafnyCallEvent: - @classmethod - def default(cls, default_I, default_O): - return lambda: DafnyCallEvent_DafnyCallEvent(default_I(), default_O()) - def __ne__(self, __o: object) -> bool: - return not self.__eq__(__o) - @property - def is_DafnyCallEvent(self) -> bool: - return isinstance(self, simple.types.boolean.internaldafny.types.DafnyCallEvent_DafnyCallEvent) - -class DafnyCallEvent_DafnyCallEvent(DafnyCallEvent, NamedTuple('DafnyCallEvent', [('input', Any), ('output', Any)])): - def __dafnystr__(self) -> str: - return f'simple.types.boolean.internaldafny.types_Compile.DafnyCallEvent.DafnyCallEvent({_dafny.string_of(self.input)}, {_dafny.string_of(self.output)})' - def __eq__(self, __o: object) -> bool: - return isinstance(__o, simple.types.boolean.internaldafny.types.DafnyCallEvent_DafnyCallEvent) and self.input == __o.input and self.output == __o.output - def __hash__(self) -> int: - return super().__hash__() - - -class GetBooleanInput: - @classmethod - def default(cls, ): - return lambda: GetBooleanInput_GetBooleanInput(Wrappers_Compile.Option_None.default()()) - def __ne__(self, __o: object) -> bool: - return not self.__eq__(__o) - @property - def is_GetBooleanInput(self) -> bool: - return isinstance(self, simple.types.boolean.internaldafny.types.GetBooleanInput_GetBooleanInput) - -class GetBooleanInput_GetBooleanInput(GetBooleanInput, NamedTuple('GetBooleanInput', [('value', Any)])): - def __dafnystr__(self) -> str: - return f'simple.types.boolean.internaldafny.types_Compile.GetBooleanInput.GetBooleanInput({_dafny.string_of(self.value)})' - def __eq__(self, __o: object) -> bool: - return isinstance(__o, simple.types.boolean.internaldafny.types.GetBooleanInput_GetBooleanInput) and self.value == __o.value - def __hash__(self) -> int: - return super().__hash__() - - -class GetBooleanOutput: - @classmethod - def default(cls, ): - return lambda: GetBooleanOutput_GetBooleanOutput(Wrappers_Compile.Option_None.default()()) - def __ne__(self, __o: object) -> bool: - return not self.__eq__(__o) - @property - def is_GetBooleanOutput(self) -> bool: - return isinstance(self, simple.types.boolean.internaldafny.types.GetBooleanOutput_GetBooleanOutput) - -class GetBooleanOutput_GetBooleanOutput(GetBooleanOutput, NamedTuple('GetBooleanOutput', [('value', Any)])): - def __dafnystr__(self) -> str: - return f'simple.types.boolean.internaldafny.types_Compile.GetBooleanOutput.GetBooleanOutput({_dafny.string_of(self.value)})' - def __eq__(self, __o: object) -> bool: - return isinstance(__o, simple.types.boolean.internaldafny.types.GetBooleanOutput_GetBooleanOutput) and self.value == __o.value - def __hash__(self) -> int: - return super().__hash__() - - -class ISimpleBooleanClientCallHistory: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "simple.types.boolean.internaldafny.types_Compile.ISimpleBooleanClientCallHistory" - -class ISimpleBooleanClient: - pass - def GetBoolean(self, input): - pass - - -class SimpleBooleanConfig: - @_dafny.classproperty - def AllSingletonConstructors(cls): - return [SimpleBooleanConfig_SimpleBooleanConfig()] - @classmethod - def default(cls, ): - return lambda: SimpleBooleanConfig_SimpleBooleanConfig() - def __ne__(self, __o: object) -> bool: - return not self.__eq__(__o) - @property - def is_SimpleBooleanConfig(self) -> bool: - return isinstance(self, simple.types.boolean.internaldafny.types.SimpleBooleanConfig_SimpleBooleanConfig) - -class SimpleBooleanConfig_SimpleBooleanConfig(SimpleBooleanConfig, NamedTuple('SimpleBooleanConfig', [])): - def __dafnystr__(self) -> str: - return f'simple.types.boolean.internaldafny.types_Compile.SimpleBooleanConfig.SimpleBooleanConfig' - def __eq__(self, __o: object) -> bool: - return isinstance(__o, simple.types.boolean.internaldafny.types.SimpleBooleanConfig_SimpleBooleanConfig) - def __hash__(self) -> int: - return super().__hash__() - - -class Error: - @classmethod - def default(cls, ): - return lambda: Error_CollectionOfErrors(_dafny.Seq({}), _dafny.Seq({})) - def __ne__(self, __o: object) -> bool: - return not self.__eq__(__o) - @property - def is_CollectionOfErrors(self) -> bool: - return isinstance(self, simple.types.boolean.internaldafny.types.Error_CollectionOfErrors) - @property - def is_Opaque(self) -> bool: - return isinstance(self, simple.types.boolean.internaldafny.types.Error_Opaque) - -class Error_CollectionOfErrors(Error, NamedTuple('CollectionOfErrors', [('list', Any), ('message', Any)])): - def __dafnystr__(self) -> str: - return f'simple.types.boolean.internaldafny.types_Compile.Error.CollectionOfErrors({_dafny.string_of(self.list)}, {_dafny.string_of(self.message)})' - def __eq__(self, __o: object) -> bool: - return isinstance(__o, simple.types.boolean.internaldafny.types.Error_CollectionOfErrors) and self.list == __o.list and self.message == __o.message - def __hash__(self) -> int: - return super().__hash__() - -class Error_Opaque(Error, NamedTuple('Opaque', [('obj', Any)])): - def __dafnystr__(self) -> str: - return f'simple.types.boolean.internaldafny.types_Compile.Error.Opaque({_dafny.string_of(self.obj)})' - def __eq__(self, __o: object) -> bool: - return isinstance(__o, simple.types.boolean.internaldafny.types.Error_Opaque) and self.obj == __o.obj - def __hash__(self) -> int: - return super().__hash__() - - -class OpaqueError: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "" - @staticmethod - def default(): - return simple.types.boolean.internaldafny.types.Error_CollectionOfErrors.default()() - diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/simple/types/boolean/internaldafny/wrapped.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/simple/types/boolean/internaldafny/wrapped.py deleted file mode 100644 index 195cb04b03..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/dafny_generated/simple/types/boolean/internaldafny/wrapped.py +++ /dev/null @@ -1,29 +0,0 @@ -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count - -import module_ -import _dafny -import System_ -import Wrappers_Compile -import StandardLibrary_mUInt_Compile -import StandardLibrary_Compile -import UTF8 -import simple.types.boolean.internaldafny.types -import SimpleBooleanImpl_Compile -import simple.types.boolean.internaldafny.impl -import SimpleBooleanImplTest_Compile - -assert "simple.types.boolean.internaldafny.wrapped" == __name__ - -class default__: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "simple.types.boolean.internaldafny.wrapped_Compile._default" - @staticmethod - def WrappedDefaultSimpleBooleanConfig(): - return simple.types.boolean.internaldafny.types.SimpleBooleanConfig_SimpleBooleanConfig() - diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/extern/Extern.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/extern/Extern.py deleted file mode 100644 index 90540eacbe..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/extern/Extern.py +++ /dev/null @@ -1,22 +0,0 @@ -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count - -import module_ -import _dafny -import System_ -import SimpleBooleanImplTest_Compile -import simple.types.boolean.internaldafny.types -from smithy_generated.simple_boolean.client import SimpleBoolean -from .Shim import SimpleBooleanShim -import Wrappers_Compile - -@staticmethod -def WrappedSimpleBoolean(config): - wrapped_config = config - impl = SimpleBoolean(wrapped_config) - wrapped_client = SimpleBooleanShim(impl) - return Wrappers_Compile.Result_Success(wrapped_client) - -simple.types.boolean.internaldafny.wrapped.default__.WrappedSimpleBoolean = WrappedSimpleBoolean \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/extern/Shim.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/extern/Shim.py deleted file mode 100644 index cba97104c9..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/extern/Shim.py +++ /dev/null @@ -1,28 +0,0 @@ -# TODO generate this - -import simple.types.boolean.internaldafny.types -import smithy_generated.simple_boolean.client as SimpleBoolean -import Wrappers_Compile -import asyncio -from smithy_generated.simple_boolean.models import GetBooleanInput - -class SimpleBooleanShim(simple.types.boolean.internaldafny.types.ISimpleBooleanClient): - def __init__(self, _impl: SimpleBoolean) : - self._impl = _impl - - def GetBoolean(self, input: simple.types.boolean.internaldafny.types.GetBooleanInput_GetBooleanInput) -> simple.types.boolean.internaldafny.types.GetBooleanOutput_GetBooleanOutput: - ''' - unwrapped_request = TypeConversion.ToNative(input) - try: - wrapped_response = self._impl.get_boolean(unwrapped_request) - return Wrappers_Compile.Result_Success(wrapped_response) - catch ex: - return Wrappers_Compile.Result_Failure(ex) - ''' - - unwrapped_request: GetBooleanInput = GetBooleanInput(value=input.value) - wrapped_response = asyncio.run(self._impl.get_boolean(unwrapped_request)) - return Wrappers_Compile.Result_Success(wrapped_response) - - - \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/extern/__pycache__/Extern.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/extern/__pycache__/Extern.cpython-311.pyc deleted file mode 100644 index 6fb27d85817f75fccaf258122694de33d4ec8dd1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1400 zcmah{&2QX96d$j>pI&d8W;ZRQAOuyFt*W(z;1W;;v>bY94r~C)7t6ILS*J6$H8ZPX zDV6q+8-GAKaNtxxz44bgXb;wiN|8AA7Raq9-psC-E*EB=-{-tH^L~CmJ5C3|`u)f6 zqu*)>{i%#)#__evaeRHHy|vQbUTHg(=5JS8WQ@_U{YshpLrb>q1%w2T2$tsONiLfQd4|6U znC$Ea6h{ZsjNqXm>xU#wnNq@Zng~#waZDlhMVb;EB(Dr82j0y!?|2f^P(`X`f}+05 zV_?tF33_UXH{vJ8bFf~lJWp#vonEe!+JB;^s8=zBj#np7%=L57t^u90HXLR)FnQ%$ z7GxP_+`pI7EQa2DUtvBa!XHn=5OWT=G{Q7FjE`jRi9Q?oOWRUyzu_e@P6W50?0c|Y zPu;IM6n4opq+ygM?tRQ3i!^her0j74Cfr@%rogZCC9*C9 zykiRPEEf|f$XV#(?*wLv`=u76ESLR7N6{MmtPii+fRBF&Y=+JUJG1?l_Vpj$J+pV` z_U`Qd%fYRm#M$7^d~ioacINi&U+$jSdvklQu=Xw?3k`2bljmGEM4rXT5mPWT)h<)u zvj#9}(LhXCQ>pD3UM65DIBO}pNz-UburC{a6dbAn8|PeL>dSZ5-ueJgRdB5S$S&9O zHG*p~A3a)(*(gp_;{nmN7BSgaoRqgXjm0GQk8pxnAaFEV1pF#F)c;D)fwa_Y>S`E(b%lBYYUB;qiY(YyidB7O>Z?PZzD6`dQ-Ma?okxj?}FGEuE}dSl_}qK8Ic%o?ZNIqJ{R`*U=Ajy{^B2Zbh$ F$v+GChq3?w diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/extern/__pycache__/Shim.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/extern/__pycache__/Shim.cpython-311.pyc deleted file mode 100644 index 3cc3a3e3cc8ebefbd027f61f94f0c9597d3ba885..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2224 zcma(SO>Y}TbY^X@oy3V#5!BEWVtOF9M0PpAr6nOv5T!^YDNaH1Wwq>1>UH<4GqY(N zxl)iSQ32wH(nAkHs)|tiBRKE_9JCVANIh}lW|VU2iJ4h@9VZkzJAPmD=FNL=-W&fk zK0XTg@P7E#{wfQ=AA;$RT#q>Vh7)_h1~zm-9ZIZt8B2k{%hq!+SyAh%T*=q-94l_Y z8>x>#pnxmD&fEod7Qv=GOIU4=^=yM?F{K8p<9*qq3;>V$FB$a-8`eNI_orZ2tB{qh zAi5j`E;9YAei%`!rzjB*M~s+qPvmhS$5#-A0l#-2BCgCz&AtJw2&SK zZp#aB*w8l+p`Qjea*3Wex6ukwpYA!T58EgfxBgneBEp@l70Fbv0c zsA24!I~AnXUlVyD;+}WG;j8EFWxpG}$G;;k04(Q-%Va7>G{XK+LPSle~jbPQJ&K9c3bX3!=6t^y> zj4(H_M8d!)h?^3XpvijDZXjxWnKVh|)Tslj!cda%@)y!GOpKMl3mq3}pCJ;t)Tl+4 zg$SvfJa1scGO5)lqwQh;{>SV`rsGB!RnYdp5O40>mgz>QTEODAaESw!H%ZI4oPcF` z8OlOuW5>c{lP5iA6T_}ovskn?7LN`)b1EBb@?>a4l!r`>Xn!_3cyM;kpDymfs;CO` z2?x92?W` z#WUABh3TiI*|?;2^bZb7OL1wbQ&_^{&0MV(MSuCGhYW*_8ip6xkt^t;Vcd#Lx3@Ar zM@N(fY0*t zeg@KGEE0!BZ%H6H@-+v$>DN_YZsxw%1st6OYB6^i?yC=rarxc2yd0N5j?0ZM5YmoE zVz2cK03R+Z60Ilb^8{@xiQa$1#7E&?wZtk(hBTQVt(PBdC_TvF>w}|J^M$5Q? ze1uJkY%ST}Z#T_y9pqCsF)U_kBF8h_2!2I?$(J(6@0vf(Nk6 t?8@&DEO&-yH#-S0!!G!Dcwc=`jHlm@r!U6SOY!vezog!?7ih~6{sC%DLfZfU diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/Iamaredme b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/Iamaredme deleted file mode 100644 index 63b8568325..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/Iamaredme +++ /dev/null @@ -1,3 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -yo diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/README.md b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/README.md deleted file mode 100644 index 4d95aa6598..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/README.md +++ /dev/null @@ -1,3 +0,0 @@ -## Simple_boolean Client - -simple_boolean client diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/plugin b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/plugin deleted file mode 100644 index 63b8568325..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/plugin +++ /dev/null @@ -1,3 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -yo diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/pyproject.toml b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/pyproject.toml deleted file mode 100644 index cb3492f592..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/pyproject.toml +++ /dev/null @@ -1,46 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -[build-system] -requires = ["setuptools", "setuptools-scm", "wheel"] -build-backend = "setuptools.build_meta" - -[project] -name = "simple_boolean" -version = "0.0.1" -description = "simple_boolean client" -readme = "README.md" -requires-python = ">=3.11" -keywords = ["smithy", "simple_boolean"] -license = {text = "Apache-2.0"} -classifiers = [ - "Development Status :: 2 - Pre-Alpha", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Natural Language :: English", - "License :: OSI Approved :: Apache Software License", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.11" -] - -dependencies = [ - "smithy_python==0.0.1" -] -[tool.setuptools.packages.find] -exclude=["tests*"] - -[tool.mypy] -strict = true -warn_unused_configs = true - -[[tool.mypy.overrides]] -module = ["awscrt", "pytest"] -ignore_missing_imports = true - -[tool.black] -target-version = ["py311"] - -[tool.pytest.ini_options] -python_classes = ["!Test"] -asyncio_mode = "auto" diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__init__.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__init__.py deleted file mode 100644 index 247be3e3d4..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__pycache__/__init__.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index a1e226a22480ed7d8e79029b7b4bcc4e0e0261e5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 253 zcmXv}u}%Xq3{9v&2&v*bSnvi*#ei60X_=$rVsTNEII?p>`34p?CT7HU@dK5*b;5^w zZ+L!w*0b#I+n+_|VRbEXzx| z-mFmwsL^VHY~!K`prY&4L6SB<`ojfwi#TYp-tC_uF@}f%3>YW^bpO#vf*Sj)=iVXb zK}ks#yDf^2N0)c*^W1aKIrlqf#((eix)5CZ-v9G-a1x>azz_AyQpRoHxo(`sMtYh;wX*=tjv!xx-&IPU98(KM8 z59?+vS52&!^=UKAnY4V`1#SGbHndi5XoG3Bv-F%N?Y?V?H~lZo<$<{Z--$jia4-lf zrCA^ApR;JI&~j-X8v+iQSYO(tZ$b9Kj_Z`(b?$3D=Uiz&P!djm=UKKI33&KT^Vrff z%oF+j=27Tn{Tt~fJ7xo;VTm`VP1s1t-WjaZY)zY!dqL@6&t}-Xz|0jm#!%^UF>oE2 zPjbl|qZot(%o(D!$!x7)flFd7CY^@o-br-Qy-t5Jqs;~TJj9gl3Wn3F)5Bs1970le9S=4JW+H005b_=@&Z$s zgQ*m|#=`_jfyoupnYkrASp%)02zbz_V#aC=jC4>|Amo zEATtX`q-OE%(@t9JuTZ5mdN%RDJiq6zX;(o3O|2&ACmV_k(&1ks)a}B11S9n{*6Tx~`7e*zR61jb_k? z)bx;r3&41?y=L(_eC*0Lu)450Lsr?sv)MVW0}8o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cQgO6c#W(%Vs<)c1gyU4p)Vt5vD#WtK^WAr=6LB%{yaChJl z4mHI8C8XfpP!#MY6%|pd{;n7wp{j!Rir;oWN4=u)uA0mg$ilZL4n!Rg(YXGuptIs; zcLkjiH@lys9&xj~f<{H-T|ta!yti6i1r3YF8@T19SM00ylA}d(wA`^);IVnNrR0oC Z&gdOm)snJOAmf{-FG%@UThx*b`)`AZz(D{2 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__pycache__/config.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__pycache__/config.cpython-311.pyc deleted file mode 100644 index bea34930e54a48b55f810973988ab02cfb85142c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1818 zcmah}&2QX96d!xN-d$%u^0Cka(#oJ#%F+-^1&R_yNF|Y~2pTFjk&uP3T+i&T6@PWc zCYaM6I3OXR+?oqgPNAs$AsoF@4lAE3IQ6zwIQ7IEdpF7QA!eW7{^q?mGw*BW=UPoc zFz){J1O8A#=np=b40#OBe+Tdc?IVn^;2>Af1%YGH5#54ba3x)Gi+a(Obvct4oRVAC z%NdrOimT{KhKtUOTh*(8Wn6MpA``iaQWBD zsesTk`0^p5`v@!FAv|*`f*ihloWkF;$pq8@1{$ z_==X0R zGHEPR$jpVTn9CqFaw>26UdQg5OW<}6BZvdyS35pcr{Y%>6~;zjQqxuK%M`E;b+1QM z$7Z4GccwI}>S52eda6l@+VlMbriMK;%%&D(p5Sat98ufrf{Li*8)8M-@vxJrQt~(= zEL@v9n(}lTY@F}>@JyyoWSQ?aV-eprSB3ro@tA6QShai?vJa~4@LY|FW5#Uy9A5j4 z%w{*OUX3@cPrHyx+_Y6q%ZA~ZE-{Q$F$~wok;8G-Fdj#yGuD(01N)X?&^ah>D)FqP z3r3sJuWgH5X{@wi7^dg>VO9+W3+7<~<=2`na8?HP3pxjmUj3-;GeVi>M3!q|-_y1U zI|%(iJM`&6;FuQC0^f;Up9Vc`4>J0|hlrV$*O#~c1dm%*qmdWdE{KCT?7@bNS{ifh zuooL$;t}5KSYz4sFdpUiL$k70S_@)2%N^vb4j;q7`d5ACDBgCyer|mC9ipK=~;=jEELF<4+=mON7#uJf<};A#80N*;-b8 z&vdZa@#0*UL8=Sq#Sr+bfK(ET1dAEH;Z^4wmK&%dYR1gGVBqQPN1ike)8lpSN|Iu@_lT6bP zZ6?z+L>tL8Jx3oT|3=`*wdLbao;H&8o!{O|9=4N}_Sy2@+3WiWS{MpSf9dG`L|7aM zi)X^(NURC(j?h2ZOD_A9vzG-VE?tJ`$~dVfd&}|kmc(y Dc{>pu diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__pycache__/deserialize.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__pycache__/deserialize.cpython-311.pyc deleted file mode 100644 index 8119d1f0996c27c5bf665878ee4160310ec0b129..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 823 zcmZ`$y^9k;6rb5-C)qnAf+&6!5iE>F26JE`a)KUMh-Y!JNfXwcm& zW+7}2rt1ja5kUl%B%%X{65)uNtVQ)fy~1_rMr^l&9z>A2vxyAc$G*&<<0v~5wTcRH!{R0? zZTq&{`)~OJ4N7yF1yLZ9m~VjIF-gjwBx)y>egHg8WF93d9rHeDb1xAfHQx%OR6;*b zVS(op;wpuGeW}FYVAqM3e5L{QshYx2{%Gd$$L zQ)ZE3kvTI2v^f)qe8^hBFE4>LhOM zo9O4LCN)awggMlikfT(S(DMa3cX<6Imx}+Ft+7^IxoOL+eLr29qAx0Yq^kJ+1#Vm3 A5dZ)H diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__pycache__/errors.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__pycache__/errors.cpython-311.pyc deleted file mode 100644 index dfb11b43caa76dfa741817f56bd9ad372f04aaa3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1822 zcmb7E&1>976rYi_EA4u>PTG>V(8ltmjUe46p%eyilIeNDD>3ZhRvbm)HkD**KyK7M|wZa$D8-wy!X@m z*lgAjw6}lwhAwFc{UrxwGbf$#&(PUN6j2KJLLgQ&KPsLqTd9ijUm zMRO|}VmdXBFwBBXW~*vP1$I*vB6CCtlR2jBflQ4EGU3E~d!UD0X$KfjvEM ztT6s%;IrGD$9%hW%M;9IvTv`0cwtzKgdIe7+GVyV)LV5M+OlKh79o+>V}#^&LV7Xn zhqB)w)X@RH47j9&f+}=`tU-4Aj5J)aMhM_f!^#$Uv((M;>Jzyx`7wSAG`>2M z?KNPR3oK$4s@;S&U{rNo8=`egjopT84$&R#T2PHjZoQubMI~-LqY_>cJg*wL;X|5o z6Vf2O4dw&sPn!%*%J@@&@9;iKOKQOQ2;@FU(GJh7lyeB};3w&hVP*%BQy&z;0q`;~ zsv`Oc#1qG-eRqJiBn^z13=)Gwc#69ZgcDa(%e%rwh2E-yST1K~1P z#c5QTUz0-#FN28d0Mi6!=u8UduV#zGH};&9`m4vrRd^pLgic{i8M*@dmz`Q(O$P}C z&t-lJ-xcWPwcB@mmdHvMzqw?9DxiwsTxgH2o5dCOE?)pWS$FXZz(~g!kE#g2d5o_8 z*E_1}xHdvh!`?d&u_)~fBodr4e8R6F3&5e)cp&oWTNu` diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__pycache__/models.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/__pycache__/models.cpython-311.pyc deleted file mode 100644 index 15f30e423182e684d7539b5c11be9555a9bb0995..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5274 zcmeHK|7#q_6`$GN`=Yy(PLgfKk`-$e$Bs_4cR9OBsZk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B;7 zwXMtA_NcZ!tZXZFZL=)i2ETX*;avpW7qNwK8{xWOFhOcR>tM)F0ImyWqS115LZ)EQ z@(#Yf3fXeFQroO%zW|gjbbz#(pUv#FX8)Kj9DCV9;qW&R28O*i8^()&s1y}k3QuWP z+=}q5h?kWwvvcy5*nv1KC;1P+q(mv57=(T_BwO=+OuiV-_A&Wf2Z1B_-sy z4Hm{KGTTP-h6p04BoXa9ln6)EWG!<0ZpmF)k651}uLBbdT+sk$$b|R8?Ki}!JI*t`kmdXh-+<6Ci>nZZhYgeq(vyOG4h@BmqRC8MZ^c4NVUGNWJ$Os3+%u^lR_ zp?{9g>@vb_LQ%f4g)4hP9xkJ=^aJuQ%NWHvyV$n=$d?&(oZ{?`KaBGg5vqx$I*w|f zQyzl0?YFj$U-Nq!l;$!EqCg}u-vK=~Ny-lsHBO};08bN{M~O;Dd>^#An+TAa?}bq+ zVLwk{!K*28mBl8E@O7G-5f;=c;5rJ;C?6a^49YhkxGuL39?U1pQ9|g;@G*4Lyx15l zL)>8&N$LzLw#U%t5dPrxjQnbDzJvGUNwfF8+56G#P2AoL7s+nND=y7@bdA;6tvYqX z*no GetBooleanOutput: - """Invokes the GetBoolean operation. - - :param input: The operation's input. - - :param plugins: A list of callables that modify the configuration dynamically. - Changes made by these plugins only apply for the duration of the operation - execution and will not affect any other operation invocations. - """ - operation_plugins = [ - - ] - if plugins: - operation_plugins.extend(plugins) - - return await self._execute_operation( - input=input, - plugins=operation_plugins, - serialize=_serialize_get_boolean, - deserialize=_deserialize_get_boolean, - config=self._config, - ) - - async def _execute_operation( - self, - input: Input, - plugins: list[Plugin], - serialize: Callable[[Input, Config], Awaitable[GetBooleanOutput_GetBooleanOutput]], - deserialize: Callable[[GetBooleanInput_GetBooleanInput, Config], Awaitable[Output]], - config: Config, - ) -> Output: - try: - return await self._handle_execution( - input, plugins, serialize, deserialize, config - ) - except Exception as e: - # Make sure every exception that we throw is an instance of ServiceError so - # customers can reliably catch everything we throw. - if not isinstance(e, ServiceError): - raise ServiceError(e) from e - raise e - - async def _handle_execution( - self, - input: Input, - plugins: list[Plugin], - serialize: Callable[[Input, Config], Awaitable[GetBooleanOutput_GetBooleanOutput]], - deserialize: Callable[[GetBooleanInput_GetBooleanInput, Config], Awaitable[Output]], - config: Config, - ) -> Output: - context: InterceptorContext[Input, None, None, None] = InterceptorContext( - request=input, - response=None, - transport_request=None, - transport_response=None, - ) - _client_interceptors = config.interceptors or [] - client_interceptors = cast( - list[Interceptor[Input, Output, GetBooleanOutput_GetBooleanOutput, GetBooleanInput_GetBooleanInput]], _client_interceptors - ) - interceptors = client_interceptors - - try: - # Step 1a: Invoke read_before_execution on client-level interceptors - for interceptor in client_interceptors: - interceptor.read_before_execution(context) - - # Step 1b: Run operation-level plugins - config = deepcopy(config) - for plugin in plugins: - plugin(config) - - _client_interceptors = config.interceptors or [] - interceptors = cast( - list[Interceptor[Input, Output, GetBooleanOutput_GetBooleanOutput, GetBooleanInput_GetBooleanInput]], - _client_interceptors, - ) - - # Step 1c: Invoke the read_before_execution hooks on newly added - # interceptors. - for interceptor in interceptors: - if interceptor not in client_interceptors: - interceptor.read_before_execution(context) - - # Step 2: Invoke the modify_before_serialization hooks - for interceptor in interceptors: - context._request = interceptor.modify_before_serialization(context) - - # Step 3: Invoke the read_before_serialization hooks - for interceptor in interceptors: - interceptor.read_before_serialization(context) - - # Step 4: Serialize the request - context_with_transport_request = cast( - InterceptorContext[Input, None, GetBooleanOutput_GetBooleanOutput, None], context - ) - context_with_transport_request._transport_request = await serialize( - context_with_transport_request.request, config - ) - - # Step 5: Invoke read_after_serialization - for interceptor in interceptors: - interceptor.read_after_serialization(context_with_transport_request) - - # Step 6: Invoke modify_before_retry_loop - for interceptor in interceptors: - context_with_transport_request._transport_request = ( - interceptor.modify_before_retry_loop(context_with_transport_request) - ) - - # Step 7: Acquire the retry token. - retry_strategy = config.retry_strategy - if retry_strategy is None: - raise ServiceError( - "No retry_strategy found on the operation config." - ) - retry_token = retry_strategy.acquire_initial_retry_token() - - while True: - # Make an attempt, creating a copy of the context so we don't pass - # around old data. - context_with_response = await self._handle_attempt( - deserialize, - interceptors, - context_with_transport_request.copy(), - config, - ) - - # We perform this type-ignored re-assignment because `context` needs - # to point at the latest context so it can be generically handled - # later on. This is only an issue here because we've created a copy, - # so we're no longer simply pointing at the same object in memory - # with different names and type hints. It is possible to address this - # without having to fall back to the type ignore, but it would impose - # unnecessary runtime costs. - context = context_with_response # type: ignore - - if isinstance(context_with_response.response, Exception): - # Step 7u: Reacquire retry token if the attempt failed - try: - retry_token = retry_strategy.refresh_retry_token_for_retry( - token_to_renew=retry_token, - error_info=RetryErrorInfo( - # TODO: Determine the error type. - error_type=RetryErrorType.CLIENT_ERROR, - ) - ) - except SmithyRetryException: - raise context_with_response.response - await sleep(retry_token.retry_delay) - else: - # Step 8: Invoke record_success - retry_strategy.record_success(token=retry_token) - break - except Exception as e: - if context.response is not None: - # config.logger.exception(f"Exception occurred while handling: {context.response}") - pass - context._response = e - - # At this point, the context's request will have been definitively set, and - # The response will be set either with the modeled output or an exception. The - # transport_request and transport_response may be set or None. - execution_context = cast( - InterceptorContext[Input, Output, GetBooleanOutput_GetBooleanOutput | None, GetBooleanInput_GetBooleanInput | None], context - ) - return await self._finalize_execution(interceptors, execution_context) - - async def _handle_attempt( - self, - deserialize: Callable[[GetBooleanInput_GetBooleanInput, Config], Awaitable[Output]], - interceptors: list[Interceptor[Input, Output, GetBooleanOutput_GetBooleanOutput, GetBooleanInput_GetBooleanInput]], - context: InterceptorContext[Input, None, GetBooleanOutput_GetBooleanOutput, None], - config: Config, - ) -> InterceptorContext[Input, Output, GetBooleanOutput_GetBooleanOutput, GetBooleanInput_GetBooleanInput | None]: - try: - # assert config.interceptors is not None - # Step 7a: Invoke read_before_attempt - for interceptor in interceptors: - interceptor.read_before_attempt(context) - - # Steps 7b-e haven't had their python designs finalized yet - # Step 7b: Invoke service_auth_scheme_resolver.resolve_auth_scheme - # Step 7c: Invoke auth_scheme.identity_resolver - # Step 7d: Invoke auth_scheme.signer - # Step 7e: Invoke identity_resolver.resolve_identity - - # Step 7g: Invoke modify_before_signing - for interceptor in interceptors: - context._transport_request = interceptor.modify_before_signing(context) - - # Step 7h: Invoke read_before_signing - for interceptor in interceptors: - interceptor.read_before_signing(context) - - # Step 7i: Invoke signer.sign_request - # This step hasn't had its python design finalized yet - - # Step 7j: Invoke read_after_signing - for interceptor in interceptors: - interceptor.read_after_signing(context) - - # Step 7k: Invoke modify_before_transmit - for interceptor in interceptors: - context._transport_request = interceptor.modify_before_transmit(context) - - # Step 7l: Invoke read_before_transmit - for interceptor in interceptors: - interceptor.read_before_transmit(context) - - ## HERE - # Step 7m: Invoke http_client.send - if config.impl is None: - raise Exception("No impl found on the operation config.") - - context_with_response = cast( - InterceptorContext[Input, None, GetBooleanInput_GetBooleanInput, GetBooleanOutput_GetBooleanOutput], context - ) - - print(f"transport_request is {context_with_response.transport_request}") - - context_with_response._transport_response = config.impl.GetBoolean( - input=context_with_response.transport_request - ) - - # Step 7n: Invoke read_after_transmit - for interceptor in interceptors: - interceptor.read_after_transmit(context_with_response) - - # Step 7o: Invoke modify_before_deserialization - for interceptor in interceptors: - context_with_response._transport_response = ( - interceptor.modify_before_deserialization(context_with_response) - ) - - # Step 7p: Invoke read_before_deserialization - for interceptor in interceptors: - interceptor.read_before_deserialization(context_with_response) - - # Step 7q: deserialize - context_with_output = cast( - InterceptorContext[Input, Output, GetBooleanOutput_GetBooleanOutput, GetBooleanInput_GetBooleanInput], - context_with_response, - ) - context_with_output._response = await deserialize( - context_with_output._transport_response, config - ) - - # Step 7r: Invoke read_after_deserialization - for interceptor in interceptors: - interceptor.read_after_deserialization(context_with_output) - except Exception as e: - if context.response is not None: - # config.logger.exception(f"Exception occurred while handling: {context.response}") - pass - context._response = e - - # At this point, the context's request and transport_request have definitively been set, - # the response is either set or an exception, and the transport_resposne is either set or - # None. This will also be true after _finalize_attempt because there is no opportunity - # there to set the transport_response. - attempt_context = cast( - InterceptorContext[Input, Output, GetBooleanOutput_GetBooleanOutput, GetBooleanInput_GetBooleanInput | None], context - ) - return await self._finalize_attempt(interceptors, attempt_context) - - async def _finalize_attempt( - self, - interceptors: list[Interceptor[Input, Output, GetBooleanOutput_GetBooleanOutput, GetBooleanInput_GetBooleanInput]], - context: InterceptorContext[Input, Output, GetBooleanOutput_GetBooleanOutput, GetBooleanInput_GetBooleanInput | None], - ) -> InterceptorContext[Input, Output, GetBooleanOutput_GetBooleanOutput, GetBooleanInput_GetBooleanInput | None]: - # Step 7s: Invoke modify_before_attempt_completion - try: - for interceptor in interceptors: - context._response = interceptor.modify_before_attempt_completion( - context - ) - except Exception as e: - if context.response is not None: - # config.logger.exception(f"Exception occurred while handling: {context.response}") - pass - context._response = e - - # Step 7t: Invoke read_after_attempt - for interceptor in interceptors: - try: - interceptor.read_after_attempt(context) - except Exception as e: - if context.response is not None: - # config.logger.exception(f"Exception occurred while handling: {context.response}") - pass - context._response = e - - return context - - async def _finalize_execution( - self, - interceptors: list[Interceptor[Input, Output, GetBooleanOutput_GetBooleanOutput, GetBooleanInput_GetBooleanInput]], - context: InterceptorContext[Input, Output, GetBooleanOutput_GetBooleanOutput | None, GetBooleanInput_GetBooleanInput | None], - ) -> Output: - try: - # Step 9: Invoke modify_before_completion - for interceptor in interceptors: - context._response = interceptor.modify_before_completion(context) - - # Step 10: Invoke trace_probe.dispatch_events - try: - pass - except Exception as e: - # log and ignore exceptions - # config.logger.exception(f"Exception occurred while dispatching trace events: {e}") - pass - except Exception as e: - if context.response is not None: - # config.logger.exception(f"Exception occurred while handling: {context.response}") - pass - context._response = e - - # Step 11: Invoke read_after_execution - for interceptor in interceptors: - try: - interceptor.read_after_execution(context) - except Exception as e: - if context.response is not None: - # config.logger.exception(f"Exception occurred while handling: {context.response}") - pass - context._response = e - - # Step 12: Return / throw - if isinstance(context.response, Exception): - raise context.response - - # We may want to add some aspects of this context to the output types so we can - # return it to the end-users. - return context.response diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/config.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/config.py deleted file mode 100644 index b577e5b226..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/config.py +++ /dev/null @@ -1,31 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -from dataclasses import dataclass -from typing import Any, Callable, TypeAlias, Union - -from simple.types.boolean.internaldafny.types import ISimpleBooleanClient -from smithy_python.interfaces.interceptor import Interceptor -from smithy_python.interfaces.retries import RetryStrategy - -from .models import GetBooleanInput, GetBooleanOutput - - -_ServiceInterceptor = Union[Interceptor[GetBooleanInput, GetBooleanOutput, Any, Any]] -@dataclass(kw_only=True) -class Config: - """Configuration for SimpleBoolean - - :param interceptors: The list of interceptors, which are hooks that are called - during the execution of a request. - - :param retry_strategy: The retry strategy for issuing retry tokens and computing - retry delays. - - :param impl: - """ - interceptors: list[_ServiceInterceptor] | None = None - retry_strategy: RetryStrategy | None = None - impl: ISimpleBooleanClient | None = None - -# A callable that allows customizing the config object on each request. -Plugin: TypeAlias = Callable[[Config], None] diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/deserialize.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/deserialize.py deleted file mode 100644 index e7605bc689..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/deserialize.py +++ /dev/null @@ -1,13 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -from simple.types.boolean.internaldafny.types import ( - GetBooleanOutput_GetBooleanOutput as DafnyGetBooleanOutput, -) - -from .config import Config -from .models import GetBooleanOutput - - -async def _deserialize_get_boolean(input: DafnyGetBooleanOutput, config: Config) -> GetBooleanOutput: - - return GetBooleanOutput(value=input.value.value) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/endpoints.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/endpoints.py deleted file mode 100644 index 49b2f71554..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/endpoints.py +++ /dev/null @@ -1,7 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -from smithy_python._private.http import StaticEndpointParams, StaticEndpointResolver - - -EndpointParams = StaticEndpointParams -EndpointResolver = StaticEndpointResolver diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/errors.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/errors.py deleted file mode 100644 index 6f38ba4e80..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/errors.py +++ /dev/null @@ -1,23 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -from typing import Generic, Literal, TypeVar - - -class ServiceError(Exception): - """Base error for all errors in the service. - """ - pass - -T = TypeVar('T') -class ApiError(ServiceError, Generic[T]): - """Base error for all api errors in the service. - """ - code: T - def __init__(self, message: str): - super().__init__(message) - self.message = message - -class UnknownApiError(ApiError[Literal['Unknown']]): - """Error representing any unknown api errors - """ - code: Literal['Unknown'] = 'Unknown' diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/models.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/models.py deleted file mode 100644 index 43b48bab05..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/models.py +++ /dev/null @@ -1,108 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -from typing import Any, Dict, Optional - - -class GetBooleanInput: - value: Optional[bool] - def __init__( - self, - *, - value: Optional[bool] = None, - ): - self.value = value - - def as_dict(self) -> Dict[str, Any]: - """Converts the GetBooleanInput to a dictionary. - - The dictionary uses the modeled shape names rather than the parameter names as - keys to be mostly compatible with boto3. - """ - d: Dict[str, Any] = {} - - if self.value is not None: - d["value"] = self.value - - return d - - @staticmethod - def from_dict(d: Dict[str, Any]) -> "GetBooleanInput": - """Creates a GetBooleanInput from a dictionary. - - The dictionary is expected to use the modeled shape names rather than the - parameter names as keys to be mostly compatible with boto3. - """ - kwargs: Dict[str, Any] = {} - - if "value" in d: - kwargs["value"] = d["value"] - - return GetBooleanInput(**kwargs) - - def __repr__(self) -> str: - result = "GetBooleanInput(" - if self.value is not None: - result += f"value={repr(self.value)}" - - return result + ")" - - def __eq__(self, other: Any) -> bool: - if not isinstance(other, GetBooleanInput): - return False - attributes: list[str] = ['value',] - return all( - getattr(self, a) == getattr(other, a) - for a in attributes - ) - -class GetBooleanOutput: - value: Optional[bool] - def __init__( - self, - *, - value: Optional[bool] = None, - ): - self.value = value - - def as_dict(self) -> Dict[str, Any]: - """Converts the GetBooleanOutput to a dictionary. - - The dictionary uses the modeled shape names rather than the parameter names as - keys to be mostly compatible with boto3. - """ - d: Dict[str, Any] = {} - - if self.value is not None: - d["value"] = self.value - - return d - - @staticmethod - def from_dict(d: Dict[str, Any]) -> "GetBooleanOutput": - """Creates a GetBooleanOutput from a dictionary. - - The dictionary is expected to use the modeled shape names rather than the - parameter names as keys to be mostly compatible with boto3. - """ - kwargs: Dict[str, Any] = {} - - if "value" in d: - kwargs["value"] = d["value"] - - return GetBooleanOutput(**kwargs) - - def __repr__(self) -> str: - result = "GetBooleanOutput(" - if self.value is not None: - result += f"value={repr(self.value)}" - - return result + ")" - - def __eq__(self, other: Any) -> bool: - if not isinstance(other, GetBooleanOutput): - return False - attributes: list[str] = ['value',] - return all( - getattr(self, a) == getattr(other, a) - for a in attributes - ) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/plugin.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/plugin.py deleted file mode 100644 index 13aeed05f5..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/plugin.py +++ /dev/null @@ -1,20 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -from .config import Config, Plugin -from smithy_python.interfaces.retries import RetryStrategy -from smithy_python.exceptions import SmithyRetryException - -def set_config_impl(config: Config): - from simple.types.boolean.internaldafny.impl import SimpleBooleanClient - config.impl = SimpleBooleanClient() - config.retry_strategy = NoRetriesStrategy() - -class NoRetriesToken: - retry_delay = 0 - -class NoRetriesStrategy(RetryStrategy): - def acquire_initial_retry_token(self): - return NoRetriesToken() - - def refresh_retry_token_for_retry(self, token_to_renew, error_info): - raise SmithyRetryException() diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/serialize.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/serialize.py deleted file mode 100644 index 8042bf43ac..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src/smithy_generated/simple_boolean/serialize.py +++ /dev/null @@ -1,12 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -from simple.types.boolean.internaldafny.types import ( - GetBooleanInput_GetBooleanInput as DafnyGetBooleanInput, -) - -from .config import Config -from .models import GetBooleanInput - - -async def _serialize_get_boolean(input: GetBooleanInput, config: Config) -> DafnyGetBooleanInput: - return DafnyGetBooleanInput(value=input.value) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/SimpleBooleanImplTest_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/SimpleBooleanImplTest_Compile.py deleted file mode 100644 index 3d9e9a058e..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/SimpleBooleanImplTest_Compile.py +++ /dev/null @@ -1,74 +0,0 @@ -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count - -import module_ -import _dafny -import System_ - -import simpleboolean - -assert "SimpleBooleanImplTest_Compile" == __name__ -SimpleBooleanImplTest_Compile = sys.modules[__name__] - -class default__: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "SimpleBooleanImplTest_Compile._default" - @staticmethod - def GetBooleanTrue(): - d_0_client_: simpleboolean.simple.types.boolean.internaldafny.impl.SimpleBooleanClient - d_1_valueOrError0_: Wrappers_Compile.Result = None - out0_: Wrappers_Compile.Result - print(simpleboolean) - print(dir(simpleboolean)) - out0_ = simpleboolean.dafny_generated.simple.types.boolean.internaldafny.impl.default__.SimpleBoolean(simple.types.boolean.internaldafny.impl.default__.DefaultSimpleBooleanConfig()) - d_1_valueOrError0_ = out0_ - if not(not((d_1_valueOrError0_).IsFailure())): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(10,19): " + _dafny.string_of(d_1_valueOrError0_)) - d_0_client_ = (d_1_valueOrError0_).Extract() - SimpleBooleanImplTest_Compile.default__.TestGetBooleanTrue(d_0_client_) - - @staticmethod - def GetBooleanFalse(): - d_2_client_: simple.types.boolean.internaldafny.impl.SimpleBooleanClient - d_3_valueOrError0_: Wrappers_Compile.Result = None - out1_: Wrappers_Compile.Result - out1_ = simple.types.boolean.internaldafny.impl.default__.SimpleBoolean(simple.types.boolean.internaldafny.impl.default__.DefaultSimpleBooleanConfig()) - d_3_valueOrError0_ = out1_ - if not(not((d_3_valueOrError0_).IsFailure())): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(14,19): " + _dafny.string_of(d_3_valueOrError0_)) - d_2_client_ = (d_3_valueOrError0_).Extract() - SimpleBooleanImplTest_Compile.default__.TestGetBooleanFalse(d_2_client_) - - @staticmethod - def TestGetBooleanTrue(client): - d_4_ret_: simple.types.boolean.internaldafny.types.GetBooleanOutput - d_5_valueOrError0_: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(simple.types.boolean.internaldafny.types.GetBooleanOutput.default())() - out2_: Wrappers_Compile.Result - out2_ = (client).GetBoolean(simple.types.boolean.internaldafny.types.GetBooleanInput_GetBooleanInput(Wrappers_Compile.Option_Some(True))) - d_5_valueOrError0_ = out2_ - if not(not((d_5_valueOrError0_).IsFailure())): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(23,16): " + _dafny.string_of(d_5_valueOrError0_)) - d_4_ret_ = (d_5_valueOrError0_).Extract() - if not((((d_4_ret_).value).UnwrapOr(False)) == (True)): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(24,8): " + _dafny.string_of(_dafny.Seq("expectation violation"))) - _dafny.print(_dafny.string_of(d_4_ret_)) - - @staticmethod - def TestGetBooleanFalse(client): - d_6_ret_: simple.types.boolean.internaldafny.types.GetBooleanOutput - d_7_valueOrError0_: Wrappers_Compile.Result = Wrappers_Compile.Result_Success.default(simple.types.boolean.internaldafny.types.GetBooleanOutput.default())() - out3_: Wrappers_Compile.Result - out3_ = (client).GetBoolean(simple.types.boolean.internaldafny.types.GetBooleanInput_GetBooleanInput(Wrappers_Compile.Option_Some(False))) - d_7_valueOrError0_ = out3_ - if not(not((d_7_valueOrError0_).IsFailure())): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(33,16): " + _dafny.string_of(d_7_valueOrError0_)) - d_6_ret_ = (d_7_valueOrError0_).Extract() - if not((((d_6_ret_).value).UnwrapOr(True)) == (False)): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(34,8): " + _dafny.string_of(_dafny.Seq("expectation violation"))) - _dafny.print(_dafny.string_of(d_6_ret_)) - diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/System_.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/System_.py deleted file mode 100644 index 32e6d896ff..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/System_.py +++ /dev/null @@ -1,20 +0,0 @@ -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count - -import module_ -import _dafny - -assert "System_" == __name__ -System_ = sys.modules[__name__] - -class nat: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "" - @staticmethod - def default(): - return int(0) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/WrappedSimpleTypesBooleanTest_Compile.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/WrappedSimpleTypesBooleanTest_Compile.py deleted file mode 100644 index 7efa7c4686..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/WrappedSimpleTypesBooleanTest_Compile.py +++ /dev/null @@ -1,44 +0,0 @@ -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count - -import module_ -import _dafny -import System_ -import SimpleBooleanImplTest_Compile -import simple.types.boolean.internaldafny.wrapped - -assert "WrappedSimpleTypesBooleanTest_Compile" == __name__ -WrappedSimpleTypesBooleanTest_Compile = sys.modules[__name__] - -class default__: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "WrappedSimpleTypesBooleanTest_Compile._default" - @staticmethod - def GetBooleanTrue(): - d_8_client_: simple.types.boolean.internaldafny.types.ISimpleBooleanClient - d_9_valueOrError0_: Wrappers_Compile.Result = None - out4_: Wrappers_Compile.Result - out4_ = simple.types.boolean.internaldafny.wrapped.default__.WrappedSimpleBoolean(simple.types.boolean.internaldafny.wrapped.default__.WrappedDefaultSimpleBooleanConfig()) - d_9_valueOrError0_ = out4_ - if not(not((d_9_valueOrError0_).IsFailure())): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/WrappedSimpleBooleanTest.dfy(11,19): " + _dafny.string_of(d_9_valueOrError0_)) - d_8_client_ = (d_9_valueOrError0_).Extract() - SimpleBooleanImplTest_Compile.default__.TestGetBooleanTrue(d_8_client_) - - @staticmethod - def GetBooleanFalse(): - d_10_client_: simple.types.boolean.internaldafny.types.ISimpleBooleanClient - d_11_valueOrError0_: Wrappers_Compile.Result = None - out5_: Wrappers_Compile.Result - out5_ = simple.types.boolean.internaldafny.wrapped.default__.WrappedSimpleBoolean(simple.types.boolean.internaldafny.wrapped.default__.WrappedDefaultSimpleBooleanConfig()) - d_11_valueOrError0_ = out5_ - if not(not((d_11_valueOrError0_).IsFailure())): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/WrappedSimpleBooleanTest.dfy(15,19): " + _dafny.string_of(d_11_valueOrError0_)) - d_10_client_ = (d_11_valueOrError0_).Extract() - SimpleBooleanImplTest_Compile.default__.TestGetBooleanFalse(d_10_client_) - diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/__pycache__/SimpleBooleanImplTest_Compile.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/__pycache__/SimpleBooleanImplTest_Compile.cpython-311.pyc deleted file mode 100644 index a12d9301ee685d43130784cc13287fded0344cbc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7399 zcmeHM&2JRR6|e63>ajg`+XIGWan>w`*y3Xt+lvW=WWiuQc4M2hVK<|NW|(fn3_TxP z-2>QbC)SDshvb$GIgX+Y0TD$x4^H59|s> zgabA0SM^?1z53{WzxS&A$4I1&K>E|_9d)6bkbfZKB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_generated/__pycache__/module_.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/__pycache__/module_.cpython-311.pyc deleted file mode 100644 index 543e0dbf8e57e838b47dcc9051000ed98ad43622..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6322 zcmd@YOKcm*b#|AZB_)b0MO2i;M5)MPEjJ-6yH0|%utX*L)|O>Rb>X#)?TR~;C@;Cp z>@o@ks}%wre8|Cv6zL^E4~dJ^%_V4o9C8ZK2IvRf6}AYmfB*wMHU-UDS&Z&VyPz<_tpUM|PV#uvCYFG@r<2%F-x9k)<-7+FZ+_FoI zx}_iriXV4hV<~T)okedl7_Id*Btf|Qsb&?4VHQmxC9sW@;4SEX+Z{uj#U~VI0S)tC zP-Je{=kTw{swyw5*x@q8iW6L{l<*~)IN>?DfR)8^NyWpA|AD|By$ERa8r_&CJ2V3c%=$PnfwVW+v6|I{`Azy%%(#1FH;oxtJ!f-h2Vb zrHZi%6B;lmt;o4zMOwi{Ok@Kq>4rK|rHaE#Qofi6@i%%}D@iqJ-5{hM1h9pweCG|{ zJ*XllK(J9J#kT9EyT;CK2vVI@N@`3_z%&u*0#Mfg5$KGalH`i08w3RD+b_r-y_XK+ z0e~>k0W&&4s4;n@pslXf@56rqw9afY#=c!yYt=o}rXe5?mCoZPg}nviZnws^!x$8T z&!BQN(we_n`!zL%hmzN<=y;D5Ev_EwVG?ugWc0Q%sQAesGWN-}MmO9|#}WDMCVQP- zYprLKdnEGtyfU=Im~W(y>up#5&F1oGe9s#E?WFa#!HF5zWG=(Mf0O+=TjcBIImFUNLRTiXmZ_k4f(e`cG$$J{pCTKy5UO}?EqdfOVdNsstOI%4Oh|1r1C zwx`+=w9Sy${@P(}ZSyFcn}NsNHUsT<$8%5rZ||kH*6-zh*qwfz(SPWXsP&ps!XElz zZ@3OGUoW-+r=*wiCO9wf=I)$Z+(_2FgN8>i1D*o)98y!*Xpk038NZy^2+n5~7A9T| zZ}5|unR8GHJz&C<8{a)__@u1rbbRWkL@t%Evdib1nN$U<1djsIGG{v zUh>5iNy|Ch0)EYjAIL{~MJtr@DkdGUg-(}uQ=G`OtQr$*BMGK z=?4#!&OA(d!9#N0#Y8>TojZYQQ-X9}&KGI9@${a9_w}|u(2D*A#4EN?Er6bi--zt; zU2k>%@{%1JdO!ExnmKaWN{V(;v|?B6*cFRkviT*GU#hVkp=6EaB0pw!h39SI#m|Mw z9bwWErfp%`6sBt|(+y3%PrrTc{XTnOA(^Vf1rhZbz82gn3(-H--6cgJzbkWY$h*t(aoR6pP0; zk4+vQpqUFh!UapXXbTrj;o{NLOsxwE@fu=6tK4o+zug0WdvxMw?3WN=V)N{MTIdur z*bRyq;Lk&kU$B_FOR*g15_1&GvMUs$1z;y!_{1tD0fa#jfE;C1XQ!{gk@rcae>{dh zjYTKAxKEFdCniGNA47gX{uIviPYt5a2BWjbxX(_FCuX1I{`{mLkiYb2`p=D^zm7yN zoaFw7#uFEYxW5ni0Wp)A{)?l?8jUW##O-vACl*h0_Gv#LbHh9h_!Z$QfO{Y;HKKD+ zhX~wjWm&Da5E}P$IJnP9jMh4JLpJhRxIb1kg$x6!9>$~bH}{NpFEba=aGt&dV5{|k zvG^mf)+Pur{%3!crG#g{2JZN~YwSyYsu>FJawyQV4M+PPsovlQ{#1=Mrg#%@fBoamC$FH6UxI4Xh5V?Cp4r*=MKQwPJlF8%(0XmvO6-=3{6 A1poj5 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/_dafny.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/_dafny.py deleted file mode 100644 index 2bcd742785..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/_dafny.py +++ /dev/null @@ -1,476 +0,0 @@ -"""Runtime enabling Dafny language features.""" -import builtins -from dataclasses import dataclass -from contextlib import contextmanager -from fractions import Fraction -from collections import Counter -from collections.abc import Iterable -from functools import reduce -from types import GeneratorType, FunctionType -from itertools import chain, combinations, count - -class classproperty(property): - def __get__(self, instance, owner): - return classmethod(self.fget).__get__(None, owner)() - -def print(value): - builtins.print(value, end="") - -# Dafny strings are currently sequences of UTF-16 code units. -# To make a best effort attempt at printing the right characters we attempt to decode, -# but have to allow for invalid sequences. -def string_from_utf_16(utf_16_code_units): - return b''.join(ord(c).to_bytes(2, 'little') for c in utf_16_code_units).decode("utf-16-le", errors = 'replace') - -def string_of(value) -> str: - if hasattr(value, '__dafnystr__'): - return value.__dafnystr__() - elif value is None: - return "null" - elif isinstance(value, bool): - return "true" if value else "false" - elif isinstance(value, str): - # This is only for Dafny char values. - # Dafny strings are represented as Seq's of individual char values, - # and Seq defines __dafnystr__. - return string_from_utf_16(value) - elif isinstance(value, tuple): - return '(' + ', '.join(map(string_of, value)) + ')' - elif isinstance(value, FunctionType): - return "Function" - else: - return str(value) - -@dataclass -class Break(Exception): - target: str - -@dataclass -class Continue(Exception): - target: str - -class TailCall(Exception): - pass - -@contextmanager -def label(name: str = None): - try: - yield - except Break as g: - if g.target != name: - raise g - except TailCall as g: - if name is not None: - raise g - -@contextmanager -def c_label(name: str = None): - try: - yield - except Continue as g: - if g.target != name: - raise g - -class CodePoint(str): - - escapes = { - '\n' : "\\n", - '\r' : "\\r", - '\t' : "\\t", - '\0' : "\\0", - '\'' : "\\'", - '\"' : "\\\"", - '\\' : "\\\\", - } - - def __escaped__(self): - return self.escapes.get(self, self) - - def __dafnystr__(self): - return f"'{self.__escaped__()}'" - - def __add__(self, other): - return CodePoint(plus_char(self, other)) - - def __sub__(self, other): - return CodePoint(minus_char(self, other)) - -class Seq(tuple): - def __init__(self, __iterable = None, isStr = False): - ''' - isStr defines whether this value should be tracked at runtime as a string (a.k.a. seq) - It accepts three different values: - - True: this value is definitely a string, mark it as such - - False: this value might be a string, apply heuristics to make a best guess - - None: don't apply heuristics, don't mark it as a string - - None is used when --unicode-char is true, to ensure consistent printing of strings - across backends without depending on any runtime tracking. - See docs/Compilation/StringsAndChars.md. - ''' - - if __iterable is None: - __iterable = [] - if isStr is None: - self.isStr = None - else: - self.isStr = isStr \ - or isinstance(__iterable, str) \ - or (isinstance(__iterable, Seq) and __iterable.isStr) \ - or (not isinstance(__iterable, GeneratorType) - and all(isinstance(e, str) and len(e) == 1 for e in __iterable) - and len(__iterable) > 0) - - @property - def Elements(self): - return self - - @property - def UniqueElements(self): - return frozenset(self) - - def VerbatimString(self, asliteral): - if asliteral: - return f"\"{''.join(map(lambda c: c.__escaped__(), self))}\"" - else: - return ''.join(self) - - def __dafnystr__(self) -> str: - if self.isStr: - # This should never be true when using --unicode-char, - # so it is safe to assume we are a sequence of UTF-16 code units. - return string_from_utf_16(self) - return '[' + ', '.join(map(string_of, self)) + ']' - - def __add__(self, other): - return Seq(super().__add__(other), isStr=self.isStr and other.isStr) - - def __getitem__(self, key): - if isinstance(key, slice): - indices = range(*key.indices(len(self))) - return Seq((self[i] for i in indices), isStr=self.isStr) - return super().__getitem__(key) - - def set(self, key, value): - l = list(self) - l[key] = value - return Seq(l, isStr=self.isStr) - - def __hash__(self) -> int: - return hash(tuple(self)) - - def __lt__(self, other): - return len(self) < len(other) and self == other[:len(self)] - - def __le__(self, other): - return len(self) <= len(other) and self == other[:len(self)] - -# Convenience for translation when --unicode-char is enabled -def SeqWithoutIsStrInference(__iterable = None): - return Seq(__iterable, isStr = None) - -class Array: - def __init__(self, initValue, *dims): - def create_structure(initValue, *dims): - return [initValue if len(dims) <= 1 else create_structure(initValue, *dims[1:]) for _ in range(dims[0])] - self.dims = list(dims) - self.arr = create_structure(initValue, *dims) - - def __dafnystr__(self) -> str: - return f'array{self.dims}' - - def __str__(self): - return self.__dafnystr__() - - def length(self, i): - return self.dims[i] if i < len(self.dims) else None - - def __len__(self): - return self.length(0) - - def __getitem__(self, key): - if not isinstance(key, Iterable): - return self.arr[key] - arr = self.arr - for i in key: - arr = arr[i] - return arr - - def __setitem__(self, key, value): - if not isinstance(key, Iterable): - self.arr[key] = value - return - arr = self.arr - for i in range(len(key)-1): - arr = arr[key[i]] - arr[key[-1]] = value - -class Set(frozenset): - @property - def Elements(self): - return self - - @property - def AllSubsets(self): - # https://docs.python.org/3/library/itertools.html#itertools-recipes - s = list(self) - return map(Set, chain.from_iterable(combinations(s, r) for r in range(len(s)+1))) - - def __dafnystr__(self) -> str: - return '{' + ', '.join(map(string_of, self)) + '}' - - def union(self, other): - return Set(super().union(self, other)) - - def intersection(self, other): - return Set(super().intersection(other)) - - def ispropersubset(self, other): - return self.issubset(other) and self != other - - def __or__(self, other): - return self.union(other) - - def __sub__(self, other): - return Set(super().__sub__(other)) - -class MultiSet(Counter): - def __dafnystr__(self) -> str: - return 'multiset{' + ', '.join(map(string_of, self.elements())) + '}' - - def __len__(self): - return reduce(lambda acc, key: acc + self[key], self, 0) - - def union(self, other): - return MultiSet(self + other) - - def __or__(self, other): - return self.union(other) - - def intersection(self, other): - return MultiSet(self & other) - - def __sub__(self, other): - return MultiSet(super().__sub__(other)) - - @property - def keys(self): - return Set(key for key in self if self[key] > 0) - - @property - def Elements(self): - return self.elements() - - @property - def UniqueElements(self): - return self.keys - - def isdisjoint(self, other): - return frozenset(self.keys).isdisjoint(frozenset(other.keys)) - - def issubset(self, other): - return all(self[key] <= other[key] for key in frozenset(self).union(frozenset(other))) - - def ispropersubset(self, other): - return self.issubset(other) and len(self) < len(other) - - def set(self, key, value): - set = Counter(self) - set[key] = value - return MultiSet(set) - - def __hash__(self): - return hash(frozenset(self.keys)) - - def __eq__(self, other): - return all(self[key] == other[key] for key in self.keys | other.keys) - - def __ne__(self, other): - return not (self == other) - - def __setattr__(self, key, value): - raise TypeError("'Map' object is immutable") - - def __contains__(self, item): - return self[item] > 0 - -class Map(dict): - def __dafnystr__(self) -> str: - return 'map[' + ', '.join(map(lambda i: f'{string_of(i[0])} := {string_of(i[1])}', self.items)) + ']' - - @property - def Elements(self): - return self - - @property - def keys(self): - return Set(super().keys()) - - @property - def values(self): - return Set(super().values()) - - @property - def items(self): - return Set(super().items()) - - def set(self, key, value): - map = dict(self) - map[key] = value - return Map(map) - - def __sub__(self, other): - map = dict(self) - for key in list(other): - map.pop(key, None) - return Map(map) - - def __or__(self, other): - map = dict(self) - for k, v in other.items: - map[k] = v - return Map(map) - - def __hash__(self): - return hash(frozenset(self)) - - def __setattr__(self, key, value): - raise TypeError("'Map' object is immutable") - -class BigOrdinal: - @staticmethod - def is_limit(ord): - return ord == 0 - - @staticmethod - def is_succ(ord): - return 0 < ord - - @staticmethod - def offset(ord): - return ord - - @staticmethod - def is_nat(ord): - # at run time, every ORDINAL is a natural number - return True - -class BigRational(Fraction): - def __dafnystr__(self): - if self.denominator == 1: - return f"{self.numerator}.0" - correction = self.divides_a_power_of_10(self.denominator) - if correction is None: - return f"({self.numerator}.0 / {self.denominator}.0)" - compensation, shift = correction - if self.numerator < 0: - sign, digits = "-", str(-self.numerator*compensation) - else: - sign, digits = "", str(self.numerator*compensation) - if shift < len(digits): - n = len(digits) - shift - return f"{sign}{digits[:n]}.{digits[n:]}" - return f"{sign}0.{'0' * (shift - len(digits))}{digits}" - - @staticmethod - def isolate_factor(f, x): - y = 0 - while x > 1 and x % f == 0: - y += 1 - x //= f - return x, y - - @staticmethod - def divides_a_power_of_10(x): - rem, expA = BigRational.isolate_factor(10, x) - if rem % 5 == 0 or rem % 2 == 0 or rem == 1: - major, minor = (5, 2) if rem % 5 == 0 else (2, 5) - rem, expB = BigRational.isolate_factor(major, rem) - return (minor**expB, expA+expB) if rem == 1 else None - return None - - def __add__(self, other): - return BigRational(super().__add__(other)) - - def __sub__(self, other): - return BigRational(super().__sub__(other)) - - def __mul__(self, other): - return BigRational(super().__mul__(other)) - - def __truediv__(self, other): - return BigRational(super().__truediv__(other)) - -def plus_char(a, b): - return chr(ord(a) + ord(b)) - -def minus_char(a, b): - return chr(ord(a) - ord(b)) - -def euclidian_division(a, b): - if 0 <= a: - if 0 <= b: - return a // b - else: - return -(a // (-b)) - else: - if 0 <= b: - return -((-a-1) // b) - 1 - else: - return (-a-1) // (-b) + 1 - -def euclidian_modulus(a, b): - bp = abs(b) - if 0 <= a: - return a % bp - c = (-a) % bp - return c if c == 0 else bp - c - -@dataclass -class HaltException(Exception): - message: str - -def quantifier(vals, frall, pred): - for u in vals: - if pred(u) != frall: - return not frall - return frall - -def AllBooleans(): - return [False, True] - -def AllChars(): - return (chr(i) for i in range(0x10000)) - -def AllUnicodeChars(): - return chain((CodePoint(chr(i)) for i in range(0xD800)), - (CodePoint(chr(i)) for i in range(0xE000, 0x11_0000))) - -def AllIntegers(): - return (i//2 if i % 2 == 0 else -i//2 for i in count(0)) - -def IntegerRange(lo, hi): - if lo is None: - return count(hi-1, -1) - if hi is None: - return count(lo) - return range(lo, hi) - -class Doubler: - def __init__(self, start): - self.start = start - - def __iter__(self): - i = self.start - while True: - yield i - i *= 2 - -class defaults: - bool = staticmethod(lambda: False) - char = staticmethod(lambda: 'D') - codepoint = staticmethod(lambda: CodePoint(defaults.char())) - int = staticmethod(lambda: 0) - real = staticmethod(BigRational) - pointer = staticmethod(lambda: None) - tuple = staticmethod(lambda *args: lambda: tuple(a() for a in args)) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/dafny_generated.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/dafny_generated.py deleted file mode 100644 index 7fef7fc1c6..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/dafny_generated.py +++ /dev/null @@ -1,15 +0,0 @@ -# Dafny program the_program compiled into Python -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count - -import module_ -import _dafny - -try: - dafnyArgs = [_dafny.Seq(a) for a in sys.argv] - module_.default__.Test____Main____(dafnyArgs) -except _dafny.HaltException as e: - _dafny.print("[Program halted] " + e.message + "\n") - sys.exit(1) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/module_.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/module_.py deleted file mode 100644 index 2dcf4297b9..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/module_.py +++ /dev/null @@ -1,80 +0,0 @@ -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count - -import module_ -import _dafny -import System_ -import SimpleBooleanImplTest_Compile -import simple.types.boolean.internaldafny.wrapped -import WrappedSimpleTypesBooleanTest_Compile - -assert "module_" == __name__ -module_ = sys.modules[__name__] - -class default__: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "_module._default" - @staticmethod - def Test____Main____(noArgsParameter__): - d_12_success_: bool - d_12_success_ = True - _dafny.print(_dafny.string_of(_dafny.Seq("SimpleBooleanImplTest.GetBooleanTrue: "))) - try: - if True: - SimpleBooleanImplTest_Compile.default__.GetBooleanTrue() - if True: - _dafny.print(_dafny.string_of(_dafny.Seq("PASSED\n"))) - except _dafny.HaltException as e: - d_13_haltMessage_ = e.message - if True: - _dafny.print(_dafny.string_of(_dafny.Seq("FAILED\n "))) - _dafny.print(_dafny.string_of(d_13_haltMessage_)) - _dafny.print(_dafny.string_of(_dafny.Seq("\n"))) - d_12_success_ = False - _dafny.print(_dafny.string_of(_dafny.Seq("SimpleBooleanImplTest.GetBooleanFalse: "))) - try: - if True: - SimpleBooleanImplTest_Compile.default__.GetBooleanFalse() - if True: - _dafny.print(_dafny.string_of(_dafny.Seq("PASSED\n"))) - except _dafny.HaltException as e: - d_14_haltMessage_ = e.message - if True: - _dafny.print(_dafny.string_of(_dafny.Seq("FAILED\n "))) - _dafny.print(_dafny.string_of(d_14_haltMessage_)) - _dafny.print(_dafny.string_of(_dafny.Seq("\n"))) - d_12_success_ = False - _dafny.print(_dafny.string_of(_dafny.Seq("WrappedSimpleTypesBooleanTest.GetBooleanTrue: "))) - try: - if True: - WrappedSimpleTypesBooleanTest_Compile.default__.GetBooleanTrue() - if True: - _dafny.print(_dafny.string_of(_dafny.Seq("PASSED\n"))) - except _dafny.HaltException as e: - d_15_haltMessage_ = e.message - if True: - _dafny.print(_dafny.string_of(_dafny.Seq("FAILED\n "))) - _dafny.print(_dafny.string_of(d_15_haltMessage_)) - _dafny.print(_dafny.string_of(_dafny.Seq("\n"))) - d_12_success_ = False - _dafny.print(_dafny.string_of(_dafny.Seq("WrappedSimpleTypesBooleanTest.GetBooleanFalse: "))) - try: - if True: - WrappedSimpleTypesBooleanTest_Compile.default__.GetBooleanFalse() - if True: - _dafny.print(_dafny.string_of(_dafny.Seq("PASSED\n"))) - except _dafny.HaltException as e: - d_16_haltMessage_ = e.message - if True: - _dafny.print(_dafny.string_of(_dafny.Seq("FAILED\n "))) - _dafny.print(_dafny.string_of(d_16_haltMessage_)) - _dafny.print(_dafny.string_of(_dafny.Seq("\n"))) - d_12_success_ = False - if not(d_12_success_): - raise _dafny.HaltException("/Users/lucmcdon/Desktop/workplace/polymorph/TestModels/SimpleTypes/SimpleBoolean/test/SimpleBooleanImplTest.dfy(3,0): " + _dafny.string_of(_dafny.Seq("Test failures occurred: see above.\n"))) - diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/simple/types/boolean/internaldafny/__pycache__/wrapped.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/simple/types/boolean/internaldafny/__pycache__/wrapped.cpython-311.pyc deleted file mode 100644 index 411904092f9a6a2ad35b7ce8d42c5cf9e049f7f6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1765 zcma)6&5ImG6tC*-%svLc;hIeTxnBF(S?s5%(@w?`x0phCabP)b{>T zAKkVkz0H`hxX-9GKg`C`-5wY8iZH2W_c(hSEJui<5EB#{1W!?D5`$VpgP2n* zw5da^DY^@@?$>Kk=n@<5?#MMlhw+G&Q8d6yFG5N;;W=|aD5!hr9`4=)AuU1KP^bwn zJ^C^DTu?3oHX5V@l4rq9D)!5~2=3&3zhLoz21U-sY0it?V4I3^D<_nRpr=Dt_|*DG zRonpwNRkxH#kkys4NF)QXb_?uno%B?lmr!GfkrG?AQr437Az3!6l3W{QIaJP;lai- z*iLO*hd6`_VuI#g^Uyj26-kHFa>TR$ghX*~bPwMB|MW$hd0Heub+ot#Z^2<)UqR!^ zFRR0wQKSPFC5Jm-d;HGl_A4+`cp%{3{;ipRi*LZkQwgFuybYcsRD!JA-jeIRI*rht znycHn_lLUVYL|Ymrcw{_CYal{bSfyMt%;HDf*ILbp+>$|vAj{R4T{Wp&NcYgPy2Y&RcA0PYi z%!@U!-L|LlD1$sUw!2urdZt}=it%DJtCs(optakK6g zO(S`Ig`7{||E7w+&VPPg?XDx&1+b*}k@sG;<@@{wOi@WHegSc6VvOggG0}aF-kLpY z%+a;k>X@VFXRG4`txt5Hqt-{V!gP F{Xdpt)|CJN diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/simple/types/boolean/internaldafny/wrapped.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/simple/types/boolean/internaldafny/wrapped.py deleted file mode 100644 index 3a97b8cf40..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/test/dafny_generated/simple/types/boolean/internaldafny/wrapped.py +++ /dev/null @@ -1,22 +0,0 @@ -import sys -from typing import Callable, Any, TypeVar, NamedTuple -from math import floor -from itertools import count - -import module_ -import _dafny -import System_ -import SimpleBooleanImplTest_Compile - -assert "simple.types.boolean.internaldafny.wrapped" == __name__ - -class default__: - def __init__(self): - pass - - def __dafnystr__(self) -> str: - return "simple.types.boolean.internaldafny.wrapped_Compile._default" - @staticmethod - def WrappedDefaultSimpleBooleanConfig(): - return simple.types.boolean.internaldafny.types.SimpleBooleanConfig_SimpleBooleanConfig() - From ac285f6cd86f1e4148e49425797d5035ac8f09c1 Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Tue, 20 Jun 2023 09:35:00 -0700 Subject: [PATCH 023/673] changes --- TestModels/SharedMakefile.mk | 4 +- .../SimpleBoolean/runtimes/python/__init__.py | 0 .../SimpleBoolean/runtimes/python/setup.py | 64 --- .../src-goal/smithy_generated/Iamaredme | 3 - .../src-goal/smithy_generated/README.md | 3 - .../python/src-goal/smithy_generated/plugin | 3 - .../src-goal/smithy_generated/pyproject.toml | 46 --- .../simple_boolean/__init__.py | 1 - .../__pycache__/__init__.cpython-311.pyc | Bin 253 -> 0 bytes .../__pycache__/client.cpython-311.pyc | Bin 13533 -> 0 bytes .../__pycache__/config.cpython-311.pyc | Bin 1818 -> 0 bytes .../__pycache__/deserialize.cpython-311.pyc | Bin 823 -> 0 bytes .../__pycache__/errors.cpython-311.pyc | Bin 1822 -> 0 bytes .../__pycache__/models.cpython-311.pyc | Bin 5274 -> 0 bytes .../__pycache__/plugin.cpython-311.pyc | Bin 1824 -> 0 bytes .../__pycache__/serialize.cpython-311.pyc | Bin 801 -> 0 bytes .../smithy_generated/simple_boolean/client.py | 381 ------------------ .../smithy_generated/simple_boolean/config.py | 31 -- .../simple_boolean/deserialize.py | 13 - .../simple_boolean/endpoints.py | 7 - .../smithy_generated/simple_boolean/errors.py | 23 -- .../smithy_generated/simple_boolean/models.py | 108 ----- .../smithy_generated/simple_boolean/plugin.py | 20 - .../simple_boolean/serialize.py | 12 - .../SimpleTypes/SimpleInteger/src/Index.dfy | 2 +- .../dafny/python/codegen/build.gradle.kts | 1 + .../smithy/dafny/python/DafnyIntegration.java | 218 ++++++++++ .../dafny/python/DafnyProtocolGenerator.java | 301 ++++---------- .../dafny/python/DafnyTestIntegration.java | 146 ------- .../dafny/python/SendRequestInterceptor.java | 13 +- ...thon.codegen.integration.PythonIntegration | 2 +- 31 files changed, 314 insertions(+), 1088 deletions(-) delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/__init__.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/setup.py delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/__pycache__/__init__.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/__pycache__/client.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/__pycache__/config.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/__pycache__/deserialize.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/__pycache__/errors.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/__pycache__/models.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/__pycache__/plugin.cpython-311.pyc delete mode 100644 TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/__pycache__/serialize.cpython-311.pyc create mode 100644 codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyIntegration.java delete mode 100644 codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyTestIntegration.java diff --git a/TestModels/SharedMakefile.mk b/TestModels/SharedMakefile.mk index a161ca3606..c52fb38533 100644 --- a/TestModels/SharedMakefile.mk +++ b/TestModels/SharedMakefile.mk @@ -231,11 +231,11 @@ smithy_dafny_python: gradle build # Smithy outputDirectory can be overridden in smithy-build.json: # https://smithy.io/2.0/guides/building-models/build-config.html#smithy-build-json - # However, outputDirectory is currently bugged, and overrides do not apply:sm + # However, outputDirectory is currently bugged, and overrides do not apply: # https://github.com/awslabs/smithy/issues/1425 # As a workaround, the Make script will move output to the correct directory until #1425 is resolved. mkdir -p runtimes/python/src/smithy_generated - cp -r build/smithyprojections/simple-types-boolean/source/python-client-codegen/. runtimes/python/src/smithy_generated + cp -r build/smithyprojections/*/source/python-client-codegen/. runtimes/python/src/smithy_generated ########################## .NET targets diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/__init__.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/setup.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/setup.py deleted file mode 100644 index a65ea3057c..0000000000 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/setup.py +++ /dev/null @@ -1,64 +0,0 @@ -"""DynamoDB Encryption Client for Python.""" -import io -import os -import re - -from setuptools import find_packages, setup - -VERSION_RE = re.compile(r"""__version__ = ['"]([0-9.]+)['"]""") -HERE = os.path.abspath(os.path.dirname(__file__)) - - -# def read(*args): -# """Reads complete file contents.""" -# return io.open(os.path.join(HERE, *args), encoding="utf-8").read() # pylint: disable=consider-using-with -# -# -# def get_version(): -# """Reads the version from this module.""" -# init = read("src", "dynamodb_encryption_sdk", "identifiers.py") -# return VERSION_RE.search(init).group(1) -# -# -# def get_requirements(): -# """Reads the requirements file.""" -# requirements = read("requirements.txt") -# return requirements.strip().splitlines() -# - -setup( - name="simpleboolean", - # version=get_version(), - packages=find_packages("src"), - package_dir={"": "src"}, - author="Amazon Web Services", - author_email="aws-cryptools@amazon.com", - maintainer="Amazon Web Services", - description="DynamoDB Encryption Client for Python", - # long_description=read("README.rst"), - # keywords="dynamodb-encryption-sdk aws kms encryption dynamodb", - # data_files=["README.rst", "CHANGELOG.rst", "LICENSE", "requirements.txt"], - license="Apache License 2.0", - # install_requires=get_requirements(), - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Natural Language :: English", - "License :: OSI Approved :: Apache Software License", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: Implementation :: CPython", - "Topic :: Security", - "Topic :: Security :: Cryptography", - ], - entry_points={ - 'run_tests': [ - 'tests = src.test.dafny_generated:main', - ] - } -) \ No newline at end of file diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/Iamaredme b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/Iamaredme index 63b8568325..e69de29bb2 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/Iamaredme +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/Iamaredme @@ -1,3 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -yo diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/README.md b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/README.md index 4d95aa6598..e69de29bb2 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/README.md +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/README.md @@ -1,3 +0,0 @@ -## Simple_boolean Client - -simple_boolean client diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/plugin b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/plugin index 63b8568325..e69de29bb2 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/plugin +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/plugin @@ -1,3 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -yo diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/pyproject.toml b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/pyproject.toml index cb3492f592..e69de29bb2 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/pyproject.toml +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/pyproject.toml @@ -1,46 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -[build-system] -requires = ["setuptools", "setuptools-scm", "wheel"] -build-backend = "setuptools.build_meta" - -[project] -name = "simple_boolean" -version = "0.0.1" -description = "simple_boolean client" -readme = "README.md" -requires-python = ">=3.11" -keywords = ["smithy", "simple_boolean"] -license = {text = "Apache-2.0"} -classifiers = [ - "Development Status :: 2 - Pre-Alpha", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "Natural Language :: English", - "License :: OSI Approved :: Apache Software License", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.11" -] - -dependencies = [ - "smithy_python==0.0.1" -] -[tool.setuptools.packages.find] -exclude=["tests*"] - -[tool.mypy] -strict = true -warn_unused_configs = true - -[[tool.mypy.overrides]] -module = ["awscrt", "pytest"] -ignore_missing_imports = true - -[tool.black] -target-version = ["py311"] - -[tool.pytest.ini_options] -python_classes = ["!Test"] -asyncio_mode = "auto" diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/__init__.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/__init__.py index 247be3e3d4..e69de29bb2 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/__init__.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/__init__.py @@ -1 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/__pycache__/__init__.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index a1e226a22480ed7d8e79029b7b4bcc4e0e0261e5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 253 zcmXv}u}%Xq3{9v&2&v*bSnvi*#ei60X_=$rVsTNEII?p>`34p?CT7HU@dK5*b;5^w zZ+L!w*0b#I+n+_|VRbEXzx| z-mFmwsL^VHY~!K`prY&4L6SB<`ojfwi#TYp-tC_uF@}f%3>YW^bpO#vf*Sj)=iVXb zK}ks#yDf^2N0)c*^W1aKIrlqf#((eix)5CZ-v9G-a1x>azz_AyQpRoHxo(`sMtYh;wX*=tjv!xx-&IPU98(KM8 z59?+vS52&!^=UKAnY4V`1#SGbHndi5XoG3Bv-F%N?Y?V?H~lZo<$<{Z--$jia4-lf zrCA^ApR;JI&~j-X8v+iQSYO(tZ$b9Kj_Z`(b?$3D=Uiz&P!djm=UKKI33&KT^Vrff z%oF+j=27Tn{Tt~fJ7xo;VTm`VP1s1t-WjaZY)zY!dqL@6&t}-Xz|0jm#!%^UF>oE2 zPjbl|qZot(%o(D!$!x7)flFd7CY^@o-br-Qy-t5Jqs;~TJj9gl3Wn3F)5Bs1970le9S=4JW+H005b_=@&Z$s zgQ*m|#=`_jfyoupnYkrASp%)02zbz_V#aC=jC4>|Amo zEATtX`q-OE%(@t9JuTZ5mdN%RDJiq6zX;(o3O|2&ACmV_k(&1ks)a}B11S9n{*6Tx~`7e*zR61jb_k? z)bx;r3&41?y=L(_eC*0Lu)450Lsr?sv)MVW0}8oLT;o$VI8j@(Y^!CgP>H35`Q2ZP zT!3BVN3sj4Tq<42j~rq7w}ry|$YOzedp?^?u_N<^>{714&0iatWqIL^LYmF;BZ}x@ zYhKUSWORgE00GEB@%)l-4F=@7)Cfn47rCWrG&vLlhmcC$MsC^_6!ImOPB)VMKCQ&GiOf!fZ&k zX7E`m+c;KO;PM9XfinU91pdDKD@a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%@UThx*b`)`AZz(D{2 diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/__pycache__/config.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/__pycache__/config.cpython-311.pyc deleted file mode 100644 index bea34930e54a48b55f810973988ab02cfb85142c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1818 zcmah}&2QX96d!xN-d$%u^0Cka(#oJ#%F+-^1&R_yNF|Y~2pTFjk&uP3T+i&T6@PWc zCYaM6I3OXR+?oqgPNAs$AsoF@4lAE3IQ6zwIQ7IEdpF7QA!eW7{^q?mGw*BW=UPoc zFz){J1O8A#=np=b40#OBe+Tdc?IVn^;2>Af1%YGH5#54ba3x)Gi+a(Obvct4oRVAC z%NdrOimT{KhKtUOTh*(8Wn6MpA``iaQWBD zsesTk`0^p5`v@!FAv|*`f*ihloWkF;$pq8@1{$ z_==X0R zGHEPR$jpVTn9CqFaw>26UdQg5OW<}6BZvdyS35pcr{Y%>6~;zjQqxuK%M`E;b+1QM z$7Z4GccwI}>S52eda6l@+VlMbriMK;%%&D(p5Sat98ufrf{Li*8)8M-@vxJrQt~(= zEL@v9n(}lTY@F}>@JyyoWSQ?aV-eprSB3ro@tA6QShai?vJa~4@LY|FW5#Uy9A5j4 z%w{*OUX3@cPrHyx+_Y6q%ZA~ZE-{Q$F$~wok;8G-Fdj#yGuD(01N)X?&^ah>D)FqP z3r3sJuWgH5X{@wi7^dg>VO9+W3+7<~<=2`na8?HP3pxjmUj3-;GeVi>M3!q|-_y1U zI|%(iJM`&6;FuQC0^f;Up9Vc`4>J0|hlrV$*O#~c1dm%*qmdWdE{KCT?7@bNS{ifh zuooL$;t}5KSYz4sFdpUiL$k70S_@)2%N^vb4j;q7`d5ACDBgCyer|mC9ipK=~;=jEELF<4+=mON7#uJf<};A#80N*;-b8 z&vdZa@#0*UL8=Sq#Sr+bfK(ET1dAEH;Z^4wmK&%dYR1gGVBqQPN1ike)8lpSN|Iu@_lT6bP zZ6?z+L>tL8Jx3oT|3=`*wdLbao;H&8o!{O|9=4N}_Sy2@+3WiWS{MpSf9dG`L|7aM zi)X^(NURC(j?h2ZOD_A9vzG-VE?tJ`$~dVfd&}|kmc(y Dc{>pu diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/__pycache__/deserialize.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/__pycache__/deserialize.cpython-311.pyc deleted file mode 100644 index 8119d1f0996c27c5bf665878ee4160310ec0b129..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 823 zcmZ`$y^9k;6rb5-C)qnAf+&6!5iE>F26JE`a)KUMh-Y!JNfXwcm& zW+7}2rt1ja5kUl%B%%X{65)uNtVQ)fy~1_rMr^l&9z>A2vxyAc$G*&<<0v~5wTcRH!{R0? zZTq&{`)~OJ4N7yF1yLZ9m~VjIF-gjwBx)y>egHg8WF93d9rHeDb1xAfHQx%OR6;*b zVS(op;wpuGeW}FYVAqM3e5L{QshYx2{%Gd$$L zQ)ZE3kvTI2v^f)qe8^hBFE4>LhOM zo9O4LCN)awggMlikfT(S(DMa3cX<6Imx}+Ft+7^IxoOL+eLr29qAx0Yq^kJ+1#Vm3 A5dZ)H diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/__pycache__/errors.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/__pycache__/errors.cpython-311.pyc deleted file mode 100644 index dfb11b43caa76dfa741817f56bd9ad372f04aaa3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1822 zcmb7E&1>976rYi_EA4u>PTG>V(8ltmjUe46p%eyilIeNDD>3ZhRvbm)HkD**KyK7M|wZa$D8-wy!X@m z*lgAjw6}lwhAwFc{UrxwGbf$#&(PUN6j2KJLLgQ&KPsLqTd9ijUm zMRO|}VmdXBFwBBXW~*vP1$I*vB6CCtlR2jBflQ4EGU3E~d!UD0X$KfjvEM ztT6s%;IrGD$9%hW%M;9IvTv`0cwtzKgdIe7+GVyV)LV5M+OlKh79o+>V}#^&LV7Xn zhqB)w)X@RH47j9&f+}=`tU-4Aj5J)aMhM_f!^#$Uv((M;>Jzyx`7wSAG`>2M z?KNPR3oK$4s@;S&U{rNo8=`egjopT84$&R#T2PHjZoQubMI~-LqY_>cJg*wL;X|5o z6Vf2O4dw&sPn!%*%J@@&@9;iKOKQOQ2;@FU(GJh7lyeB};3w&hVP*%BQy&z;0q`;~ zsv`Oc#1qG-eRqJiBn^z13=)Gwc#69ZgcDa(%e%rwh2E-yST1K~1P z#c5QTUz0-#FN28d0Mi6!=u8UduV#zGH};&9`m4vrRd^pLgic{i8M*@dmz`Q(O$P}C z&t-lJ-xcWPwcB@mmdHvMzqw?9DxiwsTxgH2o5dCOE?)pWS$FXZz(~g!kE#g2d5o_8 z*E_1}xHdvh!`?d&u_)~fBodr4e8R6F3&5e)cp&oWTNu` diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/__pycache__/models.cpython-311.pyc b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/__pycache__/models.cpython-311.pyc deleted file mode 100644 index 15f30e423182e684d7539b5c11be9555a9bb0995..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5274 zcmeHK|7#q_6`$GN`=Yy(PLgfKk`-$e$Bs_4cR9OBsZk86RfncjF13>%jx^`h?MQdg z-tBpI&(0lkQ9+P16+u6==%6;}hs2F={)hArXyH^;5DNi82_(OSGfKher@l9PxA(;o zxS^&Py1IQkv-9Td%;&v%@1sBW_lF2vuiyW@z7ZzmpV(<#O0%&)2aOG)6P+3)Pg686 zrKG%^k|~kMTSS*ui7r2o2z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_BwO=+OuiV-_A&Wf2Z1B_-sy z4Hm{KGTTP-h6p04BoXa9ln6)EWG!<0ZpmF)k651}uLBbdT+sk$$b|R8?Ki}!JI*t`kmdXh-+<6Ci>nZZhYgeq(vyOG4h@BmqRC8MZ^c4NVUGNWJ$Os3+%u^lR_ zp?{9g>@vb_LQ%f4g)4hP9xkJ=^aJuQ%NWHvyV$n=$d?&(oZ{?`KaBGg5vqx$I*w|f zQyzl0?YFj$U-Nq!l;$!EqCg}u-vK=~Ny-lsHBO};08bN{M~O;Dd>^#An+TAa?}bq+ zVLwk{!K*28mBl8E@O7G-5f;=c;5rJ;C?6a^49YhkxGuL39?U1pQ9|g;@G*4Lyx15l zL)>8&N$LzLw#U%t5dPrxjQnbDzJvGUNwfF8+56G#P2AoL7s+nND=y7@bdA;6tvYqX z*no GetBooleanOutput: - """Invokes the GetBoolean operation. - - :param input: The operation's input. - - :param plugins: A list of callables that modify the configuration dynamically. - Changes made by these plugins only apply for the duration of the operation - execution and will not affect any other operation invocations. - """ - operation_plugins = [ - - ] - if plugins: - operation_plugins.extend(plugins) - - return await self._execute_operation( - input=input, - plugins=operation_plugins, - serialize=_serialize_get_boolean, - deserialize=_deserialize_get_boolean, - config=self._config, - ) - - async def _execute_operation( - self, - input: Input, - plugins: list[Plugin], - serialize: Callable[[Input, Config], Awaitable[GetBooleanOutput_GetBooleanOutput]], - deserialize: Callable[[GetBooleanInput_GetBooleanInput, Config], Awaitable[Output]], - config: Config, - ) -> Output: - try: - return await self._handle_execution( - input, plugins, serialize, deserialize, config - ) - except Exception as e: - # Make sure every exception that we throw is an instance of ServiceError so - # customers can reliably catch everything we throw. - if not isinstance(e, ServiceError): - raise ServiceError(e) from e - raise e - - async def _handle_execution( - self, - input: Input, - plugins: list[Plugin], - serialize: Callable[[Input, Config], Awaitable[GetBooleanOutput_GetBooleanOutput]], - deserialize: Callable[[GetBooleanInput_GetBooleanInput, Config], Awaitable[Output]], - config: Config, - ) -> Output: - context: InterceptorContext[Input, None, None, None] = InterceptorContext( - request=input, - response=None, - transport_request=None, - transport_response=None, - ) - _client_interceptors = config.interceptors or [] - client_interceptors = cast( - list[Interceptor[Input, Output, GetBooleanOutput_GetBooleanOutput, GetBooleanInput_GetBooleanInput]], _client_interceptors - ) - interceptors = client_interceptors - - try: - # Step 1a: Invoke read_before_execution on client-level interceptors - for interceptor in client_interceptors: - interceptor.read_before_execution(context) - - # Step 1b: Run operation-level plugins - config = deepcopy(config) - for plugin in plugins: - plugin(config) - - _client_interceptors = config.interceptors or [] - interceptors = cast( - list[Interceptor[Input, Output, GetBooleanOutput_GetBooleanOutput, GetBooleanInput_GetBooleanInput]], - _client_interceptors, - ) - - # Step 1c: Invoke the read_before_execution hooks on newly added - # interceptors. - for interceptor in interceptors: - if interceptor not in client_interceptors: - interceptor.read_before_execution(context) - - # Step 2: Invoke the modify_before_serialization hooks - for interceptor in interceptors: - context._request = interceptor.modify_before_serialization(context) - - # Step 3: Invoke the read_before_serialization hooks - for interceptor in interceptors: - interceptor.read_before_serialization(context) - - # Step 4: Serialize the request - context_with_transport_request = cast( - InterceptorContext[Input, None, GetBooleanOutput_GetBooleanOutput, None], context - ) - context_with_transport_request._transport_request = await serialize( - context_with_transport_request.request, config - ) - - # Step 5: Invoke read_after_serialization - for interceptor in interceptors: - interceptor.read_after_serialization(context_with_transport_request) - - # Step 6: Invoke modify_before_retry_loop - for interceptor in interceptors: - context_with_transport_request._transport_request = ( - interceptor.modify_before_retry_loop(context_with_transport_request) - ) - - # Step 7: Acquire the retry token. - retry_strategy = config.retry_strategy - if retry_strategy is None: - raise ServiceError( - "No retry_strategy found on the operation config." - ) - retry_token = retry_strategy.acquire_initial_retry_token() - - while True: - # Make an attempt, creating a copy of the context so we don't pass - # around old data. - context_with_response = await self._handle_attempt( - deserialize, - interceptors, - context_with_transport_request.copy(), - config, - ) - - # We perform this type-ignored re-assignment because `context` needs - # to point at the latest context so it can be generically handled - # later on. This is only an issue here because we've created a copy, - # so we're no longer simply pointing at the same object in memory - # with different names and type hints. It is possible to address this - # without having to fall back to the type ignore, but it would impose - # unnecessary runtime costs. - context = context_with_response # type: ignore - - if isinstance(context_with_response.response, Exception): - # Step 7u: Reacquire retry token if the attempt failed - try: - retry_token = retry_strategy.refresh_retry_token_for_retry( - token_to_renew=retry_token, - error_info=RetryErrorInfo( - # TODO: Determine the error type. - error_type=RetryErrorType.CLIENT_ERROR, - ) - ) - except SmithyRetryException: - raise context_with_response.response - await sleep(retry_token.retry_delay) - else: - # Step 8: Invoke record_success - retry_strategy.record_success(token=retry_token) - break - except Exception as e: - if context.response is not None: - # config.logger.exception(f"Exception occurred while handling: {context.response}") - pass - context._response = e - - # At this point, the context's request will have been definitively set, and - # The response will be set either with the modeled output or an exception. The - # transport_request and transport_response may be set or None. - execution_context = cast( - InterceptorContext[Input, Output, GetBooleanOutput_GetBooleanOutput | None, GetBooleanInput_GetBooleanInput | None], context - ) - return await self._finalize_execution(interceptors, execution_context) - - async def _handle_attempt( - self, - deserialize: Callable[[GetBooleanInput_GetBooleanInput, Config], Awaitable[Output]], - interceptors: list[Interceptor[Input, Output, GetBooleanOutput_GetBooleanOutput, GetBooleanInput_GetBooleanInput]], - context: InterceptorContext[Input, None, GetBooleanOutput_GetBooleanOutput, None], - config: Config, - ) -> InterceptorContext[Input, Output, GetBooleanOutput_GetBooleanOutput, GetBooleanInput_GetBooleanInput | None]: - try: - # assert config.interceptors is not None - # Step 7a: Invoke read_before_attempt - for interceptor in interceptors: - interceptor.read_before_attempt(context) - - # Steps 7b-e haven't had their python designs finalized yet - # Step 7b: Invoke service_auth_scheme_resolver.resolve_auth_scheme - # Step 7c: Invoke auth_scheme.identity_resolver - # Step 7d: Invoke auth_scheme.signer - # Step 7e: Invoke identity_resolver.resolve_identity - - # Step 7g: Invoke modify_before_signing - for interceptor in interceptors: - context._transport_request = interceptor.modify_before_signing(context) - - # Step 7h: Invoke read_before_signing - for interceptor in interceptors: - interceptor.read_before_signing(context) - - # Step 7i: Invoke signer.sign_request - # This step hasn't had its python design finalized yet - - # Step 7j: Invoke read_after_signing - for interceptor in interceptors: - interceptor.read_after_signing(context) - - # Step 7k: Invoke modify_before_transmit - for interceptor in interceptors: - context._transport_request = interceptor.modify_before_transmit(context) - - # Step 7l: Invoke read_before_transmit - for interceptor in interceptors: - interceptor.read_before_transmit(context) - - ## HERE - # Step 7m: Invoke http_client.send - if config.impl is None: - raise Exception("No impl found on the operation config.") - - context_with_response = cast( - InterceptorContext[Input, None, GetBooleanInput_GetBooleanInput, GetBooleanOutput_GetBooleanOutput], context - ) - - print(f"transport_request is {context_with_response.transport_request}") - - context_with_response._transport_response = config.impl.GetBoolean( - input=context_with_response.transport_request - ) - - # Step 7n: Invoke read_after_transmit - for interceptor in interceptors: - interceptor.read_after_transmit(context_with_response) - - # Step 7o: Invoke modify_before_deserialization - for interceptor in interceptors: - context_with_response._transport_response = ( - interceptor.modify_before_deserialization(context_with_response) - ) - - # Step 7p: Invoke read_before_deserialization - for interceptor in interceptors: - interceptor.read_before_deserialization(context_with_response) - - # Step 7q: deserialize - context_with_output = cast( - InterceptorContext[Input, Output, GetBooleanOutput_GetBooleanOutput, GetBooleanInput_GetBooleanInput], - context_with_response, - ) - context_with_output._response = await deserialize( - context_with_output._transport_response, config - ) - - # Step 7r: Invoke read_after_deserialization - for interceptor in interceptors: - interceptor.read_after_deserialization(context_with_output) - except Exception as e: - if context.response is not None: - # config.logger.exception(f"Exception occurred while handling: {context.response}") - pass - context._response = e - - # At this point, the context's request and transport_request have definitively been set, - # the response is either set or an exception, and the transport_resposne is either set or - # None. This will also be true after _finalize_attempt because there is no opportunity - # there to set the transport_response. - attempt_context = cast( - InterceptorContext[Input, Output, GetBooleanOutput_GetBooleanOutput, GetBooleanInput_GetBooleanInput | None], context - ) - return await self._finalize_attempt(interceptors, attempt_context) - - async def _finalize_attempt( - self, - interceptors: list[Interceptor[Input, Output, GetBooleanOutput_GetBooleanOutput, GetBooleanInput_GetBooleanInput]], - context: InterceptorContext[Input, Output, GetBooleanOutput_GetBooleanOutput, GetBooleanInput_GetBooleanInput | None], - ) -> InterceptorContext[Input, Output, GetBooleanOutput_GetBooleanOutput, GetBooleanInput_GetBooleanInput | None]: - # Step 7s: Invoke modify_before_attempt_completion - try: - for interceptor in interceptors: - context._response = interceptor.modify_before_attempt_completion( - context - ) - except Exception as e: - if context.response is not None: - # config.logger.exception(f"Exception occurred while handling: {context.response}") - pass - context._response = e - - # Step 7t: Invoke read_after_attempt - for interceptor in interceptors: - try: - interceptor.read_after_attempt(context) - except Exception as e: - if context.response is not None: - # config.logger.exception(f"Exception occurred while handling: {context.response}") - pass - context._response = e - - return context - - async def _finalize_execution( - self, - interceptors: list[Interceptor[Input, Output, GetBooleanOutput_GetBooleanOutput, GetBooleanInput_GetBooleanInput]], - context: InterceptorContext[Input, Output, GetBooleanOutput_GetBooleanOutput | None, GetBooleanInput_GetBooleanInput | None], - ) -> Output: - try: - # Step 9: Invoke modify_before_completion - for interceptor in interceptors: - context._response = interceptor.modify_before_completion(context) - - # Step 10: Invoke trace_probe.dispatch_events - try: - pass - except Exception as e: - # log and ignore exceptions - # config.logger.exception(f"Exception occurred while dispatching trace events: {e}") - pass - except Exception as e: - if context.response is not None: - # config.logger.exception(f"Exception occurred while handling: {context.response}") - pass - context._response = e - - # Step 11: Invoke read_after_execution - for interceptor in interceptors: - try: - interceptor.read_after_execution(context) - except Exception as e: - if context.response is not None: - # config.logger.exception(f"Exception occurred while handling: {context.response}") - pass - context._response = e - - # Step 12: Return / throw - if isinstance(context.response, Exception): - raise context.response - - # We may want to add some aspects of this context to the output types so we can - # return it to the end-users. - return context.response diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/config.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/config.py index b577e5b226..e69de29bb2 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/config.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/config.py @@ -1,31 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -from dataclasses import dataclass -from typing import Any, Callable, TypeAlias, Union - -from simple.types.boolean.internaldafny.types import ISimpleBooleanClient -from smithy_python.interfaces.interceptor import Interceptor -from smithy_python.interfaces.retries import RetryStrategy - -from .models import GetBooleanInput, GetBooleanOutput - - -_ServiceInterceptor = Union[Interceptor[GetBooleanInput, GetBooleanOutput, Any, Any]] -@dataclass(kw_only=True) -class Config: - """Configuration for SimpleBoolean - - :param interceptors: The list of interceptors, which are hooks that are called - during the execution of a request. - - :param retry_strategy: The retry strategy for issuing retry tokens and computing - retry delays. - - :param impl: - """ - interceptors: list[_ServiceInterceptor] | None = None - retry_strategy: RetryStrategy | None = None - impl: ISimpleBooleanClient | None = None - -# A callable that allows customizing the config object on each request. -Plugin: TypeAlias = Callable[[Config], None] diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/deserialize.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/deserialize.py index e7605bc689..e69de29bb2 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/deserialize.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/deserialize.py @@ -1,13 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -from simple.types.boolean.internaldafny.types import ( - GetBooleanOutput_GetBooleanOutput as DafnyGetBooleanOutput, -) - -from .config import Config -from .models import GetBooleanOutput - - -async def _deserialize_get_boolean(input: DafnyGetBooleanOutput, config: Config) -> GetBooleanOutput: - - return GetBooleanOutput(value=input.value.value) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/endpoints.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/endpoints.py index 49b2f71554..e69de29bb2 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/endpoints.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/endpoints.py @@ -1,7 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -from smithy_python._private.http import StaticEndpointParams, StaticEndpointResolver - - -EndpointParams = StaticEndpointParams -EndpointResolver = StaticEndpointResolver diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/errors.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/errors.py index 6f38ba4e80..e69de29bb2 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/errors.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/errors.py @@ -1,23 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -from typing import Generic, Literal, TypeVar - - -class ServiceError(Exception): - """Base error for all errors in the service. - """ - pass - -T = TypeVar('T') -class ApiError(ServiceError, Generic[T]): - """Base error for all api errors in the service. - """ - code: T - def __init__(self, message: str): - super().__init__(message) - self.message = message - -class UnknownApiError(ApiError[Literal['Unknown']]): - """Error representing any unknown api errors - """ - code: Literal['Unknown'] = 'Unknown' diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/models.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/models.py index 43b48bab05..e69de29bb2 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/models.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/models.py @@ -1,108 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -from typing import Any, Dict, Optional - - -class GetBooleanInput: - value: Optional[bool] - def __init__( - self, - *, - value: Optional[bool] = None, - ): - self.value = value - - def as_dict(self) -> Dict[str, Any]: - """Converts the GetBooleanInput to a dictionary. - - The dictionary uses the modeled shape names rather than the parameter names as - keys to be mostly compatible with boto3. - """ - d: Dict[str, Any] = {} - - if self.value is not None: - d["value"] = self.value - - return d - - @staticmethod - def from_dict(d: Dict[str, Any]) -> "GetBooleanInput": - """Creates a GetBooleanInput from a dictionary. - - The dictionary is expected to use the modeled shape names rather than the - parameter names as keys to be mostly compatible with boto3. - """ - kwargs: Dict[str, Any] = {} - - if "value" in d: - kwargs["value"] = d["value"] - - return GetBooleanInput(**kwargs) - - def __repr__(self) -> str: - result = "GetBooleanInput(" - if self.value is not None: - result += f"value={repr(self.value)}" - - return result + ")" - - def __eq__(self, other: Any) -> bool: - if not isinstance(other, GetBooleanInput): - return False - attributes: list[str] = ['value',] - return all( - getattr(self, a) == getattr(other, a) - for a in attributes - ) - -class GetBooleanOutput: - value: Optional[bool] - def __init__( - self, - *, - value: Optional[bool] = None, - ): - self.value = value - - def as_dict(self) -> Dict[str, Any]: - """Converts the GetBooleanOutput to a dictionary. - - The dictionary uses the modeled shape names rather than the parameter names as - keys to be mostly compatible with boto3. - """ - d: Dict[str, Any] = {} - - if self.value is not None: - d["value"] = self.value - - return d - - @staticmethod - def from_dict(d: Dict[str, Any]) -> "GetBooleanOutput": - """Creates a GetBooleanOutput from a dictionary. - - The dictionary is expected to use the modeled shape names rather than the - parameter names as keys to be mostly compatible with boto3. - """ - kwargs: Dict[str, Any] = {} - - if "value" in d: - kwargs["value"] = d["value"] - - return GetBooleanOutput(**kwargs) - - def __repr__(self) -> str: - result = "GetBooleanOutput(" - if self.value is not None: - result += f"value={repr(self.value)}" - - return result + ")" - - def __eq__(self, other: Any) -> bool: - if not isinstance(other, GetBooleanOutput): - return False - attributes: list[str] = ['value',] - return all( - getattr(self, a) == getattr(other, a) - for a in attributes - ) diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/plugin.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/plugin.py index 13aeed05f5..e69de29bb2 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/plugin.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/plugin.py @@ -1,20 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -from .config import Config, Plugin -from smithy_python.interfaces.retries import RetryStrategy -from smithy_python.exceptions import SmithyRetryException - -def set_config_impl(config: Config): - from simple.types.boolean.internaldafny.impl import SimpleBooleanClient - config.impl = SimpleBooleanClient() - config.retry_strategy = NoRetriesStrategy() - -class NoRetriesToken: - retry_delay = 0 - -class NoRetriesStrategy(RetryStrategy): - def acquire_initial_retry_token(self): - return NoRetriesToken() - - def refresh_retry_token_for_retry(self, token_to_renew, error_info): - raise SmithyRetryException() diff --git a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/serialize.py b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/serialize.py index 8042bf43ac..e69de29bb2 100644 --- a/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/serialize.py +++ b/TestModels/SimpleTypes/SimpleBoolean/runtimes/python/src-goal/smithy_generated/simple_boolean/serialize.py @@ -1,12 +0,0 @@ -# Code generated by smithy-python-codegen DO NOT EDIT. - -from simple.types.boolean.internaldafny.types import ( - GetBooleanInput_GetBooleanInput as DafnyGetBooleanInput, -) - -from .config import Config -from .models import GetBooleanInput - - -async def _serialize_get_boolean(input: GetBooleanInput, config: Config) -> DafnyGetBooleanInput: - return DafnyGetBooleanInput(value=input.value) diff --git a/TestModels/SimpleTypes/SimpleInteger/src/Index.dfy b/TestModels/SimpleTypes/SimpleInteger/src/Index.dfy index 3dd7ea75f6..d05c6f7d29 100644 --- a/TestModels/SimpleTypes/SimpleInteger/src/Index.dfy +++ b/TestModels/SimpleTypes/SimpleInteger/src/Index.dfy @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 include "SimpleIntegerImpl.dfy" -module {:extern "simple.types.integer.internaldafny" } SimpleInteger refines AbstractSimpleTypesIntegerService { +module {:extern "simple.types.integer.internaldafny.impl" } SimpleInteger refines AbstractSimpleTypesIntegerService { import Operations = SimpleIntegerImpl function method DefaultSimpleIntegerConfig(): SimpleIntegerConfig { diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/build.gradle.kts b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/build.gradle.kts index fb06cbd6ee..4a77af25af 100644 --- a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/build.gradle.kts +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/build.gradle.kts @@ -23,6 +23,7 @@ dependencies { implementation("software.amazon.smithy:smithy-model:1.28.1") implementation("software.amazon.smithy:smithy-aws-traits:1.28.1") implementation("software.amazon.smithy.python:smithy-python-codegen:0.1.0") + implementation("software.amazon.smithy.dafny:smithy-dafny-codegen:0.1.0") } publishing { diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyIntegration.java b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyIntegration.java new file mode 100644 index 0000000000..cc3427f6f0 --- /dev/null +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyIntegration.java @@ -0,0 +1,218 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +package software.amazon.smithy.dafny.python; + +import java.util.Collections; +import java.util.List; +import java.util.Set; +import software.amazon.smithy.codegen.core.Symbol; +import software.amazon.smithy.codegen.core.SymbolReference; +import software.amazon.smithy.model.shapes.OperationShape; +import software.amazon.smithy.model.shapes.ServiceShape; +import software.amazon.smithy.model.shapes.Shape; +import software.amazon.smithy.model.shapes.ShapeId; +import software.amazon.smithy.python.codegen.ApplicationProtocol; +import software.amazon.smithy.python.codegen.ConfigField; +import software.amazon.smithy.python.codegen.GenerationContext; +import software.amazon.smithy.python.codegen.PythonWriter; +import software.amazon.smithy.python.codegen.integration.ProtocolGenerator; +import software.amazon.smithy.python.codegen.integration.RuntimeClientPlugin; +import software.amazon.smithy.python.codegen.integration.PythonIntegration; +import software.amazon.smithy.utils.CodeInterceptor; +import software.amazon.smithy.utils.CodeSection; + +// TODO: Naming of DafnyIntegration? +public final class DafnyIntegration implements PythonIntegration { + private RuntimeClientPlugin dafnyImplRuntimeClientPlugin = RuntimeClientPlugin.builder() + .configFields( + // Adds a new field in the client class' config. + // This is an interface for the Dafny implementation code. + // The Smithy-Dafny Python plugin generates a dafnyImplInterface file + // and populates it with the relevant information from the model + // to interact with the Dafny implementation. + // We use an interface as we cannot plug the model into the RuntimeClientPlugin definition, + // but we can point the RuntimeClientPlugin to an interface and plug the model in there. + // TODO: Naming of DafnyImplInterface? + Collections.singletonList(new ConfigField("dafnyImplInterface", + Symbol.builder() + .name("DafnyImplInterface") + .namespace(".dafnyImplInterface", ".") + .build(), + // isOptional is marked as true here, but in practice, this is required. + // The plugin will add a value immediately after Config is created. + true, "")) + ).pythonPlugin( + SymbolReference.builder() + .symbol( + Symbol.builder() + .name("set_config_impl") + .namespace(".plugin", ".") + .build()) + .build() + ) + .build(); + + @Override + public List> + interceptors(GenerationContext codegenContext) { + return List.of(new SendRequestInterceptor()); + } + + @Override + public void customize(GenerationContext codegenContext) { + // TODO: Refactor into a nameResolver and call nameForService + // TODO: Support more than 1 service (will throw IndexOutOfBoundsException if >1 service) + ServiceShape serviceShape = (ServiceShape) codegenContext.model().getServiceShapes().toArray()[0]; + String serviceName = serviceShape.getId().getName(); + String clientName = serviceName + "Client"; + + // TODO: nameResolver + String moduleName = codegenContext.settings().getModuleName(); + String implModulePrelude = serviceShape.getId().getNamespace() + ".internaldafny.impl"; + + // TODO: refactor to PluginFileWriter + // TODO: Naming of this file? + codegenContext.writerDelegator().useFileWriter(moduleName + "/plugin.py", "", writer -> { + writer.write( + """ + from .config import Config, Plugin + from smithy_python.interfaces.retries import RetryStrategy + from smithy_python.exceptions import SmithyRetryException + from .dafnyImplInterface import DafnyImplInterface + + def set_config_impl(config: Config): + from $L import $L + config.dafnyImplInterface = DafnyImplInterface() + config.dafnyImplInterface.impl = $L() + config.retry_strategy = NoRetriesStrategy() + + class NoRetriesToken: + retry_delay = 0 + + class NoRetriesStrategy(RetryStrategy): + def acquire_initial_retry_token(self): + return NoRetriesToken() + + def refresh_retry_token_for_retry(self, token_to_renew, error_info): + # Do not retry + raise SmithyRetryException() + """, implModulePrelude, clientName, clientName + ); + }); + + // TODO: builder + String operations = ""; + for (OperationShape operationShape : codegenContext.model().getOperationShapes()) { + operations += """ + "%1$s": self.%2$s.%1$s\n + """.formatted(operationShape.getId().getName(), "impl"); + } + String allOperations = operations; + + // TODO: refactor to DafnyImplInterfaceFileWriter + // TODO: Naming of this file? + codegenContext.writerDelegator().useFileWriter(moduleName + "/dafnyImplInterface.py", "", writer -> { + writer.write( + """ + from $L import $L + + class DafnyImplInterface: + $L: $L | None = None + + def handle_request(self, input): + + # TODO: populate map at runtime (since impl is only populated at runtime, and avoids a None exception), + # but don't re-populate it at every handle_request call, i.e. cache + operation_map = { + $L + } + + operation_name = input[0] + return operation_map[operation_name](input[1]) + """, implModulePrelude, clientName, "impl", clientName, allOperations + ); + }); + + // TODO: refactor to DafnyProtocolFileWriter + // TODO: Naming of this file? + // I'm not sure how we use this.. maybe for better type checking? + // maybe something like DafnyInput = Union[forall operations: DafnyName(operation)] + codegenContext.writerDelegator().useFileWriter(moduleName + "/dafny_protocol.py", "", writer -> { + writer.write( + """ + class DafnyRequest: + # TODO: smithy-python requires some class for the "application protocol input", + # but we do not use this at this time. + pass + + class DafnyResponse: + # TODO: smithy-python requires some class for the "application protocol output", + # but we do not use this at this time. + pass + """ + ); + }); + +} + + /** + * Creates the Dafny ApplicationProtocol object. + * This is largely entirely unused boilerplate. + * Smithy-Python requires this boilerplate, but the Dafny plugin doesn't use it. + * + * @return Returns the created application protocol. + */ + public static ApplicationProtocol createDafnyApplicationProtocol() { + return new ApplicationProtocol( + "dafny", + // TODO: Naming of these symbols? + SymbolReference.builder() + .symbol(createDafnySymbol("DafnyRequest")) + .build(), + SymbolReference.builder() + .symbol(createDafnySymbol("DafnyResponse")) + .build() + ); + } + + private static Symbol createDafnySymbol(String symbolName) { + return Symbol.builder() + .namespace(".dafny_protocol", ".") + .name(symbolName) + .build(); + } + + @Override + public List getProtocolGenerators() { + return Collections.singletonList(new DafnyProtocolGenerator() { + @Override + protected void generateDocumentBodyShapeDeserializers(GenerationContext context, + Set shapes) { + + } + + @Override + public ShapeId getProtocol() { + return ShapeId.from("aws.polymorph#localService"); + } + }); + } + + @Override + public List getClientPlugins() { + return Collections.singletonList(dafnyImplRuntimeClientPlugin); + } +} diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyProtocolGenerator.java b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyProtocolGenerator.java index 4f0dfa671c..5a6071525b 100644 --- a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyProtocolGenerator.java +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/smithy/dafny/python/codegen/src/main/java/software/amazon/smithy/dafny/python/DafnyProtocolGenerator.java @@ -1,4 +1,4 @@ -package software.amazon.smithy.dafny.python;/* +/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). @@ -13,19 +13,14 @@ * permissions and limitations under the License. */ +package software.amazon.smithy.dafny.python; -import static java.lang.String.format; -import static software.amazon.smithy.model.knowledge.HttpBinding.Location.HEADER; -import static software.amazon.smithy.model.knowledge.HttpBinding.Location.PAYLOAD; -import static software.amazon.smithy.model.knowledge.HttpBinding.Location.PREFIX_HEADERS; import static software.amazon.smithy.model.traits.TimestampFormatTrait.Format; -import java.util.List; import java.util.Set; import java.util.TreeSet; import software.amazon.smithy.codegen.core.CodegenException; import software.amazon.smithy.model.knowledge.HttpBinding.Location; -import software.amazon.smithy.model.knowledge.HttpBindingIndex; import software.amazon.smithy.model.knowledge.TopDownIndex; import software.amazon.smithy.model.shapes.BigDecimalShape; import software.amazon.smithy.model.shapes.BigIntegerShape; @@ -35,10 +30,10 @@ import software.amazon.smithy.model.shapes.DoubleShape; import software.amazon.smithy.model.shapes.FloatShape; import software.amazon.smithy.model.shapes.IntegerShape; -import software.amazon.smithy.model.shapes.ListShape; import software.amazon.smithy.model.shapes.LongShape; import software.amazon.smithy.model.shapes.MemberShape; import software.amazon.smithy.model.shapes.OperationShape; +import software.amazon.smithy.model.shapes.ServiceShape; import software.amazon.smithy.model.shapes.Shape; import software.amazon.smithy.model.shapes.ShapeId; import software.amazon.smithy.model.shapes.ShapeVisitor; @@ -46,37 +41,21 @@ import software.amazon.smithy.model.shapes.StringShape; import software.amazon.smithy.model.shapes.StructureShape; import software.amazon.smithy.model.shapes.TimestampShape; -import software.amazon.smithy.model.traits.MediaTypeTrait; -import software.amazon.smithy.model.traits.StreamingTrait; import software.amazon.smithy.python.codegen.ApplicationProtocol; import software.amazon.smithy.python.codegen.CodegenUtils; import software.amazon.smithy.python.codegen.GenerationContext; import software.amazon.smithy.python.codegen.PythonWriter; import software.amazon.smithy.python.codegen.SmithyPythonDependency; import software.amazon.smithy.python.codegen.integration.ProtocolGenerator; -import software.amazon.smithy.utils.CodeInterceptor; import software.amazon.smithy.utils.CodeSection; import software.amazon.smithy.utils.SmithyUnstableApi; -/* -dafny \ - -vcsCores:2 \ - -compileTarget:java\ - -spillTargetCode:3 \ - -compile:0 \ - -useRuntimeLib \ - -out runtimes/java \ - ./src/Index.dfy \ - -library:$(PROJECT_ROOT)/dafny-dependencies/StandardLibrary/src/Index.dfy \ - $(patsubst %, -library:$(PROJECT_ROOT)/%/src/Index.dfy, $(LIBRARIES)) - - */ /** - * Abstract implementation useful for all protocols that use HTTP bindings. * *